@akanjs/cli 3.0.0-alpha.16 → 3.0.0-alpha.17

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.
Files changed (55) hide show
  1. package/.build-stamp +1 -1
  2. package/README.ko.md +1 -1
  3. package/README.md +1 -1
  4. package/{abstractCompactor-e5yq60qz.js → abstractCompactor-khr60389.js} +1 -1
  5. package/{agent.command-h6tc0pzh.js → agent.command-e835fjem.js} +6 -6
  6. package/{application.command-kphnfwyg.js → application.command-bexm4597.js} +5 -5
  7. package/{applicationBuildRunner-9ps10a0h.js → applicationBuildRunner-sgr3aq5b.js} +5 -6
  8. package/{applicationReleasePackager-gg8ccbeh.js → applicationReleasePackager-93nzdfsy.js} +1 -1
  9. package/buildBatch.proc.js +4 -4
  10. package/{capacitorApp-9ejk3k7q.js → capacitorApp-qv7g3dp2.js} +27 -27
  11. package/{cloud.command-zn6mfscb.js → cloud.command-v44fdp23.js} +8 -8
  12. package/{context.command-pkbccyys.js → context.command-q8r0tge3.js} +13 -13
  13. package/{dependencyScanner-f6grrep3.js → dependencyScanner-rbs2407b.js} +1 -1
  14. package/{getDirname-m9s0cmhq.js → getDirname-ka11hm7e.js} +1 -1
  15. package/{guideline.command-0jj2k77g.js → guideline.command-pye36g73.js} +3 -3
  16. package/guidelines/conventions/conventions.instruction.md +84 -6
  17. package/incrementalBuilder.proc.js +3 -3
  18. package/{index-xwfkgss0.js → index-33zce8gt.js} +8 -4
  19. package/{index-w7farjxd.js → index-3dp7x6rc.js} +3 -3
  20. package/{index-p42te6qb.js → index-73rnbwgg.js} +14 -6
  21. package/{index-1twehz1x.js → index-8vkkm7v0.js} +8 -18
  22. package/{index-g3brq942.js → index-9djnsdgf.js} +5 -5
  23. package/{index-b9m84bjp.js → index-d4d3q2r8.js} +10 -10
  24. package/{index-96vpa123.js → index-fb2wa7j3.js} +3 -3
  25. package/{index-djh5gpb7.js → index-g9e2fhw2.js} +2 -2
  26. package/{index-4v0wvt37.js → index-hxp90q94.js} +4 -4
  27. package/{index-7ecpft60.js → index-k6fvbcj1.js} +3 -3
  28. package/{index-aak9cctp.js → index-myy6xy5w.js} +4 -4
  29. package/{index-gz91pc3p.js → index-mz5jtaq7.js} +1 -1
  30. package/{index-bkwnr08k.js → index-n706txcv.js} +2 -2
  31. package/{index-gyvrhtpm.js → index-qc0tnhs2.js} +1 -1
  32. package/{index-j9cxndc0.js → index-qyffprfs.js} +7 -5
  33. package/{index-8d9r0df5.js → index-sn71brf9.js} +2 -2
  34. package/{index-9s991k9v.js → index-tsmjxph2.js} +1 -1
  35. package/{index-2m11t9ek.js → index-v5vmgh0z.js} +3 -208
  36. package/{index-rv16ck4r.js → index-x2w0y8sz.js} +8 -8
  37. package/{index-4agbdds8.js → index-xyrb7pk5.js} +3 -3
  38. package/index.js +19 -19
  39. package/{library.command-wbptp6q3.js → library.command-v5cyaw9t.js} +4 -4
  40. package/{localRegistry.command-6ea3pgq0.js → localRegistry.command-tqnh5g77.js} +7 -7
  41. package/{module.command-ghkf919z.js → module.command-wxsvyadc.js} +6 -6
  42. package/{package.command-ph2m34tv.js → package.command-qkcs60ts.js} +4 -4
  43. package/package.json +3 -4
  44. package/{page.command-atnzfn88.js → page.command-qj5bfnh9.js} +4 -4
  45. package/{primitive.command-7qbdhfc2.js → primitive.command-c5jtk3e9.js} +7 -7
  46. package/{quality.command-51q9kmhj.js → quality.command-f8drhx6c.js} +3 -3
  47. package/{recipeScanner-tghkzrrt.js → recipeScanner-zrzev25x.js} +3 -3
  48. package/{repair.command-weakn0yr.js → repair.command-mzwtejpk.js} +6 -6
  49. package/{routeSourceValidator-e4jmbfcx.js → routeSourceValidator-7fycdqyv.js} +1 -1
  50. package/{scalar.command-xdjhvsgb.js → scalar.command-0yvwfv8m.js} +5 -5
  51. package/{typeChecker-kravn7ns.js → typeChecker-g6bh0xfv.js} +1 -1
  52. package/typecheck.proc.js +1 -1
  53. package/{workflow.command-msm2tjee.js → workflow.command-ak6at7nz.js} +10 -10
  54. package/{workspace.command-gr8z82z9.js → workspace.command-9ncr56g4.js} +19 -20
  55. /package/{index-r24hmh0q.js → index-yb2wsc7f.js} +0 -0
