mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-18 00:02:48 +00:00
fix: bump missing packages to 0.2.0 and handle 404 in npmVersionExists
- Bump acp-http-client and persist-* packages from 0.1.0 to 0.2.0 - Fix npmVersionExists to handle 404 for never-published packages
This commit is contained in:
parent
46193747e6
commit
cb1f770b47
6 changed files with 14 additions and 14 deletions
|
|
@ -81,16 +81,16 @@ async function npmVersionExists(
|
||||||
return true;
|
return true;
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
if (error.stderr) {
|
if (error.stderr) {
|
||||||
if (
|
const stderr = error.stderr;
|
||||||
!error.stderr.includes(
|
// Expected errors when version or package doesn't exist
|
||||||
`No match found for version ${version}`,
|
const expected =
|
||||||
) &&
|
stderr.includes(`No match found for version ${version}`) ||
|
||||||
!error.stderr.includes(
|
stderr.includes(`'${packageName}@${version}' is not in this registry.`) ||
|
||||||
`'${packageName}@${version}' is not in this registry.`,
|
stderr.includes("404 Not Found") ||
|
||||||
)
|
stderr.includes("is not in the npm registry");
|
||||||
) {
|
if (!expected) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`unexpected npm view version output: ${error.stderr}`,
|
`unexpected npm view version output: ${stderr}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "acp-http-client",
|
"name": "acp-http-client",
|
||||||
"version": "0.1.0",
|
"version": "0.2.0",
|
||||||
"description": "Protocol-faithful ACP JSON-RPC over streamable HTTP client.",
|
"description": "Protocol-faithful ACP JSON-RPC over streamable HTTP client.",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@sandbox-agent/persist-indexeddb",
|
"name": "@sandbox-agent/persist-indexeddb",
|
||||||
"version": "0.1.0",
|
"version": "0.2.0",
|
||||||
"description": "IndexedDB persistence driver for the Sandbox Agent TypeScript SDK",
|
"description": "IndexedDB persistence driver for the Sandbox Agent TypeScript SDK",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@sandbox-agent/persist-postgres",
|
"name": "@sandbox-agent/persist-postgres",
|
||||||
"version": "0.1.0",
|
"version": "0.2.0",
|
||||||
"description": "PostgreSQL persistence driver for the Sandbox Agent TypeScript SDK",
|
"description": "PostgreSQL persistence driver for the Sandbox Agent TypeScript SDK",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@sandbox-agent/persist-rivet",
|
"name": "@sandbox-agent/persist-rivet",
|
||||||
"version": "0.1.0",
|
"version": "0.2.0",
|
||||||
"description": "Rivet Actor persistence driver for the Sandbox Agent TypeScript SDK",
|
"description": "Rivet Actor persistence driver for the Sandbox Agent TypeScript SDK",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@sandbox-agent/persist-sqlite",
|
"name": "@sandbox-agent/persist-sqlite",
|
||||||
"version": "0.1.0",
|
"version": "0.2.0",
|
||||||
"description": "SQLite persistence driver for the Sandbox Agent TypeScript SDK",
|
"description": "SQLite persistence driver for the Sandbox Agent TypeScript SDK",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue