@edgestore/cli 1.0.0-next.4 → 1.0.0-rc.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "revision": "2375f47ee6205bc5ac25c1f500a543dbfb7470ab9689d7f7051ca262f5d6a6ef",
3
+ "revision": "abf23dea5885c69eb90d1e6448eb7a2a91eb90f5d8524332b61c7eff3c720d6a",
4
4
  "files": {
5
- "edgestore-setup/SKILL.md": "---\nname: edgestore-setup\ndescription: Use when adding, extending, or troubleshooting EdgeStore file uploads, upload UI, or bucket access policies in a TypeScript/React application. Not for unrelated storage migrations or account administration.\nlicense: MIT\n---\n\n# EdgeStore setup\n\nImplement uploads through the application's UI and server route. Verify the upload\nand retrieval there; if runtime access is unavailable, report what remains untested.\n\n## Establish the application and API version\n\nUse `edgestore --cwd <app> agent context --json` when the CLI is available. Otherwise\ninspect the selected workspace's manifests, installed EdgeStore package metadata,\nexisting routes/provider, and backend env-file convention. In a monorepo identify\nthe frontend and backend separately. Use the app's package versions, not the CLI's.\n\nRead the relevant installed `@edgestore/server`, `@edgestore/react`, or\n`@edgestore/sdk` `agent-docs/README.md` and follow its local references. These\nbelong to the installed package version; the skill and CLI can be newer. If the\nreference is absent, use installed types/source and version-matched documentation,\nand mention the fallback. Read the references again after installing packages.\n\nFor an existing 0.2 integration, resolve maintenance versus migration with the\nuser before changing APIs. Preserve installed versions unless an upgrade is\nauthorized. For missing packages choose a compatible, explicit version. Use a\nprerelease only when requested or required by the application.\n\n## Choose the integration\n\nReuse the app's architecture, existing buckets, and configured storage provider.\nRead the matching installed server reference: `next.md` (App or Pages Router),\n`tanstack-start.md`, `remix.md` (Remix or React Router framework mode), `astro.md`,\n`hono.md`, `express.md`, or `fastify.md`. Check the app's routing convention and\nframework version before adapting examples. A React Router client-side app still\nneeds a backend. Reuse the existing backend or ask which one to add. Preserve S3,\nAzure, and custom providers rather than provisioning hosted EdgeStore resources.\n\nInfer a bucket name from the application's feature (for example avatars or\nattachments); fall back to `publicFiles` when context is insufficient. Infer public\nversus protected access from the application and disclose the decision in the\ninitial implementation plan or after implementation. Ask when the access policy\nis ambiguous or the files may be sensitive. Configure the application's\nauthorization rules for protected files.\n\nBefore provisioning, know the selected app/backend, intended provider, account,\nproject, bucket identity, access policy, and env destination. Reuse an existing env\nfile when the backend already loads it; otherwise use the framework's convention.\nPreserve existing env values.\n\n## Use MCP and the CLI\n\nPrefer an available MCP for an action it supports; otherwise use the CLI if\navailable. Start with read-only discovery and request only the permissions needed.\nIf authentication requires the user, explain the sign-in step and continue local work.\n\nCreating resources requires authorization for that setup. A project already\ncreated through MCP should be linked locally, not created again through CLI.\nAfter an uncertain mutation result, inspect for the resource before retrying or\nswitching tools. Do not delete/empty buckets, revoke keys, enable billable overage, or\nchange unrelated resources as an implicit setup step.\n\nFor hosted provisioning or credential delivery, read\n[references/hosted-setup.md](references/hosted-setup.md).\n\n## Implement and verify\n\nConfigure the backend router/provider and the matching client endpoint using\ninstalled references. Keep server keys in a loaded, gitignored backend env file,\nnot frontend variables (`VITE_*`, `NEXT_PUBLIC_*`).\nIn split workspaces, export the real backend router type and import it with\n`import type` on the frontend. For cross-origin calls, configure CORS for the\nintended frontend origin. Wrap the upload UI with the React provider.\n\nFor a failing integration, read the installed server's `troubleshooting.md` and\nthe React package's `errors.md`. Diagnose the failing app request before changing\nremote resources or credentials.\n\nRun `edgestore --cwd <app> doctor --offline` when available, plus the app's own\ntypecheck/build/tests. Investigate doctor warnings and skipped checks. Start the\napp, upload a small test file through its UI and server route, and independently\nretrieve and check the bytes.\nFor protected access, verify unauthenticated retrieval is denied and authorized\nretrieval works.\n\nUse the account and project authorized for testing. Keep credentials and signed\nURLs out of agent output; retrieve protected files in a local process that returns\nonly the result. Clean up only this task's test resources. Summarize the integration\nchoices, checks performed, blockers, and any test resources left behind.\n",
5
+ "edgestore-setup/SKILL.md": "---\nname: edgestore-setup\ndescription: Use when adding, extending, or troubleshooting EdgeStore file uploads, upload UI, or bucket access policies in a TypeScript/React application. Not for unrelated storage migrations or account administration.\nlicense: MIT\n---\n\n# EdgeStore setup\n\nImplement uploads through the application's UI and server route. Verify the upload\nand retrieval there; if runtime access is unavailable, report what remains untested.\n\n## Establish the application and API version\n\nUse `edgestore --cwd <app> agent context --json` when the CLI is available. Otherwise\ninspect the selected workspace's manifests, installed EdgeStore package metadata,\nexisting routes/provider, and backend env-file convention. In a monorepo identify\nthe frontend and backend separately. Use the app's package versions, not the CLI's.\n\nRead the relevant installed `@edgestore/server`, `@edgestore/react`, or\n`@edgestore/sdk` `agent-docs/README.md` and follow its local references. These\nbelong to the installed package version; the skill and CLI can be newer. If the\nreference is absent, use installed types/source and version-matched documentation,\nand mention the fallback. Read the references again after installing packages.\n\nFor an existing 0.x integration, resolve maintenance versus migration with the\nuser before changing APIs. Preserve installed versions unless an upgrade is\nauthorized. For new integrations, install EdgeStore v1 packages from the `rc`\ntag (for example, `@edgestore/server@rc` and `@edgestore/react@rc`); use\n`@edgestore/sdk@rc` or `@edgestore/cli@rc` when needed. For missing packages in\nan existing integration, choose a compatible, explicit version. Use other\nprereleases only when requested or required by the application.\n\n## Choose the integration\n\nReuse the app's architecture, existing buckets, and configured storage provider.\nRead the matching installed server reference: `next.md` (App or Pages Router),\n`tanstack-start.md`, `remix.md` (Remix or React Router framework mode), `astro.md`,\n`hono.md`, `express.md`, or `fastify.md`. Check the app's routing convention and\nframework version before adapting examples. A React Router client-side app still\nneeds a backend. Reuse the existing backend or ask which one to add. Preserve S3,\nAzure, and custom providers rather than provisioning hosted EdgeStore resources.\n\nInfer a bucket name from the application's feature (for example avatars or\nattachments); fall back to `publicFiles` when context is insufficient. Infer public\nversus protected access from the application and disclose the decision in the\ninitial implementation plan or after implementation. Ask when the access policy\nis ambiguous or the files may be sensitive. Configure the application's\nauthorization rules for protected files.\n\nBefore provisioning, know the selected app/backend, intended provider, account,\nproject, bucket identity, access policy, and env destination. Reuse an existing env\nfile when the backend already loads it; otherwise use the framework's convention.\nPreserve existing env values.\n\n## Use MCP and the CLI\n\nPrefer an available MCP for an action it supports; otherwise use the CLI if\navailable. Start with read-only discovery and request only the permissions needed.\nIf authentication requires the user, explain the sign-in step and continue local work.\n\nCreating resources requires authorization for that setup. A project already\ncreated through MCP should be linked locally, not created again through CLI.\nAfter an uncertain mutation result, inspect for the resource before retrying or\nswitching tools. Do not delete/empty buckets, revoke keys, enable billable overage, or\nchange unrelated resources as an implicit setup step.\n\nFor hosted provisioning or credential delivery, read\n[references/hosted-setup.md](references/hosted-setup.md).\n\n## Implement and verify\n\nConfigure the backend router/provider and the matching client endpoint using\ninstalled references. Keep server keys in a loaded, gitignored backend env file,\nnot frontend variables (`VITE_*`, `NEXT_PUBLIC_*`).\nIn split workspaces, export the real backend router type and import it with\n`import type` on the frontend. For cross-origin calls, configure CORS for the\nintended frontend origin. Wrap the upload UI with the React provider.\n\nFor a failing integration, read the installed server's `troubleshooting.md` and\nthe React package's `errors.md`. Diagnose the failing app request before changing\nremote resources or credentials.\n\nRun `edgestore --cwd <app> doctor --offline` when available, plus the app's own\ntypecheck/build/tests. Investigate doctor warnings and skipped checks. Start the\napp, upload a small test file through its UI and server route, and independently\nretrieve and check the bytes.\nFor protected access, verify unauthenticated retrieval is denied and authorized\nretrieval works.\n\nUse the account and project authorized for testing. Keep credentials and signed\nURLs out of agent output; retrieve protected files in a local process that returns\nonly the result. Clean up only this task's test resources. Summarize the integration\nchoices, checks performed, blockers, and any test resources left behind.\n",
6
6
  "edgestore-setup/agents/openai.yaml": "interface:\n display_name: \"EdgeStore Setup\"\n short_description: \"Use when adding or troubleshooting EdgeStore file uploads.\"\n",
7
7
  "edgestore-setup/references/hosted-setup.md": "# Hosted setup and credential handoff\n\nUse MCP first for supported account/project/bucket discovery and authorized\nchanges; otherwise use the CLI. Confirm the account and project in the tool's\nmetadata before making changes.\n\nTo configure MCP:\n\n```sh\nedgestore mcp setup --client codex --dry-run --json\nedgestore mcp setup --client codex --yes\n```\n\nUse `claude` or `cursor` for those clients. Setup configures\n`https://api.edgestore.dev/mcp`. Sign in through your client and review the\nrequested permissions.\n\nCheck `--help` for the installed CLI's available commands. Use `--json` and file\ndelivery to keep secrets out of tool output. Let the user complete any required login.\n\nAfter MCP creates/selects a project, link the backend to that same project and\nexisting env convention:\n\n```sh\nedgestore --cwd <backend> project link <project-base-path> --env-file <env-file> --json\n```\n\nReuse an existing valid backend key when possible. When a new key is authorized:\n\n```sh\nedgestore --cwd <backend> project key create <project-base-path> --name local --output <env-file> --json\n```\n\nThe destination must be gitignored. If values already exist, inspect the\nconfiguration before considering `--update`. Check key presence and project\nassociation without reading secret values into agent context. If file delivery is\nunavailable, ask the user to configure the key locally, not paste it into chat.\nOn partial failure, follow the returned recovery status before retrying.\n\n`init` provisions or links resources. Use `project link` when MCP has already\ncreated the project.\n"
8
8
  }