@@ -10,7 +10,7 @@ import {
10
10
  } from "./index-67546d0j.js";
11
11
  import {
12
12
  __require
13
- } from "./index-r24hmh0q.js";
13
+ } from "./index-yb2wsc7f.js";
14
14
 
15
15
  // pkgs/@akanjs/devkit/executors.ts
16
16
  import {
@@ -44,7 +44,7 @@ import chalk2 from "chalk";
44
44
 
45
45
  // pkgs/@akanjs/devkit/agentsIndex.ts
46
46
  var recipeScannerLoad = null;
47
- var loadRecipeScanner = () => recipeScannerLoad ??= import("./recipeScanner-tghkzrrt.js");
47
+ var loadRecipeScanner = () => recipeScannerLoad ??= import("./recipeScanner-zrzev25x.js");
48
48
  var AGENT_BLOCK_START = "<!-- akan:agent:start -->";
49
49
  var AGENT_BLOCK_END = "<!-- akan:agent:end -->";
50
50
  var AGENT_VERSION_PREFIX = "<!-- akan:agent:version ";
@@ -54,7 +54,7 @@ ${block}`;
54
54
  var extractBlockVersion = (content) => content.match(/<!-- akan:agent:version ([^\s]+) -->/)?.[1] ?? null;
55
55
  var readDevkitVersion = async () => {
56
56
  const { readFile } = await import("fs/promises");
57
- const { getDirname: getDirname2 } = await import("./getDirname-m9s0cmhq.js");
57
+ const { getDirname: getDirname2 } = await import("./getDirname-ka11hm7e.js");
58
58
  try {
59
59
  const raw = await readFile(`${getDirname2(import.meta.url)}/package.json`, "utf-8");
60
60
  return JSON.parse(raw).version ?? null;
@@ -220,8 +220,6 @@ var DEFAULT_OPTIMIZE_IMPORTS = [
220
220
  ];
221
221
  var WORKSPACE_BARREL_FACETS = ["ui", "webkit", "common", "client", "server"];
222
222
  var SSR_RUNTIME_PACKAGES = ["react", "react-dom", "react-server-dom-webpack"];
223
- var NATIVE_RUNTIME_PACKAGES = ["sharp"];
224
- var DEFAULT_BACKEND_RUNTIME_PACKAGES = ["croner"];
225
223
  var MOBILE_RUNTIME_PACKAGES = [
226
224
  "@capacitor/cli",
227
225
  "@capacitor/core",
@@ -250,8 +248,6 @@ var DATABASE_MODE_RUNTIME_PACKAGES = {
250
248
  };
251
249
  var AKAN_RUNTIME_PACKAGES = new Set([
252
250
  ...SSR_RUNTIME_PACKAGES,
253
- ...NATIVE_RUNTIME_PACKAGES,
254
- ...DEFAULT_BACKEND_RUNTIME_PACKAGES,
255
251
  ...MOBILE_RUNTIME_PACKAGES,
256
252
  ...Object.values(DATABASE_MODE_RUNTIME_PACKAGES).flat()
257
253
  ]);
@@ -543,13 +539,7 @@ CMD [${command.map((c) => `"${c}"`).join(",")}]`;
543
539
  return akanPackageJson.dependencies?.[lib] ?? akanPackageJson.peerDependencies?.[lib];
544
540
  }
545
541
  #getProductionRuntimePackages() {
546
- return [
547
- ...this.externalLibs,
548
- ...SSR_RUNTIME_PACKAGES,
549
- ...NATIVE_RUNTIME_PACKAGES,
550
- ...DEFAULT_BACKEND_RUNTIME_PACKAGES,
551
- ...this.getDatabaseModeRuntimePackages()
552
- ];
542
+ return [...this.externalLibs, ...SSR_RUNTIME_PACKAGES, ...this.getDatabaseModeRuntimePackages()];
553
543
  }
