@piewf/cli 5.11.2 → 5.13.0

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.
@@ -414,22 +414,20 @@ function copyResources(root, resources) {
414
414
  return Object.keys(payload).length ? payload : undefined;
415
415
  }
416
416
  function extensionPackageShim(paths) {
417
- const bindings = new Map();
417
+ const importedNames = new Set();
418
418
  for (const path of paths) {
419
419
  if (!/\.(?:c|m)?js$/.test(path))
420
420
  throw new Error(`Selected extension must be a JavaScript module file: ${path}`);
421
421
  const source = readFileSync(path, "utf8");
422
422
  for (const match of source.matchAll(/import\s*\{([^}]+)\}\s*from\s*["']pi-extensible-workflows["']/g)) {
423
423
  for (const part of (match[1] ?? "").split(",")) {
424
- const pieces = part.trim().split(/\s+as\s+/);
425
- const imported = pieces[0]?.trim();
426
- const local = pieces[1]?.trim() ?? imported;
427
- if (imported && local && /^[A-Za-z_$][\w$]*$/.test(local))
428
- bindings.set(local, imported);
424
+ const imported = part.trim().split(/\s+as\s+/, 1)[0]?.trim();
425
+ if (imported && /^[A-Za-z_$][\w$]*$/.test(imported))
426
+ importedNames.add(imported);
429
427
  }
430
428
  }
431
429
  }
432
- return [...bindings.entries()].map(([local, imported]) => `export const ${local} = globalThis.__pi_bundle_api.${imported};`).join("\n") + "\n";
430
+ return [...importedNames].map((name) => `export const ${name} = globalThis.__pi_bundle_api.${name};`).join("\n") + "\n";
433
431
  }
434
432
  export function writePortableWorkflowBundle(input) {
435
433
  const engineVersion = input.engineVersion ?? portableEngineVersion();
package/dist/src/cli.js CHANGED
@@ -674,7 +674,7 @@ async function exportWorkflowCli(rawArgs, options) {
674
674
  const parsed = stripTrustOptions(rawArgs);
675
675
  const args = parsed.args;
676
676
  if (args.includes("--bundle"))
677
- return bundleWorkflowCli(args.filter((arg) => arg !== "--bundle"), options);
677
+ return bundleWorkflowCli(args.filter((arg) => arg !== "--bundle"), { ...options, ...(parsed.trustOverride !== undefined ? { trustOverride: parsed.trustOverride } : {}) });
678
678
  if (!args.length || args[0] === "--help" || args[0] === "-h") {
679
679
  options.write(exportUsage());
680
680
  return args.length ? 0 : 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piewf/cli",
3
- "version": "5.11.2",
3
+ "version": "5.13.0",
4
4
  "description": "CLI for pi-extensible-workflows",
5
5
  "homepage": "https://vekexasia.github.io/pi-extensible-workflows/",
6
6
  "repository": {
@@ -26,15 +26,7 @@
26
26
  "lint": "eslint .",
27
27
  "prepack": "npm run build"
28
28
  },
29
- "peerDependencies": {
30
- "@earendil-works/pi-ai": "*",
31
- "@earendil-works/pi-coding-agent": "*",
32
- "@earendil-works/pi-tui": "*",
33
- "typebox": "*"
34
- },
35
29
  "devDependencies": {
36
- "@earendil-works/pi-ai": "0.84.1",
37
- "@earendil-works/pi-coding-agent": "0.84.1",
38
30
  "@eslint/js": "10.0.1",
39
31
  "@types/node": "24.12.4",
40
32
  "eslint": "10.0.3",
@@ -46,7 +38,12 @@
46
38
  },
47
39
  "license": "MIT",
48
40
  "dependencies": {
49
- "pi-extensible-workflows": "5.11.2"
41
+ "@earendil-works/pi-ai": "0.85.0",
42
+ "@earendil-works/pi-coding-agent": "0.85.0",
43
+ "@earendil-works/pi-server": "0.85.0",
44
+ "@earendil-works/pi-tui": "0.85.0",
45
+ "pi-extensible-workflows": "5.13.0",
46
+ "typebox": "1.3.7"
50
47
  },
51
48
  "publishConfig": {
52
49
  "access": "public"