@kaelen-ai/cli 0.1.12 → 0.1.14

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 CHANGED
@@ -2387,19 +2387,26 @@ function analyzeTopLevel2(body) {
2387
2387
  const imports = [];
2388
2388
  const rootCalls = [];
2389
2389
  for (const stmt of body) {
2390
- if (stmt.type === "ExportNamedDeclaration" || stmt.type === "ExportDefaultDeclaration" || stmt.type === "ExportAllDeclaration") {
2390
+ let candidate = stmt;
2391
+ if (stmt.type === "ExportNamedDeclaration") {
2392
+ const declaration = stmt.declaration;
2393
+ if (!declaration) {
2394
+ continue;
2395
+ }
2396
+ candidate = declaration;
2397
+ } else if (stmt.type === "ExportDefaultDeclaration" || stmt.type === "ExportAllDeclaration") {
2391
2398
  continue;
2392
2399
  }
2393
- if (stmt.type === "ImportDeclaration") {
2394
- const specifiers = stmt.specifiers;
2400
+ if (candidate.type === "ImportDeclaration") {
2401
+ const specifiers = candidate.specifiers;
2395
2402
  if (specifiers.length === 0) {
2396
2403
  continue;
2397
2404
  }
2398
2405
  const info = {
2399
2406
  specifiers: [],
2400
- source: stmt.source.value,
2401
- start: stmt.start,
2402
- end: stmt.end
2407
+ source: candidate.source.value,
2408
+ start: candidate.start,
2409
+ end: candidate.end
2403
2410
  };
2404
2411
  for (const spec of specifiers) {
2405
2412
  const local = spec.local.name;
@@ -2415,20 +2422,20 @@ function analyzeTopLevel2(body) {
2415
2422
  imports.push(info);
2416
2423
  continue;
2417
2424
  }
2418
- if (isRootTargetCall(stmt)) {
2425
+ if (isRootTargetCall(candidate)) {
2419
2426
  rootCalls.push({
2420
- start: stmt.start,
2421
- end: stmt.end
2427
+ start: candidate.start,
2428
+ end: candidate.end
2422
2429
  });
2423
2430
  continue;
2424
2431
  }
2425
2432
  const names = /* @__PURE__ */ new Set();
2426
- if (stmt.type === "VariableDeclaration") {
2427
- for (const declaration of stmt.declarations) {
2433
+ if (candidate.type === "VariableDeclaration") {
2434
+ for (const declaration of candidate.declarations) {
2428
2435
  collectBindingNames2(declaration.id, names);
2429
2436
  }
2430
- } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") {
2431
- const id = stmt.id;
2437
+ } else if (candidate.type === "FunctionDeclaration" || candidate.type === "ClassDeclaration") {
2438
+ const id = candidate.id;
2432
2439
  if (id?.type === "Identifier") {
2433
2440
  names.add(id.name);
2434
2441
  }
@@ -2438,7 +2445,7 @@ function analyzeTopLevel2(body) {
2438
2445
  if (names.size === 0) {
2439
2446
  continue;
2440
2447
  }
2441
- const refs = collectRefs2(stmt);
2448
+ const refs = collectRefs2(candidate);
2442
2449
  for (const name of names) {
2443
2450
  refs.delete(name);
2444
2451
  }
@@ -5031,7 +5038,7 @@ async function signalEmitCommand(name, options) {
5031
5038
 
5032
5039
  // src/index.ts
5033
5040
  var program = new Command();
5034
- program.name("io").description("IO CLI \u2014 build and deploy behaviors").version("0.1.12");
5041
+ program.name("io").description("IO CLI \u2014 build and deploy behaviors").version("0.1.14");
5035
5042
  program.command("init").description("Initialize io.config.json for the current project").option("--yes", "Overwrite existing config without prompting").action(initCommand);
5036
5043
  program.command("build").description("Build behaviors from the io/ directory").option("--dir <path>", "Source directory", "io").option("--minify", "Minify bundles", false).action(buildCommand);
5037
5044
  program.command("deploy").description("Build and package for deployment").option("--dir <path>", "Source directory", "io").option("--no-minify", "Skip minification").option("--yes", "Skip confirmation prompt").action(deployCommand);