@lunora/cli 1.0.0-alpha.47 → 1.0.0-alpha.471

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 (146) hide show
  1. package/LICENSE.md +33 -0
  2. package/README.md +3 -1
  3. package/dist/bin.mjs +3 -10
  4. package/dist/cli.d.mts +31 -0
  5. package/dist/cli.d.ts +31 -0
  6. package/dist/cli.mjs +1 -0
  7. package/dist/index.d.mts +1167 -416
  8. package/dist/index.d.ts +1167 -416
  9. package/dist/index.mjs +1 -19
  10. package/dist/packem_chunks/cli.mjs +2 -0
  11. package/dist/packem_chunks/dispatch.mjs +1 -0
  12. package/dist/packem_chunks/handler.mjs +55 -158
  13. package/dist/packem_chunks/handler10.mjs +2 -16
  14. package/dist/packem_chunks/handler11.mjs +1 -22
  15. package/dist/packem_chunks/handler12.mjs +1 -192
  16. package/dist/packem_chunks/handler13.mjs +1 -131
  17. package/dist/packem_chunks/handler14.mjs +3 -65
  18. package/dist/packem_chunks/handler15.mjs +1 -58
  19. package/dist/packem_chunks/handler16.mjs +1 -80
  20. package/dist/packem_chunks/handler17.mjs +1 -43
  21. package/dist/packem_chunks/handler18.mjs +1 -105
  22. package/dist/packem_chunks/handler19.mjs +1 -170
  23. package/dist/packem_chunks/handler2.mjs +1 -114
  24. package/dist/packem_chunks/handler20.mjs +1 -94
  25. package/dist/packem_chunks/handler21.mjs +7 -94
  26. package/dist/packem_chunks/handler22.mjs +1 -0
  27. package/dist/packem_chunks/handler23.mjs +3 -0
  28. package/dist/packem_chunks/handler24.mjs +3 -0
  29. package/dist/packem_chunks/handler25.mjs +2 -0
  30. package/dist/packem_chunks/handler26.mjs +1 -0
  31. package/dist/packem_chunks/handler27.mjs +2 -0
  32. package/dist/packem_chunks/handler28.mjs +99 -0
  33. package/dist/packem_chunks/handler29.mjs +3 -0
  34. package/dist/packem_chunks/handler3.mjs +1 -204
  35. package/dist/packem_chunks/handler30.mjs +15 -0
  36. package/dist/packem_chunks/handler31.mjs +1 -0
  37. package/dist/packem_chunks/handler32.mjs +1 -0
  38. package/dist/packem_chunks/handler4.mjs +1 -33
  39. package/dist/packem_chunks/handler5.mjs +1 -49
  40. package/dist/packem_chunks/handler6.mjs +3 -91
  41. package/dist/packem_chunks/handler7.mjs +1 -42
  42. package/dist/packem_chunks/handler8.mjs +1 -174
  43. package/dist/packem_chunks/handler9.mjs +1 -315
  44. package/dist/packem_chunks/runCodegenCommand.mjs +4 -52
  45. package/dist/packem_chunks/runDevCommand.mjs +6 -0
  46. package/dist/packem_chunks/runInitCommand.mjs +423 -1447
  47. package/dist/packem_chunks/runResetCommand.mjs +1 -41
  48. package/dist/packem_chunks/runRpcCommand.mjs +1 -68
  49. package/dist/packem_shared/DEFAULT_IMPORT_BATCH_SIZE-Ck9tABfr.mjs +1 -0
  50. package/dist/packem_shared/EXIT_CODE-DQVhSE-1.mjs +1 -0
  51. package/dist/packem_shared/admin-token-VdUnvnKW.mjs +1 -0
  52. package/dist/packem_shared/admin-url-DJB8P6Jh.mjs +1 -0
  53. package/dist/packem_shared/api-spec-lYyq4vL6.mjs +1 -0
  54. package/dist/packem_shared/binding-manifest-file-CQ1eQYy1.mjs +2 -0
  55. package/dist/packem_shared/buildRegistryIndex-Dc8D8AR6.mjs +1 -0
  56. package/dist/packem_shared/cap-error-body-YBKO32BF.mjs +1 -0
  57. package/dist/packem_shared/catalog-CahzmDLV.mjs +1 -0
  58. package/dist/packem_shared/cli-manifest-DoQ_3bzs.mjs +1 -0
  59. package/dist/packem_shared/cloudflare-credentials-BVmZnDZk.mjs +1 -0
  60. package/dist/packem_shared/codegen-error-AmH54ofi.mjs +3 -0
  61. package/dist/packem_shared/command-BpMv2n0o.mjs +1 -0
  62. package/dist/packem_shared/commands-CkuCMUP_.mjs +13 -0
  63. package/dist/packem_shared/createLogger-4TujevyB.mjs +2 -0
  64. package/dist/packem_shared/createRecordingSpawner-DchLi0gR.mjs +1 -0
  65. package/dist/packem_shared/deploy-target-resolve-BTCW1Iv4.mjs +1 -0
  66. package/dist/packem_shared/diffSnapshots-Y1G8am6C.mjs +7 -0
  67. package/dist/packem_shared/docker-DpVxvYpL.mjs +1 -0
  68. package/dist/packem_shared/export-rows-EzdNDYpa.mjs +3 -0
  69. package/dist/packem_shared/free-port-DjbFhaaT.mjs +1 -0
  70. package/dist/packem_shared/health-probe-BLnoq_oC.mjs +13 -0
  71. package/dist/packem_shared/import-3Y59Ry9F.mjs +13 -0
  72. package/dist/packem_shared/index-oHZBGBwB.mjs +1 -0
  73. package/dist/packem_shared/insertSchemaExtension-CbTH3lCQ.mjs +10 -0
  74. package/dist/packem_shared/js-literal-FWLi94Lh.mjs +1 -0
  75. package/dist/packem_shared/lint-ignore-report-DKZagpqk.mjs +2 -0
  76. package/dist/packem_shared/mcp-config-file-GR1Y_CVw.mjs +2 -0
  77. package/dist/packem_shared/open-url-EnKy--w-.mjs +1 -0
  78. package/dist/packem_shared/output-format-DWe_tkTR.mjs +2 -0
  79. package/dist/packem_shared/parseManifest-CwPTKdtS.mjs +1 -0
  80. package/dist/packem_shared/path-containment-CgxYZggb.mjs +1 -0
  81. package/dist/packem_shared/plan-pog5AvMk.mjs +5 -0
  82. package/dist/packem_shared/planDevCommand-Bl6OrwXm.mjs +1 -0
  83. package/dist/packem_shared/platform-diagnostics-Cn2g6Jh-.mjs +4 -0
  84. package/dist/packem_shared/prompt-cancelled-BvsNxg_Q.mjs +1 -0
  85. package/dist/packem_shared/render-lunora-error-JsLelWwR.mjs +2 -0
  86. package/dist/packem_shared/resolve-Bdc9KEUv.mjs +5 -0
  87. package/dist/packem_shared/resolve-target-BRvw8Pf7.mjs +1 -0
  88. package/dist/packem_shared/runAddCommand-gThKW-ZB.mjs +1 -0
  89. package/dist/packem_shared/runDeployCommand-CNgOUx91.mjs +1 -0
  90. package/dist/packem_shared/runExportCommand-_PtkJJDT.mjs +5 -0
  91. package/dist/packem_shared/runMigrateGenerateCommand-CguLEIZp.mjs +11 -0
  92. package/dist/packem_shared/schemaIrToSnapshot-Ck7DSPdf.mjs +1 -0
  93. package/dist/packem_shared/shared-CV7ESvuj.mjs +2 -0
  94. package/dist/packem_shared/storage-3GOIFVZm.mjs +1 -0
  95. package/dist/packem_shared/tui-prompts-B3YwUhGw.mjs +4 -0
  96. package/dist/packem_shared/variables-CPYyJtsL.mjs +1 -0
  97. package/dist/packem_shared/vectorize-metadata-DK61NmVx.mjs +2 -0
  98. package/dist/packem_shared/wrangler-name-Dsk5K1f-.mjs +1 -0
  99. package/dist/packem_shared/wrangler-secrets-C9siMBwN.mjs +1 -0
  100. package/package.json +45 -19
  101. package/skills/README.md +36 -17
  102. package/skills/lunora/SKILL.md +158 -65
  103. package/skills/lunora-cloudflare-audit/SKILL.md +164 -0
  104. package/skills/lunora-create-package/SKILL.md +97 -84
  105. package/skills/lunora-deploy/SKILL.md +212 -102
  106. package/skills/lunora-functions/SKILL.md +367 -60
  107. package/skills/lunora-migration-helper/SKILL.md +194 -149
  108. package/skills/lunora-performance-audit/SKILL.md +137 -95
  109. package/skills/lunora-quickstart/SKILL.md +136 -136
  110. package/skills/lunora-realtime/SKILL.md +217 -97
  111. package/skills/lunora-setup-auth/SKILL.md +203 -101
  112. package/skills/lunora-setup-hyperdrive/SKILL.md +153 -110
  113. package/skills/lunora-setup-hyperdrive-global/SKILL.md +152 -94
  114. package/skills/lunora-setup-mail/SKILL.md +87 -113
  115. package/skills/lunora-setup-scheduler/SKILL.md +133 -97
  116. package/skills/lunora-setup-storage/SKILL.md +189 -95
  117. package/dist/packem_chunks/planDevCommand.mjs +0 -541
  118. package/dist/packem_chunks/runDeployCommand.mjs +0 -594
  119. package/dist/packem_chunks/runMigrateGenerateCommand.mjs +0 -397
  120. package/dist/packem_shared/COMMANDS-B0ftFD_3.mjs +0 -948
  121. package/dist/packem_shared/DEFAULT_IMPORT_BATCH_SIZE-Ck-2bU08.mjs +0 -244
  122. package/dist/packem_shared/admin-url-4UzT-CI4.mjs +0 -19
  123. package/dist/packem_shared/api-spec-CtA6ilu4.mjs +0 -13
  124. package/dist/packem_shared/buildRegistryIndex-BcYe607_.mjs +0 -38
  125. package/dist/packem_shared/codegen-error-DJG-ghs_.mjs +0 -31
  126. package/dist/packem_shared/command-D3lB_4Az.mjs +0 -19
  127. package/dist/packem_shared/commands-B-gR09Z_.mjs +0 -845
  128. package/dist/packem_shared/createLogger-B40gPzQo.mjs +0 -78
  129. package/dist/packem_shared/createRecordingSpawner-DxI3mebw.mjs +0 -43
  130. package/dist/packem_shared/detect-package-manager-DYp7n3mJ.mjs +0 -61
  131. package/dist/packem_shared/diffSnapshots-BeDvvNiF.mjs +0 -161
  132. package/dist/packem_shared/docker-hMQ97KSQ.mjs +0 -21
  133. package/dist/packem_shared/insertSchemaExtension-DAqbfr9Z.mjs +0 -64
  134. package/dist/packem_shared/open-url-Dfq6fAyT.mjs +0 -41
  135. package/dist/packem_shared/output-format-wUvAN6AL.mjs +0 -17
  136. package/dist/packem_shared/parseArgs-YXFuKdEk.mjs +0 -56
  137. package/dist/packem_shared/parseManifest--vZf2FY1.mjs +0 -94
  138. package/dist/packem_shared/prompt-cancelled-APzX1Im-.mjs +0 -9
  139. package/dist/packem_shared/resolve-target-qbsJ_5sF.mjs +0 -16
  140. package/dist/packem_shared/runAddCommand-bnY6-HKb.mjs +0 -4
  141. package/dist/packem_shared/schema-drift-gate-BtBt0as0.mjs +0 -79
  142. package/dist/packem_shared/schemaIrToSnapshot-DdsljJT-.mjs +0 -43
  143. package/dist/packem_shared/storage-BIsph-Vk.mjs +0 -84
  144. package/dist/packem_shared/tui-prompts-BjEN8XgP.mjs +0 -658
  145. package/dist/packem_shared/wrangler-name-cy4yhm9j.mjs +0 -12
  146. package/dist/packem_shared/wrangler-secrets-P2_ZUR-k.mjs +0 -47
