@kitsy/cnos 1.10.0 → 1.11.0

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 (61) hide show
  1. package/dist/build/index.cjs +331 -63
  2. package/dist/build/index.d.cts +1 -1
  3. package/dist/build/index.d.ts +1 -1
  4. package/dist/build/index.js +13 -15
  5. package/dist/{chunk-A5U7EZCJ.js → chunk-2DMCB3PK.js} +1 -1
  6. package/dist/{chunk-RTHKUGJV.js → chunk-5JGNRADB.js} +1 -1
  7. package/dist/{chunk-3EZGPQCE.js → chunk-DPC2BV3S.js} +1 -1
  8. package/dist/{chunk-FHXLOWAB.js → chunk-KJ57PF47.js} +1 -1
  9. package/dist/{chunk-CSA4L64V.js → chunk-NFGPS7VJ.js} +10 -10
  10. package/dist/{chunk-ESBHCFC6.js → chunk-NU25VFA2.js} +1 -1
  11. package/dist/{chunk-UGLATJJD.js → chunk-RNTTPI5S.js} +1 -1
  12. package/dist/{chunk-UKNL2Y4N.js → chunk-T3E57MSQ.js} +1 -1
  13. package/dist/{chunk-MQ4WG3K6.js → chunk-WPB4HB2K.js} +320 -49
  14. package/dist/{chunk-EIK7OUFP.js → chunk-XGK6DXQL.js} +157 -37
  15. package/dist/configure/index.cjs +329 -59
  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-Ud1o2MBn.d.cts → core-BW8SLnRx.d.cts} +34 -2
  20. package/dist/{core-Ud1o2MBn.d.ts → core-BW8SLnRx.d.ts} +34 -2
  21. package/dist/{envNaming-DxxqiGKN.d.cts → envNaming-1rk7BR0e.d.cts} +1 -1
  22. package/dist/{envNaming-CPwXl4I6.d.ts → envNaming-CjL28IeH.d.ts} +1 -1
  23. package/dist/index.cjs +480 -91
  24. package/dist/index.d.cts +2 -2
  25. package/dist/index.d.ts +2 -2
  26. package/dist/index.js +10 -10
  27. package/dist/internal.cjs +89 -23
  28. package/dist/internal.d.cts +3 -3
  29. package/dist/internal.d.ts +3 -3
  30. package/dist/internal.js +2 -2
  31. package/dist/plugin/basic-schema.cjs +4 -1
  32. package/dist/plugin/basic-schema.d.cts +1 -1
  33. package/dist/plugin/basic-schema.d.ts +1 -1
  34. package/dist/plugin/basic-schema.js +2 -2
  35. package/dist/plugin/cli-args.cjs +4 -1
  36. package/dist/plugin/cli-args.d.cts +1 -1
  37. package/dist/plugin/cli-args.d.ts +1 -1
  38. package/dist/plugin/cli-args.js +2 -2
  39. package/dist/plugin/dotenv.cjs +6 -3
  40. package/dist/plugin/dotenv.d.cts +2 -2
  41. package/dist/plugin/dotenv.d.ts +2 -2
  42. package/dist/plugin/dotenv.js +2 -2
  43. package/dist/plugin/env-export.cjs +5 -2
  44. package/dist/plugin/env-export.d.cts +2 -2
  45. package/dist/plugin/env-export.d.ts +2 -2
  46. package/dist/plugin/env-export.js +2 -2
  47. package/dist/plugin/filesystem.cjs +13 -10
  48. package/dist/plugin/filesystem.d.cts +1 -1
  49. package/dist/plugin/filesystem.d.ts +1 -1
  50. package/dist/plugin/filesystem.js +2 -2
  51. package/dist/plugin/process-env.cjs +4 -1
  52. package/dist/plugin/process-env.d.cts +2 -2
  53. package/dist/plugin/process-env.d.ts +2 -2
  54. package/dist/plugin/process-env.js +2 -2
  55. package/dist/runtime/index.cjs +480 -91
  56. package/dist/runtime/index.d.cts +13 -6
  57. package/dist/runtime/index.d.ts +13 -6
  58. package/dist/runtime/index.js +10 -10
  59. package/dist/{toPublicEnv-fUZMRUOz.d.cts → toPublicEnv-CZzpvhGg.d.cts} +1 -1
  60. package/dist/{toPublicEnv-C9wPSpRo.d.ts → toPublicEnv-CmydGcxg.d.ts} +1 -1
  61. package/package.json +1 -1