package/dist/bin.mjs CHANGED
@@ -720,6 +720,7 @@ function closeServer(server) {
720
720
  return;
721
721
  }
722
722
  server.close((error)=>error ? reject(error) : resolve());
723
+ server.closeAllConnections();
723
724
  });
724
725
  }
725
726
  function abortError() {
@@ -2432,7 +2433,7 @@ async function inspectApplication(directory) {
2432
2433
  ][0] ?? 'not-installed';
2433
2434
  const warnings = [];
2434
2435
  if (compatibility === 'unresolved') warnings.push("Yarn Plug'n'Play package resolution is not supported. Installed versions and bundled references were not inspected; this does not mean dependencies are missing.");
2435
- if (compatibility === 'legacy') warnings.push('Choose whether to maintain 0.2 or migrate before changing APIs. Do not upgrade implicitly.');
2436
+ if (compatibility === 'legacy') warnings.push('Choose whether to maintain 0.x or migrate to v1 before changing APIs. Do not upgrade implicitly.');
2436
2437
  if (compatibility === 'mixed' || compatibility === 'unsupported') warnings.push('Resolve package compatibility explicitly before implementing; do not mix API generations.');
2437
2438
  if (new Set(versions).size > 1) warnings.push('Installed EdgeStore package versions differ. Read each package’s own references and verify compatibility.');
2438
2439
  const files = (await readdir(directory)).filter((name)=>/^\.env(?:\.[\w.-]+)?$/.test(name));
@@ -2454,8 +2455,9 @@ async function inspectApplication(directory) {
2454
2455
  };
2455
2456
  }
