@coze-arch/cli 0.0.22 → 0.0.23

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.
@@ -4,8 +4,8 @@ requires = ["python-3.12"]
4
4
 
5
5
  [dev]
6
6
  build = []
7
- run = ["python", "-m", "http.server", "5000", "--bind", "0.0.0.0"]
7
+ run = [ "sh", "-c", "python -m http.server ${DEPLOY_RUN_PORT} --bind 0.0.0.0" ]
8
8
 
9
9
  [deploy]
10
10
  build = []
11
- run = ["python", "-m", "http.server", "5000", "--bind", "0.0.0.0"]
11
+ run = [ "sh", "-c", "python -m http.server ${DEPLOY_RUN_PORT} --bind 0.0.0.0" ]
package/lib/cli.js CHANGED
@@ -2107,7 +2107,7 @@ const EventBuilder = {
2107
2107
  };
2108
2108
 
2109
2109
  var name = "@coze-arch/cli";
2110
- var version = "0.0.21";
2110
+ var version = "0.0.22";
2111
2111
  var description = "coze coding devtools cli";
2112
2112
  var license = "MIT";
2113
2113
  var author = "fanwenjie.fe@bytedance.com";
@@ -2149,7 +2149,7 @@ var dependencies = {
2149
2149
  "ajv-formats": "^3.0.1",
2150
2150
  "change-case": "^5.4.4",
2151
2151
  commander: "~12.1.0",
2152
- debug: "^4.3.7",
2152
+ debug: "^4.4.3",
2153
2153
  ejs: "^3.1.10",
2154
2154
  "fast-glob": "^3.3.3",
2155
2155
  "js-yaml": "^4.1.0",
@@ -2168,7 +2168,6 @@ var devDependencies = {
2168
2168
  "@coze-coding/lambda": "workspace:*",
2169
2169
  "@emnapi/runtime": "^1.7.1",
2170
2170
  "@inquirer/prompts": "^3.2.0",
2171
- "@playwright/test": "~1.55.0",
2172
2171
  "@rollup/plugin-commonjs": "^28.0.2",
2173
2172
  "@rollup/plugin-json": "~6.0.0",
2174
2173
  "@rollup/plugin-node-resolve": "^15.3.0",
@@ -2181,15 +2180,15 @@ var devDependencies = {
2181
2180
  "@types/minimist": "^1.2.5",
2182
2181
  "@types/node": "^24",
2183
2182
  "@types/shelljs": "^0.10.0",
2184
- "@vitest/coverage-v8": "~4.0.18",
2183
+ "@vitest/coverage-v8": "~4.1.6",
2185
2184
  knip: "^5.30.1",
2186
2185
  minimatch: "^10.0.1",
2187
2186
  playwright: "~1.55.0",
2188
2187
  rollup: "^4.60.1",
2189
2188
  sucrase: "^3.35.0",
2190
2189
  "tree-kill": "^1.2.2",
2191
- tsx: "^4.20.6",
2192
- vitest: "~4.0.18"
2190
+ tsx: "^4.21.0",
2191
+ vitest: "~4.1.6"
2193
2192
  };
2194
2193
  var publishConfig = {
2195
2194
  access: "public",
@@ -3737,8 +3736,10 @@ class Alias extends NodeBase {
3737
3736
  * instance of the `source` anchor before this node.
3738
3737
  */
3739
3738
  resolve(doc, ctx) {
3739
+ if (_optionalChain$l([ctx, 'optionalAccess', _ => _.maxAliasCount]) === 0)
3740
+ throw new ReferenceError('Alias resolution is disabled');
3740
3741
  let nodes;
3741
- if (_optionalChain$l([ctx, 'optionalAccess', _ => _.aliasResolveCache])) {
3742
+ if (_optionalChain$l([ctx, 'optionalAccess', _2 => _2.aliasResolveCache])) {
3742
3743
  nodes = ctx.aliasResolveCache;
3743
3744
  }
3744
3745
  else {
@@ -3777,7 +3778,7 @@ class Alias extends NodeBase {
3777
3778
  data = anchors.get(source);
3778
3779
  }
3779
3780
  /* istanbul ignore if */
3780
- if (_optionalChain$l([data, 'optionalAccess', _2 => _2.res]) === undefined) {
3781
+ if (_optionalChain$l([data, 'optionalAccess', _3 => _3.res]) === undefined) {
3781
3782
  const msg = 'This should not happen: Alias anchor was not resolved?';
3782
3783
  throw new ReferenceError(msg);
3783
3784
  }
@@ -4873,18 +4874,18 @@ const isMergeKey = (ctx, key) => (merge.identify(key) ||
4873
4874
  merge.identify(key.value))) &&
4874
4875
  _optionalChain$g([ctx, 'optionalAccess', _ => _.doc, 'access', _2 => _2.schema, 'access', _3 => _3.tags, 'access', _4 => _4.some, 'call', _5 => _5(tag => tag.tag === merge.tag && tag.default)]);
4875
4876
  function addMergeToJSMap(ctx, map, value) {
4876
- value = ctx && isAlias(value) ? value.resolve(ctx.doc) : value;
4877
- if (isSeq(value))
4878
- for (const it of value.items)
4877
+ const source = resolveAliasValue(ctx, value);
4878
+ if (isSeq(source))
4879
+ for (const it of source.items)
4879
4880
  mergeValue(ctx, map, it);
4880
- else if (Array.isArray(value))
4881
- for (const it of value)
4881
+ else if (Array.isArray(source))
4882
+ for (const it of source)
4882
4883
  mergeValue(ctx, map, it);
4883
4884
  else
4884
- mergeValue(ctx, map, value);
4885
+ mergeValue(ctx, map, source);
4885
4886
  }
4886
4887
  function mergeValue(ctx, map, value) {
4887
- const source = ctx && isAlias(value) ? value.resolve(ctx.doc) : value;
4888
+ const source = resolveAliasValue(ctx, value);
4888
4889
  if (!isMap(source))
4889
4890
  throw new Error('Merge sources must be maps or map aliases');
4890
4891
  const srcMap = source.toJSON(null, ctx, Map);
@@ -4907,6 +4908,9 @@ function mergeValue(ctx, map, value) {
4907
4908
  }
4908
4909
  return map;
4909
4910
  }
4911
+ function resolveAliasValue(ctx, value) {
4912
+ return ctx && isAlias(value) ? value.resolve(ctx.doc, ctx) : value;
4913
+ }
4910
4914
 
4911
4915
  function _optionalChain$f(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
4912
4916
  function addPairToJSMap(ctx, map, { key, value }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coze-arch/cli",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "private": false,
5
5
  "description": "coze coding devtools cli",
6
6
  "license": "MIT",
@@ -42,7 +42,7 @@
42
42
  "ajv-formats": "^3.0.1",
43
43
  "change-case": "^5.4.4",
44
44
  "commander": "~12.1.0",
45
- "debug": "^4.3.7",
45
+ "debug": "^4.4.3",
46
46
  "ejs": "^3.1.10",
47
47
  "fast-glob": "^3.3.3",
48
48
  "js-yaml": "^4.1.0",
@@ -61,7 +61,6 @@
61
61
  "@coze-coding/lambda": "workspace:*",
62
62
  "@emnapi/runtime": "^1.7.1",
63
63
  "@inquirer/prompts": "^3.2.0",
64
- "@playwright/test": "~1.55.0",
65
64
  "@rollup/plugin-commonjs": "^28.0.2",
66
65
  "@rollup/plugin-json": "~6.0.0",
67
66
  "@rollup/plugin-node-resolve": "^15.3.0",
@@ -74,15 +73,15 @@
74
73
  "@types/minimist": "^1.2.5",
75
74
  "@types/node": "^24",
76
75
  "@types/shelljs": "^0.10.0",
77
- "@vitest/coverage-v8": "~4.0.18",
76
+ "@vitest/coverage-v8": "~4.1.6",
78
77
  "knip": "^5.30.1",
79
78
  "minimatch": "^10.0.1",
80
79
  "playwright": "~1.55.0",
81
80
  "rollup": "^4.60.1",
82
81
  "sucrase": "^3.35.0",
83
82
  "tree-kill": "^1.2.2",
84
- "tsx": "^4.20.6",
85
- "vitest": "~4.0.18"
83
+ "tsx": "^4.21.0",
84
+ "vitest": "~4.1.6"
86
85
  },
87
86
  "publishConfig": {
88
87
  "access": "public",