554
544
  getDatabaseModeRuntimePackages(databaseMode = this.defaultDatabaseMode) {
555
545
  return [...DATABASE_MODE_RUNTIME_PACKAGES[databaseMode]];
@@ -1048,7 +1038,7 @@ var moduleUiFileTypes = {
1048
1038
  };
1049
1039
  var testFilePattern = /\.(test|spec)\.(ts|tsx)$/;
1050
1040
  var rootSignalTestFilePattern = /^[A-Za-z][A-Za-z0-9_-]*\.signal\.(test|spec)\.(ts|tsx)$/;
1051
- var createDependencyScanner = async (exec) => (await import("./dependencyScanner-f6grrep3.js")).TypeScriptDependencyScanner.from(exec);
1041
+ var createDependencyScanner = async (exec) => (await import("./dependencyScanner-rbs2407b.js")).TypeScriptDependencyScanner.from(exec);
1052
1042
  var isAllowedTestFile = (filename) => testFilePattern.test(filename);
1053
1043
  var isAllowedLibRootFile = (filename) => libFacetRootAllowedFiles.has(filename) || rootSignalTestFilePattern.test(filename);
1054
1044
  var getScanPath = (exec, relativePath) => path4.posix.join(`${exec.type}s`, exec.name, relativePath.split(path4.sep).join("/"));
@@ -2089,7 +2079,7 @@ class Executor {
2089
2079
  return this._applyTemplate({ ...options, dict });
2090
2080
  }
2091
2081
  async getTypeChecker() {
2092
- const { TypeChecker } = await import("./typeChecker-kravn7ns.js");
2082
+ const { TypeChecker } = await import("./typeChecker-g6bh0xfv.js");
2093
2083
  this.typeChecker ??= new TypeChecker(this);
2094
2084
  return this.typeChecker;
2095
2085
  }
@@ -2546,7 +2536,7 @@ class SysExecutor extends Executor {
2546
2536
  class AppExecutor extends SysExecutor {
2547
2537
  static #routeSourceValidator = null;
2548
2538
  static async#getRouteSourceValidator() {
2549
- AppExecutor.#routeSourceValidator ??= (await import("./routeSourceValidator-e4jmbfcx.js")).RouteSourceValidator;
2539
+ AppExecutor.#routeSourceValidator ??= (await import("./routeSourceValidator-7fycdqyv.js")).RouteSourceValidator;
2550
2540
  return AppExecutor.#routeSourceValidator;
2551
2541
  }
2552
2542
  dist;
@@ -3029,7 +3019,7 @@ class PkgExecutor extends Executor {
3029
3019
  default: "./index.ts"
3030
3020
  }
3031
3021
  },
3032
- engines: { bun: ">=1.3.13" },
3022
+ engines: { bun: ">=1.4.0" },
3033
3023
  ...dependencyMaps
3034
3024
  };
3035
3025
  await Promise.all([this.dist.writeJson("package.json", distPkgJson), this.writeJson("package.json", distPkgJson)]);
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  CloudRunner
4
- } from "./index-96vpa123.js";
4
+ } from "./index-fb2wa7j3.js";
5
5
  import {
6
6
  PackageScript
7
- } from "./index-xwfkgss0.js";
7
+ } from "./index-33zce8gt.js";
8
8
  import {
9
9
  AiSession,
10
10
  CloudApi,
@@ -12,13 +12,13 @@ import {
12
12
  } from "./index-0cj2zxbm.js";
13
13
  import {
14
14
  ApplicationScript
15
- } from "./index-rv16ck4r.js";
15
+ } from "./index-x2w0y8sz.js";
16
16
  import {
17
17
  script
18
- } from "./index-bkwnr08k.js";
18
+ } from "./index-n706txcv.js";
19
19
  import {
20
20
  PkgExecutor
21
- } from "./index-1twehz1x.js";
21
+ } from "./index-8vkkm7v0.js";
22
22
 
23
23
  // pkgs/@akanjs/cli/cloud/cloud.script.ts
24
24
  import { Logger } from "akanjs/common";
@@ -1,22 +1,22 @@
1
1
  // @bun
2
2
  import {
3
3
  RepairRunner
4
- } from "./index-4agbdds8.js";
4
+ } from "./index-xyrb7pk5.js";
5
5
  import {
6
6
  WorkflowRunner
7
- } from "./index-w7farjxd.js";
7
+ } from "./index-3dp7x6rc.js";
8
8
  import {
9
9
  ScalarScript
10
- } from "./index-8d9r0df5.js";
10
+ } from "./index-sn71brf9.js";
11
11
  import {
12
12
  PrimitiveScript
13
- } from "./index-4v0wvt37.js";
13
+ } from "./index-hxp90q94.js";
14
14
  import {
15
15
  ModuleScript
16
- } from "./index-aak9cctp.js";
16
+ } from "./index-myy6xy5w.js";
17
17
  import {
18
18
  isPlaceholderAppId
19
- } from "./index-gz91pc3p.js";
19
+ } from "./index-mz5jtaq7.js";
20
20
  import {
21
21
  AkanContextAnalyzer,
22
22
  akanMcpInstallConfigPaths,
@@ -27,14 +27,14 @@ import {
27
27
  renderDoctorText,
28
28
  resourceList,
29
29
  upsertCodexMcpServerBlock
30
- } from "./index-djh5gpb7.js";
30
+ } from "./index-g9e2fhw2.js";
31
31
  import {
32
32
  buildAkanModuleContextIndex,
33
33
  createWorkflowBaselineSummary,
34
34
  createWorkflowStepRegistry,
35
35
  jsonText,
36
36
  toolingRolloutGate
37
- } from "./index-9s991k9v.js";
37
+ } from "./index-tsmjxph2.js";
38
38
  import {
39
39
  Prompter
40
40
  } from "./index-j37qq1f2.js";
@@ -45,10 +45,10 @@ import {
45
45
  CommandContainer,
46
46
  runner,
47
47
  script
48
- } from "./index-bkwnr08k.js";
48
+ } from "./index-n706txcv.js";
49
49
  import {
50
50
  AppExecutor
51
- } from "./index-1twehz1x.js";
51
+ } from "./index-8vkkm7v0.js";
52
52
 