2456
2457
  function versionFamily(version) {
2457
- if (/^1\.\d+\.\d+(?:[-+].*)?$/.test(version)) return 'v1';
2458
- if (/^0\.2\.\d+(?:[-+].*)?$/.test(version)) return 'legacy';
2458
+ // Canary snapshots (`0.0.0-canary-<timestamp>`) are built from v1 branches.
2459
+ if (/^(?:1\.\d+\.\d+(?:[-+].*)?|0\.0\.0-canary-.*)$/.test(version)) return 'v1';
2460
+ if (/^0\.\d+\.\d+(?:[-+].*)?$/.test(version)) return 'legacy';
2459
2461
  return 'unsupported';
2460
2462
  }
2461
2463
  async function inspectPackage(directory, name, { declaredVersion, plugAndPlay }) {
@@ -2508,8 +2510,7 @@ async function inspectPackage(directory, name, { declaredVersion, plugAndPlay })
2508
2510
  } : {
2509
2511
  kind: 'online-fallback',
2510
2512
  version,
2511
- // Update the 0.2 URL to its archive as part of stable v1 docs promotion.
2512
- url: family === 'legacy' ? 'https://edgestore.dev/docs/quick-start' : family === 'v1' ? `${version.includes('-') ? 'https://next.edgestore.dev' : 'https://edgestore.dev'}/docs/agents` : undefined,
2513
+ url: family === 'legacy' ? 'https://edgestore.dev/docs/migrate-to-v1' : family === 'v1' ? `${version.includes('-') ? 'https://next.edgestore.dev' : 'https://edgestore.dev'}/docs/agents` : undefined,
2513
2514
  warning: 'No matching bundled references found. Online guidance may differ from this installed version; inspect installed types before using it.'
2514
2515
  };
