@weapp-vite/miniprogram-automator 1.5.6 → 1.5.7-dev.20261124.1

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.
package/dist/index.mjs CHANGED
@@ -1402,7 +1402,7 @@ var Connection = class Connection extends EventEmitter {
1402
1402
  };
1403
1403
  // src/headless.ts
1404
1404
  async function launchHeadlessAutomator(options) {
1405
- return await (await import("./launch-DT7hs3Jv.mjs")).launch({ projectPath: options.projectPath });
1405
+ return await (await import("./launch-BRmP6dyY.mjs")).launch({ projectPath: options.projectPath });
1406
1406
  }
1407
1407
  // src/launcher/diagnostics.ts
1408
1408
  /** 将本次 CLI 的有界输出附到原始错误,避免泄露登录票据及账号参数。 */
@@ -1658,7 +1658,7 @@ function spawnWechatCli(cliPath, args, cwd, scope) {
1658
1658
  return Object.assign(state, { release });
1659
1659
  }
1660
1660
  // package.json
1661
- var version = "1.5.6";
1661
+ var version = "1.5.7-dev.20261124.1";
1662
1662
  // src/appServiceHeap.ts
1663
1663
  function isRecord$1(value) {
1664
1664
  return value !== null && typeof value === "object" && !Array.isArray(value);
@@ -2031,7 +2031,7 @@ function registerSlotDeclarations(pass, slots, parent, scopeId) {
2031
2031
  scopeId
2032
2032
  });
2033
2033
  }
