@lunora/config 1.0.0-alpha.8 → 1.0.0-alpha.80
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/LICENSE.md +6 -0
- package/__assets__/package-og.svg +1 -1
- package/dist/index.d.mts +885 -461
- package/dist/index.d.ts +885 -461
- package/dist/index.mjs +17 -9
- package/dist/packem_shared/AGENT_MODE_ENV-B5R7jpY7.mjs +17 -0
- package/dist/packem_shared/DEV_DAEMON_ENV-FIEtW7Fz.mjs +163 -0
- package/dist/packem_shared/{LUNORA_EVENT_SOURCE-D2fDeGB6.mjs → LUNORA_EVENT_SOURCE-M1KM9_pR.mjs} +28 -2
- package/dist/packem_shared/PACKAGE_SECRETS_REGISTRY-NCTSphDk.mjs +138 -0
- package/dist/packem_shared/{POLICY_SCAFFOLD_ENDPOINT-CiC2IGKx.mjs → POLICY_SCAFFOLD_ENDPOINT-CvTZpaZF.mjs} +7 -10
- package/dist/packem_shared/{REMOTE_ELIGIBLE_KEYS-BC7_e9Bz.mjs → REMOTE_ELIGIBLE_KEYS-C-F_Flgy.mjs} +1 -6
- package/dist/packem_shared/{REQUIRED_COMPATIBILITY_DATE-DRSNSOOp.mjs → REQUIRED_COMPATIBILITY_DATE-DP0SFVy9.mjs} +134 -3
- package/dist/packem_shared/{SCHEMA_EDIT_ENDPOINT-Df-Wrix-.mjs → SCHEMA_EDIT_ENDPOINT-Bt2SNkpV.mjs} +4 -8
- package/dist/packem_shared/{SEED_ENDPOINT-DVCjaGO-.mjs → SEED_ENDPOINT-7izz_Jao.mjs} +1 -1
- package/dist/packem_shared/WORKERS_CACHE_MIN_DATE-CaXbS7CX.mjs +11 -0
- package/dist/packem_shared/assetContentType-ByZjeV3D.mjs +72 -0
- package/dist/packem_shared/{buildPackageSecretsBlock-S74dgmwy.mjs → buildPackageSecretsBlock-BxOcyaAY.mjs} +115 -21
- package/dist/packem_shared/collectWranglerSecretVariables-BRWIvT-e.mjs +56 -0
- package/dist/packem_shared/{createConfirm-fvpdgJ9s.mjs → createConfirm-BMikeJC9.mjs} +22 -5
- package/dist/packem_shared/{detectFramework-Br-BcPBq.mjs → detectFramework-U08038Yp.mjs} +3 -3
- package/dist/packem_shared/discoverAgentInfo-eXA3hF4v.mjs +19 -0
- package/dist/packem_shared/{inferLunoraBindings-DIku9mTN.mjs → inferLunoraBindings-BcvvtpSG.mjs} +145 -50
- package/dist/packem_shared/jsonc-edit-SbcD7MAe.mjs +9 -0
- package/dist/packem_shared/parseDevVariable-B0FEvfHC.mjs +21 -0
- package/dist/packem_shared/{policy-scaffold.d-DCmwn7zQ.d.ts → policy-scaffold.d-CFd2FlqG.d.mts} +22 -22
- package/dist/packem_shared/{policy-scaffold.d-DCmwn7zQ.d.mts → policy-scaffold.d-CFd2FlqG.d.ts} +22 -22
- package/dist/packem_shared/{reconcileWranglerBindings-DTHmqTbL.mjs → reconcileWranglerBindings-2Cww5VLa.mjs} +114 -29
- package/dist/packem_shared/reconcileWranglerCompatibilityDate-C8c497ag.mjs +31 -0
- package/dist/packem_shared/reconcileWranglerCrons-DvsceVFz.mjs +29 -0
- package/dist/packem_shared/{serveJsonHandler-B4OLTGLS.mjs → serveJsonHandler-Cl2Wqkv8.mjs} +2 -2
- package/dist/packem_shared/streamContainerLogs-BZ4cOZwH.mjs +157 -0
- package/dist/packem_shared/write-atomic-B2REqapi.mjs +14 -0
- package/dist/studio-host/index.d.mts +134 -92
- package/dist/studio-host/index.d.ts +134 -92
- package/dist/studio-host/index.mjs +6 -6
- package/package.json +11 -8
- package/dist/packem_shared/PACKAGE_SECRETS_REGISTRY-CySy5vR_.mjs +0 -62
- package/dist/packem_shared/loadStudioAssets-Csk5RS4E.mjs +0 -28
- package/dist/packem_shared/parseDevVariable-CJiq2IwE.mjs +0 -30
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/config",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.80",
|
|
4
4
|
"description": "Internal shared CLI + Vite config layer for Lunora: wrangler.jsonc validation, binding inference, and .dev.vars scaffolding",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bindings",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"directory": "packages/config"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
|
-
"dist",
|
|
28
|
+
"./dist",
|
|
29
29
|
"__assets__",
|
|
30
30
|
"README.md",
|
|
31
31
|
"LICENSE.md"
|
|
@@ -50,16 +50,19 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@lunora/codegen": "1.0.0-alpha.
|
|
54
|
-
"@lunora/container": "1.0.0-alpha.
|
|
55
|
-
"@lunora/
|
|
56
|
-
"@
|
|
57
|
-
"
|
|
53
|
+
"@lunora/codegen": "1.0.0-alpha.54",
|
|
54
|
+
"@lunora/container": "1.0.0-alpha.16",
|
|
55
|
+
"@lunora/errors": "1.0.0-alpha.8",
|
|
56
|
+
"@lunora/seed": "1.0.0-alpha.30",
|
|
57
|
+
"@visulima/colorize": "2.0.0",
|
|
58
|
+
"@visulima/find-ai-runner": "1.0.0",
|
|
59
|
+
"dockerode": "^5.0.1",
|
|
60
|
+
"es-module-lexer": "^2.3.1",
|
|
58
61
|
"jsonc-parser": "^3.3.1",
|
|
59
62
|
"ts-morph": "^28.0.0"
|
|
60
63
|
},
|
|
61
64
|
"peerDependencies": {
|
|
62
|
-
"@lunora/studio": "1.0.0-alpha.
|
|
65
|
+
"@lunora/studio": ">=1.0.0-alpha.50 <2.0.0-0"
|
|
63
66
|
},
|
|
64
67
|
"peerDependenciesMeta": {
|
|
65
68
|
"@lunora/studio": {
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
const PACKAGE_SECRETS_REGISTRY = {
|
|
2
|
-
"@lunora/auth": [
|
|
3
|
-
{
|
|
4
|
-
description: "32-byte random secret used to sign sessions and tokens. Generate with: openssl rand -hex 32",
|
|
5
|
-
docsUrl: "https://lunora.sh/docs/packages/auth#secrets",
|
|
6
|
-
key: "AUTH_SECRET",
|
|
7
|
-
placeholderValue: "replace-with-openssl-rand-hex-32"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
description: "Public base URL of your worker (used by better-auth for redirects and cookie domain). For local dev this is typically http://localhost:8787",
|
|
11
|
-
docsUrl: "https://lunora.sh/docs/packages/auth#secrets",
|
|
12
|
-
key: "AUTH_URL",
|
|
13
|
-
placeholderValue: "http://localhost:8787"
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"@lunora/mail": [
|
|
17
|
-
{
|
|
18
|
-
description: "Resend API key for sending transactional email via @lunora/mail. Obtain at https://resend.com/api-keys",
|
|
19
|
-
docsUrl: "https://lunora.sh/docs/packages/mail#secrets",
|
|
20
|
-
key: "RESEND_API_KEY",
|
|
21
|
-
placeholderValue: "<your-resend-api-key>"
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
"@lunora/payment": [
|
|
25
|
-
{
|
|
26
|
-
description: "Stripe secret key (sk_test_…). Required when using the Stripe adapter. Obtain at https://dashboard.stripe.com/apikeys",
|
|
27
|
-
docsUrl: "https://lunora.sh/docs/packages/payment#stripe",
|
|
28
|
-
key: "STRIPE_SECRET_KEY",
|
|
29
|
-
placeholderValue: "<your-stripe-secret-key>"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
description: "Stripe webhook signing secret (whsec_…) for verifying event payloads. Obtain at https://dashboard.stripe.com/webhooks",
|
|
33
|
-
docsUrl: "https://lunora.sh/docs/packages/payment#stripe",
|
|
34
|
-
key: "STRIPE_WEBHOOK_SECRET",
|
|
35
|
-
placeholderValue: "<your-stripe-webhook-secret>"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
description: "Polar access token for the Polar payment adapter. Obtain at https://polar.sh/settings/tokens",
|
|
39
|
-
docsUrl: "https://lunora.sh/docs/packages/payment#polar",
|
|
40
|
-
key: "POLAR_ACCESS_TOKEN",
|
|
41
|
-
placeholderValue: "<your-polar-access-token>"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
description: "Polar webhook secret for verifying event payloads from Polar. Obtain at https://polar.sh/settings/webhooks",
|
|
45
|
-
docsUrl: "https://lunora.sh/docs/packages/payment#polar",
|
|
46
|
-
key: "POLAR_WEBHOOK_SECRET",
|
|
47
|
-
placeholderValue: "<your-polar-webhook-secret>"
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
};
|
|
51
|
-
const secretsForPackages = (packageNames) => {
|
|
52
|
-
const result = [];
|
|
53
|
-
for (const name of packageNames) {
|
|
54
|
-
const entries = PACKAGE_SECRETS_REGISTRY[name];
|
|
55
|
-
if (entries !== void 0) {
|
|
56
|
-
result.push(...entries);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return result;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export { PACKAGE_SECRETS_REGISTRY, secretsForPackages };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { readFileSync, statSync } from 'node:fs';
|
|
2
|
-
import { createRequire } from 'node:module';
|
|
3
|
-
|
|
4
|
-
const loadStudioAssets = (logger, resolveFrom = import.meta.url) => {
|
|
5
|
-
try {
|
|
6
|
-
const require = createRequire(resolveFrom);
|
|
7
|
-
return {
|
|
8
|
-
script: readFileSync(require.resolve("@lunora/studio/standalone/studio.js")),
|
|
9
|
-
styles: readFileSync(require.resolve("@lunora/studio/styles.css"))
|
|
10
|
-
};
|
|
11
|
-
} catch (error) {
|
|
12
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
13
|
-
logger?.warnOnce?.(`[lunora] studio assets unavailable (build @lunora/studio?): ${message}`);
|
|
14
|
-
return void 0;
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
const studioAssetsStamp = (resolveFrom = import.meta.url) => {
|
|
18
|
-
try {
|
|
19
|
-
const require = createRequire(resolveFrom);
|
|
20
|
-
const scriptMtime = statSync(require.resolve("@lunora/studio/standalone/studio.js")).mtimeMs;
|
|
21
|
-
const stylesMtime = statSync(require.resolve("@lunora/studio/styles.css")).mtimeMs;
|
|
22
|
-
return Math.max(scriptMtime, stylesMtime);
|
|
23
|
-
} catch {
|
|
24
|
-
return void 0;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export { loadStudioAssets as default, studioAssetsStamp };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
|
|
4
|
-
const LINE_BREAK = /\r?\n/u;
|
|
5
|
-
const parseDevVariable = (contents, key) => {
|
|
6
|
-
for (const raw of contents.split(LINE_BREAK)) {
|
|
7
|
-
const line = raw.trim();
|
|
8
|
-
const eq = line.indexOf("=");
|
|
9
|
-
if (line === "" || line.startsWith("#") || eq === -1 || line.slice(0, eq).trim() !== key) {
|
|
10
|
-
continue;
|
|
11
|
-
}
|
|
12
|
-
const value = line.slice(eq + 1).trim();
|
|
13
|
-
const unquoted = value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'") ? value.slice(1, -1) : value;
|
|
14
|
-
return unquoted === "" ? void 0 : unquoted;
|
|
15
|
-
}
|
|
16
|
-
return void 0;
|
|
17
|
-
};
|
|
18
|
-
const resolveAdminToken = (root) => {
|
|
19
|
-
const fromEnv = process.env["LUNORA_ADMIN_TOKEN"];
|
|
20
|
-
if (typeof fromEnv === "string" && fromEnv !== "") {
|
|
21
|
-
return fromEnv;
|
|
22
|
-
}
|
|
23
|
-
try {
|
|
24
|
-
return parseDevVariable(readFileSync(join(root, ".dev.vars"), "utf8"), "LUNORA_ADMIN_TOKEN");
|
|
25
|
-
} catch {
|
|
26
|
-
return void 0;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export { parseDevVariable, resolveAdminToken };
|