package/LICENSE.md CHANGED
@@ -103,3 +103,36 @@ Unless required by applicable law or agreed to in writing, software distributed
103
103
  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
104
  CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
105
  specific language governing permissions and limitations under the License.
106
+
107
+ <!-- DEPENDENCIES -->
108
+
109
+ # Licenses of bundled dependencies
110
+ The published @lunora/cli artifact additionally contains code with the following licenses:
111
+ ISC
112
+
113
+ # Bundled dependencies:
114
+ ## semver
115
+ License: ISC
116
+ By: GitHub Inc.
117
+ Repository: git+https://github.com/npm/node-semver.git
118
+
119
+ > The ISC License
120
+ >
121
+ > Copyright (c) Isaac Z. Schlueter and Contributors
122
+ >
123
+ > Permission to use, copy, modify, and/or distribute this software for any
124
+ > purpose with or without fee is hereby granted, provided that the above
125
+ > copyright notice and this permission notice appear in all copies.
126
+ >
127
+ > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
128
+ > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
129
+ > MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
130
+ > ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
131
+ > WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
132
+ > ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
133
+ > IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
134
+
135
+ <!-- /DEPENDENCIES -->
136
+
137
+ <!-- TYPE_DEPENDENCIES -->
138
+ <!-- /TYPE_DEPENDENCIES -->
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  </a>
8
8
 