2034
- // ../../node_modules/.pnpm/@babel+parser@8.1.2/node_modules/@babel/parser/lib/index.js
2034
+ // ../../node_modules/.pnpm/@babel+parser@8.1.3/node_modules/@babel/parser/lib/index.js
2035
2035
  var Position = class {
2036
2036
  constructor(line, col, index) {
2037
2037
  this.line = void 0;
@@ -4990,7 +4990,7 @@ const flow = (superClass) => class FlowParserMixin extends superClass {
4990
4990
  node.callee = base;
4991
4991
  node.arguments = super.parseCallExpressionArguments();
4992
4992
  base = this.finishNode(node, "CallExpression");
4993
- } else if (base.type === "Identifier" && base.name === "async" && this.match(43)) {
4993
+ } else if (this.match(43) && this.atPossibleAsyncArrow(base)) {
4994
4994
  const state = this.state.clone();
4995
4995
  const arrow = this.tryParse((abort) => this.parseAsyncArrowWithTypeParameters(startLoc) || abort(), state);
4996
4996
  if (!arrow.error && !arrow.aborted) return arrow.node;
@@ -6099,6 +6099,7 @@ var TypeScriptScopeHandler = class extends ScopeHandler {
6099
6099
  var BaseParser = class {
6100
6100
  sawUnambiguousESM = false;
6101
6101
  ambiguousScriptDifferentAst = false;
6102
+ classHeritageStart = -1;
6102
6103
  noArrowAt = /* @__PURE__ */ new Set();
6103
6104
  sourceToOffsetPos(sourcePos) {
6104
6105
  return sourcePos + this.startIndex;
@@ -6641,7 +6642,15 @@ function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
6641
6642
  let code;
6642
6643
  if (ch === 123) {
6643
6644
  ++pos;
6644
- ({code, pos} = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
6645
+ const rightCurlyBracePos = input.indexOf("}", pos);
6646
+ if (rightCurlyBracePos === -1) {
6647
+ if (throwOnInvalid) errors.invalidEscapeSequence(pos, lineStart, curLine);
6648
+ return {
6649
+ code: null,
6650
+ pos
6651
+ };
6652
+ }
6653
+ ({code, pos} = readHexChar(input, pos, lineStart, curLine, rightCurlyBracePos - pos, true, throwOnInvalid, errors));
6645
6654
  ++pos;
6646
6655
  if (code !== null && code > 1114111) {
6647
6656
  if (throwOnInvalid) errors.invalidCodePoint(pos, lineStart, curLine);
@@ -8754,7 +8763,8 @@ var ExpressionParser = class extends LValParser {
8754
8763
  break;
8755
8764
  }
8756
8765
  }
8757
- elts.push(this.parseExprListItem(7, false, refExpressionErrors, allowPlaceholder));
8766
+ const elt = this.parseExprListItem(7, false, refExpressionErrors, allowPlaceholder);
8767
+ if (elt !== null) elts.push(elt);
8758
8768
  }
8759
8769
  return elts;
8760
8770
  }
@@ -8852,7 +8862,7 @@ var ExpressionParser = class extends LValParser {
8852
8862
  throw this.unexpected();
8853
8863
  }
8854
8864
  default: if (tokenIsIdentifier(type)) {
8855
- if (this.isContextual(126) && this.lookaheadInLineCharCode() === 123) return this.parseModuleExpression();
8865
+ if (this.isContextual(126) && this.state.start !== this.classHeritageStart && this.lookaheadInLineCharCode() === 123) return this.parseModuleExpression();
8856
8866
  const { canStartArrow, containsEsc } = this.state;
8857
8867
  const id = this.parseIdentifier();
8858
8868
  if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) {
@@ -9112,7 +9122,9 @@ var ExpressionParser = class extends LValParser {
9112
9122
  }
9113
9123
  parseNewOrNewTarget() {
9114
9124
  const node = this.startNode();
9125
+ const isClassHeritageStart = this.state.start === this.classHeritageStart;
9115
9126
  this.next();
9127
+ if (isClassHeritageStart) this.classHeritageStart = this.state.start;
9116
9128
  if (this.match(12)) {
9117
9129
  const meta = this.createIdentifier(this.startNodeAtNode(node), "new");
9118
9130
  this.next();
@@ -9224,10 +9236,9 @@ var ExpressionParser = class extends LValParser {
9224
9236
  const prop = this.startNodeAt(decoratorsStartLoc);
9225
9237
  let isAsync = false;
9226
9238
  let isAccessor = false;
9227
- let startLoc;
9228
9239
  if (decorators.length) prop.decorators = decorators;
9229
9240
  prop.method = false;
9230
- if (refExpressionErrors) startLoc = this.state.startLoc;
9241
+ const startLoc = this.state.startLoc;
9231
9242
  let isGenerator = this.eat(51);
9232
9243
  this.parsePropertyNamePrefixOperator(prop);
9233
9244
  const containsEsc = this.state.containsEsc;
@@ -9433,7 +9444,8 @@ var ExpressionParser = class extends LValParser {
9433
9444
  break;
9434
9445
  }
9435
9446
  }
9436
- elts.push(this.parseExprListItem(close, allowEmpty, refExpressionErrors));
9447
+ const elt = this.parseExprListItem(close, allowEmpty, refExpressionErrors);
9448
+ if (elt !== null || allowEmpty) elts.push(elt);
9437
9449
  }
9438
9450
  return elts;
9439
9451
  }
@@ -10191,7 +10203,10 @@ var StatementParser = class extends ExpressionParser {
10191
10203
  return this.finishNode(node, "EmptyStatement");
10192
10204
  }
10193
10205
  parseLabeledStatement(node, maybeName, expr, flags) {
10194
- for (const label of this.state.labels) if (label.name === maybeName) this.raise(Errors.LabelRedeclaration, expr, { labelName: maybeName });
10206
+ for (const label of this.state.labels) if (label.name === maybeName) {
10207
+ this.raise(Errors.LabelRedeclaration, expr, { labelName: maybeName });
10208
+ break;
10209
+ }
10195
10210
  const kind = tokenIsLoop(this.state.type) ? 1 : this.match(67) ? 2 : null;
10196
10211
  for (let i = this.state.labels.length - 1; i >= 0; i--) {
10197
10212
  const label = this.state.labels[i];
@@ -10608,6 +10623,7 @@ var StatementParser = class extends ExpressionParser {
10608
10623
  parseClassSuper(node) {
10609
10624
  if (this.eat(77)) {
10610
10625
  this.state.canStartArrow = false;
10626
+ this.classHeritageStart = this.state.start;
10611
10627
  node.superClass = this.parseExprSubscripts();
10612
10628
  } else node.superClass = null;
10613
10629
  }
@@ -13798,7 +13814,9 @@ const placeholders = (superClass) => class PlaceholdersParserMixin extends super
13798
13814
  node.specifiers = [];
13799
13815
  if (!this.isContextual(95) && !this.match(8)) {
13800
13816
  node.source = this.finishPlaceholder(placeholder, "StringLiteral");
13817
+ this.maybeParseImportAttributes(node);
13801
13818
  this.semicolon();
13819
+ this.sawUnambiguousESM = true;
13802
13820
  return this.finishNode(node, "ImportDeclaration");
13803
13821
  }
13804
13822
  const specifier = this.startNodeAtNode(placeholder);
@@ -13808,9 +13826,7 @@ const placeholders = (superClass) => class PlaceholdersParserMixin extends super
13808
13826
  if (!this.maybeParseStarImportSpecifier(node)) this.parseNamedOrFilteredImportSpecifiers(node);
13809
13827
  }
13810
13828
  this.expectContextual(95);
13811
- node.source = this.parseImportSource();
13812
- this.semicolon();
13813
- return this.finishNode(node, "ImportDeclaration");
13829
+ return super.parseImportSourceAndAttributes(node);
13814
13830
  }
13815
13831
  parseImportSource() {
13816
13832
  return this.parsePlaceholder("StringLiteral") || super.parseImportSource();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@weapp-vite/miniprogram-automator",
3
3
  "type": "module",
4
- "version": "1.5.6",
4
+ "version": "1.5.7-dev.20261124.1",
5
5
  "description": "完全兼容微信 miniprogram-automator 的现代化替代实现",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -49,13 +49,14 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@types/ws": "^8.18.2",
52
- "@weapp-vite/qr": "1.2.6",
52
+ "@weapp-vite/qr": "1.2.7-dev.20261124.1",
53
53
  "obug": "^3.0.0",
54
54
  "ws": "^8.23.0"
55
55
  },
56
56
  "publishConfig": {
57
57
  "access": "public",
58
- "registry": "https://registry.npmjs.org"
58
+ "registry": "https://registry.npmjs.org/",
59
+ "tag": "snapshot-nightly"
59
60
  },
60
61
  "devDependencies": {
61
62
  "sharp": "^0.35.5"
@@ -66,6 +67,13 @@
66
67
  "moduleResolution": "NodeNext"
67
68
  }
68
69
  },
70
+ "repoctlSnapshot": {
71
+ "kind": "nightly",
72
+ "commit": "f0bf85fb832920e45775e1e40ce9436575d539c4",
73
+ "buildId": "45337006616-1",
74
+ "identityKey": "11ff7743a27af204ed1fb8fd1ba8e237298736672d51468298cf429ed488e9ed",
75
+ "tag": "snapshot-nightly"
76
+ },
69
77
  "scripts": {
70
78
  "dev": "tsdown -w --sourcemap",
71
79
  "build": "tsdown",
@@ -77,4 +85,4 @@
77
85
  "lint": "eslint .",
78
86
  "lint:fix": "eslint . --fix"
79
87
  }
80
- }
88
+ }