53
53
  // pkgs/@akanjs/cli/context/context.script.ts
54
54
  import { Logger } from "akanjs/common";
@@ -7,14 +7,14 @@ import {
7
7
  } from "./index-0cj2zxbm.js";
8
8
  import {
9
9
  openBrowser
10
- } from "./index-rv16ck4r.js";
10
+ } from "./index-x2w0y8sz.js";
11
11
  import {
12
12
  runner
13
- } from "./index-bkwnr08k.js";
13
+ } from "./index-n706txcv.js";
14
14
  import {
15
15
  AppExecutor,
16
16
  WorkspaceExecutor
17
- } from "./index-1twehz1x.js";
17
+ } from "./index-8vkkm7v0.js";
18
18
 
19
19
  // pkgs/@akanjs/cli/npmRegistry.ts
20
20
  var defaultNpmRegistry = "https://registry.npmjs.org";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  workflowRunArtifactPath,
4
4
  workflowSyncDir
5
- } from "./index-9s991k9v.js";
5
+ } from "./index-tsmjxph2.js";
6
6
  import {
7
7
  AppExecutor,
8
8
  LibExecutor,
@@ -11,7 +11,7 @@ import {
11
11
  extractBlockVersion,
12
12
  isScannedAppRootEntry,
13
13
  readDevkitVersion
14
- } from "./index-1twehz1x.js";
14
+ } from "./index-8vkkm7v0.js";
15
15
  import {
16
16
  collectRecipeSources,
17
17
  findInlineRecipeDuplicates,
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  ModuleScript
4
- } from "./index-aak9cctp.js";
4
+ } from "./index-myy6xy5w.js";
5
5
  import {
6
6
  addFieldUiPolicyForType,
7
7
  coerceFieldDefault,
@@ -34,15 +34,15 @@ import {
34
34
  sourceFile,
35
35
  validationCommandsForTarget,
36
36
  viaBuilderParameterName
37
- } from "./index-9s991k9v.js";
37
+ } from "./index-tsmjxph2.js";
38
38
  import {
39
39
  script
40
- } from "./index-bkwnr08k.js";
40
+ } from "./index-n706txcv.js";
41
41
  import {
42
42
  AppExecutor,
43
43
  LibExecutor,
44
44
  ModuleExecutor
45
- } from "./index-1twehz1x.js";
45
+ } from "./index-8vkkm7v0.js";
46
46
 
47
47
  // pkgs/@akanjs/cli/primitive/primitive.script.ts
48
48
  import { capitalize } from "akanjs/common";
@@ -1,14 +1,14 @@
1
1
  // @bun
2
2
  import {
3
3
  AkanContextAnalyzer
4
- } from "./index-djh5gpb7.js";
4
+ } from "./index-g9e2fhw2.js";
5
5
  import {
6
6
  Prompter
7
7
  } from "./index-j37qq1f2.js";
8
8
  import {
9
9
  runner,
10
10
  script
11
- } from "./index-bkwnr08k.js";
11
+ } from "./index-n706txcv.js";
12
12
  import {
13
13
  AGENT_BLOCK_END,
14
14
  AGENT_BLOCK_START,
@@ -19,7 +19,7 @@ import {
19
19
  renderRecipeEntries,
20
20
  stampBlockVersion,
21
21
  upsertAgentBlock
22
- } from "./index-1twehz1x.js";
22
+ } from "./index-8vkkm7v0.js";
23
23
  import {
24
24
  collectRecipeSources,
25
25
  scanRecipes
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-ss469dec.js";
5
5
  import {
6
6
  PageScript
7
- } from "./index-gyvrhtpm.js";
7
+ } from "./index-qc0tnhs2.js";
8
8
  import {
9
9
  AiSession
10
10
  } from "./index-0cj2zxbm.js";
@@ -15,17 +15,17 @@ import {
15
15
  generatedFilesForSync,
16
16
  moduleSourcePaths,
17
17
  sourceFile
18
- } from "./index-9s991k9v.js";
18
+ } from "./index-tsmjxph2.js";
19
19
  import {
20
20
  Prompter
21
21
  } from "./index-j37qq1f2.js";
22
22
  import {
23
23
  runner,
24
24
  script
25
- } from "./index-bkwnr08k.js";
25
+ } from "./index-n706txcv.js";
26
26
  import {
27
27
  ModuleExecutor
28
- } from "./index-1twehz1x.js";
28
+ } from "./index-8vkkm7v0.js";
29
29
  import {
30
30
  FileSys
31
31
  } from "./index-67546d0j.js";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./index-76rn3g2c.js";
6
6
  import {
7
7
  CommandExecutionError
8
- } from "./index-1twehz1x.js";
8
+ } from "./index-8vkkm7v0.js";
9
9
 
10
10
  // pkgs/@akanjs/devkit/capacitorApp.ts
11
11
  import { cp, mkdir, readFile, rm, writeFile } from "fs/promises";
