@serviceme/devtools-cli 0.1.6 → 0.1.7
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/bridgeServer.js +492 -333
- package/dist/cli.js +826 -507
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -1,54 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var fs12 = require('fs/promises');
|
|
5
|
-
var path11 = require('path');
|
|
6
|
-
var child_process = require('child_process');
|
|
7
|
-
var fs9 = require('fs');
|
|
8
|
-
var crypto = require('crypto');
|
|
9
|
-
var os = require('os');
|
|
10
|
-
var readline = require('readline');
|
|
11
|
-
|
|
12
|
-
function _interopNamespace(e) {
|
|
13
|
-
if (e && e.__esModule) return e;
|
|
14
|
-
var n = Object.create(null);
|
|
15
|
-
if (e) {
|
|
16
|
-
Object.keys(e).forEach(function (k) {
|
|
17
|
-
if (k !== 'default') {
|
|
18
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
19
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () { return e[k]; }
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
n.default = e;
|
|
27
|
-
return Object.freeze(n);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
var fs12__namespace = /*#__PURE__*/_interopNamespace(fs12);
|
|
31
|
-
var path11__namespace = /*#__PURE__*/_interopNamespace(path11);
|
|
32
|
-
var fs9__namespace = /*#__PURE__*/_interopNamespace(fs9);
|
|
33
|
-
var os__namespace = /*#__PURE__*/_interopNamespace(os);
|
|
34
|
-
var readline__namespace = /*#__PURE__*/_interopNamespace(readline);
|
|
35
|
-
|
|
2
|
+
"use strict";
|
|
36
3
|
var __create = Object.create;
|
|
37
4
|
var __defProp = Object.defineProperty;
|
|
38
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
39
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
40
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
41
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
42
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
43
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
44
|
-
}) : x)(function(x) {
|
|
45
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
46
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
47
|
-
});
|
|
48
9
|
var __esm = (fn, res) => function __init() {
|
|
49
10
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
50
11
|
};
|
|
51
|
-
var __commonJS = (cb, mod) => function
|
|
12
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
52
13
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
53
14
|
};
|
|
54
15
|
var __export = (target, all) => {
|
|
@@ -68,25 +29,28 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
68
29
|
// file that has been converted to a CommonJS file using a Babel-
|
|
69
30
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
70
31
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
71
|
-
!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
32
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
72
33
|
mod
|
|
73
34
|
));
|
|
74
35
|
|
|
75
36
|
// ../../packages/serviceme-protocol/src/agent.ts
|
|
76
37
|
var init_agent = __esm({
|
|
77
38
|
"../../packages/serviceme-protocol/src/agent.ts"() {
|
|
39
|
+
"use strict";
|
|
78
40
|
}
|
|
79
41
|
});
|
|
80
42
|
|
|
81
43
|
// ../../packages/serviceme-protocol/src/scheduled-tasks.ts
|
|
82
44
|
var init_scheduled_tasks = __esm({
|
|
83
45
|
"../../packages/serviceme-protocol/src/scheduled-tasks.ts"() {
|
|
46
|
+
"use strict";
|
|
84
47
|
}
|
|
85
48
|
});
|
|
86
49
|
|
|
87
50
|
// ../../packages/serviceme-protocol/src/skill.ts
|
|
88
51
|
var init_skill = __esm({
|
|
89
52
|
"../../packages/serviceme-protocol/src/skill.ts"() {
|
|
53
|
+
"use strict";
|
|
90
54
|
}
|
|
91
55
|
});
|
|
92
56
|
|
|
@@ -109,6 +73,7 @@ function isBridgeRequest(value) {
|
|
|
109
73
|
var SERVICEME_PROTOCOL_VERSION, BRIDGE_METHODS;
|
|
110
74
|
var init_bridge = __esm({
|
|
111
75
|
"../../packages/serviceme-protocol/src/bridge.ts"() {
|
|
76
|
+
"use strict";
|
|
112
77
|
init_agent();
|
|
113
78
|
init_scheduled_tasks();
|
|
114
79
|
init_skill();
|
|
@@ -149,6 +114,7 @@ function createCliFailure(error) {
|
|
|
149
114
|
var SERVICEME_CLI_SCHEMA_VERSION;
|
|
150
115
|
var init_cli = __esm({
|
|
151
116
|
"../../packages/serviceme-protocol/src/cli.ts"() {
|
|
117
|
+
"use strict";
|
|
152
118
|
SERVICEME_CLI_SCHEMA_VERSION = 1;
|
|
153
119
|
}
|
|
154
120
|
});
|
|
@@ -157,6 +123,7 @@ var init_cli = __esm({
|
|
|
157
123
|
var COPILOT_ERROR_CODES;
|
|
158
124
|
var init_copilot = __esm({
|
|
159
125
|
"../../packages/serviceme-protocol/src/copilot.ts"() {
|
|
126
|
+
"use strict";
|
|
160
127
|
COPILOT_ERROR_CODES = {
|
|
161
128
|
NOT_INSTALLED: "copilot_not_installed",
|
|
162
129
|
AUTH_REQUIRED: "copilot_auth_required",
|
|
@@ -173,6 +140,7 @@ function isKnownEnvironmentTool(value) {
|
|
|
173
140
|
var KNOWN_ENVIRONMENT_TOOLS;
|
|
174
141
|
var init_env = __esm({
|
|
175
142
|
"../../packages/serviceme-protocol/src/env.ts"() {
|
|
143
|
+
"use strict";
|
|
176
144
|
KNOWN_ENVIRONMENT_TOOLS = [
|
|
177
145
|
"git",
|
|
178
146
|
"node",
|
|
@@ -244,6 +212,7 @@ function normalizeServicemeError(error, fallbackCode = "internal_error") {
|
|
|
244
212
|
var SERVICEME_ERROR_CODES, RETRYABLE_ERROR_CODES, ServicemeProtocolError;
|
|
245
213
|
var init_errors = __esm({
|
|
246
214
|
"../../packages/serviceme-protocol/src/errors.ts"() {
|
|
215
|
+
"use strict";
|
|
247
216
|
SERVICEME_ERROR_CODES = [
|
|
248
217
|
"protocol_mismatch",
|
|
249
218
|
"cli_not_found",
|
|
@@ -272,6 +241,7 @@ var init_errors = __esm({
|
|
|
272
241
|
"executor_timeout",
|
|
273
242
|
"executor_error",
|
|
274
243
|
"task_already_running",
|
|
244
|
+
"not_found",
|
|
275
245
|
"internal_error"
|
|
276
246
|
];
|
|
277
247
|
RETRYABLE_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
@@ -308,6 +278,7 @@ var init_errors = __esm({
|
|
|
308
278
|
// ../../packages/serviceme-protocol/src/image.ts
|
|
309
279
|
var init_image = __esm({
|
|
310
280
|
"../../packages/serviceme-protocol/src/image.ts"() {
|
|
281
|
+
"use strict";
|
|
311
282
|
}
|
|
312
283
|
});
|
|
313
284
|
|
|
@@ -315,6 +286,7 @@ var init_image = __esm({
|
|
|
315
286
|
var DEFAULT_JSON_SORT_OPTIONS;
|
|
316
287
|
var init_json = __esm({
|
|
317
288
|
"../../packages/serviceme-protocol/src/json.ts"() {
|
|
289
|
+
"use strict";
|
|
318
290
|
DEFAULT_JSON_SORT_OPTIONS = {
|
|
319
291
|
sortOrder: "asc",
|
|
320
292
|
sortAlgo: "default"
|
|
@@ -322,10 +294,18 @@ var init_json = __esm({
|
|
|
322
294
|
}
|
|
323
295
|
});
|
|
324
296
|
|
|
297
|
+
// ../../packages/serviceme-protocol/src/marketplace.ts
|
|
298
|
+
var init_marketplace = __esm({
|
|
299
|
+
"../../packages/serviceme-protocol/src/marketplace.ts"() {
|
|
300
|
+
"use strict";
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
|
|
325
304
|
// ../../packages/serviceme-protocol/src/metadata.ts
|
|
326
305
|
var SERVICEME_CLI_CAPABILITIES;
|
|
327
306
|
var init_metadata = __esm({
|
|
328
307
|
"../../packages/serviceme-protocol/src/metadata.ts"() {
|
|
308
|
+
"use strict";
|
|
329
309
|
SERVICEME_CLI_CAPABILITIES = {
|
|
330
310
|
bridge: true,
|
|
331
311
|
tasks: 1,
|
|
@@ -340,12 +320,14 @@ var init_metadata = __esm({
|
|
|
340
320
|
// ../../packages/serviceme-protocol/src/project.ts
|
|
341
321
|
var init_project = __esm({
|
|
342
322
|
"../../packages/serviceme-protocol/src/project.ts"() {
|
|
323
|
+
"use strict";
|
|
343
324
|
}
|
|
344
325
|
});
|
|
345
326
|
|
|
346
327
|
// ../../packages/serviceme-protocol/src/index.ts
|
|
347
328
|
var init_src = __esm({
|
|
348
329
|
"../../packages/serviceme-protocol/src/index.ts"() {
|
|
330
|
+
"use strict";
|
|
349
331
|
init_agent();
|
|
350
332
|
init_bridge();
|
|
351
333
|
init_cli();
|
|
@@ -354,6 +336,7 @@ var init_src = __esm({
|
|
|
354
336
|
init_errors();
|
|
355
337
|
init_image();
|
|
356
338
|
init_json();
|
|
339
|
+
init_marketplace();
|
|
357
340
|
init_metadata();
|
|
358
341
|
init_project();
|
|
359
342
|
init_scheduled_tasks();
|
|
@@ -365,6 +348,8 @@ var init_src = __esm({
|
|
|
365
348
|
var AgentCatalogClient;
|
|
366
349
|
var init_AgentCatalogClient = __esm({
|
|
367
350
|
"../../packages/serviceme-core/src/agents/AgentCatalogClient.ts"() {
|
|
351
|
+
"use strict";
|
|
352
|
+
init_src();
|
|
368
353
|
AgentCatalogClient = class {
|
|
369
354
|
constructor(options2 = {}) {
|
|
370
355
|
this.fetchImpl = options2.fetchImpl ?? fetch;
|
|
@@ -389,6 +374,30 @@ var init_AgentCatalogClient = __esm({
|
|
|
389
374
|
fetchedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
390
375
|
};
|
|
391
376
|
}
|
|
377
|
+
async downloadAgent(remoteId) {
|
|
378
|
+
if (!this.baseUrl) {
|
|
379
|
+
throw createServicemeError(
|
|
380
|
+
"workspace_not_found",
|
|
381
|
+
"Agent catalog baseUrl is not configured."
|
|
382
|
+
);
|
|
383
|
+
}
|
|
384
|
+
const response = await this.fetchImpl(
|
|
385
|
+
`${this.baseUrl}/api/v1/marketplace/agents/download/${remoteId}`
|
|
386
|
+
);
|
|
387
|
+
if (!response.ok) {
|
|
388
|
+
if (response.status === 404) {
|
|
389
|
+
throw createServicemeError(
|
|
390
|
+
"not_found",
|
|
391
|
+
`Agent '${remoteId}' not found`
|
|
392
|
+
);
|
|
393
|
+
}
|
|
394
|
+
throw new Error(
|
|
395
|
+
`Failed to download agent ${remoteId}: ${response.status}`
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
const payload = await response.json();
|
|
399
|
+
return payload.data?.files ?? [];
|
|
400
|
+
}
|
|
392
401
|
};
|
|
393
402
|
}
|
|
394
403
|
});
|
|
@@ -426,6 +435,7 @@ function parseAgentToolPermissions(content) {
|
|
|
426
435
|
var TOOL_RISK_MAP, FRONTMATTER_REGEX, TOOLS_LINE_REGEX, TOOLS_INLINE_REGEX, LIST_ITEM_REGEX;
|
|
427
436
|
var init_agent_permissions = __esm({
|
|
428
437
|
"../../packages/serviceme-core/src/permissions/agent-permissions.ts"() {
|
|
438
|
+
"use strict";
|
|
429
439
|
TOOL_RISK_MAP = {
|
|
430
440
|
shell: "high",
|
|
431
441
|
terminal: "high",
|
|
@@ -454,6 +464,7 @@ var init_agent_permissions = __esm({
|
|
|
454
464
|
// ../../packages/serviceme-core/src/permissions/index.ts
|
|
455
465
|
var init_permissions = __esm({
|
|
456
466
|
"../../packages/serviceme-core/src/permissions/index.ts"() {
|
|
467
|
+
"use strict";
|
|
457
468
|
init_agent_permissions();
|
|
458
469
|
}
|
|
459
470
|
});
|
|
@@ -462,6 +473,7 @@ var init_permissions = __esm({
|
|
|
462
473
|
var AgentReconciler;
|
|
463
474
|
var init_AgentReconciler = __esm({
|
|
464
475
|
"../../packages/serviceme-core/src/agents/AgentReconciler.ts"() {
|
|
476
|
+
"use strict";
|
|
465
477
|
init_permissions();
|
|
466
478
|
AgentReconciler = class {
|
|
467
479
|
constructor(deps) {
|
|
@@ -527,15 +539,20 @@ var init_AgentReconciler = __esm({
|
|
|
527
539
|
};
|
|
528
540
|
}
|
|
529
541
|
});
|
|
542
|
+
|
|
543
|
+
// ../../packages/serviceme-core/src/agents/AgentStore.ts
|
|
530
544
|
function assertSafeLocalAgentId(agentId) {
|
|
531
545
|
if (typeof agentId !== "string" || agentId.length === 0 || agentId === "." || agentId === ".." || agentId.includes("/") || agentId.includes("\\") || !SAFE_LOCAL_ID_PATTERN.test(agentId)) {
|
|
532
546
|
throw new Error(`Invalid agent id: ${agentId}`);
|
|
533
547
|
}
|
|
534
548
|
return agentId;
|
|
535
549
|
}
|
|
536
|
-
var WORKSPACE_AGENTS_ROOT_RELATIVE, WORKSPACE_AGENTS_STATE_RELATIVE, SAFE_LOCAL_ID_PATTERN, AgentStore;
|
|
550
|
+
var fs, path, WORKSPACE_AGENTS_ROOT_RELATIVE, WORKSPACE_AGENTS_STATE_RELATIVE, SAFE_LOCAL_ID_PATTERN, AgentStore;
|
|
537
551
|
var init_AgentStore = __esm({
|
|
538
552
|
"../../packages/serviceme-core/src/agents/AgentStore.ts"() {
|
|
553
|
+
"use strict";
|
|
554
|
+
fs = __toESM(require("fs/promises"));
|
|
555
|
+
path = __toESM(require("path"));
|
|
539
556
|
WORKSPACE_AGENTS_ROOT_RELATIVE = ".github/agents";
|
|
540
557
|
WORKSPACE_AGENTS_STATE_RELATIVE = ".github/.ms-devtools-agents.yml";
|
|
541
558
|
SAFE_LOCAL_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/;
|
|
@@ -543,7 +560,7 @@ var init_AgentStore = __esm({
|
|
|
543
560
|
constructor(options2) {
|
|
544
561
|
this.workspacePath = options2.workspacePath;
|
|
545
562
|
this.userAgentsRoot = options2.userAgentsRoot;
|
|
546
|
-
this.fileSystem = options2.fileSystem ??
|
|
563
|
+
this.fileSystem = options2.fileSystem ?? fs;
|
|
547
564
|
this.schemaVersion = options2.schemaVersion ?? 1;
|
|
548
565
|
}
|
|
549
566
|
normalizeRemoteAgentId(remoteId) {
|
|
@@ -567,7 +584,7 @@ var init_AgentStore = __esm({
|
|
|
567
584
|
}
|
|
568
585
|
async listWorkspaceAgentIds() {
|
|
569
586
|
return this.listAgentIds(
|
|
570
|
-
|
|
587
|
+
path.join(this.workspacePath, WORKSPACE_AGENTS_ROOT_RELATIVE)
|
|
571
588
|
);
|
|
572
589
|
}
|
|
573
590
|
async listUserAgentIds() {
|
|
@@ -576,7 +593,7 @@ var init_AgentStore = __esm({
|
|
|
576
593
|
async readState() {
|
|
577
594
|
try {
|
|
578
595
|
const raw = await this.fileSystem.readFile(
|
|
579
|
-
|
|
596
|
+
path.join(this.workspacePath, WORKSPACE_AGENTS_STATE_RELATIVE),
|
|
580
597
|
"utf-8"
|
|
581
598
|
);
|
|
582
599
|
const parsed = JSON.parse(raw);
|
|
@@ -589,11 +606,11 @@ var init_AgentStore = __esm({
|
|
|
589
606
|
}
|
|
590
607
|
}
|
|
591
608
|
async writeState(state) {
|
|
592
|
-
const statePath =
|
|
609
|
+
const statePath = path.join(
|
|
593
610
|
this.workspacePath,
|
|
594
611
|
WORKSPACE_AGENTS_STATE_RELATIVE
|
|
595
612
|
);
|
|
596
|
-
await this.fileSystem.mkdir(
|
|
613
|
+
await this.fileSystem.mkdir(path.dirname(statePath), { recursive: true });
|
|
597
614
|
await this.fileSystem.writeFile(
|
|
598
615
|
statePath,
|
|
599
616
|
JSON.stringify(state, null, 2),
|
|
@@ -622,14 +639,14 @@ var init_AgentStore = __esm({
|
|
|
622
639
|
await this.writeState(state);
|
|
623
640
|
}
|
|
624
641
|
async writeAgentFiles(agentId, scope, files) {
|
|
625
|
-
const root2 = scope === "workspace" ?
|
|
642
|
+
const root2 = scope === "workspace" ? path.join(this.workspacePath, WORKSPACE_AGENTS_ROOT_RELATIVE) : this.userAgentsRoot;
|
|
626
643
|
const firstFile = files[0];
|
|
627
644
|
const isSingleFlatFile = files.length === 1 && firstFile !== void 0 && firstFile.path === `${agentId}.agent.md` && !firstFile.path.includes("/");
|
|
628
|
-
const targetDir = isSingleFlatFile ? root2 :
|
|
645
|
+
const targetDir = isSingleFlatFile ? root2 : path.join(root2, agentId);
|
|
629
646
|
await this.fileSystem.mkdir(targetDir, { recursive: true });
|
|
630
647
|
for (const file of files) {
|
|
631
|
-
const filePath =
|
|
632
|
-
await this.fileSystem.mkdir(
|
|
648
|
+
const filePath = path.join(targetDir, file.path);
|
|
649
|
+
await this.fileSystem.mkdir(path.dirname(filePath), { recursive: true });
|
|
633
650
|
await this.fileSystem.writeFile(filePath, file.content, "utf-8");
|
|
634
651
|
if (file.executable) {
|
|
635
652
|
try {
|
|
@@ -669,24 +686,28 @@ var init_AgentStore = __esm({
|
|
|
669
686
|
// ../../packages/serviceme-core/src/agents/types.ts
|
|
670
687
|
var init_types = __esm({
|
|
671
688
|
"../../packages/serviceme-core/src/agents/types.ts"() {
|
|
689
|
+
"use strict";
|
|
672
690
|
}
|
|
673
691
|
});
|
|
674
692
|
|
|
675
693
|
// ../../packages/serviceme-core/src/agents/index.ts
|
|
676
694
|
var init_agents = __esm({
|
|
677
695
|
"../../packages/serviceme-core/src/agents/index.ts"() {
|
|
696
|
+
"use strict";
|
|
678
697
|
init_AgentCatalogClient();
|
|
679
698
|
init_AgentReconciler();
|
|
680
699
|
init_AgentStore();
|
|
681
700
|
init_types();
|
|
682
701
|
}
|
|
683
702
|
});
|
|
703
|
+
|
|
704
|
+
// ../../packages/serviceme-core/src/process/runCommand.ts
|
|
684
705
|
function terminateCommandProcess(child) {
|
|
685
706
|
if (child.killed) {
|
|
686
707
|
return;
|
|
687
708
|
}
|
|
688
709
|
if (process.platform === "win32" && child.pid) {
|
|
689
|
-
const killProcess =
|
|
710
|
+
const killProcess = (0, import_node_child_process.spawn)(
|
|
690
711
|
"taskkill",
|
|
691
712
|
["/pid", String(child.pid), "/T", "/F"],
|
|
692
713
|
{
|
|
@@ -703,7 +724,7 @@ function terminateCommandProcess(child) {
|
|
|
703
724
|
}
|
|
704
725
|
async function runCommand(command, options2 = {}) {
|
|
705
726
|
return new Promise((resolve, reject) => {
|
|
706
|
-
const child =
|
|
727
|
+
const child = (0, import_node_child_process.spawn)(command, options2.args ?? [], {
|
|
707
728
|
cwd: options2.cwd,
|
|
708
729
|
env: options2.env,
|
|
709
730
|
shell: options2.shell,
|
|
@@ -787,8 +808,11 @@ async function commandExists(command) {
|
|
|
787
808
|
return false;
|
|
788
809
|
}
|
|
789
810
|
}
|
|
811
|
+
var import_node_child_process;
|
|
790
812
|
var init_runCommand = __esm({
|
|
791
813
|
"../../packages/serviceme-core/src/process/runCommand.ts"() {
|
|
814
|
+
"use strict";
|
|
815
|
+
import_node_child_process = require("child_process");
|
|
792
816
|
}
|
|
793
817
|
});
|
|
794
818
|
|
|
@@ -837,6 +861,7 @@ function createCopilotAuthRequiredError() {
|
|
|
837
861
|
var COPILOT_COMMAND, GH_COMMAND;
|
|
838
862
|
var init_doctor = __esm({
|
|
839
863
|
"../../packages/serviceme-core/src/copilot/doctor.ts"() {
|
|
864
|
+
"use strict";
|
|
840
865
|
init_src();
|
|
841
866
|
init_runCommand();
|
|
842
867
|
COPILOT_COMMAND = "copilot";
|
|
@@ -914,6 +939,7 @@ async function copilotPrompt(options2) {
|
|
|
914
939
|
var COPILOT_COMMAND2, DEFAULT_TIMEOUT_MS;
|
|
915
940
|
var init_prompt = __esm({
|
|
916
941
|
"../../packages/serviceme-core/src/copilot/prompt.ts"() {
|
|
942
|
+
"use strict";
|
|
917
943
|
init_src();
|
|
918
944
|
init_runCommand();
|
|
919
945
|
COPILOT_COMMAND2 = "copilot";
|
|
@@ -924,6 +950,7 @@ var init_prompt = __esm({
|
|
|
924
950
|
// ../../packages/serviceme-core/src/copilot/index.ts
|
|
925
951
|
var init_copilot2 = __esm({
|
|
926
952
|
"../../packages/serviceme-core/src/copilot/index.ts"() {
|
|
953
|
+
"use strict";
|
|
927
954
|
init_doctor();
|
|
928
955
|
init_prompt();
|
|
929
956
|
}
|
|
@@ -933,6 +960,7 @@ var init_copilot2 = __esm({
|
|
|
933
960
|
var DEFAULT_TOOL_CHECK_TIMEOUT_MS, TOOL_CHECK_TIMEOUT_MS, ERROR_CODE_NOT_FOUND, ERROR_CODE_TIMEOUT, EnvironmentInspector;
|
|
934
961
|
var init_environmentInspector = __esm({
|
|
935
962
|
"../../packages/serviceme-core/src/env/environmentInspector.ts"() {
|
|
963
|
+
"use strict";
|
|
936
964
|
init_src();
|
|
937
965
|
init_runCommand();
|
|
938
966
|
DEFAULT_TOOL_CHECK_TIMEOUT_MS = 5e3;
|
|
@@ -1144,7 +1172,7 @@ var init_environmentInspector = __esm({
|
|
|
1144
1172
|
const execError = error;
|
|
1145
1173
|
const message = execError.message || String(error);
|
|
1146
1174
|
const code = execError.code;
|
|
1147
|
-
const isNotFound = message.includes("command not found") || message.includes("not recognized") || message.includes("ENOENT") || code === "ENOENT" || code === ERROR_CODE_NOT_FOUND;
|
|
1175
|
+
const isNotFound = message.includes("command not found") || message.includes("not recognized") || message.includes("ENOENT") || message.includes("EACCES") || code === "ENOENT" || code === "EACCES" || code === ERROR_CODE_NOT_FOUND;
|
|
1148
1176
|
const isTimeout = code === ERROR_CODE_TIMEOUT || message.toLowerCase().includes("timed out");
|
|
1149
1177
|
return {
|
|
1150
1178
|
installed: false,
|
|
@@ -1154,12 +1182,17 @@ var init_environmentInspector = __esm({
|
|
|
1154
1182
|
};
|
|
1155
1183
|
}
|
|
1156
1184
|
});
|
|
1185
|
+
|
|
1186
|
+
// ../../packages/serviceme-core/src/image/imageTools.ts
|
|
1157
1187
|
function createImageTools() {
|
|
1158
1188
|
return new ImageTools();
|
|
1159
1189
|
}
|
|
1160
|
-
var SUPPORTED_FORMATS, DEFAULT_MINIMUM_COMPRESSION_RATIO, ImageTools;
|
|
1190
|
+
var fs2, path2, SUPPORTED_FORMATS, DEFAULT_MINIMUM_COMPRESSION_RATIO, ImageTools;
|
|
1161
1191
|
var init_imageTools = __esm({
|
|
1162
1192
|
"../../packages/serviceme-core/src/image/imageTools.ts"() {
|
|
1193
|
+
"use strict";
|
|
1194
|
+
fs2 = __toESM(require("fs/promises"));
|
|
1195
|
+
path2 = __toESM(require("path"));
|
|
1163
1196
|
init_src();
|
|
1164
1197
|
SUPPORTED_FORMATS = [
|
|
1165
1198
|
".jpg",
|
|
@@ -1180,7 +1213,7 @@ var init_imageTools = __esm({
|
|
|
1180
1213
|
if (!await this.pathExists(filePath)) {
|
|
1181
1214
|
return { valid: false };
|
|
1182
1215
|
}
|
|
1183
|
-
if (!SUPPORTED_FORMATS.includes(
|
|
1216
|
+
if (!SUPPORTED_FORMATS.includes(path2.extname(filePath).toLowerCase())) {
|
|
1184
1217
|
return { valid: false };
|
|
1185
1218
|
}
|
|
1186
1219
|
await this.getInfo(filePath, sharpModulePath);
|
|
@@ -1192,7 +1225,7 @@ var init_imageTools = __esm({
|
|
|
1192
1225
|
async getInfo(imagePath, sharpModulePath) {
|
|
1193
1226
|
const sharp = this.loadSharp(sharpModulePath);
|
|
1194
1227
|
const metadata = await sharp(imagePath).metadata();
|
|
1195
|
-
const stats = await
|
|
1228
|
+
const stats = await fs2.stat(imagePath);
|
|
1196
1229
|
return {
|
|
1197
1230
|
width: metadata.width ?? 0,
|
|
1198
1231
|
height: metadata.height ?? 0,
|
|
@@ -1209,7 +1242,7 @@ var init_imageTools = __esm({
|
|
|
1209
1242
|
`Invalid image file: ${imagePath}`
|
|
1210
1243
|
);
|
|
1211
1244
|
}
|
|
1212
|
-
const originalStats = await
|
|
1245
|
+
const originalStats = await fs2.stat(imagePath);
|
|
1213
1246
|
const originalSize = originalStats.size;
|
|
1214
1247
|
const outputPath = this.getOutputPath(imagePath, options2);
|
|
1215
1248
|
const compressedBuffer = await this.compressWithSharp(imagePath, options2);
|
|
@@ -1224,7 +1257,7 @@ var init_imageTools = __esm({
|
|
|
1224
1257
|
outputPath: imagePath
|
|
1225
1258
|
};
|
|
1226
1259
|
}
|
|
1227
|
-
await
|
|
1260
|
+
await fs2.writeFile(outputPath, compressedBuffer);
|
|
1228
1261
|
return {
|
|
1229
1262
|
originalSize,
|
|
1230
1263
|
compressedSize,
|
|
@@ -1235,7 +1268,7 @@ var init_imageTools = __esm({
|
|
|
1235
1268
|
async compressWithSharp(imagePath, options2) {
|
|
1236
1269
|
const sharp = this.loadSharp(options2.sharpModulePath);
|
|
1237
1270
|
let pipeline = sharp(imagePath);
|
|
1238
|
-
switch (options2.format ??
|
|
1271
|
+
switch (options2.format ?? path2.extname(imagePath).toLowerCase().slice(1)) {
|
|
1239
1272
|
case "jpg":
|
|
1240
1273
|
case "jpeg":
|
|
1241
1274
|
pipeline = pipeline.jpeg({ quality: options2.quality });
|
|
@@ -1261,14 +1294,14 @@ var init_imageTools = __esm({
|
|
|
1261
1294
|
if (options2.replaceOriginImage) {
|
|
1262
1295
|
return inputPath;
|
|
1263
1296
|
}
|
|
1264
|
-
const dir =
|
|
1265
|
-
const ext =
|
|
1266
|
-
const name =
|
|
1267
|
-
return
|
|
1297
|
+
const dir = path2.dirname(inputPath);
|
|
1298
|
+
const ext = path2.extname(inputPath);
|
|
1299
|
+
const name = path2.basename(inputPath, ext);
|
|
1300
|
+
return path2.join(dir, `${name}_compressed${ext}`);
|
|
1268
1301
|
}
|
|
1269
1302
|
async pathExists(targetPath) {
|
|
1270
1303
|
try {
|
|
1271
|
-
await
|
|
1304
|
+
await fs2.access(targetPath);
|
|
1272
1305
|
return true;
|
|
1273
1306
|
} catch {
|
|
1274
1307
|
return false;
|
|
@@ -1276,7 +1309,7 @@ var init_imageTools = __esm({
|
|
|
1276
1309
|
}
|
|
1277
1310
|
loadSharp(sharpModulePath) {
|
|
1278
1311
|
try {
|
|
1279
|
-
return sharpModulePath ?
|
|
1312
|
+
return sharpModulePath ? require(sharpModulePath) : require("sharp");
|
|
1280
1313
|
} catch (error) {
|
|
1281
1314
|
throw createServicemeError(
|
|
1282
1315
|
"internal_error",
|
|
@@ -1290,17 +1323,18 @@ var init_imageTools = __esm({
|
|
|
1290
1323
|
|
|
1291
1324
|
// ../../node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.js
|
|
1292
1325
|
var require_esprima = __commonJS({
|
|
1293
|
-
"../../node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.js"(
|
|
1326
|
+
"../../node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.js"(exports2, module2) {
|
|
1327
|
+
"use strict";
|
|
1294
1328
|
(function webpackUniversalModuleDefinition(root2, factory) {
|
|
1295
|
-
if (typeof
|
|
1296
|
-
|
|
1329
|
+
if (typeof exports2 === "object" && typeof module2 === "object")
|
|
1330
|
+
module2.exports = factory();
|
|
1297
1331
|
else if (typeof define === "function" && define.amd)
|
|
1298
1332
|
define([], factory);
|
|
1299
|
-
else if (typeof
|
|
1300
|
-
|
|
1333
|
+
else if (typeof exports2 === "object")
|
|
1334
|
+
exports2["esprima"] = factory();
|
|
1301
1335
|
else
|
|
1302
1336
|
root2["esprima"] = factory();
|
|
1303
|
-
})(
|
|
1337
|
+
})(exports2, function() {
|
|
1304
1338
|
return (
|
|
1305
1339
|
/******/
|
|
1306
1340
|
(function(modules) {
|
|
@@ -1308,7 +1342,7 @@ var require_esprima = __commonJS({
|
|
|
1308
1342
|
function __webpack_require__(moduleId) {
|
|
1309
1343
|
if (installedModules[moduleId])
|
|
1310
1344
|
return installedModules[moduleId].exports;
|
|
1311
|
-
var
|
|
1345
|
+
var module3 = installedModules[moduleId] = {
|
|
1312
1346
|
/******/
|
|
1313
1347
|
exports: {},
|
|
1314
1348
|
/******/
|
|
@@ -1317,9 +1351,9 @@ var require_esprima = __commonJS({
|
|
|
1317
1351
|
loaded: false
|
|
1318
1352
|
/******/
|
|
1319
1353
|
};
|
|
1320
|
-
modules[moduleId].call(
|
|
1321
|
-
|
|
1322
|
-
return
|
|
1354
|
+
modules[moduleId].call(module3.exports, module3, module3.exports, __webpack_require__);
|
|
1355
|
+
module3.loaded = true;
|
|
1356
|
+
return module3.exports;
|
|
1323
1357
|
}
|
|
1324
1358
|
__webpack_require__.m = modules;
|
|
1325
1359
|
__webpack_require__.c = installedModules;
|
|
@@ -1328,8 +1362,9 @@ var require_esprima = __commonJS({
|
|
|
1328
1362
|
})([
|
|
1329
1363
|
/* 0 */
|
|
1330
1364
|
/***/
|
|
1331
|
-
function(
|
|
1332
|
-
|
|
1365
|
+
function(module3, exports3, __webpack_require__) {
|
|
1366
|
+
"use strict";
|
|
1367
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
1333
1368
|
var comment_handler_1 = __webpack_require__(1);
|
|
1334
1369
|
var jsx_parser_1 = __webpack_require__(3);
|
|
1335
1370
|
var parser_1 = __webpack_require__(8);
|
|
@@ -1379,19 +1414,19 @@ var require_esprima = __commonJS({
|
|
|
1379
1414
|
}
|
|
1380
1415
|
return ast;
|
|
1381
1416
|
}
|
|
1382
|
-
|
|
1417
|
+
exports3.parse = parse3;
|
|
1383
1418
|
function parseModule(code, options2, delegate) {
|
|
1384
1419
|
var parsingOptions = options2 || {};
|
|
1385
1420
|
parsingOptions.sourceType = "module";
|
|
1386
1421
|
return parse3(code, parsingOptions, delegate);
|
|
1387
1422
|
}
|
|
1388
|
-
|
|
1423
|
+
exports3.parseModule = parseModule;
|
|
1389
1424
|
function parseScript(code, options2, delegate) {
|
|
1390
1425
|
var parsingOptions = options2 || {};
|
|
1391
1426
|
parsingOptions.sourceType = "script";
|
|
1392
1427
|
return parse3(code, parsingOptions, delegate);
|
|
1393
1428
|
}
|
|
1394
|
-
|
|
1429
|
+
exports3.parseScript = parseScript;
|
|
1395
1430
|
function tokenize(code, options2, delegate) {
|
|
1396
1431
|
var tokenizer = new tokenizer_1.Tokenizer(code, options2);
|
|
1397
1432
|
var tokens;
|
|
@@ -1415,15 +1450,16 @@ var require_esprima = __commonJS({
|
|
|
1415
1450
|
}
|
|
1416
1451
|
return tokens;
|
|
1417
1452
|
}
|
|
1418
|
-
|
|
1453
|
+
exports3.tokenize = tokenize;
|
|
1419
1454
|
var syntax_1 = __webpack_require__(2);
|
|
1420
|
-
|
|
1421
|
-
|
|
1455
|
+
exports3.Syntax = syntax_1.Syntax;
|
|
1456
|
+
exports3.version = "4.0.1";
|
|
1422
1457
|
},
|
|
1423
1458
|
/* 1 */
|
|
1424
1459
|
/***/
|
|
1425
|
-
function(
|
|
1426
|
-
|
|
1460
|
+
function(module3, exports3, __webpack_require__) {
|
|
1461
|
+
"use strict";
|
|
1462
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
1427
1463
|
var syntax_1 = __webpack_require__(2);
|
|
1428
1464
|
var CommentHandler = (function() {
|
|
1429
1465
|
function CommentHandler2() {
|
|
@@ -1565,13 +1601,14 @@ var require_esprima = __commonJS({
|
|
|
1565
1601
|
};
|
|
1566
1602
|
return CommentHandler2;
|
|
1567
1603
|
})();
|
|
1568
|
-
|
|
1604
|
+
exports3.CommentHandler = CommentHandler;
|
|
1569
1605
|
},
|
|
1570
1606
|
/* 2 */
|
|
1571
1607
|
/***/
|
|
1572
|
-
function(
|
|
1573
|
-
|
|
1574
|
-
|
|
1608
|
+
function(module3, exports3) {
|
|
1609
|
+
"use strict";
|
|
1610
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
1611
|
+
exports3.Syntax = {
|
|
1575
1612
|
AssignmentExpression: "AssignmentExpression",
|
|
1576
1613
|
AssignmentPattern: "AssignmentPattern",
|
|
1577
1614
|
ArrayExpression: "ArrayExpression",
|
|
@@ -1642,7 +1679,8 @@ var require_esprima = __commonJS({
|
|
|
1642
1679
|
},
|
|
1643
1680
|
/* 3 */
|
|
1644
1681
|
/***/
|
|
1645
|
-
function(
|
|
1682
|
+
function(module3, exports3, __webpack_require__) {
|
|
1683
|
+
"use strict";
|
|
1646
1684
|
var __extends = this && this.__extends || (function() {
|
|
1647
1685
|
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
1648
1686
|
d.__proto__ = b;
|
|
@@ -1657,7 +1695,7 @@ var require_esprima = __commonJS({
|
|
|
1657
1695
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1658
1696
|
};
|
|
1659
1697
|
})();
|
|
1660
|
-
Object.defineProperty(
|
|
1698
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
1661
1699
|
var character_1 = __webpack_require__(4);
|
|
1662
1700
|
var JSXNode = __webpack_require__(5);
|
|
1663
1701
|
var jsx_syntax_1 = __webpack_require__(6);
|
|
@@ -1688,6 +1726,9 @@ var require_esprima = __commonJS({
|
|
|
1688
1726
|
var expr = elementName;
|
|
1689
1727
|
qualifiedName = getQualifiedElementName(expr.object) + "." + getQualifiedElementName(expr.property);
|
|
1690
1728
|
break;
|
|
1729
|
+
/* istanbul ignore next */
|
|
1730
|
+
default:
|
|
1731
|
+
break;
|
|
1691
1732
|
}
|
|
1692
1733
|
return qualifiedName;
|
|
1693
1734
|
}
|
|
@@ -2150,19 +2191,20 @@ var require_esprima = __commonJS({
|
|
|
2150
2191
|
};
|
|
2151
2192
|
return JSXParser2;
|
|
2152
2193
|
})(parser_1.Parser);
|
|
2153
|
-
|
|
2194
|
+
exports3.JSXParser = JSXParser;
|
|
2154
2195
|
},
|
|
2155
2196
|
/* 4 */
|
|
2156
2197
|
/***/
|
|
2157
|
-
function(
|
|
2158
|
-
|
|
2198
|
+
function(module3, exports3) {
|
|
2199
|
+
"use strict";
|
|
2200
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
2159
2201
|
var Regex = {
|
|
2160
2202
|
// Unicode v8.0.0 NonAsciiIdentifierStart:
|
|
2161
2203
|
NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,
|
|
2162
2204
|
// Unicode v8.0.0 NonAsciiIdentifierPart:
|
|
2163
2205
|
NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
|
|
2164
2206
|
};
|
|
2165
|
-
|
|
2207
|
+
exports3.Character = {
|
|
2166
2208
|
/* tslint:disable:no-bitwise */
|
|
2167
2209
|
fromCodePoint: function(cp5) {
|
|
2168
2210
|
return cp5 < 65536 ? String.fromCharCode(cp5) : String.fromCharCode(55296 + (cp5 - 65536 >> 10)) + String.fromCharCode(56320 + (cp5 - 65536 & 1023));
|
|
@@ -2177,10 +2219,10 @@ var require_esprima = __commonJS({
|
|
|
2177
2219
|
},
|
|
2178
2220
|
// https://tc39.github.io/ecma262/#sec-names-and-keywords
|
|
2179
2221
|
isIdentifierStart: function(cp5) {
|
|
2180
|
-
return cp5 === 36 || cp5 === 95 || cp5 >= 65 && cp5 <= 90 || cp5 >= 97 && cp5 <= 122 || cp5 === 92 || cp5 >= 128 && Regex.NonAsciiIdentifierStart.test(
|
|
2222
|
+
return cp5 === 36 || cp5 === 95 || cp5 >= 65 && cp5 <= 90 || cp5 >= 97 && cp5 <= 122 || cp5 === 92 || cp5 >= 128 && Regex.NonAsciiIdentifierStart.test(exports3.Character.fromCodePoint(cp5));
|
|
2181
2223
|
},
|
|
2182
2224
|
isIdentifierPart: function(cp5) {
|
|
2183
|
-
return cp5 === 36 || cp5 === 95 || cp5 >= 65 && cp5 <= 90 || cp5 >= 97 && cp5 <= 122 || cp5 >= 48 && cp5 <= 57 || cp5 === 92 || cp5 >= 128 && Regex.NonAsciiIdentifierPart.test(
|
|
2225
|
+
return cp5 === 36 || cp5 === 95 || cp5 >= 65 && cp5 <= 90 || cp5 >= 97 && cp5 <= 122 || cp5 >= 48 && cp5 <= 57 || cp5 === 92 || cp5 >= 128 && Regex.NonAsciiIdentifierPart.test(exports3.Character.fromCodePoint(cp5));
|
|
2184
2226
|
},
|
|
2185
2227
|
// https://tc39.github.io/ecma262/#sec-literals-numeric-literals
|
|
2186
2228
|
isDecimalDigit: function(cp5) {
|
|
@@ -2196,8 +2238,9 @@ var require_esprima = __commonJS({
|
|
|
2196
2238
|
},
|
|
2197
2239
|
/* 5 */
|
|
2198
2240
|
/***/
|
|
2199
|
-
function(
|
|
2200
|
-
|
|
2241
|
+
function(module3, exports3, __webpack_require__) {
|
|
2242
|
+
"use strict";
|
|
2243
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
2201
2244
|
var jsx_syntax_1 = __webpack_require__(6);
|
|
2202
2245
|
var JSXClosingElement = /* @__PURE__ */ (function() {
|
|
2203
2246
|
function JSXClosingElement2(name) {
|
|
@@ -2206,7 +2249,7 @@ var require_esprima = __commonJS({
|
|
|
2206
2249
|
}
|
|
2207
2250
|
return JSXClosingElement2;
|
|
2208
2251
|
})();
|
|
2209
|
-
|
|
2252
|
+
exports3.JSXClosingElement = JSXClosingElement;
|
|
2210
2253
|
var JSXElement = /* @__PURE__ */ (function() {
|
|
2211
2254
|
function JSXElement2(openingElement, children, closingElement) {
|
|
2212
2255
|
this.type = jsx_syntax_1.JSXSyntax.JSXElement;
|
|
@@ -2216,14 +2259,14 @@ var require_esprima = __commonJS({
|
|
|
2216
2259
|
}
|
|
2217
2260
|
return JSXElement2;
|
|
2218
2261
|
})();
|
|
2219
|
-
|
|
2262
|
+
exports3.JSXElement = JSXElement;
|
|
2220
2263
|
var JSXEmptyExpression = /* @__PURE__ */ (function() {
|
|
2221
2264
|
function JSXEmptyExpression2() {
|
|
2222
2265
|
this.type = jsx_syntax_1.JSXSyntax.JSXEmptyExpression;
|
|
2223
2266
|
}
|
|
2224
2267
|
return JSXEmptyExpression2;
|
|
2225
2268
|
})();
|
|
2226
|
-
|
|
2269
|
+
exports3.JSXEmptyExpression = JSXEmptyExpression;
|
|
2227
2270
|
var JSXExpressionContainer = /* @__PURE__ */ (function() {
|
|
2228
2271
|
function JSXExpressionContainer2(expression) {
|
|
2229
2272
|
this.type = jsx_syntax_1.JSXSyntax.JSXExpressionContainer;
|
|
@@ -2231,7 +2274,7 @@ var require_esprima = __commonJS({
|
|
|
2231
2274
|
}
|
|
2232
2275
|
return JSXExpressionContainer2;
|
|
2233
2276
|
})();
|
|
2234
|
-
|
|
2277
|
+
exports3.JSXExpressionContainer = JSXExpressionContainer;
|
|
2235
2278
|
var JSXIdentifier = /* @__PURE__ */ (function() {
|
|
2236
2279
|
function JSXIdentifier2(name) {
|
|
2237
2280
|
this.type = jsx_syntax_1.JSXSyntax.JSXIdentifier;
|
|
@@ -2239,7 +2282,7 @@ var require_esprima = __commonJS({
|
|
|
2239
2282
|
}
|
|
2240
2283
|
return JSXIdentifier2;
|
|
2241
2284
|
})();
|
|
2242
|
-
|
|
2285
|
+
exports3.JSXIdentifier = JSXIdentifier;
|
|
2243
2286
|
var JSXMemberExpression = /* @__PURE__ */ (function() {
|
|
2244
2287
|
function JSXMemberExpression2(object, property) {
|
|
2245
2288
|
this.type = jsx_syntax_1.JSXSyntax.JSXMemberExpression;
|
|
@@ -2248,7 +2291,7 @@ var require_esprima = __commonJS({
|
|
|
2248
2291
|
}
|
|
2249
2292
|
return JSXMemberExpression2;
|
|
2250
2293
|
})();
|
|
2251
|
-
|
|
2294
|
+
exports3.JSXMemberExpression = JSXMemberExpression;
|
|
2252
2295
|
var JSXAttribute = /* @__PURE__ */ (function() {
|
|
2253
2296
|
function JSXAttribute2(name, value) {
|
|
2254
2297
|
this.type = jsx_syntax_1.JSXSyntax.JSXAttribute;
|
|
@@ -2257,7 +2300,7 @@ var require_esprima = __commonJS({
|
|
|
2257
2300
|
}
|
|
2258
2301
|
return JSXAttribute2;
|
|
2259
2302
|
})();
|
|
2260
|
-
|
|
2303
|
+
exports3.JSXAttribute = JSXAttribute;
|
|
2261
2304
|
var JSXNamespacedName = /* @__PURE__ */ (function() {
|
|
2262
2305
|
function JSXNamespacedName2(namespace, name) {
|
|
2263
2306
|
this.type = jsx_syntax_1.JSXSyntax.JSXNamespacedName;
|
|
@@ -2266,7 +2309,7 @@ var require_esprima = __commonJS({
|
|
|
2266
2309
|
}
|
|
2267
2310
|
return JSXNamespacedName2;
|
|
2268
2311
|
})();
|
|
2269
|
-
|
|
2312
|
+
exports3.JSXNamespacedName = JSXNamespacedName;
|
|
2270
2313
|
var JSXOpeningElement = /* @__PURE__ */ (function() {
|
|
2271
2314
|
function JSXOpeningElement2(name, selfClosing, attributes) {
|
|
2272
2315
|
this.type = jsx_syntax_1.JSXSyntax.JSXOpeningElement;
|
|
@@ -2276,7 +2319,7 @@ var require_esprima = __commonJS({
|
|
|
2276
2319
|
}
|
|
2277
2320
|
return JSXOpeningElement2;
|
|
2278
2321
|
})();
|
|
2279
|
-
|
|
2322
|
+
exports3.JSXOpeningElement = JSXOpeningElement;
|
|
2280
2323
|
var JSXSpreadAttribute = /* @__PURE__ */ (function() {
|
|
2281
2324
|
function JSXSpreadAttribute2(argument) {
|
|
2282
2325
|
this.type = jsx_syntax_1.JSXSyntax.JSXSpreadAttribute;
|
|
@@ -2284,7 +2327,7 @@ var require_esprima = __commonJS({
|
|
|
2284
2327
|
}
|
|
2285
2328
|
return JSXSpreadAttribute2;
|
|
2286
2329
|
})();
|
|
2287
|
-
|
|
2330
|
+
exports3.JSXSpreadAttribute = JSXSpreadAttribute;
|
|
2288
2331
|
var JSXText = /* @__PURE__ */ (function() {
|
|
2289
2332
|
function JSXText2(value, raw) {
|
|
2290
2333
|
this.type = jsx_syntax_1.JSXSyntax.JSXText;
|
|
@@ -2293,13 +2336,14 @@ var require_esprima = __commonJS({
|
|
|
2293
2336
|
}
|
|
2294
2337
|
return JSXText2;
|
|
2295
2338
|
})();
|
|
2296
|
-
|
|
2339
|
+
exports3.JSXText = JSXText;
|
|
2297
2340
|
},
|
|
2298
2341
|
/* 6 */
|
|
2299
2342
|
/***/
|
|
2300
|
-
function(
|
|
2301
|
-
|
|
2302
|
-
|
|
2343
|
+
function(module3, exports3) {
|
|
2344
|
+
"use strict";
|
|
2345
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
2346
|
+
exports3.JSXSyntax = {
|
|
2303
2347
|
JSXAttribute: "JSXAttribute",
|
|
2304
2348
|
JSXClosingElement: "JSXClosingElement",
|
|
2305
2349
|
JSXElement: "JSXElement",
|
|
@@ -2315,8 +2359,9 @@ var require_esprima = __commonJS({
|
|
|
2315
2359
|
},
|
|
2316
2360
|
/* 7 */
|
|
2317
2361
|
/***/
|
|
2318
|
-
function(
|
|
2319
|
-
|
|
2362
|
+
function(module3, exports3, __webpack_require__) {
|
|
2363
|
+
"use strict";
|
|
2364
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
2320
2365
|
var syntax_1 = __webpack_require__(2);
|
|
2321
2366
|
var ArrayExpression = /* @__PURE__ */ (function() {
|
|
2322
2367
|
function ArrayExpression2(elements) {
|
|
@@ -2325,7 +2370,7 @@ var require_esprima = __commonJS({
|
|
|
2325
2370
|
}
|
|
2326
2371
|
return ArrayExpression2;
|
|
2327
2372
|
})();
|
|
2328
|
-
|
|
2373
|
+
exports3.ArrayExpression = ArrayExpression;
|
|
2329
2374
|
var ArrayPattern = /* @__PURE__ */ (function() {
|
|
2330
2375
|
function ArrayPattern2(elements) {
|
|
2331
2376
|
this.type = syntax_1.Syntax.ArrayPattern;
|
|
@@ -2333,7 +2378,7 @@ var require_esprima = __commonJS({
|
|
|
2333
2378
|
}
|
|
2334
2379
|
return ArrayPattern2;
|
|
2335
2380
|
})();
|
|
2336
|
-
|
|
2381
|
+
exports3.ArrayPattern = ArrayPattern;
|
|
2337
2382
|
var ArrowFunctionExpression = /* @__PURE__ */ (function() {
|
|
2338
2383
|
function ArrowFunctionExpression2(params, body, expression) {
|
|
2339
2384
|
this.type = syntax_1.Syntax.ArrowFunctionExpression;
|
|
@@ -2346,7 +2391,7 @@ var require_esprima = __commonJS({
|
|
|
2346
2391
|
}
|
|
2347
2392
|
return ArrowFunctionExpression2;
|
|
2348
2393
|
})();
|
|
2349
|
-
|
|
2394
|
+
exports3.ArrowFunctionExpression = ArrowFunctionExpression;
|
|
2350
2395
|
var AssignmentExpression = /* @__PURE__ */ (function() {
|
|
2351
2396
|
function AssignmentExpression2(operator, left, right) {
|
|
2352
2397
|
this.type = syntax_1.Syntax.AssignmentExpression;
|
|
@@ -2356,7 +2401,7 @@ var require_esprima = __commonJS({
|
|
|
2356
2401
|
}
|
|
2357
2402
|
return AssignmentExpression2;
|
|
2358
2403
|
})();
|
|
2359
|
-
|
|
2404
|
+
exports3.AssignmentExpression = AssignmentExpression;
|
|
2360
2405
|
var AssignmentPattern = /* @__PURE__ */ (function() {
|
|
2361
2406
|
function AssignmentPattern2(left, right) {
|
|
2362
2407
|
this.type = syntax_1.Syntax.AssignmentPattern;
|
|
@@ -2365,7 +2410,7 @@ var require_esprima = __commonJS({
|
|
|
2365
2410
|
}
|
|
2366
2411
|
return AssignmentPattern2;
|
|
2367
2412
|
})();
|
|
2368
|
-
|
|
2413
|
+
exports3.AssignmentPattern = AssignmentPattern;
|
|
2369
2414
|
var AsyncArrowFunctionExpression = /* @__PURE__ */ (function() {
|
|
2370
2415
|
function AsyncArrowFunctionExpression2(params, body, expression) {
|
|
2371
2416
|
this.type = syntax_1.Syntax.ArrowFunctionExpression;
|
|
@@ -2378,7 +2423,7 @@ var require_esprima = __commonJS({
|
|
|
2378
2423
|
}
|
|
2379
2424
|
return AsyncArrowFunctionExpression2;
|
|
2380
2425
|
})();
|
|
2381
|
-
|
|
2426
|
+
exports3.AsyncArrowFunctionExpression = AsyncArrowFunctionExpression;
|
|
2382
2427
|
var AsyncFunctionDeclaration = /* @__PURE__ */ (function() {
|
|
2383
2428
|
function AsyncFunctionDeclaration2(id, params, body) {
|
|
2384
2429
|
this.type = syntax_1.Syntax.FunctionDeclaration;
|
|
@@ -2391,7 +2436,7 @@ var require_esprima = __commonJS({
|
|
|
2391
2436
|
}
|
|
2392
2437
|
return AsyncFunctionDeclaration2;
|
|
2393
2438
|
})();
|
|
2394
|
-
|
|
2439
|
+
exports3.AsyncFunctionDeclaration = AsyncFunctionDeclaration;
|
|
2395
2440
|
var AsyncFunctionExpression = /* @__PURE__ */ (function() {
|
|
2396
2441
|
function AsyncFunctionExpression2(id, params, body) {
|
|
2397
2442
|
this.type = syntax_1.Syntax.FunctionExpression;
|
|
@@ -2404,7 +2449,7 @@ var require_esprima = __commonJS({
|
|
|
2404
2449
|
}
|
|
2405
2450
|
return AsyncFunctionExpression2;
|
|
2406
2451
|
})();
|
|
2407
|
-
|
|
2452
|
+
exports3.AsyncFunctionExpression = AsyncFunctionExpression;
|
|
2408
2453
|
var AwaitExpression = /* @__PURE__ */ (function() {
|
|
2409
2454
|
function AwaitExpression2(argument) {
|
|
2410
2455
|
this.type = syntax_1.Syntax.AwaitExpression;
|
|
@@ -2412,7 +2457,7 @@ var require_esprima = __commonJS({
|
|
|
2412
2457
|
}
|
|
2413
2458
|
return AwaitExpression2;
|
|
2414
2459
|
})();
|
|
2415
|
-
|
|
2460
|
+
exports3.AwaitExpression = AwaitExpression;
|
|
2416
2461
|
var BinaryExpression = /* @__PURE__ */ (function() {
|
|
2417
2462
|
function BinaryExpression2(operator, left, right) {
|
|
2418
2463
|
var logical = operator === "||" || operator === "&&";
|
|
@@ -2423,7 +2468,7 @@ var require_esprima = __commonJS({
|
|
|
2423
2468
|
}
|
|
2424
2469
|
return BinaryExpression2;
|
|
2425
2470
|
})();
|
|
2426
|
-
|
|
2471
|
+
exports3.BinaryExpression = BinaryExpression;
|
|
2427
2472
|
var BlockStatement = /* @__PURE__ */ (function() {
|
|
2428
2473
|
function BlockStatement2(body) {
|
|
2429
2474
|
this.type = syntax_1.Syntax.BlockStatement;
|
|
@@ -2431,7 +2476,7 @@ var require_esprima = __commonJS({
|
|
|
2431
2476
|
}
|
|
2432
2477
|
return BlockStatement2;
|
|
2433
2478
|
})();
|
|
2434
|
-
|
|
2479
|
+
exports3.BlockStatement = BlockStatement;
|
|
2435
2480
|
var BreakStatement = /* @__PURE__ */ (function() {
|
|
2436
2481
|
function BreakStatement2(label) {
|
|
2437
2482
|
this.type = syntax_1.Syntax.BreakStatement;
|
|
@@ -2439,7 +2484,7 @@ var require_esprima = __commonJS({
|
|
|
2439
2484
|
}
|
|
2440
2485
|
return BreakStatement2;
|
|
2441
2486
|
})();
|
|
2442
|
-
|
|
2487
|
+
exports3.BreakStatement = BreakStatement;
|
|
2443
2488
|
var CallExpression = /* @__PURE__ */ (function() {
|
|
2444
2489
|
function CallExpression2(callee, args) {
|
|
2445
2490
|
this.type = syntax_1.Syntax.CallExpression;
|
|
@@ -2448,7 +2493,7 @@ var require_esprima = __commonJS({
|
|
|
2448
2493
|
}
|
|
2449
2494
|
return CallExpression2;
|
|
2450
2495
|
})();
|
|
2451
|
-
|
|
2496
|
+
exports3.CallExpression = CallExpression;
|
|
2452
2497
|
var CatchClause = /* @__PURE__ */ (function() {
|
|
2453
2498
|
function CatchClause2(param, body) {
|
|
2454
2499
|
this.type = syntax_1.Syntax.CatchClause;
|
|
@@ -2457,7 +2502,7 @@ var require_esprima = __commonJS({
|
|
|
2457
2502
|
}
|
|
2458
2503
|
return CatchClause2;
|
|
2459
2504
|
})();
|
|
2460
|
-
|
|
2505
|
+
exports3.CatchClause = CatchClause;
|
|
2461
2506
|
var ClassBody = /* @__PURE__ */ (function() {
|
|
2462
2507
|
function ClassBody2(body) {
|
|
2463
2508
|
this.type = syntax_1.Syntax.ClassBody;
|
|
@@ -2465,7 +2510,7 @@ var require_esprima = __commonJS({
|
|
|
2465
2510
|
}
|
|
2466
2511
|
return ClassBody2;
|
|
2467
2512
|
})();
|
|
2468
|
-
|
|
2513
|
+
exports3.ClassBody = ClassBody;
|
|
2469
2514
|
var ClassDeclaration = /* @__PURE__ */ (function() {
|
|
2470
2515
|
function ClassDeclaration2(id, superClass, body) {
|
|
2471
2516
|
this.type = syntax_1.Syntax.ClassDeclaration;
|
|
@@ -2475,7 +2520,7 @@ var require_esprima = __commonJS({
|
|
|
2475
2520
|
}
|
|
2476
2521
|
return ClassDeclaration2;
|
|
2477
2522
|
})();
|
|
2478
|
-
|
|
2523
|
+
exports3.ClassDeclaration = ClassDeclaration;
|
|
2479
2524
|
var ClassExpression = /* @__PURE__ */ (function() {
|
|
2480
2525
|
function ClassExpression2(id, superClass, body) {
|
|
2481
2526
|
this.type = syntax_1.Syntax.ClassExpression;
|
|
@@ -2485,7 +2530,7 @@ var require_esprima = __commonJS({
|
|
|
2485
2530
|
}
|
|
2486
2531
|
return ClassExpression2;
|
|
2487
2532
|
})();
|
|
2488
|
-
|
|
2533
|
+
exports3.ClassExpression = ClassExpression;
|
|
2489
2534
|
var ComputedMemberExpression = /* @__PURE__ */ (function() {
|
|
2490
2535
|
function ComputedMemberExpression2(object, property) {
|
|
2491
2536
|
this.type = syntax_1.Syntax.MemberExpression;
|
|
@@ -2495,7 +2540,7 @@ var require_esprima = __commonJS({
|
|
|
2495
2540
|
}
|
|
2496
2541
|
return ComputedMemberExpression2;
|
|
2497
2542
|
})();
|
|
2498
|
-
|
|
2543
|
+
exports3.ComputedMemberExpression = ComputedMemberExpression;
|
|
2499
2544
|
var ConditionalExpression = /* @__PURE__ */ (function() {
|
|
2500
2545
|
function ConditionalExpression2(test, consequent, alternate) {
|
|
2501
2546
|
this.type = syntax_1.Syntax.ConditionalExpression;
|
|
@@ -2505,7 +2550,7 @@ var require_esprima = __commonJS({
|
|
|
2505
2550
|
}
|
|
2506
2551
|
return ConditionalExpression2;
|
|
2507
2552
|
})();
|
|
2508
|
-
|
|
2553
|
+
exports3.ConditionalExpression = ConditionalExpression;
|
|
2509
2554
|
var ContinueStatement = /* @__PURE__ */ (function() {
|
|
2510
2555
|
function ContinueStatement2(label) {
|
|
2511
2556
|
this.type = syntax_1.Syntax.ContinueStatement;
|
|
@@ -2513,14 +2558,14 @@ var require_esprima = __commonJS({
|
|
|
2513
2558
|
}
|
|
2514
2559
|
return ContinueStatement2;
|
|
2515
2560
|
})();
|
|
2516
|
-
|
|
2561
|
+
exports3.ContinueStatement = ContinueStatement;
|
|
2517
2562
|
var DebuggerStatement = /* @__PURE__ */ (function() {
|
|
2518
2563
|
function DebuggerStatement2() {
|
|
2519
2564
|
this.type = syntax_1.Syntax.DebuggerStatement;
|
|
2520
2565
|
}
|
|
2521
2566
|
return DebuggerStatement2;
|
|
2522
2567
|
})();
|
|
2523
|
-
|
|
2568
|
+
exports3.DebuggerStatement = DebuggerStatement;
|
|
2524
2569
|
var Directive = /* @__PURE__ */ (function() {
|
|
2525
2570
|
function Directive2(expression, directive) {
|
|
2526
2571
|
this.type = syntax_1.Syntax.ExpressionStatement;
|
|
@@ -2529,7 +2574,7 @@ var require_esprima = __commonJS({
|
|
|
2529
2574
|
}
|
|
2530
2575
|
return Directive2;
|
|
2531
2576
|
})();
|
|
2532
|
-
|
|
2577
|
+
exports3.Directive = Directive;
|
|
2533
2578
|
var DoWhileStatement = /* @__PURE__ */ (function() {
|
|
2534
2579
|
function DoWhileStatement2(body, test) {
|
|
2535
2580
|
this.type = syntax_1.Syntax.DoWhileStatement;
|
|
@@ -2538,14 +2583,14 @@ var require_esprima = __commonJS({
|
|
|
2538
2583
|
}
|
|
2539
2584
|
return DoWhileStatement2;
|
|
2540
2585
|
})();
|
|
2541
|
-
|
|
2586
|
+
exports3.DoWhileStatement = DoWhileStatement;
|
|
2542
2587
|
var EmptyStatement = /* @__PURE__ */ (function() {
|
|
2543
2588
|
function EmptyStatement2() {
|
|
2544
2589
|
this.type = syntax_1.Syntax.EmptyStatement;
|
|
2545
2590
|
}
|
|
2546
2591
|
return EmptyStatement2;
|
|
2547
2592
|
})();
|
|
2548
|
-
|
|
2593
|
+
exports3.EmptyStatement = EmptyStatement;
|
|
2549
2594
|
var ExportAllDeclaration = /* @__PURE__ */ (function() {
|
|
2550
2595
|
function ExportAllDeclaration2(source2) {
|
|
2551
2596
|
this.type = syntax_1.Syntax.ExportAllDeclaration;
|
|
@@ -2553,7 +2598,7 @@ var require_esprima = __commonJS({
|
|
|
2553
2598
|
}
|
|
2554
2599
|
return ExportAllDeclaration2;
|
|
2555
2600
|
})();
|
|
2556
|
-
|
|
2601
|
+
exports3.ExportAllDeclaration = ExportAllDeclaration;
|
|
2557
2602
|
var ExportDefaultDeclaration = /* @__PURE__ */ (function() {
|
|
2558
2603
|
function ExportDefaultDeclaration2(declaration) {
|
|
2559
2604
|
this.type = syntax_1.Syntax.ExportDefaultDeclaration;
|
|
@@ -2561,7 +2606,7 @@ var require_esprima = __commonJS({
|
|
|
2561
2606
|
}
|
|
2562
2607
|
return ExportDefaultDeclaration2;
|
|
2563
2608
|
})();
|
|
2564
|
-
|
|
2609
|
+
exports3.ExportDefaultDeclaration = ExportDefaultDeclaration;
|
|
2565
2610
|
var ExportNamedDeclaration = /* @__PURE__ */ (function() {
|
|
2566
2611
|
function ExportNamedDeclaration2(declaration, specifiers, source2) {
|
|
2567
2612
|
this.type = syntax_1.Syntax.ExportNamedDeclaration;
|
|
@@ -2571,7 +2616,7 @@ var require_esprima = __commonJS({
|
|
|
2571
2616
|
}
|
|
2572
2617
|
return ExportNamedDeclaration2;
|
|
2573
2618
|
})();
|
|
2574
|
-
|
|
2619
|
+
exports3.ExportNamedDeclaration = ExportNamedDeclaration;
|
|
2575
2620
|
var ExportSpecifier = /* @__PURE__ */ (function() {
|
|
2576
2621
|
function ExportSpecifier2(local, exported) {
|
|
2577
2622
|
this.type = syntax_1.Syntax.ExportSpecifier;
|
|
@@ -2580,7 +2625,7 @@ var require_esprima = __commonJS({
|
|
|
2580
2625
|
}
|
|
2581
2626
|
return ExportSpecifier2;
|
|
2582
2627
|
})();
|
|
2583
|
-
|
|
2628
|
+
exports3.ExportSpecifier = ExportSpecifier;
|
|
2584
2629
|
var ExpressionStatement = /* @__PURE__ */ (function() {
|
|
2585
2630
|
function ExpressionStatement2(expression) {
|
|
2586
2631
|
this.type = syntax_1.Syntax.ExpressionStatement;
|
|
@@ -2588,7 +2633,7 @@ var require_esprima = __commonJS({
|
|
|
2588
2633
|
}
|
|
2589
2634
|
return ExpressionStatement2;
|
|
2590
2635
|
})();
|
|
2591
|
-
|
|
2636
|
+
exports3.ExpressionStatement = ExpressionStatement;
|
|
2592
2637
|
var ForInStatement = /* @__PURE__ */ (function() {
|
|
2593
2638
|
function ForInStatement2(left, right, body) {
|
|
2594
2639
|
this.type = syntax_1.Syntax.ForInStatement;
|
|
@@ -2599,7 +2644,7 @@ var require_esprima = __commonJS({
|
|
|
2599
2644
|
}
|
|
2600
2645
|
return ForInStatement2;
|
|
2601
2646
|
})();
|
|
2602
|
-
|
|
2647
|
+
exports3.ForInStatement = ForInStatement;
|
|
2603
2648
|
var ForOfStatement = /* @__PURE__ */ (function() {
|
|
2604
2649
|
function ForOfStatement2(left, right, body) {
|
|
2605
2650
|
this.type = syntax_1.Syntax.ForOfStatement;
|
|
@@ -2609,7 +2654,7 @@ var require_esprima = __commonJS({
|
|
|
2609
2654
|
}
|
|
2610
2655
|
return ForOfStatement2;
|
|
2611
2656
|
})();
|
|
2612
|
-
|
|
2657
|
+
exports3.ForOfStatement = ForOfStatement;
|
|
2613
2658
|
var ForStatement = /* @__PURE__ */ (function() {
|
|
2614
2659
|
function ForStatement2(init, test, update, body) {
|
|
2615
2660
|
this.type = syntax_1.Syntax.ForStatement;
|
|
@@ -2620,7 +2665,7 @@ var require_esprima = __commonJS({
|
|
|
2620
2665
|
}
|
|
2621
2666
|
return ForStatement2;
|
|
2622
2667
|
})();
|
|
2623
|
-
|
|
2668
|
+
exports3.ForStatement = ForStatement;
|
|
2624
2669
|
var FunctionDeclaration = /* @__PURE__ */ (function() {
|
|
2625
2670
|
function FunctionDeclaration2(id, params, body, generator) {
|
|
2626
2671
|
this.type = syntax_1.Syntax.FunctionDeclaration;
|
|
@@ -2633,7 +2678,7 @@ var require_esprima = __commonJS({
|
|
|
2633
2678
|
}
|
|
2634
2679
|
return FunctionDeclaration2;
|
|
2635
2680
|
})();
|
|
2636
|
-
|
|
2681
|
+
exports3.FunctionDeclaration = FunctionDeclaration;
|
|
2637
2682
|
var FunctionExpression = /* @__PURE__ */ (function() {
|
|
2638
2683
|
function FunctionExpression2(id, params, body, generator) {
|
|
2639
2684
|
this.type = syntax_1.Syntax.FunctionExpression;
|
|
@@ -2646,7 +2691,7 @@ var require_esprima = __commonJS({
|
|
|
2646
2691
|
}
|
|
2647
2692
|
return FunctionExpression2;
|
|
2648
2693
|
})();
|
|
2649
|
-
|
|
2694
|
+
exports3.FunctionExpression = FunctionExpression;
|
|
2650
2695
|
var Identifier = /* @__PURE__ */ (function() {
|
|
2651
2696
|
function Identifier2(name) {
|
|
2652
2697
|
this.type = syntax_1.Syntax.Identifier;
|
|
@@ -2654,7 +2699,7 @@ var require_esprima = __commonJS({
|
|
|
2654
2699
|
}
|
|
2655
2700
|
return Identifier2;
|
|
2656
2701
|
})();
|
|
2657
|
-
|
|
2702
|
+
exports3.Identifier = Identifier;
|
|
2658
2703
|
var IfStatement = /* @__PURE__ */ (function() {
|
|
2659
2704
|
function IfStatement2(test, consequent, alternate) {
|
|
2660
2705
|
this.type = syntax_1.Syntax.IfStatement;
|
|
@@ -2664,7 +2709,7 @@ var require_esprima = __commonJS({
|
|
|
2664
2709
|
}
|
|
2665
2710
|
return IfStatement2;
|
|
2666
2711
|
})();
|
|
2667
|
-
|
|
2712
|
+
exports3.IfStatement = IfStatement;
|
|
2668
2713
|
var ImportDeclaration = /* @__PURE__ */ (function() {
|
|
2669
2714
|
function ImportDeclaration2(specifiers, source2) {
|
|
2670
2715
|
this.type = syntax_1.Syntax.ImportDeclaration;
|
|
@@ -2673,7 +2718,7 @@ var require_esprima = __commonJS({
|
|
|
2673
2718
|
}
|
|
2674
2719
|
return ImportDeclaration2;
|
|
2675
2720
|
})();
|
|
2676
|
-
|
|
2721
|
+
exports3.ImportDeclaration = ImportDeclaration;
|
|
2677
2722
|
var ImportDefaultSpecifier = /* @__PURE__ */ (function() {
|
|
2678
2723
|
function ImportDefaultSpecifier2(local) {
|
|
2679
2724
|
this.type = syntax_1.Syntax.ImportDefaultSpecifier;
|
|
@@ -2681,7 +2726,7 @@ var require_esprima = __commonJS({
|
|
|
2681
2726
|
}
|
|
2682
2727
|
return ImportDefaultSpecifier2;
|
|
2683
2728
|
})();
|
|
2684
|
-
|
|
2729
|
+
exports3.ImportDefaultSpecifier = ImportDefaultSpecifier;
|
|
2685
2730
|
var ImportNamespaceSpecifier = /* @__PURE__ */ (function() {
|
|
2686
2731
|
function ImportNamespaceSpecifier2(local) {
|
|
2687
2732
|
this.type = syntax_1.Syntax.ImportNamespaceSpecifier;
|
|
@@ -2689,7 +2734,7 @@ var require_esprima = __commonJS({
|
|
|
2689
2734
|
}
|
|
2690
2735
|
return ImportNamespaceSpecifier2;
|
|
2691
2736
|
})();
|
|
2692
|
-
|
|
2737
|
+
exports3.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
|
|
2693
2738
|
var ImportSpecifier = /* @__PURE__ */ (function() {
|
|
2694
2739
|
function ImportSpecifier2(local, imported) {
|
|
2695
2740
|
this.type = syntax_1.Syntax.ImportSpecifier;
|
|
@@ -2698,7 +2743,7 @@ var require_esprima = __commonJS({
|
|
|
2698
2743
|
}
|
|
2699
2744
|
return ImportSpecifier2;
|
|
2700
2745
|
})();
|
|
2701
|
-
|
|
2746
|
+
exports3.ImportSpecifier = ImportSpecifier;
|
|
2702
2747
|
var LabeledStatement = /* @__PURE__ */ (function() {
|
|
2703
2748
|
function LabeledStatement2(label, body) {
|
|
2704
2749
|
this.type = syntax_1.Syntax.LabeledStatement;
|
|
@@ -2707,7 +2752,7 @@ var require_esprima = __commonJS({
|
|
|
2707
2752
|
}
|
|
2708
2753
|
return LabeledStatement2;
|
|
2709
2754
|
})();
|
|
2710
|
-
|
|
2755
|
+
exports3.LabeledStatement = LabeledStatement;
|
|
2711
2756
|
var Literal = /* @__PURE__ */ (function() {
|
|
2712
2757
|
function Literal2(value, raw) {
|
|
2713
2758
|
this.type = syntax_1.Syntax.Literal;
|
|
@@ -2716,7 +2761,7 @@ var require_esprima = __commonJS({
|
|
|
2716
2761
|
}
|
|
2717
2762
|
return Literal2;
|
|
2718
2763
|
})();
|
|
2719
|
-
|
|
2764
|
+
exports3.Literal = Literal;
|
|
2720
2765
|
var MetaProperty = /* @__PURE__ */ (function() {
|
|
2721
2766
|
function MetaProperty2(meta, property) {
|
|
2722
2767
|
this.type = syntax_1.Syntax.MetaProperty;
|
|
@@ -2725,7 +2770,7 @@ var require_esprima = __commonJS({
|
|
|
2725
2770
|
}
|
|
2726
2771
|
return MetaProperty2;
|
|
2727
2772
|
})();
|
|
2728
|
-
|
|
2773
|
+
exports3.MetaProperty = MetaProperty;
|
|
2729
2774
|
var MethodDefinition = /* @__PURE__ */ (function() {
|
|
2730
2775
|
function MethodDefinition2(key2, computed, value, kind, isStatic) {
|
|
2731
2776
|
this.type = syntax_1.Syntax.MethodDefinition;
|
|
@@ -2737,7 +2782,7 @@ var require_esprima = __commonJS({
|
|
|
2737
2782
|
}
|
|
2738
2783
|
return MethodDefinition2;
|
|
2739
2784
|
})();
|
|
2740
|
-
|
|
2785
|
+
exports3.MethodDefinition = MethodDefinition;
|
|
2741
2786
|
var Module = /* @__PURE__ */ (function() {
|
|
2742
2787
|
function Module2(body) {
|
|
2743
2788
|
this.type = syntax_1.Syntax.Program;
|
|
@@ -2746,7 +2791,7 @@ var require_esprima = __commonJS({
|
|
|
2746
2791
|
}
|
|
2747
2792
|
return Module2;
|
|
2748
2793
|
})();
|
|
2749
|
-
|
|
2794
|
+
exports3.Module = Module;
|
|
2750
2795
|
var NewExpression = /* @__PURE__ */ (function() {
|
|
2751
2796
|
function NewExpression2(callee, args) {
|
|
2752
2797
|
this.type = syntax_1.Syntax.NewExpression;
|
|
@@ -2755,7 +2800,7 @@ var require_esprima = __commonJS({
|
|
|
2755
2800
|
}
|
|
2756
2801
|
return NewExpression2;
|
|
2757
2802
|
})();
|
|
2758
|
-
|
|
2803
|
+
exports3.NewExpression = NewExpression;
|
|
2759
2804
|
var ObjectExpression = /* @__PURE__ */ (function() {
|
|
2760
2805
|
function ObjectExpression2(properties) {
|
|
2761
2806
|
this.type = syntax_1.Syntax.ObjectExpression;
|
|
@@ -2763,7 +2808,7 @@ var require_esprima = __commonJS({
|
|
|
2763
2808
|
}
|
|
2764
2809
|
return ObjectExpression2;
|
|
2765
2810
|
})();
|
|
2766
|
-
|
|
2811
|
+
exports3.ObjectExpression = ObjectExpression;
|
|
2767
2812
|
var ObjectPattern = /* @__PURE__ */ (function() {
|
|
2768
2813
|
function ObjectPattern2(properties) {
|
|
2769
2814
|
this.type = syntax_1.Syntax.ObjectPattern;
|
|
@@ -2771,7 +2816,7 @@ var require_esprima = __commonJS({
|
|
|
2771
2816
|
}
|
|
2772
2817
|
return ObjectPattern2;
|
|
2773
2818
|
})();
|
|
2774
|
-
|
|
2819
|
+
exports3.ObjectPattern = ObjectPattern;
|
|
2775
2820
|
var Property = /* @__PURE__ */ (function() {
|
|
2776
2821
|
function Property2(kind, key2, computed, value, method, shorthand) {
|
|
2777
2822
|
this.type = syntax_1.Syntax.Property;
|
|
@@ -2784,7 +2829,7 @@ var require_esprima = __commonJS({
|
|
|
2784
2829
|
}
|
|
2785
2830
|
return Property2;
|
|
2786
2831
|
})();
|
|
2787
|
-
|
|
2832
|
+
exports3.Property = Property;
|
|
2788
2833
|
var RegexLiteral = /* @__PURE__ */ (function() {
|
|
2789
2834
|
function RegexLiteral2(value, raw, pattern, flags) {
|
|
2790
2835
|
this.type = syntax_1.Syntax.Literal;
|
|
@@ -2794,7 +2839,7 @@ var require_esprima = __commonJS({
|
|
|
2794
2839
|
}
|
|
2795
2840
|
return RegexLiteral2;
|
|
2796
2841
|
})();
|
|
2797
|
-
|
|
2842
|
+
exports3.RegexLiteral = RegexLiteral;
|
|
2798
2843
|
var RestElement = /* @__PURE__ */ (function() {
|
|
2799
2844
|
function RestElement2(argument) {
|
|
2800
2845
|
this.type = syntax_1.Syntax.RestElement;
|
|
@@ -2802,7 +2847,7 @@ var require_esprima = __commonJS({
|
|
|
2802
2847
|
}
|
|
2803
2848
|
return RestElement2;
|
|
2804
2849
|
})();
|
|
2805
|
-
|
|
2850
|
+
exports3.RestElement = RestElement;
|
|
2806
2851
|
var ReturnStatement = /* @__PURE__ */ (function() {
|
|
2807
2852
|
function ReturnStatement2(argument) {
|
|
2808
2853
|
this.type = syntax_1.Syntax.ReturnStatement;
|
|
@@ -2810,7 +2855,7 @@ var require_esprima = __commonJS({
|
|
|
2810
2855
|
}
|
|
2811
2856
|
return ReturnStatement2;
|
|
2812
2857
|
})();
|
|
2813
|
-
|
|
2858
|
+
exports3.ReturnStatement = ReturnStatement;
|
|
2814
2859
|
var Script = /* @__PURE__ */ (function() {
|
|
2815
2860
|
function Script2(body) {
|
|
2816
2861
|
this.type = syntax_1.Syntax.Program;
|
|
@@ -2819,7 +2864,7 @@ var require_esprima = __commonJS({
|
|
|
2819
2864
|
}
|
|
2820
2865
|
return Script2;
|
|
2821
2866
|
})();
|
|
2822
|
-
|
|
2867
|
+
exports3.Script = Script;
|
|
2823
2868
|
var SequenceExpression = /* @__PURE__ */ (function() {
|
|
2824
2869
|
function SequenceExpression2(expressions) {
|
|
2825
2870
|
this.type = syntax_1.Syntax.SequenceExpression;
|
|
@@ -2827,7 +2872,7 @@ var require_esprima = __commonJS({
|
|
|
2827
2872
|
}
|
|
2828
2873
|
return SequenceExpression2;
|
|
2829
2874
|
})();
|
|
2830
|
-
|
|
2875
|
+
exports3.SequenceExpression = SequenceExpression;
|
|
2831
2876
|
var SpreadElement = /* @__PURE__ */ (function() {
|
|
2832
2877
|
function SpreadElement2(argument) {
|
|
2833
2878
|
this.type = syntax_1.Syntax.SpreadElement;
|
|
@@ -2835,7 +2880,7 @@ var require_esprima = __commonJS({
|
|
|
2835
2880
|
}
|
|
2836
2881
|
return SpreadElement2;
|
|
2837
2882
|
})();
|
|
2838
|
-
|
|
2883
|
+
exports3.SpreadElement = SpreadElement;
|
|
2839
2884
|
var StaticMemberExpression = /* @__PURE__ */ (function() {
|
|
2840
2885
|
function StaticMemberExpression2(object, property) {
|
|
2841
2886
|
this.type = syntax_1.Syntax.MemberExpression;
|
|
@@ -2845,14 +2890,14 @@ var require_esprima = __commonJS({
|
|
|
2845
2890
|
}
|
|
2846
2891
|
return StaticMemberExpression2;
|
|
2847
2892
|
})();
|
|
2848
|
-
|
|
2893
|
+
exports3.StaticMemberExpression = StaticMemberExpression;
|
|
2849
2894
|
var Super = /* @__PURE__ */ (function() {
|
|
2850
2895
|
function Super2() {
|
|
2851
2896
|
this.type = syntax_1.Syntax.Super;
|
|
2852
2897
|
}
|
|
2853
2898
|
return Super2;
|
|
2854
2899
|
})();
|
|
2855
|
-
|
|
2900
|
+
exports3.Super = Super;
|
|
2856
2901
|
var SwitchCase = /* @__PURE__ */ (function() {
|
|
2857
2902
|
function SwitchCase2(test, consequent) {
|
|
2858
2903
|
this.type = syntax_1.Syntax.SwitchCase;
|
|
@@ -2861,7 +2906,7 @@ var require_esprima = __commonJS({
|
|
|
2861
2906
|
}
|
|
2862
2907
|
return SwitchCase2;
|
|
2863
2908
|
})();
|
|
2864
|
-
|
|
2909
|
+
exports3.SwitchCase = SwitchCase;
|
|
2865
2910
|
var SwitchStatement = /* @__PURE__ */ (function() {
|
|
2866
2911
|
function SwitchStatement2(discriminant, cases) {
|
|
2867
2912
|
this.type = syntax_1.Syntax.SwitchStatement;
|
|
@@ -2870,7 +2915,7 @@ var require_esprima = __commonJS({
|
|
|
2870
2915
|
}
|
|
2871
2916
|
return SwitchStatement2;
|
|
2872
2917
|
})();
|
|
2873
|
-
|
|
2918
|
+
exports3.SwitchStatement = SwitchStatement;
|
|
2874
2919
|
var TaggedTemplateExpression = /* @__PURE__ */ (function() {
|
|
2875
2920
|
function TaggedTemplateExpression2(tag, quasi) {
|
|
2876
2921
|
this.type = syntax_1.Syntax.TaggedTemplateExpression;
|
|
@@ -2879,7 +2924,7 @@ var require_esprima = __commonJS({
|
|
|
2879
2924
|
}
|
|
2880
2925
|
return TaggedTemplateExpression2;
|
|
2881
2926
|
})();
|
|
2882
|
-
|
|
2927
|
+
exports3.TaggedTemplateExpression = TaggedTemplateExpression;
|
|
2883
2928
|
var TemplateElement = /* @__PURE__ */ (function() {
|
|
2884
2929
|
function TemplateElement2(value, tail) {
|
|
2885
2930
|
this.type = syntax_1.Syntax.TemplateElement;
|
|
@@ -2888,7 +2933,7 @@ var require_esprima = __commonJS({
|
|
|
2888
2933
|
}
|
|
2889
2934
|
return TemplateElement2;
|
|
2890
2935
|
})();
|
|
2891
|
-
|
|
2936
|
+
exports3.TemplateElement = TemplateElement;
|
|
2892
2937
|
var TemplateLiteral = /* @__PURE__ */ (function() {
|
|
2893
2938
|
function TemplateLiteral2(quasis, expressions) {
|
|
2894
2939
|
this.type = syntax_1.Syntax.TemplateLiteral;
|
|
@@ -2897,14 +2942,14 @@ var require_esprima = __commonJS({
|
|
|
2897
2942
|
}
|
|
2898
2943
|
return TemplateLiteral2;
|
|
2899
2944
|
})();
|
|
2900
|
-
|
|
2945
|
+
exports3.TemplateLiteral = TemplateLiteral;
|
|
2901
2946
|
var ThisExpression = /* @__PURE__ */ (function() {
|
|
2902
2947
|
function ThisExpression2() {
|
|
2903
2948
|
this.type = syntax_1.Syntax.ThisExpression;
|
|
2904
2949
|
}
|
|
2905
2950
|
return ThisExpression2;
|
|
2906
2951
|
})();
|
|
2907
|
-
|
|
2952
|
+
exports3.ThisExpression = ThisExpression;
|
|
2908
2953
|
var ThrowStatement = /* @__PURE__ */ (function() {
|
|
2909
2954
|
function ThrowStatement2(argument) {
|
|
2910
2955
|
this.type = syntax_1.Syntax.ThrowStatement;
|
|
@@ -2912,7 +2957,7 @@ var require_esprima = __commonJS({
|
|
|
2912
2957
|
}
|
|
2913
2958
|
return ThrowStatement2;
|
|
2914
2959
|
})();
|
|
2915
|
-
|
|
2960
|
+
exports3.ThrowStatement = ThrowStatement;
|
|
2916
2961
|
var TryStatement = /* @__PURE__ */ (function() {
|
|
2917
2962
|
function TryStatement2(block, handler, finalizer) {
|
|
2918
2963
|
this.type = syntax_1.Syntax.TryStatement;
|
|
@@ -2922,7 +2967,7 @@ var require_esprima = __commonJS({
|
|
|
2922
2967
|
}
|
|
2923
2968
|
return TryStatement2;
|
|
2924
2969
|
})();
|
|
2925
|
-
|
|
2970
|
+
exports3.TryStatement = TryStatement;
|
|
2926
2971
|
var UnaryExpression = /* @__PURE__ */ (function() {
|
|
2927
2972
|
function UnaryExpression2(operator, argument) {
|
|
2928
2973
|
this.type = syntax_1.Syntax.UnaryExpression;
|
|
@@ -2932,7 +2977,7 @@ var require_esprima = __commonJS({
|
|
|
2932
2977
|
}
|
|
2933
2978
|
return UnaryExpression2;
|
|
2934
2979
|
})();
|
|
2935
|
-
|
|
2980
|
+
exports3.UnaryExpression = UnaryExpression;
|
|
2936
2981
|
var UpdateExpression = /* @__PURE__ */ (function() {
|
|
2937
2982
|
function UpdateExpression2(operator, argument, prefix) {
|
|
2938
2983
|
this.type = syntax_1.Syntax.UpdateExpression;
|
|
@@ -2942,7 +2987,7 @@ var require_esprima = __commonJS({
|
|
|
2942
2987
|
}
|
|
2943
2988
|
return UpdateExpression2;
|
|
2944
2989
|
})();
|
|
2945
|
-
|
|
2990
|
+
exports3.UpdateExpression = UpdateExpression;
|
|
2946
2991
|
var VariableDeclaration = /* @__PURE__ */ (function() {
|
|
2947
2992
|
function VariableDeclaration2(declarations, kind) {
|
|
2948
2993
|
this.type = syntax_1.Syntax.VariableDeclaration;
|
|
@@ -2951,7 +2996,7 @@ var require_esprima = __commonJS({
|
|
|
2951
2996
|
}
|
|
2952
2997
|
return VariableDeclaration2;
|
|
2953
2998
|
})();
|
|
2954
|
-
|
|
2999
|
+
exports3.VariableDeclaration = VariableDeclaration;
|
|
2955
3000
|
var VariableDeclarator = /* @__PURE__ */ (function() {
|
|
2956
3001
|
function VariableDeclarator2(id, init) {
|
|
2957
3002
|
this.type = syntax_1.Syntax.VariableDeclarator;
|
|
@@ -2960,7 +3005,7 @@ var require_esprima = __commonJS({
|
|
|
2960
3005
|
}
|
|
2961
3006
|
return VariableDeclarator2;
|
|
2962
3007
|
})();
|
|
2963
|
-
|
|
3008
|
+
exports3.VariableDeclarator = VariableDeclarator;
|
|
2964
3009
|
var WhileStatement = /* @__PURE__ */ (function() {
|
|
2965
3010
|
function WhileStatement2(test, body) {
|
|
2966
3011
|
this.type = syntax_1.Syntax.WhileStatement;
|
|
@@ -2969,7 +3014,7 @@ var require_esprima = __commonJS({
|
|
|
2969
3014
|
}
|
|
2970
3015
|
return WhileStatement2;
|
|
2971
3016
|
})();
|
|
2972
|
-
|
|
3017
|
+
exports3.WhileStatement = WhileStatement;
|
|
2973
3018
|
var WithStatement = /* @__PURE__ */ (function() {
|
|
2974
3019
|
function WithStatement2(object, body) {
|
|
2975
3020
|
this.type = syntax_1.Syntax.WithStatement;
|
|
@@ -2978,7 +3023,7 @@ var require_esprima = __commonJS({
|
|
|
2978
3023
|
}
|
|
2979
3024
|
return WithStatement2;
|
|
2980
3025
|
})();
|
|
2981
|
-
|
|
3026
|
+
exports3.WithStatement = WithStatement;
|
|
2982
3027
|
var YieldExpression = /* @__PURE__ */ (function() {
|
|
2983
3028
|
function YieldExpression2(argument, delegate) {
|
|
2984
3029
|
this.type = syntax_1.Syntax.YieldExpression;
|
|
@@ -2987,12 +3032,13 @@ var require_esprima = __commonJS({
|
|
|
2987
3032
|
}
|
|
2988
3033
|
return YieldExpression2;
|
|
2989
3034
|
})();
|
|
2990
|
-
|
|
3035
|
+
exports3.YieldExpression = YieldExpression;
|
|
2991
3036
|
},
|
|
2992
3037
|
/* 8 */
|
|
2993
3038
|
/***/
|
|
2994
|
-
function(
|
|
2995
|
-
|
|
3039
|
+
function(module3, exports3, __webpack_require__) {
|
|
3040
|
+
"use strict";
|
|
3041
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
2996
3042
|
var assert_1 = __webpack_require__(9);
|
|
2997
3043
|
var error_handler_1 = __webpack_require__(10);
|
|
2998
3044
|
var messages_1 = __webpack_require__(11);
|
|
@@ -3093,6 +3139,10 @@ var require_esprima = __commonJS({
|
|
|
3093
3139
|
};
|
|
3094
3140
|
}
|
|
3095
3141
|
Parser2.prototype.throwError = function(messageFormat) {
|
|
3142
|
+
var values = [];
|
|
3143
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
3144
|
+
values[_i - 1] = arguments[_i];
|
|
3145
|
+
}
|
|
3096
3146
|
var args = Array.prototype.slice.call(arguments, 1);
|
|
3097
3147
|
var msg = messageFormat.replace(/%(\d)/g, function(whole, idx) {
|
|
3098
3148
|
assert_1.assert(idx < args.length, "Message reference must be in range");
|
|
@@ -3104,6 +3154,10 @@ var require_esprima = __commonJS({
|
|
|
3104
3154
|
throw this.errorHandler.createError(index, line2, column2, msg);
|
|
3105
3155
|
};
|
|
3106
3156
|
Parser2.prototype.tolerateError = function(messageFormat) {
|
|
3157
|
+
var values = [];
|
|
3158
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
3159
|
+
values[_i - 1] = arguments[_i];
|
|
3160
|
+
}
|
|
3107
3161
|
var args = Array.prototype.slice.call(arguments, 1);
|
|
3108
3162
|
var msg = messageFormat.replace(/%(\d)/g, function(whole, idx) {
|
|
3109
3163
|
assert_1.assert(idx < args.length, "Message reference must be in range");
|
|
@@ -3741,6 +3795,8 @@ var require_esprima = __commonJS({
|
|
|
3741
3795
|
delete expr.operator;
|
|
3742
3796
|
this.reinterpretExpressionAsPattern(expr.left);
|
|
3743
3797
|
break;
|
|
3798
|
+
default:
|
|
3799
|
+
break;
|
|
3744
3800
|
}
|
|
3745
3801
|
};
|
|
3746
3802
|
Parser2.prototype.parseGroupExpression = function() {
|
|
@@ -4202,6 +4258,8 @@ var require_esprima = __commonJS({
|
|
|
4202
4258
|
this.checkPatternParam(options2, param.properties[i].value);
|
|
4203
4259
|
}
|
|
4204
4260
|
break;
|
|
4261
|
+
default:
|
|
4262
|
+
break;
|
|
4205
4263
|
}
|
|
4206
4264
|
options2.simple = options2.simple && param instanceof Node.Identifier;
|
|
4207
4265
|
};
|
|
@@ -5402,6 +5460,8 @@ var require_esprima = __commonJS({
|
|
|
5402
5460
|
return true;
|
|
5403
5461
|
case 7:
|
|
5404
5462
|
return token2.value === "[";
|
|
5463
|
+
default:
|
|
5464
|
+
break;
|
|
5405
5465
|
}
|
|
5406
5466
|
return false;
|
|
5407
5467
|
};
|
|
@@ -5454,6 +5514,8 @@ var require_esprima = __commonJS({
|
|
|
5454
5514
|
case 4:
|
|
5455
5515
|
start = value === "class" || value === "delete" || value === "function" || value === "let" || value === "new" || value === "super" || value === "this" || value === "typeof" || value === "void" || value === "yield";
|
|
5456
5516
|
break;
|
|
5517
|
+
default:
|
|
5518
|
+
break;
|
|
5457
5519
|
}
|
|
5458
5520
|
return start;
|
|
5459
5521
|
};
|
|
@@ -5825,23 +5887,25 @@ var require_esprima = __commonJS({
|
|
|
5825
5887
|
};
|
|
5826
5888
|
return Parser2;
|
|
5827
5889
|
})();
|
|
5828
|
-
|
|
5890
|
+
exports3.Parser = Parser;
|
|
5829
5891
|
},
|
|
5830
5892
|
/* 9 */
|
|
5831
5893
|
/***/
|
|
5832
|
-
function(
|
|
5833
|
-
|
|
5894
|
+
function(module3, exports3) {
|
|
5895
|
+
"use strict";
|
|
5896
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
5834
5897
|
function assert(condition, message) {
|
|
5835
5898
|
if (!condition) {
|
|
5836
5899
|
throw new Error("ASSERT: " + message);
|
|
5837
5900
|
}
|
|
5838
5901
|
}
|
|
5839
|
-
|
|
5902
|
+
exports3.assert = assert;
|
|
5840
5903
|
},
|
|
5841
5904
|
/* 10 */
|
|
5842
5905
|
/***/
|
|
5843
|
-
function(
|
|
5844
|
-
|
|
5906
|
+
function(module3, exports3) {
|
|
5907
|
+
"use strict";
|
|
5908
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
5845
5909
|
var ErrorHandler = (function() {
|
|
5846
5910
|
function ErrorHandler2() {
|
|
5847
5911
|
this.errors = [];
|
|
@@ -5890,13 +5954,14 @@ var require_esprima = __commonJS({
|
|
|
5890
5954
|
};
|
|
5891
5955
|
return ErrorHandler2;
|
|
5892
5956
|
})();
|
|
5893
|
-
|
|
5957
|
+
exports3.ErrorHandler = ErrorHandler;
|
|
5894
5958
|
},
|
|
5895
5959
|
/* 11 */
|
|
5896
5960
|
/***/
|
|
5897
|
-
function(
|
|
5898
|
-
|
|
5899
|
-
|
|
5961
|
+
function(module3, exports3) {
|
|
5962
|
+
"use strict";
|
|
5963
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
5964
|
+
exports3.Messages = {
|
|
5900
5965
|
BadGetterArity: "Getter must not have any formal parameters",
|
|
5901
5966
|
BadSetterArity: "Setter must have exactly one formal parameter",
|
|
5902
5967
|
BadSetterRestParameter: "Setter function argument must not be a rest parameter",
|
|
@@ -5959,8 +6024,9 @@ var require_esprima = __commonJS({
|
|
|
5959
6024
|
},
|
|
5960
6025
|
/* 12 */
|
|
5961
6026
|
/***/
|
|
5962
|
-
function(
|
|
5963
|
-
|
|
6027
|
+
function(module3, exports3, __webpack_require__) {
|
|
6028
|
+
"use strict";
|
|
6029
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
5964
6030
|
var assert_1 = __webpack_require__(9);
|
|
5965
6031
|
var character_1 = __webpack_require__(4);
|
|
5966
6032
|
var messages_1 = __webpack_require__(11);
|
|
@@ -6985,59 +7051,61 @@ var require_esprima = __commonJS({
|
|
|
6985
7051
|
};
|
|
6986
7052
|
return Scanner2;
|
|
6987
7053
|
})();
|
|
6988
|
-
|
|
7054
|
+
exports3.Scanner = Scanner;
|
|
6989
7055
|
},
|
|
6990
7056
|
/* 13 */
|
|
6991
7057
|
/***/
|
|
6992
|
-
function(
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
7058
|
+
function(module3, exports3) {
|
|
7059
|
+
"use strict";
|
|
7060
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
7061
|
+
exports3.TokenName = {};
|
|
7062
|
+
exports3.TokenName[
|
|
6996
7063
|
1
|
|
6997
7064
|
/* BooleanLiteral */
|
|
6998
7065
|
] = "Boolean";
|
|
6999
|
-
|
|
7066
|
+
exports3.TokenName[
|
|
7000
7067
|
2
|
|
7001
7068
|
/* EOF */
|
|
7002
7069
|
] = "<end>";
|
|
7003
|
-
|
|
7070
|
+
exports3.TokenName[
|
|
7004
7071
|
3
|
|
7005
7072
|
/* Identifier */
|
|
7006
7073
|
] = "Identifier";
|
|
7007
|
-
|
|
7074
|
+
exports3.TokenName[
|
|
7008
7075
|
4
|
|
7009
7076
|
/* Keyword */
|
|
7010
7077
|
] = "Keyword";
|
|
7011
|
-
|
|
7078
|
+
exports3.TokenName[
|
|
7012
7079
|
5
|
|
7013
7080
|
/* NullLiteral */
|
|
7014
7081
|
] = "Null";
|
|
7015
|
-
|
|
7082
|
+
exports3.TokenName[
|
|
7016
7083
|
6
|
|
7017
7084
|
/* NumericLiteral */
|
|
7018
7085
|
] = "Numeric";
|
|
7019
|
-
|
|
7086
|
+
exports3.TokenName[
|
|
7020
7087
|
7
|
|
7021
7088
|
/* Punctuator */
|
|
7022
7089
|
] = "Punctuator";
|
|
7023
|
-
|
|
7090
|
+
exports3.TokenName[
|
|
7024
7091
|
8
|
|
7025
7092
|
/* StringLiteral */
|
|
7026
7093
|
] = "String";
|
|
7027
|
-
|
|
7094
|
+
exports3.TokenName[
|
|
7028
7095
|
9
|
|
7029
7096
|
/* RegularExpression */
|
|
7030
7097
|
] = "RegularExpression";
|
|
7031
|
-
|
|
7098
|
+
exports3.TokenName[
|
|
7032
7099
|
10
|
|
7033
7100
|
/* Template */
|
|
7034
7101
|
] = "Template";
|
|
7035
7102
|
},
|
|
7036
7103
|
/* 14 */
|
|
7037
7104
|
/***/
|
|
7038
|
-
function(
|
|
7039
|
-
|
|
7040
|
-
|
|
7105
|
+
function(module3, exports3) {
|
|
7106
|
+
"use strict";
|
|
7107
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
7108
|
+
exports3.XHTMLEntities = {
|
|
7041
7109
|
quot: '"',
|
|
7042
7110
|
amp: "&",
|
|
7043
7111
|
apos: "'",
|
|
@@ -7294,8 +7362,9 @@ var require_esprima = __commonJS({
|
|
|
7294
7362
|
},
|
|
7295
7363
|
/* 15 */
|
|
7296
7364
|
/***/
|
|
7297
|
-
function(
|
|
7298
|
-
|
|
7365
|
+
function(module3, exports3, __webpack_require__) {
|
|
7366
|
+
"use strict";
|
|
7367
|
+
Object.defineProperty(exports3, "__esModule", { value: true });
|
|
7299
7368
|
var error_handler_1 = __webpack_require__(10);
|
|
7300
7369
|
var scanner_1 = __webpack_require__(12);
|
|
7301
7370
|
var token_1 = __webpack_require__(13);
|
|
@@ -7386,6 +7455,8 @@ var require_esprima = __commonJS({
|
|
|
7386
7455
|
regex = check ? !this.beforeFunctionExpression(check) : true;
|
|
7387
7456
|
}
|
|
7388
7457
|
break;
|
|
7458
|
+
default:
|
|
7459
|
+
break;
|
|
7389
7460
|
}
|
|
7390
7461
|
return regex;
|
|
7391
7462
|
};
|
|
@@ -7477,7 +7548,7 @@ var require_esprima = __commonJS({
|
|
|
7477
7548
|
};
|
|
7478
7549
|
return Tokenizer2;
|
|
7479
7550
|
})();
|
|
7480
|
-
|
|
7551
|
+
exports3.Tokenizer = Tokenizer;
|
|
7481
7552
|
}
|
|
7482
7553
|
/******/
|
|
7483
7554
|
])
|
|
@@ -7488,68 +7559,69 @@ var require_esprima = __commonJS({
|
|
|
7488
7559
|
|
|
7489
7560
|
// ../../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js
|
|
7490
7561
|
var require_util = __commonJS({
|
|
7491
|
-
"../../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js"(
|
|
7562
|
+
"../../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js"(exports2) {
|
|
7563
|
+
"use strict";
|
|
7492
7564
|
function isArray(arg) {
|
|
7493
7565
|
if (Array.isArray) {
|
|
7494
7566
|
return Array.isArray(arg);
|
|
7495
7567
|
}
|
|
7496
7568
|
return objectToString(arg) === "[object Array]";
|
|
7497
7569
|
}
|
|
7498
|
-
|
|
7570
|
+
exports2.isArray = isArray;
|
|
7499
7571
|
function isBoolean(arg) {
|
|
7500
7572
|
return typeof arg === "boolean";
|
|
7501
7573
|
}
|
|
7502
|
-
|
|
7574
|
+
exports2.isBoolean = isBoolean;
|
|
7503
7575
|
function isNull(arg) {
|
|
7504
7576
|
return arg === null;
|
|
7505
7577
|
}
|
|
7506
|
-
|
|
7578
|
+
exports2.isNull = isNull;
|
|
7507
7579
|
function isNullOrUndefined(arg) {
|
|
7508
7580
|
return arg == null;
|
|
7509
7581
|
}
|
|
7510
|
-
|
|
7582
|
+
exports2.isNullOrUndefined = isNullOrUndefined;
|
|
7511
7583
|
function isNumber(arg) {
|
|
7512
7584
|
return typeof arg === "number";
|
|
7513
7585
|
}
|
|
7514
|
-
|
|
7586
|
+
exports2.isNumber = isNumber;
|
|
7515
7587
|
function isString(arg) {
|
|
7516
7588
|
return typeof arg === "string";
|
|
7517
7589
|
}
|
|
7518
|
-
|
|
7590
|
+
exports2.isString = isString;
|
|
7519
7591
|
function isSymbol(arg) {
|
|
7520
7592
|
return typeof arg === "symbol";
|
|
7521
7593
|
}
|
|
7522
|
-
|
|
7594
|
+
exports2.isSymbol = isSymbol;
|
|
7523
7595
|
function isUndefined(arg) {
|
|
7524
7596
|
return arg === void 0;
|
|
7525
7597
|
}
|
|
7526
|
-
|
|
7598
|
+
exports2.isUndefined = isUndefined;
|
|
7527
7599
|
function isRegExp(re) {
|
|
7528
7600
|
return objectToString(re) === "[object RegExp]";
|
|
7529
7601
|
}
|
|
7530
|
-
|
|
7602
|
+
exports2.isRegExp = isRegExp;
|
|
7531
7603
|
function isObject(arg) {
|
|
7532
7604
|
return typeof arg === "object" && arg !== null;
|
|
7533
7605
|
}
|
|
7534
|
-
|
|
7606
|
+
exports2.isObject = isObject;
|
|
7535
7607
|
function isDate(d) {
|
|
7536
7608
|
return objectToString(d) === "[object Date]";
|
|
7537
7609
|
}
|
|
7538
|
-
|
|
7610
|
+
exports2.isDate = isDate;
|
|
7539
7611
|
function isError(e) {
|
|
7540
7612
|
return objectToString(e) === "[object Error]" || e instanceof Error;
|
|
7541
7613
|
}
|
|
7542
|
-
|
|
7614
|
+
exports2.isError = isError;
|
|
7543
7615
|
function isFunction(arg) {
|
|
7544
7616
|
return typeof arg === "function";
|
|
7545
7617
|
}
|
|
7546
|
-
|
|
7618
|
+
exports2.isFunction = isFunction;
|
|
7547
7619
|
function isPrimitive(arg) {
|
|
7548
7620
|
return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol
|
|
7549
7621
|
typeof arg === "undefined";
|
|
7550
7622
|
}
|
|
7551
|
-
|
|
7552
|
-
|
|
7623
|
+
exports2.isPrimitive = isPrimitive;
|
|
7624
|
+
exports2.isBuffer = require("buffer").Buffer.isBuffer;
|
|
7553
7625
|
function objectToString(o) {
|
|
7554
7626
|
return Object.prototype.toString.call(o);
|
|
7555
7627
|
}
|
|
@@ -7558,7 +7630,8 @@ var require_util = __commonJS({
|
|
|
7558
7630
|
|
|
7559
7631
|
// ../../node_modules/.pnpm/array-timsort@1.0.3/node_modules/array-timsort/src/index.js
|
|
7560
7632
|
var require_src = __commonJS({
|
|
7561
|
-
"../../node_modules/.pnpm/array-timsort@1.0.3/node_modules/array-timsort/src/index.js"(
|
|
7633
|
+
"../../node_modules/.pnpm/array-timsort@1.0.3/node_modules/array-timsort/src/index.js"(exports2, module2) {
|
|
7634
|
+
"use strict";
|
|
7562
7635
|
var DEFAULT_MIN_MERGE = 32;
|
|
7563
7636
|
var DEFAULT_MIN_GALLOPING = 7;
|
|
7564
7637
|
var DEFAULT_TMP_STORAGE_LENGTH = 256;
|
|
@@ -8265,7 +8338,7 @@ var require_src = __commonJS({
|
|
|
8265
8338
|
ts.forceMergeRuns();
|
|
8266
8339
|
return results;
|
|
8267
8340
|
}
|
|
8268
|
-
|
|
8341
|
+
module2.exports = {
|
|
8269
8342
|
sort
|
|
8270
8343
|
};
|
|
8271
8344
|
}
|
|
@@ -8273,7 +8346,8 @@ var require_src = __commonJS({
|
|
|
8273
8346
|
|
|
8274
8347
|
// ../../node_modules/.pnpm/comment-json@4.5.1/node_modules/comment-json/src/common.js
|
|
8275
8348
|
var require_common = __commonJS({
|
|
8276
|
-
"../../node_modules/.pnpm/comment-json@4.5.1/node_modules/comment-json/src/common.js"(
|
|
8349
|
+
"../../node_modules/.pnpm/comment-json@4.5.1/node_modules/comment-json/src/common.js"(exports2, module2) {
|
|
8350
|
+
"use strict";
|
|
8277
8351
|
var {
|
|
8278
8352
|
isObject,
|
|
8279
8353
|
isArray,
|
|
@@ -8392,7 +8466,7 @@ var require_common = __commonJS({
|
|
|
8392
8466
|
return target;
|
|
8393
8467
|
};
|
|
8394
8468
|
var is_raw_json = isFunction(JSON.isRawJSON) ? JSON.isRawJSON : () => false;
|
|
8395
|
-
|
|
8469
|
+
module2.exports = {
|
|
8396
8470
|
PROP_SYMBOL_PREFIXES,
|
|
8397
8471
|
PREFIX_BEFORE,
|
|
8398
8472
|
PREFIX_AFTER_PROP,
|
|
@@ -8573,7 +8647,8 @@ var require_common = __commonJS({
|
|
|
8573
8647
|
|
|
8574
8648
|
// ../../node_modules/.pnpm/comment-json@4.5.1/node_modules/comment-json/src/array.js
|
|
8575
8649
|
var require_array = __commonJS({
|
|
8576
|
-
"../../node_modules/.pnpm/comment-json@4.5.1/node_modules/comment-json/src/array.js"(
|
|
8650
|
+
"../../node_modules/.pnpm/comment-json@4.5.1/node_modules/comment-json/src/array.js"(exports2, module2) {
|
|
8651
|
+
"use strict";
|
|
8577
8652
|
var { isArray } = require_util();
|
|
8578
8653
|
var { sort } = require_src();
|
|
8579
8654
|
var {
|
|
@@ -8749,7 +8824,7 @@ var require_array = __commonJS({
|
|
|
8749
8824
|
return this;
|
|
8750
8825
|
}
|
|
8751
8826
|
};
|
|
8752
|
-
|
|
8827
|
+
module2.exports = {
|
|
8753
8828
|
CommentArray
|
|
8754
8829
|
};
|
|
8755
8830
|
}
|
|
@@ -8757,7 +8832,8 @@ var require_array = __commonJS({
|
|
|
8757
8832
|
|
|
8758
8833
|
// ../../node_modules/.pnpm/comment-json@4.5.1/node_modules/comment-json/src/parse.js
|
|
8759
8834
|
var require_parse = __commonJS({
|
|
8760
|
-
"../../node_modules/.pnpm/comment-json@4.5.1/node_modules/comment-json/src/parse.js"(
|
|
8835
|
+
"../../node_modules/.pnpm/comment-json@4.5.1/node_modules/comment-json/src/parse.js"(exports2, module2) {
|
|
8836
|
+
"use strict";
|
|
8761
8837
|
var esprima = require_esprima();
|
|
8762
8838
|
var {
|
|
8763
8839
|
CommentArray
|
|
@@ -9066,7 +9142,7 @@ var require_parse = __commonJS({
|
|
|
9066
9142
|
free();
|
|
9067
9143
|
return result;
|
|
9068
9144
|
};
|
|
9069
|
-
|
|
9145
|
+
module2.exports = {
|
|
9070
9146
|
parse: parse3,
|
|
9071
9147
|
tokenize
|
|
9072
9148
|
};
|
|
@@ -9075,7 +9151,8 @@ var require_parse = __commonJS({
|
|
|
9075
9151
|
|
|
9076
9152
|
// ../../node_modules/.pnpm/comment-json@4.5.1/node_modules/comment-json/src/stringify.js
|
|
9077
9153
|
var require_stringify = __commonJS({
|
|
9078
|
-
"../../node_modules/.pnpm/comment-json@4.5.1/node_modules/comment-json/src/stringify.js"(
|
|
9154
|
+
"../../node_modules/.pnpm/comment-json@4.5.1/node_modules/comment-json/src/stringify.js"(exports2, module2) {
|
|
9155
|
+
"use strict";
|
|
9079
9156
|
var {
|
|
9080
9157
|
isArray,
|
|
9081
9158
|
isObject,
|
|
@@ -9243,6 +9320,8 @@ var require_stringify = __commonJS({
|
|
|
9243
9320
|
return value.rawJSON;
|
|
9244
9321
|
}
|
|
9245
9322
|
return isArray(value) ? array_stringify(value, gap) : object_stringify(value, gap);
|
|
9323
|
+
// undefined
|
|
9324
|
+
default:
|
|
9246
9325
|
}
|
|
9247
9326
|
}
|
|
9248
9327
|
var get_indent = (space) => isString(space) ? space : isNumber(space) ? SPACE.repeat(space) : EMPTY;
|
|
@@ -9259,7 +9338,7 @@ var require_stringify = __commonJS({
|
|
|
9259
9338
|
const str = toString.call(subject);
|
|
9260
9339
|
return PRIMITIVE_OBJECT_TYPES.includes(str);
|
|
9261
9340
|
};
|
|
9262
|
-
|
|
9341
|
+
module2.exports = (value, replacer_, space) => {
|
|
9263
9342
|
const indent_ = get_indent(space);
|
|
9264
9343
|
if (!indent_) {
|
|
9265
9344
|
return JSON.stringify(value, replacer_);
|
|
@@ -9278,7 +9357,8 @@ var require_stringify = __commonJS({
|
|
|
9278
9357
|
|
|
9279
9358
|
// ../../node_modules/.pnpm/comment-json@4.5.1/node_modules/comment-json/src/index.js
|
|
9280
9359
|
var require_src2 = __commonJS({
|
|
9281
|
-
"../../node_modules/.pnpm/comment-json@4.5.1/node_modules/comment-json/src/index.js"(
|
|
9360
|
+
"../../node_modules/.pnpm/comment-json@4.5.1/node_modules/comment-json/src/index.js"(exports2, module2) {
|
|
9361
|
+
"use strict";
|
|
9282
9362
|
var { parse: parse3, tokenize } = require_parse();
|
|
9283
9363
|
var stringify3 = require_stringify();
|
|
9284
9364
|
var { CommentArray } = require_array();
|
|
@@ -9294,7 +9374,7 @@ var require_src2 = __commonJS({
|
|
|
9294
9374
|
moveComments,
|
|
9295
9375
|
removeComments
|
|
9296
9376
|
} = require_common();
|
|
9297
|
-
|
|
9377
|
+
module2.exports = {
|
|
9298
9378
|
PREFIX_BEFORE,
|
|
9299
9379
|
PREFIX_AFTER_PROP,
|
|
9300
9380
|
PREFIX_AFTER_COLON,
|
|
@@ -9598,6 +9678,7 @@ function syntaxError(message) {
|
|
|
9598
9678
|
var Space_Separator, ID_Start, ID_Continue, unicode, util, source, parseState, stack, pos, line, column, token, key, root, parse, lexState, buffer, doubleQuote, sign, c, lexStates, parseStates, stringify, JSON5, lib, dist_default;
|
|
9599
9679
|
var init_dist = __esm({
|
|
9600
9680
|
"../../node_modules/.pnpm/json5@2.2.3/node_modules/json5/dist/index.mjs"() {
|
|
9681
|
+
"use strict";
|
|
9601
9682
|
Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
9602
9683
|
ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
|
|
9603
9684
|
ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
|
|
@@ -10238,7 +10319,7 @@ var init_dist = __esm({
|
|
|
10238
10319
|
return "false";
|
|
10239
10320
|
}
|
|
10240
10321
|
if (typeof value2 === "string") {
|
|
10241
|
-
return quoteString(value2);
|
|
10322
|
+
return quoteString(value2, false);
|
|
10242
10323
|
}
|
|
10243
10324
|
if (typeof value2 === "number") {
|
|
10244
10325
|
return String(value2);
|
|
@@ -10337,15 +10418,15 @@ var init_dist = __esm({
|
|
|
10337
10418
|
}
|
|
10338
10419
|
function serializeKey(key2) {
|
|
10339
10420
|
if (key2.length === 0) {
|
|
10340
|
-
return quoteString(key2);
|
|
10421
|
+
return quoteString(key2, true);
|
|
10341
10422
|
}
|
|
10342
10423
|
const firstChar = String.fromCodePoint(key2.codePointAt(0));
|
|
10343
10424
|
if (!util.isIdStartChar(firstChar)) {
|
|
10344
|
-
return quoteString(key2);
|
|
10425
|
+
return quoteString(key2, true);
|
|
10345
10426
|
}
|
|
10346
10427
|
for (let i = firstChar.length; i < key2.length; i++) {
|
|
10347
10428
|
if (!util.isIdContinueChar(String.fromCodePoint(key2.codePointAt(i)))) {
|
|
10348
|
-
return quoteString(key2);
|
|
10429
|
+
return quoteString(key2, true);
|
|
10349
10430
|
}
|
|
10350
10431
|
}
|
|
10351
10432
|
return key2;
|
|
@@ -10474,6 +10555,7 @@ function detectIndent(text) {
|
|
|
10474
10555
|
var import_comment_json;
|
|
10475
10556
|
var init_jsonTools = __esm({
|
|
10476
10557
|
"../../packages/serviceme-core/src/json/jsonTools.ts"() {
|
|
10558
|
+
"use strict";
|
|
10477
10559
|
init_src();
|
|
10478
10560
|
import_comment_json = __toESM(require_src2());
|
|
10479
10561
|
init_dist();
|
|
@@ -10520,6 +10602,7 @@ function createConsoleLogger(prefix = "serviceme") {
|
|
|
10520
10602
|
var noopLogger;
|
|
10521
10603
|
var init_logger = __esm({
|
|
10522
10604
|
"../../packages/serviceme-core/src/logger.ts"() {
|
|
10605
|
+
"use strict";
|
|
10523
10606
|
noopLogger = {
|
|
10524
10607
|
debug() {
|
|
10525
10608
|
},
|
|
@@ -10535,8 +10618,9 @@ var init_logger = __esm({
|
|
|
10535
10618
|
|
|
10536
10619
|
// ../../node_modules/.pnpm/pend@1.2.0/node_modules/pend/index.js
|
|
10537
10620
|
var require_pend = __commonJS({
|
|
10538
|
-
"../../node_modules/.pnpm/pend@1.2.0/node_modules/pend/index.js"(
|
|
10539
|
-
|
|
10621
|
+
"../../node_modules/.pnpm/pend@1.2.0/node_modules/pend/index.js"(exports2, module2) {
|
|
10622
|
+
"use strict";
|
|
10623
|
+
module2.exports = Pend;
|
|
10540
10624
|
function Pend() {
|
|
10541
10625
|
this.pending = 0;
|
|
10542
10626
|
this.max = Infinity;
|
|
@@ -10590,19 +10674,20 @@ var require_pend = __commonJS({
|
|
|
10590
10674
|
|
|
10591
10675
|
// ../../node_modules/.pnpm/yauzl@3.2.0/node_modules/yauzl/fd-slicer.js
|
|
10592
10676
|
var require_fd_slicer = __commonJS({
|
|
10593
|
-
"../../node_modules/.pnpm/yauzl@3.2.0/node_modules/yauzl/fd-slicer.js"(
|
|
10594
|
-
|
|
10595
|
-
var
|
|
10596
|
-
var
|
|
10677
|
+
"../../node_modules/.pnpm/yauzl@3.2.0/node_modules/yauzl/fd-slicer.js"(exports2) {
|
|
10678
|
+
"use strict";
|
|
10679
|
+
var fs19 = require("fs");
|
|
10680
|
+
var util2 = require("util");
|
|
10681
|
+
var stream = require("stream");
|
|
10597
10682
|
var Readable = stream.Readable;
|
|
10598
10683
|
var Writable = stream.Writable;
|
|
10599
10684
|
var PassThrough = stream.PassThrough;
|
|
10600
10685
|
var Pend = require_pend();
|
|
10601
|
-
var EventEmitter =
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
|
|
10686
|
+
var EventEmitter = require("events").EventEmitter;
|
|
10687
|
+
exports2.createFromBuffer = createFromBuffer;
|
|
10688
|
+
exports2.createFromFd = createFromFd;
|
|
10689
|
+
exports2.BufferSlicer = BufferSlicer;
|
|
10690
|
+
exports2.FdSlicer = FdSlicer;
|
|
10606
10691
|
util2.inherits(FdSlicer, EventEmitter);
|
|
10607
10692
|
function FdSlicer(fd, options2) {
|
|
10608
10693
|
options2 = options2 || {};
|
|
@@ -10860,8 +10945,9 @@ var require_fd_slicer = __commonJS({
|
|
|
10860
10945
|
|
|
10861
10946
|
// ../../node_modules/.pnpm/buffer-crc32@0.2.13/node_modules/buffer-crc32/index.js
|
|
10862
10947
|
var require_buffer_crc32 = __commonJS({
|
|
10863
|
-
"../../node_modules/.pnpm/buffer-crc32@0.2.13/node_modules/buffer-crc32/index.js"(
|
|
10864
|
-
|
|
10948
|
+
"../../node_modules/.pnpm/buffer-crc32@0.2.13/node_modules/buffer-crc32/index.js"(exports2, module2) {
|
|
10949
|
+
"use strict";
|
|
10950
|
+
var Buffer2 = require("buffer").Buffer;
|
|
10865
10951
|
var CRC_TABLE = [
|
|
10866
10952
|
0,
|
|
10867
10953
|
1996959894,
|
|
@@ -11161,34 +11247,35 @@ var require_buffer_crc32 = __commonJS({
|
|
|
11161
11247
|
crc32.unsigned = function() {
|
|
11162
11248
|
return _crc32.apply(null, arguments) >>> 0;
|
|
11163
11249
|
};
|
|
11164
|
-
|
|
11250
|
+
module2.exports = crc32;
|
|
11165
11251
|
}
|
|
11166
11252
|
});
|
|
11167
11253
|
|
|
11168
11254
|
// ../../node_modules/.pnpm/yauzl@3.2.0/node_modules/yauzl/index.js
|
|
11169
11255
|
var require_yauzl = __commonJS({
|
|
11170
|
-
"../../node_modules/.pnpm/yauzl@3.2.0/node_modules/yauzl/index.js"(
|
|
11171
|
-
|
|
11172
|
-
var
|
|
11256
|
+
"../../node_modules/.pnpm/yauzl@3.2.0/node_modules/yauzl/index.js"(exports2) {
|
|
11257
|
+
"use strict";
|
|
11258
|
+
var fs19 = require("fs");
|
|
11259
|
+
var zlib = require("zlib");
|
|
11173
11260
|
var fd_slicer = require_fd_slicer();
|
|
11174
11261
|
var crc32 = require_buffer_crc32();
|
|
11175
|
-
var util2 =
|
|
11176
|
-
var EventEmitter =
|
|
11177
|
-
var Transform =
|
|
11178
|
-
var PassThrough =
|
|
11179
|
-
var Writable =
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
|
|
11262
|
+
var util2 = require("util");
|
|
11263
|
+
var EventEmitter = require("events").EventEmitter;
|
|
11264
|
+
var Transform = require("stream").Transform;
|
|
11265
|
+
var PassThrough = require("stream").PassThrough;
|
|
11266
|
+
var Writable = require("stream").Writable;
|
|
11267
|
+
exports2.open = open2;
|
|
11268
|
+
exports2.fromFd = fromFd;
|
|
11269
|
+
exports2.fromBuffer = fromBuffer;
|
|
11270
|
+
exports2.fromRandomAccessReader = fromRandomAccessReader;
|
|
11271
|
+
exports2.dosDateTimeToDate = dosDateTimeToDate;
|
|
11272
|
+
exports2.getFileNameLowLevel = getFileNameLowLevel;
|
|
11273
|
+
exports2.validateFileName = validateFileName;
|
|
11274
|
+
exports2.parseExtraFields = parseExtraFields;
|
|
11275
|
+
exports2.ZipFile = ZipFile;
|
|
11276
|
+
exports2.Entry = Entry;
|
|
11277
|
+
exports2.LocalFileHeader = LocalFileHeader;
|
|
11278
|
+
exports2.RandomAccessReader = RandomAccessReader;
|
|
11192
11279
|
function open2(path15, options2, callback) {
|
|
11193
11280
|
if (typeof options2 === "function") {
|
|
11194
11281
|
callback = options2;
|
|
@@ -11527,6 +11614,7 @@ var require_yauzl = __commonJS({
|
|
|
11527
11614
|
};
|
|
11528
11615
|
ZipFile.prototype.openReadStreamLowLevel = function(fileDataStart, compressedSize, relativeStart, relativeEnd, decompress, uncompressedSize, callback) {
|
|
11529
11616
|
var self = this;
|
|
11617
|
+
var fileDataEnd = fileDataStart + compressedSize;
|
|
11530
11618
|
var readStream = self.reader.createReadStream({
|
|
11531
11619
|
start: fileDataStart + relativeStart,
|
|
11532
11620
|
end: fileDataStart + relativeEnd
|
|
@@ -11904,9 +11992,15 @@ var require_yauzl = __commonJS({
|
|
|
11904
11992
|
}
|
|
11905
11993
|
}
|
|
11906
11994
|
});
|
|
11907
|
-
|
|
11995
|
+
|
|
11996
|
+
// ../../packages/serviceme-core/src/utils/fileUtils.ts
|
|
11997
|
+
var import_node_fs, import_promises, import_node_path, import_yauzl, unzipFile, tryLstat, mergeEntry, moveFiles;
|
|
11908
11998
|
var init_fileUtils = __esm({
|
|
11909
11999
|
"../../packages/serviceme-core/src/utils/fileUtils.ts"() {
|
|
12000
|
+
"use strict";
|
|
12001
|
+
import_node_fs = require("fs");
|
|
12002
|
+
import_promises = require("fs/promises");
|
|
12003
|
+
import_node_path = require("path");
|
|
11910
12004
|
import_yauzl = __toESM(require_yauzl());
|
|
11911
12005
|
unzipFile = (zipPath, dest) => {
|
|
11912
12006
|
return new Promise((resolve, reject) => {
|
|
@@ -11919,12 +12013,12 @@ var init_fileUtils = __esm({
|
|
|
11919
12013
|
zipfile.readEntry();
|
|
11920
12014
|
zipfile.on("entry", (entry) => {
|
|
11921
12015
|
if (/\/$/.test(entry.fileName)) {
|
|
11922
|
-
void
|
|
12016
|
+
void (0, import_promises.mkdir)((0, import_node_path.join)(dest, entry.fileName), { recursive: true }).then(() => {
|
|
11923
12017
|
zipfile.readEntry();
|
|
11924
12018
|
}).catch(reject);
|
|
11925
12019
|
} else {
|
|
11926
|
-
const outputPath =
|
|
11927
|
-
void
|
|
12020
|
+
const outputPath = (0, import_node_path.join)(dest, entry.fileName);
|
|
12021
|
+
void (0, import_promises.mkdir)((0, import_node_path.dirname)(outputPath), { recursive: true }).then(() => {
|
|
11928
12022
|
zipfile.openReadStream(
|
|
11929
12023
|
entry,
|
|
11930
12024
|
(streamError, readStream) => {
|
|
@@ -11933,7 +12027,7 @@ var init_fileUtils = __esm({
|
|
|
11933
12027
|
return reject(
|
|
11934
12028
|
new Error("Failed to open zip entry stream.")
|
|
11935
12029
|
);
|
|
11936
|
-
const writeStream =
|
|
12030
|
+
const writeStream = (0, import_node_fs.createWriteStream)(outputPath);
|
|
11937
12031
|
readStream.on("error", reject);
|
|
11938
12032
|
writeStream.on("error", reject);
|
|
11939
12033
|
writeStream.on("close", () => {
|
|
@@ -11957,58 +12051,58 @@ var init_fileUtils = __esm({
|
|
|
11957
12051
|
};
|
|
11958
12052
|
tryLstat = async (targetPath) => {
|
|
11959
12053
|
try {
|
|
11960
|
-
return await
|
|
12054
|
+
return await (0, import_promises.lstat)(targetPath);
|
|
11961
12055
|
} catch {
|
|
11962
12056
|
return null;
|
|
11963
12057
|
}
|
|
11964
12058
|
};
|
|
11965
12059
|
mergeEntry = async (sourcePath, destPath, overwrite) => {
|
|
11966
|
-
const sourceStat = await
|
|
12060
|
+
const sourceStat = await (0, import_promises.lstat)(sourcePath);
|
|
11967
12061
|
const destStat = await tryLstat(destPath);
|
|
11968
12062
|
if (sourceStat.isDirectory()) {
|
|
11969
12063
|
if (destStat && !destStat.isDirectory()) {
|
|
11970
12064
|
if (!overwrite) {
|
|
11971
|
-
await
|
|
12065
|
+
await (0, import_promises.rm)(sourcePath, { recursive: true, force: true });
|
|
11972
12066
|
return;
|
|
11973
12067
|
}
|
|
11974
|
-
await
|
|
12068
|
+
await (0, import_promises.rm)(destPath, { recursive: true, force: true });
|
|
11975
12069
|
}
|
|
11976
|
-
await
|
|
11977
|
-
const children = await
|
|
12070
|
+
await (0, import_promises.mkdir)(destPath, { recursive: true });
|
|
12071
|
+
const children = await (0, import_promises.readdir)(sourcePath);
|
|
11978
12072
|
for (const child of children) {
|
|
11979
12073
|
await mergeEntry(
|
|
11980
|
-
|
|
11981
|
-
|
|
12074
|
+
(0, import_node_path.join)(sourcePath, child),
|
|
12075
|
+
(0, import_node_path.join)(destPath, child),
|
|
11982
12076
|
overwrite
|
|
11983
12077
|
);
|
|
11984
12078
|
}
|
|
11985
|
-
await
|
|
12079
|
+
await (0, import_promises.rm)(sourcePath, { recursive: true, force: true });
|
|
11986
12080
|
return;
|
|
11987
12081
|
}
|
|
11988
12082
|
if (destStat) {
|
|
11989
12083
|
if (!overwrite) {
|
|
11990
|
-
await
|
|
12084
|
+
await (0, import_promises.rm)(sourcePath, { recursive: true, force: true });
|
|
11991
12085
|
return;
|
|
11992
12086
|
}
|
|
11993
|
-
await
|
|
12087
|
+
await (0, import_promises.rm)(destPath, { recursive: true, force: true });
|
|
11994
12088
|
}
|
|
11995
12089
|
try {
|
|
11996
|
-
await
|
|
12090
|
+
await (0, import_promises.rename)(sourcePath, destPath);
|
|
11997
12091
|
} catch {
|
|
11998
|
-
await
|
|
11999
|
-
await
|
|
12092
|
+
await (0, import_promises.copyFile)(sourcePath, destPath);
|
|
12093
|
+
await (0, import_promises.rm)(sourcePath, { recursive: true, force: true });
|
|
12000
12094
|
}
|
|
12001
12095
|
};
|
|
12002
12096
|
moveFiles = async (sourceDir, destDir, overwrite = false) => {
|
|
12003
|
-
await
|
|
12004
|
-
const files = await
|
|
12097
|
+
await (0, import_promises.mkdir)(destDir, { recursive: true });
|
|
12098
|
+
const files = await (0, import_promises.readdir)(sourceDir);
|
|
12005
12099
|
for (const file of files) {
|
|
12006
|
-
const sourceFile =
|
|
12007
|
-
const destFile =
|
|
12100
|
+
const sourceFile = (0, import_node_path.join)(sourceDir, file);
|
|
12101
|
+
const destFile = (0, import_node_path.join)(destDir, file);
|
|
12008
12102
|
if (!overwrite) {
|
|
12009
12103
|
try {
|
|
12010
|
-
await
|
|
12011
|
-
await
|
|
12104
|
+
await (0, import_promises.access)(destFile, import_node_fs.constants.F_OK);
|
|
12105
|
+
await (0, import_promises.rm)(sourceFile, { recursive: true, force: true });
|
|
12012
12106
|
continue;
|
|
12013
12107
|
} catch {
|
|
12014
12108
|
}
|
|
@@ -12018,22 +12112,27 @@ var init_fileUtils = __esm({
|
|
|
12018
12112
|
};
|
|
12019
12113
|
}
|
|
12020
12114
|
});
|
|
12115
|
+
|
|
12116
|
+
// ../../packages/serviceme-core/src/project/projectTools.ts
|
|
12021
12117
|
function createProjectTools() {
|
|
12022
12118
|
return new ProjectTools();
|
|
12023
12119
|
}
|
|
12024
|
-
var ProjectTools;
|
|
12120
|
+
var fs3, path3, ProjectTools;
|
|
12025
12121
|
var init_projectTools = __esm({
|
|
12026
12122
|
"../../packages/serviceme-core/src/project/projectTools.ts"() {
|
|
12123
|
+
"use strict";
|
|
12124
|
+
fs3 = __toESM(require("fs/promises"));
|
|
12125
|
+
path3 = __toESM(require("path"));
|
|
12027
12126
|
init_src();
|
|
12028
12127
|
init_runCommand();
|
|
12029
12128
|
init_fileUtils();
|
|
12030
12129
|
ProjectTools = class {
|
|
12031
12130
|
async extractTemplate(zipPath, workspacePath, tempExtractDir, input) {
|
|
12032
12131
|
await unzipFile(zipPath, tempExtractDir);
|
|
12033
|
-
let sourceDir =
|
|
12132
|
+
let sourceDir = path3.join(tempExtractDir, input.extractedDirName);
|
|
12034
12133
|
let actualDirName = input.extractedDirName;
|
|
12035
12134
|
if (!await this.pathExists(sourceDir)) {
|
|
12036
|
-
const entries = await
|
|
12135
|
+
const entries = await fs3.readdir(tempExtractDir, { withFileTypes: true });
|
|
12037
12136
|
const directories = entries.filter(
|
|
12038
12137
|
(entry) => entry.isDirectory() && !entry.name.startsWith(".")
|
|
12039
12138
|
);
|
|
@@ -12045,7 +12144,7 @@ var init_projectTools = __esm({
|
|
|
12045
12144
|
);
|
|
12046
12145
|
if (selectedDirectory) {
|
|
12047
12146
|
actualDirName = selectedDirectory;
|
|
12048
|
-
sourceDir =
|
|
12147
|
+
sourceDir = path3.join(tempExtractDir, actualDirName);
|
|
12049
12148
|
} else if (directories.length === 0) {
|
|
12050
12149
|
throw new Error(
|
|
12051
12150
|
`No directory found after extraction. Expected directory: ${input.extractedDirName}`
|
|
@@ -12103,7 +12202,7 @@ var init_projectTools = __esm({
|
|
|
12103
12202
|
} else {
|
|
12104
12203
|
for (const scriptPath of scripts) {
|
|
12105
12204
|
try {
|
|
12106
|
-
await
|
|
12205
|
+
await fs3.chmod(scriptPath, 493);
|
|
12107
12206
|
updatedCount += 1;
|
|
12108
12207
|
} catch {
|
|
12109
12208
|
}
|
|
@@ -12131,11 +12230,14 @@ var init_projectTools = __esm({
|
|
|
12131
12230
|
if (!preset) {
|
|
12132
12231
|
throw createServicemeError("invalid_params", "Expected scaffold preset.");
|
|
12133
12232
|
}
|
|
12134
|
-
|
|
12135
|
-
|
|
12136
|
-
|
|
12137
|
-
];
|
|
12233
|
+
await this.ensurePresetManifest(workspacePath, preset);
|
|
12234
|
+
const pruneCommand = `pnpm run scaffold:prune -- --preset ${preset} --project-root .`;
|
|
12235
|
+
const initMetadataCommand = `pnpm run scaffold:init-metadata -- --preset ${preset} --project-root . --force`;
|
|
12236
|
+
const commands = [pruneCommand, initMetadataCommand];
|
|
12138
12237
|
for (const command of commands) {
|
|
12238
|
+
if (command === initMetadataCommand) {
|
|
12239
|
+
await this.ensurePresetManifest(workspacePath, preset);
|
|
12240
|
+
}
|
|
12139
12241
|
await runCommand(command, {
|
|
12140
12242
|
cwd: workspacePath,
|
|
12141
12243
|
shell: true
|
|
@@ -12147,16 +12249,54 @@ var init_projectTools = __esm({
|
|
|
12147
12249
|
commands
|
|
12148
12250
|
};
|
|
12149
12251
|
}
|
|
12252
|
+
async ensurePresetManifest(workspacePath, preset) {
|
|
12253
|
+
const presetManifestPath = path3.join(
|
|
12254
|
+
workspacePath,
|
|
12255
|
+
".ms-scaffold",
|
|
12256
|
+
"presets",
|
|
12257
|
+
`${preset}.json`
|
|
12258
|
+
);
|
|
12259
|
+
if (await this.pathExists(presetManifestPath)) {
|
|
12260
|
+
return;
|
|
12261
|
+
}
|
|
12262
|
+
const projectModePath = path3.join(
|
|
12263
|
+
workspacePath,
|
|
12264
|
+
".ms-scaffold",
|
|
12265
|
+
"project-mode.json"
|
|
12266
|
+
);
|
|
12267
|
+
if (!await this.pathExists(projectModePath)) {
|
|
12268
|
+
return;
|
|
12269
|
+
}
|
|
12270
|
+
const projectModeRaw = await fs3.readFile(projectModePath, "utf8");
|
|
12271
|
+
const projectMode = JSON.parse(projectModeRaw);
|
|
12272
|
+
const synthesizedPreset = {
|
|
12273
|
+
preset,
|
|
12274
|
+
selectedModules: Array.isArray(projectMode.selectedModules) ? projectMode.selectedModules : [],
|
|
12275
|
+
prunedModules: Array.isArray(projectMode.prunedModules) ? projectMode.prunedModules : [],
|
|
12276
|
+
exclude: [],
|
|
12277
|
+
recommendedFollowUps: [],
|
|
12278
|
+
managedFiles: [],
|
|
12279
|
+
mergeManagedFiles: [],
|
|
12280
|
+
userOwnedPaths: []
|
|
12281
|
+
};
|
|
12282
|
+
await fs3.mkdir(path3.dirname(presetManifestPath), { recursive: true });
|
|
12283
|
+
await fs3.writeFile(
|
|
12284
|
+
presetManifestPath,
|
|
12285
|
+
`${JSON.stringify(synthesizedPreset, null, 2)}
|
|
12286
|
+
`,
|
|
12287
|
+
"utf8"
|
|
12288
|
+
);
|
|
12289
|
+
}
|
|
12150
12290
|
async findScripts(dir, extensions) {
|
|
12151
12291
|
const results = [];
|
|
12152
12292
|
let entries;
|
|
12153
12293
|
try {
|
|
12154
|
-
entries = await
|
|
12294
|
+
entries = await fs3.readdir(dir, { withFileTypes: true });
|
|
12155
12295
|
} catch {
|
|
12156
12296
|
return results;
|
|
12157
12297
|
}
|
|
12158
12298
|
for (const entry of entries) {
|
|
12159
|
-
const fullPath =
|
|
12299
|
+
const fullPath = path3.join(dir, entry.name);
|
|
12160
12300
|
if (entry.isDirectory() && entry.name !== "node_modules" && !entry.name.startsWith(".")) {
|
|
12161
12301
|
results.push(...await this.findScripts(fullPath, extensions));
|
|
12162
12302
|
} else if (entry.isFile() && extensions.some((ext) => entry.name.endsWith(ext))) {
|
|
@@ -12167,7 +12307,7 @@ var init_projectTools = __esm({
|
|
|
12167
12307
|
}
|
|
12168
12308
|
async pathExists(targetPath) {
|
|
12169
12309
|
try {
|
|
12170
|
-
await
|
|
12310
|
+
await fs3.access(targetPath);
|
|
12171
12311
|
return true;
|
|
12172
12312
|
} catch {
|
|
12173
12313
|
return false;
|
|
@@ -12186,7 +12326,7 @@ var init_projectTools = __esm({
|
|
|
12186
12326
|
const matches = [];
|
|
12187
12327
|
for (const directoryName of directoryNames) {
|
|
12188
12328
|
if (await this.directoryMatchesProjectPattern(
|
|
12189
|
-
|
|
12329
|
+
path3.join(tempExtractDir, directoryName),
|
|
12190
12330
|
projectFilePattern
|
|
12191
12331
|
)) {
|
|
12192
12332
|
matches.push(directoryName);
|
|
@@ -12198,7 +12338,7 @@ var init_projectTools = __esm({
|
|
|
12198
12338
|
return null;
|
|
12199
12339
|
}
|
|
12200
12340
|
async directoryMatchesProjectPattern(directoryPath, projectFilePattern) {
|
|
12201
|
-
const entries = await
|
|
12341
|
+
const entries = await fs3.readdir(directoryPath);
|
|
12202
12342
|
if (projectFilePattern.includes("*")) {
|
|
12203
12343
|
const regex = new RegExp(`^${projectFilePattern.replace("*", ".*")}$`);
|
|
12204
12344
|
return entries.some((entry) => regex.test(entry));
|
|
@@ -12208,18 +12348,23 @@ var init_projectTools = __esm({
|
|
|
12208
12348
|
};
|
|
12209
12349
|
}
|
|
12210
12350
|
});
|
|
12211
|
-
|
|
12351
|
+
|
|
12352
|
+
// ../../packages/serviceme-core/src/scheduled-tasks/daemon/DaemonLogger.ts
|
|
12353
|
+
var fs4, path4, CONFIG_DIR, LOG_FILE, MAX_LOG_SIZE, DaemonLogger;
|
|
12212
12354
|
var init_DaemonLogger = __esm({
|
|
12213
12355
|
"../../packages/serviceme-core/src/scheduled-tasks/daemon/DaemonLogger.ts"() {
|
|
12356
|
+
"use strict";
|
|
12357
|
+
fs4 = __toESM(require("fs"));
|
|
12358
|
+
path4 = __toESM(require("path"));
|
|
12214
12359
|
CONFIG_DIR = ".serviceme";
|
|
12215
12360
|
LOG_FILE = "scheduler.log";
|
|
12216
12361
|
MAX_LOG_SIZE = 1024 * 1024;
|
|
12217
12362
|
DaemonLogger = class {
|
|
12218
12363
|
constructor(workspacePath) {
|
|
12219
|
-
this.logPath =
|
|
12220
|
-
const dir =
|
|
12221
|
-
if (!
|
|
12222
|
-
|
|
12364
|
+
this.logPath = path4.join(workspacePath, CONFIG_DIR, LOG_FILE);
|
|
12365
|
+
const dir = path4.dirname(this.logPath);
|
|
12366
|
+
if (!fs4.existsSync(dir)) {
|
|
12367
|
+
fs4.mkdirSync(dir, { recursive: true });
|
|
12223
12368
|
}
|
|
12224
12369
|
}
|
|
12225
12370
|
getLogPath() {
|
|
@@ -12230,16 +12375,16 @@ var init_DaemonLogger = __esm({
|
|
|
12230
12375
|
const line2 = `[${ts}] [${level.toUpperCase()}] ${message}
|
|
12231
12376
|
`;
|
|
12232
12377
|
this.rotateIfNeeded();
|
|
12233
|
-
|
|
12378
|
+
fs4.appendFileSync(this.logPath, line2, "utf-8");
|
|
12234
12379
|
}
|
|
12235
12380
|
rotateIfNeeded() {
|
|
12236
12381
|
try {
|
|
12237
|
-
const stats =
|
|
12382
|
+
const stats = fs4.statSync(this.logPath);
|
|
12238
12383
|
if (stats.size > MAX_LOG_SIZE) {
|
|
12239
|
-
const content =
|
|
12384
|
+
const content = fs4.readFileSync(this.logPath, "utf-8");
|
|
12240
12385
|
const halfIdx = content.indexOf("\n", Math.floor(content.length / 2));
|
|
12241
12386
|
if (halfIdx > 0) {
|
|
12242
|
-
|
|
12387
|
+
fs4.writeFileSync(this.logPath, content.slice(halfIdx + 1), "utf-8");
|
|
12243
12388
|
}
|
|
12244
12389
|
}
|
|
12245
12390
|
} catch {
|
|
@@ -12248,34 +12393,39 @@ var init_DaemonLogger = __esm({
|
|
|
12248
12393
|
};
|
|
12249
12394
|
}
|
|
12250
12395
|
});
|
|
12251
|
-
|
|
12396
|
+
|
|
12397
|
+
// ../../packages/serviceme-core/src/scheduled-tasks/daemon/PidManager.ts
|
|
12398
|
+
var fs5, path5, CONFIG_DIR2, PID_FILE, PidManager;
|
|
12252
12399
|
var init_PidManager = __esm({
|
|
12253
12400
|
"../../packages/serviceme-core/src/scheduled-tasks/daemon/PidManager.ts"() {
|
|
12401
|
+
"use strict";
|
|
12402
|
+
fs5 = __toESM(require("fs"));
|
|
12403
|
+
path5 = __toESM(require("path"));
|
|
12254
12404
|
CONFIG_DIR2 = ".serviceme";
|
|
12255
12405
|
PID_FILE = "scheduler.pid";
|
|
12256
12406
|
PidManager = class {
|
|
12257
12407
|
constructor(workspacePath) {
|
|
12258
|
-
this.pidPath =
|
|
12408
|
+
this.pidPath = path5.join(workspacePath, CONFIG_DIR2, PID_FILE);
|
|
12259
12409
|
}
|
|
12260
12410
|
getPidPath() {
|
|
12261
12411
|
return this.pidPath;
|
|
12262
12412
|
}
|
|
12263
12413
|
writePid(pid) {
|
|
12264
|
-
const dir =
|
|
12265
|
-
if (!
|
|
12266
|
-
|
|
12414
|
+
const dir = path5.dirname(this.pidPath);
|
|
12415
|
+
if (!fs5.existsSync(dir)) {
|
|
12416
|
+
fs5.mkdirSync(dir, { recursive: true });
|
|
12267
12417
|
}
|
|
12268
|
-
|
|
12418
|
+
fs5.writeFileSync(this.pidPath, String(pid), "utf-8");
|
|
12269
12419
|
}
|
|
12270
12420
|
readPid() {
|
|
12271
|
-
if (!
|
|
12272
|
-
const raw =
|
|
12421
|
+
if (!fs5.existsSync(this.pidPath)) return null;
|
|
12422
|
+
const raw = fs5.readFileSync(this.pidPath, "utf-8").trim();
|
|
12273
12423
|
const pid = Number.parseInt(raw, 10);
|
|
12274
12424
|
return Number.isNaN(pid) ? null : pid;
|
|
12275
12425
|
}
|
|
12276
12426
|
removePid() {
|
|
12277
|
-
if (
|
|
12278
|
-
|
|
12427
|
+
if (fs5.existsSync(this.pidPath)) {
|
|
12428
|
+
fs5.unlinkSync(this.pidPath);
|
|
12279
12429
|
}
|
|
12280
12430
|
}
|
|
12281
12431
|
isProcessRunning(pid) {
|
|
@@ -12309,8 +12459,11 @@ function resolveConfiguredTimeoutMs(timeoutSeconds, defaultTimeoutMs) {
|
|
|
12309
12459
|
}
|
|
12310
12460
|
var init_timeout = __esm({
|
|
12311
12461
|
"../../packages/serviceme-core/src/scheduled-tasks/executors/timeout.ts"() {
|
|
12462
|
+
"use strict";
|
|
12312
12463
|
}
|
|
12313
12464
|
});
|
|
12465
|
+
|
|
12466
|
+
// ../../packages/serviceme-core/src/scheduled-tasks/executors/GithubCopilotCliExecutor.ts
|
|
12314
12467
|
function redactArgs(args) {
|
|
12315
12468
|
const redacted = [];
|
|
12316
12469
|
let redactNext = false;
|
|
@@ -12330,7 +12483,7 @@ function redactArgs(args) {
|
|
|
12330
12483
|
function writeDiagnostic(message) {
|
|
12331
12484
|
const logPath = process.env.SERVICEME_SCHEDULER_LOG_PATH;
|
|
12332
12485
|
if (logPath) {
|
|
12333
|
-
|
|
12486
|
+
fs6.appendFileSync(logPath, message);
|
|
12334
12487
|
return;
|
|
12335
12488
|
}
|
|
12336
12489
|
process.stderr.write(message);
|
|
@@ -12359,9 +12512,12 @@ function resolveGithubCopilotCliExecution(payload) {
|
|
|
12359
12512
|
promptLen: payload.prompt.length
|
|
12360
12513
|
};
|
|
12361
12514
|
}
|
|
12362
|
-
var MAX_OUTPUT_BYTES, DEFAULT_TIMEOUT_MS2, GithubCopilotCliExecutor;
|
|
12515
|
+
var import_node_child_process2, fs6, MAX_OUTPUT_BYTES, DEFAULT_TIMEOUT_MS2, GithubCopilotCliExecutor;
|
|
12363
12516
|
var init_GithubCopilotCliExecutor = __esm({
|
|
12364
12517
|
"../../packages/serviceme-core/src/scheduled-tasks/executors/GithubCopilotCliExecutor.ts"() {
|
|
12518
|
+
"use strict";
|
|
12519
|
+
import_node_child_process2 = require("child_process");
|
|
12520
|
+
fs6 = __toESM(require("fs"));
|
|
12365
12521
|
init_doctor();
|
|
12366
12522
|
init_timeout();
|
|
12367
12523
|
MAX_OUTPUT_BYTES = 2 * 1024 * 1024;
|
|
@@ -12414,7 +12570,7 @@ var init_GithubCopilotCliExecutor = __esm({
|
|
|
12414
12570
|
`[GithubCopilotCliExecutor] spawn: command=${execution.command}, args=${JSON.stringify(execution.diagnosticArgs)}, promptLen=${execution.promptLen}, cwd=${execution.cwd ?? "(default)"}, platform=${process.platform}, windowsHide=true, pid=${process.pid}
|
|
12415
12571
|
`
|
|
12416
12572
|
);
|
|
12417
|
-
const child =
|
|
12573
|
+
const child = (0, import_node_child_process2.spawn)(execution.command, execution.args, {
|
|
12418
12574
|
cwd: execution.cwd,
|
|
12419
12575
|
stdio: ["ignore", "pipe", "pipe"],
|
|
12420
12576
|
windowsHide: true
|
|
@@ -12484,6 +12640,7 @@ var init_GithubCopilotCliExecutor = __esm({
|
|
|
12484
12640
|
var DEFAULT_TIMEOUT_MS3, HttpRequestExecutor;
|
|
12485
12641
|
var init_HttpRequestExecutor = __esm({
|
|
12486
12642
|
"../../packages/serviceme-core/src/scheduled-tasks/executors/HttpRequestExecutor.ts"() {
|
|
12643
|
+
"use strict";
|
|
12487
12644
|
init_timeout();
|
|
12488
12645
|
DEFAULT_TIMEOUT_MS3 = 3e4;
|
|
12489
12646
|
HttpRequestExecutor = class {
|
|
@@ -12552,10 +12709,12 @@ ${body}`.trim()
|
|
|
12552
12709
|
};
|
|
12553
12710
|
}
|
|
12554
12711
|
});
|
|
12712
|
+
|
|
12713
|
+
// ../../packages/serviceme-core/src/scheduled-tasks/executors/ShellExecutor.ts
|
|
12555
12714
|
function resolveShellExecution(script, options2 = {}) {
|
|
12556
12715
|
const platform = options2.platform ?? process.platform;
|
|
12557
12716
|
const env = options2.env ?? process.env;
|
|
12558
|
-
const fileExists = options2.fileExists ??
|
|
12717
|
+
const fileExists = options2.fileExists ?? fs7.existsSync;
|
|
12559
12718
|
if (platform === "win32") {
|
|
12560
12719
|
const posixShell = usesPosixShellSyntax(script) ? findWindowsPosixShell(env, fileExists) : null;
|
|
12561
12720
|
if (posixShell) {
|
|
@@ -12600,10 +12759,10 @@ function findWindowsPosixShell(env, fileExists) {
|
|
|
12600
12759
|
if (fileExists(candidate)) return candidate;
|
|
12601
12760
|
}
|
|
12602
12761
|
const pathValue = env.Path ?? env.PATH ?? "";
|
|
12603
|
-
for (const dir of pathValue.split(
|
|
12762
|
+
for (const dir of pathValue.split(path6.win32.delimiter)) {
|
|
12604
12763
|
if (!dir) continue;
|
|
12605
12764
|
for (const executable of POSIX_SHELL_CANDIDATES) {
|
|
12606
|
-
const candidate =
|
|
12765
|
+
const candidate = path6.win32.join(dir, executable);
|
|
12607
12766
|
if (fileExists(candidate) && !isWindowsWslLauncher(candidate)) {
|
|
12608
12767
|
return candidate;
|
|
12609
12768
|
}
|
|
@@ -12612,20 +12771,24 @@ function findWindowsPosixShell(env, fileExists) {
|
|
|
12612
12771
|
return null;
|
|
12613
12772
|
}
|
|
12614
12773
|
function isWindowsWslLauncher(candidate) {
|
|
12615
|
-
const normalized =
|
|
12774
|
+
const normalized = path6.win32.normalize(candidate).toLowerCase();
|
|
12616
12775
|
return normalized.endsWith("\\windows\\system32\\bash.exe") || normalized.endsWith("\\windows\\syswow64\\bash.exe");
|
|
12617
12776
|
}
|
|
12618
12777
|
function writeDiagnostic2(message) {
|
|
12619
12778
|
const logPath = process.env.SERVICEME_SCHEDULER_LOG_PATH;
|
|
12620
12779
|
if (logPath) {
|
|
12621
|
-
|
|
12780
|
+
fs7.appendFileSync(logPath, message);
|
|
12622
12781
|
return;
|
|
12623
12782
|
}
|
|
12624
12783
|
process.stderr.write(message);
|
|
12625
12784
|
}
|
|
12626
|
-
var MAX_OUTPUT_BYTES2, DEFAULT_TIMEOUT_MS4, POSIX_SHELL_CANDIDATES, ShellExecutor;
|
|
12785
|
+
var import_node_child_process3, fs7, path6, MAX_OUTPUT_BYTES2, DEFAULT_TIMEOUT_MS4, POSIX_SHELL_CANDIDATES, ShellExecutor;
|
|
12627
12786
|
var init_ShellExecutor = __esm({
|
|
12628
12787
|
"../../packages/serviceme-core/src/scheduled-tasks/executors/ShellExecutor.ts"() {
|
|
12788
|
+
"use strict";
|
|
12789
|
+
import_node_child_process3 = require("child_process");
|
|
12790
|
+
fs7 = __toESM(require("fs"));
|
|
12791
|
+
path6 = __toESM(require("path"));
|
|
12629
12792
|
init_timeout();
|
|
12630
12793
|
MAX_OUTPUT_BYTES2 = 1024 * 1024;
|
|
12631
12794
|
DEFAULT_TIMEOUT_MS4 = 6e4;
|
|
@@ -12687,7 +12850,7 @@ var init_ShellExecutor = __esm({
|
|
|
12687
12850
|
daemonPid=${process.pid}
|
|
12688
12851
|
`
|
|
12689
12852
|
);
|
|
12690
|
-
const child =
|
|
12853
|
+
const child = (0, import_node_child_process3.spawn)(shellExecution.command, shellExecution.args, spawnOpts);
|
|
12691
12854
|
if (shellExecution.stdinScript && child.stdin) {
|
|
12692
12855
|
child.stdin.end(shellExecution.stdinScript);
|
|
12693
12856
|
}
|
|
@@ -12759,6 +12922,7 @@ function isStreamingTaskExecutor(executor) {
|
|
|
12759
12922
|
}
|
|
12760
12923
|
var init_types2 = __esm({
|
|
12761
12924
|
"../../packages/serviceme-core/src/scheduled-tasks/executors/types.ts"() {
|
|
12925
|
+
"use strict";
|
|
12762
12926
|
}
|
|
12763
12927
|
});
|
|
12764
12928
|
|
|
@@ -12773,6 +12937,7 @@ function getExecutor(taskType) {
|
|
|
12773
12937
|
var executors;
|
|
12774
12938
|
var init_executors = __esm({
|
|
12775
12939
|
"../../packages/serviceme-core/src/scheduled-tasks/executors/index.ts"() {
|
|
12940
|
+
"use strict";
|
|
12776
12941
|
init_GithubCopilotCliExecutor();
|
|
12777
12942
|
init_HttpRequestExecutor();
|
|
12778
12943
|
init_ShellExecutor();
|
|
@@ -12784,6 +12949,8 @@ var init_executors = __esm({
|
|
|
12784
12949
|
};
|
|
12785
12950
|
}
|
|
12786
12951
|
});
|
|
12952
|
+
|
|
12953
|
+
// ../../packages/serviceme-core/src/scheduled-tasks/TaskConfigManager.ts
|
|
12787
12954
|
function emptyConfig() {
|
|
12788
12955
|
return { version: 1, tasks: [] };
|
|
12789
12956
|
}
|
|
@@ -12815,35 +12982,39 @@ function validateTaskPayload(taskType, payload) {
|
|
|
12815
12982
|
return;
|
|
12816
12983
|
}
|
|
12817
12984
|
}
|
|
12818
|
-
var CONFIG_DIR3, CONFIG_FILE, TaskConfigManager;
|
|
12985
|
+
var import_node_crypto, fs8, path7, CONFIG_DIR3, CONFIG_FILE, TaskConfigManager;
|
|
12819
12986
|
var init_TaskConfigManager = __esm({
|
|
12820
12987
|
"../../packages/serviceme-core/src/scheduled-tasks/TaskConfigManager.ts"() {
|
|
12988
|
+
"use strict";
|
|
12989
|
+
import_node_crypto = require("crypto");
|
|
12990
|
+
fs8 = __toESM(require("fs"));
|
|
12991
|
+
path7 = __toESM(require("path"));
|
|
12821
12992
|
init_src();
|
|
12822
12993
|
CONFIG_DIR3 = ".serviceme";
|
|
12823
12994
|
CONFIG_FILE = "scheduled-tasks.json";
|
|
12824
12995
|
TaskConfigManager = class {
|
|
12825
12996
|
constructor(workspacePath) {
|
|
12826
|
-
this.configPath =
|
|
12997
|
+
this.configPath = path7.join(workspacePath, CONFIG_DIR3, CONFIG_FILE);
|
|
12827
12998
|
}
|
|
12828
12999
|
getConfigPath() {
|
|
12829
13000
|
return this.configPath;
|
|
12830
13001
|
}
|
|
12831
13002
|
readConfig() {
|
|
12832
|
-
if (!
|
|
13003
|
+
if (!fs8.existsSync(this.configPath)) {
|
|
12833
13004
|
return emptyConfig();
|
|
12834
13005
|
}
|
|
12835
|
-
const raw =
|
|
13006
|
+
const raw = fs8.readFileSync(this.configPath, "utf-8");
|
|
12836
13007
|
const parsed = JSON.parse(raw);
|
|
12837
13008
|
return parsed;
|
|
12838
13009
|
}
|
|
12839
13010
|
writeConfig(config) {
|
|
12840
|
-
const dir =
|
|
12841
|
-
if (!
|
|
12842
|
-
|
|
13011
|
+
const dir = path7.dirname(this.configPath);
|
|
13012
|
+
if (!fs8.existsSync(dir)) {
|
|
13013
|
+
fs8.mkdirSync(dir, { recursive: true });
|
|
12843
13014
|
}
|
|
12844
13015
|
const tmp = `${this.configPath}.tmp`;
|
|
12845
|
-
|
|
12846
|
-
|
|
13016
|
+
fs8.writeFileSync(tmp, JSON.stringify(config, null, " "), "utf-8");
|
|
13017
|
+
fs8.renameSync(tmp, this.configPath);
|
|
12847
13018
|
}
|
|
12848
13019
|
listTasks() {
|
|
12849
13020
|
return this.readConfig().tasks;
|
|
@@ -12859,7 +13030,7 @@ var init_TaskConfigManager = __esm({
|
|
|
12859
13030
|
const config = this.readConfig();
|
|
12860
13031
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
12861
13032
|
const task = {
|
|
12862
|
-
id:
|
|
13033
|
+
id: (0, import_node_crypto.randomUUID)(),
|
|
12863
13034
|
name: input.name,
|
|
12864
13035
|
description: input.description,
|
|
12865
13036
|
enabled: input.enabled ?? true,
|
|
@@ -12954,6 +13125,7 @@ function resolveTaskExecutionPayload(taskType, payload, workspacePath) {
|
|
|
12954
13125
|
var TaskExecutionEngine;
|
|
12955
13126
|
var init_TaskExecutionEngine = __esm({
|
|
12956
13127
|
"../../packages/serviceme-core/src/scheduled-tasks/TaskExecutionEngine.ts"() {
|
|
13128
|
+
"use strict";
|
|
12957
13129
|
init_types2();
|
|
12958
13130
|
init_TaskConfigManager();
|
|
12959
13131
|
TaskExecutionEngine = class {
|
|
@@ -13120,6 +13292,8 @@ var init_TaskExecutionEngine = __esm({
|
|
|
13120
13292
|
};
|
|
13121
13293
|
}
|
|
13122
13294
|
});
|
|
13295
|
+
|
|
13296
|
+
// ../../packages/serviceme-core/src/scheduled-tasks/TaskLogManager.ts
|
|
13123
13297
|
function emptyLogFile() {
|
|
13124
13298
|
return { logs: [] };
|
|
13125
13299
|
}
|
|
@@ -13139,25 +13313,29 @@ function validateAndRepairLogFile(raw) {
|
|
|
13139
13313
|
const validLogs = file.logs.filter(isValidLogEntry);
|
|
13140
13314
|
return { logs: validLogs };
|
|
13141
13315
|
}
|
|
13142
|
-
var CONFIG_DIR4, LOG_FILE2, MAX_LOGS, TaskLogManager;
|
|
13316
|
+
var import_node_crypto2, fs9, path8, CONFIG_DIR4, LOG_FILE2, MAX_LOGS, TaskLogManager;
|
|
13143
13317
|
var init_TaskLogManager = __esm({
|
|
13144
13318
|
"../../packages/serviceme-core/src/scheduled-tasks/TaskLogManager.ts"() {
|
|
13319
|
+
"use strict";
|
|
13320
|
+
import_node_crypto2 = require("crypto");
|
|
13321
|
+
fs9 = __toESM(require("fs"));
|
|
13322
|
+
path8 = __toESM(require("path"));
|
|
13145
13323
|
CONFIG_DIR4 = ".serviceme";
|
|
13146
13324
|
LOG_FILE2 = "scheduled-tasks-log.json";
|
|
13147
13325
|
MAX_LOGS = 200;
|
|
13148
13326
|
TaskLogManager = class {
|
|
13149
13327
|
constructor(workspacePath) {
|
|
13150
|
-
this.logPath =
|
|
13328
|
+
this.logPath = path8.join(workspacePath, CONFIG_DIR4, LOG_FILE2);
|
|
13151
13329
|
}
|
|
13152
13330
|
getLogPath() {
|
|
13153
13331
|
return this.logPath;
|
|
13154
13332
|
}
|
|
13155
13333
|
readLogFile() {
|
|
13156
|
-
if (!
|
|
13334
|
+
if (!fs9.existsSync(this.logPath)) {
|
|
13157
13335
|
return emptyLogFile();
|
|
13158
13336
|
}
|
|
13159
13337
|
try {
|
|
13160
|
-
const raw =
|
|
13338
|
+
const raw = fs9.readFileSync(this.logPath, "utf-8");
|
|
13161
13339
|
const parsed = JSON.parse(raw);
|
|
13162
13340
|
const file = validateAndRepairLogFile(parsed);
|
|
13163
13341
|
if (!parsed || typeof parsed !== "object" || !Array.isArray(parsed.logs) || parsed.logs.length !== file.logs.length) {
|
|
@@ -13173,26 +13351,26 @@ var init_TaskLogManager = __esm({
|
|
|
13173
13351
|
}
|
|
13174
13352
|
backupCorruptedFile() {
|
|
13175
13353
|
try {
|
|
13176
|
-
if (
|
|
13354
|
+
if (fs9.existsSync(this.logPath)) {
|
|
13177
13355
|
const backupPath = `${this.logPath}.corrupted.${Date.now()}`;
|
|
13178
|
-
|
|
13356
|
+
fs9.copyFileSync(this.logPath, backupPath);
|
|
13179
13357
|
}
|
|
13180
13358
|
} catch {
|
|
13181
13359
|
}
|
|
13182
13360
|
}
|
|
13183
13361
|
writeLogFile(file) {
|
|
13184
|
-
const dir =
|
|
13185
|
-
if (!
|
|
13186
|
-
|
|
13362
|
+
const dir = path8.dirname(this.logPath);
|
|
13363
|
+
if (!fs9.existsSync(dir)) {
|
|
13364
|
+
fs9.mkdirSync(dir, { recursive: true });
|
|
13187
13365
|
}
|
|
13188
13366
|
const tmp = `${this.logPath}.tmp`;
|
|
13189
|
-
|
|
13190
|
-
|
|
13367
|
+
fs9.writeFileSync(tmp, JSON.stringify(file, null, " "), "utf-8");
|
|
13368
|
+
fs9.renameSync(tmp, this.logPath);
|
|
13191
13369
|
}
|
|
13192
13370
|
appendLog(input) {
|
|
13193
13371
|
const file = this.readLogFile();
|
|
13194
13372
|
const log = {
|
|
13195
|
-
id:
|
|
13373
|
+
id: (0, import_node_crypto2.randomUUID)(),
|
|
13196
13374
|
taskId: input.taskId,
|
|
13197
13375
|
taskName: input.taskName,
|
|
13198
13376
|
startedAt: input.startedAt,
|
|
@@ -13235,6 +13413,8 @@ var init_TaskLogManager = __esm({
|
|
|
13235
13413
|
};
|
|
13236
13414
|
}
|
|
13237
13415
|
});
|
|
13416
|
+
|
|
13417
|
+
// ../../packages/serviceme-core/src/scheduled-tasks/daemon/SchedulerDaemon.ts
|
|
13238
13418
|
function parseIntervalMs(schedule) {
|
|
13239
13419
|
const match = /^every\s+(\d+)\s*(s|sec|m|min|h|hr|d|day)s?$/i.exec(schedule);
|
|
13240
13420
|
if (!match) return 0;
|
|
@@ -13274,9 +13454,12 @@ function matchCronField(field, value) {
|
|
|
13274
13454
|
const values = field.split(",");
|
|
13275
13455
|
return values.some((v) => Number.parseInt(v, 10) === value);
|
|
13276
13456
|
}
|
|
13277
|
-
var TICK_INTERVAL, MIN_SCHEDULE_INTERVAL, SchedulerDaemon;
|
|
13457
|
+
var fs10, os, TICK_INTERVAL, MIN_SCHEDULE_INTERVAL, SchedulerDaemon;
|
|
13278
13458
|
var init_SchedulerDaemon = __esm({
|
|
13279
13459
|
"../../packages/serviceme-core/src/scheduled-tasks/daemon/SchedulerDaemon.ts"() {
|
|
13460
|
+
"use strict";
|
|
13461
|
+
fs10 = __toESM(require("fs"));
|
|
13462
|
+
os = __toESM(require("os"));
|
|
13280
13463
|
init_executors();
|
|
13281
13464
|
init_TaskConfigManager();
|
|
13282
13465
|
init_TaskExecutionEngine();
|
|
@@ -13313,10 +13496,10 @@ var init_SchedulerDaemon = __esm({
|
|
|
13313
13496
|
`Scheduler daemon started
|
|
13314
13497
|
PID: ${process.pid}
|
|
13315
13498
|
Node: ${process.version}
|
|
13316
|
-
OS: ${
|
|
13499
|
+
OS: ${os.type()} ${os.release()} (${process.arch})
|
|
13317
13500
|
Platform: ${process.platform}
|
|
13318
|
-
Hostname: ${
|
|
13319
|
-
User: ${
|
|
13501
|
+
Hostname: ${os.hostname()}
|
|
13502
|
+
User: ${os.userInfo().username}
|
|
13320
13503
|
Workspace: ${this.workspacePath}
|
|
13321
13504
|
Config: ${configPath}
|
|
13322
13505
|
LogPath: ${logPath}
|
|
@@ -13346,8 +13529,8 @@ var init_SchedulerDaemon = __esm({
|
|
|
13346
13529
|
const configPath = this.configManager.getConfigPath();
|
|
13347
13530
|
const dir = configPath.substring(0, configPath.lastIndexOf("/"));
|
|
13348
13531
|
try {
|
|
13349
|
-
if (
|
|
13350
|
-
this.watcher =
|
|
13532
|
+
if (fs10.existsSync(dir)) {
|
|
13533
|
+
this.watcher = fs10.watch(dir, (_eventType, filename) => {
|
|
13351
13534
|
if (filename === "scheduled-tasks.json") {
|
|
13352
13535
|
this.logger.log("info", "Config file changed, reconciling...");
|
|
13353
13536
|
}
|
|
@@ -13466,6 +13649,7 @@ var init_SchedulerDaemon = __esm({
|
|
|
13466
13649
|
// ../../packages/serviceme-core/src/scheduled-tasks/daemon/index.ts
|
|
13467
13650
|
var init_daemon = __esm({
|
|
13468
13651
|
"../../packages/serviceme-core/src/scheduled-tasks/daemon/index.ts"() {
|
|
13652
|
+
"use strict";
|
|
13469
13653
|
init_DaemonLogger();
|
|
13470
13654
|
init_PidManager();
|
|
13471
13655
|
init_SchedulerDaemon();
|
|
@@ -13475,6 +13659,7 @@ var init_daemon = __esm({
|
|
|
13475
13659
|
// ../../packages/serviceme-core/src/scheduled-tasks/index.ts
|
|
13476
13660
|
var init_scheduled_tasks2 = __esm({
|
|
13477
13661
|
"../../packages/serviceme-core/src/scheduled-tasks/index.ts"() {
|
|
13662
|
+
"use strict";
|
|
13478
13663
|
init_daemon();
|
|
13479
13664
|
init_executors();
|
|
13480
13665
|
init_TaskConfigManager();
|
|
@@ -13487,6 +13672,8 @@ var init_scheduled_tasks2 = __esm({
|
|
|
13487
13672
|
var SkillCatalogClient;
|
|
13488
13673
|
var init_SkillCatalogClient = __esm({
|
|
13489
13674
|
"../../packages/serviceme-core/src/skills/SkillCatalogClient.ts"() {
|
|
13675
|
+
"use strict";
|
|
13676
|
+
init_src();
|
|
13490
13677
|
SkillCatalogClient = class {
|
|
13491
13678
|
constructor(options2 = {}) {
|
|
13492
13679
|
this.fetchImpl = options2.fetchImpl ?? fetch;
|
|
@@ -13511,6 +13698,30 @@ var init_SkillCatalogClient = __esm({
|
|
|
13511
13698
|
fetchedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
13512
13699
|
};
|
|
13513
13700
|
}
|
|
13701
|
+
async downloadSkill(remoteId) {
|
|
13702
|
+
if (!this.baseUrl) {
|
|
13703
|
+
throw createServicemeError(
|
|
13704
|
+
"workspace_not_found",
|
|
13705
|
+
"Skill catalog baseUrl is not configured."
|
|
13706
|
+
);
|
|
13707
|
+
}
|
|
13708
|
+
const response = await this.fetchImpl(
|
|
13709
|
+
`${this.baseUrl}/api/v1/marketplace/skills/download/${remoteId}`
|
|
13710
|
+
);
|
|
13711
|
+
if (!response.ok) {
|
|
13712
|
+
if (response.status === 404) {
|
|
13713
|
+
throw createServicemeError(
|
|
13714
|
+
"not_found",
|
|
13715
|
+
`Skill '${remoteId}' not found`
|
|
13716
|
+
);
|
|
13717
|
+
}
|
|
13718
|
+
throw new Error(
|
|
13719
|
+
`Failed to download skill ${remoteId}: ${response.status}`
|
|
13720
|
+
);
|
|
13721
|
+
}
|
|
13722
|
+
const payload = await response.json();
|
|
13723
|
+
return payload.data?.files ?? [];
|
|
13724
|
+
}
|
|
13514
13725
|
};
|
|
13515
13726
|
}
|
|
13516
13727
|
});
|
|
@@ -13519,6 +13730,7 @@ var init_SkillCatalogClient = __esm({
|
|
|
13519
13730
|
var SkillReconciler;
|
|
13520
13731
|
var init_SkillReconciler = __esm({
|
|
13521
13732
|
"../../packages/serviceme-core/src/skills/SkillReconciler.ts"() {
|
|
13733
|
+
"use strict";
|
|
13522
13734
|
SkillReconciler = class {
|
|
13523
13735
|
constructor(deps) {
|
|
13524
13736
|
this.deps = deps;
|
|
@@ -13570,15 +13782,20 @@ var init_SkillReconciler = __esm({
|
|
|
13570
13782
|
};
|
|
13571
13783
|
}
|
|
13572
13784
|
});
|
|
13785
|
+
|
|
13786
|
+
// ../../packages/serviceme-core/src/skills/SkillStore.ts
|
|
13573
13787
|
function assertSafeLocalSkillId(skillId) {
|
|
13574
13788
|
if (typeof skillId !== "string" || skillId.length === 0 || skillId === "." || skillId === ".." || skillId.includes("/") || skillId.includes("\\") || !SAFE_LOCAL_ID_PATTERN2.test(skillId)) {
|
|
13575
13789
|
throw new Error(`Invalid skill id: ${skillId}`);
|
|
13576
13790
|
}
|
|
13577
13791
|
return skillId;
|
|
13578
13792
|
}
|
|
13579
|
-
var USER_SKILL_MARKER_FILE, WORKSPACE_SKILLS_ROOT_RELATIVE, WORKSPACE_SKILLS_MARKER_RELATIVE, SAFE_LOCAL_ID_PATTERN2, SkillStore;
|
|
13793
|
+
var fs11, path9, USER_SKILL_MARKER_FILE, WORKSPACE_SKILLS_ROOT_RELATIVE, WORKSPACE_SKILLS_MARKER_RELATIVE, SAFE_LOCAL_ID_PATTERN2, SkillStore;
|
|
13580
13794
|
var init_SkillStore = __esm({
|
|
13581
13795
|
"../../packages/serviceme-core/src/skills/SkillStore.ts"() {
|
|
13796
|
+
"use strict";
|
|
13797
|
+
fs11 = __toESM(require("fs/promises"));
|
|
13798
|
+
path9 = __toESM(require("path"));
|
|
13582
13799
|
USER_SKILL_MARKER_FILE = ".ms-devtools-skill.json";
|
|
13583
13800
|
WORKSPACE_SKILLS_ROOT_RELATIVE = ".github/skills";
|
|
13584
13801
|
WORKSPACE_SKILLS_MARKER_RELATIVE = ".github/.ms-devtools-skills.yml";
|
|
@@ -13587,7 +13804,7 @@ var init_SkillStore = __esm({
|
|
|
13587
13804
|
constructor(options2) {
|
|
13588
13805
|
this.workspacePath = options2.workspacePath;
|
|
13589
13806
|
this.userSkillsRoot = options2.userSkillsRoot;
|
|
13590
|
-
this.fileSystem = options2.fileSystem ??
|
|
13807
|
+
this.fileSystem = options2.fileSystem ?? fs11;
|
|
13591
13808
|
}
|
|
13592
13809
|
normalizeRemoteSkillId(remoteId) {
|
|
13593
13810
|
if (remoteId.startsWith("official/")) {
|
|
@@ -13606,10 +13823,10 @@ var init_SkillStore = __esm({
|
|
|
13606
13823
|
return WORKSPACE_SKILLS_MARKER_RELATIVE;
|
|
13607
13824
|
}
|
|
13608
13825
|
getUserSkillPath(skillId) {
|
|
13609
|
-
return
|
|
13826
|
+
return path9.join(this.userSkillsRoot, skillId);
|
|
13610
13827
|
}
|
|
13611
13828
|
async listWorkspaceSkillIds() {
|
|
13612
|
-
const skillsRootPath =
|
|
13829
|
+
const skillsRootPath = path9.join(
|
|
13613
13830
|
this.workspacePath,
|
|
13614
13831
|
WORKSPACE_SKILLS_ROOT_RELATIVE
|
|
13615
13832
|
);
|
|
@@ -13636,7 +13853,7 @@ var init_SkillStore = __esm({
|
|
|
13636
13853
|
const targetDir = this.getUserSkillPath(skillId);
|
|
13637
13854
|
await this.fileSystem.mkdir(targetDir, { recursive: true });
|
|
13638
13855
|
await this.fileSystem.writeFile(
|
|
13639
|
-
|
|
13856
|
+
path9.join(targetDir, USER_SKILL_MARKER_FILE),
|
|
13640
13857
|
JSON.stringify({ skillId, installedBy: "ms-devtools" }, null, 2),
|
|
13641
13858
|
"utf-8"
|
|
13642
13859
|
);
|
|
@@ -13644,7 +13861,7 @@ var init_SkillStore = __esm({
|
|
|
13644
13861
|
async isManagedUserSkill(skillId) {
|
|
13645
13862
|
try {
|
|
13646
13863
|
const marker = await this.fileSystem.readFile(
|
|
13647
|
-
|
|
13864
|
+
path9.join(this.getUserSkillPath(skillId), USER_SKILL_MARKER_FILE),
|
|
13648
13865
|
"utf-8"
|
|
13649
13866
|
);
|
|
13650
13867
|
const parsed = JSON.parse(marker);
|
|
@@ -13653,6 +13870,22 @@ var init_SkillStore = __esm({
|
|
|
13653
13870
|
return false;
|
|
13654
13871
|
}
|
|
13655
13872
|
}
|
|
13873
|
+
async writeSkillFiles(skillId, scope, files) {
|
|
13874
|
+
const root2 = scope === "workspace" ? path9.join(this.workspacePath, WORKSPACE_SKILLS_ROOT_RELATIVE) : this.userSkillsRoot;
|
|
13875
|
+
const targetDir = path9.join(root2, skillId);
|
|
13876
|
+
await this.fileSystem.mkdir(targetDir, { recursive: true });
|
|
13877
|
+
for (const file of files) {
|
|
13878
|
+
const filePath = path9.join(targetDir, file.path);
|
|
13879
|
+
await this.fileSystem.mkdir(path9.dirname(filePath), { recursive: true });
|
|
13880
|
+
await this.fileSystem.writeFile(filePath, file.content, "utf-8");
|
|
13881
|
+
if (file.executable) {
|
|
13882
|
+
try {
|
|
13883
|
+
await this.fileSystem.chmod(filePath, 493);
|
|
13884
|
+
} catch {
|
|
13885
|
+
}
|
|
13886
|
+
}
|
|
13887
|
+
}
|
|
13888
|
+
}
|
|
13656
13889
|
};
|
|
13657
13890
|
}
|
|
13658
13891
|
});
|
|
@@ -13660,12 +13893,14 @@ var init_SkillStore = __esm({
|
|
|
13660
13893
|
// ../../packages/serviceme-core/src/skills/types.ts
|
|
13661
13894
|
var init_types3 = __esm({
|
|
13662
13895
|
"../../packages/serviceme-core/src/skills/types.ts"() {
|
|
13896
|
+
"use strict";
|
|
13663
13897
|
}
|
|
13664
13898
|
});
|
|
13665
13899
|
|
|
13666
13900
|
// ../../packages/serviceme-core/src/skills/index.ts
|
|
13667
13901
|
var init_skills = __esm({
|
|
13668
13902
|
"../../packages/serviceme-core/src/skills/index.ts"() {
|
|
13903
|
+
"use strict";
|
|
13669
13904
|
init_SkillCatalogClient();
|
|
13670
13905
|
init_SkillReconciler();
|
|
13671
13906
|
init_SkillStore();
|
|
@@ -13717,6 +13952,7 @@ __export(src_exports, {
|
|
|
13717
13952
|
});
|
|
13718
13953
|
var init_src2 = __esm({
|
|
13719
13954
|
"../../packages/serviceme-core/src/index.ts"() {
|
|
13955
|
+
"use strict";
|
|
13720
13956
|
init_agents();
|
|
13721
13957
|
init_copilot2();
|
|
13722
13958
|
init_environmentInspector();
|
|
@@ -13778,6 +14014,9 @@ function getStringFlag(parsed, name) {
|
|
|
13778
14014
|
}
|
|
13779
14015
|
|
|
13780
14016
|
// src/commands/agent.ts
|
|
14017
|
+
var fs12 = __toESM(require("fs/promises"));
|
|
14018
|
+
var os2 = __toESM(require("os"));
|
|
14019
|
+
var path10 = __toESM(require("path"));
|
|
13781
14020
|
init_src2();
|
|
13782
14021
|
init_src();
|
|
13783
14022
|
|
|
@@ -13813,7 +14052,7 @@ async function runAgentCommand(parsed) {
|
|
|
13813
14052
|
}
|
|
13814
14053
|
const store = new AgentStore({
|
|
13815
14054
|
workspacePath,
|
|
13816
|
-
userAgentsRoot:
|
|
14055
|
+
userAgentsRoot: path10.join(os2.homedir(), ".copilot", "agents")
|
|
13817
14056
|
});
|
|
13818
14057
|
const catalogClient = new AgentCatalogClient({
|
|
13819
14058
|
baseUrl: getStringFlag(parsed, "baseUrl")
|
|
@@ -13827,7 +14066,9 @@ async function runAgentCommand(parsed) {
|
|
|
13827
14066
|
writeSuccess(await handleList(store));
|
|
13828
14067
|
return;
|
|
13829
14068
|
case "install":
|
|
13830
|
-
writeSuccess(
|
|
14069
|
+
writeSuccess(
|
|
14070
|
+
await handleInstall(store, parsed, catalogClient)
|
|
14071
|
+
);
|
|
13831
14072
|
return;
|
|
13832
14073
|
case "uninstall":
|
|
13833
14074
|
writeSuccess(await handleUninstall(store, workspacePath, parsed));
|
|
@@ -13859,7 +14100,7 @@ async function handleList(store) {
|
|
|
13859
14100
|
]
|
|
13860
14101
|
};
|
|
13861
14102
|
}
|
|
13862
|
-
async function handleInstall(store, parsed) {
|
|
14103
|
+
async function handleInstall(store, parsed, catalogClient) {
|
|
13863
14104
|
const remoteId = getStringFlag(parsed, "id");
|
|
13864
14105
|
if (!remoteId) {
|
|
13865
14106
|
throw createServicemeError(
|
|
@@ -13877,27 +14118,48 @@ async function handleInstall(store, parsed) {
|
|
|
13877
14118
|
message: "Install requires --confirmed."
|
|
13878
14119
|
};
|
|
13879
14120
|
}
|
|
13880
|
-
|
|
13881
|
-
|
|
13882
|
-
|
|
13883
|
-
|
|
13884
|
-
|
|
13885
|
-
|
|
13886
|
-
|
|
13887
|
-
|
|
13888
|
-
|
|
13889
|
-
|
|
13890
|
-
|
|
13891
|
-
|
|
13892
|
-
|
|
13893
|
-
}
|
|
13894
|
-
|
|
13895
|
-
|
|
13896
|
-
|
|
13897
|
-
|
|
13898
|
-
|
|
13899
|
-
|
|
13900
|
-
|
|
14121
|
+
let files;
|
|
14122
|
+
try {
|
|
14123
|
+
files = await catalogClient.downloadAgent(remoteId);
|
|
14124
|
+
} catch (error) {
|
|
14125
|
+
const errCode = error?.code;
|
|
14126
|
+
const errMessage = error instanceof Error ? error.message : String(error);
|
|
14127
|
+
const isNotFound = errCode === "not_found" || /not found/i.test(errMessage);
|
|
14128
|
+
return {
|
|
14129
|
+
changed: false,
|
|
14130
|
+
scope: "workspace",
|
|
14131
|
+
agentId,
|
|
14132
|
+
status: "failed",
|
|
14133
|
+
message: isNotFound ? `Agent '${agentId}' not found in catalog.` : `Failed to download agent: ${errMessage}`
|
|
14134
|
+
};
|
|
14135
|
+
}
|
|
14136
|
+
if (files.length === 0) {
|
|
14137
|
+
return {
|
|
14138
|
+
changed: false,
|
|
14139
|
+
scope: "workspace",
|
|
14140
|
+
agentId,
|
|
14141
|
+
status: "failed",
|
|
14142
|
+
message: "Catalog returned no files for agent."
|
|
14143
|
+
};
|
|
14144
|
+
}
|
|
14145
|
+
try {
|
|
14146
|
+
await store.writeAgentFiles(agentId, "workspace", files);
|
|
14147
|
+
await store.addInstalledAgent({
|
|
14148
|
+
id: remoteId,
|
|
14149
|
+
name: agentId,
|
|
14150
|
+
scope: "workspace",
|
|
14151
|
+
installedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
14152
|
+
});
|
|
14153
|
+
} catch (error) {
|
|
14154
|
+
const errMessage = error instanceof Error ? error.message : String(error);
|
|
14155
|
+
return {
|
|
14156
|
+
changed: false,
|
|
14157
|
+
scope: "workspace",
|
|
14158
|
+
agentId,
|
|
14159
|
+
status: "failed",
|
|
14160
|
+
message: `Failed to write agent files: ${errMessage}`
|
|
14161
|
+
};
|
|
14162
|
+
}
|
|
13901
14163
|
return {
|
|
13902
14164
|
changed: true,
|
|
13903
14165
|
scope: "workspace",
|
|
@@ -13914,22 +14176,22 @@ async function handleUninstall(store, workspacePath, parsed) {
|
|
|
13914
14176
|
);
|
|
13915
14177
|
}
|
|
13916
14178
|
const agentId = normalizeAgentIdOrThrow(store, remoteId);
|
|
13917
|
-
await
|
|
13918
|
-
|
|
14179
|
+
await fs12.rm(
|
|
14180
|
+
path10.join(workspacePath, ".github", "agents", `${agentId}.agent.md`),
|
|
13919
14181
|
{
|
|
13920
14182
|
recursive: true,
|
|
13921
14183
|
force: true
|
|
13922
14184
|
}
|
|
13923
14185
|
);
|
|
13924
|
-
await
|
|
14186
|
+
await fs12.rm(path10.join(workspacePath, ".github", "agents", agentId), {
|
|
13925
14187
|
recursive: true,
|
|
13926
14188
|
force: true
|
|
13927
14189
|
});
|
|
13928
|
-
await
|
|
14190
|
+
await fs12.rm(path10.join(store.getUserAgentsRootPath(), `${agentId}.agent.md`), {
|
|
13929
14191
|
recursive: true,
|
|
13930
14192
|
force: true
|
|
13931
14193
|
});
|
|
13932
|
-
await
|
|
14194
|
+
await fs12.rm(path10.join(store.getUserAgentsRootPath(), agentId), {
|
|
13933
14195
|
recursive: true,
|
|
13934
14196
|
force: true
|
|
13935
14197
|
});
|
|
@@ -13955,13 +14217,13 @@ async function handleMove(store, workspacePath, parsed) {
|
|
|
13955
14217
|
);
|
|
13956
14218
|
}
|
|
13957
14219
|
const agentId = normalizeAgentIdOrThrow(store, remoteId);
|
|
13958
|
-
const workspaceFlatPath =
|
|
14220
|
+
const workspaceFlatPath = path10.join(
|
|
13959
14221
|
workspacePath,
|
|
13960
14222
|
".github",
|
|
13961
14223
|
"agents",
|
|
13962
14224
|
`${agentId}.agent.md`
|
|
13963
14225
|
);
|
|
13964
|
-
const userFlatPath =
|
|
14226
|
+
const userFlatPath = path10.join(
|
|
13965
14227
|
store.getUserAgentsRootPath(),
|
|
13966
14228
|
`${agentId}.agent.md`
|
|
13967
14229
|
);
|
|
@@ -14055,23 +14317,23 @@ async function handlePermissions(store, reconciler, workspacePath, parsed) {
|
|
|
14055
14317
|
};
|
|
14056
14318
|
}
|
|
14057
14319
|
async function moveEntry(fromPath, toPath) {
|
|
14058
|
-
await
|
|
14320
|
+
await fs12.mkdir(path10.dirname(toPath), { recursive: true });
|
|
14059
14321
|
try {
|
|
14060
|
-
await
|
|
14322
|
+
await fs12.rename(fromPath, toPath);
|
|
14061
14323
|
} catch {
|
|
14062
|
-
await
|
|
14063
|
-
await
|
|
14324
|
+
await fs12.cp(fromPath, toPath, { recursive: true });
|
|
14325
|
+
await fs12.rm(fromPath, { recursive: true, force: true });
|
|
14064
14326
|
}
|
|
14065
14327
|
}
|
|
14066
14328
|
async function readAgentContent(store, workspacePath, agentId, scope) {
|
|
14067
|
-
const root2 = scope === "workspace" ?
|
|
14329
|
+
const root2 = scope === "workspace" ? path10.join(workspacePath, store.getWorkspaceAgentsRootPath()) : store.getUserAgentsRootPath();
|
|
14068
14330
|
const candidates = [
|
|
14069
|
-
|
|
14070
|
-
|
|
14331
|
+
path10.join(root2, `${agentId}.agent.md`),
|
|
14332
|
+
path10.join(root2, agentId, `${agentId}.agent.md`)
|
|
14071
14333
|
];
|
|
14072
14334
|
for (const candidate of candidates) {
|
|
14073
14335
|
try {
|
|
14074
|
-
return await
|
|
14336
|
+
return await fs12.readFile(candidate, "utf8");
|
|
14075
14337
|
} catch {
|
|
14076
14338
|
}
|
|
14077
14339
|
}
|
|
@@ -14085,13 +14347,17 @@ async function readAgentContent(store, workspacePath, agentId, scope) {
|
|
|
14085
14347
|
init_src2();
|
|
14086
14348
|
|
|
14087
14349
|
// src/bridge/BridgeServer.ts
|
|
14350
|
+
var readline = __toESM(require("readline"));
|
|
14088
14351
|
init_src();
|
|
14089
14352
|
|
|
14090
14353
|
// src/version.ts
|
|
14091
14354
|
var SERVICEME_CLI_NAME = "serviceme";
|
|
14092
|
-
var SERVICEME_CLI_VERSION = "0.1.
|
|
14355
|
+
var SERVICEME_CLI_VERSION = "0.1.7";
|
|
14093
14356
|
|
|
14094
14357
|
// src/bridge/AgentBridgeHandler.ts
|
|
14358
|
+
var fs13 = __toESM(require("fs/promises"));
|
|
14359
|
+
var os3 = __toESM(require("os"));
|
|
14360
|
+
var path11 = __toESM(require("path"));
|
|
14095
14361
|
init_src2();
|
|
14096
14362
|
init_src();
|
|
14097
14363
|
function normalizeAgentIdOrThrow2(store, remoteId) {
|
|
@@ -14132,11 +14398,11 @@ var AgentBridgeHandler = class {
|
|
|
14132
14398
|
hasConflict: agent.hasConflict,
|
|
14133
14399
|
tools: agent.tools,
|
|
14134
14400
|
source: agent.source,
|
|
14135
|
-
localAgentPath: workspaceInstalled || userInstalled ? workspaceInstalled ?
|
|
14401
|
+
localAgentPath: workspaceInstalled || userInstalled ? workspaceInstalled ? path11.join(
|
|
14136
14402
|
context.workspacePath,
|
|
14137
14403
|
context.store.getWorkspaceAgentsRootPath(),
|
|
14138
14404
|
`${agentId}.agent.md`
|
|
14139
|
-
) :
|
|
14405
|
+
) : path11.join(
|
|
14140
14406
|
context.store.getUserAgentsRootPath(),
|
|
14141
14407
|
`${agentId}.agent.md`
|
|
14142
14408
|
) : void 0,
|
|
@@ -14144,7 +14410,7 @@ var AgentBridgeHandler = class {
|
|
|
14144
14410
|
workspaceState: this.makeScopeState(
|
|
14145
14411
|
"workspace",
|
|
14146
14412
|
workspaceInstalled,
|
|
14147
|
-
|
|
14413
|
+
path11.join(
|
|
14148
14414
|
context.workspacePath,
|
|
14149
14415
|
context.store.getWorkspaceAgentsRootPath(),
|
|
14150
14416
|
`${agentId}.agent.md`
|
|
@@ -14153,7 +14419,7 @@ var AgentBridgeHandler = class {
|
|
|
14153
14419
|
userState: this.makeScopeState(
|
|
14154
14420
|
"user",
|
|
14155
14421
|
userInstalled,
|
|
14156
|
-
|
|
14422
|
+
path11.join(
|
|
14157
14423
|
context.store.getUserAgentsRootPath(),
|
|
14158
14424
|
`${agentId}.agent.md`
|
|
14159
14425
|
)
|
|
@@ -14176,7 +14442,7 @@ var AgentBridgeHandler = class {
|
|
|
14176
14442
|
hasConflict: false,
|
|
14177
14443
|
tools: [],
|
|
14178
14444
|
source: "local",
|
|
14179
|
-
localAgentPath:
|
|
14445
|
+
localAgentPath: path11.join(
|
|
14180
14446
|
context.workspacePath,
|
|
14181
14447
|
context.store.getWorkspaceAgentsRootPath(),
|
|
14182
14448
|
`${agentId}.agent.md`
|
|
@@ -14184,7 +14450,7 @@ var AgentBridgeHandler = class {
|
|
|
14184
14450
|
workspaceState: this.makeScopeState(
|
|
14185
14451
|
"workspace",
|
|
14186
14452
|
true,
|
|
14187
|
-
|
|
14453
|
+
path11.join(
|
|
14188
14454
|
context.workspacePath,
|
|
14189
14455
|
context.store.getWorkspaceAgentsRootPath(),
|
|
14190
14456
|
`${agentId}.agent.md`
|
|
@@ -14193,7 +14459,7 @@ var AgentBridgeHandler = class {
|
|
|
14193
14459
|
userState: this.makeScopeState(
|
|
14194
14460
|
"user",
|
|
14195
14461
|
userSet.has(agentId),
|
|
14196
|
-
|
|
14462
|
+
path11.join(
|
|
14197
14463
|
context.store.getUserAgentsRootPath(),
|
|
14198
14464
|
`${agentId}.agent.md`
|
|
14199
14465
|
)
|
|
@@ -14216,14 +14482,14 @@ var AgentBridgeHandler = class {
|
|
|
14216
14482
|
hasConflict: false,
|
|
14217
14483
|
tools: [],
|
|
14218
14484
|
source: "local",
|
|
14219
|
-
localAgentPath:
|
|
14485
|
+
localAgentPath: path11.join(
|
|
14220
14486
|
context.store.getUserAgentsRootPath(),
|
|
14221
14487
|
`${agentId}.agent.md`
|
|
14222
14488
|
),
|
|
14223
14489
|
workspaceState: this.makeScopeState(
|
|
14224
14490
|
"workspace",
|
|
14225
14491
|
workspaceSet.has(agentId),
|
|
14226
|
-
|
|
14492
|
+
path11.join(
|
|
14227
14493
|
context.workspacePath,
|
|
14228
14494
|
context.store.getWorkspaceAgentsRootPath(),
|
|
14229
14495
|
`${agentId}.agent.md`
|
|
@@ -14232,7 +14498,7 @@ var AgentBridgeHandler = class {
|
|
|
14232
14498
|
userState: this.makeScopeState(
|
|
14233
14499
|
"user",
|
|
14234
14500
|
true,
|
|
14235
|
-
|
|
14501
|
+
path11.join(
|
|
14236
14502
|
context.store.getUserAgentsRootPath(),
|
|
14237
14503
|
`${agentId}.agent.md`
|
|
14238
14504
|
)
|
|
@@ -14240,7 +14506,7 @@ var AgentBridgeHandler = class {
|
|
|
14240
14506
|
});
|
|
14241
14507
|
}
|
|
14242
14508
|
return {
|
|
14243
|
-
configPath:
|
|
14509
|
+
configPath: path11.join(
|
|
14244
14510
|
context.workspacePath,
|
|
14245
14511
|
context.store.getWorkspaceStateFilePath()
|
|
14246
14512
|
),
|
|
@@ -14285,7 +14551,7 @@ var AgentBridgeHandler = class {
|
|
|
14285
14551
|
}
|
|
14286
14552
|
createContext(workspacePath) {
|
|
14287
14553
|
const resolvedWorkspacePath = workspacePath ?? process.cwd();
|
|
14288
|
-
const userAgentsRoot =
|
|
14554
|
+
const userAgentsRoot = path11.join(os3.homedir(), ".copilot", "agents");
|
|
14289
14555
|
const store = new AgentStore({
|
|
14290
14556
|
workspacePath: resolvedWorkspacePath,
|
|
14291
14557
|
userAgentsRoot
|
|
@@ -14327,12 +14593,12 @@ var AgentBridgeHandler = class {
|
|
|
14327
14593
|
};
|
|
14328
14594
|
}
|
|
14329
14595
|
async applyMutationSideEffect(context, request) {
|
|
14330
|
-
const workspaceFlatPath =
|
|
14596
|
+
const workspaceFlatPath = path11.join(
|
|
14331
14597
|
context.workspacePath,
|
|
14332
14598
|
context.store.getWorkspaceAgentsRootPath(),
|
|
14333
14599
|
`${request.agentId}.agent.md`
|
|
14334
14600
|
);
|
|
14335
|
-
const userFlatPath =
|
|
14601
|
+
const userFlatPath = path11.join(
|
|
14336
14602
|
context.store.getUserAgentsRootPath(),
|
|
14337
14603
|
`${request.agentId}.agent.md`
|
|
14338
14604
|
);
|
|
@@ -14346,9 +14612,9 @@ var AgentBridgeHandler = class {
|
|
|
14346
14612
|
return;
|
|
14347
14613
|
case "uninstall":
|
|
14348
14614
|
if (request.targetScope === "workspace") {
|
|
14349
|
-
await
|
|
14615
|
+
await fs13.rm(workspaceFlatPath, { recursive: true, force: true });
|
|
14350
14616
|
} else {
|
|
14351
|
-
await
|
|
14617
|
+
await fs13.rm(userFlatPath, { recursive: true, force: true });
|
|
14352
14618
|
}
|
|
14353
14619
|
return;
|
|
14354
14620
|
case "move":
|
|
@@ -14363,17 +14629,17 @@ var AgentBridgeHandler = class {
|
|
|
14363
14629
|
}
|
|
14364
14630
|
}
|
|
14365
14631
|
async moveEntry(fromPath, toPath) {
|
|
14366
|
-
await
|
|
14632
|
+
await fs13.mkdir(path11.dirname(toPath), { recursive: true });
|
|
14367
14633
|
try {
|
|
14368
|
-
await
|
|
14634
|
+
await fs13.rename(fromPath, toPath);
|
|
14369
14635
|
} catch {
|
|
14370
|
-
await
|
|
14371
|
-
await
|
|
14636
|
+
await fs13.cp(fromPath, toPath, { recursive: true });
|
|
14637
|
+
await fs13.rm(fromPath, { recursive: true, force: true });
|
|
14372
14638
|
}
|
|
14373
14639
|
}
|
|
14374
14640
|
async writeDefaultAgentFile(targetPath, agentId) {
|
|
14375
|
-
await
|
|
14376
|
-
await
|
|
14641
|
+
await fs13.mkdir(path11.dirname(targetPath), { recursive: true });
|
|
14642
|
+
await fs13.writeFile(
|
|
14377
14643
|
targetPath,
|
|
14378
14644
|
`---
|
|
14379
14645
|
name: ${agentId}
|
|
@@ -14388,17 +14654,17 @@ tools:
|
|
|
14388
14654
|
);
|
|
14389
14655
|
}
|
|
14390
14656
|
async readAgentContent(context, agentId, scope) {
|
|
14391
|
-
const root2 = scope === "workspace" ?
|
|
14657
|
+
const root2 = scope === "workspace" ? path11.join(
|
|
14392
14658
|
context.workspacePath,
|
|
14393
14659
|
context.store.getWorkspaceAgentsRootPath()
|
|
14394
14660
|
) : context.store.getUserAgentsRootPath();
|
|
14395
14661
|
const candidates = [
|
|
14396
|
-
|
|
14397
|
-
|
|
14662
|
+
path11.join(root2, `${agentId}.agent.md`),
|
|
14663
|
+
path11.join(root2, agentId, `${agentId}.agent.md`)
|
|
14398
14664
|
];
|
|
14399
14665
|
for (const candidate of candidates) {
|
|
14400
14666
|
try {
|
|
14401
|
-
return await
|
|
14667
|
+
return await fs13.readFile(candidate, "utf8");
|
|
14402
14668
|
} catch {
|
|
14403
14669
|
}
|
|
14404
14670
|
}
|
|
@@ -14416,6 +14682,9 @@ function writeBridgeMessage(message) {
|
|
|
14416
14682
|
}
|
|
14417
14683
|
|
|
14418
14684
|
// src/bridge/SkillBridgeHandler.ts
|
|
14685
|
+
var fs14 = __toESM(require("fs/promises"));
|
|
14686
|
+
var os4 = __toESM(require("os"));
|
|
14687
|
+
var path12 = __toESM(require("path"));
|
|
14419
14688
|
init_src2();
|
|
14420
14689
|
init_src();
|
|
14421
14690
|
function normalizeSkillIdOrThrow(store, remoteId) {
|
|
@@ -14461,7 +14730,7 @@ var SkillBridgeHandler = class {
|
|
|
14461
14730
|
hasScripts: skill.hasScripts,
|
|
14462
14731
|
hasHooks: skill.hasHooks,
|
|
14463
14732
|
source: skill.source,
|
|
14464
|
-
localSkillPath: workspaceInstalled || userInstalled ? workspaceInstalled ?
|
|
14733
|
+
localSkillPath: workspaceInstalled || userInstalled ? workspaceInstalled ? path12.join(
|
|
14465
14734
|
context.workspacePath,
|
|
14466
14735
|
context.store.getWorkspaceSkillPath(skillId)
|
|
14467
14736
|
) : context.store.getUserSkillPath(skillId) : void 0,
|
|
@@ -14469,7 +14738,7 @@ var SkillBridgeHandler = class {
|
|
|
14469
14738
|
workspaceState: this.makeScopeState(
|
|
14470
14739
|
"workspace",
|
|
14471
14740
|
workspaceInstalled,
|
|
14472
|
-
|
|
14741
|
+
path12.join(
|
|
14473
14742
|
context.workspacePath,
|
|
14474
14743
|
context.store.getWorkspaceSkillPath(skillId)
|
|
14475
14744
|
)
|
|
@@ -14496,14 +14765,14 @@ var SkillBridgeHandler = class {
|
|
|
14496
14765
|
installCount: 0,
|
|
14497
14766
|
hasConflict: false,
|
|
14498
14767
|
source: "local",
|
|
14499
|
-
localSkillPath:
|
|
14768
|
+
localSkillPath: path12.join(
|
|
14500
14769
|
context.workspacePath,
|
|
14501
14770
|
context.store.getWorkspaceSkillPath(skillId)
|
|
14502
14771
|
),
|
|
14503
14772
|
workspaceState: this.makeScopeState(
|
|
14504
14773
|
"workspace",
|
|
14505
14774
|
true,
|
|
14506
|
-
|
|
14775
|
+
path12.join(
|
|
14507
14776
|
context.workspacePath,
|
|
14508
14777
|
context.store.getWorkspaceSkillPath(skillId)
|
|
14509
14778
|
)
|
|
@@ -14534,7 +14803,7 @@ var SkillBridgeHandler = class {
|
|
|
14534
14803
|
workspaceState: this.makeScopeState(
|
|
14535
14804
|
"workspace",
|
|
14536
14805
|
workspaceSet.has(skillId),
|
|
14537
|
-
|
|
14806
|
+
path12.join(
|
|
14538
14807
|
context.workspacePath,
|
|
14539
14808
|
context.store.getWorkspaceSkillPath(skillId)
|
|
14540
14809
|
)
|
|
@@ -14547,7 +14816,7 @@ var SkillBridgeHandler = class {
|
|
|
14547
14816
|
});
|
|
14548
14817
|
}
|
|
14549
14818
|
return {
|
|
14550
|
-
configPath:
|
|
14819
|
+
configPath: path12.join(
|
|
14551
14820
|
context.workspacePath,
|
|
14552
14821
|
context.store.getWorkspaceMarkerPath()
|
|
14553
14822
|
),
|
|
@@ -14604,7 +14873,7 @@ var SkillBridgeHandler = class {
|
|
|
14604
14873
|
skills: workspaceSkillIds.map((skillId) => ({
|
|
14605
14874
|
id: skillId,
|
|
14606
14875
|
displayName: skillId,
|
|
14607
|
-
path:
|
|
14876
|
+
path: path12.join(
|
|
14608
14877
|
context.workspacePath,
|
|
14609
14878
|
context.store.getWorkspaceSkillPath(skillId)
|
|
14610
14879
|
)
|
|
@@ -14613,7 +14882,7 @@ var SkillBridgeHandler = class {
|
|
|
14613
14882
|
}
|
|
14614
14883
|
createContext(workspacePath) {
|
|
14615
14884
|
const resolvedWorkspacePath = workspacePath ?? process.cwd();
|
|
14616
|
-
const userSkillsRoot =
|
|
14885
|
+
const userSkillsRoot = path12.join(os4.homedir(), ".agents", "skills");
|
|
14617
14886
|
const store = new SkillStore({
|
|
14618
14887
|
workspacePath: resolvedWorkspacePath,
|
|
14619
14888
|
userSkillsRoot
|
|
@@ -14655,7 +14924,7 @@ var SkillBridgeHandler = class {
|
|
|
14655
14924
|
};
|
|
14656
14925
|
}
|
|
14657
14926
|
async applyMutationSideEffect(context, request) {
|
|
14658
|
-
const workspaceSkillPath =
|
|
14927
|
+
const workspaceSkillPath = path12.join(
|
|
14659
14928
|
context.workspacePath,
|
|
14660
14929
|
context.store.getWorkspaceSkillPath(request.skillId)
|
|
14661
14930
|
);
|
|
@@ -14663,17 +14932,17 @@ var SkillBridgeHandler = class {
|
|
|
14663
14932
|
switch (request.action) {
|
|
14664
14933
|
case "install":
|
|
14665
14934
|
if (request.targetScope === "workspace") {
|
|
14666
|
-
await
|
|
14935
|
+
await fs14.mkdir(workspaceSkillPath, { recursive: true });
|
|
14667
14936
|
} else {
|
|
14668
|
-
await
|
|
14937
|
+
await fs14.mkdir(userSkillPath, { recursive: true });
|
|
14669
14938
|
await context.store.writeManagedUserSkillMarker(request.skillId);
|
|
14670
14939
|
}
|
|
14671
14940
|
return;
|
|
14672
14941
|
case "uninstall":
|
|
14673
14942
|
if (request.targetScope === "workspace") {
|
|
14674
|
-
await
|
|
14943
|
+
await fs14.rm(workspaceSkillPath, { recursive: true, force: true });
|
|
14675
14944
|
} else {
|
|
14676
|
-
await
|
|
14945
|
+
await fs14.rm(userSkillPath, { recursive: true, force: true });
|
|
14677
14946
|
}
|
|
14678
14947
|
return;
|
|
14679
14948
|
case "move":
|
|
@@ -14689,12 +14958,12 @@ var SkillBridgeHandler = class {
|
|
|
14689
14958
|
}
|
|
14690
14959
|
}
|
|
14691
14960
|
async moveDirectory(fromPath, toPath) {
|
|
14692
|
-
await
|
|
14961
|
+
await fs14.mkdir(path12.dirname(toPath), { recursive: true });
|
|
14693
14962
|
try {
|
|
14694
|
-
await
|
|
14963
|
+
await fs14.rename(fromPath, toPath);
|
|
14695
14964
|
} catch {
|
|
14696
|
-
await
|
|
14697
|
-
await
|
|
14965
|
+
await fs14.cp(fromPath, toPath, { recursive: true });
|
|
14966
|
+
await fs14.rm(fromPath, { recursive: true, force: true });
|
|
14698
14967
|
}
|
|
14699
14968
|
}
|
|
14700
14969
|
};
|
|
@@ -14762,7 +15031,7 @@ var BridgeServer = class {
|
|
|
14762
15031
|
this.agentHandler = new AgentBridgeHandler();
|
|
14763
15032
|
}
|
|
14764
15033
|
async run() {
|
|
14765
|
-
const reader =
|
|
15034
|
+
const reader = readline.createInterface({
|
|
14766
15035
|
input: process.stdin,
|
|
14767
15036
|
crlfDelay: Number.POSITIVE_INFINITY
|
|
14768
15037
|
});
|
|
@@ -15081,9 +15350,12 @@ async function runImageCommand(parsed) {
|
|
|
15081
15350
|
|
|
15082
15351
|
// src/commands/json.ts
|
|
15083
15352
|
init_src2();
|
|
15353
|
+
|
|
15354
|
+
// src/input.ts
|
|
15355
|
+
var fs15 = __toESM(require("fs/promises"));
|
|
15084
15356
|
async function readCommandInput(options2) {
|
|
15085
15357
|
if (options2.filePath) {
|
|
15086
|
-
return
|
|
15358
|
+
return fs15.readFile(options2.filePath, "utf8");
|
|
15087
15359
|
}
|
|
15088
15360
|
if (options2.stdin) {
|
|
15089
15361
|
return readStdin();
|
|
@@ -15209,6 +15481,7 @@ async function runProjectCommand(parsed) {
|
|
|
15209
15481
|
}
|
|
15210
15482
|
|
|
15211
15483
|
// src/commands/schedule.ts
|
|
15484
|
+
var fs16 = __toESM(require("fs"));
|
|
15212
15485
|
init_src2();
|
|
15213
15486
|
init_src();
|
|
15214
15487
|
async function runScheduleCommand(parsed) {
|
|
@@ -15257,7 +15530,7 @@ function requireWorkspace(parsed) {
|
|
|
15257
15530
|
"Missing required flag: --workspacePath"
|
|
15258
15531
|
);
|
|
15259
15532
|
}
|
|
15260
|
-
if (!
|
|
15533
|
+
if (!fs16.existsSync(wp)) {
|
|
15261
15534
|
throw createServicemeError(
|
|
15262
15535
|
"workspace_not_found",
|
|
15263
15536
|
`Workspace path does not exist: ${wp}`
|
|
@@ -15605,7 +15878,7 @@ async function handleTrigger(parsed) {
|
|
|
15605
15878
|
taskName: task.name,
|
|
15606
15879
|
startedAt,
|
|
15607
15880
|
finishedAt,
|
|
15608
|
-
status: result.status,
|
|
15881
|
+
status: result.status === "running" ? "failure" : result.status,
|
|
15609
15882
|
output: result.output,
|
|
15610
15883
|
error: result.error
|
|
15611
15884
|
});
|
|
@@ -15790,6 +16063,9 @@ function writeDescribe(action) {
|
|
|
15790
16063
|
}
|
|
15791
16064
|
|
|
15792
16065
|
// src/commands/scheduler.ts
|
|
16066
|
+
var import_node_child_process4 = require("child_process");
|
|
16067
|
+
var fs17 = __toESM(require("fs"));
|
|
16068
|
+
var path13 = __toESM(require("path"));
|
|
15793
16069
|
init_src2();
|
|
15794
16070
|
init_src();
|
|
15795
16071
|
async function runSchedulerCommand(parsed) {
|
|
@@ -15826,7 +16102,7 @@ function requireWorkspace2(parsed) {
|
|
|
15826
16102
|
"Missing required flag: --workspacePath"
|
|
15827
16103
|
);
|
|
15828
16104
|
}
|
|
15829
|
-
if (!
|
|
16105
|
+
if (!fs17.existsSync(wp)) {
|
|
15830
16106
|
throw createServicemeError(
|
|
15831
16107
|
"workspace_not_found",
|
|
15832
16108
|
`Workspace path does not exist: ${wp}`
|
|
@@ -15853,10 +16129,10 @@ function handleStart(parsed) {
|
|
|
15853
16129
|
"Cannot determine CLI path for daemon spawn"
|
|
15854
16130
|
);
|
|
15855
16131
|
}
|
|
15856
|
-
const logPath =
|
|
15857
|
-
const logDir =
|
|
15858
|
-
if (!
|
|
15859
|
-
|
|
16132
|
+
const logPath = path13.join(wp, ".serviceme", "scheduler.log");
|
|
16133
|
+
const logDir = path13.dirname(logPath);
|
|
16134
|
+
if (!fs17.existsSync(logDir)) {
|
|
16135
|
+
fs17.mkdirSync(logDir, { recursive: true });
|
|
15860
16136
|
}
|
|
15861
16137
|
const spawnCmd = process.execPath;
|
|
15862
16138
|
const spawnArgs = [
|
|
@@ -15869,7 +16145,7 @@ function handleStart(parsed) {
|
|
|
15869
16145
|
logPath
|
|
15870
16146
|
];
|
|
15871
16147
|
if (process.platform === "win32") {
|
|
15872
|
-
|
|
16148
|
+
fs17.appendFileSync(
|
|
15873
16149
|
logPath,
|
|
15874
16150
|
`[scheduler:start] spawning daemon via hidden PowerShell Start-Process: cmd=${spawnCmd}, args=${JSON.stringify(spawnArgs)}, platform=${process.platform}, windowsHide=true
|
|
15875
16151
|
`
|
|
@@ -15879,14 +16155,14 @@ function handleStart(parsed) {
|
|
|
15879
16155
|
writeSuccess({ pid: pid2, status: "started", workspacePath: wp });
|
|
15880
16156
|
return;
|
|
15881
16157
|
}
|
|
15882
|
-
const out =
|
|
15883
|
-
const err =
|
|
15884
|
-
|
|
16158
|
+
const out = fs17.openSync(logPath, "a");
|
|
16159
|
+
const err = fs17.openSync(logPath, "a");
|
|
16160
|
+
fs17.appendFileSync(
|
|
15885
16161
|
logPath,
|
|
15886
16162
|
`[scheduler:start] spawning daemon: cmd=${spawnCmd}, args=${JSON.stringify(spawnArgs)}, platform=${process.platform}, detached=true, windowsHide=true
|
|
15887
16163
|
`
|
|
15888
16164
|
);
|
|
15889
|
-
const child =
|
|
16165
|
+
const child = (0, import_node_child_process4.spawn)(spawnCmd, spawnArgs, {
|
|
15890
16166
|
detached: true,
|
|
15891
16167
|
stdio: ["ignore", out, err],
|
|
15892
16168
|
env: { ...process.env },
|
|
@@ -15911,7 +16187,7 @@ function startWindowsDaemon(command, args) {
|
|
|
15911
16187
|
"Write-Output $process.Id"
|
|
15912
16188
|
].join("; ");
|
|
15913
16189
|
const encodedCommand = Buffer.from(script, "utf16le").toString("base64");
|
|
15914
|
-
const result =
|
|
16190
|
+
const result = (0, import_node_child_process4.spawnSync)(
|
|
15915
16191
|
"powershell.exe",
|
|
15916
16192
|
[
|
|
15917
16193
|
"-NoProfile",
|
|
@@ -15992,7 +16268,7 @@ function handleStatus(parsed) {
|
|
|
15992
16268
|
let uptimeSeconds = null;
|
|
15993
16269
|
if (pid !== null) {
|
|
15994
16270
|
try {
|
|
15995
|
-
const stat2 =
|
|
16271
|
+
const stat2 = fs17.statSync(pidMgr.getPidPath());
|
|
15996
16272
|
uptimeSeconds = Math.floor((Date.now() - stat2.mtimeMs) / 1e3);
|
|
15997
16273
|
} catch {
|
|
15998
16274
|
uptimeSeconds = null;
|
|
@@ -16064,6 +16340,9 @@ function writeDescribe2(action) {
|
|
|
16064
16340
|
}
|
|
16065
16341
|
|
|
16066
16342
|
// src/commands/skill.ts
|
|
16343
|
+
var fs18 = __toESM(require("fs/promises"));
|
|
16344
|
+
var os5 = __toESM(require("os"));
|
|
16345
|
+
var path14 = __toESM(require("path"));
|
|
16067
16346
|
init_src2();
|
|
16068
16347
|
init_src();
|
|
16069
16348
|
function normalizeSkillIdOrThrow2(store, remoteId) {
|
|
@@ -16084,7 +16363,7 @@ async function runSkillCommand(parsed) {
|
|
|
16084
16363
|
}
|
|
16085
16364
|
const store = new SkillStore({
|
|
16086
16365
|
workspacePath,
|
|
16087
|
-
userSkillsRoot:
|
|
16366
|
+
userSkillsRoot: path14.join(os5.homedir(), ".agents", "skills")
|
|
16088
16367
|
});
|
|
16089
16368
|
const catalogClient = new SkillCatalogClient({
|
|
16090
16369
|
baseUrl: getStringFlag(parsed, "baseUrl")
|
|
@@ -16098,7 +16377,9 @@ async function runSkillCommand(parsed) {
|
|
|
16098
16377
|
writeSuccess(await handleList3(store));
|
|
16099
16378
|
return;
|
|
16100
16379
|
case "install":
|
|
16101
|
-
writeSuccess(
|
|
16380
|
+
writeSuccess(
|
|
16381
|
+
await handleInstall2(store, workspacePath, parsed, catalogClient)
|
|
16382
|
+
);
|
|
16102
16383
|
return;
|
|
16103
16384
|
case "uninstall":
|
|
16104
16385
|
writeSuccess(await handleUninstall2(store, workspacePath, parsed));
|
|
@@ -16134,7 +16415,7 @@ async function handleList3(store) {
|
|
|
16134
16415
|
]
|
|
16135
16416
|
};
|
|
16136
16417
|
}
|
|
16137
|
-
async function handleInstall2(store, workspacePath, parsed) {
|
|
16418
|
+
async function handleInstall2(store, workspacePath, parsed, catalogClient) {
|
|
16138
16419
|
const remoteId = getStringFlag(parsed, "id");
|
|
16139
16420
|
if (!remoteId) {
|
|
16140
16421
|
throw createServicemeError(
|
|
@@ -16152,11 +16433,42 @@ async function handleInstall2(store, workspacePath, parsed) {
|
|
|
16152
16433
|
message: "Install requires --confirmed."
|
|
16153
16434
|
};
|
|
16154
16435
|
}
|
|
16155
|
-
|
|
16156
|
-
|
|
16157
|
-
|
|
16158
|
-
)
|
|
16159
|
-
|
|
16436
|
+
let files;
|
|
16437
|
+
try {
|
|
16438
|
+
files = await catalogClient.downloadSkill(remoteId);
|
|
16439
|
+
} catch (error) {
|
|
16440
|
+
const errCode = error?.code;
|
|
16441
|
+
const errMessage = error instanceof Error ? error.message : String(error);
|
|
16442
|
+
const isNotFound = errCode === "not_found" || /not found/i.test(errMessage);
|
|
16443
|
+
return {
|
|
16444
|
+
changed: false,
|
|
16445
|
+
scope: "workspace",
|
|
16446
|
+
skillId,
|
|
16447
|
+
status: "failed",
|
|
16448
|
+
message: isNotFound ? `Skill '${skillId}' not found in catalog.` : `Failed to download skill: ${errMessage}`
|
|
16449
|
+
};
|
|
16450
|
+
}
|
|
16451
|
+
if (files.length === 0) {
|
|
16452
|
+
return {
|
|
16453
|
+
changed: false,
|
|
16454
|
+
scope: "workspace",
|
|
16455
|
+
skillId,
|
|
16456
|
+
status: "failed",
|
|
16457
|
+
message: "Catalog returned no files for skill."
|
|
16458
|
+
};
|
|
16459
|
+
}
|
|
16460
|
+
try {
|
|
16461
|
+
await store.writeSkillFiles(skillId, "workspace", files);
|
|
16462
|
+
} catch (error) {
|
|
16463
|
+
const errMessage = error instanceof Error ? error.message : String(error);
|
|
16464
|
+
return {
|
|
16465
|
+
changed: false,
|
|
16466
|
+
scope: "workspace",
|
|
16467
|
+
skillId,
|
|
16468
|
+
status: "failed",
|
|
16469
|
+
message: `Failed to write skill files: ${errMessage}`
|
|
16470
|
+
};
|
|
16471
|
+
}
|
|
16160
16472
|
return {
|
|
16161
16473
|
changed: true,
|
|
16162
16474
|
scope: "workspace",
|
|
@@ -16173,11 +16485,11 @@ async function handleUninstall2(store, workspacePath, parsed) {
|
|
|
16173
16485
|
);
|
|
16174
16486
|
}
|
|
16175
16487
|
const skillId = normalizeSkillIdOrThrow2(store, remoteId);
|
|
16176
|
-
await
|
|
16488
|
+
await fs18.rm(path14.join(workspacePath, store.getWorkspaceSkillPath(skillId)), {
|
|
16177
16489
|
recursive: true,
|
|
16178
16490
|
force: true
|
|
16179
16491
|
});
|
|
16180
|
-
await
|
|
16492
|
+
await fs18.rm(store.getUserSkillPath(skillId), {
|
|
16181
16493
|
recursive: true,
|
|
16182
16494
|
force: true
|
|
16183
16495
|
});
|
|
@@ -16202,7 +16514,7 @@ async function handleMove2(store, workspacePath, parsed) {
|
|
|
16202
16514
|
);
|
|
16203
16515
|
}
|
|
16204
16516
|
const skillId = normalizeSkillIdOrThrow2(store, remoteId);
|
|
16205
|
-
const workspacePathForSkill =
|
|
16517
|
+
const workspacePathForSkill = path14.join(
|
|
16206
16518
|
workspacePath,
|
|
16207
16519
|
store.getWorkspaceSkillPath(skillId)
|
|
16208
16520
|
);
|
|
@@ -16226,12 +16538,12 @@ async function handleMove2(store, workspacePath, parsed) {
|
|
|
16226
16538
|
};
|
|
16227
16539
|
}
|
|
16228
16540
|
async function moveDirectory(fromPath, toPath) {
|
|
16229
|
-
await
|
|
16541
|
+
await fs18.mkdir(path14.dirname(toPath), { recursive: true });
|
|
16230
16542
|
try {
|
|
16231
|
-
await
|
|
16543
|
+
await fs18.rename(fromPath, toPath);
|
|
16232
16544
|
} catch {
|
|
16233
|
-
await
|
|
16234
|
-
await
|
|
16545
|
+
await fs18.cp(fromPath, toPath, { recursive: true });
|
|
16546
|
+
await fs18.rm(fromPath, { recursive: true, force: true });
|
|
16235
16547
|
}
|
|
16236
16548
|
}
|
|
16237
16549
|
async function handleMarketplace2(store, catalogClient) {
|
|
@@ -16312,8 +16624,15 @@ async function handleReconcile(store, reconciler) {
|
|
|
16312
16624
|
installGate: "open"
|
|
16313
16625
|
};
|
|
16314
16626
|
}
|
|
16627
|
+
const firstWorkspaceSkillId = workspaceSkillIds[0];
|
|
16628
|
+
if (!firstWorkspaceSkillId) {
|
|
16629
|
+
throw createServicemeError(
|
|
16630
|
+
"not_found",
|
|
16631
|
+
"No workspace skill id available for gate check."
|
|
16632
|
+
);
|
|
16633
|
+
}
|
|
16315
16634
|
const gateCheck = await reconciler.mutate({
|
|
16316
|
-
skillId:
|
|
16635
|
+
skillId: firstWorkspaceSkillId,
|
|
16317
16636
|
targetScope: "workspace",
|
|
16318
16637
|
action: "install",
|
|
16319
16638
|
confirmed: false
|
|
@@ -16331,7 +16650,7 @@ async function handlePublishable(store, workspacePath) {
|
|
|
16331
16650
|
skills: workspaceSkillIds.map((skillId) => ({
|
|
16332
16651
|
id: skillId,
|
|
16333
16652
|
displayName: skillId,
|
|
16334
|
-
path:
|
|
16653
|
+
path: path14.join(workspacePath, store.getWorkspaceSkillPath(skillId))
|
|
16335
16654
|
}))
|
|
16336
16655
|
};
|
|
16337
16656
|
}
|