@lunora/vite 1.0.0-alpha.11 → 1.0.0-alpha.12
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.d.mts
CHANGED
|
@@ -87,13 +87,20 @@ interface ReconcileResult {
|
|
|
87
87
|
*/
|
|
88
88
|
declare const reconcileWranglerCrons: (projectRoot: string, cronTriggers: ReadonlyArray<string>) => ReconcileResult;
|
|
89
89
|
/**
|
|
90
|
-
* Dev-only Vite plugin that
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
90
|
+
* Dev-only Vite plugin that prepares `.dev.vars` before the worker boots.
|
|
91
|
+
* `@cloudflare/vite-plugin` loads `.dev.vars` into the worker's `env`, but the
|
|
92
|
+
* file is gitignored — so a fresh clone has none and the worker throws on the
|
|
93
|
+
* first required secret (e.g. `AUTH_SECRET is required`). Two steps, both shared
|
|
94
|
+
* with `lunora dev` via `@lunora/config`.
|
|
95
|
+
*
|
|
96
|
+
* First, {@link ensureDevVariables}: when a `.dev.vars.example` exists, prompt
|
|
97
|
+
* to generate `.dev.vars` from it with secrets auto-filled. Second,
|
|
98
|
+
* {@link fillDevSecrets}: fill any empty/placeholder secret already in
|
|
99
|
+
* `.dev.vars` (a `lunora add`-scaffolded project writes secrets blank) and
|
|
100
|
+
* ensure `LUNORA_ADMIN_TOKEN` is present + generated — so the worker boots with
|
|
101
|
+
* working secrets and the Studio authenticates without its login gate. No
|
|
102
|
+
* prompt: it only generates locally-derivable values and never overwrites a real
|
|
103
|
+
* one.
|
|
97
104
|
*
|
|
98
105
|
* Runs in `configResolved` (awaited by Vite) so it completes before the
|
|
99
106
|
* Cloudflare plugin reads the file. Non-interactive runs decline silently.
|
package/dist/index.d.ts
CHANGED
|
@@ -87,13 +87,20 @@ interface ReconcileResult {
|
|
|
87
87
|
*/
|
|
88
88
|
declare const reconcileWranglerCrons: (projectRoot: string, cronTriggers: ReadonlyArray<string>) => ReconcileResult;
|
|
89
89
|
/**
|
|
90
|
-
* Dev-only Vite plugin that
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
90
|
+
* Dev-only Vite plugin that prepares `.dev.vars` before the worker boots.
|
|
91
|
+
* `@cloudflare/vite-plugin` loads `.dev.vars` into the worker's `env`, but the
|
|
92
|
+
* file is gitignored — so a fresh clone has none and the worker throws on the
|
|
93
|
+
* first required secret (e.g. `AUTH_SECRET is required`). Two steps, both shared
|
|
94
|
+
* with `lunora dev` via `@lunora/config`.
|
|
95
|
+
*
|
|
96
|
+
* First, {@link ensureDevVariables}: when a `.dev.vars.example` exists, prompt
|
|
97
|
+
* to generate `.dev.vars` from it with secrets auto-filled. Second,
|
|
98
|
+
* {@link fillDevSecrets}: fill any empty/placeholder secret already in
|
|
99
|
+
* `.dev.vars` (a `lunora add`-scaffolded project writes secrets blank) and
|
|
100
|
+
* ensure `LUNORA_ADMIN_TOKEN` is present + generated — so the worker boots with
|
|
101
|
+
* working secrets and the Studio authenticates without its login gate. No
|
|
102
|
+
* prompt: it only generates locally-derivable values and never overwrites a real
|
|
103
|
+
* one.
|
|
97
104
|
*
|
|
98
105
|
* Runs in `configResolved` (awaited by Vite) so it completes before the
|
|
99
106
|
* Cloudflare plugin reads the file. Non-interactive runs decline silently.
|
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { detectAgentRules, claimAgentRulesHint, AGENT_RULES_HINT, detectFramewor
|
|
|
4
4
|
export { detectFramework } from '@lunora/config';
|
|
5
5
|
import { l as lunoraLine } from './packem_shared/log-BjO9EWah.mjs';
|
|
6
6
|
import codegenPlugin from './packem_shared/codegenPlugin-MuvbqAP8.mjs';
|
|
7
|
-
import devVariablesPlugin from './packem_shared/devVariablesPlugin-
|
|
7
|
+
import devVariablesPlugin from './packem_shared/devVariablesPlugin-CDNSnvOP.mjs';
|
|
8
8
|
import { createCommandProbe, withDevWorkerEnv } from './packem_shared/DEV_WORKER_ENV_VALUE-Coo6bgVz.mjs';
|
|
9
9
|
export { DEV_WORKER_ENV_VALUE, DEV_WORKER_ENV_VAR } from './packem_shared/DEV_WORKER_ENV_VALUE-Coo6bgVz.mjs';
|
|
10
10
|
import { frameworkComposePlugin } from './packem_shared/CLASS_A_WIRING-CZVcjgKo.mjs';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ensureDevVariables, createConfirm, fillDevSecrets } from '@lunora/config';
|
|
2
|
+
import { l as lunoraLine } from './log-BjO9EWah.mjs';
|
|
3
|
+
|
|
4
|
+
const devVariablesPlugin = (options) => {
|
|
5
|
+
return {
|
|
6
|
+
apply: "serve",
|
|
7
|
+
async configResolved() {
|
|
8
|
+
const info = (message) => {
|
|
9
|
+
console.info(lunoraLine(message));
|
|
10
|
+
};
|
|
11
|
+
await ensureDevVariables({ confirm: createConfirm("[lunora] "), cwd: options.projectRoot, info });
|
|
12
|
+
fillDevSecrets({ cwd: options.projectRoot, info });
|
|
13
|
+
},
|
|
14
|
+
enforce: "pre",
|
|
15
|
+
name: "lunora:dev-vars"
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { devVariablesPlugin as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/vite",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.12",
|
|
4
4
|
"description": "The Lunora Vite plugin: codegen, type sync, wrangler validation, and an error overlay over @cloudflare/vite-plugin",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@cloudflare/vite-plugin": "1.42.0",
|
|
49
49
|
"@lunora/codegen": "1.0.0-alpha.7",
|
|
50
|
-
"@lunora/config": "1.0.0-alpha.
|
|
50
|
+
"@lunora/config": "1.0.0-alpha.12",
|
|
51
51
|
"@visulima/vite-overlay": "2.0.0-alpha.35",
|
|
52
52
|
"jsonc-parser": "^3.3.1",
|
|
53
53
|
"ts-morph": "^28.0.0"
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ensureDevVariables, createConfirm } from '@lunora/config';
|
|
2
|
-
import { l as lunoraLine } from './log-BjO9EWah.mjs';
|
|
3
|
-
|
|
4
|
-
const devVariablesPlugin = (options) => {
|
|
5
|
-
return {
|
|
6
|
-
apply: "serve",
|
|
7
|
-
async configResolved() {
|
|
8
|
-
await ensureDevVariables({
|
|
9
|
-
confirm: createConfirm("[lunora] "),
|
|
10
|
-
cwd: options.projectRoot,
|
|
11
|
-
info: (message) => {
|
|
12
|
-
console.info(lunoraLine(message));
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
},
|
|
16
|
-
enforce: "pre",
|
|
17
|
-
name: "lunora:dev-vars"
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export { devVariablesPlugin as default };
|