@kitsy/cnos 1.8.4 → 1.9.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/dist/build/index.cjs +16 -8
- package/dist/build/index.js +8 -8
- package/dist/{chunk-EJT2VJTM.js → chunk-2JBA2LXU.js} +1 -1
- package/dist/{chunk-N5DX5QEB.js → chunk-6QQPHDUI.js} +1 -1
- package/dist/{chunk-36AR262B.js → chunk-7JZO6XN3.js} +1 -1
- package/dist/{chunk-ZH5QZQ7C.js → chunk-7KVM5PUW.js} +15 -7
- package/dist/{chunk-4AAA2RHV.js → chunk-A2WG3ZKW.js} +1 -1
- package/dist/{chunk-LDFKY65G.js → chunk-L6ZMJPA6.js} +3 -3
- package/dist/{chunk-UMVFSHP2.js → chunk-L7JVECPE.js} +1 -1
- package/dist/{chunk-JQLV4OQU.js → chunk-LURQ4LAK.js} +1 -1
- package/dist/{chunk-O2KTQ6PB.js → chunk-MYG6EPUX.js} +8 -8
- package/dist/{chunk-DL5G3QSZ.js → chunk-NVFACB64.js} +1 -1
- package/dist/configure/index.cjs +16 -8
- package/dist/configure/index.js +8 -8
- package/dist/index.cjs +16 -8
- package/dist/index.js +10 -10
- package/dist/internal.cjs +4 -1
- package/dist/internal.d.cts +4 -1
- package/dist/internal.d.ts +4 -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 +11 -6
- 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 +16 -8
- package/dist/runtime/index.js +10 -10
- package/package.json +1 -1
package/dist/build/index.cjs
CHANGED
|
@@ -1857,7 +1857,7 @@ function getNamespaceDefinition(manifest, namespaceOrKey) {
|
|
|
1857
1857
|
const namespace = namespaceOrKey.includes(".") ? getNamespaceNameForKey(namespaceOrKey) : namespaceOrKey;
|
|
1858
1858
|
return manifest.namespaces[namespace] ?? DEFAULT_DATA_NAMESPACE;
|
|
1859
1859
|
}
|
|
1860
|
-
function ensureProjectionAllowed(manifest, key, target) {
|
|
1860
|
+
function ensureProjectionAllowed(manifest, key, target, options = {}) {
|
|
1861
1861
|
const namespace = getNamespaceNameForKey(key);
|
|
1862
1862
|
const definition = getNamespaceDefinition(manifest, namespace);
|
|
1863
1863
|
if (definition.kind !== "data") {
|
|
@@ -1866,6 +1866,9 @@ function ensureProjectionAllowed(manifest, key, target) {
|
|
|
1866
1866
|
);
|
|
1867
1867
|
}
|
|
1868
1868
|
if (definition.sensitive) {
|
|
1869
|
+
if (target === "env" && namespace === "secret" && options.allowSecretForEnv) {
|
|
1870
|
+
return;
|
|
1871
|
+
}
|
|
1869
1872
|
throw new CnosSecurityError(
|
|
1870
1873
|
`Cannot promote ${key} to ${target} because namespace "${namespace}" is sensitive.`
|
|
1871
1874
|
);
|
|
@@ -3279,7 +3282,7 @@ function normalizeEnvValue(value) {
|
|
|
3279
3282
|
return JSON.stringify(value);
|
|
3280
3283
|
}
|
|
3281
3284
|
function toEnv(graph, manifest, options = {}, helpers = {}) {
|
|
3282
|
-
const includeSecrets = options.includeSecrets ??
|
|
3285
|
+
const includeSecrets = options.includeSecrets ?? false;
|
|
3283
3286
|
const output = {};
|
|
3284
3287
|
const mappedEntries = Object.entries(manifest.envMapping.explicit).sort(
|
|
3285
3288
|
([left], [right]) => left.localeCompare(right)
|
|
@@ -3290,19 +3293,24 @@ function toEnv(graph, manifest, options = {}, helpers = {}) {
|
|
|
3290
3293
|
continue;
|
|
3291
3294
|
}
|
|
3292
3295
|
const namespaceDefinition = getNamespaceDefinition(manifest, entry.namespace);
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
}
|
|
3296
|
-
if (entry.namespace === "secret" && !includeSecrets) {
|
|
3296
|
+
const isSecretNamespace = entry.namespace === "secret";
|
|
3297
|
+
if (namespaceDefinition.kind !== "data") {
|
|
3297
3298
|
continue;
|
|
3298
3299
|
}
|
|
3299
|
-
if (
|
|
3300
|
+
if (isSecretNamespace) {
|
|
3301
|
+
if (!includeSecrets) {
|
|
3302
|
+
continue;
|
|
3303
|
+
}
|
|
3304
|
+
} else if (!namespaceDefinition.shareable || namespaceDefinition.sensitive) {
|
|
3300
3305
|
continue;
|
|
3301
3306
|
}
|
|
3302
3307
|
const value = helpers.read ? helpers.read(logicalKey) : entry.value;
|
|
3303
3308
|
if (value === void 0) {
|
|
3304
3309
|
continue;
|
|
3305
3310
|
}
|
|
3311
|
+
if (isSecretReference(value) || !isSecretNamespace && isSecretReference(entry.value)) {
|
|
3312
|
+
continue;
|
|
3313
|
+
}
|
|
3306
3314
|
output[envVar] = normalizeEnvValue(value);
|
|
3307
3315
|
}
|
|
3308
3316
|
return output;
|
|
@@ -3712,7 +3720,7 @@ function envVarToLogicalKey(envVar, config = {}) {
|
|
|
3712
3720
|
// package.json
|
|
3713
3721
|
var package_default = {
|
|
3714
3722
|
name: "@kitsy/cnos",
|
|
3715
|
-
version: "1.
|
|
3723
|
+
version: "1.9.1",
|
|
3716
3724
|
description: "Batteries-included CNOS runtime package wired with the official plugins.",
|
|
3717
3725
|
type: "module",
|
|
3718
3726
|
main: "./dist/index.cjs",
|
package/dist/build/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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-
|
|
3
|
+
} from "../chunk-MYG6EPUX.js";
|
|
4
|
+
import "../chunk-LURQ4LAK.js";
|
|
5
|
+
import "../chunk-A2WG3ZKW.js";
|
|
6
|
+
import "../chunk-L7JVECPE.js";
|
|
7
|
+
import "../chunk-6QQPHDUI.js";
|
|
8
|
+
import "../chunk-7JZO6XN3.js";
|
|
9
|
+
import "../chunk-2JBA2LXU.js";
|
|
10
10
|
import {
|
|
11
11
|
CnosManifestError,
|
|
12
12
|
createSecretVaultProvider,
|
|
13
13
|
isSecretReference
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-7KVM5PUW.js";
|
|
15
15
|
|
|
16
16
|
// src/build/index.ts
|
|
17
17
|
async function resolveBrowserData(options = {}) {
|
|
@@ -1705,7 +1705,7 @@ function getNamespaceDefinition(manifest, namespaceOrKey) {
|
|
|
1705
1705
|
const namespace = namespaceOrKey.includes(".") ? getNamespaceNameForKey(namespaceOrKey) : namespaceOrKey;
|
|
1706
1706
|
return manifest.namespaces[namespace] ?? DEFAULT_DATA_NAMESPACE;
|
|
1707
1707
|
}
|
|
1708
|
-
function ensureProjectionAllowed(manifest, key, target) {
|
|
1708
|
+
function ensureProjectionAllowed(manifest, key, target, options = {}) {
|
|
1709
1709
|
const namespace = getNamespaceNameForKey(key);
|
|
1710
1710
|
const definition = getNamespaceDefinition(manifest, namespace);
|
|
1711
1711
|
if (definition.kind !== "data") {
|
|
@@ -1714,6 +1714,9 @@ function ensureProjectionAllowed(manifest, key, target) {
|
|
|
1714
1714
|
);
|
|
1715
1715
|
}
|
|
1716
1716
|
if (definition.sensitive) {
|
|
1717
|
+
if (target === "env" && namespace === "secret" && options.allowSecretForEnv) {
|
|
1718
|
+
return;
|
|
1719
|
+
}
|
|
1717
1720
|
throw new CnosSecurityError(
|
|
1718
1721
|
`Cannot promote ${key} to ${target} because namespace "${namespace}" is sensitive.`
|
|
1719
1722
|
);
|
|
@@ -2505,7 +2508,7 @@ function normalizeEnvValue(value) {
|
|
|
2505
2508
|
return JSON.stringify(value);
|
|
2506
2509
|
}
|
|
2507
2510
|
function toEnv(graph, manifest, options = {}, helpers = {}) {
|
|
2508
|
-
const includeSecrets = options.includeSecrets ??
|
|
2511
|
+
const includeSecrets = options.includeSecrets ?? false;
|
|
2509
2512
|
const output = {};
|
|
2510
2513
|
const mappedEntries = Object.entries(manifest.envMapping.explicit).sort(
|
|
2511
2514
|
([left], [right]) => left.localeCompare(right)
|
|
@@ -2516,19 +2519,24 @@ function toEnv(graph, manifest, options = {}, helpers = {}) {
|
|
|
2516
2519
|
continue;
|
|
2517
2520
|
}
|
|
2518
2521
|
const namespaceDefinition = getNamespaceDefinition(manifest, entry.namespace);
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
}
|
|
2522
|
-
if (entry.namespace === "secret" && !includeSecrets) {
|
|
2522
|
+
const isSecretNamespace = entry.namespace === "secret";
|
|
2523
|
+
if (namespaceDefinition.kind !== "data") {
|
|
2523
2524
|
continue;
|
|
2524
2525
|
}
|
|
2525
|
-
if (
|
|
2526
|
+
if (isSecretNamespace) {
|
|
2527
|
+
if (!includeSecrets) {
|
|
2528
|
+
continue;
|
|
2529
|
+
}
|
|
2530
|
+
} else if (!namespaceDefinition.shareable || namespaceDefinition.sensitive) {
|
|
2526
2531
|
continue;
|
|
2527
2532
|
}
|
|
2528
2533
|
const value = helpers.read ? helpers.read(logicalKey) : entry.value;
|
|
2529
2534
|
if (value === void 0) {
|
|
2530
2535
|
continue;
|
|
2531
2536
|
}
|
|
2537
|
+
if (isSecretReference(value) || !isSecretNamespace && isSecretReference(entry.value)) {
|
|
2538
|
+
continue;
|
|
2539
|
+
}
|
|
2532
2540
|
output[envVar] = normalizeEnvValue(value);
|
|
2533
2541
|
}
|
|
2534
2542
|
return output;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
graphRequiresSecretHydration,
|
|
4
4
|
readRuntimeGraphFromEnv,
|
|
5
5
|
readServerProjectionFromEnv
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NVFACB64.js";
|
|
7
7
|
import {
|
|
8
8
|
createCnos,
|
|
9
9
|
getBootstrappedSecretHydrationRequired,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
setBootstrappedSecretHydrationRequired,
|
|
13
13
|
setSingletonReady,
|
|
14
14
|
setSingletonRuntime
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MYG6EPUX.js";
|
|
16
16
|
import {
|
|
17
17
|
createDefaultRuntimeProviders,
|
|
18
18
|
createDerivedRuntimeSupport,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
toLogicalKey,
|
|
29
29
|
toNamespaceObject,
|
|
30
30
|
toPublicEnv
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-7KVM5PUW.js";
|
|
32
32
|
|
|
33
33
|
// src/runtime/index.ts
|
|
34
34
|
import { existsSync, readFileSync } from "fs";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createEnvExportPlugin,
|
|
3
3
|
createPublicEnvExportPlugin
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LURQ4LAK.js";
|
|
5
5
|
import {
|
|
6
6
|
createFilesystemSecretsPlugin,
|
|
7
7
|
createFilesystemValuesPlugin
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-A2WG3ZKW.js";
|
|
9
9
|
import {
|
|
10
10
|
createProcessEnvPlugin
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-L7JVECPE.js";
|
|
12
12
|
import {
|
|
13
13
|
createBasicSchemaPlugin
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6QQPHDUI.js";
|
|
15
15
|
import {
|
|
16
16
|
createCliArgsPlugin
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7JZO6XN3.js";
|
|
18
18
|
import {
|
|
19
19
|
createDotenvPlugin
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2JBA2LXU.js";
|
|
21
21
|
import {
|
|
22
22
|
createCnos,
|
|
23
23
|
createProvenanceInspector
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-7KVM5PUW.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.9.1",
|
|
72
72
|
description: "Batteries-included CNOS runtime package wired with the official plugins.",
|
|
73
73
|
type: "module",
|
|
74
74
|
main: "./dist/index.cjs",
|
package/dist/configure/index.cjs
CHANGED
|
@@ -1859,7 +1859,7 @@ function getNamespaceDefinition(manifest, namespaceOrKey) {
|
|
|
1859
1859
|
const namespace = namespaceOrKey.includes(".") ? getNamespaceNameForKey(namespaceOrKey) : namespaceOrKey;
|
|
1860
1860
|
return manifest.namespaces[namespace] ?? DEFAULT_DATA_NAMESPACE;
|
|
1861
1861
|
}
|
|
1862
|
-
function ensureProjectionAllowed(manifest, key, target) {
|
|
1862
|
+
function ensureProjectionAllowed(manifest, key, target, options = {}) {
|
|
1863
1863
|
const namespace = getNamespaceNameForKey(key);
|
|
1864
1864
|
const definition = getNamespaceDefinition(manifest, namespace);
|
|
1865
1865
|
if (definition.kind !== "data") {
|
|
@@ -1868,6 +1868,9 @@ function ensureProjectionAllowed(manifest, key, target) {
|
|
|
1868
1868
|
);
|
|
1869
1869
|
}
|
|
1870
1870
|
if (definition.sensitive) {
|
|
1871
|
+
if (target === "env" && namespace === "secret" && options.allowSecretForEnv) {
|
|
1872
|
+
return;
|
|
1873
|
+
}
|
|
1871
1874
|
throw new CnosSecurityError(
|
|
1872
1875
|
`Cannot promote ${key} to ${target} because namespace "${namespace}" is sensitive.`
|
|
1873
1876
|
);
|
|
@@ -3281,7 +3284,7 @@ function normalizeEnvValue(value) {
|
|
|
3281
3284
|
return JSON.stringify(value);
|
|
3282
3285
|
}
|
|
3283
3286
|
function toEnv(graph, manifest, options = {}, helpers = {}) {
|
|
3284
|
-
const includeSecrets = options.includeSecrets ??
|
|
3287
|
+
const includeSecrets = options.includeSecrets ?? false;
|
|
3285
3288
|
const output = {};
|
|
3286
3289
|
const mappedEntries = Object.entries(manifest.envMapping.explicit).sort(
|
|
3287
3290
|
([left], [right]) => left.localeCompare(right)
|
|
@@ -3292,19 +3295,24 @@ function toEnv(graph, manifest, options = {}, helpers = {}) {
|
|
|
3292
3295
|
continue;
|
|
3293
3296
|
}
|
|
3294
3297
|
const namespaceDefinition = getNamespaceDefinition(manifest, entry.namespace);
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
}
|
|
3298
|
-
if (entry.namespace === "secret" && !includeSecrets) {
|
|
3298
|
+
const isSecretNamespace = entry.namespace === "secret";
|
|
3299
|
+
if (namespaceDefinition.kind !== "data") {
|
|
3299
3300
|
continue;
|
|
3300
3301
|
}
|
|
3301
|
-
if (
|
|
3302
|
+
if (isSecretNamespace) {
|
|
3303
|
+
if (!includeSecrets) {
|
|
3304
|
+
continue;
|
|
3305
|
+
}
|
|
3306
|
+
} else if (!namespaceDefinition.shareable || namespaceDefinition.sensitive) {
|
|
3302
3307
|
continue;
|
|
3303
3308
|
}
|
|
3304
3309
|
const value = helpers.read ? helpers.read(logicalKey) : entry.value;
|
|
3305
3310
|
if (value === void 0) {
|
|
3306
3311
|
continue;
|
|
3307
3312
|
}
|
|
3313
|
+
if (isSecretReference(value) || !isSecretNamespace && isSecretReference(entry.value)) {
|
|
3314
|
+
continue;
|
|
3315
|
+
}
|
|
3308
3316
|
output[envVar] = normalizeEnvValue(value);
|
|
3309
3317
|
}
|
|
3310
3318
|
return output;
|
|
@@ -3756,7 +3764,7 @@ function envVarToLogicalKey(envVar, config = {}) {
|
|
|
3756
3764
|
// package.json
|
|
3757
3765
|
var package_default = {
|
|
3758
3766
|
name: "@kitsy/cnos",
|
|
3759
|
-
version: "1.
|
|
3767
|
+
version: "1.9.1",
|
|
3760
3768
|
description: "Batteries-included CNOS runtime package wired with the official plugins.",
|
|
3761
3769
|
type: "module",
|
|
3762
3770
|
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-MYG6EPUX.js";
|
|
5
|
+
import "../chunk-LURQ4LAK.js";
|
|
6
|
+
import "../chunk-A2WG3ZKW.js";
|
|
7
|
+
import "../chunk-L7JVECPE.js";
|
|
8
|
+
import "../chunk-6QQPHDUI.js";
|
|
9
|
+
import "../chunk-7JZO6XN3.js";
|
|
10
|
+
import "../chunk-2JBA2LXU.js";
|
|
11
11
|
import {
|
|
12
12
|
planDump,
|
|
13
13
|
toEnv,
|
|
14
14
|
toPublicEnv,
|
|
15
15
|
writeDump
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-7KVM5PUW.js";
|
|
17
17
|
export {
|
|
18
18
|
createCnos,
|
|
19
19
|
defaultPlugins,
|
package/dist/index.cjs
CHANGED
|
@@ -1859,7 +1859,7 @@ function getNamespaceDefinition(manifest, namespaceOrKey) {
|
|
|
1859
1859
|
const namespace = namespaceOrKey.includes(".") ? getNamespaceNameForKey(namespaceOrKey) : namespaceOrKey;
|
|
1860
1860
|
return manifest.namespaces[namespace] ?? DEFAULT_DATA_NAMESPACE;
|
|
1861
1861
|
}
|
|
1862
|
-
function ensureProjectionAllowed(manifest, key, target) {
|
|
1862
|
+
function ensureProjectionAllowed(manifest, key, target, options = {}) {
|
|
1863
1863
|
const namespace = getNamespaceNameForKey(key);
|
|
1864
1864
|
const definition = getNamespaceDefinition(manifest, namespace);
|
|
1865
1865
|
if (definition.kind !== "data") {
|
|
@@ -1868,6 +1868,9 @@ function ensureProjectionAllowed(manifest, key, target) {
|
|
|
1868
1868
|
);
|
|
1869
1869
|
}
|
|
1870
1870
|
if (definition.sensitive) {
|
|
1871
|
+
if (target === "env" && namespace === "secret" && options.allowSecretForEnv) {
|
|
1872
|
+
return;
|
|
1873
|
+
}
|
|
1871
1874
|
throw new CnosSecurityError(
|
|
1872
1875
|
`Cannot promote ${key} to ${target} because namespace "${namespace}" is sensitive.`
|
|
1873
1876
|
);
|
|
@@ -3281,7 +3284,7 @@ function normalizeEnvValue(value) {
|
|
|
3281
3284
|
return JSON.stringify(value);
|
|
3282
3285
|
}
|
|
3283
3286
|
function toEnv(graph, manifest, options = {}, helpers = {}) {
|
|
3284
|
-
const includeSecrets = options.includeSecrets ??
|
|
3287
|
+
const includeSecrets = options.includeSecrets ?? false;
|
|
3285
3288
|
const output = {};
|
|
3286
3289
|
const mappedEntries = Object.entries(manifest.envMapping.explicit).sort(
|
|
3287
3290
|
([left], [right]) => left.localeCompare(right)
|
|
@@ -3292,19 +3295,24 @@ function toEnv(graph, manifest, options = {}, helpers = {}) {
|
|
|
3292
3295
|
continue;
|
|
3293
3296
|
}
|
|
3294
3297
|
const namespaceDefinition = getNamespaceDefinition(manifest, entry.namespace);
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
}
|
|
3298
|
-
if (entry.namespace === "secret" && !includeSecrets) {
|
|
3298
|
+
const isSecretNamespace = entry.namespace === "secret";
|
|
3299
|
+
if (namespaceDefinition.kind !== "data") {
|
|
3299
3300
|
continue;
|
|
3300
3301
|
}
|
|
3301
|
-
if (
|
|
3302
|
+
if (isSecretNamespace) {
|
|
3303
|
+
if (!includeSecrets) {
|
|
3304
|
+
continue;
|
|
3305
|
+
}
|
|
3306
|
+
} else if (!namespaceDefinition.shareable || namespaceDefinition.sensitive) {
|
|
3302
3307
|
continue;
|
|
3303
3308
|
}
|
|
3304
3309
|
const value = helpers.read ? helpers.read(logicalKey) : entry.value;
|
|
3305
3310
|
if (value === void 0) {
|
|
3306
3311
|
continue;
|
|
3307
3312
|
}
|
|
3313
|
+
if (isSecretReference(value) || !isSecretNamespace && isSecretReference(entry.value)) {
|
|
3314
|
+
continue;
|
|
3315
|
+
}
|
|
3308
3316
|
output[envVar] = normalizeEnvValue(value);
|
|
3309
3317
|
}
|
|
3310
3318
|
return output;
|
|
@@ -3714,7 +3722,7 @@ function envVarToLogicalKey(envVar, config = {}) {
|
|
|
3714
3722
|
// package.json
|
|
3715
3723
|
var package_default = {
|
|
3716
3724
|
name: "@kitsy/cnos",
|
|
3717
|
-
version: "1.
|
|
3725
|
+
version: "1.9.1",
|
|
3718
3726
|
description: "Batteries-included CNOS runtime package wired with the official plugins.",
|
|
3719
3727
|
type: "module",
|
|
3720
3728
|
main: "./dist/index.cjs",
|
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-L6ZMJPA6.js";
|
|
4
|
+
import "./chunk-NVFACB64.js";
|
|
5
|
+
import "./chunk-MYG6EPUX.js";
|
|
6
|
+
import "./chunk-LURQ4LAK.js";
|
|
7
|
+
import "./chunk-A2WG3ZKW.js";
|
|
8
|
+
import "./chunk-L7JVECPE.js";
|
|
9
|
+
import "./chunk-6QQPHDUI.js";
|
|
10
|
+
import "./chunk-7JZO6XN3.js";
|
|
11
|
+
import "./chunk-2JBA2LXU.js";
|
|
12
|
+
import "./chunk-7KVM5PUW.js";
|
|
13
13
|
export {
|
|
14
14
|
runtime_default as cnos,
|
|
15
15
|
runtime_default as default
|
package/dist/internal.cjs
CHANGED
|
@@ -1391,7 +1391,7 @@ function getNamespaceDefinition(manifest, namespaceOrKey) {
|
|
|
1391
1391
|
const namespace = namespaceOrKey.includes(".") ? getNamespaceNameForKey(namespaceOrKey) : namespaceOrKey;
|
|
1392
1392
|
return manifest.namespaces[namespace] ?? DEFAULT_DATA_NAMESPACE;
|
|
1393
1393
|
}
|
|
1394
|
-
function ensureProjectionAllowed(manifest, key, target) {
|
|
1394
|
+
function ensureProjectionAllowed(manifest, key, target, options = {}) {
|
|
1395
1395
|
const namespace = getNamespaceNameForKey(key);
|
|
1396
1396
|
const definition = getNamespaceDefinition(manifest, namespace);
|
|
1397
1397
|
if (definition.kind !== "data") {
|
|
@@ -1400,6 +1400,9 @@ function ensureProjectionAllowed(manifest, key, target) {
|
|
|
1400
1400
|
);
|
|
1401
1401
|
}
|
|
1402
1402
|
if (definition.sensitive) {
|
|
1403
|
+
if (target === "env" && namespace === "secret" && options.allowSecretForEnv) {
|
|
1404
|
+
return;
|
|
1405
|
+
}
|
|
1403
1406
|
throw new CnosSecurityError(
|
|
1404
1407
|
`Cannot promote ${key} to ${target} because namespace "${namespace}" is sensitive.`
|
|
1405
1408
|
);
|
package/dist/internal.d.cts
CHANGED
|
@@ -24,8 +24,11 @@ declare function writeKeychain(entry: string, value: string): Promise<void>;
|
|
|
24
24
|
declare function loadManifest(options?: LoadManifestOptions): Promise<LoadedManifest>;
|
|
25
25
|
|
|
26
26
|
type ProjectionTarget = 'public' | 'env';
|
|
27
|
+
interface ProjectionPolicyOptions {
|
|
28
|
+
allowSecretForEnv?: boolean;
|
|
29
|
+
}
|
|
27
30
|
declare function getNamespaceDefinition(manifest: NormalizedManifest, namespaceOrKey: string): NamespaceDefinition;
|
|
28
|
-
declare function ensureProjectionAllowed(manifest: NormalizedManifest, key: LogicalKey, target: ProjectionTarget): void;
|
|
31
|
+
declare function ensureProjectionAllowed(manifest: NormalizedManifest, key: LogicalKey, target: ProjectionTarget, options?: ProjectionPolicyOptions): void;
|
|
29
32
|
|
|
30
33
|
declare function resolveVaultAuth(vaultId: string, definition: VaultDefinition, processEnv?: Record<string, string | undefined>): Promise<VaultAuthConfig>;
|
|
31
34
|
|
package/dist/internal.d.ts
CHANGED
|
@@ -24,8 +24,11 @@ declare function writeKeychain(entry: string, value: string): Promise<void>;
|
|
|
24
24
|
declare function loadManifest(options?: LoadManifestOptions): Promise<LoadedManifest>;
|
|
25
25
|
|
|
26
26
|
type ProjectionTarget = 'public' | 'env';
|
|
27
|
+
interface ProjectionPolicyOptions {
|
|
28
|
+
allowSecretForEnv?: boolean;
|
|
29
|
+
}
|
|
27
30
|
declare function getNamespaceDefinition(manifest: NormalizedManifest, namespaceOrKey: string): NamespaceDefinition;
|
|
28
|
-
declare function ensureProjectionAllowed(manifest: NormalizedManifest, key: LogicalKey, target: ProjectionTarget): void;
|
|
31
|
+
declare function ensureProjectionAllowed(manifest: NormalizedManifest, key: LogicalKey, target: ProjectionTarget, options?: ProjectionPolicyOptions): void;
|
|
29
32
|
|
|
30
33
|
declare function resolveVaultAuth(vaultId: string, definition: VaultDefinition, processEnv?: Record<string, string | undefined>): Promise<VaultAuthConfig>;
|
|
31
34
|
|
package/dist/internal.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
serializeRuntimeGraph,
|
|
12
12
|
serializeSecretPayload,
|
|
13
13
|
serializeServerProjection
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NVFACB64.js";
|
|
15
15
|
import {
|
|
16
16
|
CnosAuthenticationError,
|
|
17
17
|
CnosSecurityError,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
writeLocalSecret,
|
|
65
65
|
writeRemoteRootCacheMetadata,
|
|
66
66
|
writeVaultSessionKey
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-7KVM5PUW.js";
|
|
68
68
|
|
|
69
69
|
// src/codegen/generateTypes.ts
|
|
70
70
|
function toPascalCase(value) {
|
package/dist/plugin/cli-args.js
CHANGED
package/dist/plugin/dotenv.js
CHANGED
|
@@ -174,7 +174,7 @@ function normalizeEnvValue(value) {
|
|
|
174
174
|
return JSON.stringify(value);
|
|
175
175
|
}
|
|
176
176
|
function toEnv(graph, manifest, options = {}, helpers = {}) {
|
|
177
|
-
const includeSecrets = options.includeSecrets ??
|
|
177
|
+
const includeSecrets = options.includeSecrets ?? false;
|
|
178
178
|
const output = {};
|
|
179
179
|
const mappedEntries = Object.entries(manifest.envMapping.explicit).sort(
|
|
180
180
|
([left], [right]) => left.localeCompare(right)
|
|
@@ -185,19 +185,24 @@ function toEnv(graph, manifest, options = {}, helpers = {}) {
|
|
|
185
185
|
continue;
|
|
186
186
|
}
|
|
187
187
|
const namespaceDefinition = getNamespaceDefinition(manifest, entry.namespace);
|
|
188
|
-
|
|
188
|
+
const isSecretNamespace = entry.namespace === "secret";
|
|
189
|
+
if (namespaceDefinition.kind !== "data") {
|
|
189
190
|
continue;
|
|
190
191
|
}
|
|
191
|
-
if (
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
192
|
+
if (isSecretNamespace) {
|
|
193
|
+
if (!includeSecrets) {
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
} else if (!namespaceDefinition.shareable || namespaceDefinition.sensitive) {
|
|
195
197
|
continue;
|
|
196
198
|
}
|
|
197
199
|
const value = helpers.read ? helpers.read(logicalKey) : entry.value;
|
|
198
200
|
if (value === void 0) {
|
|
199
201
|
continue;
|
|
200
202
|
}
|
|
203
|
+
if (isSecretReference(value) || !isSecretNamespace && isSecretReference(entry.value)) {
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
201
206
|
output[envVar] = normalizeEnvValue(value);
|
|
202
207
|
}
|
|
203
208
|
return output;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createEnvExportPlugin,
|
|
3
3
|
createPublicEnvExportPlugin
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-LURQ4LAK.js";
|
|
5
5
|
import {
|
|
6
6
|
toEnv,
|
|
7
7
|
toPublicEnv
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-7KVM5PUW.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-A2WG3ZKW.js";
|
|
9
|
+
import "../chunk-7KVM5PUW.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-L7JVECPE.js";
|
|
6
|
+
import "../chunk-7KVM5PUW.js";
|
|
7
7
|
export {
|
|
8
8
|
createProcessEnvPlugin,
|
|
9
9
|
processEnvEntriesFromObject,
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -1856,7 +1856,7 @@ function getNamespaceDefinition(manifest, namespaceOrKey) {
|
|
|
1856
1856
|
const namespace = namespaceOrKey.includes(".") ? getNamespaceNameForKey(namespaceOrKey) : namespaceOrKey;
|
|
1857
1857
|
return manifest.namespaces[namespace] ?? DEFAULT_DATA_NAMESPACE;
|
|
1858
1858
|
}
|
|
1859
|
-
function ensureProjectionAllowed(manifest, key, target) {
|
|
1859
|
+
function ensureProjectionAllowed(manifest, key, target, options = {}) {
|
|
1860
1860
|
const namespace = getNamespaceNameForKey(key);
|
|
1861
1861
|
const definition = getNamespaceDefinition(manifest, namespace);
|
|
1862
1862
|
if (definition.kind !== "data") {
|
|
@@ -1865,6 +1865,9 @@ function ensureProjectionAllowed(manifest, key, target) {
|
|
|
1865
1865
|
);
|
|
1866
1866
|
}
|
|
1867
1867
|
if (definition.sensitive) {
|
|
1868
|
+
if (target === "env" && namespace === "secret" && options.allowSecretForEnv) {
|
|
1869
|
+
return;
|
|
1870
|
+
}
|
|
1868
1871
|
throw new CnosSecurityError(
|
|
1869
1872
|
`Cannot promote ${key} to ${target} because namespace "${namespace}" is sensitive.`
|
|
1870
1873
|
);
|
|
@@ -3278,7 +3281,7 @@ function normalizeEnvValue(value) {
|
|
|
3278
3281
|
return JSON.stringify(value);
|
|
3279
3282
|
}
|
|
3280
3283
|
function toEnv(graph, manifest, options = {}, helpers = {}) {
|
|
3281
|
-
const includeSecrets = options.includeSecrets ??
|
|
3284
|
+
const includeSecrets = options.includeSecrets ?? false;
|
|
3282
3285
|
const output = {};
|
|
3283
3286
|
const mappedEntries = Object.entries(manifest.envMapping.explicit).sort(
|
|
3284
3287
|
([left], [right]) => left.localeCompare(right)
|
|
@@ -3289,19 +3292,24 @@ function toEnv(graph, manifest, options = {}, helpers = {}) {
|
|
|
3289
3292
|
continue;
|
|
3290
3293
|
}
|
|
3291
3294
|
const namespaceDefinition = getNamespaceDefinition(manifest, entry.namespace);
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
}
|
|
3295
|
-
if (entry.namespace === "secret" && !includeSecrets) {
|
|
3295
|
+
const isSecretNamespace = entry.namespace === "secret";
|
|
3296
|
+
if (namespaceDefinition.kind !== "data") {
|
|
3296
3297
|
continue;
|
|
3297
3298
|
}
|
|
3298
|
-
if (
|
|
3299
|
+
if (isSecretNamespace) {
|
|
3300
|
+
if (!includeSecrets) {
|
|
3301
|
+
continue;
|
|
3302
|
+
}
|
|
3303
|
+
} else if (!namespaceDefinition.shareable || namespaceDefinition.sensitive) {
|
|
3299
3304
|
continue;
|
|
3300
3305
|
}
|
|
3301
3306
|
const value = helpers.read ? helpers.read(logicalKey) : entry.value;
|
|
3302
3307
|
if (value === void 0) {
|
|
3303
3308
|
continue;
|
|
3304
3309
|
}
|
|
3310
|
+
if (isSecretReference(value) || !isSecretNamespace && isSecretReference(entry.value)) {
|
|
3311
|
+
continue;
|
|
3312
|
+
}
|
|
3305
3313
|
output[envVar] = normalizeEnvValue(value);
|
|
3306
3314
|
}
|
|
3307
3315
|
return output;
|
|
@@ -3711,7 +3719,7 @@ function envVarToLogicalKey(envVar, config = {}) {
|
|
|
3711
3719
|
// package.json
|
|
3712
3720
|
var package_default = {
|
|
3713
3721
|
name: "@kitsy/cnos",
|
|
3714
|
-
version: "1.
|
|
3722
|
+
version: "1.9.1",
|
|
3715
3723
|
description: "Batteries-included CNOS runtime package wired with the official plugins.",
|
|
3716
3724
|
type: "module",
|
|
3717
3725
|
main: "./dist/index.cjs",
|
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-L6ZMJPA6.js";
|
|
4
|
+
import "../chunk-NVFACB64.js";
|
|
5
|
+
import "../chunk-MYG6EPUX.js";
|
|
6
|
+
import "../chunk-LURQ4LAK.js";
|
|
7
|
+
import "../chunk-A2WG3ZKW.js";
|
|
8
|
+
import "../chunk-L7JVECPE.js";
|
|
9
|
+
import "../chunk-6QQPHDUI.js";
|
|
10
|
+
import "../chunk-7JZO6XN3.js";
|
|
11
|
+
import "../chunk-2JBA2LXU.js";
|
|
12
|
+
import "../chunk-7KVM5PUW.js";
|
|
13
13
|
export {
|
|
14
14
|
runtime_default as default
|
|
15
15
|
};
|