@kitsy/cnos 1.8.2 → 1.8.3

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 (54) hide show
  1. package/dist/build/index.cjs +16 -4
  2. package/dist/build/index.d.cts +1 -1
  3. package/dist/build/index.d.ts +1 -1
  4. package/dist/build/index.js +8 -8
  5. package/dist/{chunk-KU73PJSQ.js → chunk-36AR262B.js} +1 -1
  6. package/dist/{chunk-DAFUP7EQ.js → chunk-4AAA2RHV.js} +1 -1
  7. package/dist/{chunk-J7VEEREE.js → chunk-7MUDEJSP.js} +10 -10
  8. package/dist/{chunk-VTUOWV3S.js → chunk-DL5G3QSZ.js} +1 -1
  9. package/dist/{chunk-DQGLBF6G.js → chunk-EJT2VJTM.js} +1 -1
  10. package/dist/{chunk-B5TV5O6O.js → chunk-JQLV4OQU.js} +1 -1
  11. package/dist/{chunk-FWW7F52D.js → chunk-N5DX5QEB.js} +1 -1
  12. package/dist/{chunk-CP6K2DB3.js → chunk-SUMWGMRA.js} +11 -4
  13. package/dist/{chunk-4MQBH4AY.js → chunk-UMVFSHP2.js} +1 -1
  14. package/dist/{chunk-5XOGTE42.js → chunk-ZH5QZQ7C.js} +15 -3
  15. package/dist/configure/index.cjs +16 -4
  16. package/dist/configure/index.d.cts +3 -3
  17. package/dist/configure/index.d.ts +3 -3
  18. package/dist/configure/index.js +8 -8
  19. package/dist/{core-CXgtC4VL.d.cts → core-zDTUSVx9.d.cts} +3 -1
  20. package/dist/{core-CXgtC4VL.d.ts → core-zDTUSVx9.d.ts} +3 -1
  21. package/dist/{envNaming-CA6OluSg.d.ts → envNaming-BkorOKW_.d.ts} +1 -1
  22. package/dist/{envNaming-BDtISWCK.d.cts → envNaming-EFzezmB3.d.cts} +1 -1
  23. package/dist/index.cjs +24 -5
  24. package/dist/index.d.cts +1 -1
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +10 -10
  27. package/dist/internal.d.cts +2 -2
  28. package/dist/internal.d.ts +2 -2
  29. package/dist/internal.js +2 -2
  30. package/dist/plugin/basic-schema.d.cts +1 -1
  31. package/dist/plugin/basic-schema.d.ts +1 -1
  32. package/dist/plugin/basic-schema.js +2 -2
  33. package/dist/plugin/cli-args.d.cts +1 -1
  34. package/dist/plugin/cli-args.d.ts +1 -1
  35. package/dist/plugin/cli-args.js +2 -2
  36. package/dist/plugin/dotenv.d.cts +2 -2
  37. package/dist/plugin/dotenv.d.ts +2 -2
  38. package/dist/plugin/dotenv.js +2 -2
  39. package/dist/plugin/env-export.d.cts +2 -2
  40. package/dist/plugin/env-export.d.ts +2 -2
  41. package/dist/plugin/env-export.js +2 -2
  42. package/dist/plugin/filesystem.d.cts +1 -1
  43. package/dist/plugin/filesystem.d.ts +1 -1
  44. package/dist/plugin/filesystem.js +2 -2
  45. package/dist/plugin/process-env.d.cts +2 -2
  46. package/dist/plugin/process-env.d.ts +2 -2
  47. package/dist/plugin/process-env.js +2 -2
  48. package/dist/runtime/index.cjs +24 -5
  49. package/dist/runtime/index.d.cts +1 -1
  50. package/dist/runtime/index.d.ts +1 -1
  51. package/dist/runtime/index.js +10 -10
  52. package/dist/{toPublicEnv-B_dZDXDv.d.ts → toPublicEnv-CT265rzS.d.ts} +1 -1
  53. package/dist/{toPublicEnv-C_MbUTdV.d.cts → toPublicEnv-Ds1DRwCX.d.cts} +1 -1
  54. package/package.json +1 -1