@@ -40,10 +40,10 @@ __export(filesystem_exports, {
40
40
  module.exports = __toCommonJS(filesystem_exports);
41
41
 
42
42
  // ../../plugins/filesystem/src/filesystemSecretsReader.ts
43
- var import_promises14 = require("fs/promises");
43
+ var import_promises15 = require("fs/promises");
44
44
 
45
45
  // ../../plugins/filesystem/src/helpers.ts
46
- var import_promises13 = require("fs/promises");
46
+ var import_promises14 = require("fs/promises");
47
47
  var import_node_path14 = __toESM(require("path"), 1);
48
48
 
49
49
  // ../core/src/errors.ts
@@ -152,9 +152,12 @@ function isObject(value) {
152
152
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
153
153
  }
154
154
  function isSecretReference(value) {
155
- return isObject(value) && typeof value.provider === "string" && value.provider.trim().length > 0 && typeof value.ref === "string" && value.ref.trim().length > 0 && (value.vault === void 0 && true || typeof value.vault === "string" && value.vault.trim().length > 0) && Object.keys(value).every((key) => ["provider", "ref", "vault"].includes(key));
155
+ return isObject(value) && (value.provider === void 0 || typeof value.provider === "string" && value.provider.trim().length > 0) && typeof value.ref === "string" && value.ref.trim().length > 0 && (value.vault === void 0 && true || typeof value.vault === "string" && value.vault.trim().length > 0) && Object.keys(value).every((key) => ["provider", "ref", "vault"].includes(key));
156
156
  }
157
157
 
158
+ // ../core/src/secrets/resolveAuth.ts
159
+ var import_promises12 = require("fs/promises");
160
+
158
161
  // ../core/src/secrets/prompt.ts
159
162
  var import_node_readline = __toESM(require("readline"), 1);
160
163
  var import_node_stream = require("stream");
@@ -163,7 +166,7 @@ var import_node_stream = require("stream");
163
166
  var import_node_crypto3 = require("crypto");
164
167
 
165
168
  // ../core/src/runtime/dump.ts
166
- var import_promises12 = require("fs/promises");
169
+ var import_promises13 = require("fs/promises");
167
170
  var import_node_path13 = __toESM(require("path"), 1);
168
171
 
169
172
  // ../../plugins/filesystem/src/helpers.ts
@@ -171,7 +174,7 @@ var YAML_EXTENSIONS = /* @__PURE__ */ new Set([".yml", ".yaml"]);
171
174
  var FILESYSTEM_PLUGIN_ID = "@kitsy/cnos/plugins/filesystem";
172
175
  async function existsDirectory(targetPath) {
173
176
  try {
174
- const stat2 = await (0, import_promises13.readdir)(targetPath);
177
+ const stat2 = await (0, import_promises14.readdir)(targetPath);
175
178
  void stat2;
176
179
  return true;
177
180
  } catch {
@@ -179,7 +182,7 @@ async function existsDirectory(targetPath) {
179
182
  }
180
183
  }
181
184
  async function collectYamlFiles(root) {
182
- const entries = await (0, import_promises13.readdir)(root, { withFileTypes: true });
185
+ const entries = await (0, import_promises14.readdir)(root, { withFileTypes: true });
183
186
  const results = [];
184
187
  for (const entry of entries.sort((left, right) => left.name.localeCompare(right.name))) {
185
188
  const absolutePath = import_node_path14.default.join(root, entry.name);
@@ -281,7 +284,7 @@ function createFilesystemSecretsPlugin() {
281
284
  );
282
285
  const entries = [];
283
286
  for (const file of files) {
284
- const document = await (0, import_promises14.readFile)(file.absolutePath, "utf8");
287
+ const document = await (0, import_promises15.readFile)(file.absolutePath, "utf8");
285
288
  const fileEntries = filesystemSecretsReader(file.relativePath, document, file.workspaceId);
286
289
  for (const entry of fileEntries) {
287
290
  const metadata = toSecretReferenceMetadata(entry.value);
@@ -297,7 +300,7 @@ function createFilesystemSecretsPlugin() {
297
300
  }
298
301
 
299
302
  // ../../plugins/filesystem/src/filesystemValuesReader.ts
300
- var import_promises15 = require("fs/promises");
303
+ var import_promises16 = require("fs/promises");
301
304
  function filesystemValuesReader(filePath, document, workspaceId = "default") {
302
305
  return yamlObjectToEntries(document, filePath, "value", "filesystem-values", workspaceId);
303
306
  }
@@ -318,7 +321,7 @@ function createFilesystemValuesPlugin() {
318
321
  ).map(([namespace]) => namespace);
319
322
  const entries = [];
320
323
  for (const file of files) {
321
- const document = await (0, import_promises15.readFile)(file.absolutePath, "utf8");
324
+ const document = await (0, import_promises16.readFile)(file.absolutePath, "utf8");
322
325
  entries.push(...filesystemValuesReader(file.relativePath, document, file.workspaceId));
323
326
  }
324
327
  for (const namespace of customNamespaces) {
@@ -333,7 +336,7 @@ function createFilesystemValuesPlugin() {
333
336
  layers
334
337
  );
335
338
  for (const file of namespaceFiles) {
336
- const document = await (0, import_promises15.readFile)(file.absolutePath, "utf8");
339
+ const document = await (0, import_promises16.readFile)(file.absolutePath, "utf8");
337
340
  entries.push(...yamlObjectToEntries(document, file.relativePath, namespace, "filesystem-values", file.workspaceId));
338
341
  }
339
342
  }
@@ -1,4 +1,4 @@
1
- import { L as LoaderPlugin, a as ConfigEntry, W as WorkspaceRoot, m as NamespaceName } from '../core-Ud1o2MBn.cjs';
1
+ import { L as LoaderPlugin, a as ConfigEntry, W as WorkspaceRoot, m as NamespaceName } from '../core-BW8SLnRx.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-Ud1o2MBn.js';
1
+ import { L as LoaderPlugin, a as ConfigEntry, W as WorkspaceRoot, m as NamespaceName } from '../core-BW8SLnRx.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-ESBHCFC6.js";
9
- import "../chunk-MQ4WG3K6.js";
8
+ } from "../chunk-NU25VFA2.js";
9
+ import "../chunk-WPB4HB2K.js";
10
10
  export {
11
11
  collectFilesystemLayerFiles,
12
12
  createFilesystemSecretsPlugin,
@@ -107,6 +107,9 @@ var import_node_path11 = __toESM(require("path"), 1);
107
107
  var import_promises9 = require("fs/promises");
108
108
  var import_node_path10 = __toESM(require("path"), 1);
109
109
 
110
+ // ../core/src/secrets/resolveAuth.ts
111
+ var import_promises12 = require("fs/promises");
112
+
110
113
  // ../core/src/secrets/prompt.ts
111
114
  var import_node_readline = __toESM(require("readline"), 1);
112
115
  var import_node_stream = require("stream");
@@ -115,7 +118,7 @@ var import_node_stream = require("stream");
115
118
  var import_node_crypto3 = require("crypto");
116
119
 
117
120
  // ../core/src/runtime/dump.ts
118
- var import_promises12 = require("fs/promises");
121
+ var import_promises13 = require("fs/promises");
119
122
  var import_node_path13 = __toESM(require("path"), 1);
120
123
 
121
124
  // ../core/src/utils/envNaming.ts
@@ -1,5 +1,5 @@
1
- import { L as LoaderPlugin, a as ConfigEntry } from '../core-Ud1o2MBn.cjs';
2
- import { E as EnvMappingConfig } from '../envNaming-DxxqiGKN.cjs';
1
+ import { L as LoaderPlugin, a as ConfigEntry } from '../core-BW8SLnRx.cjs';
2
+ import { E as EnvMappingConfig } from '../envNaming-1rk7BR0e.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-Ud1o2MBn.js';
2
- import { E as EnvMappingConfig } from '../envNaming-CPwXl4I6.js';
1
+ import { L as LoaderPlugin, a as ConfigEntry } from '../core-BW8SLnRx.js';
2
+ import { E as EnvMappingConfig } from '../envNaming-CjL28IeH.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-UGLATJJD.js";
6
- import "../chunk-MQ4WG3K6.js";
5
+ } from "../chunk-RNTTPI5S.js";
6
+ import "../chunk-WPB4HB2K.js";
7
7
  export {
8
8
  createProcessEnvPlugin,
9
9
  processEnvEntriesFromObject,