@pmate/cli 0.30.0 → 0.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +587 -546
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -88,7 +88,7 @@ var init_namespacedRef = __esm({
|
|
|
88
88
|
|
|
89
89
|
// src/sessionStore.ts
|
|
90
90
|
function buildSessionStorePath() {
|
|
91
|
-
return
|
|
91
|
+
return process.env.PMATE_SESSION_FILE?.trim() || import_node_path5.default.join(import_node_os4.default.homedir(), ".pmate", "session.json");
|
|
92
92
|
}
|
|
93
93
|
function assertValidAppRef(appRef2) {
|
|
94
94
|
return parseNamespacedRef(appRef2, { entityLabel: "app ref" }).fullId;
|
|
@@ -153,7 +153,7 @@ function loadSessionStore() {
|
|
|
153
153
|
}
|
|
154
154
|
function loadExistingSessionStoreOrEmpty() {
|
|
155
155
|
const sessionPath = buildSessionStorePath();
|
|
156
|
-
if (!(0,
|
|
156
|
+
if (!(0, import_node_fs4.existsSync)(sessionPath)) {
|
|
157
157
|
return {
|
|
158
158
|
version: SESSION_STORE_VERSION,
|
|
159
159
|
activeAppRef: DEFAULT_APP_ID,
|
|
@@ -172,10 +172,10 @@ function loadExistingSessionStoreOrEmpty() {
|
|
|
172
172
|
}
|
|
173
173
|
function loadSessionStoreWithPath() {
|
|
174
174
|
const sessionPath = buildSessionStorePath();
|
|
175
|
-
if (!(0,
|
|
175
|
+
if (!(0, import_node_fs4.existsSync)(sessionPath)) {
|
|
176
176
|
throw new Error(`Missing session file at ${sessionPath}. Run "pmate login" first.`);
|
|
177
177
|
}
|
|
178
|
-
const raw = (0,
|
|
178
|
+
const raw = (0, import_node_fs4.readFileSync)(sessionPath, "utf8");
|
|
179
179
|
const parsed = JSON.parse(raw);
|
|
180
180
|
const store = normalizeStore(parsed);
|
|
181
181
|
return { sessionPath, store };
|
|
@@ -265,12 +265,12 @@ function resolveReadApp(store, options) {
|
|
|
265
265
|
}
|
|
266
266
|
function writeSessionStore(store) {
|
|
267
267
|
const sessionPath = buildSessionStorePath();
|
|
268
|
-
(0,
|
|
269
|
-
(0,
|
|
268
|
+
(0, import_node_fs4.mkdirSync)(import_node_path5.default.dirname(sessionPath), { recursive: true });
|
|
269
|
+
(0, import_node_fs4.writeFileSync)(sessionPath, JSON.stringify(store, null, 2), {
|
|
270
270
|
mode: 384
|
|
271
271
|
});
|
|
272
272
|
try {
|
|
273
|
-
(0,
|
|
273
|
+
(0, import_node_fs4.chmodSync)(sessionPath, 384);
|
|
274
274
|
} catch {
|
|
275
275
|
}
|
|
276
276
|
}
|
|
@@ -280,194 +280,194 @@ function buildMissingSessionMessage(sessionPath, app) {
|
|
|
280
280
|
}
|
|
281
281
|
return `Missing session for app ${app} in ${sessionPath}. Run "pmate login --app ${app}" first.`;
|
|
282
282
|
}
|
|
283
|
-
var
|
|
283
|
+
var import_node_fs4, import_node_os4, import_node_path5, DEFAULT_APP_ID, SESSION_STORE_VERSION;
|
|
284
284
|
var init_sessionStore = __esm({
|
|
285
285
|
"src/sessionStore.ts"() {
|
|
286
286
|
"use strict";
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
287
|
+
import_node_fs4 = require("fs");
|
|
288
|
+
import_node_os4 = __toESM(require("os"));
|
|
289
|
+
import_node_path5 = __toESM(require("path"));
|
|
290
290
|
init_namespacedRef();
|
|
291
291
|
DEFAULT_APP_ID = "pmate:factory";
|
|
292
292
|
SESSION_STORE_VERSION = 4;
|
|
293
293
|
}
|
|
294
294
|
});
|
|
295
295
|
|
|
296
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/account.types.ts
|
|
296
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/account.types.ts
|
|
297
297
|
var init_account_types = __esm({
|
|
298
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/account.types.ts"() {
|
|
298
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/account.types.ts"() {
|
|
299
299
|
"use strict";
|
|
300
300
|
}
|
|
301
301
|
});
|
|
302
302
|
|
|
303
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/achievements.types.ts
|
|
303
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/achievements.types.ts
|
|
304
304
|
var init_achievements_types = __esm({
|
|
305
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/achievements.types.ts"() {
|
|
305
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/achievements.types.ts"() {
|
|
306
306
|
"use strict";
|
|
307
307
|
}
|
|
308
308
|
});
|
|
309
309
|
|
|
310
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/aigen.types.ts
|
|
310
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/aigen.types.ts
|
|
311
311
|
var init_aigen_types = __esm({
|
|
312
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/aigen.types.ts"() {
|
|
312
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/aigen.types.ts"() {
|
|
313
313
|
"use strict";
|
|
314
314
|
}
|
|
315
315
|
});
|
|
316
316
|
|
|
317
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/agent.types.ts
|
|
317
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/agent.types.ts
|
|
318
318
|
var init_agent_types = __esm({
|
|
319
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/agent.types.ts"() {
|
|
319
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/agent.types.ts"() {
|
|
320
320
|
"use strict";
|
|
321
321
|
}
|
|
322
322
|
});
|
|
323
323
|
|
|
324
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/agent-registry.types.ts
|
|
324
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/agent-registry.types.ts
|
|
325
325
|
var init_agent_registry_types = __esm({
|
|
326
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/agent-registry.types.ts"() {
|
|
326
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/agent-registry.types.ts"() {
|
|
327
327
|
"use strict";
|
|
328
328
|
}
|
|
329
329
|
});
|
|
330
330
|
|
|
331
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/runner-registry.types.ts
|
|
331
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/runner-registry.types.ts
|
|
332
332
|
var init_runner_registry_types = __esm({
|
|
333
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/runner-registry.types.ts"() {
|
|
333
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/runner-registry.types.ts"() {
|
|
334
334
|
"use strict";
|
|
335
335
|
}
|
|
336
336
|
});
|
|
337
337
|
|
|
338
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/function-registry.types.ts
|
|
338
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/function-registry.types.ts
|
|
339
339
|
var init_function_registry_types = __esm({
|
|
340
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/function-registry.types.ts"() {
|
|
340
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/function-registry.types.ts"() {
|
|
341
341
|
"use strict";
|
|
342
342
|
}
|
|
343
343
|
});
|
|
344
344
|
|
|
345
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/worker-registry.types.ts
|
|
345
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/worker-registry.types.ts
|
|
346
346
|
var init_worker_registry_types = __esm({
|
|
347
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/worker-registry.types.ts"() {
|
|
347
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/worker-registry.types.ts"() {
|
|
348
348
|
"use strict";
|
|
349
349
|
}
|
|
350
350
|
});
|
|
351
351
|
|
|
352
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/call.types.ts
|
|
352
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/call.types.ts
|
|
353
353
|
var init_call_types = __esm({
|
|
354
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/call.types.ts"() {
|
|
354
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/call.types.ts"() {
|
|
355
355
|
"use strict";
|
|
356
356
|
}
|
|
357
357
|
});
|
|
358
358
|
|
|
359
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/blockchain.types.ts
|
|
359
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/blockchain.types.ts
|
|
360
360
|
var init_blockchain_types = __esm({
|
|
361
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/blockchain.types.ts"() {
|
|
361
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/blockchain.types.ts"() {
|
|
362
362
|
"use strict";
|
|
363
363
|
}
|
|
364
364
|
});
|
|
365
365
|
|
|
366
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/breakdown.types.ts
|
|
366
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/breakdown.types.ts
|
|
367
367
|
var init_breakdown_types = __esm({
|
|
368
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/breakdown.types.ts"() {
|
|
368
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/breakdown.types.ts"() {
|
|
369
369
|
"use strict";
|
|
370
370
|
}
|
|
371
371
|
});
|
|
372
372
|
|
|
373
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/chat.types.ts
|
|
373
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/chat.types.ts
|
|
374
374
|
var init_chat_types = __esm({
|
|
375
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/chat.types.ts"() {
|
|
375
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/chat.types.ts"() {
|
|
376
376
|
"use strict";
|
|
377
377
|
}
|
|
378
378
|
});
|
|
379
379
|
|
|
380
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/companion.types.ts
|
|
380
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/companion.types.ts
|
|
381
381
|
var init_companion_types = __esm({
|
|
382
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/companion.types.ts"() {
|
|
382
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/companion.types.ts"() {
|
|
383
383
|
"use strict";
|
|
384
384
|
}
|
|
385
385
|
});
|
|
386
386
|
|
|
387
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/enums.ts
|
|
387
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/enums.ts
|
|
388
388
|
var init_enums = __esm({
|
|
389
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/enums.ts"() {
|
|
389
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/enums.ts"() {
|
|
390
390
|
"use strict";
|
|
391
391
|
}
|
|
392
392
|
});
|
|
393
393
|
|
|
394
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/lang.types.ts
|
|
394
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/lang.types.ts
|
|
395
395
|
var init_lang_types = __esm({
|
|
396
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/lang.types.ts"() {
|
|
396
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/lang.types.ts"() {
|
|
397
397
|
"use strict";
|
|
398
398
|
}
|
|
399
399
|
});
|
|
400
400
|
|
|
401
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/logs.types.ts
|
|
401
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/logs.types.ts
|
|
402
402
|
var init_logs_types = __esm({
|
|
403
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/logs.types.ts"() {
|
|
403
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/logs.types.ts"() {
|
|
404
404
|
"use strict";
|
|
405
405
|
}
|
|
406
406
|
});
|
|
407
407
|
|
|
408
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/message.types.ts
|
|
408
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/message.types.ts
|
|
409
409
|
var PING, PONG;
|
|
410
410
|
var init_message_types = __esm({
|
|
411
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/message.types.ts"() {
|
|
411
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/message.types.ts"() {
|
|
412
412
|
"use strict";
|
|
413
413
|
PING = 1;
|
|
414
414
|
PONG = 2;
|
|
415
415
|
}
|
|
416
416
|
});
|
|
417
417
|
|
|
418
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/newLog.types.ts
|
|
418
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/newLog.types.ts
|
|
419
419
|
var init_newLog_types = __esm({
|
|
420
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/newLog.types.ts"() {
|
|
420
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/newLog.types.ts"() {
|
|
421
421
|
"use strict";
|
|
422
422
|
}
|
|
423
423
|
});
|
|
424
424
|
|
|
425
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/novel.types.ts
|
|
425
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/novel.types.ts
|
|
426
426
|
var init_novel_types = __esm({
|
|
427
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/novel.types.ts"() {
|
|
427
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/novel.types.ts"() {
|
|
428
428
|
"use strict";
|
|
429
429
|
}
|
|
430
430
|
});
|
|
431
431
|
|
|
432
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/offline.types.ts
|
|
432
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/offline.types.ts
|
|
433
433
|
var init_offline_types = __esm({
|
|
434
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/offline.types.ts"() {
|
|
434
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/offline.types.ts"() {
|
|
435
435
|
"use strict";
|
|
436
436
|
}
|
|
437
437
|
});
|
|
438
438
|
|
|
439
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/prompt.types.ts
|
|
439
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/prompt.types.ts
|
|
440
440
|
var init_prompt_types = __esm({
|
|
441
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/prompt.types.ts"() {
|
|
441
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/prompt.types.ts"() {
|
|
442
442
|
"use strict";
|
|
443
443
|
}
|
|
444
444
|
});
|
|
445
445
|
|
|
446
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/reading.types.ts
|
|
446
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/reading.types.ts
|
|
447
447
|
var init_reading_types = __esm({
|
|
448
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/reading.types.ts"() {
|
|
448
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/reading.types.ts"() {
|
|
449
449
|
"use strict";
|
|
450
450
|
}
|
|
451
451
|
});
|
|
452
452
|
|
|
453
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/settings.types.ts
|
|
453
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/settings.types.ts
|
|
454
454
|
var init_settings_types = __esm({
|
|
455
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/settings.types.ts"() {
|
|
455
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/settings.types.ts"() {
|
|
456
456
|
"use strict";
|
|
457
457
|
}
|
|
458
458
|
});
|
|
459
459
|
|
|
460
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/subscription.types.ts
|
|
460
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/subscription.types.ts
|
|
461
461
|
var init_subscription_types = __esm({
|
|
462
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/subscription.types.ts"() {
|
|
462
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/subscription.types.ts"() {
|
|
463
463
|
"use strict";
|
|
464
464
|
}
|
|
465
465
|
});
|
|
466
466
|
|
|
467
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/types.ts
|
|
467
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/types.ts
|
|
468
468
|
var buildVoiceKey, createVoice;
|
|
469
469
|
var init_types = __esm({
|
|
470
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/types.ts"() {
|
|
470
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/types.ts"() {
|
|
471
471
|
"use strict";
|
|
472
472
|
buildVoiceKey = (provider, name) => {
|
|
473
473
|
return `${provider}:${name}`;
|
|
@@ -489,44 +489,44 @@ var init_types = __esm({
|
|
|
489
489
|
}
|
|
490
490
|
});
|
|
491
491
|
|
|
492
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/wordv5.def.ts
|
|
492
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/wordv5.def.ts
|
|
493
493
|
var init_wordv5_def = __esm({
|
|
494
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/wordv5.def.ts"() {
|
|
494
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/wordv5.def.ts"() {
|
|
495
495
|
"use strict";
|
|
496
496
|
}
|
|
497
497
|
});
|
|
498
498
|
|
|
499
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/auth.types.ts
|
|
499
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/auth.types.ts
|
|
500
500
|
var init_auth_types = __esm({
|
|
501
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/auth.types.ts"() {
|
|
501
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/auth.types.ts"() {
|
|
502
502
|
"use strict";
|
|
503
503
|
}
|
|
504
504
|
});
|
|
505
505
|
|
|
506
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/apps.types.ts
|
|
506
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/apps.types.ts
|
|
507
507
|
var init_apps_types = __esm({
|
|
508
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/apps.types.ts"() {
|
|
508
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/apps.types.ts"() {
|
|
509
509
|
"use strict";
|
|
510
510
|
}
|
|
511
511
|
});
|
|
512
512
|
|
|
513
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/response.types.ts
|
|
513
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/response.types.ts
|
|
514
514
|
var init_response_types = __esm({
|
|
515
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/response.types.ts"() {
|
|
515
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/response.types.ts"() {
|
|
516
516
|
"use strict";
|
|
517
517
|
}
|
|
518
518
|
});
|
|
519
519
|
|
|
520
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/role.types.ts
|
|
520
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/role.types.ts
|
|
521
521
|
var init_role_types = __esm({
|
|
522
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/role.types.ts"() {
|
|
522
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/role.types.ts"() {
|
|
523
523
|
"use strict";
|
|
524
524
|
}
|
|
525
525
|
});
|
|
526
526
|
|
|
527
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/index.ts
|
|
527
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/index.ts
|
|
528
528
|
var init_types2 = __esm({
|
|
529
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/index.ts"() {
|
|
529
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/types/index.ts"() {
|
|
530
530
|
"use strict";
|
|
531
531
|
init_account_types();
|
|
532
532
|
init_achievements_types();
|
|
@@ -561,24 +561,24 @@ var init_types2 = __esm({
|
|
|
561
561
|
}
|
|
562
562
|
});
|
|
563
563
|
|
|
564
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/BizErrorCode.ts
|
|
564
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/BizErrorCode.ts
|
|
565
565
|
var init_BizErrorCode = __esm({
|
|
566
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/BizErrorCode.ts"() {
|
|
566
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/BizErrorCode.ts"() {
|
|
567
567
|
"use strict";
|
|
568
568
|
}
|
|
569
569
|
});
|
|
570
570
|
|
|
571
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/consts.ts
|
|
571
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/consts.ts
|
|
572
572
|
var init_consts = __esm({
|
|
573
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/consts.ts"() {
|
|
573
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/consts.ts"() {
|
|
574
574
|
"use strict";
|
|
575
575
|
}
|
|
576
576
|
});
|
|
577
577
|
|
|
578
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/TopicNames.ts
|
|
578
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/TopicNames.ts
|
|
579
579
|
var TopicNames, topicKindMatchers;
|
|
580
580
|
var init_TopicNames = __esm({
|
|
581
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/TopicNames.ts"() {
|
|
581
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/TopicNames.ts"() {
|
|
582
582
|
"use strict";
|
|
583
583
|
init_types2();
|
|
584
584
|
TopicNames = class _TopicNames {
|
|
@@ -664,18 +664,18 @@ var init_TopicNames = __esm({
|
|
|
664
664
|
}
|
|
665
665
|
});
|
|
666
666
|
|
|
667
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/OSSKeys.ts
|
|
667
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/OSSKeys.ts
|
|
668
668
|
var init_OSSKeys = __esm({
|
|
669
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/OSSKeys.ts"() {
|
|
669
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/OSSKeys.ts"() {
|
|
670
670
|
"use strict";
|
|
671
671
|
init_consts();
|
|
672
672
|
}
|
|
673
673
|
});
|
|
674
674
|
|
|
675
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/CompanionProfiles.ts
|
|
675
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/CompanionProfiles.ts
|
|
676
676
|
var openAICoral, openAIAsh, openAIBallad, openAINova, openAIVerse;
|
|
677
677
|
var init_CompanionProfiles = __esm({
|
|
678
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/CompanionProfiles.ts"() {
|
|
678
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/CompanionProfiles.ts"() {
|
|
679
679
|
"use strict";
|
|
680
680
|
init_types2();
|
|
681
681
|
openAICoral = createVoice({
|
|
@@ -710,9 +710,9 @@ var init_CompanionProfiles = __esm({
|
|
|
710
710
|
}
|
|
711
711
|
});
|
|
712
712
|
|
|
713
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/index.ts
|
|
713
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/index.ts
|
|
714
714
|
var init_config = __esm({
|
|
715
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/index.ts"() {
|
|
715
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/config/index.ts"() {
|
|
716
716
|
"use strict";
|
|
717
717
|
init_BizErrorCode();
|
|
718
718
|
init_consts();
|
|
@@ -722,83 +722,83 @@ var init_config = __esm({
|
|
|
722
722
|
}
|
|
723
723
|
});
|
|
724
724
|
|
|
725
|
-
// node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/index.ts
|
|
725
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/index.ts
|
|
726
726
|
var init_src = __esm({
|
|
727
|
-
"node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/index.ts"() {
|
|
727
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+meta@1.3.1/node_modules/@pmate/meta/src/index.ts"() {
|
|
728
728
|
"use strict";
|
|
729
729
|
init_types2();
|
|
730
730
|
init_config();
|
|
731
731
|
}
|
|
732
732
|
});
|
|
733
733
|
|
|
734
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/base64.ts
|
|
734
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/base64.ts
|
|
735
735
|
var init_base64 = __esm({
|
|
736
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/base64.ts"() {
|
|
736
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/base64.ts"() {
|
|
737
737
|
"use strict";
|
|
738
738
|
}
|
|
739
739
|
});
|
|
740
740
|
|
|
741
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Cache.ts
|
|
741
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Cache.ts
|
|
742
742
|
var init_Cache = __esm({
|
|
743
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Cache.ts"() {
|
|
743
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Cache.ts"() {
|
|
744
744
|
"use strict";
|
|
745
745
|
}
|
|
746
746
|
});
|
|
747
747
|
|
|
748
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/batchResolve.ts
|
|
748
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/batchResolve.ts
|
|
749
749
|
var init_batchResolve = __esm({
|
|
750
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/batchResolve.ts"() {
|
|
750
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/batchResolve.ts"() {
|
|
751
751
|
"use strict";
|
|
752
752
|
init_Cache();
|
|
753
753
|
}
|
|
754
754
|
});
|
|
755
755
|
|
|
756
|
-
// node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/cn/sentenceSpliter.ts
|
|
756
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/cn/sentenceSpliter.ts
|
|
757
757
|
var init_sentenceSpliter = __esm({
|
|
758
|
-
"node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/cn/sentenceSpliter.ts"() {
|
|
758
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/cn/sentenceSpliter.ts"() {
|
|
759
759
|
"use strict";
|
|
760
760
|
}
|
|
761
761
|
});
|
|
762
762
|
|
|
763
|
-
// node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/cn/sentenceTrim.ts
|
|
763
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/cn/sentenceTrim.ts
|
|
764
764
|
var init_sentenceTrim = __esm({
|
|
765
|
-
"node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/cn/sentenceTrim.ts"() {
|
|
765
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/cn/sentenceTrim.ts"() {
|
|
766
766
|
"use strict";
|
|
767
767
|
}
|
|
768
768
|
});
|
|
769
769
|
|
|
770
|
-
// node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/cn/wordSpliter.ts
|
|
770
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/cn/wordSpliter.ts
|
|
771
771
|
var init_wordSpliter = __esm({
|
|
772
|
-
"node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/cn/wordSpliter.ts"() {
|
|
772
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/cn/wordSpliter.ts"() {
|
|
773
773
|
"use strict";
|
|
774
774
|
}
|
|
775
775
|
});
|
|
776
776
|
|
|
777
|
-
// node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/en/regex.ts
|
|
777
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/en/regex.ts
|
|
778
778
|
var init_regex = __esm({
|
|
779
|
-
"node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/en/regex.ts"() {
|
|
779
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/en/regex.ts"() {
|
|
780
780
|
"use strict";
|
|
781
781
|
}
|
|
782
782
|
});
|
|
783
783
|
|
|
784
|
-
// node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/en/sentenceSpliter.ts
|
|
784
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/en/sentenceSpliter.ts
|
|
785
785
|
var init_sentenceSpliter2 = __esm({
|
|
786
|
-
"node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/en/sentenceSpliter.ts"() {
|
|
786
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/en/sentenceSpliter.ts"() {
|
|
787
787
|
"use strict";
|
|
788
788
|
}
|
|
789
789
|
});
|
|
790
790
|
|
|
791
|
-
// node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/en/sentenceTrim.ts
|
|
791
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/en/sentenceTrim.ts
|
|
792
792
|
var init_sentenceTrim2 = __esm({
|
|
793
|
-
"node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/en/sentenceTrim.ts"() {
|
|
793
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/en/sentenceTrim.ts"() {
|
|
794
794
|
"use strict";
|
|
795
795
|
}
|
|
796
796
|
});
|
|
797
797
|
|
|
798
|
-
// node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/en/wordSpliter.ts
|
|
798
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/en/wordSpliter.ts
|
|
799
799
|
var regex;
|
|
800
800
|
var init_wordSpliter2 = __esm({
|
|
801
|
-
"node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/en/wordSpliter.ts"() {
|
|
801
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/en/wordSpliter.ts"() {
|
|
802
802
|
"use strict";
|
|
803
803
|
regex = new RegExp(
|
|
804
804
|
[
|
|
@@ -834,23 +834,23 @@ var init_wordSpliter2 = __esm({
|
|
|
834
834
|
}
|
|
835
835
|
});
|
|
836
836
|
|
|
837
|
-
// node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/kr/sentenceSpliter.ts
|
|
837
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/kr/sentenceSpliter.ts
|
|
838
838
|
var init_sentenceSpliter3 = __esm({
|
|
839
|
-
"node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/kr/sentenceSpliter.ts"() {
|
|
839
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/kr/sentenceSpliter.ts"() {
|
|
840
840
|
"use strict";
|
|
841
841
|
}
|
|
842
842
|
});
|
|
843
843
|
|
|
844
|
-
// node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/kr/wordSpliter.ts
|
|
844
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/kr/wordSpliter.ts
|
|
845
845
|
var init_wordSpliter3 = __esm({
|
|
846
|
-
"node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/kr/wordSpliter.ts"() {
|
|
846
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/kr/wordSpliter.ts"() {
|
|
847
847
|
"use strict";
|
|
848
848
|
}
|
|
849
849
|
});
|
|
850
850
|
|
|
851
|
-
// node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/readingSettings.ts
|
|
851
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/readingSettings.ts
|
|
852
852
|
var init_readingSettings = __esm({
|
|
853
|
-
"node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/readingSettings.ts"() {
|
|
853
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/readingSettings.ts"() {
|
|
854
854
|
"use strict";
|
|
855
855
|
init_sentenceSpliter();
|
|
856
856
|
init_wordSpliter();
|
|
@@ -861,17 +861,17 @@ var init_readingSettings = __esm({
|
|
|
861
861
|
}
|
|
862
862
|
});
|
|
863
863
|
|
|
864
|
-
// node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/utils.ts
|
|
864
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/utils.ts
|
|
865
865
|
var init_utils = __esm({
|
|
866
|
-
"node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/utils.ts"() {
|
|
866
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/utils.ts"() {
|
|
867
867
|
"use strict";
|
|
868
868
|
init_src();
|
|
869
869
|
}
|
|
870
870
|
});
|
|
871
871
|
|
|
872
|
-
// node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/index.ts
|
|
872
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/index.ts
|
|
873
873
|
var init_src2 = __esm({
|
|
874
|
-
"node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/index.ts"() {
|
|
874
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+lang@1.0.4/node_modules/@pmate/lang/src/index.ts"() {
|
|
875
875
|
"use strict";
|
|
876
876
|
init_sentenceSpliter();
|
|
877
877
|
init_sentenceTrim();
|
|
@@ -887,32 +887,32 @@ var init_src2 = __esm({
|
|
|
887
887
|
}
|
|
888
888
|
});
|
|
889
889
|
|
|
890
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/bookStats.ts
|
|
890
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/bookStats.ts
|
|
891
891
|
var init_bookStats = __esm({
|
|
892
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/bookStats.ts"() {
|
|
892
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/bookStats.ts"() {
|
|
893
893
|
"use strict";
|
|
894
894
|
init_src2();
|
|
895
895
|
}
|
|
896
896
|
});
|
|
897
897
|
|
|
898
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/BoundedConcurrentQueue.ts
|
|
898
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/BoundedConcurrentQueue.ts
|
|
899
899
|
var init_BoundedConcurrentQueue = __esm({
|
|
900
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/BoundedConcurrentQueue.ts"() {
|
|
900
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/BoundedConcurrentQueue.ts"() {
|
|
901
901
|
"use strict";
|
|
902
902
|
}
|
|
903
903
|
});
|
|
904
904
|
|
|
905
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/lru.ts
|
|
905
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/lru.ts
|
|
906
906
|
var init_lru = __esm({
|
|
907
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/lru.ts"() {
|
|
907
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/lru.ts"() {
|
|
908
908
|
"use strict";
|
|
909
909
|
init_Cache();
|
|
910
910
|
}
|
|
911
911
|
});
|
|
912
912
|
|
|
913
|
-
// node_modules/.pnpm/js-sha3@0.9.3/node_modules/js-sha3/src/sha3.js
|
|
913
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/js-sha3@0.9.3/node_modules/js-sha3/src/sha3.js
|
|
914
914
|
var require_sha3 = __commonJS({
|
|
915
|
-
"node_modules/.pnpm/js-sha3@0.9.3/node_modules/js-sha3/src/sha3.js"(exports2, module2) {
|
|
915
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/js-sha3@0.9.3/node_modules/js-sha3/src/sha3.js"(exports2, module2) {
|
|
916
916
|
"use strict";
|
|
917
917
|
(function() {
|
|
918
918
|
"use strict";
|
|
@@ -1557,24 +1557,24 @@ var require_sha3 = __commonJS({
|
|
|
1557
1557
|
}
|
|
1558
1558
|
});
|
|
1559
1559
|
|
|
1560
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Maybe.ts
|
|
1560
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Maybe.ts
|
|
1561
1561
|
var init_Maybe = __esm({
|
|
1562
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Maybe.ts"() {
|
|
1562
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Maybe.ts"() {
|
|
1563
1563
|
"use strict";
|
|
1564
1564
|
}
|
|
1565
1565
|
});
|
|
1566
1566
|
|
|
1567
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/cacheMethodInMem.ts
|
|
1567
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/cacheMethodInMem.ts
|
|
1568
1568
|
var import_js_sha3;
|
|
1569
1569
|
var init_cacheMethodInMem = __esm({
|
|
1570
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/cacheMethodInMem.ts"() {
|
|
1570
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/cacheMethodInMem.ts"() {
|
|
1571
1571
|
"use strict";
|
|
1572
1572
|
import_js_sha3 = __toESM(require_sha3(), 1);
|
|
1573
1573
|
init_Maybe();
|
|
1574
1574
|
}
|
|
1575
1575
|
});
|
|
1576
1576
|
|
|
1577
|
-
// node_modules/.pnpm/pako@2.1.0/node_modules/pako/dist/pako.esm.mjs
|
|
1577
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/pako@2.1.0/node_modules/pako/dist/pako.esm.mjs
|
|
1578
1578
|
function zero$1(buf) {
|
|
1579
1579
|
let len = buf.length;
|
|
1580
1580
|
while (--len >= 0) {
|
|
@@ -1862,7 +1862,7 @@ function inflateRaw$1(input, options) {
|
|
|
1862
1862
|
}
|
|
1863
1863
|
var Z_FIXED$1, Z_BINARY, Z_TEXT, Z_UNKNOWN$1, STORED_BLOCK, STATIC_TREES, DYN_TREES, MIN_MATCH$1, MAX_MATCH$1, LENGTH_CODES$1, LITERALS$1, L_CODES$1, D_CODES$1, BL_CODES$1, HEAP_SIZE$1, MAX_BITS$1, Buf_size, MAX_BL_BITS, END_BLOCK, REP_3_6, REPZ_3_10, REPZ_11_138, extra_lbits, extra_dbits, extra_blbits, bl_order, DIST_CODE_LEN, static_ltree, static_dtree, _dist_code, _length_code, base_length, base_dist, static_l_desc, static_d_desc, static_bl_desc, d_code, put_short, send_bits, send_code, bi_reverse, bi_flush, gen_bitlen, gen_codes, tr_static_init, init_block, bi_windup, smaller, pqdownheap, compress_block, build_tree, scan_tree, send_tree, build_bl_tree, send_all_trees, detect_data_type, static_init_done, _tr_init$1, _tr_stored_block$1, _tr_align$1, _tr_flush_block$1, _tr_tally$1, _tr_init_1, _tr_stored_block_1, _tr_flush_block_1, _tr_tally_1, _tr_align_1, trees, adler32, adler32_1, makeTable, crcTable, crc32, crc32_1, messages, constants$2, _tr_init, _tr_stored_block, _tr_flush_block, _tr_tally, _tr_align, Z_NO_FLUSH$2, Z_PARTIAL_FLUSH, Z_FULL_FLUSH$1, Z_FINISH$3, Z_BLOCK$1, Z_OK$3, Z_STREAM_END$3, Z_STREAM_ERROR$2, Z_DATA_ERROR$2, Z_BUF_ERROR$1, Z_DEFAULT_COMPRESSION$1, Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, Z_FIXED, Z_DEFAULT_STRATEGY$1, Z_UNKNOWN, Z_DEFLATED$2, MAX_MEM_LEVEL, MAX_WBITS$1, DEF_MEM_LEVEL, LENGTH_CODES, LITERALS, L_CODES, D_CODES, BL_CODES, HEAP_SIZE, MAX_BITS, MIN_MATCH, MAX_MATCH, MIN_LOOKAHEAD, PRESET_DICT, INIT_STATE, GZIP_STATE, EXTRA_STATE, NAME_STATE, COMMENT_STATE, HCRC_STATE, BUSY_STATE, FINISH_STATE, BS_NEED_MORE, BS_BLOCK_DONE, BS_FINISH_STARTED, BS_FINISH_DONE, OS_CODE, err, rank, zero, slide_hash, HASH_ZLIB, HASH, flush_pending, flush_block_only, put_byte, putShortMSB, read_buf, longest_match, fill_window, deflate_stored, deflate_fast, deflate_slow, deflate_rle, deflate_huff, configuration_table, lm_init, deflateStateCheck, deflateResetKeep, deflateReset, deflateSetHeader, deflateInit2, deflateInit, deflate$2, deflateEnd, deflateSetDictionary, deflateInit_1, deflateInit2_1, deflateReset_1, deflateResetKeep_1, deflateSetHeader_1, deflate_2$1, deflateEnd_1, deflateSetDictionary_1, deflateInfo, deflate_1$2, _has, assign, flattenChunks, common, STR_APPLY_UIA_OK, _utf8len, string2buf, buf2binstring, buf2string, utf8border, strings, zstream, toString$1, Z_NO_FLUSH$1, Z_SYNC_FLUSH, Z_FULL_FLUSH, Z_FINISH$2, Z_OK$2, Z_STREAM_END$2, Z_DEFAULT_COMPRESSION, Z_DEFAULT_STRATEGY, Z_DEFLATED$1, Deflate_1$1, deflate_2, deflateRaw_1$1, gzip_1$1, constants$1, deflate_1$1, BAD$1, TYPE$1, inffast, MAXBITS, ENOUGH_LENS$1, ENOUGH_DISTS$1, CODES$1, LENS$1, DISTS$1, lbase, lext, dbase, dext, inflate_table, inftrees, CODES, LENS, DISTS, Z_FINISH$1, Z_BLOCK, Z_TREES, Z_OK$1, Z_STREAM_END$1, Z_NEED_DICT$1, Z_STREAM_ERROR$1, Z_DATA_ERROR$1, Z_MEM_ERROR$1, Z_BUF_ERROR, Z_DEFLATED, HEAD, FLAGS, TIME, OS, EXLEN, EXTRA, NAME, COMMENT, HCRC, DICTID, DICT, TYPE, TYPEDO, STORED, COPY_, COPY, TABLE, LENLENS, CODELENS, LEN_, LEN, LENEXT, DIST, DISTEXT, MATCH, LIT, CHECK, LENGTH, DONE, BAD, MEM, SYNC, ENOUGH_LENS, ENOUGH_DISTS, MAX_WBITS, DEF_WBITS, zswap32, inflateStateCheck, inflateResetKeep, inflateReset, inflateReset2, inflateInit2, inflateInit, virgin, lenfix, distfix, fixedtables, updatewindow, inflate$2, inflateEnd, inflateGetHeader, inflateSetDictionary, inflateReset_1, inflateReset2_1, inflateResetKeep_1, inflateInit_1, inflateInit2_1, inflate_2$1, inflateEnd_1, inflateGetHeader_1, inflateSetDictionary_1, inflateInfo, inflate_1$2, gzheader, toString, Z_NO_FLUSH, Z_FINISH, Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR, Inflate_1$1, inflate_2, inflateRaw_1$1, ungzip$1, constants, inflate_1$1, Deflate, deflate, deflateRaw, gzip, Inflate, inflate, inflateRaw, ungzip, gzip_1;
|
|
1864
1864
|
var init_pako_esm = __esm({
|
|
1865
|
-
"node_modules/.pnpm/pako@2.1.0/node_modules/pako/dist/pako.esm.mjs"() {
|
|
1865
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/pako@2.1.0/node_modules/pako/dist/pako.esm.mjs"() {
|
|
1866
1866
|
"use strict";
|
|
1867
1867
|
Z_FIXED$1 = 4;
|
|
1868
1868
|
Z_BINARY = 0;
|
|
@@ -5743,7 +5743,7 @@ var init_pako_esm = __esm({
|
|
|
5743
5743
|
}
|
|
5744
5744
|
});
|
|
5745
5745
|
|
|
5746
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/compress.ts
|
|
5746
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/compress.ts
|
|
5747
5747
|
async function gzipEncodeBlob(input) {
|
|
5748
5748
|
const array = await toUint8Array(input);
|
|
5749
5749
|
return gzip_1(array);
|
|
@@ -5769,16 +5769,16 @@ async function toUint8Array(input) {
|
|
|
5769
5769
|
throw new TypeError("Unsupported input type for gzipEncodeBlob");
|
|
5770
5770
|
}
|
|
5771
5771
|
var init_compress = __esm({
|
|
5772
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/compress.ts"() {
|
|
5772
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/compress.ts"() {
|
|
5773
5773
|
"use strict";
|
|
5774
5774
|
init_pako_esm();
|
|
5775
5775
|
}
|
|
5776
5776
|
});
|
|
5777
5777
|
|
|
5778
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/AsyncStream.ts
|
|
5778
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/AsyncStream.ts
|
|
5779
5779
|
var AsyncStream;
|
|
5780
5780
|
var init_AsyncStream = __esm({
|
|
5781
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/AsyncStream.ts"() {
|
|
5781
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/AsyncStream.ts"() {
|
|
5782
5782
|
"use strict";
|
|
5783
5783
|
AsyncStream = class _AsyncStream {
|
|
5784
5784
|
constructor() {
|
|
@@ -5966,10 +5966,10 @@ var init_AsyncStream = __esm({
|
|
|
5966
5966
|
}
|
|
5967
5967
|
});
|
|
5968
5968
|
|
|
5969
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/uniqHash.ts
|
|
5969
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/uniqHash.ts
|
|
5970
5970
|
var import_js_sha32, sortKeys, uniqHash;
|
|
5971
5971
|
var init_uniqHash = __esm({
|
|
5972
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/uniqHash.ts"() {
|
|
5972
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/uniqHash.ts"() {
|
|
5973
5973
|
"use strict";
|
|
5974
5974
|
init_src();
|
|
5975
5975
|
import_js_sha32 = __toESM(require_sha3(), 1);
|
|
@@ -5999,69 +5999,69 @@ var init_uniqHash = __esm({
|
|
|
5999
5999
|
}
|
|
6000
6000
|
});
|
|
6001
6001
|
|
|
6002
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/createMsg.ts
|
|
6002
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/createMsg.ts
|
|
6003
6003
|
var init_createMsg = __esm({
|
|
6004
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/createMsg.ts"() {
|
|
6004
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/createMsg.ts"() {
|
|
6005
6005
|
"use strict";
|
|
6006
6006
|
init_src();
|
|
6007
6007
|
init_uniqHash();
|
|
6008
6008
|
}
|
|
6009
6009
|
});
|
|
6010
6010
|
|
|
6011
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/detectText.ts
|
|
6011
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/detectText.ts
|
|
6012
6012
|
var init_detectText = __esm({
|
|
6013
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/detectText.ts"() {
|
|
6013
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/detectText.ts"() {
|
|
6014
6014
|
"use strict";
|
|
6015
6015
|
}
|
|
6016
6016
|
});
|
|
6017
6017
|
|
|
6018
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Emitter.ts
|
|
6018
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Emitter.ts
|
|
6019
6019
|
var init_Emitter = __esm({
|
|
6020
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Emitter.ts"() {
|
|
6020
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Emitter.ts"() {
|
|
6021
6021
|
"use strict";
|
|
6022
6022
|
}
|
|
6023
6023
|
});
|
|
6024
6024
|
|
|
6025
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/EmitterV2.ts
|
|
6025
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/EmitterV2.ts
|
|
6026
6026
|
var init_EmitterV2 = __esm({
|
|
6027
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/EmitterV2.ts"() {
|
|
6027
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/EmitterV2.ts"() {
|
|
6028
6028
|
"use strict";
|
|
6029
6029
|
}
|
|
6030
6030
|
});
|
|
6031
6031
|
|
|
6032
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/format/formatTime.ts
|
|
6032
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/format/formatTime.ts
|
|
6033
6033
|
var init_formatTime = __esm({
|
|
6034
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/format/formatTime.ts"() {
|
|
6034
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/format/formatTime.ts"() {
|
|
6035
6035
|
"use strict";
|
|
6036
6036
|
}
|
|
6037
6037
|
});
|
|
6038
6038
|
|
|
6039
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/format/index.ts
|
|
6039
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/format/index.ts
|
|
6040
6040
|
var init_format = __esm({
|
|
6041
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/format/index.ts"() {
|
|
6041
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/format/index.ts"() {
|
|
6042
6042
|
"use strict";
|
|
6043
6043
|
init_formatTime();
|
|
6044
6044
|
}
|
|
6045
6045
|
});
|
|
6046
6046
|
|
|
6047
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/isVolcabulary.ts
|
|
6047
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/isVolcabulary.ts
|
|
6048
6048
|
var init_isVolcabulary = __esm({
|
|
6049
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/isVolcabulary.ts"() {
|
|
6049
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/isVolcabulary.ts"() {
|
|
6050
6050
|
"use strict";
|
|
6051
6051
|
}
|
|
6052
6052
|
});
|
|
6053
6053
|
|
|
6054
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Loadable.ts
|
|
6054
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Loadable.ts
|
|
6055
6055
|
var init_Loadable = __esm({
|
|
6056
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Loadable.ts"() {
|
|
6056
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Loadable.ts"() {
|
|
6057
6057
|
"use strict";
|
|
6058
6058
|
}
|
|
6059
6059
|
});
|
|
6060
6060
|
|
|
6061
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Logger.ts
|
|
6061
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Logger.ts
|
|
6062
6062
|
var Logger;
|
|
6063
6063
|
var init_Logger = __esm({
|
|
6064
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Logger.ts"() {
|
|
6064
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Logger.ts"() {
|
|
6065
6065
|
"use strict";
|
|
6066
6066
|
Logger = class _Logger {
|
|
6067
6067
|
constructor(name) {
|
|
@@ -6086,21 +6086,21 @@ var init_Logger = __esm({
|
|
|
6086
6086
|
}
|
|
6087
6087
|
});
|
|
6088
6088
|
|
|
6089
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/mapToReadingBook.ts
|
|
6089
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/mapToReadingBook.ts
|
|
6090
6090
|
var init_mapToReadingBook = __esm({
|
|
6091
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/mapToReadingBook.ts"() {
|
|
6091
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/mapToReadingBook.ts"() {
|
|
6092
6092
|
"use strict";
|
|
6093
6093
|
}
|
|
6094
6094
|
});
|
|
6095
6095
|
|
|
6096
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/memoize.ts
|
|
6096
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/memoize.ts
|
|
6097
6097
|
var init_memoize = __esm({
|
|
6098
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/memoize.ts"() {
|
|
6098
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/memoize.ts"() {
|
|
6099
6099
|
"use strict";
|
|
6100
6100
|
}
|
|
6101
6101
|
});
|
|
6102
6102
|
|
|
6103
|
-
// node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/utils/utf8.mjs
|
|
6103
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/utils/utf8.mjs
|
|
6104
6104
|
function utf8Count(str) {
|
|
6105
6105
|
const strLength = str.length;
|
|
6106
6106
|
let byteLength = 0;
|
|
@@ -6227,7 +6227,7 @@ function utf8Decode(bytes, inputOffset, byteLength) {
|
|
|
6227
6227
|
}
|
|
6228
6228
|
var sharedTextEncoder, TEXT_ENCODER_THRESHOLD, CHUNK_SIZE, sharedTextDecoder, TEXT_DECODER_THRESHOLD;
|
|
6229
6229
|
var init_utf8 = __esm({
|
|
6230
|
-
"node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/utils/utf8.mjs"() {
|
|
6230
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/utils/utf8.mjs"() {
|
|
6231
6231
|
"use strict";
|
|
6232
6232
|
sharedTextEncoder = new TextEncoder();
|
|
6233
6233
|
TEXT_ENCODER_THRESHOLD = 50;
|
|
@@ -6237,10 +6237,10 @@ var init_utf8 = __esm({
|
|
|
6237
6237
|
}
|
|
6238
6238
|
});
|
|
6239
6239
|
|
|
6240
|
-
// node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/ExtData.mjs
|
|
6240
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/ExtData.mjs
|
|
6241
6241
|
var ExtData;
|
|
6242
6242
|
var init_ExtData = __esm({
|
|
6243
|
-
"node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/ExtData.mjs"() {
|
|
6243
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/ExtData.mjs"() {
|
|
6244
6244
|
"use strict";
|
|
6245
6245
|
ExtData = class {
|
|
6246
6246
|
type;
|
|
@@ -6253,10 +6253,10 @@ var init_ExtData = __esm({
|
|
|
6253
6253
|
}
|
|
6254
6254
|
});
|
|
6255
6255
|
|
|
6256
|
-
// node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/DecodeError.mjs
|
|
6256
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/DecodeError.mjs
|
|
6257
6257
|
var DecodeError;
|
|
6258
6258
|
var init_DecodeError = __esm({
|
|
6259
|
-
"node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/DecodeError.mjs"() {
|
|
6259
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/DecodeError.mjs"() {
|
|
6260
6260
|
"use strict";
|
|
6261
6261
|
DecodeError = class _DecodeError extends Error {
|
|
6262
6262
|
constructor(message) {
|
|
@@ -6273,7 +6273,7 @@ var init_DecodeError = __esm({
|
|
|
6273
6273
|
}
|
|
6274
6274
|
});
|
|
6275
6275
|
|
|
6276
|
-
// node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/utils/int.mjs
|
|
6276
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/utils/int.mjs
|
|
6277
6277
|
function setUint64(view, offset, value) {
|
|
6278
6278
|
const high = value / 4294967296;
|
|
6279
6279
|
const low = value;
|
|
@@ -6298,13 +6298,13 @@ function getUint64(view, offset) {
|
|
|
6298
6298
|
}
|
|
6299
6299
|
var UINT32_MAX;
|
|
6300
6300
|
var init_int = __esm({
|
|
6301
|
-
"node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/utils/int.mjs"() {
|
|
6301
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/utils/int.mjs"() {
|
|
6302
6302
|
"use strict";
|
|
6303
6303
|
UINT32_MAX = 4294967295;
|
|
6304
6304
|
}
|
|
6305
6305
|
});
|
|
6306
6306
|
|
|
6307
|
-
// node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/timestamp.mjs
|
|
6307
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/timestamp.mjs
|
|
6308
6308
|
function encodeTimeSpecToTimestamp({ sec, nsec }) {
|
|
6309
6309
|
if (sec >= 0 && nsec >= 0 && sec <= TIMESTAMP64_MAX_SEC) {
|
|
6310
6310
|
if (nsec === 0 && sec <= TIMESTAMP32_MAX_SEC) {
|
|
@@ -6377,7 +6377,7 @@ function decodeTimestampExtension(data) {
|
|
|
6377
6377
|
}
|
|
6378
6378
|
var EXT_TIMESTAMP, TIMESTAMP32_MAX_SEC, TIMESTAMP64_MAX_SEC, timestampExtension;
|
|
6379
6379
|
var init_timestamp = __esm({
|
|
6380
|
-
"node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/timestamp.mjs"() {
|
|
6380
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/timestamp.mjs"() {
|
|
6381
6381
|
"use strict";
|
|
6382
6382
|
init_DecodeError();
|
|
6383
6383
|
init_int();
|
|
@@ -6392,10 +6392,10 @@ var init_timestamp = __esm({
|
|
|
6392
6392
|
}
|
|
6393
6393
|
});
|
|
6394
6394
|
|
|
6395
|
-
// node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/ExtensionCodec.mjs
|
|
6395
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/ExtensionCodec.mjs
|
|
6396
6396
|
var ExtensionCodec;
|
|
6397
6397
|
var init_ExtensionCodec = __esm({
|
|
6398
|
-
"node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/ExtensionCodec.mjs"() {
|
|
6398
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/ExtensionCodec.mjs"() {
|
|
6399
6399
|
"use strict";
|
|
6400
6400
|
init_ExtData();
|
|
6401
6401
|
init_timestamp();
|
|
@@ -6462,7 +6462,7 @@ var init_ExtensionCodec = __esm({
|
|
|
6462
6462
|
}
|
|
6463
6463
|
});
|
|
6464
6464
|
|
|
6465
|
-
// node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/utils/typedArrays.mjs
|
|
6465
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/utils/typedArrays.mjs
|
|
6466
6466
|
function isArrayBufferLike(buffer) {
|
|
6467
6467
|
return buffer instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && buffer instanceof SharedArrayBuffer;
|
|
6468
6468
|
}
|
|
@@ -6478,15 +6478,15 @@ function ensureUint8Array(buffer) {
|
|
|
6478
6478
|
}
|
|
6479
6479
|
}
|
|
6480
6480
|
var init_typedArrays = __esm({
|
|
6481
|
-
"node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/utils/typedArrays.mjs"() {
|
|
6481
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/utils/typedArrays.mjs"() {
|
|
6482
6482
|
"use strict";
|
|
6483
6483
|
}
|
|
6484
6484
|
});
|
|
6485
6485
|
|
|
6486
|
-
// node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/Encoder.mjs
|
|
6486
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/Encoder.mjs
|
|
6487
6487
|
var DEFAULT_MAX_DEPTH, DEFAULT_INITIAL_BUFFER_SIZE, Encoder;
|
|
6488
6488
|
var init_Encoder = __esm({
|
|
6489
|
-
"node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/Encoder.mjs"() {
|
|
6489
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/Encoder.mjs"() {
|
|
6490
6490
|
"use strict";
|
|
6491
6491
|
init_utf8();
|
|
6492
6492
|
init_ExtensionCodec();
|
|
@@ -6896,32 +6896,32 @@ var init_Encoder = __esm({
|
|
|
6896
6896
|
}
|
|
6897
6897
|
});
|
|
6898
6898
|
|
|
6899
|
-
// node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/encode.mjs
|
|
6899
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/encode.mjs
|
|
6900
6900
|
function encode(value, options) {
|
|
6901
6901
|
const encoder2 = new Encoder(options);
|
|
6902
6902
|
return encoder2.encodeSharedRef(value);
|
|
6903
6903
|
}
|
|
6904
6904
|
var init_encode = __esm({
|
|
6905
|
-
"node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/encode.mjs"() {
|
|
6905
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/encode.mjs"() {
|
|
6906
6906
|
"use strict";
|
|
6907
6907
|
init_Encoder();
|
|
6908
6908
|
}
|
|
6909
6909
|
});
|
|
6910
6910
|
|
|
6911
|
-
// node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/utils/prettyByte.mjs
|
|
6911
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/utils/prettyByte.mjs
|
|
6912
6912
|
function prettyByte(byte) {
|
|
6913
6913
|
return `${byte < 0 ? "-" : ""}0x${Math.abs(byte).toString(16).padStart(2, "0")}`;
|
|
6914
6914
|
}
|
|
6915
6915
|
var init_prettyByte = __esm({
|
|
6916
|
-
"node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/utils/prettyByte.mjs"() {
|
|
6916
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/utils/prettyByte.mjs"() {
|
|
6917
6917
|
"use strict";
|
|
6918
6918
|
}
|
|
6919
6919
|
});
|
|
6920
6920
|
|
|
6921
|
-
// node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/CachedKeyDecoder.mjs
|
|
6921
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/CachedKeyDecoder.mjs
|
|
6922
6922
|
var DEFAULT_MAX_KEY_LENGTH, DEFAULT_MAX_LENGTH_PER_KEY, CachedKeyDecoder;
|
|
6923
6923
|
var init_CachedKeyDecoder = __esm({
|
|
6924
|
-
"node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/CachedKeyDecoder.mjs"() {
|
|
6924
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/CachedKeyDecoder.mjs"() {
|
|
6925
6925
|
"use strict";
|
|
6926
6926
|
init_utf8();
|
|
6927
6927
|
DEFAULT_MAX_KEY_LENGTH = 16;
|
|
@@ -6981,10 +6981,10 @@ var init_CachedKeyDecoder = __esm({
|
|
|
6981
6981
|
}
|
|
6982
6982
|
});
|
|
6983
6983
|
|
|
6984
|
-
// node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/Decoder.mjs
|
|
6984
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/Decoder.mjs
|
|
6985
6985
|
var STATE_ARRAY, STATE_MAP_KEY, STATE_MAP_VALUE, mapKeyConverter, StackPool, HEAD_BYTE_REQUIRED, EMPTY_VIEW, EMPTY_BYTES, MORE_DATA, sharedCachedKeyDecoder, Decoder;
|
|
6986
6986
|
var init_Decoder = __esm({
|
|
6987
|
-
"node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/Decoder.mjs"() {
|
|
6987
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/Decoder.mjs"() {
|
|
6988
6988
|
"use strict";
|
|
6989
6989
|
init_prettyByte();
|
|
6990
6990
|
init_ExtensionCodec();
|
|
@@ -7622,31 +7622,31 @@ var init_Decoder = __esm({
|
|
|
7622
7622
|
}
|
|
7623
7623
|
});
|
|
7624
7624
|
|
|
7625
|
-
// node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/decode.mjs
|
|
7625
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/decode.mjs
|
|
7626
7626
|
function decode(buffer, options) {
|
|
7627
7627
|
const decoder = new Decoder(options);
|
|
7628
7628
|
return decoder.decode(buffer);
|
|
7629
7629
|
}
|
|
7630
7630
|
var init_decode = __esm({
|
|
7631
|
-
"node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/decode.mjs"() {
|
|
7631
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/decode.mjs"() {
|
|
7632
7632
|
"use strict";
|
|
7633
7633
|
init_Decoder();
|
|
7634
7634
|
}
|
|
7635
7635
|
});
|
|
7636
7636
|
|
|
7637
|
-
// node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/index.mjs
|
|
7637
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/index.mjs
|
|
7638
7638
|
var init_dist = __esm({
|
|
7639
|
-
"node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/index.mjs"() {
|
|
7639
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@msgpack+msgpack@3.1.3/node_modules/@msgpack/msgpack/dist.esm/index.mjs"() {
|
|
7640
7640
|
"use strict";
|
|
7641
7641
|
init_encode();
|
|
7642
7642
|
init_decode();
|
|
7643
7643
|
}
|
|
7644
7644
|
});
|
|
7645
7645
|
|
|
7646
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Msg.ts
|
|
7646
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Msg.ts
|
|
7647
7647
|
var encoder, Msg;
|
|
7648
7648
|
var init_Msg = __esm({
|
|
7649
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Msg.ts"() {
|
|
7649
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/Msg.ts"() {
|
|
7650
7650
|
"use strict";
|
|
7651
7651
|
init_dist();
|
|
7652
7652
|
init_src();
|
|
@@ -7774,106 +7774,106 @@ var init_Msg = __esm({
|
|
|
7774
7774
|
}
|
|
7775
7775
|
});
|
|
7776
7776
|
|
|
7777
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/normalize.ts
|
|
7777
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/normalize.ts
|
|
7778
7778
|
var init_normalize = __esm({
|
|
7779
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/normalize.ts"() {
|
|
7779
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/normalize.ts"() {
|
|
7780
7780
|
"use strict";
|
|
7781
7781
|
}
|
|
7782
7782
|
});
|
|
7783
7783
|
|
|
7784
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/pageURL.ts
|
|
7784
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/pageURL.ts
|
|
7785
7785
|
var init_pageURL = __esm({
|
|
7786
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/pageURL.ts"() {
|
|
7786
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/pageURL.ts"() {
|
|
7787
7787
|
"use strict";
|
|
7788
7788
|
}
|
|
7789
7789
|
});
|
|
7790
7790
|
|
|
7791
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/PromiseQueue.ts
|
|
7791
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/PromiseQueue.ts
|
|
7792
7792
|
var init_PromiseQueue = __esm({
|
|
7793
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/PromiseQueue.ts"() {
|
|
7793
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/PromiseQueue.ts"() {
|
|
7794
7794
|
"use strict";
|
|
7795
7795
|
}
|
|
7796
7796
|
});
|
|
7797
7797
|
|
|
7798
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/resourceKey.ts
|
|
7798
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/resourceKey.ts
|
|
7799
7799
|
var import_js_sha33;
|
|
7800
7800
|
var init_resourceKey = __esm({
|
|
7801
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/resourceKey.ts"() {
|
|
7801
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/resourceKey.ts"() {
|
|
7802
7802
|
"use strict";
|
|
7803
7803
|
import_js_sha33 = __toESM(require_sha3(), 1);
|
|
7804
7804
|
}
|
|
7805
7805
|
});
|
|
7806
7806
|
|
|
7807
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/SelectionHelper.ts
|
|
7807
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/SelectionHelper.ts
|
|
7808
7808
|
var init_SelectionHelper = __esm({
|
|
7809
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/SelectionHelper.ts"() {
|
|
7809
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/SelectionHelper.ts"() {
|
|
7810
7810
|
"use strict";
|
|
7811
7811
|
}
|
|
7812
7812
|
});
|
|
7813
7813
|
|
|
7814
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/setMinus.ts
|
|
7814
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/setMinus.ts
|
|
7815
7815
|
var init_setMinus = __esm({
|
|
7816
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/setMinus.ts"() {
|
|
7816
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/setMinus.ts"() {
|
|
7817
7817
|
"use strict";
|
|
7818
7818
|
}
|
|
7819
7819
|
});
|
|
7820
7820
|
|
|
7821
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/sha1Hash.ts
|
|
7821
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/sha1Hash.ts
|
|
7822
7822
|
var init_sha1Hash = __esm({
|
|
7823
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/sha1Hash.ts"() {
|
|
7823
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/sha1Hash.ts"() {
|
|
7824
7824
|
"use strict";
|
|
7825
7825
|
}
|
|
7826
7826
|
});
|
|
7827
7827
|
|
|
7828
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/TaskWaiter.ts
|
|
7828
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/TaskWaiter.ts
|
|
7829
7829
|
var init_TaskWaiter = __esm({
|
|
7830
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/TaskWaiter.ts"() {
|
|
7830
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/TaskWaiter.ts"() {
|
|
7831
7831
|
"use strict";
|
|
7832
7832
|
init_src3();
|
|
7833
7833
|
}
|
|
7834
7834
|
});
|
|
7835
7835
|
|
|
7836
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/toSentenceAnalyze.ts
|
|
7836
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/toSentenceAnalyze.ts
|
|
7837
7837
|
var init_toSentenceAnalyze = __esm({
|
|
7838
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/toSentenceAnalyze.ts"() {
|
|
7838
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/toSentenceAnalyze.ts"() {
|
|
7839
7839
|
"use strict";
|
|
7840
7840
|
}
|
|
7841
7841
|
});
|
|
7842
7842
|
|
|
7843
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/txtBookToJson.ts
|
|
7843
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/txtBookToJson.ts
|
|
7844
7844
|
var init_txtBookToJson = __esm({
|
|
7845
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/txtBookToJson.ts"() {
|
|
7845
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/txtBookToJson.ts"() {
|
|
7846
7846
|
"use strict";
|
|
7847
7847
|
init_src2();
|
|
7848
7848
|
}
|
|
7849
7849
|
});
|
|
7850
7850
|
|
|
7851
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/VocabularyMap.ts
|
|
7851
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/VocabularyMap.ts
|
|
7852
7852
|
var init_VocabularyMap = __esm({
|
|
7853
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/VocabularyMap.ts"() {
|
|
7853
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/VocabularyMap.ts"() {
|
|
7854
7854
|
"use strict";
|
|
7855
7855
|
init_Emitter();
|
|
7856
7856
|
}
|
|
7857
7857
|
});
|
|
7858
7858
|
|
|
7859
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/wait.ts
|
|
7859
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/wait.ts
|
|
7860
7860
|
var init_wait = __esm({
|
|
7861
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/wait.ts"() {
|
|
7861
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/wait.ts"() {
|
|
7862
7862
|
"use strict";
|
|
7863
7863
|
}
|
|
7864
7864
|
});
|
|
7865
7865
|
|
|
7866
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/wordCount.ts
|
|
7866
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/wordCount.ts
|
|
7867
7867
|
var init_wordCount = __esm({
|
|
7868
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/wordCount.ts"() {
|
|
7868
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/wordCount.ts"() {
|
|
7869
7869
|
"use strict";
|
|
7870
7870
|
}
|
|
7871
7871
|
});
|
|
7872
7872
|
|
|
7873
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/WebsocketHeartbeat.ts
|
|
7873
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/WebsocketHeartbeat.ts
|
|
7874
7874
|
var logger, WebsocketHeartbeat;
|
|
7875
7875
|
var init_WebsocketHeartbeat = __esm({
|
|
7876
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/WebsocketHeartbeat.ts"() {
|
|
7876
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/WebsocketHeartbeat.ts"() {
|
|
7877
7877
|
"use strict";
|
|
7878
7878
|
init_src();
|
|
7879
7879
|
init_Logger();
|
|
@@ -7914,10 +7914,10 @@ var init_WebsocketHeartbeat = __esm({
|
|
|
7914
7914
|
}
|
|
7915
7915
|
});
|
|
7916
7916
|
|
|
7917
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/WebsocketClient.ts
|
|
7917
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/WebsocketClient.ts
|
|
7918
7918
|
var logger2;
|
|
7919
7919
|
var init_WebsocketClient = __esm({
|
|
7920
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/WebsocketClient.ts"() {
|
|
7920
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/WebsocketClient.ts"() {
|
|
7921
7921
|
"use strict";
|
|
7922
7922
|
init_src();
|
|
7923
7923
|
init_Emitter();
|
|
@@ -7928,7 +7928,7 @@ var init_WebsocketClient = __esm({
|
|
|
7928
7928
|
}
|
|
7929
7929
|
});
|
|
7930
7930
|
|
|
7931
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/WebsocketClientV2.ts
|
|
7931
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/WebsocketClientV2.ts
|
|
7932
7932
|
function isEventLike(value) {
|
|
7933
7933
|
return typeof value === "object" && value !== null && "type" in value && typeof value.type === "string";
|
|
7934
7934
|
}
|
|
@@ -7937,7 +7937,7 @@ function isCloseEvent(value) {
|
|
|
7937
7937
|
}
|
|
7938
7938
|
var logger3, WebsocketClientV2;
|
|
7939
7939
|
var init_WebsocketClientV2 = __esm({
|
|
7940
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/WebsocketClientV2.ts"() {
|
|
7940
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/WebsocketClientV2.ts"() {
|
|
7941
7941
|
"use strict";
|
|
7942
7942
|
init_src();
|
|
7943
7943
|
init_AsyncStream();
|
|
@@ -8184,10 +8184,10 @@ var init_WebsocketClientV2 = __esm({
|
|
|
8184
8184
|
}
|
|
8185
8185
|
});
|
|
8186
8186
|
|
|
8187
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/H3Client.ts
|
|
8187
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/H3Client.ts
|
|
8188
8188
|
var logger4;
|
|
8189
8189
|
var init_H3Client = __esm({
|
|
8190
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/H3Client.ts"() {
|
|
8190
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/H3Client.ts"() {
|
|
8191
8191
|
"use strict";
|
|
8192
8192
|
init_Emitter();
|
|
8193
8193
|
init_Logger();
|
|
@@ -8197,9 +8197,9 @@ var init_H3Client = __esm({
|
|
|
8197
8197
|
}
|
|
8198
8198
|
});
|
|
8199
8199
|
|
|
8200
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/index.ts
|
|
8200
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/index.ts
|
|
8201
8201
|
var init_websocket = __esm({
|
|
8202
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/index.ts"() {
|
|
8202
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/websocket/index.ts"() {
|
|
8203
8203
|
"use strict";
|
|
8204
8204
|
init_WebsocketClient();
|
|
8205
8205
|
init_WebsocketClientV2();
|
|
@@ -8207,9 +8207,9 @@ var init_websocket = __esm({
|
|
|
8207
8207
|
}
|
|
8208
8208
|
});
|
|
8209
8209
|
|
|
8210
|
-
// node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/index.ts
|
|
8210
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/index.ts
|
|
8211
8211
|
var init_src3 = __esm({
|
|
8212
|
-
"node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/index.ts"() {
|
|
8212
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+utils@1.1.4/node_modules/@pmate/utils/src/index.ts"() {
|
|
8213
8213
|
"use strict";
|
|
8214
8214
|
init_base64();
|
|
8215
8215
|
init_batchResolve();
|
|
@@ -8249,23 +8249,23 @@ var init_src3 = __esm({
|
|
|
8249
8249
|
}
|
|
8250
8250
|
});
|
|
8251
8251
|
|
|
8252
|
-
// node_modules/.pnpm/@pmate+hub-sdk@0.4.1/node_modules/@pmate/hub-sdk/dist/AgentClient.js
|
|
8252
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+hub-sdk@0.4.1/node_modules/@pmate/hub-sdk/dist/AgentClient.js
|
|
8253
8253
|
var init_AgentClient = __esm({
|
|
8254
|
-
"node_modules/.pnpm/@pmate+hub-sdk@0.4.1/node_modules/@pmate/hub-sdk/dist/AgentClient.js"() {
|
|
8254
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+hub-sdk@0.4.1/node_modules/@pmate/hub-sdk/dist/AgentClient.js"() {
|
|
8255
8255
|
"use strict";
|
|
8256
8256
|
init_src();
|
|
8257
8257
|
init_src3();
|
|
8258
8258
|
}
|
|
8259
8259
|
});
|
|
8260
8260
|
|
|
8261
|
-
// node_modules/.pnpm/@pmate+hub-sdk@0.4.1/node_modules/@pmate/hub-sdk/dist/FunctionService.js
|
|
8261
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+hub-sdk@0.4.1/node_modules/@pmate/hub-sdk/dist/FunctionService.js
|
|
8262
8262
|
var init_FunctionService = __esm({
|
|
8263
|
-
"node_modules/.pnpm/@pmate+hub-sdk@0.4.1/node_modules/@pmate/hub-sdk/dist/FunctionService.js"() {
|
|
8263
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+hub-sdk@0.4.1/node_modules/@pmate/hub-sdk/dist/FunctionService.js"() {
|
|
8264
8264
|
"use strict";
|
|
8265
8265
|
}
|
|
8266
8266
|
});
|
|
8267
8267
|
|
|
8268
|
-
// node_modules/.pnpm/@pmate+hub-sdk@0.4.1/node_modules/@pmate/hub-sdk/dist/HubClient.js
|
|
8268
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+hub-sdk@0.4.1/node_modules/@pmate/hub-sdk/dist/HubClient.js
|
|
8269
8269
|
function createCallId(functionId) {
|
|
8270
8270
|
return uniqHash(`${functionId}-${Date.now()}-${Math.random()}`, "task-v1" /* Task */);
|
|
8271
8271
|
}
|
|
@@ -8326,7 +8326,7 @@ function withTimeout(promise, timeoutMs, message) {
|
|
|
8326
8326
|
}
|
|
8327
8327
|
var DEFAULT_TIMEOUT_MS, DEFAULT_STREAM_TIMEOUT_MS, HubClient, AsyncCallQueue;
|
|
8328
8328
|
var init_HubClient = __esm({
|
|
8329
|
-
"node_modules/.pnpm/@pmate+hub-sdk@0.4.1/node_modules/@pmate/hub-sdk/dist/HubClient.js"() {
|
|
8329
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+hub-sdk@0.4.1/node_modules/@pmate/hub-sdk/dist/HubClient.js"() {
|
|
8330
8330
|
"use strict";
|
|
8331
8331
|
init_src();
|
|
8332
8332
|
init_src3();
|
|
@@ -8746,9 +8746,9 @@ var init_HubClient = __esm({
|
|
|
8746
8746
|
}
|
|
8747
8747
|
});
|
|
8748
8748
|
|
|
8749
|
-
// node_modules/.pnpm/@pmate+hub-sdk@0.4.1/node_modules/@pmate/hub-sdk/dist/index.js
|
|
8749
|
+
// ../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+hub-sdk@0.4.1/node_modules/@pmate/hub-sdk/dist/index.js
|
|
8750
8750
|
var init_dist2 = __esm({
|
|
8751
|
-
"node_modules/.pnpm/@pmate+hub-sdk@0.4.1/node_modules/@pmate/hub-sdk/dist/index.js"() {
|
|
8751
|
+
"../../../Users/ramroll/dev/pmate/pmate-cli/node_modules/.pnpm/@pmate+hub-sdk@0.4.1/node_modules/@pmate/hub-sdk/dist/index.js"() {
|
|
8752
8752
|
"use strict";
|
|
8753
8753
|
init_AgentClient();
|
|
8754
8754
|
init_FunctionService();
|
|
@@ -8818,8 +8818,48 @@ __export(index_exports, {
|
|
|
8818
8818
|
parseCommandArgs: () => parseCommandArgs
|
|
8819
8819
|
});
|
|
8820
8820
|
module.exports = __toCommonJS(index_exports);
|
|
8821
|
-
var
|
|
8822
|
-
var
|
|
8821
|
+
var import_node_fs26 = require("fs");
|
|
8822
|
+
var import_node_path31 = __toESM(require("path"));
|
|
8823
|
+
|
|
8824
|
+
// src/managedSession.ts
|
|
8825
|
+
var import_node_fs = require("fs");
|
|
8826
|
+
var import_node_os = require("os");
|
|
8827
|
+
var import_node_path = require("path");
|
|
8828
|
+
async function ensureManagedSession(env = process.env, fetcher = fetch) {
|
|
8829
|
+
if (env.HEBO_MEMORY_TOKEN?.trim()) {
|
|
8830
|
+
const token = env.HEBO_MEMORY_TOKEN.trim(), app = "pmate:factory";
|
|
8831
|
+
const base = (env.AUTH_API_BASE_URL ?? "https://auth-api-v2.pmate.chat").replace(/\/+$/, "");
|
|
8832
|
+
const headers = { authorization: `Bearer ${token}` };
|
|
8833
|
+
const r2 = await fetcher(`${base}/session?app=${encodeURIComponent(app)}`, { headers, signal: AbortSignal.timeout(15e3) });
|
|
8834
|
+
const body = await r2.json(), session = body.data;
|
|
8835
|
+
if (!r2.ok || !body.success || session?.identity?.app !== app || !session.identity.accountId || !session.issuedAt || !Number.isFinite(Date.parse(session.expiresAt)) || Date.parse(session.expiresAt) <= Date.now()) throw Error("Delegated user session is invalid or expired");
|
|
8836
|
+
const pr = await fetcher(`${base}/profiles?app=${encodeURIComponent(app)}&account=${encodeURIComponent(session.identity.accountId)}`, { headers, signal: AbortSignal.timeout(15e3) });
|
|
8837
|
+
const profiles = await pr.json(), profileId = profiles.data?.[0]?.id;
|
|
8838
|
+
if (!pr.ok || !profiles.success || !profileId) throw Error("Delegated user profile unavailable");
|
|
8839
|
+
const dir = (0, import_node_fs.mkdtempSync)((0, import_node_path.join)((0, import_node_os.tmpdir)(), "pmate-delegated-")), file = (0, import_node_path.join)(dir, "session.json");
|
|
8840
|
+
(0, import_node_fs.writeFileSync)(file, JSON.stringify({ version: 4, activeAppRef: app, sessions: { [app]: { token, accountId: session.identity.accountId, profileId, issuedAt: session.issuedAt, expiresAt: session.expiresAt, updatedAt: (/* @__PURE__ */ new Date()).toISOString() } } }), { mode: 384 });
|
|
8841
|
+
env.PMATE_SESSION_FILE = file;
|
|
8842
|
+
env.PCS_AGENT_SESSION_MANAGED = "0";
|
|
8843
|
+
process.once("exit", () => {
|
|
8844
|
+
(0, import_node_fs.rmSync)(dir, { recursive: true, force: true });
|
|
8845
|
+
});
|
|
8846
|
+
return;
|
|
8847
|
+
}
|
|
8848
|
+
if (env.PCS_AGENT_SESSION_MANAGED !== "1") return;
|
|
8849
|
+
if (!env.PMATE_SESSION_FILE) throw Error("Managed session file is required");
|
|
8850
|
+
const state = JSON.parse((0, import_node_fs.readFileSync)(env.PMATE_SESSION_FILE, "utf8"));
|
|
8851
|
+
if (!state.refreshKey) throw Error("Managed session refresh key is missing");
|
|
8852
|
+
const port = Number(env.PCS_AGENT_CONTROL_PORT ?? 39399);
|
|
8853
|
+
if (!Number.isInteger(port) || port < 1 || port > 65535) throw Error("Invalid controller port");
|
|
8854
|
+
const r = await fetcher(`http://127.0.0.1:${port}/v2/session/refresh`, {
|
|
8855
|
+
method: "POST",
|
|
8856
|
+
headers: { "x-agent-session-key": state.refreshKey },
|
|
8857
|
+
signal: AbortSignal.timeout(45e3)
|
|
8858
|
+
});
|
|
8859
|
+
if (!r.ok) throw Error(`Managed session renewal unavailable (${r.status}); retry later`);
|
|
8860
|
+
}
|
|
8861
|
+
|
|
8862
|
+
// src/index.ts
|
|
8823
8863
|
var import_chalk4 = __toESM(require("chalk"));
|
|
8824
8864
|
|
|
8825
8865
|
// src/cli.ts
|
|
@@ -8862,12 +8902,12 @@ var ui = {
|
|
|
8862
8902
|
};
|
|
8863
8903
|
|
|
8864
8904
|
// src/commands/ListCommandHandler.ts
|
|
8865
|
-
var
|
|
8905
|
+
var import_node_path3 = __toESM(require("path"));
|
|
8866
8906
|
|
|
8867
8907
|
// src/config.ts
|
|
8868
|
-
var
|
|
8869
|
-
var
|
|
8870
|
-
var
|
|
8908
|
+
var import_node_fs2 = require("fs");
|
|
8909
|
+
var import_node_os2 = __toESM(require("os"));
|
|
8910
|
+
var import_node_path2 = __toESM(require("path"));
|
|
8871
8911
|
var import_ajv = __toESM(require("ajv"));
|
|
8872
8912
|
var import_yaml = __toESM(require("yaml"));
|
|
8873
8913
|
var cachedConfig;
|
|
@@ -8991,11 +9031,11 @@ function loadPmateConfig() {
|
|
|
8991
9031
|
if (cachedConfig !== void 0) {
|
|
8992
9032
|
return cachedConfig ?? {};
|
|
8993
9033
|
}
|
|
8994
|
-
const pmateDir =
|
|
8995
|
-
const yamlPath =
|
|
9034
|
+
const pmateDir = import_node_path2.default.join(import_node_os2.default.homedir(), ".pmate");
|
|
9035
|
+
const yamlPath = import_node_path2.default.join(pmateDir, "config.yaml");
|
|
8996
9036
|
let yamlConfig = null;
|
|
8997
|
-
if ((0,
|
|
8998
|
-
const raw = (0,
|
|
9037
|
+
if ((0, import_node_fs2.existsSync)(yamlPath)) {
|
|
9038
|
+
const raw = (0, import_node_fs2.readFileSync)(yamlPath, "utf8");
|
|
8999
9039
|
try {
|
|
9000
9040
|
const parsed = import_yaml.default.parse(raw);
|
|
9001
9041
|
yamlConfig = validateParsedConfig(parsed, yamlPath);
|
|
@@ -9057,21 +9097,21 @@ ${detail}`);
|
|
|
9057
9097
|
return value;
|
|
9058
9098
|
}
|
|
9059
9099
|
function findRepoConfigPaths(cwd, searchParents) {
|
|
9060
|
-
let current =
|
|
9100
|
+
let current = import_node_path2.default.resolve(cwd);
|
|
9061
9101
|
while (true) {
|
|
9062
|
-
const candidate =
|
|
9063
|
-
if ((0,
|
|
9064
|
-
const localCandidate =
|
|
9102
|
+
const candidate = import_node_path2.default.join(current, ".pmate.yaml");
|
|
9103
|
+
if ((0, import_node_fs2.existsSync)(candidate)) {
|
|
9104
|
+
const localCandidate = import_node_path2.default.join(current, ".pmate.local.yaml");
|
|
9065
9105
|
return {
|
|
9066
9106
|
rootDir: current,
|
|
9067
9107
|
configPath: candidate,
|
|
9068
|
-
localConfigPath: (0,
|
|
9108
|
+
localConfigPath: (0, import_node_fs2.existsSync)(localCandidate) ? localCandidate : void 0
|
|
9069
9109
|
};
|
|
9070
9110
|
}
|
|
9071
9111
|
if (!searchParents) {
|
|
9072
9112
|
return null;
|
|
9073
9113
|
}
|
|
9074
|
-
const parent =
|
|
9114
|
+
const parent = import_node_path2.default.dirname(current);
|
|
9075
9115
|
if (parent === current) {
|
|
9076
9116
|
return null;
|
|
9077
9117
|
}
|
|
@@ -9087,7 +9127,7 @@ function loadMergedRepoYaml(paths) {
|
|
|
9087
9127
|
return mergeRepoConfigValues(base, local);
|
|
9088
9128
|
}
|
|
9089
9129
|
function parseYamlFile(configPath) {
|
|
9090
|
-
const raw = (0,
|
|
9130
|
+
const raw = (0, import_node_fs2.readFileSync)(configPath, "utf8");
|
|
9091
9131
|
try {
|
|
9092
9132
|
return import_yaml.default.parse(raw);
|
|
9093
9133
|
} catch (error) {
|
|
@@ -9242,7 +9282,7 @@ var ListCommandHandler = class {
|
|
|
9242
9282
|
}
|
|
9243
9283
|
}
|
|
9244
9284
|
resolveTargetDir(targetPath) {
|
|
9245
|
-
return targetPath ?
|
|
9285
|
+
return targetPath ? import_node_path3.default.resolve(process.cwd(), targetPath) : process.cwd();
|
|
9246
9286
|
}
|
|
9247
9287
|
loadConfig(targetDir) {
|
|
9248
9288
|
return loadAppConfig(targetDir).config;
|
|
@@ -9251,22 +9291,22 @@ var ListCommandHandler = class {
|
|
|
9251
9291
|
|
|
9252
9292
|
// src/commands/LoginCommandHandler.ts
|
|
9253
9293
|
var import_node_child_process = require("child_process");
|
|
9254
|
-
var
|
|
9294
|
+
var import_node_path6 = __toESM(require("path"));
|
|
9255
9295
|
var import_node_http = require("http");
|
|
9256
9296
|
var import_promises = require("readline/promises");
|
|
9257
9297
|
|
|
9258
9298
|
// src/accessKeyFile.ts
|
|
9259
|
-
var
|
|
9260
|
-
var
|
|
9261
|
-
var
|
|
9299
|
+
var import_node_fs3 = require("fs");
|
|
9300
|
+
var import_node_os3 = __toESM(require("os"));
|
|
9301
|
+
var import_node_path4 = __toESM(require("path"));
|
|
9262
9302
|
function readAccessKeyFile(filePath, options = {}) {
|
|
9263
9303
|
const absolutePath = resolveFilePath(filePath, options.cwd);
|
|
9264
|
-
if (!(0,
|
|
9304
|
+
if (!(0, import_node_fs3.existsSync)(absolutePath)) {
|
|
9265
9305
|
throw new Error(`Access key file not found: ${absolutePath}`);
|
|
9266
9306
|
}
|
|
9267
9307
|
let parsed;
|
|
9268
9308
|
try {
|
|
9269
|
-
parsed = JSON.parse((0,
|
|
9309
|
+
parsed = JSON.parse((0, import_node_fs3.readFileSync)(absolutePath, "utf8"));
|
|
9270
9310
|
} catch (error) {
|
|
9271
9311
|
const message = error instanceof Error ? error.message : String(error);
|
|
9272
9312
|
throw new Error(`Invalid JSON in ${absolutePath}: ${message}`);
|
|
@@ -9283,10 +9323,10 @@ function readAccessKeyFile(filePath, options = {}) {
|
|
|
9283
9323
|
}
|
|
9284
9324
|
function scanAccessKeyFiles(app) {
|
|
9285
9325
|
const dir = resolveAccessKeyDir(app);
|
|
9286
|
-
if (!(0,
|
|
9326
|
+
if (!(0, import_node_fs3.existsSync)(dir)) {
|
|
9287
9327
|
return [];
|
|
9288
9328
|
}
|
|
9289
|
-
return (0,
|
|
9329
|
+
return (0, import_node_fs3.readdirSync)(dir, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".access-key.json")).map((entry) => import_node_path4.default.join(dir, entry.name)).flatMap((filePath) => {
|
|
9290
9330
|
try {
|
|
9291
9331
|
return [{ filePath, key: readAccessKeyFile(filePath, { expectedApp: app }) }];
|
|
9292
9332
|
} catch {
|
|
@@ -9295,13 +9335,13 @@ function scanAccessKeyFiles(app) {
|
|
|
9295
9335
|
}).sort((a, b) => a.key.name.localeCompare(b.key.name) || a.filePath.localeCompare(b.filePath));
|
|
9296
9336
|
}
|
|
9297
9337
|
function resolveAccessKeyDir(app) {
|
|
9298
|
-
return
|
|
9338
|
+
return import_node_path4.default.join(homeDir(), ".pmate", "access-keys", app);
|
|
9299
9339
|
}
|
|
9300
9340
|
function resolveFilePath(filePath, cwd = process.cwd()) {
|
|
9301
|
-
return
|
|
9341
|
+
return import_node_path4.default.isAbsolute(filePath) ? filePath : import_node_path4.default.resolve(cwd, filePath);
|
|
9302
9342
|
}
|
|
9303
9343
|
function homeDir() {
|
|
9304
|
-
return process.env.HOME || process.env.USERPROFILE ||
|
|
9344
|
+
return process.env.HOME || process.env.USERPROFILE || import_node_os3.default.homedir() || process.cwd();
|
|
9305
9345
|
}
|
|
9306
9346
|
function isAccessKeyFile(value) {
|
|
9307
9347
|
if (!value || typeof value !== "object") {
|
|
@@ -9589,7 +9629,7 @@ var LoginCommandHandler = class {
|
|
|
9589
9629
|
key.id?.trim(),
|
|
9590
9630
|
key.namespace?.trim(),
|
|
9591
9631
|
`expires ${key.expiresAt}`,
|
|
9592
|
-
|
|
9632
|
+
import_node_path6.default.relative(process.cwd(), candidate.filePath)
|
|
9593
9633
|
].filter(Boolean);
|
|
9594
9634
|
return parts.join(" / ");
|
|
9595
9635
|
}
|
|
@@ -9808,8 +9848,8 @@ var import_openapi_client = require("@alicloud/openapi-client");
|
|
|
9808
9848
|
var import_sts20150401 = __toESM(require("@alicloud/sts20150401"));
|
|
9809
9849
|
var import_ali_oss = __toESM(require("ali-oss"));
|
|
9810
9850
|
var import_node_crypto = require("crypto");
|
|
9811
|
-
var
|
|
9812
|
-
var
|
|
9851
|
+
var import_node_fs5 = require("fs");
|
|
9852
|
+
var import_node_path7 = __toESM(require("path"));
|
|
9813
9853
|
|
|
9814
9854
|
// src/certs.ts
|
|
9815
9855
|
var DEFAULT_SSL_CERT_KEY = "pmate-01";
|
|
@@ -10102,7 +10142,7 @@ var AliyunService = class {
|
|
|
10102
10142
|
])
|
|
10103
10143
|
);
|
|
10104
10144
|
for (const filePath of files) {
|
|
10105
|
-
const relativePath =
|
|
10145
|
+
const relativePath = import_node_path7.default.relative(localDir, filePath);
|
|
10106
10146
|
const objectKey = this.toObjectKey(normalizedPrefix, relativePath);
|
|
10107
10147
|
const contentType = this.getContentType(filePath);
|
|
10108
10148
|
const cacheControl = this.getStaticAssetCacheControl(relativePath);
|
|
@@ -10112,7 +10152,7 @@ var AliyunService = class {
|
|
|
10112
10152
|
const options = Object.keys(headers).length > 0 ? { headers } : void 0;
|
|
10113
10153
|
const existing = existingMap.get(objectKey);
|
|
10114
10154
|
if (existing && typeof existing.size === "number" && !cacheControl) {
|
|
10115
|
-
const stat = await
|
|
10155
|
+
const stat = await import_node_fs5.promises.stat(filePath);
|
|
10116
10156
|
if (stat.size === existing.size) {
|
|
10117
10157
|
const etag = this.normalizeEtag(existing.etag);
|
|
10118
10158
|
if (etag && !etag.includes("-")) {
|
|
@@ -10137,7 +10177,7 @@ var AliyunService = class {
|
|
|
10137
10177
|
if (!region) throw new Error("Missing oss.public.region in ~/.pmate/config.yaml.");
|
|
10138
10178
|
if (!accessKeyId) throw new Error("Missing aliyun.ak in ~/.pmate/config.yaml.");
|
|
10139
10179
|
if (!accessKeySecret) throw new Error("Missing aliyun.sk in ~/.pmate/config.yaml.");
|
|
10140
|
-
if (!(0,
|
|
10180
|
+
if (!(0, import_node_fs5.existsSync)(localFile)) {
|
|
10141
10181
|
throw new Error(`File not found: ${localFile}`);
|
|
10142
10182
|
}
|
|
10143
10183
|
const client = new import_ali_oss.default({ region, accessKeyId, accessKeySecret, bucket });
|
|
@@ -10484,10 +10524,10 @@ var AliyunService = class {
|
|
|
10484
10524
|
}
|
|
10485
10525
|
/** Recursively collect file paths under a directory. */
|
|
10486
10526
|
static async collectFiles(dir) {
|
|
10487
|
-
const entries = await
|
|
10527
|
+
const entries = await import_node_fs5.promises.readdir(dir, { withFileTypes: true });
|
|
10488
10528
|
const files = [];
|
|
10489
10529
|
for (const entry of entries) {
|
|
10490
|
-
const fullPath =
|
|
10530
|
+
const fullPath = import_node_path7.default.join(dir, entry.name);
|
|
10491
10531
|
if (entry.isDirectory()) {
|
|
10492
10532
|
files.push(...await this.collectFiles(fullPath));
|
|
10493
10533
|
} else if (entry.isFile()) {
|
|
@@ -10536,7 +10576,7 @@ var AliyunService = class {
|
|
|
10536
10576
|
static getFileMd5(filePath) {
|
|
10537
10577
|
return new Promise((resolve, reject) => {
|
|
10538
10578
|
const hash = (0, import_node_crypto.createHash)("md5");
|
|
10539
|
-
const stream = (0,
|
|
10579
|
+
const stream = (0, import_node_fs5.createReadStream)(filePath);
|
|
10540
10580
|
stream.on("data", (chunk) => {
|
|
10541
10581
|
hash.update(chunk);
|
|
10542
10582
|
});
|
|
@@ -10549,17 +10589,17 @@ var AliyunService = class {
|
|
|
10549
10589
|
});
|
|
10550
10590
|
}
|
|
10551
10591
|
static toObjectKey(prefix, relativePath) {
|
|
10552
|
-
const normalizedPath = relativePath.split(
|
|
10592
|
+
const normalizedPath = relativePath.split(import_node_path7.default.sep).join("/");
|
|
10553
10593
|
if (!prefix) {
|
|
10554
10594
|
return normalizedPath;
|
|
10555
10595
|
}
|
|
10556
10596
|
return `${prefix}/${normalizedPath}`;
|
|
10557
10597
|
}
|
|
10558
10598
|
static getContentType(filePath) {
|
|
10559
|
-
if (
|
|
10599
|
+
if (import_node_path7.default.basename(filePath).toLowerCase() === "apple-app-site-association") {
|
|
10560
10600
|
return "application/json";
|
|
10561
10601
|
}
|
|
10562
|
-
const ext =
|
|
10602
|
+
const ext = import_node_path7.default.extname(filePath).toLowerCase();
|
|
10563
10603
|
switch (ext) {
|
|
10564
10604
|
case ".html":
|
|
10565
10605
|
return "text/html";
|
|
@@ -10602,7 +10642,7 @@ var AliyunService = class {
|
|
|
10602
10642
|
}
|
|
10603
10643
|
static getStaticAssetCacheControl(filePath) {
|
|
10604
10644
|
const normalized = filePath.replace(/\\/g, "/");
|
|
10605
|
-
const base =
|
|
10645
|
+
const base = import_node_path7.default.posix.basename(normalized).toLowerCase();
|
|
10606
10646
|
if (base === "index.html" || base === "200.html" || base === "404.html" || base === "latest.json" || base === "apple-app-site-association") {
|
|
10607
10647
|
return "no-cache, no-store, must-revalidate";
|
|
10608
10648
|
}
|
|
@@ -10819,7 +10859,7 @@ var BucketCommandHandler = class {
|
|
|
10819
10859
|
};
|
|
10820
10860
|
|
|
10821
10861
|
// src/commands/DeleteCommandHandler.ts
|
|
10822
|
-
var
|
|
10862
|
+
var import_node_path8 = __toESM(require("path"));
|
|
10823
10863
|
var import_node_child_process2 = require("child_process");
|
|
10824
10864
|
|
|
10825
10865
|
// src/serverAddress.ts
|
|
@@ -10977,17 +11017,17 @@ var DeleteCommandHandler = class {
|
|
|
10977
11017
|
});
|
|
10978
11018
|
}
|
|
10979
11019
|
resolveCwd(target) {
|
|
10980
|
-
return target ?
|
|
11020
|
+
return target ? import_node_path8.default.resolve(process.cwd(), target) : process.cwd();
|
|
10981
11021
|
}
|
|
10982
11022
|
};
|
|
10983
11023
|
|
|
10984
11024
|
// src/commands/DevCommandHandler.ts
|
|
10985
|
-
var
|
|
10986
|
-
var
|
|
11025
|
+
var import_node_fs6 = require("fs");
|
|
11026
|
+
var import_node_path10 = __toESM(require("path"));
|
|
10987
11027
|
var import_node_child_process3 = require("child_process");
|
|
10988
11028
|
|
|
10989
11029
|
// src/appDir.ts
|
|
10990
|
-
var
|
|
11030
|
+
var import_node_path9 = __toESM(require("path"));
|
|
10991
11031
|
function normalizeRelativeDir(input, appName) {
|
|
10992
11032
|
if (typeof input !== "string") {
|
|
10993
11033
|
throw new Error(`Missing dir for ${appName} in .pmate.yaml`);
|
|
@@ -11000,7 +11040,7 @@ function normalizeRelativeDir(input, appName) {
|
|
|
11000
11040
|
if (unixLike.startsWith("/")) {
|
|
11001
11041
|
throw new Error(`Invalid dir for ${appName} in .pmate.yaml: must be relative`);
|
|
11002
11042
|
}
|
|
11003
|
-
const normalized =
|
|
11043
|
+
const normalized = import_node_path9.default.posix.normalize(unixLike);
|
|
11004
11044
|
if (normalized.startsWith("../") || normalized === "..") {
|
|
11005
11045
|
throw new Error(
|
|
11006
11046
|
`Invalid dir for ${appName} in .pmate.yaml: must stay within repo`
|
|
@@ -11010,7 +11050,7 @@ function normalizeRelativeDir(input, appName) {
|
|
|
11010
11050
|
}
|
|
11011
11051
|
function resolveLocalAppDir(repoRoot, appName, dir) {
|
|
11012
11052
|
const relative = normalizeRelativeDir(dir, appName);
|
|
11013
|
-
return
|
|
11053
|
+
return import_node_path9.default.resolve(repoRoot, relative);
|
|
11014
11054
|
}
|
|
11015
11055
|
function resolveRemoteAppDir(appName, dir) {
|
|
11016
11056
|
return normalizeRelativeDir(dir, appName);
|
|
@@ -11033,8 +11073,8 @@ var DevCommandHandler = class {
|
|
|
11033
11073
|
);
|
|
11034
11074
|
}
|
|
11035
11075
|
const appDir = resolveLocalAppDir(cwd, appName, appConfig.dir);
|
|
11036
|
-
const packageJsonPath =
|
|
11037
|
-
if (!(0,
|
|
11076
|
+
const packageJsonPath = import_node_path10.default.join(appDir, "package.json");
|
|
11077
|
+
if (!(0, import_node_fs6.existsSync)(packageJsonPath)) {
|
|
11038
11078
|
throw new Error(`No package.json found at ${packageJsonPath}`);
|
|
11039
11079
|
}
|
|
11040
11080
|
const pkg2 = this.loadPackageJson(packageJsonPath);
|
|
@@ -11048,13 +11088,13 @@ var DevCommandHandler = class {
|
|
|
11048
11088
|
await this.runCommand("pnpm", ["--filter", pkgName, "run", "dev"], cwd);
|
|
11049
11089
|
}
|
|
11050
11090
|
resolveCwd(target) {
|
|
11051
|
-
return target ?
|
|
11091
|
+
return target ? import_node_path10.default.resolve(process.cwd(), target) : process.cwd();
|
|
11052
11092
|
}
|
|
11053
11093
|
loadConfig(cwd) {
|
|
11054
11094
|
return loadAppConfig(cwd);
|
|
11055
11095
|
}
|
|
11056
11096
|
loadPackageJson(packageJsonPath) {
|
|
11057
|
-
const raw = (0,
|
|
11097
|
+
const raw = (0, import_node_fs6.readFileSync)(packageJsonPath, "utf8");
|
|
11058
11098
|
const parsed = JSON.parse(raw);
|
|
11059
11099
|
if (!parsed || typeof parsed !== "object") {
|
|
11060
11100
|
throw new Error(`Invalid package.json at ${packageJsonPath}`);
|
|
@@ -11082,8 +11122,8 @@ var DevCommandHandler = class {
|
|
|
11082
11122
|
};
|
|
11083
11123
|
|
|
11084
11124
|
// src/commands/OssCommandHandler.ts
|
|
11085
|
-
var
|
|
11086
|
-
var
|
|
11125
|
+
var import_node_fs7 = require("fs");
|
|
11126
|
+
var import_node_path11 = __toESM(require("path"));
|
|
11087
11127
|
var PARROT_STATIC_PUBLIC_BASE_URL = "https://parrot-static.pmate.chat";
|
|
11088
11128
|
var OssCommandHandler = class _OssCommandHandler {
|
|
11089
11129
|
static {
|
|
@@ -11101,7 +11141,7 @@ var OssCommandHandler = class _OssCommandHandler {
|
|
|
11101
11141
|
}
|
|
11102
11142
|
return;
|
|
11103
11143
|
}
|
|
11104
|
-
const resolvedFile =
|
|
11144
|
+
const resolvedFile = import_node_path11.default.resolve(process.cwd(), args.filePath);
|
|
11105
11145
|
this.assertFile(resolvedFile);
|
|
11106
11146
|
const objectKey = this.normalizeObjectKey(args.objectKey);
|
|
11107
11147
|
const bucket = this.resolveBucket(args.bucket);
|
|
@@ -11112,10 +11152,10 @@ var OssCommandHandler = class _OssCommandHandler {
|
|
|
11112
11152
|
}
|
|
11113
11153
|
}
|
|
11114
11154
|
assertFile(filePath) {
|
|
11115
|
-
if (!(0,
|
|
11155
|
+
if (!(0, import_node_fs7.existsSync)(filePath)) {
|
|
11116
11156
|
throw new Error(`File not found: ${filePath}`);
|
|
11117
11157
|
}
|
|
11118
|
-
const stat = (0,
|
|
11158
|
+
const stat = (0, import_node_fs7.statSync)(filePath);
|
|
11119
11159
|
if (!stat.isFile()) {
|
|
11120
11160
|
throw new Error(`Not a file: ${filePath}`);
|
|
11121
11161
|
}
|
|
@@ -11142,7 +11182,7 @@ function buildOssPublicUrl(bucket, objectKey) {
|
|
|
11142
11182
|
}
|
|
11143
11183
|
|
|
11144
11184
|
// src/commands/EnvCommandHandler.ts
|
|
11145
|
-
var
|
|
11185
|
+
var import_node_path12 = __toESM(require("path"));
|
|
11146
11186
|
var import_node_child_process4 = require("child_process");
|
|
11147
11187
|
|
|
11148
11188
|
// src/shell.ts
|
|
@@ -11226,8 +11266,8 @@ var EnvCommandHandler = class {
|
|
|
11226
11266
|
ui.success(`Set ${envKey} in .env.local`, appName);
|
|
11227
11267
|
}
|
|
11228
11268
|
async listEnvKeys(server, repoDir, appDir, verbose) {
|
|
11229
|
-
const envLocalPath =
|
|
11230
|
-
const envPath =
|
|
11269
|
+
const envLocalPath = import_node_path12.default.posix.join(appDir, ".env.local");
|
|
11270
|
+
const envPath = import_node_path12.default.posix.join(appDir, ".env");
|
|
11231
11271
|
if (verbose) {
|
|
11232
11272
|
const repoPath = `$HOME/${repoDir}`;
|
|
11233
11273
|
ui.info("Env list target", {
|
|
@@ -11320,8 +11360,8 @@ var EnvCommandHandler = class {
|
|
|
11320
11360
|
}
|
|
11321
11361
|
}
|
|
11322
11362
|
async appendEnvLine(server, repoDir, appDir, envKey, envLine, verbose) {
|
|
11323
|
-
const envLocalPath =
|
|
11324
|
-
const envPath =
|
|
11363
|
+
const envLocalPath = import_node_path12.default.posix.join(appDir, ".env.local");
|
|
11364
|
+
const envPath = import_node_path12.default.posix.join(appDir, ".env");
|
|
11325
11365
|
if (verbose) {
|
|
11326
11366
|
const repoPath = `$HOME/${repoDir}`;
|
|
11327
11367
|
ui.info("Env add target", {
|
|
@@ -11369,8 +11409,8 @@ var EnvCommandHandler = class {
|
|
|
11369
11409
|
await this.runRemoteCommand(server, command);
|
|
11370
11410
|
}
|
|
11371
11411
|
async deleteEnvKey(server, repoDir, appDir, envKey, verbose) {
|
|
11372
|
-
const envLocalPath =
|
|
11373
|
-
const envPath =
|
|
11412
|
+
const envLocalPath = import_node_path12.default.posix.join(appDir, ".env.local");
|
|
11413
|
+
const envPath = import_node_path12.default.posix.join(appDir, ".env");
|
|
11374
11414
|
if (verbose) {
|
|
11375
11415
|
const repoPath = `$HOME/${repoDir}`;
|
|
11376
11416
|
ui.info("Env delete target", {
|
|
@@ -12138,7 +12178,7 @@ var CommitCommandHandler = class {
|
|
|
12138
12178
|
|
|
12139
12179
|
// src/commands/SummaryCommandHandler.ts
|
|
12140
12180
|
var import_node_child_process6 = require("child_process");
|
|
12141
|
-
var
|
|
12181
|
+
var import_node_path13 = __toESM(require("path"));
|
|
12142
12182
|
var SummaryCommandHandler = class {
|
|
12143
12183
|
async handle(args) {
|
|
12144
12184
|
const cwd = this.resolveCwd(args.cwd);
|
|
@@ -12323,7 +12363,7 @@ var SummaryCommandHandler = class {
|
|
|
12323
12363
|
return this.runCapture("gh", args, allowFailure, await this.getGhEnv(cwd), cwd);
|
|
12324
12364
|
}
|
|
12325
12365
|
resolveCwd(value) {
|
|
12326
|
-
return value ?
|
|
12366
|
+
return value ? import_node_path13.default.resolve(process.cwd(), value) : process.cwd();
|
|
12327
12367
|
}
|
|
12328
12368
|
};
|
|
12329
12369
|
function truncate2(value, limit) {
|
|
@@ -12336,9 +12376,9 @@ function truncate2(value, limit) {
|
|
|
12336
12376
|
|
|
12337
12377
|
// src/commands/LinearCommandHandler.ts
|
|
12338
12378
|
var import_node_child_process7 = require("child_process");
|
|
12339
|
-
var
|
|
12340
|
-
var
|
|
12341
|
-
var
|
|
12379
|
+
var import_node_fs8 = require("fs");
|
|
12380
|
+
var import_node_os5 = __toESM(require("os"));
|
|
12381
|
+
var import_node_path14 = __toESM(require("path"));
|
|
12342
12382
|
var import_promises3 = require("readline/promises");
|
|
12343
12383
|
var import_openai = __toESM(require("openai"));
|
|
12344
12384
|
var import_sdk = require("@linear/sdk");
|
|
@@ -13222,15 +13262,15 @@ var LinearCommandHandler = class {
|
|
|
13222
13262
|
}
|
|
13223
13263
|
}
|
|
13224
13264
|
getLinearSelectionPath() {
|
|
13225
|
-
return
|
|
13265
|
+
return import_node_path14.default.join(import_node_os5.default.homedir(), ".pmate", "linear-selection.json");
|
|
13226
13266
|
}
|
|
13227
13267
|
readCachedLinearSelection(cwd) {
|
|
13228
13268
|
const selectionPath = this.getLinearSelectionPath();
|
|
13229
|
-
if (!(0,
|
|
13269
|
+
if (!(0, import_node_fs8.existsSync)(selectionPath)) {
|
|
13230
13270
|
return void 0;
|
|
13231
13271
|
}
|
|
13232
13272
|
try {
|
|
13233
|
-
const raw = (0,
|
|
13273
|
+
const raw = (0, import_node_fs8.readFileSync)(selectionPath, "utf8").trim();
|
|
13234
13274
|
if (!raw) return void 0;
|
|
13235
13275
|
const parsed = JSON.parse(raw);
|
|
13236
13276
|
const value = parsed[cwd];
|
|
@@ -13241,12 +13281,12 @@ var LinearCommandHandler = class {
|
|
|
13241
13281
|
}
|
|
13242
13282
|
writeCachedLinearSelection(cwd, title) {
|
|
13243
13283
|
const selectionPath = this.getLinearSelectionPath();
|
|
13244
|
-
const dir =
|
|
13245
|
-
(0,
|
|
13284
|
+
const dir = import_node_path14.default.dirname(selectionPath);
|
|
13285
|
+
(0, import_node_fs8.mkdirSync)(dir, { recursive: true });
|
|
13246
13286
|
let data = {};
|
|
13247
|
-
if ((0,
|
|
13287
|
+
if ((0, import_node_fs8.existsSync)(selectionPath)) {
|
|
13248
13288
|
try {
|
|
13249
|
-
const raw = (0,
|
|
13289
|
+
const raw = (0, import_node_fs8.readFileSync)(selectionPath, "utf8").trim();
|
|
13250
13290
|
if (raw) {
|
|
13251
13291
|
data = JSON.parse(raw);
|
|
13252
13292
|
}
|
|
@@ -13255,7 +13295,7 @@ var LinearCommandHandler = class {
|
|
|
13255
13295
|
}
|
|
13256
13296
|
}
|
|
13257
13297
|
data[cwd] = title;
|
|
13258
|
-
(0,
|
|
13298
|
+
(0, import_node_fs8.writeFileSync)(selectionPath, `${JSON.stringify(data, null, 2)}
|
|
13259
13299
|
`, "utf8");
|
|
13260
13300
|
}
|
|
13261
13301
|
async lookupIssue(client, issueRef) {
|
|
@@ -13432,14 +13472,14 @@ var LinearCommandHandler = class {
|
|
|
13432
13472
|
if (process.platform !== "darwin") {
|
|
13433
13473
|
throw new Error("Screenshot capture only supports macOS.");
|
|
13434
13474
|
}
|
|
13435
|
-
const dir = await
|
|
13436
|
-
const filePath =
|
|
13475
|
+
const dir = await import_node_fs8.promises.mkdtemp(import_node_path14.default.join(import_node_os5.default.tmpdir(), "pmate-screenshot-"));
|
|
13476
|
+
const filePath = import_node_path14.default.join(dir, `screenshot-${index}.png`);
|
|
13437
13477
|
try {
|
|
13438
13478
|
const code = await this.run("screencapture", ["-i", "-x", filePath], true);
|
|
13439
13479
|
if (code !== 0) {
|
|
13440
13480
|
throw new Error("Screenshot capture canceled or failed.");
|
|
13441
13481
|
}
|
|
13442
|
-
const buffer = await
|
|
13482
|
+
const buffer = await import_node_fs8.promises.readFile(filePath);
|
|
13443
13483
|
if (buffer.length === 0) {
|
|
13444
13484
|
throw new Error("Screenshot capture produced an empty file.");
|
|
13445
13485
|
}
|
|
@@ -13451,7 +13491,7 @@ var LinearCommandHandler = class {
|
|
|
13451
13491
|
return { buffer, mime, filename: `screenshot-${index}.${extension}` };
|
|
13452
13492
|
} finally {
|
|
13453
13493
|
try {
|
|
13454
|
-
await
|
|
13494
|
+
await import_node_fs8.promises.rm(dir, { recursive: true, force: true });
|
|
13455
13495
|
} catch {
|
|
13456
13496
|
}
|
|
13457
13497
|
}
|
|
@@ -13595,17 +13635,17 @@ var LinearCommandHandler = class {
|
|
|
13595
13635
|
return compact.length > limit ? `${compact.slice(0, limit)}...` : compact;
|
|
13596
13636
|
}
|
|
13597
13637
|
async convertToPng(buffer, ext) {
|
|
13598
|
-
const dir = await
|
|
13599
|
-
const inputPath =
|
|
13600
|
-
const outputPath =
|
|
13638
|
+
const dir = await import_node_fs8.promises.mkdtemp(import_node_path14.default.join(import_node_os5.default.tmpdir(), "pmate-"));
|
|
13639
|
+
const inputPath = import_node_path14.default.join(dir, `clipboard.${ext}`);
|
|
13640
|
+
const outputPath = import_node_path14.default.join(dir, "clipboard.png");
|
|
13601
13641
|
try {
|
|
13602
|
-
await
|
|
13642
|
+
await import_node_fs8.promises.writeFile(inputPath, buffer);
|
|
13603
13643
|
const stderr = await this.runCapture(
|
|
13604
13644
|
"sips",
|
|
13605
13645
|
["-s", "format", "png", inputPath, "--out", outputPath],
|
|
13606
13646
|
true
|
|
13607
13647
|
);
|
|
13608
|
-
const out = await
|
|
13648
|
+
const out = await import_node_fs8.promises.readFile(outputPath);
|
|
13609
13649
|
if (this.detectImageMime(out) !== "image/png") {
|
|
13610
13650
|
throw new Error(
|
|
13611
13651
|
stderr?.trim() ? `Failed to convert clipboard ${ext} to PNG: ${stderr.trim()}` : `Failed to convert clipboard ${ext} to PNG.`
|
|
@@ -13614,7 +13654,7 @@ var LinearCommandHandler = class {
|
|
|
13614
13654
|
return out;
|
|
13615
13655
|
} finally {
|
|
13616
13656
|
try {
|
|
13617
|
-
await
|
|
13657
|
+
await import_node_fs8.promises.rm(dir, { recursive: true, force: true });
|
|
13618
13658
|
} catch {
|
|
13619
13659
|
}
|
|
13620
13660
|
}
|
|
@@ -13908,7 +13948,7 @@ var LinearCommandHandler = class {
|
|
|
13908
13948
|
return this.runCapture("gh", args, allowFailure, await this.getGhEnv(cwd), cwd);
|
|
13909
13949
|
}
|
|
13910
13950
|
resolveCwd(value) {
|
|
13911
|
-
return value ?
|
|
13951
|
+
return value ? import_node_path14.default.resolve(process.cwd(), value) : process.cwd();
|
|
13912
13952
|
}
|
|
13913
13953
|
createOpenAiClient() {
|
|
13914
13954
|
const config = loadPmateConfig();
|
|
@@ -13960,8 +14000,8 @@ function sleep2(ms) {
|
|
|
13960
14000
|
}
|
|
13961
14001
|
|
|
13962
14002
|
// src/commands/NotionCommandHandler.ts
|
|
13963
|
-
var
|
|
13964
|
-
var
|
|
14003
|
+
var import_node_fs9 = require("fs");
|
|
14004
|
+
var import_node_path15 = __toESM(require("path"));
|
|
13965
14005
|
|
|
13966
14006
|
// src/services/NotionService.ts
|
|
13967
14007
|
var NotionService = class {
|
|
@@ -14300,16 +14340,16 @@ var NotionCommandHandler = class {
|
|
|
14300
14340
|
if (!args.filePath) {
|
|
14301
14341
|
return "";
|
|
14302
14342
|
}
|
|
14303
|
-
const resolved =
|
|
14304
|
-
return (0,
|
|
14343
|
+
const resolved = import_node_path15.default.resolve(process.cwd(), args.filePath);
|
|
14344
|
+
return (0, import_node_fs9.readFileSync)(resolved, "utf8");
|
|
14305
14345
|
}
|
|
14306
14346
|
};
|
|
14307
14347
|
|
|
14308
14348
|
// src/commands/QrcodeCommandHandler.ts
|
|
14309
14349
|
var import_node_child_process8 = require("child_process");
|
|
14310
|
-
var
|
|
14311
|
-
var
|
|
14312
|
-
var
|
|
14350
|
+
var import_node_fs10 = require("fs");
|
|
14351
|
+
var import_node_os6 = __toESM(require("os"));
|
|
14352
|
+
var import_node_path16 = __toESM(require("path"));
|
|
14313
14353
|
var import_promises4 = require("readline/promises");
|
|
14314
14354
|
var import_jsqr = __toESM(require("jsqr"));
|
|
14315
14355
|
var import_pngjs = require("pngjs");
|
|
@@ -14335,7 +14375,7 @@ var QrcodeCommandHandler = class {
|
|
|
14335
14375
|
ui.success("QR code value:", value);
|
|
14336
14376
|
} finally {
|
|
14337
14377
|
try {
|
|
14338
|
-
await
|
|
14378
|
+
await import_node_fs10.promises.rm(dir, { recursive: true, force: true });
|
|
14339
14379
|
} catch {
|
|
14340
14380
|
}
|
|
14341
14381
|
}
|
|
@@ -14351,13 +14391,13 @@ var QrcodeCommandHandler = class {
|
|
|
14351
14391
|
} finally {
|
|
14352
14392
|
rl.close();
|
|
14353
14393
|
}
|
|
14354
|
-
const dir = await
|
|
14355
|
-
const filePath =
|
|
14394
|
+
const dir = await import_node_fs10.promises.mkdtemp(import_node_path16.default.join(import_node_os6.default.tmpdir(), "pmate-qrcode-"));
|
|
14395
|
+
const filePath = import_node_path16.default.join(dir, "qrcode.png");
|
|
14356
14396
|
const code = await this.run("screencapture", ["-i", "-x", filePath], true);
|
|
14357
14397
|
if (code !== 0) {
|
|
14358
14398
|
throw new Error("Screenshot capture canceled or failed.");
|
|
14359
14399
|
}
|
|
14360
|
-
const buffer = await
|
|
14400
|
+
const buffer = await import_node_fs10.promises.readFile(filePath);
|
|
14361
14401
|
if (buffer.length === 0) {
|
|
14362
14402
|
throw new Error("Screenshot capture produced an empty file.");
|
|
14363
14403
|
}
|
|
@@ -14373,7 +14413,7 @@ var QrcodeCommandHandler = class {
|
|
|
14373
14413
|
async decodeQr(filePath) {
|
|
14374
14414
|
let buffer;
|
|
14375
14415
|
try {
|
|
14376
|
-
buffer = await
|
|
14416
|
+
buffer = await import_node_fs10.promises.readFile(filePath);
|
|
14377
14417
|
} catch {
|
|
14378
14418
|
return null;
|
|
14379
14419
|
}
|
|
@@ -14631,8 +14671,8 @@ function clampNumber(value, min, max, fallback) {
|
|
|
14631
14671
|
}
|
|
14632
14672
|
|
|
14633
14673
|
// src/commands/QuizCommandHandler.ts
|
|
14634
|
-
var
|
|
14635
|
-
var
|
|
14674
|
+
var import_node_fs11 = require("fs");
|
|
14675
|
+
var import_node_path17 = __toESM(require("path"));
|
|
14636
14676
|
init_sessionStore();
|
|
14637
14677
|
|
|
14638
14678
|
// src/services/QuizService.ts
|
|
@@ -15177,8 +15217,8 @@ var QuizCommandHandler = class {
|
|
|
15177
15217
|
return;
|
|
15178
15218
|
}
|
|
15179
15219
|
if (args.action === "update-meta") {
|
|
15180
|
-
const resolvedFilePath =
|
|
15181
|
-
const metadata = JSON.parse((0,
|
|
15220
|
+
const resolvedFilePath = import_node_path17.default.resolve(process.cwd(), args.filePath);
|
|
15221
|
+
const metadata = JSON.parse((0, import_node_fs11.readFileSync)(resolvedFilePath, "utf8"));
|
|
15182
15222
|
const result = await updateQuizPaperMetadata({
|
|
15183
15223
|
apiBaseUrl,
|
|
15184
15224
|
linkBaseUrl,
|
|
@@ -15190,8 +15230,8 @@ var QuizCommandHandler = class {
|
|
|
15190
15230
|
return;
|
|
15191
15231
|
}
|
|
15192
15232
|
if (args.action === "append-step") {
|
|
15193
|
-
const resolvedFilePath =
|
|
15194
|
-
const step = JSON.parse((0,
|
|
15233
|
+
const resolvedFilePath = import_node_path17.default.resolve(process.cwd(), args.filePath);
|
|
15234
|
+
const step = JSON.parse((0, import_node_fs11.readFileSync)(resolvedFilePath, "utf8"));
|
|
15195
15235
|
const result = await appendQuizPaperStep({
|
|
15196
15236
|
apiBaseUrl,
|
|
15197
15237
|
linkBaseUrl,
|
|
@@ -15204,8 +15244,8 @@ var QuizCommandHandler = class {
|
|
|
15204
15244
|
return;
|
|
15205
15245
|
}
|
|
15206
15246
|
if (args.action === "update-step") {
|
|
15207
|
-
const resolvedFilePath =
|
|
15208
|
-
const step = JSON.parse((0,
|
|
15247
|
+
const resolvedFilePath = import_node_path17.default.resolve(process.cwd(), args.filePath);
|
|
15248
|
+
const step = JSON.parse((0, import_node_fs11.readFileSync)(resolvedFilePath, "utf8"));
|
|
15209
15249
|
step.stepId = args.stepId;
|
|
15210
15250
|
const result = await updateQuizPaperStep({
|
|
15211
15251
|
apiBaseUrl,
|
|
@@ -15268,8 +15308,8 @@ var QuizCommandHandler = class {
|
|
|
15268
15308
|
if (targetIndex < 0) {
|
|
15269
15309
|
throw new Error(`\u672A\u627E\u5230 stepId=${args.stepId}\uFF0C\u65E0\u6CD5\u66F4\u65B0\u8BE5\u9898\u76EE\u3002`);
|
|
15270
15310
|
}
|
|
15271
|
-
const resolvedFilePath =
|
|
15272
|
-
const nextStep = JSON.parse((0,
|
|
15311
|
+
const resolvedFilePath = import_node_path17.default.resolve(process.cwd(), args.filePath);
|
|
15312
|
+
const nextStep = JSON.parse((0, import_node_fs11.readFileSync)(resolvedFilePath, "utf8"));
|
|
15273
15313
|
nextStep.stepId = args.stepId;
|
|
15274
15314
|
const nextSteps = [...basePaper.steps];
|
|
15275
15315
|
nextSteps[targetIndex] = nextStep;
|
|
@@ -15319,9 +15359,9 @@ var QuizCommandHandler = class {
|
|
|
15319
15359
|
};
|
|
15320
15360
|
|
|
15321
15361
|
// src/commands/CollectCommandHandler.ts
|
|
15322
|
-
var
|
|
15323
|
-
var
|
|
15324
|
-
var
|
|
15362
|
+
var import_node_fs13 = require("fs");
|
|
15363
|
+
var import_node_os8 = __toESM(require("os"));
|
|
15364
|
+
var import_node_path19 = __toESM(require("path"));
|
|
15325
15365
|
var import_playwright = require("playwright");
|
|
15326
15366
|
|
|
15327
15367
|
// src/im1BotClient.ts
|
|
@@ -15405,13 +15445,13 @@ var Im1BotClient = class {
|
|
|
15405
15445
|
|
|
15406
15446
|
// src/collectStore.ts
|
|
15407
15447
|
var import_node_crypto3 = require("crypto");
|
|
15408
|
-
var
|
|
15409
|
-
var
|
|
15410
|
-
var
|
|
15448
|
+
var import_node_fs12 = require("fs");
|
|
15449
|
+
var import_node_os7 = __toESM(require("os"));
|
|
15450
|
+
var import_node_path18 = __toESM(require("path"));
|
|
15411
15451
|
function resolveCollectTarget(input) {
|
|
15412
15452
|
const endpoint = input.endpoint ?? (input.source === "cc" ? "http://localhost:9223" : "http://localhost:9222");
|
|
15413
15453
|
const sourceKey = input.source ?? `endpoint-${(0, import_node_crypto3.createHash)("sha1").update(endpoint).digest("hex").slice(0, 8)}`;
|
|
15414
|
-
const rootDir =
|
|
15454
|
+
const rootDir = import_node_path18.default.join(import_node_os7.default.homedir(), ".pmate", "collect", sourceKey);
|
|
15415
15455
|
return { sourceKey, endpoint, rootDir };
|
|
15416
15456
|
}
|
|
15417
15457
|
function toThreadKey(name) {
|
|
@@ -15423,7 +15463,7 @@ function toThreadKey(name) {
|
|
|
15423
15463
|
async function readStoredThread(rootDir, threadKey) {
|
|
15424
15464
|
const filePath = getThreadMetaFilePath(rootDir, threadKey);
|
|
15425
15465
|
try {
|
|
15426
|
-
const raw = await
|
|
15466
|
+
const raw = await import_node_fs12.promises.readFile(filePath, "utf8");
|
|
15427
15467
|
const parsed = JSON.parse(raw);
|
|
15428
15468
|
if ("messages" in parsed && Array.isArray(parsed.messages)) {
|
|
15429
15469
|
return parsed;
|
|
@@ -15441,15 +15481,15 @@ async function writeStoredThread(rootDir, thread) {
|
|
|
15441
15481
|
const metaPath = getThreadMetaFilePath(rootDir, thread.threadKey);
|
|
15442
15482
|
const messagePath = getThreadMessagesFilePath(rootDir, thread.threadKey);
|
|
15443
15483
|
const { messages: messages2, ...meta } = thread;
|
|
15444
|
-
await
|
|
15445
|
-
await
|
|
15484
|
+
await import_node_fs12.promises.mkdir(import_node_path18.default.dirname(metaPath), { recursive: true });
|
|
15485
|
+
await import_node_fs12.promises.writeFile(metaPath, JSON.stringify(meta, null, 2) + "\n", "utf8");
|
|
15446
15486
|
const body = messages2.map((message) => JSON.stringify(message)).join("\n");
|
|
15447
|
-
await
|
|
15487
|
+
await import_node_fs12.promises.writeFile(messagePath, `${body}${body ? "\n" : ""}`, "utf8");
|
|
15448
15488
|
}
|
|
15449
15489
|
async function writeStoredIndex(rootDir, index) {
|
|
15450
|
-
await
|
|
15451
|
-
const filePath =
|
|
15452
|
-
await
|
|
15490
|
+
await import_node_fs12.promises.mkdir(rootDir, { recursive: true });
|
|
15491
|
+
const filePath = import_node_path18.default.join(rootDir, "index.json");
|
|
15492
|
+
await import_node_fs12.promises.writeFile(filePath, JSON.stringify(index, null, 2) + "\n", "utf8");
|
|
15453
15493
|
}
|
|
15454
15494
|
function diffMessages(existing, incoming) {
|
|
15455
15495
|
const seenMessageIds = new Set(
|
|
@@ -15523,7 +15563,7 @@ function joinNormalized(values) {
|
|
|
15523
15563
|
async function readStoredMessages(rootDir, threadKey) {
|
|
15524
15564
|
const filePath = getThreadMessagesFilePath(rootDir, threadKey);
|
|
15525
15565
|
try {
|
|
15526
|
-
const raw = await
|
|
15566
|
+
const raw = await import_node_fs12.promises.readFile(filePath, "utf8");
|
|
15527
15567
|
return raw.split("\n").map((line) => line.trim()).filter(Boolean).map((line) => normalizeStoredMessage(JSON.parse(line)));
|
|
15528
15568
|
} catch {
|
|
15529
15569
|
return [];
|
|
@@ -15532,20 +15572,20 @@ async function readStoredMessages(rootDir, threadKey) {
|
|
|
15532
15572
|
async function readLegacyStoredThread(rootDir, threadKey) {
|
|
15533
15573
|
const filePath = getLegacyThreadFilePath(rootDir, threadKey);
|
|
15534
15574
|
try {
|
|
15535
|
-
const raw = await
|
|
15575
|
+
const raw = await import_node_fs12.promises.readFile(filePath, "utf8");
|
|
15536
15576
|
return JSON.parse(raw);
|
|
15537
15577
|
} catch {
|
|
15538
15578
|
return null;
|
|
15539
15579
|
}
|
|
15540
15580
|
}
|
|
15541
15581
|
function getThreadMetaFilePath(rootDir, threadKey) {
|
|
15542
|
-
return
|
|
15582
|
+
return import_node_path18.default.join(rootDir, "threads", `${threadKey}.json`);
|
|
15543
15583
|
}
|
|
15544
15584
|
function getThreadMessagesFilePath(rootDir, threadKey) {
|
|
15545
|
-
return
|
|
15585
|
+
return import_node_path18.default.join(rootDir, "threads", `${threadKey}.jsonl`);
|
|
15546
15586
|
}
|
|
15547
15587
|
function getLegacyThreadFilePath(rootDir, threadKey) {
|
|
15548
|
-
return
|
|
15588
|
+
return import_node_path18.default.join(rootDir, "threads", `${threadKey}.json`);
|
|
15549
15589
|
}
|
|
15550
15590
|
function normalizeStoredMessage(message) {
|
|
15551
15591
|
return {
|
|
@@ -15561,9 +15601,9 @@ function normalizeStoredMessage(message) {
|
|
|
15561
15601
|
|
|
15562
15602
|
// src/commands/CollectCommandHandler.ts
|
|
15563
15603
|
async function readOutgoingAttachment(filePath) {
|
|
15564
|
-
const resolved =
|
|
15565
|
-
const data = await
|
|
15566
|
-
const extension =
|
|
15604
|
+
const resolved = import_node_path19.default.resolve(filePath);
|
|
15605
|
+
const data = await import_node_fs13.promises.readFile(resolved);
|
|
15606
|
+
const extension = import_node_path19.default.extname(resolved).toLowerCase();
|
|
15567
15607
|
const contentTypes = {
|
|
15568
15608
|
".png": "image/png",
|
|
15569
15609
|
".jpg": "image/jpeg",
|
|
@@ -15578,7 +15618,7 @@ async function readOutgoingAttachment(filePath) {
|
|
|
15578
15618
|
};
|
|
15579
15619
|
return {
|
|
15580
15620
|
base64: data.toString("base64"),
|
|
15581
|
-
fileName:
|
|
15621
|
+
fileName: import_node_path19.default.basename(resolved),
|
|
15582
15622
|
contentType: contentTypes[extension] ?? "application/octet-stream",
|
|
15583
15623
|
size: data.byteLength
|
|
15584
15624
|
};
|
|
@@ -15848,7 +15888,7 @@ var CollectCommandHandler = class {
|
|
|
15848
15888
|
}
|
|
15849
15889
|
async writeSyncReport(rootDir, target, results, failures, syncedAt) {
|
|
15850
15890
|
const syncId = toSyncId(syncedAt);
|
|
15851
|
-
const reportPath =
|
|
15891
|
+
const reportPath = import_node_path19.default.join(rootDir, "syncs", `${syncId}.json`);
|
|
15852
15892
|
const threadReports = results.map((result) => ({
|
|
15853
15893
|
threadKey: result.thread.threadKey,
|
|
15854
15894
|
threadName: result.thread.threadName,
|
|
@@ -15857,8 +15897,8 @@ var CollectCommandHandler = class {
|
|
|
15857
15897
|
addedMessages: result.diff.added,
|
|
15858
15898
|
upgradedMessages: result.diff.upgraded
|
|
15859
15899
|
})).filter((thread) => thread.addedCount > 0 || thread.upgradedCount > 0);
|
|
15860
|
-
await
|
|
15861
|
-
await
|
|
15900
|
+
await import_node_fs13.promises.mkdir(import_node_path19.default.dirname(reportPath), { recursive: true });
|
|
15901
|
+
await import_node_fs13.promises.writeFile(
|
|
15862
15902
|
reportPath,
|
|
15863
15903
|
JSON.stringify(
|
|
15864
15904
|
{
|
|
@@ -16036,19 +16076,19 @@ async function archiveMessageImage(rootDir, attachmentRoot, threadKey, imagePath
|
|
|
16036
16076
|
if (!imagePath || isExternalImageRef(imagePath)) {
|
|
16037
16077
|
return imagePath;
|
|
16038
16078
|
}
|
|
16039
|
-
const normalized =
|
|
16079
|
+
const normalized = import_node_path19.default.posix.normalize(imagePath.replace(/\\/g, "/"));
|
|
16040
16080
|
if (normalized.startsWith("attachments/")) {
|
|
16041
|
-
return
|
|
16081
|
+
return import_node_path19.default.join(rootDir, ...normalized.split("/"));
|
|
16042
16082
|
}
|
|
16043
|
-
if (normalized.startsWith("../") ||
|
|
16083
|
+
if (normalized.startsWith("../") || import_node_path19.default.posix.isAbsolute(normalized)) {
|
|
16044
16084
|
return imagePath;
|
|
16045
16085
|
}
|
|
16046
|
-
const sourcePath =
|
|
16047
|
-
const destinationRelativePath =
|
|
16048
|
-
const destinationPath =
|
|
16086
|
+
const sourcePath = import_node_path19.default.join(attachmentRoot, ...normalized.split("/"));
|
|
16087
|
+
const destinationRelativePath = import_node_path19.default.posix.join("attachments", threadKey, normalized);
|
|
16088
|
+
const destinationPath = import_node_path19.default.join(rootDir, ...destinationRelativePath.split("/"));
|
|
16049
16089
|
try {
|
|
16050
|
-
await
|
|
16051
|
-
await
|
|
16090
|
+
await import_node_fs13.promises.mkdir(import_node_path19.default.dirname(destinationPath), { recursive: true });
|
|
16091
|
+
await import_node_fs13.promises.copyFile(sourcePath, destinationPath);
|
|
16052
16092
|
return destinationPath;
|
|
16053
16093
|
} catch {
|
|
16054
16094
|
return imagePath;
|
|
@@ -16058,7 +16098,7 @@ function resolveLocalAttachmentRoot(sourceKey) {
|
|
|
16058
16098
|
if (sourceKey !== "cc" && sourceKey !== "yelling") {
|
|
16059
16099
|
return null;
|
|
16060
16100
|
}
|
|
16061
|
-
return
|
|
16101
|
+
return import_node_path19.default.join(import_node_os8.default.homedir(), "Library", "Application Support", sourceKey, "attachments.noindex");
|
|
16062
16102
|
}
|
|
16063
16103
|
function isExternalImageRef(imagePath) {
|
|
16064
16104
|
return /^[a-z][a-z0-9+.-]*:/i.test(imagePath);
|
|
@@ -16682,7 +16722,7 @@ function pad2(value) {
|
|
|
16682
16722
|
}
|
|
16683
16723
|
|
|
16684
16724
|
// src/commands/ChatRoomCommandHandler.ts
|
|
16685
|
-
var
|
|
16725
|
+
var import_node_fs14 = require("fs");
|
|
16686
16726
|
var ChatRoomCommandHandler = class {
|
|
16687
16727
|
async handle(args) {
|
|
16688
16728
|
const sdk = await loadChatSdk();
|
|
@@ -16732,8 +16772,8 @@ var ChatRoomCommandHandler = class {
|
|
|
16732
16772
|
const a = await this.connect(sdk, args.botA, args.app, args.hubUrl, args.authBaseUrl);
|
|
16733
16773
|
const b = await this.connect(sdk, args.botB, args.app, args.hubUrl, args.authBaseUrl);
|
|
16734
16774
|
try {
|
|
16735
|
-
const botA = sdk.parsePmateBotKeyJson((0,
|
|
16736
|
-
const botB = sdk.parsePmateBotKeyJson((0,
|
|
16775
|
+
const botA = sdk.parsePmateBotKeyJson((0, import_node_fs14.readFileSync)(args.botA, "utf8"));
|
|
16776
|
+
const botB = sdk.parsePmateBotKeyJson((0, import_node_fs14.readFileSync)(args.botB, "utf8"));
|
|
16737
16777
|
await a.requestFriend({ to: botB.name, message: "smoke friend request" });
|
|
16738
16778
|
await b.acceptFriend({ to: botA.name, message: "smoke friend accept" });
|
|
16739
16779
|
await a.sendDm({ to: botB.name, text: "smoke dm from a" });
|
|
@@ -16752,7 +16792,7 @@ var ChatRoomCommandHandler = class {
|
|
|
16752
16792
|
if (!botPath) {
|
|
16753
16793
|
throw new Error("Missing required option: --bot");
|
|
16754
16794
|
}
|
|
16755
|
-
const botKey = sdk.parsePmateBotKeyJson((0,
|
|
16795
|
+
const botKey = sdk.parsePmateBotKeyJson((0, import_node_fs14.readFileSync)(botPath, "utf8"));
|
|
16756
16796
|
const client = sdk.createChatClient({ appId, botKey, hubUrl, authBaseUrl });
|
|
16757
16797
|
await client.connect();
|
|
16758
16798
|
return client;
|
|
@@ -16764,8 +16804,8 @@ async function loadChatSdk() {
|
|
|
16764
16804
|
}
|
|
16765
16805
|
|
|
16766
16806
|
// src/commands/RegistryResourceCommandHandler.ts
|
|
16767
|
-
var
|
|
16768
|
-
var
|
|
16807
|
+
var import_node_fs15 = require("fs");
|
|
16808
|
+
var import_node_path20 = __toESM(require("path"));
|
|
16769
16809
|
init_sessionStore();
|
|
16770
16810
|
var RegistryResourceCommandHandler = class {
|
|
16771
16811
|
async handle(args) {
|
|
@@ -16800,9 +16840,9 @@ var RegistryResourceCommandHandler = class {
|
|
|
16800
16840
|
}
|
|
16801
16841
|
};
|
|
16802
16842
|
function readJson(filePath) {
|
|
16803
|
-
const absolutePath =
|
|
16804
|
-
if (!(0,
|
|
16805
|
-
return JSON.parse((0,
|
|
16843
|
+
const absolutePath = import_node_path20.default.resolve(process.cwd(), filePath);
|
|
16844
|
+
if (!(0, import_node_fs15.existsSync)(absolutePath)) throw new Error(`JSON file not found: ${absolutePath}`);
|
|
16845
|
+
return JSON.parse((0, import_node_fs15.readFileSync)(absolutePath, "utf8"));
|
|
16806
16846
|
}
|
|
16807
16847
|
async function request(baseUrl, token, method, pathname, body) {
|
|
16808
16848
|
const response = await fetch(`${baseUrl}${pathname}`, {
|
|
@@ -16816,8 +16856,8 @@ async function request(baseUrl, token, method, pathname, body) {
|
|
|
16816
16856
|
}
|
|
16817
16857
|
|
|
16818
16858
|
// src/commands/CallCommandHandler.ts
|
|
16819
|
-
var
|
|
16820
|
-
var
|
|
16859
|
+
var import_node_fs16 = require("fs");
|
|
16860
|
+
var import_node_path21 = __toESM(require("path"));
|
|
16821
16861
|
init_dist2();
|
|
16822
16862
|
init_sessionStore();
|
|
16823
16863
|
var CallCommandHandler = class {
|
|
@@ -16840,8 +16880,8 @@ var CallCommandHandler = class {
|
|
|
16840
16880
|
}
|
|
16841
16881
|
};
|
|
16842
16882
|
async function callWithBinaryFile(hub, functionId, filePath, contentType, timeoutMs) {
|
|
16843
|
-
const absolutePath =
|
|
16844
|
-
if (!(0,
|
|
16883
|
+
const absolutePath = import_node_path21.default.resolve(process.cwd(), filePath);
|
|
16884
|
+
if (!(0, import_node_fs16.existsSync)(absolutePath)) throw new Error(`Binary file not found: ${absolutePath}`);
|
|
16845
16885
|
const mimeType = contentType || inferContentType(absolutePath);
|
|
16846
16886
|
const result = hub.stream({
|
|
16847
16887
|
functionId,
|
|
@@ -16851,7 +16891,7 @@ async function callWithBinaryFile(hub, functionId, filePath, contentType, timeou
|
|
|
16851
16891
|
return result.finish();
|
|
16852
16892
|
}
|
|
16853
16893
|
async function* streamFile(filePath, contentType) {
|
|
16854
|
-
for await (const chunk of (0,
|
|
16894
|
+
for await (const chunk of (0, import_node_fs16.createReadStream)(filePath)) {
|
|
16855
16895
|
yield new Blob([chunk], { type: contentType });
|
|
16856
16896
|
}
|
|
16857
16897
|
}
|
|
@@ -16866,12 +16906,12 @@ function inferContentType(filePath) {
|
|
|
16866
16906
|
".wav": "audio/wav",
|
|
16867
16907
|
".webm": "audio/webm"
|
|
16868
16908
|
};
|
|
16869
|
-
return contentTypes[
|
|
16909
|
+
return contentTypes[import_node_path21.default.extname(filePath).toLowerCase()] || "application/octet-stream";
|
|
16870
16910
|
}
|
|
16871
16911
|
function readJson2(filePath) {
|
|
16872
|
-
const absolutePath =
|
|
16873
|
-
if (!(0,
|
|
16874
|
-
const decoded = JSON.parse((0,
|
|
16912
|
+
const absolutePath = import_node_path21.default.resolve(process.cwd(), filePath);
|
|
16913
|
+
if (!(0, import_node_fs16.existsSync)(absolutePath)) throw new Error(`JSON file not found: ${absolutePath}`);
|
|
16914
|
+
const decoded = JSON.parse((0, import_node_fs16.readFileSync)(absolutePath, "utf8"));
|
|
16875
16915
|
if (!decoded || typeof decoded !== "object" || Array.isArray(decoded)) {
|
|
16876
16916
|
throw new Error("Call input file must contain a JSON object");
|
|
16877
16917
|
}
|
|
@@ -17258,8 +17298,8 @@ var NsCommandHandler = class {
|
|
|
17258
17298
|
};
|
|
17259
17299
|
|
|
17260
17300
|
// src/commands/StoreCommandHandler.ts
|
|
17261
|
-
var
|
|
17262
|
-
var
|
|
17301
|
+
var import_node_fs17 = require("fs");
|
|
17302
|
+
var import_node_path22 = __toESM(require("path"));
|
|
17263
17303
|
init_sessionStore();
|
|
17264
17304
|
var StoreCommandHandler = class {
|
|
17265
17305
|
async handle(args) {
|
|
@@ -17413,11 +17453,11 @@ var StoreCommandHandler = class {
|
|
|
17413
17453
|
return payload.data ?? [];
|
|
17414
17454
|
}
|
|
17415
17455
|
readJsonFile(filePath) {
|
|
17416
|
-
const absolutePath =
|
|
17417
|
-
if (!(0,
|
|
17456
|
+
const absolutePath = import_node_path22.default.resolve(process.cwd(), filePath);
|
|
17457
|
+
if (!(0, import_node_fs17.existsSync)(absolutePath)) {
|
|
17418
17458
|
throw new Error(`JSON file not found: ${absolutePath}`);
|
|
17419
17459
|
}
|
|
17420
|
-
const raw = (0,
|
|
17460
|
+
const raw = (0, import_node_fs17.readFileSync)(absolutePath, "utf8");
|
|
17421
17461
|
try {
|
|
17422
17462
|
return JSON.parse(raw);
|
|
17423
17463
|
} catch (error) {
|
|
@@ -17469,14 +17509,14 @@ var StoreCommandHandler = class {
|
|
|
17469
17509
|
};
|
|
17470
17510
|
|
|
17471
17511
|
// src/commands/AppCommandHandler.ts
|
|
17472
|
-
var
|
|
17473
|
-
var
|
|
17512
|
+
var import_node_fs19 = require("fs");
|
|
17513
|
+
var import_node_path24 = __toESM(require("path"));
|
|
17474
17514
|
init_sessionStore();
|
|
17475
17515
|
|
|
17476
17516
|
// src/appIcon.ts
|
|
17477
|
-
var
|
|
17478
|
-
var
|
|
17479
|
-
var
|
|
17517
|
+
var import_node_fs18 = require("fs");
|
|
17518
|
+
var import_node_os9 = __toESM(require("os"));
|
|
17519
|
+
var import_node_path23 = __toESM(require("path"));
|
|
17480
17520
|
var import_sharp = __toESM(require("sharp"));
|
|
17481
17521
|
init_namespacedRef();
|
|
17482
17522
|
var ANDROID_ICON_SPECS = [
|
|
@@ -17581,13 +17621,13 @@ function createAppIconExportPlans(input) {
|
|
|
17581
17621
|
if (!input.outDir) {
|
|
17582
17622
|
throw new Error("App icon preset export requires --out-dir.");
|
|
17583
17623
|
}
|
|
17584
|
-
const outDir =
|
|
17585
|
-
(0,
|
|
17624
|
+
const outDir = import_node_path23.default.resolve(input.cwd, input.outDir);
|
|
17625
|
+
(0, import_node_fs18.mkdirSync)(outDir, { recursive: true });
|
|
17586
17626
|
return specs.map((spec) => ({
|
|
17587
17627
|
width: spec.width,
|
|
17588
17628
|
height: spec.height,
|
|
17589
17629
|
format: "png",
|
|
17590
|
-
outputPath:
|
|
17630
|
+
outputPath: import_node_path23.default.join(
|
|
17591
17631
|
outDir,
|
|
17592
17632
|
`${namespace}-${objectId}-${spec.name}-${spec.width}x${spec.height}.png`
|
|
17593
17633
|
)
|
|
@@ -17600,8 +17640,8 @@ function createAppIconExportPlans(input) {
|
|
|
17600
17640
|
if (!input.output) {
|
|
17601
17641
|
throw new Error("Single-size app icon export requires --output.");
|
|
17602
17642
|
}
|
|
17603
|
-
const resolvedOutput =
|
|
17604
|
-
(0,
|
|
17643
|
+
const resolvedOutput = import_node_path23.default.resolve(input.cwd, input.output);
|
|
17644
|
+
(0, import_node_fs18.mkdirSync)(import_node_path23.default.dirname(resolvedOutput), { recursive: true });
|
|
17605
17645
|
return [
|
|
17606
17646
|
{
|
|
17607
17647
|
width: input.width,
|
|
@@ -17615,7 +17655,7 @@ async function exportAppIcon(icon, plans) {
|
|
|
17615
17655
|
const svg = await resolveAppIconSvg(icon);
|
|
17616
17656
|
for (const plan of plans) {
|
|
17617
17657
|
const bytes = await renderAppIcon(svg, plan.width, plan.height, plan.format);
|
|
17618
|
-
(0,
|
|
17658
|
+
(0, import_node_fs18.writeFileSync)(plan.outputPath, bytes);
|
|
17619
17659
|
}
|
|
17620
17660
|
}
|
|
17621
17661
|
async function renderAppIconVariant(input) {
|
|
@@ -17623,9 +17663,9 @@ async function renderAppIconVariant(input) {
|
|
|
17623
17663
|
const bytes = await renderAppIcon(svg, input.width, input.height, input.format);
|
|
17624
17664
|
let outputPath;
|
|
17625
17665
|
if (input.output) {
|
|
17626
|
-
outputPath =
|
|
17627
|
-
(0,
|
|
17628
|
-
(0,
|
|
17666
|
+
outputPath = import_node_path23.default.resolve(input.cwd, input.output);
|
|
17667
|
+
(0, import_node_fs18.mkdirSync)(import_node_path23.default.dirname(outputPath), { recursive: true });
|
|
17668
|
+
(0, import_node_fs18.writeFileSync)(outputPath, bytes);
|
|
17629
17669
|
}
|
|
17630
17670
|
if (input.name) {
|
|
17631
17671
|
return {
|
|
@@ -17646,7 +17686,7 @@ async function renderAppIconVariant(input) {
|
|
|
17646
17686
|
};
|
|
17647
17687
|
}
|
|
17648
17688
|
async function loadAppIconVariantFile(input) {
|
|
17649
|
-
const absolutePath =
|
|
17689
|
+
const absolutePath = import_node_path23.default.resolve(input.cwd, input.filePath);
|
|
17650
17690
|
const format = inferVariantFormatFromPath(absolutePath);
|
|
17651
17691
|
return {
|
|
17652
17692
|
value: input.name ? await uploadAppIconVariantAsset({
|
|
@@ -17655,7 +17695,7 @@ async function loadAppIconVariantFile(input) {
|
|
|
17655
17695
|
name: input.name,
|
|
17656
17696
|
format,
|
|
17657
17697
|
sourcePath: absolutePath
|
|
17658
|
-
}) : createImageDataUrl((0,
|
|
17698
|
+
}) : createImageDataUrl((0, import_node_fs18.readFileSync)(absolutePath), format),
|
|
17659
17699
|
format,
|
|
17660
17700
|
absolutePath
|
|
17661
17701
|
};
|
|
@@ -17714,7 +17754,7 @@ function shouldAutoGenerateDefaultVariant(icon) {
|
|
|
17714
17754
|
return looksLikeSvgMarkup(icon) || looksLikeSvgUrl(icon);
|
|
17715
17755
|
}
|
|
17716
17756
|
function inferVariantFormatFromPath(filePath) {
|
|
17717
|
-
const ext =
|
|
17757
|
+
const ext = import_node_path23.default.extname(filePath).toLowerCase();
|
|
17718
17758
|
switch (ext) {
|
|
17719
17759
|
case ".png":
|
|
17720
17760
|
return "png";
|
|
@@ -17785,13 +17825,13 @@ async function uploadAppIconVariantAsset(input) {
|
|
|
17785
17825
|
await AliyunService.uploadFile(sourcePath, DEFAULT_APP_ICON_VARIANT_BUCKET, objectKey);
|
|
17786
17826
|
} finally {
|
|
17787
17827
|
if (shouldCleanup) {
|
|
17788
|
-
(0,
|
|
17828
|
+
(0, import_node_fs18.rmSync)(import_node_path23.default.dirname(sourcePath), { recursive: true, force: true });
|
|
17789
17829
|
}
|
|
17790
17830
|
}
|
|
17791
17831
|
return `${DEFAULT_APP_ICON_VARIANT_PUBLIC_BASE_URL}/${objectKey}`;
|
|
17792
17832
|
}
|
|
17793
17833
|
function buildAppIconVariantObjectKey(input) {
|
|
17794
|
-
return
|
|
17834
|
+
return import_node_path23.default.posix.join(
|
|
17795
17835
|
"apps",
|
|
17796
17836
|
`${resolveAppIconAssetStem(input.icon, input.appRef)}-${input.name}.${extensionForIconFormat(input.format)}`
|
|
17797
17837
|
);
|
|
@@ -17800,8 +17840,8 @@ function resolveAppIconAssetStem(icon, appRef2) {
|
|
|
17800
17840
|
if (icon) {
|
|
17801
17841
|
try {
|
|
17802
17842
|
const url = new URL(icon);
|
|
17803
|
-
const ext =
|
|
17804
|
-
const basename =
|
|
17843
|
+
const ext = import_node_path23.default.posix.extname(url.pathname);
|
|
17844
|
+
const basename = import_node_path23.default.posix.basename(url.pathname, ext);
|
|
17805
17845
|
const normalized = sanitizeAppIconAssetStem(basename);
|
|
17806
17846
|
if (normalized) {
|
|
17807
17847
|
return normalized;
|
|
@@ -17830,9 +17870,9 @@ function writeTempAppIconVariantFile(objectKey, format, bytes) {
|
|
|
17830
17870
|
if (!bytes) {
|
|
17831
17871
|
throw new Error("App icon variant upload requires bytes or a source file.");
|
|
17832
17872
|
}
|
|
17833
|
-
const tempDir = (0,
|
|
17834
|
-
const tempPath =
|
|
17835
|
-
(0,
|
|
17873
|
+
const tempDir = (0, import_node_fs18.mkdtempSync)(import_node_path23.default.join(import_node_os9.default.tmpdir(), "pmate-app-icon-"));
|
|
17874
|
+
const tempPath = import_node_path23.default.join(tempDir, import_node_path23.default.basename(objectKey) || `variant.${extensionForIconFormat(format)}`);
|
|
17875
|
+
(0, import_node_fs18.writeFileSync)(tempPath, bytes);
|
|
17836
17876
|
return tempPath;
|
|
17837
17877
|
}
|
|
17838
17878
|
|
|
@@ -18041,10 +18081,10 @@ var AppCommandHandler = class {
|
|
|
18041
18081
|
}
|
|
18042
18082
|
readJsonFile(filePath) {
|
|
18043
18083
|
const absolutePath = this.resolveFilePath(filePath);
|
|
18044
|
-
if (!(0,
|
|
18084
|
+
if (!(0, import_node_fs19.existsSync)(absolutePath)) {
|
|
18045
18085
|
throw new Error(`JSON file not found: ${absolutePath}`);
|
|
18046
18086
|
}
|
|
18047
|
-
const raw = (0,
|
|
18087
|
+
const raw = (0, import_node_fs19.readFileSync)(absolutePath, "utf8");
|
|
18048
18088
|
try {
|
|
18049
18089
|
return JSON.parse(raw);
|
|
18050
18090
|
} catch (error) {
|
|
@@ -18054,10 +18094,10 @@ var AppCommandHandler = class {
|
|
|
18054
18094
|
}
|
|
18055
18095
|
async preparePayload(filePath, appRef2) {
|
|
18056
18096
|
const absolutePath = this.resolveFilePath(filePath);
|
|
18057
|
-
return prepareAppPayload(this.readJsonFile(filePath),
|
|
18097
|
+
return prepareAppPayload(this.readJsonFile(filePath), import_node_path24.default.dirname(absolutePath), { appRef: appRef2 });
|
|
18058
18098
|
}
|
|
18059
18099
|
resolveFilePath(filePath) {
|
|
18060
|
-
return
|
|
18100
|
+
return import_node_path24.default.resolve(process.cwd(), filePath);
|
|
18061
18101
|
}
|
|
18062
18102
|
async request(baseUrl, token, method, pathname, body) {
|
|
18063
18103
|
const response = await fetch(`${baseUrl}${pathname}`, {
|
|
@@ -18177,18 +18217,18 @@ function readNamespaceFromPayload(payload) {
|
|
|
18177
18217
|
}
|
|
18178
18218
|
|
|
18179
18219
|
// src/commands/ServiceCommandHandler.ts
|
|
18180
|
-
var
|
|
18220
|
+
var import_node_fs22 = require("fs");
|
|
18181
18221
|
var import_promises5 = require("fs/promises");
|
|
18182
|
-
var
|
|
18222
|
+
var import_node_path27 = __toESM(require("path"));
|
|
18183
18223
|
var import_node_child_process11 = require("child_process");
|
|
18184
18224
|
var import_promises6 = require("readline/promises");
|
|
18185
18225
|
|
|
18186
18226
|
// src/services/AndroidApkReleaseService.ts
|
|
18187
18227
|
var import_node_child_process9 = require("child_process");
|
|
18188
18228
|
var import_node_crypto4 = require("crypto");
|
|
18189
|
-
var
|
|
18190
|
-
var
|
|
18191
|
-
var
|
|
18229
|
+
var import_node_fs20 = require("fs");
|
|
18230
|
+
var import_node_os10 = __toESM(require("os"));
|
|
18231
|
+
var import_node_path25 = __toESM(require("path"));
|
|
18192
18232
|
var ANDROID_APK_BUCKET = "parrot-static";
|
|
18193
18233
|
var ANDROID_APK_PUBLIC_BASE_URL = "https://parrot-static.pmate.chat";
|
|
18194
18234
|
var AndroidApkReleaseService = class {
|
|
@@ -18222,7 +18262,7 @@ var AndroidApkReleaseService = class {
|
|
|
18222
18262
|
}
|
|
18223
18263
|
await AliyunService.uploadFile(apkPath, ANDROID_APK_BUCKET, objectKey);
|
|
18224
18264
|
const sha256 = await sha256File(apkPath);
|
|
18225
|
-
const size = (0,
|
|
18265
|
+
const size = (0, import_node_fs20.statSync)(apkPath).size;
|
|
18226
18266
|
const artifact = {
|
|
18227
18267
|
serviceId: service.id,
|
|
18228
18268
|
env: options.env,
|
|
@@ -18256,15 +18296,15 @@ var AndroidApkReleaseService = class {
|
|
|
18256
18296
|
minimumVersionCode: options.minimumVersionCode
|
|
18257
18297
|
});
|
|
18258
18298
|
const objectKey = buildAndroidLatestManifestObjectKey(service.namespace, service.name);
|
|
18259
|
-
const tempDir = (0,
|
|
18260
|
-
const manifestPath =
|
|
18299
|
+
const tempDir = (0, import_node_fs20.mkdtempSync)(import_node_path25.default.join(import_node_os10.default.tmpdir(), "pmate-apk-latest-"));
|
|
18300
|
+
const manifestPath = import_node_path25.default.join(tempDir, "latest.json");
|
|
18261
18301
|
try {
|
|
18262
|
-
(0,
|
|
18302
|
+
(0, import_node_fs20.writeFileSync)(manifestPath, `${JSON.stringify(manifest, null, 2)}
|
|
18263
18303
|
`);
|
|
18264
18304
|
await AliyunService.uploadFile(manifestPath, ANDROID_APK_BUCKET, objectKey);
|
|
18265
18305
|
ui.success(`Published Android update manifest ${ANDROID_APK_PUBLIC_BASE_URL}/${objectKey}`);
|
|
18266
18306
|
} finally {
|
|
18267
|
-
(0,
|
|
18307
|
+
(0, import_node_fs20.rmSync)(tempDir, { recursive: true, force: true });
|
|
18268
18308
|
}
|
|
18269
18309
|
}
|
|
18270
18310
|
async list(service, options) {
|
|
@@ -18280,7 +18320,7 @@ var AndroidApkReleaseService = class {
|
|
|
18280
18320
|
const prefix = `apks/${service.namespace}/${service.name}`;
|
|
18281
18321
|
const objects = await AliyunService.listObjects(ANDROID_APK_BUCKET, prefix);
|
|
18282
18322
|
return objects.filter((item) => item.name.endsWith(".apk")).map((item) => {
|
|
18283
|
-
const versionName =
|
|
18323
|
+
const versionName = import_node_path25.default.basename(item.name, ".apk");
|
|
18284
18324
|
return {
|
|
18285
18325
|
serviceId,
|
|
18286
18326
|
env: options.env ?? "unknown",
|
|
@@ -18303,7 +18343,7 @@ var AndroidApkReleaseService = class {
|
|
|
18303
18343
|
}
|
|
18304
18344
|
}
|
|
18305
18345
|
resolveRepoRoot(service, cwd) {
|
|
18306
|
-
if (cwd) return
|
|
18346
|
+
if (cwd) return import_node_path25.default.resolve(process.cwd(), cwd);
|
|
18307
18347
|
const repository = this.getRepository(service);
|
|
18308
18348
|
if (repository) {
|
|
18309
18349
|
return resolveRepositoryLocalRoot(repository);
|
|
@@ -18315,8 +18355,8 @@ var AndroidApkReleaseService = class {
|
|
|
18315
18355
|
if (!dir) {
|
|
18316
18356
|
throw new Error(`Missing dir for android service ${service.id}`);
|
|
18317
18357
|
}
|
|
18318
|
-
const appDir =
|
|
18319
|
-
if (!(0,
|
|
18358
|
+
const appDir = import_node_path25.default.resolve(repoRoot, dir);
|
|
18359
|
+
if (!(0, import_node_fs20.existsSync)(appDir)) {
|
|
18320
18360
|
throw new Error(`Android app dir not found: ${appDir}`);
|
|
18321
18361
|
}
|
|
18322
18362
|
return appDir;
|
|
@@ -18332,11 +18372,11 @@ var AndroidApkReleaseService = class {
|
|
|
18332
18372
|
return void 0;
|
|
18333
18373
|
}
|
|
18334
18374
|
async runGradleAssembleAndFindApk(repoRoot, appDir, variant) {
|
|
18335
|
-
const gradlew = [
|
|
18375
|
+
const gradlew = [import_node_path25.default.join(appDir, "gradlew"), import_node_path25.default.join(repoRoot, "gradlew")].find((candidate) => (0, import_node_fs20.existsSync)(candidate));
|
|
18336
18376
|
if (!gradlew) {
|
|
18337
18377
|
throw new Error(`Gradle wrapper not found in ${appDir} or ${repoRoot}`);
|
|
18338
18378
|
}
|
|
18339
|
-
const gradleCwd =
|
|
18379
|
+
const gradleCwd = import_node_path25.default.dirname(gradlew);
|
|
18340
18380
|
const normalizedVariant = variant.toLowerCase();
|
|
18341
18381
|
const taskSuffix = `assemble${capitalize(normalizedVariant)}`;
|
|
18342
18382
|
const tasks = [`:app:${taskSuffix}`, taskSuffix];
|
|
@@ -18424,7 +18464,7 @@ function resolveRepositoryLocalRoot(repository) {
|
|
|
18424
18464
|
if (!repoName) {
|
|
18425
18465
|
throw new Error(`Invalid repository: ${repository}`);
|
|
18426
18466
|
}
|
|
18427
|
-
return
|
|
18467
|
+
return import_node_path25.default.join(import_node_os10.default.homedir(), "dev", "pmate", repoName);
|
|
18428
18468
|
}
|
|
18429
18469
|
function bumpAndroidGradleVersionText(source, bump) {
|
|
18430
18470
|
const versionNameMatch = source.match(/(^\s*versionName\s+["'])([^"']+)(["']\s*$)/m) ?? source.match(/(^\s*versionName\s*=\s*["'])([^"']+)(["']\s*$)/m);
|
|
@@ -18480,42 +18520,42 @@ function parseGradleOutputMetadata(source, apkFileName) {
|
|
|
18480
18520
|
}
|
|
18481
18521
|
function bumpAndroidProjectVersion(appDir, bump) {
|
|
18482
18522
|
const candidates = [
|
|
18483
|
-
|
|
18484
|
-
|
|
18485
|
-
|
|
18486
|
-
|
|
18523
|
+
import_node_path25.default.join(appDir, "app", "build.gradle.kts"),
|
|
18524
|
+
import_node_path25.default.join(appDir, "app", "build.gradle"),
|
|
18525
|
+
import_node_path25.default.join(appDir, "build.gradle.kts"),
|
|
18526
|
+
import_node_path25.default.join(appDir, "build.gradle")
|
|
18487
18527
|
];
|
|
18488
18528
|
for (const candidate of candidates) {
|
|
18489
|
-
if (!(0,
|
|
18490
|
-
const result = bumpAndroidGradleVersionText((0,
|
|
18491
|
-
(0,
|
|
18529
|
+
if (!(0, import_node_fs20.existsSync)(candidate)) continue;
|
|
18530
|
+
const result = bumpAndroidGradleVersionText((0, import_node_fs20.readFileSync)(candidate, "utf8"), bump);
|
|
18531
|
+
(0, import_node_fs20.writeFileSync)(candidate, result.source);
|
|
18492
18532
|
return { filePath: candidate, ...result };
|
|
18493
18533
|
}
|
|
18494
18534
|
throw new Error(`No Android Gradle version file found under ${appDir}`);
|
|
18495
18535
|
}
|
|
18496
18536
|
function findLatestApk(repoRoot, appDir, variant) {
|
|
18497
18537
|
const dirs = [
|
|
18498
|
-
|
|
18499
|
-
|
|
18500
|
-
|
|
18538
|
+
import_node_path25.default.join(appDir, "app", "build", "outputs", "apk", variant),
|
|
18539
|
+
import_node_path25.default.join(appDir, "build", "outputs", "apk", variant),
|
|
18540
|
+
import_node_path25.default.join(repoRoot, "app", "build", "outputs", "apk", variant)
|
|
18501
18541
|
];
|
|
18502
18542
|
const files = dirs.flatMap((dir) => listApks(dir));
|
|
18503
18543
|
if (files.length === 0) {
|
|
18504
18544
|
throw new Error(`Cannot find APK output for variant ${variant}`);
|
|
18505
18545
|
}
|
|
18506
|
-
files.sort((a, b) => (0,
|
|
18546
|
+
files.sort((a, b) => (0, import_node_fs20.statSync)(b).mtimeMs - (0, import_node_fs20.statSync)(a).mtimeMs);
|
|
18507
18547
|
return files[0];
|
|
18508
18548
|
}
|
|
18509
18549
|
function readGradleOutputMetadata(apkPath) {
|
|
18510
|
-
const metadataPath =
|
|
18511
|
-
if (!(0,
|
|
18550
|
+
const metadataPath = import_node_path25.default.join(import_node_path25.default.dirname(apkPath), "output-metadata.json");
|
|
18551
|
+
if (!(0, import_node_fs20.existsSync)(metadataPath)) {
|
|
18512
18552
|
throw new Error(`Gradle output metadata not found: ${metadataPath}`);
|
|
18513
18553
|
}
|
|
18514
|
-
return parseGradleOutputMetadata((0,
|
|
18554
|
+
return parseGradleOutputMetadata((0, import_node_fs20.readFileSync)(metadataPath, "utf8"), import_node_path25.default.basename(apkPath));
|
|
18515
18555
|
}
|
|
18516
18556
|
function listApks(dir) {
|
|
18517
|
-
if (!(0,
|
|
18518
|
-
return (0,
|
|
18557
|
+
if (!(0, import_node_fs20.existsSync)(dir)) return [];
|
|
18558
|
+
return (0, import_node_fs20.readdirSync)(dir).filter((entry) => entry.endsWith(".apk")).map((entry) => import_node_path25.default.join(dir, entry)).filter((entry) => (0, import_node_fs20.statSync)(entry).isFile());
|
|
18519
18559
|
}
|
|
18520
18560
|
function runCommand(command, args, cwd) {
|
|
18521
18561
|
return new Promise((resolve, reject) => {
|
|
@@ -18549,26 +18589,26 @@ async function runAndroidSdkToolCapture(toolName, args) {
|
|
|
18549
18589
|
return runCommandCapture(toolPath, args);
|
|
18550
18590
|
}
|
|
18551
18591
|
function findAndroidSdkTool(toolName) {
|
|
18552
|
-
const sdkRoots = [process.env.ANDROID_HOME, process.env.ANDROID_SDK_ROOT].filter((item) => Boolean(item)).map((item) =>
|
|
18592
|
+
const sdkRoots = [process.env.ANDROID_HOME, process.env.ANDROID_SDK_ROOT].filter((item) => Boolean(item)).map((item) => import_node_path25.default.resolve(item));
|
|
18553
18593
|
for (const sdkRoot of sdkRoots) {
|
|
18554
|
-
const candidates = toolName === "aapt" ? listVersionedToolCandidates(
|
|
18555
|
-
|
|
18556
|
-
...listVersionedToolCandidates(
|
|
18557
|
-
|
|
18594
|
+
const candidates = toolName === "aapt" ? listVersionedToolCandidates(import_node_path25.default.join(sdkRoot, "build-tools"), toolName) : [
|
|
18595
|
+
import_node_path25.default.join(sdkRoot, "cmdline-tools", "latest", "bin", toolName),
|
|
18596
|
+
...listVersionedToolCandidates(import_node_path25.default.join(sdkRoot, "cmdline-tools"), import_node_path25.default.join("bin", toolName)),
|
|
18597
|
+
import_node_path25.default.join(sdkRoot, "tools", "bin", toolName)
|
|
18558
18598
|
];
|
|
18559
|
-
const match = candidates.find((candidate) => (0,
|
|
18599
|
+
const match = candidates.find((candidate) => (0, import_node_fs20.existsSync)(candidate));
|
|
18560
18600
|
if (match) return match;
|
|
18561
18601
|
}
|
|
18562
18602
|
return void 0;
|
|
18563
18603
|
}
|
|
18564
18604
|
function listVersionedToolCandidates(parentDir, relativeToolPath) {
|
|
18565
|
-
if (!(0,
|
|
18566
|
-
return (0,
|
|
18605
|
+
if (!(0, import_node_fs20.existsSync)(parentDir)) return [];
|
|
18606
|
+
return (0, import_node_fs20.readdirSync)(parentDir).map((entry) => import_node_path25.default.join(parentDir, entry)).filter((entry) => (0, import_node_fs20.statSync)(entry).isDirectory()).sort((a, b) => import_node_path25.default.basename(b).localeCompare(import_node_path25.default.basename(a), void 0, { numeric: true })).map((entry) => import_node_path25.default.join(entry, relativeToolPath));
|
|
18567
18607
|
}
|
|
18568
18608
|
function sha256File(filePath) {
|
|
18569
18609
|
return new Promise((resolve, reject) => {
|
|
18570
18610
|
const hash = (0, import_node_crypto4.createHash)("sha256");
|
|
18571
|
-
const stream = (0,
|
|
18611
|
+
const stream = (0, import_node_fs20.createReadStream)(filePath);
|
|
18572
18612
|
stream.on("data", (chunk) => hash.update(chunk));
|
|
18573
18613
|
stream.on("error", reject);
|
|
18574
18614
|
stream.on("end", () => resolve(hash.digest("hex")));
|
|
@@ -18585,9 +18625,9 @@ function capitalize(value) {
|
|
|
18585
18625
|
}
|
|
18586
18626
|
|
|
18587
18627
|
// src/services/ServiceRuntimeRunner.ts
|
|
18588
|
-
var
|
|
18589
|
-
var
|
|
18590
|
-
var
|
|
18628
|
+
var import_node_fs21 = require("fs");
|
|
18629
|
+
var import_node_os11 = __toESM(require("os"));
|
|
18630
|
+
var import_node_path26 = __toESM(require("path"));
|
|
18591
18631
|
var import_node_child_process10 = require("child_process");
|
|
18592
18632
|
var import_node_readline = require("readline");
|
|
18593
18633
|
var import_chalk3 = __toESM(require("chalk"));
|
|
@@ -19080,14 +19120,14 @@ var ServiceRuntimeRunner = class {
|
|
|
19080
19120
|
}
|
|
19081
19121
|
resolveRepoRoot(service, cwd) {
|
|
19082
19122
|
if (cwd) {
|
|
19083
|
-
return
|
|
19123
|
+
return import_node_path26.default.resolve(process.cwd(), cwd);
|
|
19084
19124
|
}
|
|
19085
19125
|
const repository = this.getType(service) === "vite" || this.getType(service) === "static" ? this.getRepoStaticSite(service).repository.trim() : this.getType(service) === "fc" ? this.getFc(service).repository?.trim() : this.getType(service) === "ios" || this.getType(service) === "android" ? void 0 : this.getNetwork(service).repository?.trim();
|
|
19086
19126
|
if (repository) {
|
|
19087
19127
|
const repoName = repository.replace(/\/+$/, "").split("/").pop()?.replace(/\.git$/i, "");
|
|
19088
19128
|
if (repoName) {
|
|
19089
|
-
const candidate =
|
|
19090
|
-
if ((0,
|
|
19129
|
+
const candidate = import_node_path26.default.join(import_node_os11.default.homedir(), "dev", "pmate", repoName);
|
|
19130
|
+
if ((0, import_node_fs21.existsSync)(candidate)) {
|
|
19091
19131
|
return candidate;
|
|
19092
19132
|
}
|
|
19093
19133
|
}
|
|
@@ -19100,13 +19140,13 @@ var ServiceRuntimeRunner = class {
|
|
|
19100
19140
|
if (!dir) {
|
|
19101
19141
|
throw new Error(`Missing service dir for ${service.id}`);
|
|
19102
19142
|
}
|
|
19103
|
-
return
|
|
19143
|
+
return import_node_path26.default.resolve(repoRoot, dir);
|
|
19104
19144
|
}
|
|
19105
19145
|
async deployVite(service, options) {
|
|
19106
19146
|
this.assertDeployableStaticSite(service);
|
|
19107
19147
|
const appDir = this.resolveLocalDir(service, options.cwd);
|
|
19108
|
-
const packageJsonPath =
|
|
19109
|
-
if (!(0,
|
|
19148
|
+
const packageJsonPath = import_node_path26.default.join(appDir, "package.json");
|
|
19149
|
+
if (!(0, import_node_fs21.existsSync)(packageJsonPath)) {
|
|
19110
19150
|
throw new Error(`No package.json found at ${packageJsonPath}`);
|
|
19111
19151
|
}
|
|
19112
19152
|
const pkg2 = this.loadPackageJson(packageJsonPath);
|
|
@@ -19121,8 +19161,8 @@ var ServiceRuntimeRunner = class {
|
|
|
19121
19161
|
this.resolveRepoRoot(service, options.cwd),
|
|
19122
19162
|
buildEnv
|
|
19123
19163
|
);
|
|
19124
|
-
const distDir =
|
|
19125
|
-
if (!(0,
|
|
19164
|
+
const distDir = import_node_path26.default.join(appDir, "dist");
|
|
19165
|
+
if (!(0, import_node_fs21.existsSync)(distDir)) {
|
|
19126
19166
|
throw new Error(`No dist directory found at ${distDir}`);
|
|
19127
19167
|
}
|
|
19128
19168
|
const site = this.getSite(service);
|
|
@@ -19135,8 +19175,8 @@ var ServiceRuntimeRunner = class {
|
|
|
19135
19175
|
async deployStatic(service, options) {
|
|
19136
19176
|
this.assertDeployableStaticSite(service);
|
|
19137
19177
|
const appDir = this.resolveLocalDir(service, options.cwd);
|
|
19138
|
-
const srcDir =
|
|
19139
|
-
if (!(0,
|
|
19178
|
+
const srcDir = import_node_path26.default.join(appDir, "src");
|
|
19179
|
+
if (!(0, import_node_fs21.existsSync)(srcDir)) {
|
|
19140
19180
|
throw new Error(`No src directory found at ${srcDir}`);
|
|
19141
19181
|
}
|
|
19142
19182
|
const site = this.getSite(service);
|
|
@@ -19170,8 +19210,8 @@ var ServiceRuntimeRunner = class {
|
|
|
19170
19210
|
this.validateFcConfig(service, fc);
|
|
19171
19211
|
const repoRoot = this.resolveRepoRoot(service, options.cwd);
|
|
19172
19212
|
const appDir = this.resolveLocalDir(service, options.cwd);
|
|
19173
|
-
const packageJsonPath =
|
|
19174
|
-
if (!(0,
|
|
19213
|
+
const packageJsonPath = import_node_path26.default.join(appDir, "package.json");
|
|
19214
|
+
if (!(0, import_node_fs21.existsSync)(packageJsonPath)) {
|
|
19175
19215
|
throw new Error(`No package.json found at ${packageJsonPath}`);
|
|
19176
19216
|
}
|
|
19177
19217
|
const pkg2 = this.loadPackageJson(packageJsonPath);
|
|
@@ -19224,15 +19264,15 @@ var ServiceRuntimeRunner = class {
|
|
|
19224
19264
|
const repoRoot = this.resolveRepoRoot(service, options.cwd);
|
|
19225
19265
|
const appDir = this.resolveLocalDir(service, options.cwd);
|
|
19226
19266
|
await this.ensurePnpmWorkspaceRoot(repoRoot);
|
|
19227
|
-
const configPath =
|
|
19228
|
-
if (!(0,
|
|
19267
|
+
const configPath = import_node_path26.default.join(appDir, fc.configFile ?? "s.yaml");
|
|
19268
|
+
if (!(0, import_node_fs21.existsSync)(configPath)) {
|
|
19229
19269
|
throw new Error(`Missing FC config file at ${configPath}`);
|
|
19230
19270
|
}
|
|
19231
|
-
const packageJsonPath =
|
|
19232
|
-
if (!(0,
|
|
19271
|
+
const packageJsonPath = import_node_path26.default.join(appDir, "package.json");
|
|
19272
|
+
if (!(0, import_node_fs21.existsSync)(packageJsonPath)) {
|
|
19233
19273
|
throw new Error(`No package.json found at ${packageJsonPath}`);
|
|
19234
19274
|
}
|
|
19235
|
-
const rawConfig = (0,
|
|
19275
|
+
const rawConfig = (0, import_node_fs21.readFileSync)(configPath, "utf8");
|
|
19236
19276
|
if (!rawConfig.includes(fc.functionName)) {
|
|
19237
19277
|
throw new Error(`FC config ${configPath} does not mention functionName ${fc.functionName}`);
|
|
19238
19278
|
}
|
|
@@ -19513,7 +19553,7 @@ var ServiceRuntimeRunner = class {
|
|
|
19513
19553
|
const serverAddress = await resolveServerAddress(server);
|
|
19514
19554
|
const templateName = exposeType === "websocket" ? "nginx.ws.template" : exposeType === "mixed" ? "nginx.mixed.template" : "nginx.rest.template";
|
|
19515
19555
|
const templatePath = this.resolveTemplatePath(templateName);
|
|
19516
|
-
const template = (0,
|
|
19556
|
+
const template = (0, import_node_fs21.readFileSync)(templatePath, "utf8");
|
|
19517
19557
|
const host = `${subdomain}.${("domain" in network ? network.domain?.trim() : void 0) || "pmate.chat"}`;
|
|
19518
19558
|
const rendered = template.replace(/\$\{\{PORT\}\}/g, String(port)).replace(/\$\{\{HOSTS\}\}/g, host).replace(/\$\{\{HOST\}\}/g, host);
|
|
19519
19559
|
const remotePath = `/etc/nginx/sites-enabled/${subdomain}.conf`;
|
|
@@ -19545,11 +19585,11 @@ var ServiceRuntimeRunner = class {
|
|
|
19545
19585
|
}
|
|
19546
19586
|
if (config.ensurePackageJson) {
|
|
19547
19587
|
const appDir = this.resolveLocalDir(service, options.cwd);
|
|
19548
|
-
const packageJsonPath =
|
|
19549
|
-
if (!(0,
|
|
19588
|
+
const packageJsonPath = import_node_path26.default.join(appDir, "package.json");
|
|
19589
|
+
if (!(0, import_node_fs21.existsSync)(packageJsonPath)) {
|
|
19550
19590
|
throw new Error(`Missing package.json at ${packageJsonPath}`);
|
|
19551
19591
|
}
|
|
19552
|
-
const pkgStat = (0,
|
|
19592
|
+
const pkgStat = (0, import_node_fs21.statSync)(packageJsonPath);
|
|
19553
19593
|
if (!pkgStat.isFile()) {
|
|
19554
19594
|
throw new Error(`package.json is not a file at ${packageJsonPath}`);
|
|
19555
19595
|
}
|
|
@@ -20023,12 +20063,12 @@ var ServiceRuntimeRunner = class {
|
|
|
20023
20063
|
}
|
|
20024
20064
|
resolveTemplatePath(templateName) {
|
|
20025
20065
|
const candidates = [
|
|
20026
|
-
|
|
20027
|
-
|
|
20028
|
-
|
|
20066
|
+
import_node_path26.default.join(__dirname, "..", "templates", templateName),
|
|
20067
|
+
import_node_path26.default.join(__dirname, "..", "src", "templates", templateName),
|
|
20068
|
+
import_node_path26.default.join(__dirname, "templates", templateName)
|
|
20029
20069
|
];
|
|
20030
20070
|
for (const candidate of candidates) {
|
|
20031
|
-
if ((0,
|
|
20071
|
+
if ((0, import_node_fs21.existsSync)(candidate)) {
|
|
20032
20072
|
return candidate;
|
|
20033
20073
|
}
|
|
20034
20074
|
}
|
|
@@ -20060,7 +20100,7 @@ var ServiceRuntimeRunner = class {
|
|
|
20060
20100
|
});
|
|
20061
20101
|
}
|
|
20062
20102
|
loadPackageJson(packageJsonPath) {
|
|
20063
|
-
const raw = (0,
|
|
20103
|
+
const raw = (0, import_node_fs21.readFileSync)(packageJsonPath, "utf8");
|
|
20064
20104
|
const parsed = JSON.parse(raw);
|
|
20065
20105
|
if (!parsed || typeof parsed !== "object") {
|
|
20066
20106
|
throw new Error(`Invalid package.json at ${packageJsonPath}`);
|
|
@@ -20069,7 +20109,7 @@ var ServiceRuntimeRunner = class {
|
|
|
20069
20109
|
}
|
|
20070
20110
|
writePackageJson(packageJsonPath, data) {
|
|
20071
20111
|
const serialized = JSON.stringify(data, null, 2);
|
|
20072
|
-
(0,
|
|
20112
|
+
(0, import_node_fs21.writeFileSync)(packageJsonPath, `${serialized}
|
|
20073
20113
|
`, "utf8");
|
|
20074
20114
|
}
|
|
20075
20115
|
validateFcConfig(service, fc) {
|
|
@@ -20096,8 +20136,8 @@ var ServiceRuntimeRunner = class {
|
|
|
20096
20136
|
}
|
|
20097
20137
|
}
|
|
20098
20138
|
async ensurePnpmWorkspaceRoot(repoRoot) {
|
|
20099
|
-
const workspacePath =
|
|
20100
|
-
if (!(0,
|
|
20139
|
+
const workspacePath = import_node_path26.default.join(repoRoot, "pnpm-workspace.yaml");
|
|
20140
|
+
if (!(0, import_node_fs21.existsSync)(workspacePath)) {
|
|
20101
20141
|
throw new Error(`Missing pnpm-workspace.yaml at ${workspacePath}`);
|
|
20102
20142
|
}
|
|
20103
20143
|
}
|
|
@@ -20171,16 +20211,16 @@ var ServiceRuntimeRunner = class {
|
|
|
20171
20211
|
if (!privateKeyPath) {
|
|
20172
20212
|
throw new Error("Missing ssl.prv in ~/.pmate/config.yaml.");
|
|
20173
20213
|
}
|
|
20174
|
-
if (!(0,
|
|
20214
|
+
if (!(0, import_node_fs21.existsSync)(certificatePath)) {
|
|
20175
20215
|
throw new Error(`SSL certificate file not found: ${certificatePath}`);
|
|
20176
20216
|
}
|
|
20177
|
-
if (!(0,
|
|
20217
|
+
if (!(0, import_node_fs21.existsSync)(privateKeyPath)) {
|
|
20178
20218
|
throw new Error(`SSL private key file not found: ${privateKeyPath}`);
|
|
20179
20219
|
}
|
|
20180
20220
|
return {
|
|
20181
20221
|
certName: host,
|
|
20182
|
-
certificate: (0,
|
|
20183
|
-
privateKey: (0,
|
|
20222
|
+
certificate: (0, import_node_fs21.readFileSync)(certificatePath, "utf8"),
|
|
20223
|
+
privateKey: (0, import_node_fs21.readFileSync)(privateKeyPath, "utf8")
|
|
20184
20224
|
};
|
|
20185
20225
|
}
|
|
20186
20226
|
resolveFcProtocol(fc, certConfig) {
|
|
@@ -20261,7 +20301,7 @@ var ServiceRuntimeRunner = class {
|
|
|
20261
20301
|
});
|
|
20262
20302
|
}
|
|
20263
20303
|
runRemoteCommand(server, command) {
|
|
20264
|
-
if (server === "local") return this.runCommandWithEnv("bash", ["-c", command],
|
|
20304
|
+
if (server === "local") return this.runCommandWithEnv("bash", ["-c", command], import_node_os11.default.homedir());
|
|
20265
20305
|
return new Promise((resolve, reject) => {
|
|
20266
20306
|
const target = `pmate@${server}`;
|
|
20267
20307
|
const child = (0, import_node_child_process10.spawn)("ssh", buildSshBashArgs(target, command), { stdio: "inherit" });
|
|
@@ -20693,7 +20733,7 @@ var ServiceCommandHandler = class {
|
|
|
20693
20733
|
format: "dotenv"
|
|
20694
20734
|
}
|
|
20695
20735
|
);
|
|
20696
|
-
const outputPath =
|
|
20736
|
+
const outputPath = import_node_path27.default.resolve(process.cwd(), args.output);
|
|
20697
20737
|
await (0, import_promises5.writeFile)(outputPath, payload.content, "utf8");
|
|
20698
20738
|
ui.success(`Wrote env file for ${args.appId} to ${outputPath}`);
|
|
20699
20739
|
this.renderJson({ ...payload, output: outputPath }, args.json);
|
|
@@ -20919,11 +20959,11 @@ var ServiceCommandHandler = class {
|
|
|
20919
20959
|
return (baseUrl || process.env.PMATE_APPS_API_BASE_URL || "https://apps-api.pmate.chat").replace(/\/+$/, "");
|
|
20920
20960
|
}
|
|
20921
20961
|
readJsonFile(filePath) {
|
|
20922
|
-
const absolutePath =
|
|
20923
|
-
if (!(0,
|
|
20962
|
+
const absolutePath = import_node_path27.default.resolve(process.cwd(), filePath);
|
|
20963
|
+
if (!(0, import_node_fs22.existsSync)(absolutePath)) {
|
|
20924
20964
|
throw new Error(`JSON file not found: ${absolutePath}`);
|
|
20925
20965
|
}
|
|
20926
|
-
const raw = (0,
|
|
20966
|
+
const raw = (0, import_node_fs22.readFileSync)(absolutePath, "utf8");
|
|
20927
20967
|
try {
|
|
20928
20968
|
return JSON.parse(raw);
|
|
20929
20969
|
} catch (error) {
|
|
@@ -21731,9 +21771,9 @@ var RoleCommandHandler = class {
|
|
|
21731
21771
|
};
|
|
21732
21772
|
|
|
21733
21773
|
// src/commands/AccountCommandHandler.ts
|
|
21734
|
-
var
|
|
21774
|
+
var import_node_fs23 = require("fs");
|
|
21735
21775
|
var import_node_crypto5 = require("crypto");
|
|
21736
|
-
var
|
|
21776
|
+
var import_node_path28 = __toESM(require("path"));
|
|
21737
21777
|
init_sessionStore();
|
|
21738
21778
|
var AccountCommandHandler = class {
|
|
21739
21779
|
async handle(args) {
|
|
@@ -21741,9 +21781,9 @@ var AccountCommandHandler = class {
|
|
|
21741
21781
|
case "bot-keygen": {
|
|
21742
21782
|
const keyFile = this.generateBotKeyFile(args.app, args.name);
|
|
21743
21783
|
const outPath = args.out ? this.resolveFilePath(args.out) : this.resolveDefaultBotKeyPath(args.app, args.name);
|
|
21744
|
-
(0,
|
|
21745
|
-
(0,
|
|
21746
|
-
(0,
|
|
21784
|
+
(0, import_node_fs23.mkdirSync)(import_node_path28.default.dirname(outPath), { recursive: true });
|
|
21785
|
+
(0, import_node_fs23.writeFileSync)(outPath, JSON.stringify(keyFile, null, 2), { mode: 384 });
|
|
21786
|
+
(0, import_node_fs23.chmodSync)(outPath, 384);
|
|
21747
21787
|
if (!args.json) {
|
|
21748
21788
|
ui.success(`Bot key saved to ${outPath}`);
|
|
21749
21789
|
}
|
|
@@ -22303,10 +22343,10 @@ var AccountCommandHandler = class {
|
|
|
22303
22343
|
throw new Error("Missing visible apps input");
|
|
22304
22344
|
}
|
|
22305
22345
|
const absolutePath = this.resolveFilePath(args.filePath);
|
|
22306
|
-
if (!(0,
|
|
22346
|
+
if (!(0, import_node_fs23.existsSync)(absolutePath)) {
|
|
22307
22347
|
throw new Error(`JSON file not found: ${absolutePath}`);
|
|
22308
22348
|
}
|
|
22309
|
-
const raw = (0,
|
|
22349
|
+
const raw = (0, import_node_fs23.readFileSync)(absolutePath, "utf8");
|
|
22310
22350
|
let parsed;
|
|
22311
22351
|
try {
|
|
22312
22352
|
parsed = JSON.parse(raw);
|
|
@@ -22320,13 +22360,13 @@ var AccountCommandHandler = class {
|
|
|
22320
22360
|
return parsed;
|
|
22321
22361
|
}
|
|
22322
22362
|
resolveFilePath(filePath) {
|
|
22323
|
-
return
|
|
22363
|
+
return import_node_path28.default.resolve(process.cwd(), filePath);
|
|
22324
22364
|
}
|
|
22325
22365
|
resolveDefaultBotKeyPath(app, name) {
|
|
22326
|
-
return
|
|
22366
|
+
return import_node_path28.default.join(this.homeDir(), ".pmate", "bots", app, `${name}.bot-key.json`);
|
|
22327
22367
|
}
|
|
22328
22368
|
resolveDefaultAccessKeyPath(app, name) {
|
|
22329
|
-
return
|
|
22369
|
+
return import_node_path28.default.join(this.homeDir(), ".pmate", "access-keys", app, `${name}.access-key.json`);
|
|
22330
22370
|
}
|
|
22331
22371
|
homeDir() {
|
|
22332
22372
|
return process.env.HOME || process.env.USERPROFILE || process.cwd();
|
|
@@ -22346,14 +22386,14 @@ var AccountCommandHandler = class {
|
|
|
22346
22386
|
}
|
|
22347
22387
|
renameDefaultBotKeyFile(app, name, newName) {
|
|
22348
22388
|
const oldPath = this.resolveDefaultBotKeyPath(app, name);
|
|
22349
|
-
if (!(0,
|
|
22389
|
+
if (!(0, import_node_fs23.existsSync)(oldPath)) {
|
|
22350
22390
|
return void 0;
|
|
22351
22391
|
}
|
|
22352
22392
|
const keyFile = this.readBotKeyFile(oldPath, app, name);
|
|
22353
22393
|
const newPath = this.resolveDefaultBotKeyPath(app, newName);
|
|
22354
|
-
(0,
|
|
22355
|
-
(0,
|
|
22356
|
-
(0,
|
|
22394
|
+
(0, import_node_fs23.mkdirSync)(import_node_path28.default.dirname(newPath), { recursive: true, mode: 448 });
|
|
22395
|
+
(0, import_node_fs23.writeFileSync)(newPath, JSON.stringify({ ...keyFile, name: newName }, null, 2));
|
|
22396
|
+
(0, import_node_fs23.chmodSync)(newPath, 384);
|
|
22357
22397
|
return newPath;
|
|
22358
22398
|
}
|
|
22359
22399
|
readBotKeyFile(filePath, expectedApp, expectedName) {
|
|
@@ -22361,10 +22401,10 @@ var AccountCommandHandler = class {
|
|
|
22361
22401
|
throw new Error("Missing bot key file");
|
|
22362
22402
|
}
|
|
22363
22403
|
const absolutePath = this.resolveFilePath(filePath);
|
|
22364
|
-
if (!(0,
|
|
22404
|
+
if (!(0, import_node_fs23.existsSync)(absolutePath)) {
|
|
22365
22405
|
throw new Error(`Bot key file not found: ${absolutePath}`);
|
|
22366
22406
|
}
|
|
22367
|
-
const parsed = JSON.parse((0,
|
|
22407
|
+
const parsed = JSON.parse((0, import_node_fs23.readFileSync)(absolutePath, "utf8"));
|
|
22368
22408
|
if (parsed.type !== "pmate-bot-key" || parsed.version !== 1 || parsed.algorithm !== "ed25519" || !parsed.publicKey || !parsed.privateKey) {
|
|
22369
22409
|
throw new Error(`Invalid PMate bot key file: ${absolutePath}`);
|
|
22370
22410
|
}
|
|
@@ -22381,10 +22421,10 @@ var AccountCommandHandler = class {
|
|
|
22381
22421
|
throw new Error("Missing access key file");
|
|
22382
22422
|
}
|
|
22383
22423
|
const absolutePath = this.resolveFilePath(filePath);
|
|
22384
|
-
if (!(0,
|
|
22424
|
+
if (!(0, import_node_fs23.existsSync)(absolutePath)) {
|
|
22385
22425
|
throw new Error(`Access key file not found: ${absolutePath}`);
|
|
22386
22426
|
}
|
|
22387
|
-
const parsed = JSON.parse((0,
|
|
22427
|
+
const parsed = JSON.parse((0, import_node_fs23.readFileSync)(absolutePath, "utf8"));
|
|
22388
22428
|
if (parsed.type !== "pmate-access-key" || parsed.version !== 1 || !parsed.id || !parsed.app || !parsed.secret || !parsed.expiresAt) {
|
|
22389
22429
|
throw new Error(`Invalid PMate access key file: ${absolutePath}`);
|
|
22390
22430
|
}
|
|
@@ -22406,9 +22446,9 @@ var AccountCommandHandler = class {
|
|
|
22406
22446
|
createdAt: result.key.createdAt
|
|
22407
22447
|
};
|
|
22408
22448
|
const outPath = out ? this.resolveFilePath(out) : this.resolveDefaultAccessKeyPath(result.key.app, result.key.name);
|
|
22409
|
-
(0,
|
|
22410
|
-
(0,
|
|
22411
|
-
(0,
|
|
22449
|
+
(0, import_node_fs23.mkdirSync)(import_node_path28.default.dirname(outPath), { recursive: true });
|
|
22450
|
+
(0, import_node_fs23.writeFileSync)(outPath, JSON.stringify(keyFile, null, 2), { mode: 384 });
|
|
22451
|
+
(0, import_node_fs23.chmodSync)(outPath, 384);
|
|
22412
22452
|
}
|
|
22413
22453
|
renderAccessKeyCreateResult(result, asJson, out) {
|
|
22414
22454
|
if (asJson) {
|
|
@@ -22493,8 +22533,8 @@ function encodePathSegment2(value) {
|
|
|
22493
22533
|
}
|
|
22494
22534
|
|
|
22495
22535
|
// src/commands/OrgCommandHandler.ts
|
|
22496
|
-
var
|
|
22497
|
-
var
|
|
22536
|
+
var import_node_fs24 = require("fs");
|
|
22537
|
+
var import_node_path29 = __toESM(require("path"));
|
|
22498
22538
|
init_sessionStore();
|
|
22499
22539
|
var OrgCommandHandler = class {
|
|
22500
22540
|
async handle(args) {
|
|
@@ -22664,11 +22704,11 @@ var OrgCommandHandler = class {
|
|
|
22664
22704
|
if (!filePath) {
|
|
22665
22705
|
throw new Error(`Missing ${itemLabel} input`);
|
|
22666
22706
|
}
|
|
22667
|
-
const absolutePath =
|
|
22668
|
-
if (!(0,
|
|
22707
|
+
const absolutePath = import_node_path29.default.resolve(process.cwd(), filePath);
|
|
22708
|
+
if (!(0, import_node_fs24.existsSync)(absolutePath)) {
|
|
22669
22709
|
throw new Error(`JSON file not found: ${absolutePath}`);
|
|
22670
22710
|
}
|
|
22671
|
-
const raw = (0,
|
|
22711
|
+
const raw = (0, import_node_fs24.readFileSync)(absolutePath, "utf8");
|
|
22672
22712
|
let parsed;
|
|
22673
22713
|
try {
|
|
22674
22714
|
parsed = JSON.parse(raw);
|
|
@@ -22739,9 +22779,9 @@ function encodePathSegment3(value) {
|
|
|
22739
22779
|
}
|
|
22740
22780
|
|
|
22741
22781
|
// src/commands/HostCommandHandler.ts
|
|
22742
|
-
var
|
|
22743
|
-
var
|
|
22744
|
-
var
|
|
22782
|
+
var import_node_fs25 = require("fs");
|
|
22783
|
+
var import_node_os12 = require("os");
|
|
22784
|
+
var import_node_path30 = __toESM(require("path"));
|
|
22745
22785
|
var import_node_child_process13 = require("child_process");
|
|
22746
22786
|
var BLOCK_START = "# >>> pmate host env >>>";
|
|
22747
22787
|
var BLOCK_END = "# <<< pmate host env <<<";
|
|
@@ -22754,7 +22794,7 @@ fi
|
|
|
22754
22794
|
${BLOCK_END}`;
|
|
22755
22795
|
var HostCommandHandler = class {
|
|
22756
22796
|
async handle(args) {
|
|
22757
|
-
const hostId = normalizeHostId(args.host ?? process.env.PMATE_HOST_ID ?? (0,
|
|
22797
|
+
const hostId = normalizeHostId(args.host ?? process.env.PMATE_HOST_ID ?? (0, import_node_os12.hostname)());
|
|
22758
22798
|
const client = new ServiceRegistryClient(args.baseUrl);
|
|
22759
22799
|
if (args.action === "env-list") {
|
|
22760
22800
|
const items = await client.listHostEnv(hostId);
|
|
@@ -25950,7 +25990,7 @@ function requireValue11(tokens, option) {
|
|
|
25950
25990
|
|
|
25951
25991
|
// src/index.ts
|
|
25952
25992
|
var pkg = JSON.parse(
|
|
25953
|
-
(0,
|
|
25993
|
+
(0, import_node_fs26.readFileSync)(import_node_path31.default.resolve(__dirname, "..", "package.json"), "utf8")
|
|
25954
25994
|
);
|
|
25955
25995
|
var HELP_TEXT = [
|
|
25956
25996
|
import_chalk4.default.bold(`pmate v${pkg.version}`),
|
|
@@ -27857,6 +27897,7 @@ function parseNonNegativeInt(value, optionName) {
|
|
|
27857
27897
|
}
|
|
27858
27898
|
async function main() {
|
|
27859
27899
|
try {
|
|
27900
|
+
await ensureManagedSession();
|
|
27860
27901
|
const args = parseArgs(process.argv.slice(2));
|
|
27861
27902
|
if (args.help) {
|
|
27862
27903
|
showHelp();
|