@actionway/cli-dev 0.0.0-dev.32114975300.f6517a3a01fe → 0.0.0-dev.32118536807.e19fdebc19d5

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -3
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -12314,6 +12314,7 @@ function runNpmText(args, operation, options = {}) {
12314
12314
  // src/lib/update-state.ts
12315
12315
  var UPDATE_STATE_BASENAME = "update.json";
12316
12316
  var UPDATE_CACHE_TTL_MS = 24 * 60 * 60 * 1e3;
12317
+ var DEVELOPMENT_VERSION_PATTERN = /^0\.0\.0-dev\.[1-9]\d*\.[0-9a-f]{12}$/;
12317
12318
  function actionwayConfigDir(env = process.env) {
12318
12319
  const override = (env.ACTIONWAY_CONFIG_DIR ?? "").trim();
12319
12320
  if (override) return override;
@@ -12367,7 +12368,15 @@ function loadState(env) {
12367
12368
  if (existsSync(path)) {
12368
12369
  try {
12369
12370
  const parsed = parseState(readFileSync2(path, "utf8"));
12370
- if (parsed) return parsed;
12371
+ if (parsed) {
12372
+ if (cliDistribution(env).channel === "development") {
12373
+ if (parsed.latest_version && !DEVELOPMENT_VERSION_PATTERN.test(parsed.latest_version)) {
12374
+ return emptyState();
12375
+ }
12376
+ return { ...parsed, min_version: null };
12377
+ }
12378
+ return parsed;
12379
+ }
12371
12380
  } catch {
12372
12381
  }
12373
12382
  }
@@ -13663,6 +13672,7 @@ function registerUpdateCommand(program2) {
13663
13672
  function withVersionMetadata(payload, deps = {}) {
13664
13673
  const env = deps.env ?? process.env;
13665
13674
  const cliVersion2 = deps.currentVersion ?? getCliVersion();
13675
+ const distribution = cliDistribution(env);
13666
13676
  const skillSource = skillSourcePath(env);
13667
13677
  const isUpdateCommandOutput = "update_available" in payload;
13668
13678
  const notes = [];
@@ -13670,12 +13680,12 @@ function withVersionMetadata(payload, deps = {}) {
13670
13680
  const state = readVersionState(env);
13671
13681
  if (!isUpdateCommandOutput && state.latest_version && isValidVersion(state.latest_version) && compareVersions(state.latest_version, cliVersion2) > 0) {
13672
13682
  notes.push(
13673
- `Update available: ${cliVersion2} -> ${state.latest_version}. Run \`actionway update\` at the next session boundary, then refresh the installed skill from ${skillSource}.`
13683
+ `Update available: ${cliVersion2} -> ${state.latest_version}. Run \`${distribution.commandName} update\` at the next session boundary, then refresh the installed skill from ${skillSource}.`
13674
13684
  );
13675
13685
  }
13676
13686
  if (state.min_version && isValidVersion(state.min_version) && compareVersions(cliVersion2, state.min_version) < 0) {
13677
13687
  notes.push(
13678
- `This CLI version (${cliVersion2}) is below the minimum supported version (${state.min_version}). Run \`actionway update\` now, then refresh the installed skill from ${skillSource}.`
13688
+ `This CLI version (${cliVersion2}) is below the minimum supported version (${state.min_version}). Run \`${distribution.commandName} update\` now, then refresh the installed skill from ${skillSource}.`
13679
13689
  );
13680
13690
  }
13681
13691
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actionway/cli-dev",
3
- "version": "0.0.0-dev.32114975300.f6517a3a01fe",
3
+ "version": "0.0.0-dev.32118536807.e19fdebc19d5",
4
4
  "description": "Actionway development CLI for dev.actionway.ai",
5
5
  "type": "module",
6
6
  "bin": {
@@ -36,9 +36,9 @@
36
36
  },
37
37
  "actionway": {
38
38
  "channel": "development",
39
- "source_sha": "f6517a3a01feccd8fb6760aceb5aae92b4cf3caf",
40
- "run_id": 32114975300,
41
- "run_url": "https://github.com/PawLogic/actionway/actions/runs/32114975300",
39
+ "source_sha": "e19fdebc19d56a6c21b0e2fd7a87b77fda973b85",
40
+ "run_id": 32118536807,
41
+ "run_url": "https://github.com/PawLogic/actionway/actions/runs/32118536807",
42
42
  "gateway_url": "https://dev.actionway.ai"
43
43
  }
44
44
  }