openmates 0.18.0-alpha.4 → 0.18.0-alpha.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.
@@ -74625,6 +74625,11 @@ function checkSelfUpdateStatus(plan) {
74625
74625
  checkError: null
74626
74626
  };
74627
74627
  }
74628
+ function pinSelfUpdatePlan(plan, version) {
74629
+ const packageSpec = `${PACKAGE_NAME}@${parseTarget(version)}`;
74630
+ const { command, args } = commandForPackageManager(plan.packageManager, packageSpec);
74631
+ return { ...plan, target: version, packageSpec, command, args };
74632
+ }
74628
74633
  function runSelfUpdate(plan, options = {}) {
74629
74634
  if (plan.dryRun) return;
74630
74635
  const result = spawnSync3(plan.command, plan.args, {
@@ -74642,6 +74647,12 @@ function runSelfUpdate(plan, options = {}) {
74642
74647
  ${output}` : "";
74643
74648
  throw new Error(`${plan.command} ${plan.args.join(" ")} failed with exit code ${result.status ?? "unknown"}${suffix}`);
74644
74649
  }
74650
+ if (installedNpmPrefix()) {
74651
+ const installed = getCliPackageVersion();
74652
+ if (installed !== plan.target) {
74653
+ throw new Error(`CLI upgrade installed version ${installed}; expected ${plan.target}. Retry the upgrade with --verbose to inspect package-manager output.`);
74654
+ }
74655
+ }
74645
74656
  }
74646
74657
  function resolveTargetVersion(target) {
74647
74658
  const forced = process.env.OPENMATES_CLI_LATEST_VERSION;
@@ -75451,10 +75462,13 @@ function handleSupport(flags) {
75451
75462
  console.log(renderSupportInfo());
75452
75463
  }
75453
75464
  function handleSelfUpdate(command, flags) {
75454
- const plan = buildSelfUpdatePlan(flags);
75465
+ let plan = buildSelfUpdatePlan(flags);
75455
75466
  const status = checkSelfUpdateStatus(plan);
75456
75467
  if (status.checkError) throw new Error(`Update check failed: ${status.checkError}`);
75457
75468
  const shouldInstall = status.updateAvailable === true;
75469
+ if (!plan.dryRun && shouldInstall && status.latestVersion) {
75470
+ plan = pinSelfUpdatePlan(plan, status.latestVersion);
75471
+ }
75458
75472
  if (flags.json === true) {
75459
75473
  if (!plan.dryRun && shouldInstall) runSelfUpdate(plan, { verbose: flags.verbose === true });
75460
75474
  persistSelfUpdateChannel(plan);
package/dist/cli.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  resolveProjectContext,
12
12
  serializeToYaml,
13
13
  shouldRequireTrustedAccountGuard
14
- } from "./chunk-EKALVG2T.js";
14
+ } from "./chunk-2H5LTEHD.js";
15
15
  import "./chunk-IWKP55ZB.js";
16
16
  import "./chunk-BBKJZ23O.js";
17
17
  export {
package/dist/index.js CHANGED
@@ -42,7 +42,7 @@ import {
42
42
  selectAssistantMessagesForSpeech,
43
43
  serializeToYaml,
44
44
  summarizeAssistantSpeech
45
- } from "./chunk-EKALVG2T.js";
45
+ } from "./chunk-2H5LTEHD.js";
46
46
  import "./chunk-IWKP55ZB.js";
47
47
  import "./chunk-BBKJZ23O.js";
48
48
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmates",
3
- "version": "0.18.0-alpha.4",
3
+ "version": "0.18.0-alpha.6",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -49,7 +49,8 @@
49
49
  "test:unit:tui": "node --test --experimental-strip-types --loader ./tests/loader.mjs tests/tui.test.ts tests/tuiExampleContinuation.test.ts tests/tuiWorkflowInteraction.test.ts",
50
50
  "test:unit:connected-account-import": "node --test --experimental-strip-types --loader ./tests/loader.mjs tests/connectedAccountImport.test.ts",
51
51
  "test:unit:benchmark": "node --test --experimental-strip-types --loader ./tests/loader.mjs src/__tests__/benchmark.test.ts",
52
- "test": "node --test --experimental-strip-types --loader ./tests/loader.mjs tests/crypto.test.ts tests/storage.test.ts tests/keychain.test.ts tests/mentions.test.ts tests/outputRedactor.test.ts tests/fileEmbed.test.ts tests/embedCreator.test.ts tests/shareEncryption.test.ts tests/server.test.ts tests/serverQuickTest.test.ts tests/ws.test.ts tests/urlEmbed.test.ts tests/tui.test.ts tests/tuiExampleContinuation.test.ts tests/tuiWorkflowInteraction.test.ts tests/workflows.test.ts tests/sdk-workflows.test.ts tests/draft-sync.test.ts tests/sdk-draft-sync.test.ts tests/ideabucket.test.ts tests/teams-permissions.test.ts src/__tests__/benchmark.test.ts && node --test --experimental-strip-types --loader ./tests/loader.mjs tests/embedRenderers.test.ts tests/connectedAccountImport.test.ts && node --test tests/cli.test.ts tests/imagesDetectAi.test.ts tests/uploadService.test.ts tests/billing.test.ts tests/account-delete.test.ts tests/signup.test.ts tests/security-setup.test.ts tests/e2e-provisioning.test.ts"
52
+ "test": "node --test --experimental-strip-types --loader ./tests/loader.mjs tests/crypto.test.ts tests/storage.test.ts tests/keychain.test.ts tests/mentions.test.ts tests/outputRedactor.test.ts tests/fileEmbed.test.ts tests/embedCreator.test.ts tests/shareEncryption.test.ts tests/server.test.ts tests/serverQuickTest.test.ts tests/ws.test.ts tests/urlEmbed.test.ts tests/tui.test.ts tests/tuiExampleContinuation.test.ts tests/tuiWorkflowInteraction.test.ts tests/workflows.test.ts tests/sdk-workflows.test.ts tests/draft-sync.test.ts tests/sdk-draft-sync.test.ts tests/ideabucket.test.ts tests/teams-permissions.test.ts src/__tests__/benchmark.test.ts && node --test --experimental-strip-types --loader ./tests/loader.mjs tests/embedRenderers.test.ts tests/connectedAccountImport.test.ts && node --test tests/cli.test.ts tests/imagesDetectAi.test.ts tests/uploadService.test.ts tests/billing.test.ts tests/account-delete.test.ts tests/signup.test.ts tests/security-setup.test.ts tests/e2e-provisioning.test.ts && npm run test:unit:session",
53
+ "test:unit:session": "node --test --experimental-strip-types --loader ./tests/loader.mjs --test-name-pattern \"serializes refreshes|session refresh|rotated|gateway\" tests/client.test.ts"
53
54
  },
54
55
  "keywords": [
55
56
  "openmates",