@@ -6,7 +6,7 @@ import {
6
6
  ModuleExecutor,
7
7
  PkgExecutor,
8
8
  WorkspaceExecutor
9
- } from "./index-1twehz1x.js";
9
+ } from "./index-8vkkm7v0.js";
10
10
  import {
11
11
  getDirname
12
12
  } from "./index-1577bej2.js";
@@ -15,7 +15,7 @@ import {
15
15
  } from "./index-67546d0j.js";
16
16
  import {
17
17
  __require
18
- } from "./index-r24hmh0q.js";
18
+ } from "./index-yb2wsc7f.js";
19
19
 
20
20
  // pkgs/@akanjs/devkit/commandDecorators/targetMeta.ts
21
21
  var COMMAND_META = Symbol("akan.command.meta");
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-bkwnr08k.js";
5
+ } from "./index-n706txcv.js";
6
6
 
7
7
  // pkgs/@akanjs/cli/page/page.runner.ts
8
8
  class PageRunner extends runner("page") {
@@ -849,6 +849,7 @@ class ClientEntriesBundler {
849
849
  #externalSubpaths;
850
850
  #externalAliases;
851
851
  #command;
852
+ #target;
852
853
  #outputSubdir;
853
854
  #reactFastRefresh;
854
855
  #artifactDir;
@@ -870,6 +871,7 @@ class ClientEntriesBundler {
870
871
  this.#externalSubpaths = options.externalSubpaths ?? [];
871
872
  this.#externalAliases = options.externalAliases ?? {};
872
873
  this.#command = options.command ?? "start";
874
+ this.#target = options.target ?? "browser";
873
875
  this.#outputSubdir = options.outputSubdir ?? "client";
874
876
  this.#reactFastRefresh = options.reactFastRefresh ?? false;
875
877
  this.#artifactDir = `${this.#command === "build" ? this.#app.dist.cwdPath : this.#app.cwdPath}/.akan/artifact`;
@@ -883,7 +885,7 @@ class ClientEntriesBundler {
883
885
  entrypoints: this.#opaqueEntries.entries,
884
886
  outdir: this.#outdir,
885
887
  splitting: true,
886
- target: "browser",
888
+ target: this.#target,
887
889
  format: "esm",
888
890
  naming: CLIENT_BUNDLE_NAMING,
889
891
  metafile: true,
@@ -1226,12 +1228,11 @@ class RouteClientBuilder {
1226
1228
  }).bundle();
1227
1229
  }
1228
1230
  async#buildSsrBundle(bootstrapEntries) {
1229
- const externalOptions = RouteClientBuilder.resolveSsrClientExternalOptions(this.#command);
1230
1231
  return new ClientEntriesBundler({
1231
1232
  app: this.#app,
1232
1233
  entries: bootstrapEntries.buildEntries,
1233
1234
  plugins: [await createBarrelImportsPlugin(this.#app)],
1234
- ...externalOptions,
1235
+ ...RouteClientBuilder.resolveSsrClientBundleOptions(this.#command),
1235
1236
  outputSubdir: "client-ssr",
1236
1237
  command: this.#command
1237
1238
  }).bundle();
@@ -1293,15 +1294,16 @@ ${defaultNames.map((name) => `export default ${name};`).join(`
1293
1294
  const serverEntry = RouteClientBuilder.resolveAkanServerEntry();
1294
1295
  return { [Bun.resolveSync("akanjs/fetch", serverEntry)]: "akanjs/fetch" };
1295
1296
  }
1296
- static resolveSsrClientExternalOptions(command) {
1297
+ static resolveSsrClientBundleOptions(command) {
1297
1298
  if (command === "start") {
1298
1299
  return {
1300
+ target: "bun",
1299
1301
  external: SSR_CLIENT_EXTERNALS,
1300
1302
  externalSubpaths: ["akanjs/fetch"],
1301
1303
  externalAliases: RouteClientBuilder.resolveSsrClientRuntimeAliases()
1302
1304
  };
1303
1305
  }
1304
- return { external: SSR_CLIENT_ALIAS_EXTERNALS };
1306
+ return { target: "bun", external: SSR_CLIENT_ALIAS_EXTERNALS };
1305
1307
  }
1306
1308
  static resolveAkanServerEntry() {
1307
1309
  try {
@@ -9,14 +9,14 @@ import {
9
9
  createPassedPrimitiveReport,
10
10
  generatedFilesForSync,
11
11
  scalarChangedFiles
12
- } from "./index-9s991k9v.js";
12
+ } from "./index-tsmjxph2.js";
13
13
  import {
14
14
  Prompter
15
15
  } from "./index-j37qq1f2.js";
16
16
  import {
17
17
  runner,
18
18
  script
19
- } from "./index-bkwnr08k.js";
19
+ } from "./index-n706txcv.js";
20
20
 
21
21
  // pkgs/@akanjs/cli/scalar/scalar.prompt.ts
22
22
  import { input } from "@inquirer/prompts";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  AppExecutor,
4
4
  LibExecutor
5
- } from "./index-1twehz1x.js";
5
+ } from "./index-8vkkm7v0.js";
6
6
 
7
7
  // pkgs/@akanjs/devkit/workflow/utils.ts
8
8
  var jsonText = (value, { trailingNewline = true } = {}) => `${JSON.stringify(value, null, 2)}${trailingNewline ? `
@@ -9,10 +9,10 @@ import {
9
9
  createTsconfigPackageResolver,
10
10
  rewriteBarrelImports,
11
11
  transformUseClient
12
- } from "./index-j9cxndc0.js";
12
+ } from "./index-qyffprfs.js";
13
13
  import {
14
14
  __require
15
- } from "./index-r24hmh0q.js";
15
+ } from "./index-yb2wsc7f.js";
16
16
 
17
17
  // pkgs/@akanjs/devkit/frontendBuild/allRoutesBuilder.ts
18
18
  import path4 from "path";
@@ -1836,7 +1836,6 @@ var DEFAULT_EXCLUDE_PREFIX = ["@akanjs/cli/", "@akanjs/devkit/"];
1836
1836
  var OPTIONAL_BACKEND_EXTERNAL_EXACT = new Set([
1837
1837
  "@libsql/client",
1838
1838
  "bullmq",
1839
- "croner",
1840
1839
  "ioredis",
1841
1840
  "postgres",
1842
1841
  "protobufjs"
@@ -2253,7 +2252,7 @@ class SsrBaseArtifactBuilder {
2253
2252
  const ssrBundle = await new ClientEntriesBundler({
2254
2253
  app: this.#app,
2255
2254
  entries: [rscSegmentOutletEntry],
2256
- ...RouteClientBuilder.resolveSsrClientExternalOptions(this.#command),
2255
+ ...RouteClientBuilder.resolveSsrClientBundleOptions(this.#command),
2257
2256
  outputSubdir: "client-ssr",
2258
2257
  command: this.#command
2259
2258
  }).bundle();
@@ -2339,210 +2338,6 @@ var PALETTE = "(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|gre
2339
2338
  var LEAD = "(^|[\\s\"'`{(\\[:!])";
2340
2339
  var TAIL = "(?=[\\s\"'`})\\]:/!,]|$)";
2341
2340
  var RAW_PALETTE_RE = new RegExp(`${LEAD}((?:${PREFIX})-)${PALETTE}-\\d{2,3}${TAIL}`, "g");
2342
- var ARBITRARY_COLOR_RE = /\[(#[0-9a-fA-F]{3,8}|(?:rgb|rgba|hsl|hsla|oklch|oklab|lab|lch|hwb|color)\([^\]]*\))\]/g;
2343
2341
  var INTERPOLATED_ARBITRARY_RE = new RegExp(`${LEAD}[a-z][a-z0-9-]*-\\[[^\\]\`]*\\$\\{`, "g");
2344
- var STYLE_OBJECT_RE = /style=\{\{([\s\S]*?)\}\}/g;
2345
- var STYLE_TAG_RE = /<style[^>]*>([\s\S]*?)<\/style>/g;
2346
- var INLINE_COLOR_LITERAL_RE = /#[0-9a-fA-F]{3,8}\b|(?:rgb|rgba|hsl|hsla|oklch|oklab|lab|lch|hwb)\(/g;
2347
2342
  var DAISYUI_LEGACY_RE = new RegExp(`${LEAD}(?:` + "btn-(?:primary|secondary|accent|neutral|info|success|warning|error|ghost|link|outline|square|circle|wide|block|xs|sm|md|lg)|" + "badge-(?:primary|secondary|accent|neutral|info|success|warning|error|ghost|outline)|" + "alert-(?:info|success|warning|error)|" + "input-(?:bordered|primary|secondary|accent|ghost|error)|" + "select-(?:bordered|primary|ghost)|textarea-(?:bordered|primary|ghost)|" + "checkbox-(?:primary|secondary|accent)|toggle-(?:primary|secondary|accent)|" + "loading-(?:spinner|dots|ring|ball|bars|infinity)|" + "card-(?:body|title|actions)|modal-(?:box|action|backdrop)|" + "collapse-(?:title|content|arrow|plus)|dropdown-(?:content|end|start|hover)|" + "stat-(?:title|value|desc)|tabs-(?:boxed|lifted|bordered)|tab-active|" + "menu-(?:title|dropdown)|steps-(?:horizontal|vertical)|join-item|" + "mockup-(?:code|phone|browser|window)|drawer-(?:side|content|toggle)" + `)${TAIL}`, "g");
2348
- var ALL_RULES = [
2349
- "raw-palette",
2350
- "arbitrary-color",
2351
- "inline-color",
2352
- "daisyui-legacy",
2353
- "interpolated-arbitrary"
2354
- ];
2355
-
2356
- class StyleGuard {
2357
- run(files) {
2358
- const out = [];
2359
- for (const file of files) {
2360
- const directives = this.#parseDirectives(file.content);
2361
- const scan = this.#stripComments(file.content);
2362
- const local = [];
2363
- this.#scanClassLiterals(file, scan, local);
2364
- this.#scanInlineColors(file, scan, local);
2365
- for (const v of local)
2366
- if (!this.#isSuppressed(v, directives))
2367
- out.push(v);
2368
- }
2369
- return out;
2370
- }
2371
- #stripComments(src) {
2372
- const out = src.split("");
2373
- const blank = (i2) => {
2374
- if (src[i2] !== `
2375
- `)
2376
- out[i2] = " ";
2377
- };
2378
- let state = "code";
2379
- let i = 0;
2380
- while (i < src.length) {
2381
- const c = src[i];
2382
- const d = src[i + 1];
2383
- if (state === "code") {
2384
- if (c === "/" && d === "/") {
2385
- blank(i);
2386
- blank(i + 1);
2387
- state = "line";
2388
- i += 2;
2389
- } else if (c === "/" && d === "*") {
2390
- blank(i);
2391
- blank(i + 1);
2392
- state = "block";
2393
- i += 2;
2394
- } else {
2395
- if (c === "'")
2396
- state = "squote";
2397
- else if (c === '"')
2398
- state = "dquote";
2399
- else if (c === "`")
2400
- state = "template";
2401
- i++;
2402
- }
2403
- } else if (state === "line") {
2404
- if (c === `
2405
- `)
2406
- state = "code";
2407
- else
2408
- blank(i);
2409
- i++;
2410
- } else if (state === "block") {
2411
- if (c === "*" && d === "/") {
2412
- blank(i);
2413
- blank(i + 1);
2414
- state = "code";
2415
- i += 2;
2416
- } else {
2417
- blank(i);
2418
- i++;
2419
- }
2420
- } else {
2421
- const close = state === "squote" ? "'" : state === "dquote" ? '"' : "`";
2422
- if (c === "\\")
2423
- i += 2;
2424
- else {
2425
- if (c === close)
2426
- state = "code";
2427
- i++;
2428
- }
2429
- }
2430
- }
2431
- return out.join("");
2432
- }
2433
- #parseDirectives(content) {
2434
- const directives = { file: null, nextLine: new Map };
2435
- const lines = content.split(`
2436
- `);
2437
- for (let i = 0;i < lines.length; i++) {
2438
- const line = lines[i];
2439
- const nextLineMatch = line.match(/styleguard-disable-next-line\b(.*)$/);
2440
- if (nextLineMatch) {
2441
- directives.nextLine.set(i + 2, this.#extractRules(nextLineMatch[1]));
2442
- continue;
2443
- }
2444
- const fileMatch = line.match(/styleguard-disable\b(.*)$/);
2445
- if (fileMatch)
2446
- directives.file = this.#mergeFileScope(directives.file, this.#extractRules(fileMatch[1]));
2447
- }
2448
- return directives;
2449
- }
2450
- #extractRules(tail) {
2451
- const found = ALL_RULES.filter((rule) => tail.includes(rule));
2452
- return found.length === 0 ? "all" : new Set(found);
2453
- }
2454
- #mergeFileScope(prev, next) {
2455
- if (prev === "all" || next === "all")
2456
- return "all";
2457
- return new Set([...prev ?? [], ...next]);
2458
- }
2459
- #isSuppressed(v, directives) {
2460
- if (directives.file === "all" || directives.file?.has(v.rule))
2461
- return true;
2462
- const nextLine = directives.nextLine.get(v.line);
2463
- return nextLine === "all" || (nextLine?.has(v.rule) ?? false);
2464
- }
2465
- #scanClassLiterals(file, scan, out) {
2466
- for (const m of scan.matchAll(RAW_PALETTE_RE)) {
2467
- out.push(this.#violation(file, m.index ?? 0, {
2468
- rule: "raw-palette",
2469
- severity: "error",
2470
- suggestion: "\uC2DC\uB9E8\uD2F1 \uD1A0\uD070\uC73C\uB85C \uAD50\uCCB4\uD558\uC138\uC694 \u2014 \uC608: text-gray-500\u2192text-muted-foreground, bg-red-500\u2192bg-destructive, bg-blue-500\u2192bg-info. \uBE0C\uB79C\uB4DC \uC0C9\uC740 page/styles.css \uD1A0\uD070\uC5D0\uC11C \uC870\uC815\uD569\uB2C8\uB2E4."
2471
- }));
2472
- }
2473
- for (const m of scan.matchAll(ARBITRARY_COLOR_RE)) {
2474
- out.push(this.#violation(file, m.index ?? 0, {
2475
- rule: "arbitrary-color",
2476
- severity: "error",
2477
- suggestion: "\uC784\uC758 \uC0C9 \uB9AC\uD130\uB7F4 \uB300\uC2E0 \uD1A0\uD070\uC744 \uC4F0\uC138\uC694 \u2014 bg-[#3b82f6]\u2192bg-info, text-[rgb(...)]\u2192\uC2DC\uB9E8\uD2F1 \uD1A0\uD070. \uAF2D \uD544\uC694\uD558\uBA74 \uC2A4\uCF54\uD504 \uD1A0\uD070(.campaign-x { --primary: \u2026 })\uC744 \uC815\uC758\uD558\uC138\uC694."
2478
- }));
2479
- }
2480
- for (const m of scan.matchAll(DAISYUI_LEGACY_RE)) {
2481
- out.push(this.#violation(file, m.index ?? 0, {
2482
- rule: "daisyui-legacy",
2483
- severity: "error",
2484
- suggestion: "daisyUI \uD074\uB798\uC2A4\uB294 \uC81C\uAC70\uB410\uC2B5\uB2C8\uB2E4. akanjs/ui \uD504\uB9AC\uBBF8\uD2F0\uBE0C(Button/Badge \uB4F1)\uB098 buttonRecipe()/badgeRecipe() + \uC2DC\uB9E8\uD2F1 \uD1A0\uD070\uC73C\uB85C \uAD50\uCCB4\uD558\uC138\uC694."
2485
- }));
2486
- }
2487
- for (const m of scan.matchAll(INTERPOLATED_ARBITRARY_RE)) {
2488
- out.push(this.#violation(file, m.index ?? 0, {
2489
- rule: "interpolated-arbitrary",
2490
- severity: "error",
2491
- suggestion: "\uB7F0\uD0C0\uC784 \uAC12\uC73C\uB85C \uC784\uC758\uAC12 \uD074\uB798\uC2A4\uB97C \uC870\uB9BD\uD558\uBA74 CSS \uAC00 \uC0DD\uC131\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4(\uC2A4\uCE90\uB108\uB294 \uC18C\uC2A4 \uD14D\uC2A4\uD2B8\uB97C \uC77D\uC2B5\uB2C8\uB2E4). \uD06C\uAE30/\uC704\uCE58\uB294 style prop \uC73C\uB85C \uB118\uAE30\uC138\uC694 \u2014 style={{ minHeight }}. \uAC12\uC774 enum \uC774\uBA74 \uB9AC\uD130\uB7F4 \uD074\uB798\uC2A4 \uB9F5\uC73C\uB85C \uB450\uC138\uC694."
2492
- }));
2493
- }
2494
- }
2495
- #scanInlineColors(file, scan, out) {
2496
- const push = (index) => out.push(this.#violation(file, index, {
2497
- rule: "inline-color",
2498
- severity: "error",
2499
- suggestion: "\uC778\uB77C\uC778 \uC0C9 \uB9AC\uD130\uB7F4 \uB300\uC2E0 CSS \uBCC0\uC218/\uD1A0\uD070\uC744 \uCC38\uC870\uD558\uC138\uC694 \u2014 style={{ color: 'var(--primary)' }} \uB610\uB294 \uC2DC\uB9E8\uD2F1 \uD074\uB798\uC2A4(text-primary). \uD558\uB4DC\uCF54\uB529 hex/rgb \uB294 \uD14C\uB9C8 \uC804\uD658\uC744 \uAE68\uB728\uB9BD\uB2C8\uB2E4."
2500
- }));
2501
- for (const region of [STYLE_OBJECT_RE, STYLE_TAG_RE]) {
2502
- for (const m of scan.matchAll(region)) {
2503
- const inner = m[1] ?? "";
2504
- const innerStart = (m.index ?? 0) + m[0].indexOf(inner);
2505
- for (const lit of inner.matchAll(INLINE_COLOR_LITERAL_RE)) {
2506
- push(innerStart + (lit.index ?? 0));
2507
- }
2508
- }
2509
- }
2510
- }
2511
- #violation(file, index, base) {
2512
- const before = file.content.slice(0, index);
2513
- const line = before.length === 0 ? 1 : before.split(`
2514
- `).length;
2515
- const lineStart = before.lastIndexOf(`
2516
- `) + 1;
2517
- const lineEnd = file.content.indexOf(`
2518
- `, index);
2519
- const snippet = file.content.slice(lineStart, lineEnd === -1 ? undefined : lineEnd).trim();
2520
- return { ...base, path: file.path, line, snippet };
2521
- }
2522
- static countNamedComponentClasses(css) {
2523
- const names = new Set;
2524
- const layerRe = /@layer\s+components\s*\{/g;
2525
- for (const layer of css.matchAll(layerRe)) {
2526
- const bodyStart = (layer.index ?? 0) + layer[0].length;
2527
- const body = StyleGuard.#extractBalanced(css, bodyStart);
2528
- for (const sel of body.matchAll(/(^|[\s}])\.(-?[a-zA-Z_][\w-]*)/g))
2529
- names.add(sel[2]);
2530
- }
2531
- return { count: names.size, names: [...names].sort() };
2532
- }
2533
- static #extractBalanced(css, start) {
2534
- let depth = 1;
2535
- for (let i = start;i < css.length; i++) {
2536
- const ch = css[i];
2537
- if (ch === "{")
2538
- depth++;
2539
- else if (ch === "}") {
2540
- depth--;
2541
- if (depth === 0)
2542
- return css.slice(start, i);
2543
- }
2544
- }
2545
- return css.slice(start);
2546
- }
2547
- }
2548
2343
  export { AllRoutesBuilder, CsrArtifactBuilder, CssCompiler, FontOptimizer, PagesBundleBuilder, precompressArtifacts, SsrBaseArtifactBuilder };