@kitsy/cnos 1.4.0 → 1.5.1
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/README.md +1 -1
- package/dist/build/index.cjs +60 -7
- package/dist/build/index.d.cts +10 -2
- package/dist/build/index.d.ts +10 -2
- package/dist/build/index.js +56 -9
- package/dist/{chunk-EQSKV3DP.js → chunk-5F2OFKND.js} +1 -1
- package/dist/{chunk-ZTPSFXWP.js → chunk-7EI3RFUE.js} +1 -1
- package/dist/{chunk-APIU4GTB.js → chunk-BS33AW4Y.js} +8 -4
- package/dist/{chunk-JSBVYK2T.js → chunk-CMQK2AEF.js} +8 -8
- package/dist/{chunk-T6Y57KTT.js → chunk-EJAXWFNT.js} +1 -1
- package/dist/{chunk-FWJC4Y2D.js → chunk-F2ZAIZNH.js} +1 -1
- package/dist/{chunk-WCHX2QFY.js → chunk-H53ZRQLX.js} +1 -1
- package/dist/{chunk-J4K4JUJL.js → chunk-SZKQVA2M.js} +1 -1
- package/dist/{chunk-LJD4SM32.js → chunk-TUMR7JA3.js} +54 -9
- package/dist/{chunk-HMM76UYZ.js → chunk-UWFE4JE2.js} +1 -1
- package/dist/configure/index.cjs +9 -5
- package/dist/configure/index.js +8 -8
- package/dist/index.cjs +60 -11
- package/dist/index.js +10 -10
- package/dist/internal.cjs +2 -1
- package/dist/internal.js +2 -2
- package/dist/plugin/basic-schema.js +2 -2
- package/dist/plugin/cli-args.js +2 -2
- package/dist/plugin/dotenv.js +2 -2
- package/dist/plugin/env-export.cjs +6 -3
- package/dist/plugin/env-export.js +2 -2
- package/dist/plugin/filesystem.js +2 -2
- package/dist/plugin/process-env.js +2 -2
- package/dist/runtime/index.cjs +60 -11
- package/dist/runtime/index.d.cts +13 -1
- package/dist/runtime/index.d.ts +13 -1
- package/dist/runtime/index.js +10 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,4 +19,4 @@ CLI-oriented storage/export rules to be aware of:
|
|
|
19
19
|
- shell env export comes from explicit `envMapping.explicit`
|
|
20
20
|
- local secret material lives outside the repo in encrypted vault storage under `~/.cnos/secrets`
|
|
21
21
|
|
|
22
|
-
Use `@kitsy/cnos-vite` for Vite projects
|
|
22
|
+
Use `@kitsy/cnos-vite` for Vite projects, `@kitsy/cnos-next` for Next.js projects, and `@kitsy/cnos-webpack` for webpack/static bundles when you want CNOS public values projected into framework-native env surfaces and embedded for `@kitsy/cnos/browser`.
|
package/dist/build/index.cjs
CHANGED
|
@@ -30,7 +30,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/build/index.ts
|
|
31
31
|
var build_exports = {};
|
|
32
32
|
__export(build_exports, {
|
|
33
|
-
resolveBrowserData: () => resolveBrowserData
|
|
33
|
+
resolveBrowserData: () => resolveBrowserData,
|
|
34
|
+
resolveFrameworkEnv: () => resolveFrameworkEnv,
|
|
35
|
+
toFrameworkEnv: () => toFrameworkEnv
|
|
34
36
|
});
|
|
35
37
|
module.exports = __toCommonJS(build_exports);
|
|
36
38
|
|
|
@@ -277,7 +279,8 @@ var DEFAULT_INSPECTORS = ["provenance"];
|
|
|
277
279
|
var DEFAULT_FRAMEWORK_PREFIXES = {
|
|
278
280
|
next: "NEXT_PUBLIC_",
|
|
279
281
|
vite: "VITE_",
|
|
280
|
-
nuxt: "NUXT_PUBLIC_"
|
|
282
|
+
nuxt: "NUXT_PUBLIC_",
|
|
283
|
+
webpack: ""
|
|
281
284
|
};
|
|
282
285
|
var DEFAULT_NAMESPACES = {
|
|
283
286
|
value: {
|
|
@@ -2054,11 +2057,14 @@ function resolvePublicPrefix(manifest, options) {
|
|
|
2054
2057
|
if (!options.framework) {
|
|
2055
2058
|
return "";
|
|
2056
2059
|
}
|
|
2057
|
-
const
|
|
2058
|
-
|
|
2060
|
+
const hasConfiguredPrefix = Object.prototype.hasOwnProperty.call(
|
|
2061
|
+
manifest.public.frameworks,
|
|
2062
|
+
options.framework
|
|
2063
|
+
);
|
|
2064
|
+
if (!hasConfiguredPrefix) {
|
|
2059
2065
|
throw new CnosManifestError(`Unknown public framework prefix: ${options.framework}`);
|
|
2060
2066
|
}
|
|
2061
|
-
return
|
|
2067
|
+
return manifest.public.frameworks[options.framework] ?? "";
|
|
2062
2068
|
}
|
|
2063
2069
|
function toPublicEnv(graph, manifest, options = {}) {
|
|
2064
2070
|
const prefix = resolvePublicPrefix(manifest, options);
|
|
@@ -2317,7 +2323,7 @@ function envVarToLogicalKey(envVar, config = {}) {
|
|
|
2317
2323
|
// package.json
|
|
2318
2324
|
var package_default = {
|
|
2319
2325
|
name: "@kitsy/cnos",
|
|
2320
|
-
version: "1.
|
|
2326
|
+
version: "1.5.1",
|
|
2321
2327
|
description: "Batteries-included CNOS runtime package wired with the official plugins.",
|
|
2322
2328
|
type: "module",
|
|
2323
2329
|
main: "./dist/index.cjs",
|
|
@@ -2976,7 +2982,54 @@ async function resolveBrowserData(options = {}) {
|
|
|
2976
2982
|
}
|
|
2977
2983
|
return browserData;
|
|
2978
2984
|
}
|
|
2985
|
+
function toScreamingSnakeSegment(segment) {
|
|
2986
|
+
return segment.replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^A-Za-z0-9]+/g, "_").replace(/_+/g, "_").replace(/^_+|_+$/g, "").toUpperCase();
|
|
2987
|
+
}
|
|
2988
|
+
function toScreamingSnake(path12) {
|
|
2989
|
+
return path12.split(".").map((segment) => toScreamingSnakeSegment(segment)).filter(Boolean).join("_");
|
|
2990
|
+
}
|
|
2991
|
+
function stripPublicNamespace(key) {
|
|
2992
|
+
return key.startsWith("public.") ? key.slice("public.".length) : key;
|
|
2993
|
+
}
|
|
2994
|
+
function resolveFrameworkPrefix(framework, prefix) {
|
|
2995
|
+
if (prefix !== void 0) {
|
|
2996
|
+
return prefix;
|
|
2997
|
+
}
|
|
2998
|
+
switch (framework) {
|
|
2999
|
+
case "vite":
|
|
3000
|
+
return "VITE_";
|
|
3001
|
+
case "next":
|
|
3002
|
+
return "NEXT_PUBLIC_";
|
|
3003
|
+
case "webpack":
|
|
3004
|
+
case "generic":
|
|
3005
|
+
return "";
|
|
3006
|
+
default:
|
|
3007
|
+
return "";
|
|
3008
|
+
}
|
|
3009
|
+
}
|
|
3010
|
+
function toFrameworkEnv(browserData, framework = "generic", options = {}) {
|
|
3011
|
+
const resolvedPrefix = resolveFrameworkPrefix(framework, options.prefix);
|
|
3012
|
+
return Object.fromEntries(
|
|
3013
|
+
Object.entries(browserData).sort(([left], [right]) => left.localeCompare(right)).map(([key, value]) => [
|
|
3014
|
+
`${resolvedPrefix}${toScreamingSnake(stripPublicNamespace(key))}`,
|
|
3015
|
+
String(value)
|
|
3016
|
+
])
|
|
3017
|
+
);
|
|
3018
|
+
}
|
|
3019
|
+
async function resolveFrameworkEnv(options = {}, framework = "generic", envOptions = {}) {
|
|
3020
|
+
if (framework === "generic") {
|
|
3021
|
+
const browserData = await resolveBrowserData(options);
|
|
3022
|
+
return toFrameworkEnv(browserData, framework, envOptions);
|
|
3023
|
+
}
|
|
3024
|
+
const runtime = await createCnos2(options);
|
|
3025
|
+
return runtime.toPublicEnv({
|
|
3026
|
+
framework,
|
|
3027
|
+
...envOptions.prefix ? { prefix: envOptions.prefix } : {}
|
|
3028
|
+
});
|
|
3029
|
+
}
|
|
2979
3030
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2980
3031
|
0 && (module.exports = {
|
|
2981
|
-
resolveBrowserData
|
|
3032
|
+
resolveBrowserData,
|
|
3033
|
+
resolveFrameworkEnv,
|
|
3034
|
+
toFrameworkEnv
|
|
2982
3035
|
});
|
package/dist/build/index.d.cts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { C as CnosCreateOptions } from '../plugin-B4xwySxw.cjs';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
type BrowserDataMap = Record<string, unknown>;
|
|
4
|
+
type FrameworkEnvTarget = 'generic' | 'vite' | 'next' | 'webpack' | (string & {});
|
|
5
|
+
declare function resolveBrowserData(options?: CnosCreateOptions): Promise<BrowserDataMap>;
|
|
6
|
+
declare function toFrameworkEnv(browserData: BrowserDataMap, framework?: FrameworkEnvTarget, options?: {
|
|
7
|
+
prefix?: string;
|
|
8
|
+
}): Record<string, string>;
|
|
9
|
+
declare function resolveFrameworkEnv(options?: CnosCreateOptions, framework?: FrameworkEnvTarget, envOptions?: {
|
|
10
|
+
prefix?: string;
|
|
11
|
+
}): Promise<Record<string, string>>;
|
|
4
12
|
|
|
5
|
-
export { resolveBrowserData };
|
|
13
|
+
export { type BrowserDataMap, type FrameworkEnvTarget, resolveBrowserData, resolveFrameworkEnv, toFrameworkEnv };
|
package/dist/build/index.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { C as CnosCreateOptions } from '../plugin-B4xwySxw.js';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
type BrowserDataMap = Record<string, unknown>;
|
|
4
|
+
type FrameworkEnvTarget = 'generic' | 'vite' | 'next' | 'webpack' | (string & {});
|
|
5
|
+
declare function resolveBrowserData(options?: CnosCreateOptions): Promise<BrowserDataMap>;
|
|
6
|
+
declare function toFrameworkEnv(browserData: BrowserDataMap, framework?: FrameworkEnvTarget, options?: {
|
|
7
|
+
prefix?: string;
|
|
8
|
+
}): Record<string, string>;
|
|
9
|
+
declare function resolveFrameworkEnv(options?: CnosCreateOptions, framework?: FrameworkEnvTarget, envOptions?: {
|
|
10
|
+
prefix?: string;
|
|
11
|
+
}): Promise<Record<string, string>>;
|
|
4
12
|
|
|
5
|
-
export { resolveBrowserData };
|
|
13
|
+
export { type BrowserDataMap, type FrameworkEnvTarget, resolveBrowserData, resolveFrameworkEnv, toFrameworkEnv };
|
package/dist/build/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCnos
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-CMQK2AEF.js";
|
|
4
|
+
import "../chunk-SZKQVA2M.js";
|
|
5
|
+
import "../chunk-EJAXWFNT.js";
|
|
6
|
+
import "../chunk-H53ZRQLX.js";
|
|
7
|
+
import "../chunk-F2ZAIZNH.js";
|
|
8
|
+
import "../chunk-7EI3RFUE.js";
|
|
9
|
+
import "../chunk-UWFE4JE2.js";
|
|
10
|
+
import "../chunk-BS33AW4Y.js";
|
|
11
11
|
|
|
12
12
|
// src/build/index.ts
|
|
13
13
|
async function resolveBrowserData(options = {}) {
|
|
@@ -21,6 +21,53 @@ async function resolveBrowserData(options = {}) {
|
|
|
21
21
|
}
|
|
22
22
|
return browserData;
|
|
23
23
|
}
|
|
24
|
+
function toScreamingSnakeSegment(segment) {
|
|
25
|
+
return segment.replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^A-Za-z0-9]+/g, "_").replace(/_+/g, "_").replace(/^_+|_+$/g, "").toUpperCase();
|
|
26
|
+
}
|
|
27
|
+
function toScreamingSnake(path) {
|
|
28
|
+
return path.split(".").map((segment) => toScreamingSnakeSegment(segment)).filter(Boolean).join("_");
|
|
29
|
+
}
|
|
30
|
+
function stripPublicNamespace(key) {
|
|
31
|
+
return key.startsWith("public.") ? key.slice("public.".length) : key;
|
|
32
|
+
}
|
|
33
|
+
function resolveFrameworkPrefix(framework, prefix) {
|
|
34
|
+
if (prefix !== void 0) {
|
|
35
|
+
return prefix;
|
|
36
|
+
}
|
|
37
|
+
switch (framework) {
|
|
38
|
+
case "vite":
|
|
39
|
+
return "VITE_";
|
|
40
|
+
case "next":
|
|
41
|
+
return "NEXT_PUBLIC_";
|
|
42
|
+
case "webpack":
|
|
43
|
+
case "generic":
|
|
44
|
+
return "";
|
|
45
|
+
default:
|
|
46
|
+
return "";
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function toFrameworkEnv(browserData, framework = "generic", options = {}) {
|
|
50
|
+
const resolvedPrefix = resolveFrameworkPrefix(framework, options.prefix);
|
|
51
|
+
return Object.fromEntries(
|
|
52
|
+
Object.entries(browserData).sort(([left], [right]) => left.localeCompare(right)).map(([key, value]) => [
|
|
53
|
+
`${resolvedPrefix}${toScreamingSnake(stripPublicNamespace(key))}`,
|
|
54
|
+
String(value)
|
|
55
|
+
])
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
async function resolveFrameworkEnv(options = {}, framework = "generic", envOptions = {}) {
|
|
59
|
+
if (framework === "generic") {
|
|
60
|
+
const browserData = await resolveBrowserData(options);
|
|
61
|
+
return toFrameworkEnv(browserData, framework, envOptions);
|
|
62
|
+
}
|
|
63
|
+
const runtime = await createCnos(options);
|
|
64
|
+
return runtime.toPublicEnv({
|
|
65
|
+
framework,
|
|
66
|
+
...envOptions.prefix ? { prefix: envOptions.prefix } : {}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
24
69
|
export {
|
|
25
|
-
resolveBrowserData
|
|
70
|
+
resolveBrowserData,
|
|
71
|
+
resolveFrameworkEnv,
|
|
72
|
+
toFrameworkEnv
|
|
26
73
|
};
|
|
@@ -286,7 +286,8 @@ var DEFAULT_INSPECTORS = ["provenance"];
|
|
|
286
286
|
var DEFAULT_FRAMEWORK_PREFIXES = {
|
|
287
287
|
next: "NEXT_PUBLIC_",
|
|
288
288
|
vite: "VITE_",
|
|
289
|
-
nuxt: "NUXT_PUBLIC_"
|
|
289
|
+
nuxt: "NUXT_PUBLIC_",
|
|
290
|
+
webpack: ""
|
|
290
291
|
};
|
|
291
292
|
var DEFAULT_NAMESPACES = {
|
|
292
293
|
value: {
|
|
@@ -1389,11 +1390,14 @@ function resolvePublicPrefix(manifest, options) {
|
|
|
1389
1390
|
if (!options.framework) {
|
|
1390
1391
|
return "";
|
|
1391
1392
|
}
|
|
1392
|
-
const
|
|
1393
|
-
|
|
1393
|
+
const hasConfiguredPrefix = Object.prototype.hasOwnProperty.call(
|
|
1394
|
+
manifest.public.frameworks,
|
|
1395
|
+
options.framework
|
|
1396
|
+
);
|
|
1397
|
+
if (!hasConfiguredPrefix) {
|
|
1394
1398
|
throw new CnosManifestError(`Unknown public framework prefix: ${options.framework}`);
|
|
1395
1399
|
}
|
|
1396
|
-
return
|
|
1400
|
+
return manifest.public.frameworks[options.framework] ?? "";
|
|
1397
1401
|
}
|
|
1398
1402
|
function toPublicEnv(graph, manifest, options = {}) {
|
|
1399
1403
|
const prefix = resolvePublicPrefix(manifest, options);
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createEnvExportPlugin,
|
|
3
3
|
createPublicEnvExportPlugin
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SZKQVA2M.js";
|
|
5
5
|
import {
|
|
6
6
|
createFilesystemSecretsPlugin,
|
|
7
7
|
createFilesystemValuesPlugin
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EJAXWFNT.js";
|
|
9
9
|
import {
|
|
10
10
|
createProcessEnvPlugin
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-H53ZRQLX.js";
|
|
12
12
|
import {
|
|
13
13
|
createBasicSchemaPlugin
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-F2ZAIZNH.js";
|
|
15
15
|
import {
|
|
16
16
|
createCliArgsPlugin
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7EI3RFUE.js";
|
|
18
18
|
import {
|
|
19
19
|
createDotenvPlugin
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-UWFE4JE2.js";
|
|
21
21
|
import {
|
|
22
22
|
createCnos,
|
|
23
23
|
createProvenanceInspector
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-BS33AW4Y.js";
|
|
25
25
|
|
|
26
26
|
// src/defaultPlugins.ts
|
|
27
27
|
function defaultPlugins() {
|
|
@@ -68,7 +68,7 @@ function setBootstrappedSecretHydrationRequired(value) {
|
|
|
68
68
|
// package.json
|
|
69
69
|
var package_default = {
|
|
70
70
|
name: "@kitsy/cnos",
|
|
71
|
-
version: "1.
|
|
71
|
+
version: "1.5.1",
|
|
72
72
|
description: "Batteries-included CNOS runtime package wired with the official plugins.",
|
|
73
73
|
type: "module",
|
|
74
74
|
main: "./dist/index.cjs",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
graphRequiresSecretHydration,
|
|
3
3
|
readRuntimeGraphFromEnv
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5F2OFKND.js";
|
|
5
5
|
import {
|
|
6
6
|
createCnos,
|
|
7
7
|
getBootstrappedSecretHydrationRequired,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
setBootstrappedSecretHydrationRequired,
|
|
11
11
|
setSingletonReady,
|
|
12
12
|
setSingletonRuntime
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CMQK2AEF.js";
|
|
14
14
|
import {
|
|
15
15
|
inspectValue,
|
|
16
16
|
readOrValue,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
toLogicalKey,
|
|
21
21
|
toNamespaceObject,
|
|
22
22
|
toPublicEnv
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BS33AW4Y.js";
|
|
24
24
|
|
|
25
25
|
// src/runtime/index.ts
|
|
26
26
|
var NOT_READY_MESSAGE = "CNOS not initialized. Call await cnos.ready() or use cnos run.";
|
|
@@ -31,6 +31,31 @@ function getRuntimeOrThrow() {
|
|
|
31
31
|
}
|
|
32
32
|
return runtime;
|
|
33
33
|
}
|
|
34
|
+
function stringifyLogValue(value) {
|
|
35
|
+
if (value === void 0) {
|
|
36
|
+
return "";
|
|
37
|
+
}
|
|
38
|
+
if (value === null) {
|
|
39
|
+
return "null";
|
|
40
|
+
}
|
|
41
|
+
if (typeof value === "string") {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
|
|
45
|
+
return String(value);
|
|
46
|
+
}
|
|
47
|
+
return JSON.stringify(value);
|
|
48
|
+
}
|
|
49
|
+
function formatMessage(runtime, message) {
|
|
50
|
+
return message.replace(/\$\{([^}]+)\}/g, (match, rawKey) => {
|
|
51
|
+
const key = String(rawKey).trim();
|
|
52
|
+
if (!key) {
|
|
53
|
+
return match;
|
|
54
|
+
}
|
|
55
|
+
const value = runtime.read(key);
|
|
56
|
+
return value === void 0 ? match : stringifyLogValue(value);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
34
59
|
function attachBootstrappedGraph(graph) {
|
|
35
60
|
if (getSingletonRuntime()) {
|
|
36
61
|
return;
|
|
@@ -111,12 +136,6 @@ function attachBootstrappedGraph(graph) {
|
|
|
111
136
|
meta(path) {
|
|
112
137
|
return readValue(graph, toLogicalKey("meta", path));
|
|
113
138
|
},
|
|
114
|
-
inspect(key) {
|
|
115
|
-
return inspectValue(graph, key);
|
|
116
|
-
},
|
|
117
|
-
toObject() {
|
|
118
|
-
return toNamespaceObject(graph);
|
|
119
|
-
},
|
|
120
139
|
toNamespace(namespace) {
|
|
121
140
|
return toNamespaceObject(graph, namespace);
|
|
122
141
|
},
|
|
@@ -125,6 +144,12 @@ function attachBootstrappedGraph(graph) {
|
|
|
125
144
|
},
|
|
126
145
|
toPublicEnv(options) {
|
|
127
146
|
return toPublicEnv(graph, bootstrappedManifest, options);
|
|
147
|
+
},
|
|
148
|
+
inspect(key) {
|
|
149
|
+
return inspectValue(graph, key);
|
|
150
|
+
},
|
|
151
|
+
toObject() {
|
|
152
|
+
return toNamespaceObject(graph);
|
|
128
153
|
}
|
|
129
154
|
};
|
|
130
155
|
setSingletonRuntime(runtime);
|
|
@@ -164,6 +189,26 @@ var cnos = Object.assign(
|
|
|
164
189
|
meta(path) {
|
|
165
190
|
return readValue(getRuntimeOrThrow().graph, toLogicalKey("meta", path));
|
|
166
191
|
},
|
|
192
|
+
inspect(key) {
|
|
193
|
+
return getRuntimeOrThrow().inspect(key);
|
|
194
|
+
},
|
|
195
|
+
toNamespace(namespace) {
|
|
196
|
+
return getRuntimeOrThrow().toNamespace(namespace);
|
|
197
|
+
},
|
|
198
|
+
toEnv(options) {
|
|
199
|
+
return getRuntimeOrThrow().toEnv(options);
|
|
200
|
+
},
|
|
201
|
+
toPublicEnv(options) {
|
|
202
|
+
return getRuntimeOrThrow().toPublicEnv(options);
|
|
203
|
+
},
|
|
204
|
+
format(message) {
|
|
205
|
+
return formatMessage(getRuntimeOrThrow(), message);
|
|
206
|
+
},
|
|
207
|
+
log(message) {
|
|
208
|
+
const formatted = formatMessage(getRuntimeOrThrow(), message);
|
|
209
|
+
console.log(formatted);
|
|
210
|
+
return formatted;
|
|
211
|
+
},
|
|
167
212
|
async ready() {
|
|
168
213
|
if (getSingletonRuntime() && !getBootstrappedSecretHydrationRequired()) {
|
|
169
214
|
return;
|
package/dist/configure/index.cjs
CHANGED
|
@@ -282,7 +282,8 @@ var DEFAULT_INSPECTORS = ["provenance"];
|
|
|
282
282
|
var DEFAULT_FRAMEWORK_PREFIXES = {
|
|
283
283
|
next: "NEXT_PUBLIC_",
|
|
284
284
|
vite: "VITE_",
|
|
285
|
-
nuxt: "NUXT_PUBLIC_"
|
|
285
|
+
nuxt: "NUXT_PUBLIC_",
|
|
286
|
+
webpack: ""
|
|
286
287
|
};
|
|
287
288
|
var DEFAULT_NAMESPACES = {
|
|
288
289
|
value: {
|
|
@@ -2059,11 +2060,14 @@ function resolvePublicPrefix(manifest, options) {
|
|
|
2059
2060
|
if (!options.framework) {
|
|
2060
2061
|
return "";
|
|
2061
2062
|
}
|
|
2062
|
-
const
|
|
2063
|
-
|
|
2063
|
+
const hasConfiguredPrefix = Object.prototype.hasOwnProperty.call(
|
|
2064
|
+
manifest.public.frameworks,
|
|
2065
|
+
options.framework
|
|
2066
|
+
);
|
|
2067
|
+
if (!hasConfiguredPrefix) {
|
|
2064
2068
|
throw new CnosManifestError(`Unknown public framework prefix: ${options.framework}`);
|
|
2065
2069
|
}
|
|
2066
|
-
return
|
|
2070
|
+
return manifest.public.frameworks[options.framework] ?? "";
|
|
2067
2071
|
}
|
|
2068
2072
|
function toPublicEnv(graph, manifest, options = {}) {
|
|
2069
2073
|
const prefix = resolvePublicPrefix(manifest, options);
|
|
@@ -2364,7 +2368,7 @@ function envVarToLogicalKey(envVar, config = {}) {
|
|
|
2364
2368
|
// package.json
|
|
2365
2369
|
var package_default = {
|
|
2366
2370
|
name: "@kitsy/cnos",
|
|
2367
|
-
version: "1.
|
|
2371
|
+
version: "1.5.1",
|
|
2368
2372
|
description: "Batteries-included CNOS runtime package wired with the official plugins.",
|
|
2369
2373
|
type: "module",
|
|
2370
2374
|
main: "./dist/index.cjs",
|
package/dist/configure/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCnos,
|
|
3
3
|
defaultPlugins
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-CMQK2AEF.js";
|
|
5
|
+
import "../chunk-SZKQVA2M.js";
|
|
6
|
+
import "../chunk-EJAXWFNT.js";
|
|
7
|
+
import "../chunk-H53ZRQLX.js";
|
|
8
|
+
import "../chunk-F2ZAIZNH.js";
|
|
9
|
+
import "../chunk-7EI3RFUE.js";
|
|
10
|
+
import "../chunk-UWFE4JE2.js";
|
|
11
11
|
import {
|
|
12
12
|
planDump,
|
|
13
13
|
toEnv,
|
|
14
14
|
toPublicEnv,
|
|
15
15
|
writeDump
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-BS33AW4Y.js";
|
|
17
17
|
export {
|
|
18
18
|
createCnos,
|
|
19
19
|
defaultPlugins,
|
package/dist/index.cjs
CHANGED
|
@@ -278,7 +278,8 @@ var DEFAULT_INSPECTORS = ["provenance"];
|
|
|
278
278
|
var DEFAULT_FRAMEWORK_PREFIXES = {
|
|
279
279
|
next: "NEXT_PUBLIC_",
|
|
280
280
|
vite: "VITE_",
|
|
281
|
-
nuxt: "NUXT_PUBLIC_"
|
|
281
|
+
nuxt: "NUXT_PUBLIC_",
|
|
282
|
+
webpack: ""
|
|
282
283
|
};
|
|
283
284
|
var DEFAULT_NAMESPACES = {
|
|
284
285
|
value: {
|
|
@@ -2055,11 +2056,14 @@ function resolvePublicPrefix(manifest, options) {
|
|
|
2055
2056
|
if (!options.framework) {
|
|
2056
2057
|
return "";
|
|
2057
2058
|
}
|
|
2058
|
-
const
|
|
2059
|
-
|
|
2059
|
+
const hasConfiguredPrefix = Object.prototype.hasOwnProperty.call(
|
|
2060
|
+
manifest.public.frameworks,
|
|
2061
|
+
options.framework
|
|
2062
|
+
);
|
|
2063
|
+
if (!hasConfiguredPrefix) {
|
|
2060
2064
|
throw new CnosManifestError(`Unknown public framework prefix: ${options.framework}`);
|
|
2061
2065
|
}
|
|
2062
|
-
return
|
|
2066
|
+
return manifest.public.frameworks[options.framework] ?? "";
|
|
2063
2067
|
}
|
|
2064
2068
|
function toPublicEnv(graph, manifest, options = {}) {
|
|
2065
2069
|
const prefix = resolvePublicPrefix(manifest, options);
|
|
@@ -2318,7 +2322,7 @@ function envVarToLogicalKey(envVar, config = {}) {
|
|
|
2318
2322
|
// package.json
|
|
2319
2323
|
var package_default = {
|
|
2320
2324
|
name: "@kitsy/cnos",
|
|
2321
|
-
version: "1.
|
|
2325
|
+
version: "1.5.1",
|
|
2322
2326
|
description: "Batteries-included CNOS runtime package wired with the official plugins.",
|
|
2323
2327
|
type: "module",
|
|
2324
2328
|
main: "./dist/index.cjs",
|
|
@@ -3056,6 +3060,31 @@ function getRuntimeOrThrow() {
|
|
|
3056
3060
|
}
|
|
3057
3061
|
return runtime;
|
|
3058
3062
|
}
|
|
3063
|
+
function stringifyLogValue(value) {
|
|
3064
|
+
if (value === void 0) {
|
|
3065
|
+
return "";
|
|
3066
|
+
}
|
|
3067
|
+
if (value === null) {
|
|
3068
|
+
return "null";
|
|
3069
|
+
}
|
|
3070
|
+
if (typeof value === "string") {
|
|
3071
|
+
return value;
|
|
3072
|
+
}
|
|
3073
|
+
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
|
|
3074
|
+
return String(value);
|
|
3075
|
+
}
|
|
3076
|
+
return JSON.stringify(value);
|
|
3077
|
+
}
|
|
3078
|
+
function formatMessage(runtime, message) {
|
|
3079
|
+
return message.replace(/\$\{([^}]+)\}/g, (match, rawKey) => {
|
|
3080
|
+
const key = String(rawKey).trim();
|
|
3081
|
+
if (!key) {
|
|
3082
|
+
return match;
|
|
3083
|
+
}
|
|
3084
|
+
const value = runtime.read(key);
|
|
3085
|
+
return value === void 0 ? match : stringifyLogValue(value);
|
|
3086
|
+
});
|
|
3087
|
+
}
|
|
3059
3088
|
function attachBootstrappedGraph(graph) {
|
|
3060
3089
|
if (getSingletonRuntime()) {
|
|
3061
3090
|
return;
|
|
@@ -3136,12 +3165,6 @@ function attachBootstrappedGraph(graph) {
|
|
|
3136
3165
|
meta(path12) {
|
|
3137
3166
|
return readValue(graph, toLogicalKey("meta", path12));
|
|
3138
3167
|
},
|
|
3139
|
-
inspect(key) {
|
|
3140
|
-
return inspectValue(graph, key);
|
|
3141
|
-
},
|
|
3142
|
-
toObject() {
|
|
3143
|
-
return toNamespaceObject(graph);
|
|
3144
|
-
},
|
|
3145
3168
|
toNamespace(namespace) {
|
|
3146
3169
|
return toNamespaceObject(graph, namespace);
|
|
3147
3170
|
},
|
|
@@ -3150,6 +3173,12 @@ function attachBootstrappedGraph(graph) {
|
|
|
3150
3173
|
},
|
|
3151
3174
|
toPublicEnv(options) {
|
|
3152
3175
|
return toPublicEnv(graph, bootstrappedManifest, options);
|
|
3176
|
+
},
|
|
3177
|
+
inspect(key) {
|
|
3178
|
+
return inspectValue(graph, key);
|
|
3179
|
+
},
|
|
3180
|
+
toObject() {
|
|
3181
|
+
return toNamespaceObject(graph);
|
|
3153
3182
|
}
|
|
3154
3183
|
};
|
|
3155
3184
|
setSingletonRuntime(runtime);
|
|
@@ -3189,6 +3218,26 @@ var cnos = Object.assign(
|
|
|
3189
3218
|
meta(path12) {
|
|
3190
3219
|
return readValue(getRuntimeOrThrow().graph, toLogicalKey("meta", path12));
|
|
3191
3220
|
},
|
|
3221
|
+
inspect(key) {
|
|
3222
|
+
return getRuntimeOrThrow().inspect(key);
|
|
3223
|
+
},
|
|
3224
|
+
toNamespace(namespace) {
|
|
3225
|
+
return getRuntimeOrThrow().toNamespace(namespace);
|
|
3226
|
+
},
|
|
3227
|
+
toEnv(options) {
|
|
3228
|
+
return getRuntimeOrThrow().toEnv(options);
|
|
3229
|
+
},
|
|
3230
|
+
toPublicEnv(options) {
|
|
3231
|
+
return getRuntimeOrThrow().toPublicEnv(options);
|
|
3232
|
+
},
|
|
3233
|
+
format(message) {
|
|
3234
|
+
return formatMessage(getRuntimeOrThrow(), message);
|
|
3235
|
+
},
|
|
3236
|
+
log(message) {
|
|
3237
|
+
const formatted = formatMessage(getRuntimeOrThrow(), message);
|
|
3238
|
+
console.log(formatted);
|
|
3239
|
+
return formatted;
|
|
3240
|
+
},
|
|
3192
3241
|
async ready() {
|
|
3193
3242
|
if (getSingletonRuntime() && !getBootstrappedSecretHydrationRequired()) {
|
|
3194
3243
|
return;
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runtime_default
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-TUMR7JA3.js";
|
|
4
|
+
import "./chunk-5F2OFKND.js";
|
|
5
|
+
import "./chunk-CMQK2AEF.js";
|
|
6
|
+
import "./chunk-SZKQVA2M.js";
|
|
7
|
+
import "./chunk-EJAXWFNT.js";
|
|
8
|
+
import "./chunk-H53ZRQLX.js";
|
|
9
|
+
import "./chunk-F2ZAIZNH.js";
|
|
10
|
+
import "./chunk-7EI3RFUE.js";
|
|
11
|
+
import "./chunk-UWFE4JE2.js";
|
|
12
|
+
import "./chunk-BS33AW4Y.js";
|
|
13
13
|
export {
|
|
14
14
|
runtime_default as cnos,
|
|
15
15
|
runtime_default as default
|
package/dist/internal.cjs
CHANGED
package/dist/internal.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
readRuntimeGraphFromEnv,
|
|
8
8
|
serializeRuntimeGraph,
|
|
9
9
|
serializeSecretPayload
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5F2OFKND.js";
|
|
11
11
|
import {
|
|
12
12
|
CnosAuthenticationError,
|
|
13
13
|
CnosSecurityError,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
writeKeychain,
|
|
48
48
|
writeLocalSecret,
|
|
49
49
|
writeVaultSessionKey
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-BS33AW4Y.js";
|
|
51
51
|
|
|
52
52
|
// src/codegen/generateTypes.ts
|
|
53
53
|
function toPascalCase(value) {
|
package/dist/plugin/cli-args.js
CHANGED
package/dist/plugin/dotenv.js
CHANGED
|
@@ -198,11 +198,14 @@ function resolvePublicPrefix(manifest, options) {
|
|
|
198
198
|
if (!options.framework) {
|
|
199
199
|
return "";
|
|
200
200
|
}
|
|
201
|
-
const
|
|
202
|
-
|
|
201
|
+
const hasConfiguredPrefix = Object.prototype.hasOwnProperty.call(
|
|
202
|
+
manifest.public.frameworks,
|
|
203
|
+
options.framework
|
|
204
|
+
);
|
|
205
|
+
if (!hasConfiguredPrefix) {
|
|
203
206
|
throw new CnosManifestError(`Unknown public framework prefix: ${options.framework}`);
|
|
204
207
|
}
|
|
205
|
-
return
|
|
208
|
+
return manifest.public.frameworks[options.framework] ?? "";
|
|
206
209
|
}
|
|
207
210
|
function toPublicEnv(graph, manifest, options = {}) {
|
|
208
211
|
const prefix = resolvePublicPrefix(manifest, options);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createEnvExportPlugin,
|
|
3
3
|
createPublicEnvExportPlugin
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-SZKQVA2M.js";
|
|
5
5
|
import {
|
|
6
6
|
toEnv,
|
|
7
7
|
toPublicEnv
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-BS33AW4Y.js";
|
|
9
9
|
export {
|
|
10
10
|
createEnvExportPlugin,
|
|
11
11
|
createPublicEnvExportPlugin,
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
filesystemSecretsReader,
|
|
6
6
|
filesystemValuesReader,
|
|
7
7
|
yamlObjectToEntries
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-EJAXWFNT.js";
|
|
9
|
+
import "../chunk-BS33AW4Y.js";
|
|
10
10
|
export {
|
|
11
11
|
collectFilesystemLayerFiles,
|
|
12
12
|
createFilesystemSecretsPlugin,
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
createProcessEnvPlugin,
|
|
3
3
|
processEnvEntriesFromObject,
|
|
4
4
|
processNamespaceEntriesFromContext
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-H53ZRQLX.js";
|
|
6
|
+
import "../chunk-BS33AW4Y.js";
|
|
7
7
|
export {
|
|
8
8
|
createProcessEnvPlugin,
|
|
9
9
|
processEnvEntriesFromObject,
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -277,7 +277,8 @@ var DEFAULT_INSPECTORS = ["provenance"];
|
|
|
277
277
|
var DEFAULT_FRAMEWORK_PREFIXES = {
|
|
278
278
|
next: "NEXT_PUBLIC_",
|
|
279
279
|
vite: "VITE_",
|
|
280
|
-
nuxt: "NUXT_PUBLIC_"
|
|
280
|
+
nuxt: "NUXT_PUBLIC_",
|
|
281
|
+
webpack: ""
|
|
281
282
|
};
|
|
282
283
|
var DEFAULT_NAMESPACES = {
|
|
283
284
|
value: {
|
|
@@ -2054,11 +2055,14 @@ function resolvePublicPrefix(manifest, options) {
|
|
|
2054
2055
|
if (!options.framework) {
|
|
2055
2056
|
return "";
|
|
2056
2057
|
}
|
|
2057
|
-
const
|
|
2058
|
-
|
|
2058
|
+
const hasConfiguredPrefix = Object.prototype.hasOwnProperty.call(
|
|
2059
|
+
manifest.public.frameworks,
|
|
2060
|
+
options.framework
|
|
2061
|
+
);
|
|
2062
|
+
if (!hasConfiguredPrefix) {
|
|
2059
2063
|
throw new CnosManifestError(`Unknown public framework prefix: ${options.framework}`);
|
|
2060
2064
|
}
|
|
2061
|
-
return
|
|
2065
|
+
return manifest.public.frameworks[options.framework] ?? "";
|
|
2062
2066
|
}
|
|
2063
2067
|
function toPublicEnv(graph, manifest, options = {}) {
|
|
2064
2068
|
const prefix = resolvePublicPrefix(manifest, options);
|
|
@@ -2317,7 +2321,7 @@ function envVarToLogicalKey(envVar, config = {}) {
|
|
|
2317
2321
|
// package.json
|
|
2318
2322
|
var package_default = {
|
|
2319
2323
|
name: "@kitsy/cnos",
|
|
2320
|
-
version: "1.
|
|
2324
|
+
version: "1.5.1",
|
|
2321
2325
|
description: "Batteries-included CNOS runtime package wired with the official plugins.",
|
|
2322
2326
|
type: "module",
|
|
2323
2327
|
main: "./dist/index.cjs",
|
|
@@ -3055,6 +3059,31 @@ function getRuntimeOrThrow() {
|
|
|
3055
3059
|
}
|
|
3056
3060
|
return runtime;
|
|
3057
3061
|
}
|
|
3062
|
+
function stringifyLogValue(value) {
|
|
3063
|
+
if (value === void 0) {
|
|
3064
|
+
return "";
|
|
3065
|
+
}
|
|
3066
|
+
if (value === null) {
|
|
3067
|
+
return "null";
|
|
3068
|
+
}
|
|
3069
|
+
if (typeof value === "string") {
|
|
3070
|
+
return value;
|
|
3071
|
+
}
|
|
3072
|
+
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
|
|
3073
|
+
return String(value);
|
|
3074
|
+
}
|
|
3075
|
+
return JSON.stringify(value);
|
|
3076
|
+
}
|
|
3077
|
+
function formatMessage(runtime, message) {
|
|
3078
|
+
return message.replace(/\$\{([^}]+)\}/g, (match, rawKey) => {
|
|
3079
|
+
const key = String(rawKey).trim();
|
|
3080
|
+
if (!key) {
|
|
3081
|
+
return match;
|
|
3082
|
+
}
|
|
3083
|
+
const value = runtime.read(key);
|
|
3084
|
+
return value === void 0 ? match : stringifyLogValue(value);
|
|
3085
|
+
});
|
|
3086
|
+
}
|
|
3058
3087
|
function attachBootstrappedGraph(graph) {
|
|
3059
3088
|
if (getSingletonRuntime()) {
|
|
3060
3089
|
return;
|
|
@@ -3135,12 +3164,6 @@ function attachBootstrappedGraph(graph) {
|
|
|
3135
3164
|
meta(path12) {
|
|
3136
3165
|
return readValue(graph, toLogicalKey("meta", path12));
|
|
3137
3166
|
},
|
|
3138
|
-
inspect(key) {
|
|
3139
|
-
return inspectValue(graph, key);
|
|
3140
|
-
},
|
|
3141
|
-
toObject() {
|
|
3142
|
-
return toNamespaceObject(graph);
|
|
3143
|
-
},
|
|
3144
3167
|
toNamespace(namespace) {
|
|
3145
3168
|
return toNamespaceObject(graph, namespace);
|
|
3146
3169
|
},
|
|
@@ -3149,6 +3172,12 @@ function attachBootstrappedGraph(graph) {
|
|
|
3149
3172
|
},
|
|
3150
3173
|
toPublicEnv(options) {
|
|
3151
3174
|
return toPublicEnv(graph, bootstrappedManifest, options);
|
|
3175
|
+
},
|
|
3176
|
+
inspect(key) {
|
|
3177
|
+
return inspectValue(graph, key);
|
|
3178
|
+
},
|
|
3179
|
+
toObject() {
|
|
3180
|
+
return toNamespaceObject(graph);
|
|
3152
3181
|
}
|
|
3153
3182
|
};
|
|
3154
3183
|
setSingletonRuntime(runtime);
|
|
@@ -3188,6 +3217,26 @@ var cnos = Object.assign(
|
|
|
3188
3217
|
meta(path12) {
|
|
3189
3218
|
return readValue(getRuntimeOrThrow().graph, toLogicalKey("meta", path12));
|
|
3190
3219
|
},
|
|
3220
|
+
inspect(key) {
|
|
3221
|
+
return getRuntimeOrThrow().inspect(key);
|
|
3222
|
+
},
|
|
3223
|
+
toNamespace(namespace) {
|
|
3224
|
+
return getRuntimeOrThrow().toNamespace(namespace);
|
|
3225
|
+
},
|
|
3226
|
+
toEnv(options) {
|
|
3227
|
+
return getRuntimeOrThrow().toEnv(options);
|
|
3228
|
+
},
|
|
3229
|
+
toPublicEnv(options) {
|
|
3230
|
+
return getRuntimeOrThrow().toPublicEnv(options);
|
|
3231
|
+
},
|
|
3232
|
+
format(message) {
|
|
3233
|
+
return formatMessage(getRuntimeOrThrow(), message);
|
|
3234
|
+
},
|
|
3235
|
+
log(message) {
|
|
3236
|
+
const formatted = formatMessage(getRuntimeOrThrow(), message);
|
|
3237
|
+
console.log(formatted);
|
|
3238
|
+
return formatted;
|
|
3239
|
+
},
|
|
3191
3240
|
async ready() {
|
|
3192
3241
|
if (getSingletonRuntime() && !getBootstrappedSecretHydrationRequired()) {
|
|
3193
3242
|
return;
|
package/dist/runtime/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as LogicalKey } from '../plugin-B4xwySxw.cjs';
|
|
1
|
+
import { b as LogicalKey, g as CnosRuntime, I as InspectResult } from '../plugin-B4xwySxw.cjs';
|
|
2
2
|
|
|
3
3
|
interface CnosSingleton {
|
|
4
4
|
<T = unknown>(key: LogicalKey): T | undefined;
|
|
@@ -8,6 +8,12 @@ interface CnosSingleton {
|
|
|
8
8
|
value<T = unknown>(path: string): T | undefined;
|
|
9
9
|
secret<T = unknown>(path: string): T | undefined;
|
|
10
10
|
meta<T = unknown>(path: string): T | undefined;
|
|
11
|
+
inspect(key: LogicalKey): ReturnType<CnosRuntime['inspect']>;
|
|
12
|
+
toNamespace(namespace: string): ReturnType<CnosRuntime['toNamespace']>;
|
|
13
|
+
toEnv(options?: Parameters<CnosRuntime['toEnv']>[0]): ReturnType<CnosRuntime['toEnv']>;
|
|
14
|
+
toPublicEnv(options?: Parameters<CnosRuntime['toPublicEnv']>[0]): ReturnType<CnosRuntime['toPublicEnv']>;
|
|
15
|
+
format(message: string): string;
|
|
16
|
+
log(message: string): string;
|
|
11
17
|
ready(): Promise<void>;
|
|
12
18
|
}
|
|
13
19
|
declare const cnos: CnosSingleton & {
|
|
@@ -17,6 +23,12 @@ declare const cnos: CnosSingleton & {
|
|
|
17
23
|
value<T = unknown>(path: string): T | undefined;
|
|
18
24
|
secret<T = unknown>(path: string): T | undefined;
|
|
19
25
|
meta<T = unknown>(path: string): T | undefined;
|
|
26
|
+
inspect(key: LogicalKey): InspectResult;
|
|
27
|
+
toNamespace(namespace: string): Record<string, unknown>;
|
|
28
|
+
toEnv(options: Parameters<CnosRuntime["toEnv"]>[0]): Record<string, string>;
|
|
29
|
+
toPublicEnv(options: Parameters<CnosRuntime["toPublicEnv"]>[0]): Record<string, string>;
|
|
30
|
+
format(message: string): string;
|
|
31
|
+
log(message: string): string;
|
|
20
32
|
ready(): Promise<void>;
|
|
21
33
|
};
|
|
22
34
|
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as LogicalKey } from '../plugin-B4xwySxw.js';
|
|
1
|
+
import { b as LogicalKey, g as CnosRuntime, I as InspectResult } from '../plugin-B4xwySxw.js';
|
|
2
2
|
|
|
3
3
|
interface CnosSingleton {
|
|
4
4
|
<T = unknown>(key: LogicalKey): T | undefined;
|
|
@@ -8,6 +8,12 @@ interface CnosSingleton {
|
|
|
8
8
|
value<T = unknown>(path: string): T | undefined;
|
|
9
9
|
secret<T = unknown>(path: string): T | undefined;
|
|
10
10
|
meta<T = unknown>(path: string): T | undefined;
|
|
11
|
+
inspect(key: LogicalKey): ReturnType<CnosRuntime['inspect']>;
|
|
12
|
+
toNamespace(namespace: string): ReturnType<CnosRuntime['toNamespace']>;
|
|
13
|
+
toEnv(options?: Parameters<CnosRuntime['toEnv']>[0]): ReturnType<CnosRuntime['toEnv']>;
|
|
14
|
+
toPublicEnv(options?: Parameters<CnosRuntime['toPublicEnv']>[0]): ReturnType<CnosRuntime['toPublicEnv']>;
|
|
15
|
+
format(message: string): string;
|
|
16
|
+
log(message: string): string;
|
|
11
17
|
ready(): Promise<void>;
|
|
12
18
|
}
|
|
13
19
|
declare const cnos: CnosSingleton & {
|
|
@@ -17,6 +23,12 @@ declare const cnos: CnosSingleton & {
|
|
|
17
23
|
value<T = unknown>(path: string): T | undefined;
|
|
18
24
|
secret<T = unknown>(path: string): T | undefined;
|
|
19
25
|
meta<T = unknown>(path: string): T | undefined;
|
|
26
|
+
inspect(key: LogicalKey): InspectResult;
|
|
27
|
+
toNamespace(namespace: string): Record<string, unknown>;
|
|
28
|
+
toEnv(options: Parameters<CnosRuntime["toEnv"]>[0]): Record<string, string>;
|
|
29
|
+
toPublicEnv(options: Parameters<CnosRuntime["toPublicEnv"]>[0]): Record<string, string>;
|
|
30
|
+
format(message: string): string;
|
|
31
|
+
log(message: string): string;
|
|
20
32
|
ready(): Promise<void>;
|
|
21
33
|
};
|
|
22
34
|
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runtime_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-TUMR7JA3.js";
|
|
4
|
+
import "../chunk-5F2OFKND.js";
|
|
5
|
+
import "../chunk-CMQK2AEF.js";
|
|
6
|
+
import "../chunk-SZKQVA2M.js";
|
|
7
|
+
import "../chunk-EJAXWFNT.js";
|
|
8
|
+
import "../chunk-H53ZRQLX.js";
|
|
9
|
+
import "../chunk-F2ZAIZNH.js";
|
|
10
|
+
import "../chunk-7EI3RFUE.js";
|
|
11
|
+
import "../chunk-UWFE4JE2.js";
|
|
12
|
+
import "../chunk-BS33AW4Y.js";
|
|
13
13
|
export {
|
|
14
14
|
runtime_default as default
|
|
15
15
|
};
|