@@ -3173,6 +3173,13 @@ function stableSortObject(value) {
3173
3173
  function stripValuePrefix(key) {
3174
3174
  return key.startsWith("value.") ? key.slice("value.".length) : key;
3175
3175
  }
3176
+ function resolveProjectedEnvVar(manifest, vaultId, ref) {
3177
+ const mapping = manifest.vaults[vaultId]?.mapping;
3178
+ if (!mapping) {
3179
+ return void 0;
3180
+ }
3181
+ return Object.entries(mapping).find(([, logicalRef]) => logicalRef === ref)?.[0];
3182
+ }
3176
3183
  function configHash(values) {
3177
3184
  const serialized = JSON.stringify(stableSortObject(values));
3178
3185
  return (0, import_node_crypto3.createHash)("sha256").update(serialized).digest("hex");
@@ -3189,10 +3196,15 @@ function toServerProjection(graph, manifest, cnosVersion = "0.0.0-dev", helpers
3189
3196
  const publicKeys = Array.from(graph.entries.values()).filter((entry) => entry.namespace === "public").map((entry) => entry.key.slice("public.".length)).sort((left, right) => left.localeCompare(right));
3190
3197
  for (const [key, entry] of graph.entries) {
3191
3198
  if (entry.namespace === "secret" && isSecretReference(entry.value)) {
3199
+ const vaultId = entry.value.vault ?? "default";
3200
+ const envVar = resolveProjectedEnvVar(manifest, vaultId, entry.value.ref);
3192
3201
  secretRefs[key.slice("secret.".length)] = {
3193
3202
  provider: entry.value.provider,
3194
- vault: entry.value.vault ?? "default",
3195
- ref: entry.value.ref
3203
+ vault: vaultId,
3204
+ ref: entry.value.ref,
3205
+ ...envVar ? {
3206
+ envVar
3207
+ } : {}
3196
3208
  };
3197
3209
  continue;
3198
3210
  }
@@ -3647,7 +3659,7 @@ async function createCnos(options = {}) {
3647
3659
  });
3648
3660
  const schemaApplied = applySchemaRules(graph, loadedManifest.manifest.schema);
3649
3661
  const promotedGraph = promoteToPublic(schemaApplied.graph, loadedManifest.manifest);
3650
- const secretCache = options.secretResolution === "lazy" ? void 0 : await batchResolveSecrets(promotedGraph, loadedManifest.manifest, options.processEnv);
3662
+ const secretCache = options.secretResolution === "lazy" ? new SecretCache() : await batchResolveSecrets(promotedGraph, loadedManifest.manifest, options.processEnv);
3651
3663
  return createRuntime(
3652
3664
  loadedManifest.manifest,
3653
3665
  appendMetaEntries({
@@ -3700,7 +3712,7 @@ function envVarToLogicalKey(envVar, config = {}) {
3700
3712
  // package.json
3701
3713
  var package_default = {
3702
3714
  name: "@kitsy/cnos",
3703
- version: "1.8.2",
3715
+ version: "1.8.3",
3704
3716
  description: "Batteries-included CNOS runtime package wired with the official plugins.",
3705
3717
  type: "module",
3706
3718
  main: "./dist/index.cjs",
@@ -1,4 +1,4 @@
1
- import { C as CnosCreateOptions, S as ServerProjection } from '../core-CXgtC4VL.cjs';
1
+ import { C as CnosCreateOptions, S as ServerProjection } from '../core-zDTUSVx9.cjs';
2
2
 
3
3
  type BrowserDataMap = Record<string, unknown>;
4
4
  type FrameworkEnvTarget = 'generic' | 'vite' | 'next' | 'webpack' | (string & {});
@@ -1,4 +1,4 @@
1
- import { C as CnosCreateOptions, S as ServerProjection } from '../core-CXgtC4VL.js';
1
+ import { C as CnosCreateOptions, S as ServerProjection } from '../core-zDTUSVx9.js';
2
2
 
3
3
  type BrowserDataMap = Record<string, unknown>;
4
4
  type FrameworkEnvTarget = 'generic' | 'vite' | 'next' | 'webpack' | (string & {});
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createCnos
3
- } from "../chunk-J7VEEREE.js";
4
- import "../chunk-DQGLBF6G.js";
5
- import "../chunk-B5TV5O6O.js";
6
- import "../chunk-DAFUP7EQ.js";
7
- import "../chunk-4MQBH4AY.js";
8
- import "../chunk-FWW7F52D.js";
9
- import "../chunk-KU73PJSQ.js";
10
- import "../chunk-5XOGTE42.js";
3
+ } from "../chunk-7MUDEJSP.js";
4
+ import "../chunk-JQLV4OQU.js";
5
+ import "../chunk-4AAA2RHV.js";
6
+ import "../chunk-UMVFSHP2.js";
7
+ import "../chunk-N5DX5QEB.js";
8
+ import "../chunk-36AR262B.js";
9
+ import "../chunk-EJT2VJTM.js";
10
+ import "../chunk-ZH5QZQ7C.js";
11
11
 
12
12
  // src/build/index.ts
13
13
  async function resolveBrowserData(options = {}) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  joinConfigPath
3
- } from "./chunk-5XOGTE42.js";
3
+ } from "./chunk-ZH5QZQ7C.js";
4
4
 
5
5
  // ../../plugins/cli-args/src/index.ts
6
6
  var CLI_ARGS_PLUGIN_ID = "@kitsy/cnos/plugins/cli-args";
@@ -4,7 +4,7 @@ import {
4
4
  isSecretReference,
5
5
  parseYaml,
6
6
  toPortablePath
7
- } from "./chunk-5XOGTE42.js";
7
+ } from "./chunk-ZH5QZQ7C.js";
8
8
 
9
9
  // ../../plugins/filesystem/src/helpers.ts
10
10
  import { readdir } from "fs/promises";
@@ -1,27 +1,27 @@
1
- import {
2
- createDotenvPlugin
3
- } from "./chunk-DQGLBF6G.js";
4
1
  import {
5
2
  createEnvExportPlugin,
6
3
  createPublicEnvExportPlugin
7
- } from "./chunk-B5TV5O6O.js";
4
+ } from "./chunk-JQLV4OQU.js";
8
5
  import {
9
6
  createFilesystemSecretsPlugin,
10
7
  createFilesystemValuesPlugin
11
- } from "./chunk-DAFUP7EQ.js";
8
+ } from "./chunk-4AAA2RHV.js";
12
9
  import {
13
10
  createProcessEnvPlugin
14
- } from "./chunk-4MQBH4AY.js";
11
+ } from "./chunk-UMVFSHP2.js";
15
12
  import {
16
13
  createBasicSchemaPlugin
17
- } from "./chunk-FWW7F52D.js";
14
+ } from "./chunk-N5DX5QEB.js";
18
15
  import {
19
16
  createCliArgsPlugin
20
- } from "./chunk-KU73PJSQ.js";
17
+ } from "./chunk-36AR262B.js";
18
+ import {
19
+ createDotenvPlugin
20
+ } from "./chunk-EJT2VJTM.js";
21
21
  import {
22
22
  createCnos,
23
23
  createProvenanceInspector
24
- } from "./chunk-5XOGTE42.js";
24
+ } from "./chunk-ZH5QZQ7C.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.8.2",
71
+ version: "1.8.3",
72
72
  description: "Batteries-included CNOS runtime package wired with the official plugins.",
73
73
  type: "module",
74
74
  main: "./dist/index.cjs",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSecretReference
3
- } from "./chunk-5XOGTE42.js";
3
+ } from "./chunk-ZH5QZQ7C.js";
4
4
 
5
5
  // src/runtime/bootstrap.ts
6
6
  import { createCipheriv, createDecipheriv, randomBytes } from "crypto";
@@ -2,7 +2,7 @@ import {
2
2
  envVarToLogicalKey,
3
3
  resolveWorkspaceScopedPath,
4
4
  toPortablePath
5
- } from "./chunk-5XOGTE42.js";
5
+ } from "./chunk-ZH5QZQ7C.js";
6
6
 
7
7
  // ../../plugins/dotenv/src/index.ts
8
8
  import { readFile } from "fs/promises";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  toEnv,
3
3
  toPublicEnv
4
- } from "./chunk-5XOGTE42.js";
4
+ } from "./chunk-ZH5QZQ7C.js";
5
5
 
6
6
  // ../../plugins/env-export/src/index.ts
7
7
  function createEnvExportPlugin() {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  applySchemaRules
3
- } from "./chunk-5XOGTE42.js";
3
+ } from "./chunk-ZH5QZQ7C.js";
4
4
 
5
5
  // ../../plugins/basic-schema/src/index.ts
6
6
  function createBasicSchemaPlugin() {
@@ -3,7 +3,7 @@ import {
3
3
  graphRequiresSecretHydration,
4
4
  readRuntimeGraphFromEnv,
5
5
  readServerProjectionFromEnv
6
- } from "./chunk-VTUOWV3S.js";
6
+ } from "./chunk-DL5G3QSZ.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-J7VEEREE.js";
15
+ } from "./chunk-7MUDEJSP.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-5XOGTE42.js";
31
+ } from "./chunk-ZH5QZQ7C.js";
32
32
 
33
33
  // src/runtime/index.ts
34
34
  import { existsSync, readFileSync } from "fs";