2515
2516
  return {
@@ -3687,7 +3688,7 @@ async function localApplicationChecks(directory) {
3687
3688
  'mixed',
3688
3689
  'unsupported'
3689
3690
  ].includes(application.compatibility) ? 'fail' : application.compatibility === 'v1' ? 'pass' : 'warn',
3690
- detail: application.compatibility === 'legacy' ? 'Installed 0.2 packages: choose maintenance or migration explicitly.' : `${application.compatibility}; API authority is each installed package's references.`
3691
+ detail: application.compatibility === 'legacy' ? 'Installed 0.x packages: choose maintenance or migration explicitly.' : `${application.compatibility}; API authority is each installed package's references.`
3691
3692
  });
3692
3693
  for (const pkg of application.packages){
3693
3694
  if (pkg.status === 'unsupported-resolution') checks.push({
@@ -3790,16 +3791,12 @@ function inspectSource(source, frontend) {
3790
3791
  let adapter = false;
3791
3792
  let provider = false;
3792
3793
  const corsNames = new Set();
3793
- const handlers = new Set();
3794
3794
  const clientFile = frontend || ast.program.directives.some((directive)=>directive.value.value === 'use client');
3795
3795
  for (const statement of ast.program.body){
3796
3796
  if (statement.type !== 'ImportDeclaration') continue;
3797
3797
  const from = statement.source.value;
3798
3798
  const typeOnly = statement.importKind === 'type' || statement.specifiers.length > 0 && statement.specifiers.every((specifier)=>specifier.type === 'ImportSpecifier' && specifier.importKind === 'type');
3799
- if (from.startsWith('@edgestore/server/adapters/') && !typeOnly) {
3800
- adapter = true;
3801
- for (const specifier of statement.specifiers)handlers.add(specifier.local.name);
3802
- }
3799
+ if (from.startsWith('@edgestore/server/adapters/') && !typeOnly) adapter = true;
3803
3800
  if (from === 'hono/cors') {
3804
3801
  for (const specifier of statement.specifiers)corsNames.add(specifier.local.name);
3805
3802
  }
@@ -3813,9 +3810,6 @@ function inspectSource(source, frontend) {
3813
3810
  if (node.type === 'JSXOpeningElement' && node.name.type === 'JSXIdentifier' && node.name.name === 'EdgeStoreProvider') provider = true;
3814
3811
  if (node.type !== 'CallExpression' || !isIdentifier(node.callee) || node.arguments[0]?.type !== 'ObjectExpression') return;
3815
3812
  const argument = node.arguments[0];
3816
- if (handlers.has(node.callee.name) && property(argument, 'router') && !property(argument, 'edgestore')) {
3817
- warnings.add('Direct handler router option resembles 0.2 wiring. Check the installed version before maintaining or migrating it.');
3818
- }
3819
3813
  if (corsNames.has(node.callee.name)) {
3820
3814
  const origin = property(argument, 'origin');
3821
3815
  const credentials = property(argument, 'credentials');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgestore/cli",
3
- "version": "1.0.0-next.4",
3
+ "version": "1.0.0-rc.6",
4
4
  "description": "Command-line interface for EdgeStore accounts and projects",
5
5
  "homepage": "https://edgestore.dev",
6
6
  "license": "MIT",
@@ -18,7 +18,7 @@
18
18
  "edgestore": "dist/bin.mjs"
19
19
  },
20
20
  "engines": {
21
- "node": ">=24"
21
+ "node": ">=22.22.0"
22
22
  },
23
23
  "keywords": [
24
24
  "cli",
@@ -39,7 +39,7 @@
39
39
  "@babel/parser": "7.29.7",
40
40
  "@babel/types": "7.29.7",
41
41
  "@clack/prompts": "1.7.0",
42
- "@edgestore/sdk": "1.0.0-next.4",
42
+ "@edgestore/sdk": "1.0.0-rc.6",
43
43
  "@manypkg/find-root": "3.1.0",
44
44
  "@manypkg/get-packages": "3.1.0",
45
45
  "@napi-rs/keyring": "1.3.0",
@@ -62,6 +62,7 @@
62
62
  "build": "node ../../scripts/agentAssets.ts && pnpm typecheck && rollup --config rollup.config.ts --configPlugin rollup-plugin-swc3",
63
63
  "dev": "pnpm build --watch",
64
64
  "test": "node ../../scripts/agentAssets.ts && vitest run",
65
+ "test:smoke:dev": "node smoke.dev.mjs",
65
66
  "typecheck": "tsc --noEmit -p tsconfig.json",
66
67
  "lint": "eslint --cache --report-unused-disable-directives src"
67
68
  }