@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.
- package/dist/build/index.cjs +331 -63
- package/dist/build/index.d.cts +1 -1
- package/dist/build/index.d.ts +1 -1
- package/dist/build/index.js +13 -15
- package/dist/{chunk-A5U7EZCJ.js → chunk-2DMCB3PK.js} +1 -1
- package/dist/{chunk-RTHKUGJV.js → chunk-5JGNRADB.js} +1 -1
- package/dist/{chunk-3EZGPQCE.js → chunk-DPC2BV3S.js} +1 -1
- package/dist/{chunk-FHXLOWAB.js → chunk-KJ57PF47.js} +1 -1
- package/dist/{chunk-CSA4L64V.js → chunk-NFGPS7VJ.js} +10 -10
- package/dist/{chunk-ESBHCFC6.js → chunk-NU25VFA2.js} +1 -1
- package/dist/{chunk-UGLATJJD.js → chunk-RNTTPI5S.js} +1 -1
- package/dist/{chunk-UKNL2Y4N.js → chunk-T3E57MSQ.js} +1 -1
- package/dist/{chunk-MQ4WG3K6.js → chunk-WPB4HB2K.js} +320 -49
- package/dist/{chunk-EIK7OUFP.js → chunk-XGK6DXQL.js} +157 -37
- package/dist/configure/index.cjs +329 -59
- package/dist/configure/index.d.cts +3 -3
- package/dist/configure/index.d.ts +3 -3
- package/dist/configure/index.js +8 -8
- package/dist/{core-Ud1o2MBn.d.cts → core-BW8SLnRx.d.cts} +34 -2
- package/dist/{core-Ud1o2MBn.d.ts → core-BW8SLnRx.d.ts} +34 -2
- package/dist/{envNaming-DxxqiGKN.d.cts → envNaming-1rk7BR0e.d.cts} +1 -1
- package/dist/{envNaming-CPwXl4I6.d.ts → envNaming-CjL28IeH.d.ts} +1 -1
- package/dist/index.cjs +480 -91
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -10
- package/dist/internal.cjs +89 -23
- package/dist/internal.d.cts +3 -3
- package/dist/internal.d.ts +3 -3
- package/dist/internal.js +2 -2
- package/dist/plugin/basic-schema.cjs +4 -1
- package/dist/plugin/basic-schema.d.cts +1 -1
- package/dist/plugin/basic-schema.d.ts +1 -1
- package/dist/plugin/basic-schema.js +2 -2
- package/dist/plugin/cli-args.cjs +4 -1
- package/dist/plugin/cli-args.d.cts +1 -1
- package/dist/plugin/cli-args.d.ts +1 -1
- package/dist/plugin/cli-args.js +2 -2
- package/dist/plugin/dotenv.cjs +6 -3
- package/dist/plugin/dotenv.d.cts +2 -2
- package/dist/plugin/dotenv.d.ts +2 -2
- package/dist/plugin/dotenv.js +2 -2
- package/dist/plugin/env-export.cjs +5 -2
- package/dist/plugin/env-export.d.cts +2 -2
- package/dist/plugin/env-export.d.ts +2 -2
- package/dist/plugin/env-export.js +2 -2
- package/dist/plugin/filesystem.cjs +13 -10
- package/dist/plugin/filesystem.d.cts +1 -1
- package/dist/plugin/filesystem.d.ts +1 -1
- package/dist/plugin/filesystem.js +2 -2
- package/dist/plugin/process-env.cjs +4 -1
- package/dist/plugin/process-env.d.cts +2 -2
- package/dist/plugin/process-env.d.ts +2 -2
- package/dist/plugin/process-env.js +2 -2
- package/dist/runtime/index.cjs +480 -91
- package/dist/runtime/index.d.cts +13 -6
- package/dist/runtime/index.d.ts +13 -6
- package/dist/runtime/index.js +10 -10
- package/dist/{toPublicEnv-fUZMRUOz.d.cts → toPublicEnv-CZzpvhGg.d.cts} +1 -1
- package/dist/{toPublicEnv-C9wPSpRo.d.ts → toPublicEnv-CmydGcxg.d.ts} +1 -1
- 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
|
|
43
|
+
var import_promises15 = require("fs/promises");
|
|
44
44
|
|
|
45
45
|
// ../../plugins/filesystem/src/helpers.ts
|
|
46
|
-
var
|
|
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
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
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,
|
|
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,
|
|
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-
|
|
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-
|
|
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-
|
|
9
|
-
import "../chunk-
|
|
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
|
|
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-
|
|
2
|
-
import { E as EnvMappingConfig } from '../envNaming-
|
|
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-
|
|
2
|
-
import { E as EnvMappingConfig } from '../envNaming-
|
|
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-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-RNTTPI5S.js";
|
|
6
|
+
import "../chunk-WPB4HB2K.js";
|
|
7
7
|
export {
|
|
8
8
|
createProcessEnvPlugin,
|
|
9
9
|
processEnvEntriesFromObject,
|