@@ -474,7 +474,14 @@ function attachBootstrappedProjection(projection, force = false) {
474
474
  if (!ref) {
475
475
  return void 0;
476
476
  }
477
- const definition = { provider: ref.provider };
477
+ const definition = {
478
+ provider: ref.provider,
479
+ ...ref.envVar ? {
480
+ mapping: {
481
+ [ref.envVar]: ref.ref
482
+ }
483
+ } : {}
484
+ };
478
485
  const provider = createSecretVaultProvider(ref.vault ?? "default", definition, process.env);
479
486
  const auth = await resolveVaultAuth(ref.vault ?? "default", definition, process.env);
480
487
  await provider.authenticate(auth);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  envVarToLogicalKey
3
- } from "./chunk-5XOGTE42.js";
3
+ } from "./chunk-ZH5QZQ7C.js";
4
4
 
5
5
  // ../../plugins/process-env/src/index.ts
6
6
  var PROCESS_ENV_PLUGIN_ID = "@kitsy/cnos/plugins/process-env";
@@ -3565,6 +3565,13 @@ function stableSortObject(value) {
3565
3565
  function stripValuePrefix(key) {
3566
3566
  return key.startsWith("value.") ? key.slice("value.".length) : key;
3567
3567
  }
3568
+ function resolveProjectedEnvVar(manifest, vaultId, ref) {
3569
+ const mapping = manifest.vaults[vaultId]?.mapping;
3570
+ if (!mapping) {
3571
+ return void 0;
3572
+ }
3573
+ return Object.entries(mapping).find(([, logicalRef]) => logicalRef === ref)?.[0];
3574
+ }
3568
3575
  function configHash(values) {
3569
3576
  const serialized = JSON.stringify(stableSortObject(values));
3570
3577
  return createHash2("sha256").update(serialized).digest("hex");
@@ -3581,10 +3588,15 @@ function toServerProjection(graph, manifest, cnosVersion = "0.0.0-dev", helpers
3581
3588
  const publicKeys = Array.from(graph.entries.values()).filter((entry) => entry.namespace === "public").map((entry) => entry.key.slice("public.".length)).sort((left, right) => left.localeCompare(right));
3582
3589
  for (const [key, entry] of graph.entries) {
3583
3590
  if (entry.namespace === "secret" && isSecretReference(entry.value)) {
3591
+ const vaultId = entry.value.vault ?? "default";
3592
+ const envVar = resolveProjectedEnvVar(manifest, vaultId, entry.value.ref);
3584
3593
  secretRefs[key.slice("secret.".length)] = {
3585
3594
  provider: entry.value.provider,
3586
- vault: entry.value.vault ?? "default",
3587
- ref: entry.value.ref
3595
+ vault: vaultId,
3596
+ ref: entry.value.ref,
3597
+ ...envVar ? {
3598
+ envVar
3599
+ } : {}
3588
3600
  };
3589
3601
  continue;
3590
3602
  }
@@ -3942,7 +3954,7 @@ async function createCnos(options = {}) {
3942
3954
  });
3943
3955
  const schemaApplied = applySchemaRules(graph, loadedManifest.manifest.schema);
3944
3956
  const promotedGraph = promoteToPublic(schemaApplied.graph, loadedManifest.manifest);
3945
- const secretCache = options.secretResolution === "lazy" ? void 0 : await batchResolveSecrets(promotedGraph, loadedManifest.manifest, options.processEnv);
3957
+ const secretCache = options.secretResolution === "lazy" ? new SecretCache() : await batchResolveSecrets(promotedGraph, loadedManifest.manifest, options.processEnv);
3946
3958
  return createRuntime(
3947
3959
  loadedManifest.manifest,
3948
3960
  appendMetaEntries({
@@ -3175,6 +3175,13 @@ function stableSortObject(value) {
3175
3175
  function stripValuePrefix(key) {
3176
3176
  return key.startsWith("value.") ? key.slice("value.".length) : key;
3177
3177
  }
3178
+ function resolveProjectedEnvVar(manifest, vaultId, ref) {
3179
+ const mapping = manifest.vaults[vaultId]?.mapping;
3180
+ if (!mapping) {
3181
+ return void 0;
3182
+ }
3183
+ return Object.entries(mapping).find(([, logicalRef]) => logicalRef === ref)?.[0];
3184
+ }
3178
3185
  function configHash(values) {
3179
3186
  const serialized = JSON.stringify(stableSortObject(values));
3180
3187
  return (0, import_node_crypto3.createHash)("sha256").update(serialized).digest("hex");
@@ -3191,10 +3198,15 @@ function toServerProjection(graph, manifest, cnosVersion = "0.0.0-dev", helpers
3191
3198
  const publicKeys = Array.from(graph.entries.values()).filter((entry) => entry.namespace === "public").map((entry) => entry.key.slice("public.".length)).sort((left, right) => left.localeCompare(right));
3192
3199
  for (const [key, entry] of graph.entries) {
3193
3200
  if (entry.namespace === "secret" && isSecretReference(entry.value)) {
3201
+ const vaultId = entry.value.vault ?? "default";
3202
+ const envVar = resolveProjectedEnvVar(manifest, vaultId, entry.value.ref);
3194
3203
  secretRefs[key.slice("secret.".length)] = {
3195
3204
  provider: entry.value.provider,
3196
- vault: entry.value.vault ?? "default",
3197
- ref: entry.value.ref
3205
+ vault: vaultId,
3206
+ ref: entry.value.ref,
3207
+ ...envVar ? {
3208
+ envVar
3209
+ } : {}
3198
3210
  };
3199
3211
  continue;
3200
3212
  }
@@ -3649,7 +3661,7 @@ async function createCnos(options = {}) {
3649
3661
  });
3650
3662
  const schemaApplied = applySchemaRules(graph, loadedManifest.manifest.schema);
3651
3663
  const promotedGraph = promoteToPublic(schemaApplied.graph, loadedManifest.manifest);
3652
- const secretCache = options.secretResolution === "lazy" ? void 0 : await batchResolveSecrets(promotedGraph, loadedManifest.manifest, options.processEnv);
3664
+ const secretCache = options.secretResolution === "lazy" ? new SecretCache() : await batchResolveSecrets(promotedGraph, loadedManifest.manifest, options.processEnv);
3653
3665
  return createRuntime(
3654
3666
  loadedManifest.manifest,
3655
3667
  appendMetaEntries({
@@ -3744,7 +3756,7 @@ function envVarToLogicalKey(envVar, config = {}) {
3744
3756
  // package.json
3745
3757
  var package_default = {
3746
3758
  name: "@kitsy/cnos",
3747
- version: "1.8.2",
3759
+ version: "1.8.3",
3748
3760
  description: "Batteries-included CNOS runtime package wired with the official plugins.",
3749
3761
  type: "module",
3750
3762
  main: "./dist/index.cjs",
@@ -1,6 +1,6 @@
1
- import { R as ResolvedGraph, D as DumpPlanOptions, d as DumpPlan, e as DumpOptions, f as DumpResult, C as CnosCreateOptions, g as CnosRuntime, h as CnosPlugin } from '../core-CXgtC4VL.cjs';
2
- export { a as ConfigEntry, i as DerivedFormula, j as DerivedValue, k as ExprNode, I as InspectResult, L as LoaderPlugin, b as LogicalKey, M as ManifestFile, N as NormalizedManifest, P as ParsedDerivation, l as RuntimeProvider, T as ToEnvOptions, c as ToPublicEnvOptions } from '../core-CXgtC4VL.cjs';
3
- export { t as toEnv, a as toPublicEnv } from '../toPublicEnv-C_MbUTdV.cjs';
1
+ import { R as ResolvedGraph, D as DumpPlanOptions, d as DumpPlan, e as DumpOptions, f as DumpResult, C as CnosCreateOptions, g as CnosRuntime, h as CnosPlugin } from '../core-zDTUSVx9.cjs';
2
+ export { a as ConfigEntry, i as DerivedFormula, j as DerivedValue, k as ExprNode, I as InspectResult, L as LoaderPlugin, b as LogicalKey, M as ManifestFile, N as NormalizedManifest, P as ParsedDerivation, l as RuntimeProvider, T as ToEnvOptions, c as ToPublicEnvOptions } from '../core-zDTUSVx9.cjs';
3
+ export { t as toEnv, a as toPublicEnv } from '../toPublicEnv-Ds1DRwCX.cjs';
4
4
 
5
5
  declare function planDump(graph: ResolvedGraph, options?: DumpPlanOptions): DumpPlan;
6
6
  declare function writeDump(graph: ResolvedGraph, options: DumpOptions): Promise<DumpResult>;
@@ -1,6 +1,6 @@
1
- import { R as ResolvedGraph, D as DumpPlanOptions, d as DumpPlan, e as DumpOptions, f as DumpResult, C as CnosCreateOptions, g as CnosRuntime, h as CnosPlugin } from '../core-CXgtC4VL.js';
2
- export { a as ConfigEntry, i as DerivedFormula, j as DerivedValue, k as ExprNode, I as InspectResult, L as LoaderPlugin, b as LogicalKey, M as ManifestFile, N as NormalizedManifest, P as ParsedDerivation, l as RuntimeProvider, T as ToEnvOptions, c as ToPublicEnvOptions } from '../core-CXgtC4VL.js';
3
- export { t as toEnv, a as toPublicEnv } from '../toPublicEnv-B_dZDXDv.js';
1
+ import { R as ResolvedGraph, D as DumpPlanOptions, d as DumpPlan, e as DumpOptions, f as DumpResult, C as CnosCreateOptions, g as CnosRuntime, h as CnosPlugin } from '../core-zDTUSVx9.js';
2
+ export { a as ConfigEntry, i as DerivedFormula, j as DerivedValue, k as ExprNode, I as InspectResult, L as LoaderPlugin, b as LogicalKey, M as ManifestFile, N as NormalizedManifest, P as ParsedDerivation, l as RuntimeProvider, T as ToEnvOptions, c as ToPublicEnvOptions } from '../core-zDTUSVx9.js';
3
+ export { t as toEnv, a as toPublicEnv } from '../toPublicEnv-CT265rzS.js';
4
4
 
5
5
  declare function planDump(graph: ResolvedGraph, options?: DumpPlanOptions): DumpPlan;
6
6
  declare function writeDump(graph: ResolvedGraph, options: DumpOptions): Promise<DumpResult>;
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  createCnos,
3
3
  defaultPlugins
4
- } from "../chunk-J7VEEREE.js";
5
- import "../chunk-DQGLBF6G.js";
6
- import "../chunk-B5TV5O6O.js";
7
- import "../chunk-DAFUP7EQ.js";
8
- import "../chunk-4MQBH4AY.js";
9
- import "../chunk-FWW7F52D.js";
10
- import "../chunk-KU73PJSQ.js";
4
+ } from "../chunk-7MUDEJSP.js";
5
+ import "../chunk-JQLV4OQU.js";
6
+ import "../chunk-4AAA2RHV.js";
7
+ import "../chunk-UMVFSHP2.js";
8
+ import "../chunk-N5DX5QEB.js";
9
+ import "../chunk-36AR262B.js";
10
+ import "../chunk-EJT2VJTM.js";
11
11
  import {
12
12
  planDump,
13
13
  toEnv,
14
14
  toPublicEnv,
15
15
  writeDump
16
- } from "../chunk-5XOGTE42.js";
16
+ } from "../chunk-ZH5QZQ7C.js";
17
17
  export {
18
18
  createCnos,
19
19
  defaultPlugins,
@@ -467,7 +467,9 @@ interface ServerProjection {
467
467
  configHash: string;
468
468
  values: Record<string, unknown>;
469
469
  derived: Record<string, DerivedFormula>;
470
- secretRefs: Record<string, SecretReference>;
470
+ secretRefs: Record<string, SecretReference & {
471
+ envVar?: string;
472
+ }>;
471
473
  publicKeys: string[];
472
474
  runtimeNamespaces: string[];
473
475
  meta: {
@@ -467,7 +467,9 @@ interface ServerProjection {
467
467
  configHash: string;
468
468
  values: Record<string, unknown>;
469
469
  derived: Record<string, DerivedFormula>;
470
- secretRefs: Record<string, SecretReference>;
470
+ secretRefs: Record<string, SecretReference & {
471
+ envVar?: string;
472
+ }>;
471
473
  publicKeys: string[];
472
474
  runtimeNamespaces: string[];
473
475
  meta: {
@@ -1,4 +1,4 @@
1
- import { N as NormalizedManifest, b as LogicalKey } from './core-CXgtC4VL.js';
1
+ import { N as NormalizedManifest, b as LogicalKey } from './core-zDTUSVx9.js';
2
2
 
3
3
  interface EnvMappingConfig {
4
4
  convention?: NormalizedManifest['envMapping']['convention'];
@@ -1,4 +1,4 @@
1
- import { N as NormalizedManifest, b as LogicalKey } from './core-CXgtC4VL.cjs';
1
+ import { N as NormalizedManifest, b as LogicalKey } from './core-zDTUSVx9.cjs';
2
2
 
3
3
  interface EnvMappingConfig {
4
4
  convention?: NormalizedManifest['envMapping']['convention'];
package/dist/index.cjs CHANGED
@@ -3175,6 +3175,13 @@ function stableSortObject(value) {
3175
3175
  function stripValuePrefix(key) {
3176
3176
  return key.startsWith("value.") ? key.slice("value.".length) : key;
3177
3177
  }
3178
+ function resolveProjectedEnvVar(manifest, vaultId, ref) {
3179
+ const mapping = manifest.vaults[vaultId]?.mapping;
3180
+ if (!mapping) {
3181
+ return void 0;
3182
+ }
3183
+ return Object.entries(mapping).find(([, logicalRef]) => logicalRef === ref)?.[0];
3184
+ }
3178
3185
  function configHash(values) {
3179
3186
  const serialized = JSON.stringify(stableSortObject(values));
3180
3187
  return (0, import_node_crypto3.createHash)("sha256").update(serialized).digest("hex");
@@ -3191,10 +3198,15 @@ function toServerProjection(graph, manifest, cnosVersion = "0.0.0-dev", helpers
3191
3198
  const publicKeys = Array.from(graph.entries.values()).filter((entry) => entry.namespace === "public").map((entry) => entry.key.slice("public.".length)).sort((left, right) => left.localeCompare(right));
3192
3199
  for (const [key, entry] of graph.entries) {
3193
3200
  if (entry.namespace === "secret" && isSecretReference(entry.value)) {
3201
+ const vaultId = entry.value.vault ?? "default";
3202
+ const envVar = resolveProjectedEnvVar(manifest, vaultId, entry.value.ref);
3194
3203
  secretRefs[key.slice("secret.".length)] = {
3195
3204
  provider: entry.value.provider,
3196
- vault: entry.value.vault ?? "default",
3197
- ref: entry.value.ref
3205
+ vault: vaultId,
3206
+ ref: entry.value.ref,
3207
+ ...envVar ? {
3208
+ envVar
3209
+ } : {}
3198
3210
  };
3199
3211
  continue;
3200
3212
  }
@@ -3649,7 +3661,7 @@ async function createCnos(options = {}) {
3649
3661
  });
3650
3662
  const schemaApplied = applySchemaRules(graph, loadedManifest.manifest.schema);
3651
3663
  const promotedGraph = promoteToPublic(schemaApplied.graph, loadedManifest.manifest);
3652
- const secretCache = options.secretResolution === "lazy" ? void 0 : await batchResolveSecrets(promotedGraph, loadedManifest.manifest, options.processEnv);
3664
+ const secretCache = options.secretResolution === "lazy" ? new SecretCache() : await batchResolveSecrets(promotedGraph, loadedManifest.manifest, options.processEnv);
3653
3665
  return createRuntime(
3654
3666
  loadedManifest.manifest,
3655
3667
  appendMetaEntries({
@@ -3702,7 +3714,7 @@ function envVarToLogicalKey(envVar, config = {}) {
3702
3714
  // package.json
3703
3715
  var package_default = {
3704
3716
  name: "@kitsy/cnos",
3705
- version: "1.8.2",
3717
+ version: "1.8.3",
3706
3718
  description: "Batteries-included CNOS runtime package wired with the official plugins.",
3707
3719
  type: "module",
3708
3720
  main: "./dist/index.cjs",
@@ -4892,7 +4904,14 @@ function attachBootstrappedProjection(projection, force = false) {
4892
4904
  if (!ref) {
4893
4905
  return void 0;
4894
4906
  }
4895
- const definition = { provider: ref.provider };
4907
+ const definition = {
4908
+ provider: ref.provider,
4909
+ ...ref.envVar ? {
4910
+ mapping: {
4911
+ [ref.envVar]: ref.ref
4912
+ }
4913
+ } : {}
4914
+ };
4896
4915
  const provider = createSecretVaultProvider(ref.vault ?? "default", definition, process.env);
4897
4916
  const auth = await resolveVaultAuth(ref.vault ?? "default", definition, process.env);
4898
4917
  await provider.authenticate(auth);
package/dist/index.d.cts CHANGED
@@ -1,2 +1,2 @@
1
1
  export { CnosSingleton, default as cnos, default } from './runtime/index.cjs';
2
- export { h as CnosPlugin, g as CnosRuntime, a as ConfigEntry, i as DerivedFormula, j as DerivedValue, k as ExprNode, I as InspectResult, L as LoaderPlugin, b as LogicalKey, M as ManifestFile, N as NormalizedManifest, P as ParsedDerivation, l as RuntimeProvider } from './core-CXgtC4VL.cjs';
2
+ export { h as CnosPlugin, g as CnosRuntime, a as ConfigEntry, i as DerivedFormula, j as DerivedValue, k as ExprNode, I as InspectResult, L as LoaderPlugin, b as LogicalKey, M as ManifestFile, N as NormalizedManifest, P as ParsedDerivation, l as RuntimeProvider } from './core-zDTUSVx9.cjs';
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export { CnosSingleton, default as cnos, default } from './runtime/index.js';
2
- export { h as CnosPlugin, g as CnosRuntime, a as ConfigEntry, i as DerivedFormula, j as DerivedValue, k as ExprNode, I as InspectResult, L as LoaderPlugin, b as LogicalKey, M as ManifestFile, N as NormalizedManifest, P as ParsedDerivation, l as RuntimeProvider } from './core-CXgtC4VL.js';
2
+ export { h as CnosPlugin, g as CnosRuntime, a as ConfigEntry, i as DerivedFormula, j as DerivedValue, k as ExprNode, I as InspectResult, L as LoaderPlugin, b as LogicalKey, M as ManifestFile, N as NormalizedManifest, P as ParsedDerivation, l as RuntimeProvider } from './core-zDTUSVx9.js';
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  runtime_default
3
- } from "./chunk-CP6K2DB3.js";
4
- import "./chunk-VTUOWV3S.js";
5
- import "./chunk-J7VEEREE.js";
6
- import "./chunk-DQGLBF6G.js";
7
- import "./chunk-B5TV5O6O.js";
8
- import "./chunk-DAFUP7EQ.js";
9
- import "./chunk-4MQBH4AY.js";
10
- import "./chunk-FWW7F52D.js";
11
- import "./chunk-KU73PJSQ.js";
12
- import "./chunk-5XOGTE42.js";
3
+ } from "./chunk-SUMWGMRA.js";
4
+ import "./chunk-DL5G3QSZ.js";
5
+ import "./chunk-7MUDEJSP.js";
6
+ import "./chunk-JQLV4OQU.js";
7
+ import "./chunk-4AAA2RHV.js";
8
+ import "./chunk-UMVFSHP2.js";
9
+ import "./chunk-N5DX5QEB.js";
10
+ import "./chunk-36AR262B.js";
11
+ import "./chunk-EJT2VJTM.js";
12
+ import "./chunk-ZH5QZQ7C.js";
13
13
  export {
14
14
  runtime_default as cnos,
15
15
  runtime_default as default
@@ -1,5 +1,5 @@
1
- import { j as DerivedValue, P as ParsedDerivation, N as NormalizedManifest, n as LoadManifestOptions, o as LoadedManifest, b as LogicalKey, p as NamespaceDefinition, q as VaultDefinition, r as VaultAuthConfig, s as SecretVaultProvider, t as ResolvedRoot, m as NamespaceName, u as RootResolution, v as SecretReference, g as CnosRuntime, w as ValidationSummary, R as ResolvedGraph, S as ServerProjection } from './core-CXgtC4VL.cjs';
2
- export { l as RuntimeProvider, x as ValidationIssue, y as WorkspaceFile } from './core-CXgtC4VL.cjs';
1
+ import { j as DerivedValue, P as ParsedDerivation, N as NormalizedManifest, n as LoadManifestOptions, o as LoadedManifest, b as LogicalKey, p as NamespaceDefinition, q as VaultDefinition, r as VaultAuthConfig, s as SecretVaultProvider, t as ResolvedRoot, m as NamespaceName, u as RootResolution, v as SecretReference, g as CnosRuntime, w as ValidationSummary, R as ResolvedGraph, S as ServerProjection } from './core-zDTUSVx9.cjs';
2
+ export { l as RuntimeProvider, x as ValidationIssue, y as WorkspaceFile } from './core-zDTUSVx9.cjs';
3
3
 
4
4
  declare class CnosError extends Error {
5
5
  constructor(message: string);
@@ -1,5 +1,5 @@
1
- import { j as DerivedValue, P as ParsedDerivation, N as NormalizedManifest, n as LoadManifestOptions, o as LoadedManifest, b as LogicalKey, p as NamespaceDefinition, q as VaultDefinition, r as VaultAuthConfig, s as SecretVaultProvider, t as ResolvedRoot, m as NamespaceName, u as RootResolution, v as SecretReference, g as CnosRuntime, w as ValidationSummary, R as ResolvedGraph, S as ServerProjection } from './core-CXgtC4VL.js';
2
- export { l as RuntimeProvider, x as ValidationIssue, y as WorkspaceFile } from './core-CXgtC4VL.js';
1
+ import { j as DerivedValue, P as ParsedDerivation, N as NormalizedManifest, n as LoadManifestOptions, o as LoadedManifest, b as LogicalKey, p as NamespaceDefinition, q as VaultDefinition, r as VaultAuthConfig, s as SecretVaultProvider, t as ResolvedRoot, m as NamespaceName, u as RootResolution, v as SecretReference, g as CnosRuntime, w as ValidationSummary, R as ResolvedGraph, S as ServerProjection } from './core-zDTUSVx9.js';
2
+ export { l as RuntimeProvider, x as ValidationIssue, y as WorkspaceFile } from './core-zDTUSVx9.js';
3
3
 
4
4
  declare class CnosError extends Error {
5
5
  constructor(message: string);
package/dist/internal.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  serializeRuntimeGraph,
12
12
  serializeSecretPayload,
13
13
  serializeServerProjection
14
- } from "./chunk-VTUOWV3S.js";
14
+ } from "./chunk-DL5G3QSZ.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-5XOGTE42.js";
67
+ } from "./chunk-ZH5QZQ7C.js";
68
68
 
69
69
  // src/codegen/generateTypes.ts
70
70
  function toPascalCase(value) {
@@ -1,4 +1,4 @@
1
- import { V as ValidatorPlugin } from '../core-CXgtC4VL.cjs';
1
+ import { V as ValidatorPlugin } from '../core-zDTUSVx9.cjs';
2
2
 
3
3
  declare function createBasicSchemaPlugin(): ValidatorPlugin;
4
4
 
@@ -1,4 +1,4 @@
1
- import { V as ValidatorPlugin } from '../core-CXgtC4VL.js';
1
+ import { V as ValidatorPlugin } from '../core-zDTUSVx9.js';
2
2
 
3
3
  declare function createBasicSchemaPlugin(): ValidatorPlugin;
4
4
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createBasicSchemaPlugin
3
- } from "../chunk-FWW7F52D.js";
4
- import "../chunk-5XOGTE42.js";
3
+ } from "../chunk-N5DX5QEB.js";
4
+ import "../chunk-ZH5QZQ7C.js";
5
5
  export {
6
6
  createBasicSchemaPlugin
7
7
  };
@@ -1,4 +1,4 @@
1
- import { a as ConfigEntry, L as LoaderPlugin } from '../core-CXgtC4VL.cjs';
1
+ import { a as ConfigEntry, L as LoaderPlugin } from '../core-zDTUSVx9.cjs';
2
2
 
3
3
  interface ParsedCliArg {
4
4
  key: string;
@@ -1,4 +1,4 @@
1
- import { a as ConfigEntry, L as LoaderPlugin } from '../core-CXgtC4VL.js';
1
+ import { a as ConfigEntry, L as LoaderPlugin } from '../core-zDTUSVx9.js';
2
2
 
3
3
  interface ParsedCliArg {
4
4
  key: string;
@@ -2,8 +2,8 @@ import {
2
2
  cliArgEntriesFromArgs,
3
3
  createCliArgsPlugin,
4
4
  parseCliArgs
5
- } from "../chunk-KU73PJSQ.js";
6
- import "../chunk-5XOGTE42.js";
5
+ } from "../chunk-36AR262B.js";
6
+ import "../chunk-ZH5QZQ7C.js";
7
7
  export {
8
8
  cliArgEntriesFromArgs,
9
9
  createCliArgsPlugin,
@@ -1,5 +1,5 @@
1
- import { L as LoaderPlugin, a as ConfigEntry } from '../core-CXgtC4VL.cjs';
2
- import { E as EnvMappingConfig } from '../envNaming-BDtISWCK.cjs';
1
+ import { L as LoaderPlugin, a as ConfigEntry } from '../core-zDTUSVx9.cjs';
2
+ import { E as EnvMappingConfig } from '../envNaming-EFzezmB3.cjs';
3
3
 
4
4
  declare function parseDotenv(document: string): Record<string, string>;
5
5
  declare function dotenvEntriesFromObject(values: Record<string, string>, mapping?: EnvMappingConfig, originFile?: string, workspaceId?: string): ConfigEntry[];
@@ -1,5 +1,5 @@
1
- import { L as LoaderPlugin, a as ConfigEntry } from '../core-CXgtC4VL.js';
2
- import { E as EnvMappingConfig } from '../envNaming-CA6OluSg.js';
1
+ import { L as LoaderPlugin, a as ConfigEntry } from '../core-zDTUSVx9.js';
2
+ import { E as EnvMappingConfig } from '../envNaming-BkorOKW_.js';
3
3
 
4
4
  declare function parseDotenv(document: string): Record<string, string>;
5
5
  declare function dotenvEntriesFromObject(values: Record<string, string>, mapping?: EnvMappingConfig, originFile?: string, workspaceId?: string): ConfigEntry[];
@@ -2,8 +2,8 @@ import {
2
2
  createDotenvPlugin,
3
3
  dotenvEntriesFromObject,
4
4
  parseDotenv
5
- } from "../chunk-DQGLBF6G.js";
6
- import "../chunk-5XOGTE42.js";
5
+ } from "../chunk-EJT2VJTM.js";
6
+ import "../chunk-ZH5QZQ7C.js";
7
7
  export {
8
8
  createDotenvPlugin,
9
9
  dotenvEntriesFromObject,
@@ -1,5 +1,5 @@
1
- import { E as ExporterPlugin } from '../core-CXgtC4VL.cjs';
2
- export { t as toEnv, a as toPublicEnv } from '../toPublicEnv-C_MbUTdV.cjs';
1
+ import { E as ExporterPlugin } from '../core-zDTUSVx9.cjs';
2
+ export { t as toEnv, a as toPublicEnv } from '../toPublicEnv-Ds1DRwCX.cjs';
3
3
 
4
4
  declare function createEnvExportPlugin(): ExporterPlugin;
5
5
  declare function createPublicEnvExportPlugin(): ExporterPlugin;
@@ -1,5 +1,5 @@
1
- import { E as ExporterPlugin } from '../core-CXgtC4VL.js';
2
- export { t as toEnv, a as toPublicEnv } from '../toPublicEnv-B_dZDXDv.js';
1
+ import { E as ExporterPlugin } from '../core-zDTUSVx9.js';
2
+ export { t as toEnv, a as toPublicEnv } from '../toPublicEnv-CT265rzS.js';
3
3
 
4
4
  declare function createEnvExportPlugin(): ExporterPlugin;
5
5
  declare function createPublicEnvExportPlugin(): ExporterPlugin;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  createEnvExportPlugin,
3
3
  createPublicEnvExportPlugin
4
- } from "../chunk-B5TV5O6O.js";
4
+ } from "../chunk-JQLV4OQU.js";
5
5
  import {
6
6
  toEnv,
7
7
  toPublicEnv
8
- } from "../chunk-5XOGTE42.js";
8
+ } from "../chunk-ZH5QZQ7C.js";
9
9
  export {
10
10
  createEnvExportPlugin,
11
11
  createPublicEnvExportPlugin,
@@ -1,4 +1,4 @@
1
- import { L as LoaderPlugin, a as ConfigEntry, W as WorkspaceRoot, m as NamespaceName } from '../core-CXgtC4VL.cjs';
1
+ import { L as LoaderPlugin, a as ConfigEntry, W as WorkspaceRoot, m as NamespaceName } from '../core-zDTUSVx9.cjs';
2
2
 
3
3
  declare function filesystemSecretsReader(filePath: string, document: string, workspaceId?: string): ConfigEntry[];
4
4
  declare function createFilesystemSecretsPlugin(): LoaderPlugin;
@@ -1,4 +1,4 @@
1
- import { L as LoaderPlugin, a as ConfigEntry, W as WorkspaceRoot, m as NamespaceName } from '../core-CXgtC4VL.js';
1
+ import { L as LoaderPlugin, a as ConfigEntry, W as WorkspaceRoot, m as NamespaceName } from '../core-zDTUSVx9.js';
2
2
 
3
3
  declare function filesystemSecretsReader(filePath: string, document: string, workspaceId?: string): ConfigEntry[];
4
4
  declare function createFilesystemSecretsPlugin(): LoaderPlugin;
@@ -5,8 +5,8 @@ import {
5
5
  filesystemSecretsReader,
6
6
  filesystemValuesReader,
7
7
  yamlObjectToEntries
8
- } from "../chunk-DAFUP7EQ.js";
9
- import "../chunk-5XOGTE42.js";
8
+ } from "../chunk-4AAA2RHV.js";
9
+ import "../chunk-ZH5QZQ7C.js";
10
10
  export {
11
11
  collectFilesystemLayerFiles,
12
12
  createFilesystemSecretsPlugin,
@@ -1,5 +1,5 @@
1
- import { L as LoaderPlugin, a as ConfigEntry } from '../core-CXgtC4VL.cjs';
2
- import { E as EnvMappingConfig } from '../envNaming-BDtISWCK.cjs';
1
+ import { L as LoaderPlugin, a as ConfigEntry } from '../core-zDTUSVx9.cjs';
2
+ import { E as EnvMappingConfig } from '../envNaming-EFzezmB3.cjs';
3
3
 
4
4
  declare function processEnvEntriesFromObject(env: Record<string, string | undefined>, mapping?: EnvMappingConfig, workspaceId?: string): ConfigEntry[];
5
5
  declare function processNamespaceEntriesFromContext(env: Record<string, string | undefined>, workspaceId?: string): ConfigEntry[];
@@ -1,5 +1,5 @@
1
- import { L as LoaderPlugin, a as ConfigEntry } from '../core-CXgtC4VL.js';
2
- import { E as EnvMappingConfig } from '../envNaming-CA6OluSg.js';
1
+ import { L as LoaderPlugin, a as ConfigEntry } from '../core-zDTUSVx9.js';
2
+ import { E as EnvMappingConfig } from '../envNaming-BkorOKW_.js';
3
3
 
4
4
  declare function processEnvEntriesFromObject(env: Record<string, string | undefined>, mapping?: EnvMappingConfig, workspaceId?: string): ConfigEntry[];
5
5
  declare function processNamespaceEntriesFromContext(env: Record<string, string | undefined>, workspaceId?: string): ConfigEntry[];
@@ -2,8 +2,8 @@ import {
2
2
  createProcessEnvPlugin,
3
3
  processEnvEntriesFromObject,
4
4
  processNamespaceEntriesFromContext
5
- } from "../chunk-4MQBH4AY.js";
6
- import "../chunk-5XOGTE42.js";
5
+ } from "../chunk-UMVFSHP2.js";
6
+ import "../chunk-ZH5QZQ7C.js";
7
7
  export {
8
8
  createProcessEnvPlugin,
9
9
  processEnvEntriesFromObject,
@@ -3172,6 +3172,13 @@ function stableSortObject(value) {
3172
3172
  function stripValuePrefix(key) {
3173
3173
  return key.startsWith("value.") ? key.slice("value.".length) : key;
3174
3174
  }
3175
+ function resolveProjectedEnvVar(manifest, vaultId, ref) {
3176
+ const mapping = manifest.vaults[vaultId]?.mapping;
3177
+ if (!mapping) {
3178
+ return void 0;
3179
+ }
3180
+ return Object.entries(mapping).find(([, logicalRef]) => logicalRef === ref)?.[0];
3181
+ }
3175
3182
  function configHash(values) {
3176
3183
  const serialized = JSON.stringify(stableSortObject(values));
3177
3184
  return (0, import_node_crypto3.createHash)("sha256").update(serialized).digest("hex");
@@ -3188,10 +3195,15 @@ function toServerProjection(graph, manifest, cnosVersion = "0.0.0-dev", helpers
3188
3195
  const publicKeys = Array.from(graph.entries.values()).filter((entry) => entry.namespace === "public").map((entry) => entry.key.slice("public.".length)).sort((left, right) => left.localeCompare(right));
3189
3196
  for (const [key, entry] of graph.entries) {
3190
3197
  if (entry.namespace === "secret" && isSecretReference(entry.value)) {
3198
+ const vaultId = entry.value.vault ?? "default";
3199
+ const envVar = resolveProjectedEnvVar(manifest, vaultId, entry.value.ref);
3191
3200
  secretRefs[key.slice("secret.".length)] = {
3192
3201
  provider: entry.value.provider,
3193
- vault: entry.value.vault ?? "default",
3194
- ref: entry.value.ref
3202
+ vault: vaultId,
3203
+ ref: entry.value.ref,
3204
+ ...envVar ? {
3205
+ envVar
3206
+ } : {}
3195
3207
  };
3196
3208
  continue;
3197
3209
  }
@@ -3646,7 +3658,7 @@ async function createCnos(options = {}) {
3646
3658
  });
3647
3659
  const schemaApplied = applySchemaRules(graph, loadedManifest.manifest.schema);
3648
3660
  const promotedGraph = promoteToPublic(schemaApplied.graph, loadedManifest.manifest);
3649
- const secretCache = options.secretResolution === "lazy" ? void 0 : await batchResolveSecrets(promotedGraph, loadedManifest.manifest, options.processEnv);
3661
+ const secretCache = options.secretResolution === "lazy" ? new SecretCache() : await batchResolveSecrets(promotedGraph, loadedManifest.manifest, options.processEnv);
3650
3662
  return createRuntime(
3651
3663
  loadedManifest.manifest,
3652
3664
  appendMetaEntries({
@@ -3699,7 +3711,7 @@ function envVarToLogicalKey(envVar, config = {}) {
3699
3711
  // package.json
3700
3712
  var package_default = {
3701
3713
  name: "@kitsy/cnos",
3702
- version: "1.8.2",
3714
+ version: "1.8.3",
3703
3715
  description: "Batteries-included CNOS runtime package wired with the official plugins.",
3704
3716
  type: "module",
3705
3717
  main: "./dist/index.cjs",
@@ -4889,7 +4901,14 @@ function attachBootstrappedProjection(projection, force = false) {
4889
4901
  if (!ref) {
4890
4902
  return void 0;
4891
4903
  }
4892
- const definition = { provider: ref.provider };
4904
+ const definition = {
4905
+ provider: ref.provider,
4906
+ ...ref.envVar ? {
4907
+ mapping: {
4908
+ [ref.envVar]: ref.ref
4909
+ }
4910
+ } : {}
4911
+ };
4893
4912
  const provider = createSecretVaultProvider(ref.vault ?? "default", definition, process.env);
4894
4913
  const auth = await resolveVaultAuth(ref.vault ?? "default", definition, process.env);
4895
4914
  await provider.authenticate(auth);
@@ -1,4 +1,4 @@
1
- import { b as LogicalKey, g as CnosRuntime, I as InspectResult } from '../core-CXgtC4VL.cjs';
1
+ import { b as LogicalKey, g as CnosRuntime, I as InspectResult } from '../core-zDTUSVx9.cjs';
2
2
 
3
3
  interface CnosSingleton {
4
4
  <T = unknown>(key: LogicalKey): T | undefined;
@@ -1,4 +1,4 @@
1
- import { b as LogicalKey, g as CnosRuntime, I as InspectResult } from '../core-CXgtC4VL.js';
1
+ import { b as LogicalKey, g as CnosRuntime, I as InspectResult } from '../core-zDTUSVx9.js';
2
2
 
3
3
  interface CnosSingleton {
4
4
  <T = unknown>(key: LogicalKey): T | undefined;
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  runtime_default
3
- } from "../chunk-CP6K2DB3.js";
4
- import "../chunk-VTUOWV3S.js";
5
- import "../chunk-J7VEEREE.js";
6
- import "../chunk-DQGLBF6G.js";
7
- import "../chunk-B5TV5O6O.js";
8
- import "../chunk-DAFUP7EQ.js";
9
- import "../chunk-4MQBH4AY.js";
10
- import "../chunk-FWW7F52D.js";
11
- import "../chunk-KU73PJSQ.js";
12
- import "../chunk-5XOGTE42.js";
3
+ } from "../chunk-SUMWGMRA.js";
4
+ import "../chunk-DL5G3QSZ.js";
5
+ import "../chunk-7MUDEJSP.js";
6
+ import "../chunk-JQLV4OQU.js";
7
+ import "../chunk-4AAA2RHV.js";
8
+ import "../chunk-UMVFSHP2.js";
9
+ import "../chunk-N5DX5QEB.js";
10
+ import "../chunk-36AR262B.js";
11
+ import "../chunk-EJT2VJTM.js";
12
+ import "../chunk-ZH5QZQ7C.js";
13
13
  export {
14
14
  runtime_default as default
15
15
  };
@@ -1,4 +1,4 @@
1
- import { R as ResolvedGraph, N as NormalizedManifest, T as ToEnvOptions, c as ToPublicEnvOptions } from './core-CXgtC4VL.js';
1
+ import { R as ResolvedGraph, N as NormalizedManifest, T as ToEnvOptions, c as ToPublicEnvOptions } from './core-zDTUSVx9.js';
2
2
 
3
3
  declare function toEnv(graph: ResolvedGraph, manifest: NormalizedManifest, options?: ToEnvOptions, helpers?: {
4
4
  read?: (key: string) => unknown;
@@ -1,4 +1,4 @@
1
- import { R as ResolvedGraph, N as NormalizedManifest, T as ToEnvOptions, c as ToPublicEnvOptions } from './core-CXgtC4VL.cjs';
1
+ import { R as ResolvedGraph, N as NormalizedManifest, T as ToEnvOptions, c as ToPublicEnvOptions } from './core-zDTUSVx9.cjs';
2
2
 
3
3
  declare function toEnv(graph: ResolvedGraph, manifest: NormalizedManifest, options?: ToEnvOptions, helpers?: {
4
4
  read?: (key: string) => unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitsy/cnos",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "Batteries-included CNOS runtime package wired with the official plugins.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",