9
- <h3 align="center">The Lunora CLI: init, dev, deploy, codegen, run, reset, and migrate commands</h3>
9
+ <h3 align="center">The Lunora CLI: init, dev, deploy, codegen, migrate, seed, doctor, insights, logs, registry, and the rest of the project commands</h3>
10
10
 
11
11
  <!-- END_PACKAGE_OG_IMAGE_PLACEHOLDER -->
12
12
 
@@ -64,6 +64,8 @@ lunora codegen # re-emit _generated/{api,server,dataModel}.ts
64
64
  lunora deploy # codegen + validate wrangler.jsonc + wrangler deploy
65
65
  ```
66
66
 
67
+ Set `codegen: { lazyFunctions: true }` in `lunora.config.ts` to enable lazy function imports for the project: codegen reads it itself, so CLI codegen, dev, build, prepare, verify and deploy and the Vite and Rspack plugins all agree. For one run, set `LUNORA_LAZY_FUNCTIONS=1` or `true`, or pass `--lazy-functions` to these commands. No setting overrides an enabled opt-in from another; without any, generation stays eager.
68
+
67
69
  The CLI also exposes a programmatic entry point:
68
70
 
69
71
  ```ts
package/dist/bin.mjs CHANGED
@@ -1,11 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import { runCli } from './packem_shared/COMMANDS-B0ftFD_3.mjs';
3
-
4
- try {
5
- const code = await runCli();
6
- process.exit(code);
7
- } catch (error) {
8
- process.stderr.write(`${error instanceof Error ? error.message : String(error)}
9
- `);
10
- process.exit(1);
11
- }
2
+ import{readFileSync as t}from"node:fs";const e=process.argv.slice(2);if(e.length===1&&(e[0]==="--version"||e[0]==="-V")){const{version:r}=JSON.parse(t(new URL("../package.json",import.meta.url),"utf8"));process.stdout.write(`${r}
3
+ `)}else try{const{runCli:r}=await import("./cli.mjs"),s=await r();process.exit(s)}catch(r){process.stderr.write(`${r instanceof Error?r.message:String(r)}
4
+ `),process.exit(1)}
package/dist/cli.d.mts ADDED
@@ -0,0 +1,31 @@
1
+ /** Every command name the CLI registers (drives the `CommandName` type + tests). */
2
+ declare const COMMANDS: readonly ["init", "add", "dev", "codegen", "build", "deploy", "prepare", "preview", "link", "cloudflare", "logs", "run", "insights", "profile", "reset", "migrate", "export", "import", "seed", "shards", "pause", "resume", "backup", "eval", "verify", "info", "doctor", "env", "analyze", "view", "docs", "registry", "rules", "mcp", "workflow"];
3
+ type CommandName = (typeof COMMANDS)[number];
4
+ declare const VERSION: string;
5
+ /**
6
+ * Every registered command's name. A superset of {@link COMMANDS}, which is the
7
+ * user-facing list driving "did you mean …?" suggestions — `advisor`,
8
+ * `introspect`, `version` and `completion` are all reachable but deliberately
9
+ * absent from it. Exported so the help-rendering guard covers what is actually
10
+ * reachable, not what is advertised.
11
+ */
12
+ declare const REGISTERED_COMMAND_NAMES: ReadonlyArray<string>;
13
+ interface RunCliOptions {
14
+ argv?: ReadonlyArray<string>;
15
+ cwd?: string;
16
+ /**
17
+ * Inject a console-like logger so callers (tests) can capture cerebro's
18
+ * help / version / usage rendering AND the commands' own output. Omitted in
19
+ * production, where cerebro uses its default stdout/stderr logger and the
20
+ * commands log through the shared pail.
21
+ */
22
+ logger?: Console;
23
+ }
24
+ /**
25
+ * Run the CLI and resolve to the process exit code. cerebro handles help,
26
+ * version, usage, and unknown commands (the latter throws, caught here as 1).
27
+ * `shouldExitProcess: false` keeps the process alive so callers/tests read the
28
+ * captured exit code.
29
+ */
30
+ declare const runCli: (options?: RunCliOptions) => Promise<number>;
31
+ export { COMMANDS, type CommandName, REGISTERED_COMMAND_NAMES, type RunCliOptions, VERSION, runCli };
package/dist/cli.d.ts ADDED
@@ -0,0 +1,31 @@
1
+ /** Every command name the CLI registers (drives the `CommandName` type + tests). */
2
+ declare const COMMANDS: readonly ["init", "add", "dev", "codegen", "build", "deploy", "prepare", "preview", "link", "cloudflare", "logs", "run", "insights", "profile", "reset", "migrate", "export", "import", "seed", "shards", "pause", "resume", "backup", "eval", "verify", "info", "doctor", "env", "analyze", "view", "docs", "registry", "rules", "mcp", "workflow"];
3
+ type CommandName = (typeof COMMANDS)[number];
4
+ declare const VERSION: string;
5
+ /**
6
+ * Every registered command's name. A superset of {@link COMMANDS}, which is the
7
+ * user-facing list driving "did you mean …?" suggestions — `advisor`,
8
+ * `introspect`, `version` and `completion` are all reachable but deliberately
9
+ * absent from it. Exported so the help-rendering guard covers what is actually
10
+ * reachable, not what is advertised.
11
+ */
12
+ declare const REGISTERED_COMMAND_NAMES: ReadonlyArray<string>;
13
+ interface RunCliOptions {
14
+ argv?: ReadonlyArray<string>;
15
+ cwd?: string;
16
+ /**
17
+ * Inject a console-like logger so callers (tests) can capture cerebro's
18
+ * help / version / usage rendering AND the commands' own output. Omitted in
19
+ * production, where cerebro uses its default stdout/stderr logger and the
20
+ * commands log through the shared pail.
21
+ */
22
+ logger?: Console;
23
+ }
24
+ /**
25
+ * Run the CLI and resolve to the process exit code. cerebro handles help,
26
+ * version, usage, and unknown commands (the latter throws, caught here as 1).
27
+ * `shouldExitProcess: false` keeps the process alive so callers/tests read the
28
+ * captured exit code.
29
+ */
30
+ declare const runCli: (options?: RunCliOptions) => Promise<number>;
31
+ export { COMMANDS, type CommandName, REGISTERED_COMMAND_NAMES, type RunCliOptions, VERSION, runCli };
package/dist/cli.mjs ADDED
@@ -0,0 +1 @@
1
+ import{C as E,R as M,V as a,r as s}from"./packem_chunks/cli.mjs";import"./packem_shared/cli-manifest-DoQ_3bzs.mjs";import"./packem_shared/EXIT_CODE-DQVhSE-1.mjs";import"./packem_shared/createLogger-4TujevyB.mjs";import"./packem_shared/render-lunora-error-JsLelWwR.mjs";export{E as COMMANDS,M as REGISTERED_COMMAND_NAMES,a as VERSION,s as runCli};