@kitsy/cnos 1.5.1 → 1.6.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 +325 -113
- package/dist/build/index.d.cts +3 -2
- package/dist/build/index.d.ts +3 -2
- package/dist/build/index.js +13 -8
- package/dist/chunk-6FAX2VKQ.js +577 -0
- package/dist/{chunk-UWFE4JE2.js → chunk-BMAD24KC.js} +1 -1
- package/dist/{chunk-7EI3RFUE.js → chunk-JYWQFMW5.js} +1 -1
- package/dist/{chunk-F2ZAIZNH.js → chunk-MW4OVAT3.js} +1 -1
- package/dist/{chunk-CMQK2AEF.js → chunk-N32UN66E.js} +8 -8
- package/dist/{chunk-BS33AW4Y.js → chunk-S7H2UULC.js} +307 -103
- package/dist/{chunk-H53ZRQLX.js → chunk-UJBQS7CJ.js} +1 -1
- package/dist/{chunk-EJAXWFNT.js → chunk-UR7CHHNN.js} +1 -1
- package/dist/{chunk-SZKQVA2M.js → chunk-VGZREX5D.js} +1 -1
- package/dist/{chunk-5F2OFKND.js → chunk-XSUP7JKH.js} +23 -1
- package/dist/configure/index.cjs +324 -118
- 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/{envNaming-Dvm_LP2D.d.ts → envNaming-B7Mztkcf.d.ts} +1 -1
- package/dist/{envNaming-S4B-dHUx.d.cts → envNaming-gMVnPOfe.d.cts} +1 -1
- package/dist/index.cjs +698 -136
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/internal.cjs +227 -102
- package/dist/internal.d.cts +16 -28
- package/dist/internal.d.ts +16 -28
- package/dist/internal.js +11 -3
- package/dist/plugin/basic-schema.cjs +22 -15
- 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 +27 -18
- 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 +35 -26
- 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 +28 -19
- 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 +42 -33
- 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 +24 -17
- 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/{plugin-B4xwySxw.d.cts → plugin-CKrBlWGI.d.cts} +52 -3
- package/dist/{plugin-B4xwySxw.d.ts → plugin-CKrBlWGI.d.ts} +52 -3
- package/dist/runtime/index.cjs +696 -136
- package/dist/runtime/index.d.cts +7 -1
- package/dist/runtime/index.d.ts +7 -1
- package/dist/runtime/index.js +10 -10
- package/dist/{toPublicEnv-ggmphZFs.d.cts → toPublicEnv-CmBsy53P.d.cts} +1 -1
- package/dist/{toPublicEnv-CvhGAfsB.d.ts → toPublicEnv-q6VwWxXZ.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-TUMR7JA3.js +0 -234
package/dist/internal.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as LoadManifestOptions, k as LoadedManifest, N as NormalizedManifest, b as LogicalKey, l as NamespaceDefinition, m as VaultDefinition, i as NamespaceName, g as CnosRuntime,
|
|
2
|
-
export {
|
|
1
|
+
import { j as LoadManifestOptions, k as LoadedManifest, N as NormalizedManifest, b as LogicalKey, l as NamespaceDefinition, m as VaultDefinition, n as VaultAuthConfig, o as SecretVaultProvider, i as NamespaceName, p as SecretReference, g as CnosRuntime, q as ValidationSummary, R as ResolvedGraph, S as ServerProjection } from './plugin-CKrBlWGI.cjs';
|
|
2
|
+
export { r as ValidationIssue, s as WorkspaceFile } from './plugin-CKrBlWGI.cjs';
|
|
3
3
|
|
|
4
4
|
declare class CnosError extends Error {
|
|
5
5
|
constructor(message: string);
|
|
@@ -20,30 +20,6 @@ type ProjectionTarget = 'public' | 'env';
|
|
|
20
20
|
declare function getNamespaceDefinition(manifest: NormalizedManifest, namespaceOrKey: string): NamespaceDefinition;
|
|
21
21
|
declare function ensureProjectionAllowed(manifest: NormalizedManifest, key: LogicalKey, target: ProjectionTarget): void;
|
|
22
22
|
|
|
23
|
-
interface SecretReference {
|
|
24
|
-
provider: string;
|
|
25
|
-
ref: string;
|
|
26
|
-
vault?: string;
|
|
27
|
-
}
|
|
28
|
-
interface VaultAuthConfig {
|
|
29
|
-
passphrase?: string;
|
|
30
|
-
token?: string;
|
|
31
|
-
derivedKey?: Buffer;
|
|
32
|
-
method: 'passphrase' | 'environment' | 'token' | 'iam' | 'keychain';
|
|
33
|
-
config?: Record<string, unknown>;
|
|
34
|
-
}
|
|
35
|
-
interface SecretVaultProvider {
|
|
36
|
-
readonly vaultId: string;
|
|
37
|
-
readonly definition: VaultDefinition;
|
|
38
|
-
authenticate(authConfig: VaultAuthConfig): Promise<void>;
|
|
39
|
-
isAuthenticated(): boolean;
|
|
40
|
-
batchGet(refs: string[]): Promise<Map<string, string>>;
|
|
41
|
-
get(ref: string): Promise<string | undefined>;
|
|
42
|
-
set(ref: string, value: string): Promise<void>;
|
|
43
|
-
delete(ref: string): Promise<void>;
|
|
44
|
-
list(): Promise<string[]>;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
23
|
declare function resolveVaultAuth(vaultId: string, definition: VaultDefinition, processEnv?: Record<string, string | undefined>): Promise<VaultAuthConfig>;
|
|
48
24
|
|
|
49
25
|
declare function writeVaultSessionKey(vault: string, derivedKey: Buffer, processEnv?: Record<string, string | undefined>): Promise<string>;
|
|
@@ -54,7 +30,15 @@ declare function createSecretVaultProvider(vaultId: string, definition: VaultDef
|
|
|
54
30
|
|
|
55
31
|
declare function flattenObject(value: Record<string, unknown>, prefix?: string): Record<string, unknown>;
|
|
56
32
|
|
|
57
|
-
declare function resolveManifestRoot(
|
|
33
|
+
declare function resolveManifestRoot(options?: {
|
|
34
|
+
root?: string;
|
|
35
|
+
cwd?: string;
|
|
36
|
+
}): Promise<{
|
|
37
|
+
manifestRoot: string;
|
|
38
|
+
consumerRoot: string;
|
|
39
|
+
anchorPath?: string;
|
|
40
|
+
workspace?: string;
|
|
41
|
+
}>;
|
|
58
42
|
declare function resolveConfigDocumentPath(workspaceRoot: string, namespace: NamespaceName, configPath: string, profile?: string): string;
|
|
59
43
|
|
|
60
44
|
interface ResolvedVaultDefinition extends VaultDefinition {
|
|
@@ -97,8 +81,11 @@ declare function stringifyYaml(value: unknown): string;
|
|
|
97
81
|
declare function validateRuntime(runtime: CnosRuntime): Promise<ValidationSummary>;
|
|
98
82
|
|
|
99
83
|
declare const CNOS_GRAPH_ENV_VAR = "__CNOS_GRAPH__";
|
|
84
|
+
declare const CNOS_PROJECTION_ENV_VAR = "__CNOS_PROJECTION__";
|
|
100
85
|
declare const CNOS_SECRET_PAYLOAD_ENV_VAR = "__CNOS_SECRET_PAYLOAD__";
|
|
101
86
|
declare const CNOS_SESSION_KEY_ENV_VAR = "__CNOS_SESSION_KEY__";
|
|
87
|
+
declare function serializeServerProjection(projection: ServerProjection): string;
|
|
88
|
+
declare function deserializeServerProjection(source: string): ServerProjection;
|
|
102
89
|
declare function serializeRuntimeGraph(graph: ResolvedGraph): string;
|
|
103
90
|
declare function deserializeRuntimeGraph(source: string): ResolvedGraph;
|
|
104
91
|
declare function serializeSecretPayload(values: Record<string, unknown>): {
|
|
@@ -106,6 +93,7 @@ declare function serializeSecretPayload(values: Record<string, unknown>): {
|
|
|
106
93
|
sessionKey: string;
|
|
107
94
|
};
|
|
108
95
|
declare function readRuntimeGraphFromEnv(processEnv?: Record<string, string | undefined>): ResolvedGraph | undefined;
|
|
96
|
+
declare function readServerProjectionFromEnv(processEnv?: Record<string, string | undefined>): ServerProjection | undefined;
|
|
109
97
|
declare function graphRequiresSecretHydration(graph: ResolvedGraph): boolean;
|
|
110
98
|
|
|
111
99
|
interface GeneratedCodegenContent {
|
|
@@ -205,4 +193,4 @@ interface WatchTargetSet {
|
|
|
205
193
|
}
|
|
206
194
|
declare function watchFiles(runtime: CnosRuntime, root?: string): Promise<WatchTargetSet>;
|
|
207
195
|
|
|
208
|
-
export { CNOS_GRAPH_ENV_VAR, CNOS_SECRET_PAYLOAD_ENV_VAR, CNOS_SESSION_KEY_ENV_VAR, CnosAuthenticationError, CnosSecurityError, type ResolvedVaultDefinition,
|
|
196
|
+
export { CNOS_GRAPH_ENV_VAR, CNOS_PROJECTION_ENV_VAR, CNOS_SECRET_PAYLOAD_ENV_VAR, CNOS_SESSION_KEY_ENV_VAR, CnosAuthenticationError, CnosSecurityError, type ResolvedVaultDefinition, SecretReference, ValidationSummary, VaultDefinition, applyManifestMappings, clearAllVaultSessionKeys, clearVaultSessionKey, compareSchemaToGraph, createSecretVault, createSecretVaultProvider, deleteLocalSecret, deriveVaultKey, deserializeRuntimeGraph, deserializeServerProjection, detectLegacyVaultFormat, diffGraphs, ensureProjectionAllowed, flattenObject, formatDriftReport, generateCodegenContent, getNamespaceDefinition, getVaultPassphraseEnvVar, getVaultSessionKeyEnvVar, graphRequiresSecretHydration, isPassphraseEnvRef, isSecretReference, listLocalSecrets, listSecretVaults, loadManifest, parseYaml, proposeMapping, readKeychain, readLocalSecret, readRuntimeGraphFromEnv, readServerProjectionFromEnv, readVaultMetadata, removeLocalVaultFiles, resolveCodegenPaths, resolveConfigDocumentPath, resolveConfiguredVaultPassphrase, resolveManifestRoot, resolveSecretPassphrase, resolveSecretStoreRoot, resolveSecretVaultFile, resolveVaultAccessKey, resolveVaultAuth, resolveVaultDefinition, rewriteSourceFiles, scanEnvUsage, serializeRuntimeGraph, serializeSecretPayload, serializeServerProjection, stringifyYaml, validateRuntime, watchFiles, watchSchema, writeCodegenOutput, writeKeychain, writeLocalSecret, writeVaultSessionKey };
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as LoadManifestOptions, k as LoadedManifest, N as NormalizedManifest, b as LogicalKey, l as NamespaceDefinition, m as VaultDefinition, i as NamespaceName, g as CnosRuntime,
|
|
2
|
-
export {
|
|
1
|
+
import { j as LoadManifestOptions, k as LoadedManifest, N as NormalizedManifest, b as LogicalKey, l as NamespaceDefinition, m as VaultDefinition, n as VaultAuthConfig, o as SecretVaultProvider, i as NamespaceName, p as SecretReference, g as CnosRuntime, q as ValidationSummary, R as ResolvedGraph, S as ServerProjection } from './plugin-CKrBlWGI.js';
|
|
2
|
+
export { r as ValidationIssue, s as WorkspaceFile } from './plugin-CKrBlWGI.js';
|
|
3
3
|
|
|
4
4
|
declare class CnosError extends Error {
|
|
5
5
|
constructor(message: string);
|
|
@@ -20,30 +20,6 @@ type ProjectionTarget = 'public' | 'env';
|
|
|
20
20
|
declare function getNamespaceDefinition(manifest: NormalizedManifest, namespaceOrKey: string): NamespaceDefinition;
|
|
21
21
|
declare function ensureProjectionAllowed(manifest: NormalizedManifest, key: LogicalKey, target: ProjectionTarget): void;
|
|
22
22
|
|
|
23
|
-
interface SecretReference {
|
|
24
|
-
provider: string;
|
|
25
|
-
ref: string;
|
|
26
|
-
vault?: string;
|
|
27
|
-
}
|
|
28
|
-
interface VaultAuthConfig {
|
|
29
|
-
passphrase?: string;
|
|
30
|
-
token?: string;
|
|
31
|
-
derivedKey?: Buffer;
|
|
32
|
-
method: 'passphrase' | 'environment' | 'token' | 'iam' | 'keychain';
|
|
33
|
-
config?: Record<string, unknown>;
|
|
34
|
-
}
|
|
35
|
-
interface SecretVaultProvider {
|
|
36
|
-
readonly vaultId: string;
|
|
37
|
-
readonly definition: VaultDefinition;
|
|
38
|
-
authenticate(authConfig: VaultAuthConfig): Promise<void>;
|
|
39
|
-
isAuthenticated(): boolean;
|
|
40
|
-
batchGet(refs: string[]): Promise<Map<string, string>>;
|
|
41
|
-
get(ref: string): Promise<string | undefined>;
|
|
42
|
-
set(ref: string, value: string): Promise<void>;
|
|
43
|
-
delete(ref: string): Promise<void>;
|
|
44
|
-
list(): Promise<string[]>;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
23
|
declare function resolveVaultAuth(vaultId: string, definition: VaultDefinition, processEnv?: Record<string, string | undefined>): Promise<VaultAuthConfig>;
|
|
48
24
|
|
|
49
25
|
declare function writeVaultSessionKey(vault: string, derivedKey: Buffer, processEnv?: Record<string, string | undefined>): Promise<string>;
|
|
@@ -54,7 +30,15 @@ declare function createSecretVaultProvider(vaultId: string, definition: VaultDef
|
|
|
54
30
|
|
|
55
31
|
declare function flattenObject(value: Record<string, unknown>, prefix?: string): Record<string, unknown>;
|
|
56
32
|
|
|
57
|
-
declare function resolveManifestRoot(
|
|
33
|
+
declare function resolveManifestRoot(options?: {
|
|
34
|
+
root?: string;
|
|
35
|
+
cwd?: string;
|
|
36
|
+
}): Promise<{
|
|
37
|
+
manifestRoot: string;
|
|
38
|
+
consumerRoot: string;
|
|
39
|
+
anchorPath?: string;
|
|
40
|
+
workspace?: string;
|
|
41
|
+
}>;
|
|
58
42
|
declare function resolveConfigDocumentPath(workspaceRoot: string, namespace: NamespaceName, configPath: string, profile?: string): string;
|
|
59
43
|
|
|
60
44
|
interface ResolvedVaultDefinition extends VaultDefinition {
|
|
@@ -97,8 +81,11 @@ declare function stringifyYaml(value: unknown): string;
|
|
|
97
81
|
declare function validateRuntime(runtime: CnosRuntime): Promise<ValidationSummary>;
|
|
98
82
|
|
|
99
83
|
declare const CNOS_GRAPH_ENV_VAR = "__CNOS_GRAPH__";
|
|
84
|
+
declare const CNOS_PROJECTION_ENV_VAR = "__CNOS_PROJECTION__";
|
|
100
85
|
declare const CNOS_SECRET_PAYLOAD_ENV_VAR = "__CNOS_SECRET_PAYLOAD__";
|
|
101
86
|
declare const CNOS_SESSION_KEY_ENV_VAR = "__CNOS_SESSION_KEY__";
|
|
87
|
+
declare function serializeServerProjection(projection: ServerProjection): string;
|
|
88
|
+
declare function deserializeServerProjection(source: string): ServerProjection;
|
|
102
89
|
declare function serializeRuntimeGraph(graph: ResolvedGraph): string;
|
|
103
90
|
declare function deserializeRuntimeGraph(source: string): ResolvedGraph;
|
|
104
91
|
declare function serializeSecretPayload(values: Record<string, unknown>): {
|
|
@@ -106,6 +93,7 @@ declare function serializeSecretPayload(values: Record<string, unknown>): {
|
|
|
106
93
|
sessionKey: string;
|
|
107
94
|
};
|
|
108
95
|
declare function readRuntimeGraphFromEnv(processEnv?: Record<string, string | undefined>): ResolvedGraph | undefined;
|
|
96
|
+
declare function readServerProjectionFromEnv(processEnv?: Record<string, string | undefined>): ServerProjection | undefined;
|
|
109
97
|
declare function graphRequiresSecretHydration(graph: ResolvedGraph): boolean;
|
|
110
98
|
|
|
111
99
|
interface GeneratedCodegenContent {
|
|
@@ -205,4 +193,4 @@ interface WatchTargetSet {
|
|
|
205
193
|
}
|
|
206
194
|
declare function watchFiles(runtime: CnosRuntime, root?: string): Promise<WatchTargetSet>;
|
|
207
195
|
|
|
208
|
-
export { CNOS_GRAPH_ENV_VAR, CNOS_SECRET_PAYLOAD_ENV_VAR, CNOS_SESSION_KEY_ENV_VAR, CnosAuthenticationError, CnosSecurityError, type ResolvedVaultDefinition,
|
|
196
|
+
export { CNOS_GRAPH_ENV_VAR, CNOS_PROJECTION_ENV_VAR, CNOS_SECRET_PAYLOAD_ENV_VAR, CNOS_SESSION_KEY_ENV_VAR, CnosAuthenticationError, CnosSecurityError, type ResolvedVaultDefinition, SecretReference, ValidationSummary, VaultDefinition, applyManifestMappings, clearAllVaultSessionKeys, clearVaultSessionKey, compareSchemaToGraph, createSecretVault, createSecretVaultProvider, deleteLocalSecret, deriveVaultKey, deserializeRuntimeGraph, deserializeServerProjection, detectLegacyVaultFormat, diffGraphs, ensureProjectionAllowed, flattenObject, formatDriftReport, generateCodegenContent, getNamespaceDefinition, getVaultPassphraseEnvVar, getVaultSessionKeyEnvVar, graphRequiresSecretHydration, isPassphraseEnvRef, isSecretReference, listLocalSecrets, listSecretVaults, loadManifest, parseYaml, proposeMapping, readKeychain, readLocalSecret, readRuntimeGraphFromEnv, readServerProjectionFromEnv, readVaultMetadata, removeLocalVaultFiles, resolveCodegenPaths, resolveConfigDocumentPath, resolveConfiguredVaultPassphrase, resolveManifestRoot, resolveSecretPassphrase, resolveSecretStoreRoot, resolveSecretVaultFile, resolveVaultAccessKey, resolveVaultAuth, resolveVaultDefinition, rewriteSourceFiles, scanEnvUsage, serializeRuntimeGraph, serializeSecretPayload, serializeServerProjection, stringifyYaml, validateRuntime, watchFiles, watchSchema, writeCodegenOutput, writeKeychain, writeLocalSecret, writeVaultSessionKey };
|
package/dist/internal.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CNOS_GRAPH_ENV_VAR,
|
|
3
|
+
CNOS_PROJECTION_ENV_VAR,
|
|
3
4
|
CNOS_SECRET_PAYLOAD_ENV_VAR,
|
|
4
5
|
CNOS_SESSION_KEY_ENV_VAR,
|
|
5
6
|
deserializeRuntimeGraph,
|
|
7
|
+
deserializeServerProjection,
|
|
6
8
|
graphRequiresSecretHydration,
|
|
7
9
|
readRuntimeGraphFromEnv,
|
|
10
|
+
readServerProjectionFromEnv,
|
|
8
11
|
serializeRuntimeGraph,
|
|
9
|
-
serializeSecretPayload
|
|
10
|
-
|
|
12
|
+
serializeSecretPayload,
|
|
13
|
+
serializeServerProjection
|
|
14
|
+
} from "./chunk-XSUP7JKH.js";
|
|
11
15
|
import {
|
|
12
16
|
CnosAuthenticationError,
|
|
13
17
|
CnosSecurityError,
|
|
@@ -47,7 +51,7 @@ import {
|
|
|
47
51
|
writeKeychain,
|
|
48
52
|
writeLocalSecret,
|
|
49
53
|
writeVaultSessionKey
|
|
50
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-S7H2UULC.js";
|
|
51
55
|
|
|
52
56
|
// src/codegen/generateTypes.ts
|
|
53
57
|
function toPascalCase(value) {
|
|
@@ -639,6 +643,7 @@ async function watchFiles(runtime, root) {
|
|
|
639
643
|
}
|
|
640
644
|
export {
|
|
641
645
|
CNOS_GRAPH_ENV_VAR,
|
|
646
|
+
CNOS_PROJECTION_ENV_VAR,
|
|
642
647
|
CNOS_SECRET_PAYLOAD_ENV_VAR,
|
|
643
648
|
CNOS_SESSION_KEY_ENV_VAR,
|
|
644
649
|
CnosAuthenticationError,
|
|
@@ -652,6 +657,7 @@ export {
|
|
|
652
657
|
deleteLocalSecret,
|
|
653
658
|
deriveVaultKey,
|
|
654
659
|
deserializeRuntimeGraph,
|
|
660
|
+
deserializeServerProjection,
|
|
655
661
|
detectLegacyVaultFormat,
|
|
656
662
|
diffGraphs,
|
|
657
663
|
ensureProjectionAllowed,
|
|
@@ -672,6 +678,7 @@ export {
|
|
|
672
678
|
readKeychain,
|
|
673
679
|
readLocalSecret,
|
|
674
680
|
readRuntimeGraphFromEnv,
|
|
681
|
+
readServerProjectionFromEnv,
|
|
675
682
|
readVaultMetadata,
|
|
676
683
|
removeLocalVaultFiles,
|
|
677
684
|
resolveCodegenPaths,
|
|
@@ -688,6 +695,7 @@ export {
|
|
|
688
695
|
scanEnvUsage,
|
|
689
696
|
serializeRuntimeGraph,
|
|
690
697
|
serializeSecretPayload,
|
|
698
|
+
serializeServerProjection,
|
|
691
699
|
stringifyYaml,
|
|
692
700
|
validateRuntime,
|
|
693
701
|
watchFiles,
|
|
@@ -50,29 +50,33 @@ var import_node_util3 = require("util");
|
|
|
50
50
|
var execFileAsync3 = (0, import_node_util3.promisify)(import_node_child_process3.execFile);
|
|
51
51
|
|
|
52
52
|
// ../core/src/manifest/loadManifest.ts
|
|
53
|
+
var import_promises3 = require("fs/promises");
|
|
54
|
+
var import_node_path3 = __toESM(require("path"), 1);
|
|
55
|
+
|
|
56
|
+
// ../core/src/utils/path.ts
|
|
53
57
|
var import_promises2 = require("fs/promises");
|
|
58
|
+
var import_node_os = __toESM(require("os"), 1);
|
|
54
59
|
var import_node_path2 = __toESM(require("path"), 1);
|
|
55
60
|
|
|
56
|
-
// ../core/src/
|
|
61
|
+
// ../core/src/discovery/findCnosrc.ts
|
|
57
62
|
var import_promises = require("fs/promises");
|
|
58
|
-
var import_node_os = __toESM(require("os"), 1);
|
|
59
63
|
var import_node_path = __toESM(require("path"), 1);
|
|
60
64
|
|
|
61
65
|
// ../core/src/utils/yaml.ts
|
|
62
66
|
var import_yaml = require("yaml");
|
|
63
67
|
|
|
64
68
|
// ../core/src/manifest/loadWorkspaceFile.ts
|
|
65
|
-
var import_promises3 = require("fs/promises");
|
|
66
|
-
var import_node_path3 = __toESM(require("path"), 1);
|
|
67
|
-
|
|
68
|
-
// ../core/src/profiles/expandProfileChain.ts
|
|
69
69
|
var import_promises4 = require("fs/promises");
|
|
70
70
|
var import_node_path4 = __toESM(require("path"), 1);
|
|
71
71
|
|
|
72
|
-
// ../core/src/
|
|
72
|
+
// ../core/src/profiles/expandProfileChain.ts
|
|
73
73
|
var import_promises5 = require("fs/promises");
|
|
74
74
|
var import_node_path5 = __toESM(require("path"), 1);
|
|
75
75
|
|
|
76
|
+
// ../core/src/workspaces/resolveWorkspaceContext.ts
|
|
77
|
+
var import_promises6 = require("fs/promises");
|
|
78
|
+
var import_node_path6 = __toESM(require("path"), 1);
|
|
79
|
+
|
|
76
80
|
// ../core/src/validation/basicSchema.ts
|
|
77
81
|
function describeValueType(value) {
|
|
78
82
|
if (Array.isArray(value)) {
|
|
@@ -221,25 +225,28 @@ function applySchemaRules(graph, schema) {
|
|
|
221
225
|
}
|
|
222
226
|
|
|
223
227
|
// ../core/src/secrets/auditLog.ts
|
|
224
|
-
var
|
|
225
|
-
var
|
|
228
|
+
var import_promises9 = require("fs/promises");
|
|
229
|
+
var import_node_path9 = __toESM(require("path"), 1);
|
|
226
230
|
|
|
227
231
|
// ../core/src/utils/secretStore.ts
|
|
228
232
|
var import_node_crypto = require("crypto");
|
|
229
|
-
var
|
|
230
|
-
var
|
|
233
|
+
var import_promises8 = require("fs/promises");
|
|
234
|
+
var import_node_path8 = __toESM(require("path"), 1);
|
|
231
235
|
|
|
232
236
|
// ../core/src/secrets/sessionStore.ts
|
|
233
|
-
var
|
|
234
|
-
var
|
|
237
|
+
var import_promises7 = require("fs/promises");
|
|
238
|
+
var import_node_path7 = __toESM(require("path"), 1);
|
|
235
239
|
|
|
236
240
|
// ../core/src/secrets/prompt.ts
|
|
237
241
|
var import_node_readline = __toESM(require("readline"), 1);
|
|
238
242
|
var import_node_stream = require("stream");
|
|
239
243
|
|
|
244
|
+
// ../core/src/runtime/toServerProjection.ts
|
|
245
|
+
var import_node_crypto2 = require("crypto");
|
|
246
|
+
|
|
240
247
|
// ../core/src/runtime/dump.ts
|
|
241
|
-
var
|
|
242
|
-
var
|
|
248
|
+
var import_promises10 = require("fs/promises");
|
|
249
|
+
var import_node_path10 = __toESM(require("path"), 1);
|
|
243
250
|
|
|
244
251
|
// ../../plugins/basic-schema/src/index.ts
|
|
245
252
|
function createBasicSchemaPlugin() {
|
package/dist/plugin/cli-args.cjs
CHANGED
|
@@ -52,52 +52,61 @@ var import_node_util3 = require("util");
|
|
|
52
52
|
var execFileAsync3 = (0, import_node_util3.promisify)(import_node_child_process3.execFile);
|
|
53
53
|
|
|
54
54
|
// ../core/src/manifest/loadManifest.ts
|
|
55
|
+
var import_promises3 = require("fs/promises");
|
|
56
|
+
var import_node_path3 = __toESM(require("path"), 1);
|
|
57
|
+
|
|
58
|
+
// ../core/src/utils/path.ts
|
|
55
59
|
var import_promises2 = require("fs/promises");
|
|
60
|
+
var import_node_os = __toESM(require("os"), 1);
|
|
56
61
|
var import_node_path2 = __toESM(require("path"), 1);
|
|
57
62
|
|
|
58
|
-
// ../core/src/
|
|
63
|
+
// ../core/src/discovery/findCnosrc.ts
|
|
59
64
|
var import_promises = require("fs/promises");
|
|
60
|
-
var import_node_os = __toESM(require("os"), 1);
|
|
61
65
|
var import_node_path = __toESM(require("path"), 1);
|
|
62
|
-
function joinConfigPath(...parts) {
|
|
63
|
-
return parts.flatMap((part) => part.split(".")).map((part) => part.trim()).filter(Boolean).join(".");
|
|
64
|
-
}
|
|
65
66
|
|
|
66
67
|
// ../core/src/utils/yaml.ts
|
|
67
68
|
var import_yaml = require("yaml");
|
|
68
69
|
|
|
69
|
-
// ../core/src/
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
// ../core/src/utils/path.ts
|
|
71
|
+
function joinConfigPath(...parts) {
|
|
72
|
+
return parts.flatMap((part) => part.split(".")).map((part) => part.trim()).filter(Boolean).join(".");
|
|
73
|
+
}
|
|
72
74
|
|
|
73
|
-
// ../core/src/
|
|
75
|
+
// ../core/src/manifest/loadWorkspaceFile.ts
|
|
74
76
|
var import_promises4 = require("fs/promises");
|
|
75
77
|
var import_node_path4 = __toESM(require("path"), 1);
|
|
76
78
|
|
|
77
|
-
// ../core/src/
|
|
79
|
+
// ../core/src/profiles/expandProfileChain.ts
|
|
78
80
|
var import_promises5 = require("fs/promises");
|
|
79
81
|
var import_node_path5 = __toESM(require("path"), 1);
|
|
80
82
|
|
|
83
|
+
// ../core/src/workspaces/resolveWorkspaceContext.ts
|
|
84
|
+
var import_promises6 = require("fs/promises");
|
|
85
|
+
var import_node_path6 = __toESM(require("path"), 1);
|
|
86
|
+
|
|
81
87
|
// ../core/src/secrets/auditLog.ts
|
|
82
|
-
var
|
|
83
|
-
var
|
|
88
|
+
var import_promises9 = require("fs/promises");
|
|
89
|
+
var import_node_path9 = __toESM(require("path"), 1);
|
|
84
90
|
|
|
85
91
|
// ../core/src/utils/secretStore.ts
|
|
86
92
|
var import_node_crypto = require("crypto");
|
|
87
|
-
var
|
|
88
|
-
var
|
|
93
|
+
var import_promises8 = require("fs/promises");
|
|
94
|
+
var import_node_path8 = __toESM(require("path"), 1);
|
|
89
95
|
|
|
90
96
|
// ../core/src/secrets/sessionStore.ts
|
|
91
|
-
var
|
|
92
|
-
var
|
|
97
|
+
var import_promises7 = require("fs/promises");
|
|
98
|
+
var import_node_path7 = __toESM(require("path"), 1);
|
|
93
99
|
|
|
94
100
|
// ../core/src/secrets/prompt.ts
|
|
95
101
|
var import_node_readline = __toESM(require("readline"), 1);
|
|
96
102
|
var import_node_stream = require("stream");
|
|
97
103
|
|
|
104
|
+
// ../core/src/runtime/toServerProjection.ts
|
|
105
|
+
var import_node_crypto2 = require("crypto");
|
|
106
|
+
|
|
98
107
|
// ../core/src/runtime/dump.ts
|
|
99
|
-
var
|
|
100
|
-
var
|
|
108
|
+
var import_promises10 = require("fs/promises");
|
|
109
|
+
var import_node_path10 = __toESM(require("path"), 1);
|
|
101
110
|
|
|
102
111
|
// ../../plugins/cli-args/src/index.ts
|
|
103
112
|
var CLI_ARGS_PLUGIN_ID = "@kitsy/cnos/plugins/cli-args";
|
package/dist/plugin/cli-args.js
CHANGED
package/dist/plugin/dotenv.cjs
CHANGED
|
@@ -37,8 +37,8 @@ __export(dotenv_exports, {
|
|
|
37
37
|
module.exports = __toCommonJS(dotenv_exports);
|
|
38
38
|
|
|
39
39
|
// ../../plugins/dotenv/src/index.ts
|
|
40
|
-
var
|
|
41
|
-
var
|
|
40
|
+
var import_promises11 = require("fs/promises");
|
|
41
|
+
var import_node_path11 = __toESM(require("path"), 1);
|
|
42
42
|
|
|
43
43
|
// ../core/src/keychain/linux.ts
|
|
44
44
|
var import_node_child_process = require("child_process");
|
|
@@ -56,13 +56,22 @@ var import_node_util3 = require("util");
|
|
|
56
56
|
var execFileAsync3 = (0, import_node_util3.promisify)(import_node_child_process3.execFile);
|
|
57
57
|
|
|
58
58
|
// ../core/src/manifest/loadManifest.ts
|
|
59
|
+
var import_promises3 = require("fs/promises");
|
|
60
|
+
var import_node_path3 = __toESM(require("path"), 1);
|
|
61
|
+
|
|
62
|
+
// ../core/src/utils/path.ts
|
|
59
63
|
var import_promises2 = require("fs/promises");
|
|
64
|
+
var import_node_os = __toESM(require("os"), 1);
|
|
60
65
|
var import_node_path2 = __toESM(require("path"), 1);
|
|
61
66
|
|
|
62
|
-
// ../core/src/
|
|
67
|
+
// ../core/src/discovery/findCnosrc.ts
|
|
63
68
|
var import_promises = require("fs/promises");
|
|
64
|
-
var import_node_os = __toESM(require("os"), 1);
|
|
65
69
|
var import_node_path = __toESM(require("path"), 1);
|
|
70
|
+
|
|
71
|
+
// ../core/src/utils/yaml.ts
|
|
72
|
+
var import_yaml = require("yaml");
|
|
73
|
+
|
|
74
|
+
// ../core/src/utils/path.ts
|
|
66
75
|
function interpolatePathTemplate(template, tokens) {
|
|
67
76
|
return Object.entries(tokens).reduce(
|
|
68
77
|
(result, [token, value]) => result.replaceAll(`{${token}}`, value),
|
|
@@ -83,47 +92,47 @@ function stripWorkspaceTemplatePrefix(template) {
|
|
|
83
92
|
function resolveWorkspaceScopedPath(workspaceRoot, template, tokens) {
|
|
84
93
|
const relativeTemplate = stripWorkspaceTemplatePrefix(template);
|
|
85
94
|
const interpolated = interpolatePathTemplate(relativeTemplate, tokens);
|
|
86
|
-
return
|
|
95
|
+
return import_node_path2.default.resolve(workspaceRoot, interpolated);
|
|
87
96
|
}
|
|
88
97
|
function toPortablePath(targetPath) {
|
|
89
98
|
return targetPath.replace(/\\/g, "/");
|
|
90
99
|
}
|
|
91
100
|
|
|
92
|
-
// ../core/src/utils/yaml.ts
|
|
93
|
-
var import_yaml = require("yaml");
|
|
94
|
-
|
|
95
101
|
// ../core/src/manifest/loadWorkspaceFile.ts
|
|
96
|
-
var import_promises3 = require("fs/promises");
|
|
97
|
-
var import_node_path3 = __toESM(require("path"), 1);
|
|
98
|
-
|
|
99
|
-
// ../core/src/profiles/expandProfileChain.ts
|
|
100
102
|
var import_promises4 = require("fs/promises");
|
|
101
103
|
var import_node_path4 = __toESM(require("path"), 1);
|
|
102
104
|
|
|
103
|
-
// ../core/src/
|
|
105
|
+
// ../core/src/profiles/expandProfileChain.ts
|
|
104
106
|
var import_promises5 = require("fs/promises");
|
|
105
107
|
var import_node_path5 = __toESM(require("path"), 1);
|
|
106
108
|
|
|
109
|
+
// ../core/src/workspaces/resolveWorkspaceContext.ts
|
|
110
|
+
var import_promises6 = require("fs/promises");
|
|
111
|
+
var import_node_path6 = __toESM(require("path"), 1);
|
|
112
|
+
|
|
107
113
|
// ../core/src/secrets/auditLog.ts
|
|
108
|
-
var
|
|
109
|
-
var
|
|
114
|
+
var import_promises9 = require("fs/promises");
|
|
115
|
+
var import_node_path9 = __toESM(require("path"), 1);
|
|
110
116
|
|
|
111
117
|
// ../core/src/utils/secretStore.ts
|
|
112
118
|
var import_node_crypto = require("crypto");
|
|
113
|
-
var
|
|
114
|
-
var
|
|
119
|
+
var import_promises8 = require("fs/promises");
|
|
120
|
+
var import_node_path8 = __toESM(require("path"), 1);
|
|
115
121
|
|
|
116
122
|
// ../core/src/secrets/sessionStore.ts
|
|
117
|
-
var
|
|
118
|
-
var
|
|
123
|
+
var import_promises7 = require("fs/promises");
|
|
124
|
+
var import_node_path7 = __toESM(require("path"), 1);
|
|
119
125
|
|
|
120
126
|
// ../core/src/secrets/prompt.ts
|
|
121
127
|
var import_node_readline = __toESM(require("readline"), 1);
|
|
122
128
|
var import_node_stream = require("stream");
|
|
123
129
|
|
|
130
|
+
// ../core/src/runtime/toServerProjection.ts
|
|
131
|
+
var import_node_crypto2 = require("crypto");
|
|
132
|
+
|
|
124
133
|
// ../core/src/runtime/dump.ts
|
|
125
|
-
var
|
|
126
|
-
var
|
|
134
|
+
var import_promises10 = require("fs/promises");
|
|
135
|
+
var import_node_path10 = __toESM(require("path"), 1);
|
|
127
136
|
|
|
128
137
|
// ../core/src/utils/envNaming.ts
|
|
129
138
|
function normalizeMappingConfig(config = {}) {
|
|
@@ -132,8 +141,8 @@ function normalizeMappingConfig(config = {}) {
|
|
|
132
141
|
explicit: config.explicit ?? {}
|
|
133
142
|
};
|
|
134
143
|
}
|
|
135
|
-
function fromScreamingSnake(
|
|
136
|
-
return
|
|
144
|
+
function fromScreamingSnake(path12) {
|
|
145
|
+
return path12.split("_").map((segment) => segment.trim().toLowerCase()).filter(Boolean).join(".");
|
|
137
146
|
}
|
|
138
147
|
function envVarToLogicalKey(envVar, config = {}) {
|
|
139
148
|
const normalized = normalizeMappingConfig(config);
|
|
@@ -214,7 +223,7 @@ function dotenvEntriesFromObject(values, mapping = {}, originFile, workspaceId =
|
|
|
214
223
|
}
|
|
215
224
|
async function readIfPresent(filePath) {
|
|
216
225
|
try {
|
|
217
|
-
return await (0,
|
|
226
|
+
return await (0, import_promises11.readFile)(filePath, "utf8");
|
|
218
227
|
} catch {
|
|
219
228
|
return void 0;
|
|
220
229
|
}
|
|
@@ -233,7 +242,7 @@ function createDotenvPlugin() {
|
|
|
233
242
|
workspace: workspaceRoot.workspaceId
|
|
234
243
|
});
|
|
235
244
|
for (const fileName of fileNames) {
|
|
236
|
-
const absolutePath =
|
|
245
|
+
const absolutePath = import_node_path11.default.join(envRoot, fileName);
|
|
237
246
|
const document = await readIfPresent(absolutePath);
|
|
238
247
|
if (!document) {
|
|
239
248
|
continue;
|
|
@@ -242,7 +251,7 @@ function createDotenvPlugin() {
|
|
|
242
251
|
...dotenvEntriesFromObject(
|
|
243
252
|
parseDotenv(document),
|
|
244
253
|
config.envMapping,
|
|
245
|
-
toPortablePath(
|
|
254
|
+
toPortablePath(import_node_path11.default.relative(import_node_path11.default.dirname(context.manifestRoot), absolutePath)),
|
|
246
255
|
workspaceRoot.workspaceId
|
|
247
256
|
)
|
|
248
257
|
);
|
package/dist/plugin/dotenv.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LoaderPlugin, a as ConfigEntry } from '../plugin-
|
|
2
|
-
import { E as EnvMappingConfig } from '../envNaming-
|
|
1
|
+
import { L as LoaderPlugin, a as ConfigEntry } from '../plugin-CKrBlWGI.cjs';
|
|
2
|
+
import { E as EnvMappingConfig } from '../envNaming-gMVnPOfe.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[];
|
package/dist/plugin/dotenv.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LoaderPlugin, a as ConfigEntry } from '../plugin-
|
|
2
|
-
import { E as EnvMappingConfig } from '../envNaming-
|
|
1
|
+
import { L as LoaderPlugin, a as ConfigEntry } from '../plugin-CKrBlWGI.js';
|
|
2
|
+
import { E as EnvMappingConfig } from '../envNaming-B7Mztkcf.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[];
|
package/dist/plugin/dotenv.js
CHANGED