@kitsy/cnos 1.6.0 → 1.7.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 +1332 -156
- package/dist/build/index.d.cts +1 -1
- package/dist/build/index.d.ts +1 -1
- package/dist/build/index.js +36 -14
- package/dist/{chunk-JYWQFMW5.js → chunk-2DGT7N7E.js} +1 -1
- package/dist/{chunk-S7H2UULC.js → chunk-2TL42I6M.js} +1323 -139
- package/dist/{chunk-MW4OVAT3.js → chunk-5KIQCYFH.js} +1 -1
- package/dist/{chunk-UOKVLCFL.js → chunk-CV3SLBYZ.js} +10 -10
- package/dist/{chunk-XSUP7JKH.js → chunk-GHGJFRDL.js} +6 -2
- package/dist/{chunk-BMAD24KC.js → chunk-OA7FQGAG.js} +1 -1
- package/dist/{chunk-QU5CXL47.js → chunk-PFT56ID2.js} +195 -28
- package/dist/{chunk-VGZREX5D.js → chunk-RYIARE4M.js} +1 -1
- package/dist/{chunk-UR7CHHNN.js → chunk-TT4NV56Z.js} +3 -2
- package/dist/{chunk-UJBQS7CJ.js → chunk-UL63DFLS.js} +1 -1
- package/dist/configure/index.cjs +1309 -155
- 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/{plugin-CKrBlWGI.d.cts → core-BJ8xewez.d.cts} +142 -60
- package/dist/{plugin-CKrBlWGI.d.ts → core-BJ8xewez.d.ts} +142 -60
- package/dist/{envNaming-B7Mztkcf.d.ts → envNaming-BRyiuPoI.d.ts} +1 -1
- package/dist/{envNaming-gMVnPOfe.d.cts → envNaming-rx71gpi0.d.cts} +1 -1
- package/dist/index.cjs +1548 -227
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/internal.cjs +831 -122
- package/dist/internal.d.cts +56 -3
- package/dist/internal.d.ts +56 -3
- package/dist/internal.js +30 -3
- package/dist/plugin/basic-schema.cjs +49 -23
- 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 +38 -23
- 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 +46 -31
- 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 +56 -27
- 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 +61 -39
- 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 +40 -25
- 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 +1548 -227
- package/dist/runtime/index.d.cts +3 -1
- package/dist/runtime/index.d.ts +3 -1
- package/dist/runtime/index.js +10 -10
- package/dist/toPublicEnv-CCSgdvI9.d.ts +13 -0
- package/dist/toPublicEnv-ivRtLjcw.d.cts +13 -0
- package/package.json +1 -1
- package/dist/toPublicEnv-CmBsy53P.d.cts +0 -7
- package/dist/toPublicEnv-q6VwWxXZ.d.ts +0 -7
package/dist/internal.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
export {
|
|
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-BJ8xewez.cjs';
|
|
2
|
+
export { l as RuntimeProvider, x as ValidationIssue, y as WorkspaceFile } from './core-BJ8xewez.cjs';
|
|
3
3
|
|
|
4
4
|
declare class CnosError extends Error {
|
|
5
5
|
constructor(message: string);
|
|
@@ -11,6 +11,13 @@ declare class CnosAuthenticationError extends CnosError {
|
|
|
11
11
|
constructor(message: string);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
declare function isDerivedValue(value: unknown): value is DerivedValue;
|
|
15
|
+
declare function parseDerivation(value: DerivedValue): ParsedDerivation;
|
|
16
|
+
|
|
17
|
+
declare function validateDerivedTargetNamespace(manifest: NormalizedManifest, namespace: string): void;
|
|
18
|
+
declare function validateParsedDerivation(manifest: NormalizedManifest, parsed: ParsedDerivation): void;
|
|
19
|
+
declare function normalizeDerivedValue(templateOrExpr: string, expr?: boolean): DerivedValue;
|
|
20
|
+
|
|
14
21
|
declare function readKeychain(entry: string): Promise<string | undefined>;
|
|
15
22
|
declare function writeKeychain(entry: string, value: string): Promise<void>;
|
|
16
23
|
|
|
@@ -28,14 +35,60 @@ declare function clearAllVaultSessionKeys(processEnv?: Record<string, string | u
|
|
|
28
35
|
|
|
29
36
|
declare function createSecretVaultProvider(vaultId: string, definition: VaultDefinition, processEnv?: Record<string, string | undefined>): SecretVaultProvider;
|
|
30
37
|
|
|
38
|
+
interface ParsedGitUri {
|
|
39
|
+
uri: string;
|
|
40
|
+
cloneUrl: string;
|
|
41
|
+
ref: string;
|
|
42
|
+
subpath: string;
|
|
43
|
+
transport: 'https' | 'ssh' | 'file' | 'custom';
|
|
44
|
+
}
|
|
45
|
+
declare function parseGitUri(uri: string): ParsedGitUri;
|
|
46
|
+
|
|
47
|
+
interface RemoteRootCacheMetadata {
|
|
48
|
+
uri: string;
|
|
49
|
+
cloneUrl: string;
|
|
50
|
+
ref: string;
|
|
51
|
+
subpath: string;
|
|
52
|
+
resolvedCommit: string;
|
|
53
|
+
cachedAt: string;
|
|
54
|
+
isImmutable: boolean;
|
|
55
|
+
}
|
|
56
|
+
declare function readRemoteRootCacheMetadata(metaPath: string): Promise<RemoteRootCacheMetadata | undefined>;
|
|
57
|
+
declare function writeRemoteRootCacheMetadata(metaPath: string, metadata: RemoteRootCacheMetadata): Promise<void>;
|
|
58
|
+
|
|
59
|
+
type RemoteRootCacheMode = 'runtime' | 'build' | 'dev';
|
|
60
|
+
declare function isImmutableGitRef(ref: string): boolean;
|
|
61
|
+
|
|
62
|
+
declare function resolveRootUri(rootUri: string, cnosrcDir: string, options?: {
|
|
63
|
+
processEnv?: Record<string, string | undefined>;
|
|
64
|
+
cacheMode?: RemoteRootCacheMode;
|
|
65
|
+
cacheTtlSeconds?: number;
|
|
66
|
+
forceRefresh?: boolean;
|
|
67
|
+
}): Promise<ResolvedRoot>;
|
|
68
|
+
|
|
69
|
+
interface RemoteRootCachePaths {
|
|
70
|
+
cacheRoot: string;
|
|
71
|
+
cacheDir: string;
|
|
72
|
+
repoDir: string;
|
|
73
|
+
metaPath: string;
|
|
74
|
+
}
|
|
75
|
+
declare function resolveCnosCacheRoot(processEnv?: Record<string, string | undefined>): string;
|
|
76
|
+
declare function createRemoteRootCacheKey(uri: string): string;
|
|
77
|
+
declare function resolveRemoteRootCachePaths(uri: string, processEnv?: Record<string, string | undefined>): RemoteRootCachePaths;
|
|
78
|
+
|
|
31
79
|
declare function flattenObject(value: Record<string, unknown>, prefix?: string): Record<string, unknown>;
|
|
32
80
|
|
|
33
81
|
declare function resolveManifestRoot(options?: {
|
|
34
82
|
root?: string;
|
|
35
83
|
cwd?: string;
|
|
84
|
+
processEnv?: Record<string, string | undefined>;
|
|
85
|
+
cacheMode?: 'runtime' | 'build' | 'dev';
|
|
86
|
+
cacheTtlSeconds?: number;
|
|
87
|
+
forceRefresh?: boolean;
|
|
36
88
|
}): Promise<{
|
|
37
89
|
manifestRoot: string;
|
|
38
90
|
consumerRoot: string;
|
|
91
|
+
rootResolution: RootResolution;
|
|
39
92
|
anchorPath?: string;
|
|
40
93
|
workspace?: string;
|
|
41
94
|
}>;
|
|
@@ -193,4 +246,4 @@ interface WatchTargetSet {
|
|
|
193
246
|
}
|
|
194
247
|
declare function watchFiles(runtime: CnosRuntime, root?: string): Promise<WatchTargetSet>;
|
|
195
248
|
|
|
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 };
|
|
249
|
+
export { CNOS_GRAPH_ENV_VAR, CNOS_PROJECTION_ENV_VAR, CNOS_SECRET_PAYLOAD_ENV_VAR, CNOS_SESSION_KEY_ENV_VAR, CnosAuthenticationError, CnosSecurityError, DerivedValue, ParsedDerivation, type RemoteRootCacheMetadata, type ResolvedVaultDefinition, RootResolution, SecretReference, ValidationSummary, VaultDefinition, applyManifestMappings, clearAllVaultSessionKeys, clearVaultSessionKey, compareSchemaToGraph, createRemoteRootCacheKey, createSecretVault, createSecretVaultProvider, deleteLocalSecret, deriveVaultKey, deserializeRuntimeGraph, deserializeServerProjection, detectLegacyVaultFormat, diffGraphs, ensureProjectionAllowed, flattenObject, formatDriftReport, generateCodegenContent, getNamespaceDefinition, getVaultPassphraseEnvVar, getVaultSessionKeyEnvVar, graphRequiresSecretHydration, isDerivedValue, isImmutableGitRef, isPassphraseEnvRef, isSecretReference, listLocalSecrets, listSecretVaults, loadManifest, normalizeDerivedValue, parseDerivation, parseGitUri, parseYaml, proposeMapping, readKeychain, readLocalSecret, readRemoteRootCacheMetadata, readRuntimeGraphFromEnv, readServerProjectionFromEnv, readVaultMetadata, removeLocalVaultFiles, resolveCnosCacheRoot, resolveCodegenPaths, resolveConfigDocumentPath, resolveConfiguredVaultPassphrase, resolveManifestRoot, resolveRemoteRootCachePaths, resolveRootUri, resolveSecretPassphrase, resolveSecretStoreRoot, resolveSecretVaultFile, resolveVaultAccessKey, resolveVaultAuth, resolveVaultDefinition, rewriteSourceFiles, scanEnvUsage, serializeRuntimeGraph, serializeSecretPayload, serializeServerProjection, stringifyYaml, validateDerivedTargetNamespace, validateParsedDerivation, validateRuntime, watchFiles, watchSchema, writeCodegenOutput, writeKeychain, writeLocalSecret, writeRemoteRootCacheMetadata, writeVaultSessionKey };
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
export {
|
|
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-BJ8xewez.js';
|
|
2
|
+
export { l as RuntimeProvider, x as ValidationIssue, y as WorkspaceFile } from './core-BJ8xewez.js';
|
|
3
3
|
|
|
4
4
|
declare class CnosError extends Error {
|
|
5
5
|
constructor(message: string);
|
|
@@ -11,6 +11,13 @@ declare class CnosAuthenticationError extends CnosError {
|
|
|
11
11
|
constructor(message: string);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
declare function isDerivedValue(value: unknown): value is DerivedValue;
|
|
15
|
+
declare function parseDerivation(value: DerivedValue): ParsedDerivation;
|
|
16
|
+
|
|
17
|
+
declare function validateDerivedTargetNamespace(manifest: NormalizedManifest, namespace: string): void;
|
|
18
|
+
declare function validateParsedDerivation(manifest: NormalizedManifest, parsed: ParsedDerivation): void;
|
|
19
|
+
declare function normalizeDerivedValue(templateOrExpr: string, expr?: boolean): DerivedValue;
|
|
20
|
+
|
|
14
21
|
declare function readKeychain(entry: string): Promise<string | undefined>;
|
|
15
22
|
declare function writeKeychain(entry: string, value: string): Promise<void>;
|
|
16
23
|
|
|
@@ -28,14 +35,60 @@ declare function clearAllVaultSessionKeys(processEnv?: Record<string, string | u
|
|
|
28
35
|
|
|
29
36
|
declare function createSecretVaultProvider(vaultId: string, definition: VaultDefinition, processEnv?: Record<string, string | undefined>): SecretVaultProvider;
|
|
30
37
|
|
|
38
|
+
interface ParsedGitUri {
|
|
39
|
+
uri: string;
|
|
40
|
+
cloneUrl: string;
|
|
41
|
+
ref: string;
|
|
42
|
+
subpath: string;
|
|
43
|
+
transport: 'https' | 'ssh' | 'file' | 'custom';
|
|
44
|
+
}
|
|
45
|
+
declare function parseGitUri(uri: string): ParsedGitUri;
|
|
46
|
+
|
|
47
|
+
interface RemoteRootCacheMetadata {
|
|
48
|
+
uri: string;
|
|
49
|
+
cloneUrl: string;
|
|
50
|
+
ref: string;
|
|
51
|
+
subpath: string;
|
|
52
|
+
resolvedCommit: string;
|
|
53
|
+
cachedAt: string;
|
|
54
|
+
isImmutable: boolean;
|
|
55
|
+
}
|
|
56
|
+
declare function readRemoteRootCacheMetadata(metaPath: string): Promise<RemoteRootCacheMetadata | undefined>;
|
|
57
|
+
declare function writeRemoteRootCacheMetadata(metaPath: string, metadata: RemoteRootCacheMetadata): Promise<void>;
|
|
58
|
+
|
|
59
|
+
type RemoteRootCacheMode = 'runtime' | 'build' | 'dev';
|
|
60
|
+
declare function isImmutableGitRef(ref: string): boolean;
|
|
61
|
+
|
|
62
|
+
declare function resolveRootUri(rootUri: string, cnosrcDir: string, options?: {
|
|
63
|
+
processEnv?: Record<string, string | undefined>;
|
|
64
|
+
cacheMode?: RemoteRootCacheMode;
|
|
65
|
+
cacheTtlSeconds?: number;
|
|
66
|
+
forceRefresh?: boolean;
|
|
67
|
+
}): Promise<ResolvedRoot>;
|
|
68
|
+
|
|
69
|
+
interface RemoteRootCachePaths {
|
|
70
|
+
cacheRoot: string;
|
|
71
|
+
cacheDir: string;
|
|
72
|
+
repoDir: string;
|
|
73
|
+
metaPath: string;
|
|
74
|
+
}
|
|
75
|
+
declare function resolveCnosCacheRoot(processEnv?: Record<string, string | undefined>): string;
|
|
76
|
+
declare function createRemoteRootCacheKey(uri: string): string;
|
|
77
|
+
declare function resolveRemoteRootCachePaths(uri: string, processEnv?: Record<string, string | undefined>): RemoteRootCachePaths;
|
|
78
|
+
|
|
31
79
|
declare function flattenObject(value: Record<string, unknown>, prefix?: string): Record<string, unknown>;
|
|
32
80
|
|
|
33
81
|
declare function resolveManifestRoot(options?: {
|
|
34
82
|
root?: string;
|
|
35
83
|
cwd?: string;
|
|
84
|
+
processEnv?: Record<string, string | undefined>;
|
|
85
|
+
cacheMode?: 'runtime' | 'build' | 'dev';
|
|
86
|
+
cacheTtlSeconds?: number;
|
|
87
|
+
forceRefresh?: boolean;
|
|
36
88
|
}): Promise<{
|
|
37
89
|
manifestRoot: string;
|
|
38
90
|
consumerRoot: string;
|
|
91
|
+
rootResolution: RootResolution;
|
|
39
92
|
anchorPath?: string;
|
|
40
93
|
workspace?: string;
|
|
41
94
|
}>;
|
|
@@ -193,4 +246,4 @@ interface WatchTargetSet {
|
|
|
193
246
|
}
|
|
194
247
|
declare function watchFiles(runtime: CnosRuntime, root?: string): Promise<WatchTargetSet>;
|
|
195
248
|
|
|
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 };
|
|
249
|
+
export { CNOS_GRAPH_ENV_VAR, CNOS_PROJECTION_ENV_VAR, CNOS_SECRET_PAYLOAD_ENV_VAR, CNOS_SESSION_KEY_ENV_VAR, CnosAuthenticationError, CnosSecurityError, DerivedValue, ParsedDerivation, type RemoteRootCacheMetadata, type ResolvedVaultDefinition, RootResolution, SecretReference, ValidationSummary, VaultDefinition, applyManifestMappings, clearAllVaultSessionKeys, clearVaultSessionKey, compareSchemaToGraph, createRemoteRootCacheKey, createSecretVault, createSecretVaultProvider, deleteLocalSecret, deriveVaultKey, deserializeRuntimeGraph, deserializeServerProjection, detectLegacyVaultFormat, diffGraphs, ensureProjectionAllowed, flattenObject, formatDriftReport, generateCodegenContent, getNamespaceDefinition, getVaultPassphraseEnvVar, getVaultSessionKeyEnvVar, graphRequiresSecretHydration, isDerivedValue, isImmutableGitRef, isPassphraseEnvRef, isSecretReference, listLocalSecrets, listSecretVaults, loadManifest, normalizeDerivedValue, parseDerivation, parseGitUri, parseYaml, proposeMapping, readKeychain, readLocalSecret, readRemoteRootCacheMetadata, readRuntimeGraphFromEnv, readServerProjectionFromEnv, readVaultMetadata, removeLocalVaultFiles, resolveCnosCacheRoot, resolveCodegenPaths, resolveConfigDocumentPath, resolveConfiguredVaultPassphrase, resolveManifestRoot, resolveRemoteRootCachePaths, resolveRootUri, resolveSecretPassphrase, resolveSecretStoreRoot, resolveSecretVaultFile, resolveVaultAccessKey, resolveVaultAuth, resolveVaultDefinition, rewriteSourceFiles, scanEnvUsage, serializeRuntimeGraph, serializeSecretPayload, serializeServerProjection, stringifyYaml, validateDerivedTargetNamespace, validateParsedDerivation, validateRuntime, watchFiles, watchSchema, writeCodegenOutput, writeKeychain, writeLocalSecret, writeRemoteRootCacheMetadata, writeVaultSessionKey };
|
package/dist/internal.js
CHANGED
|
@@ -11,12 +11,13 @@ import {
|
|
|
11
11
|
serializeRuntimeGraph,
|
|
12
12
|
serializeSecretPayload,
|
|
13
13
|
serializeServerProjection
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GHGJFRDL.js";
|
|
15
15
|
import {
|
|
16
16
|
CnosAuthenticationError,
|
|
17
17
|
CnosSecurityError,
|
|
18
18
|
clearAllVaultSessionKeys,
|
|
19
19
|
clearVaultSessionKey,
|
|
20
|
+
createRemoteRootCacheKey,
|
|
20
21
|
createSecretVault,
|
|
21
22
|
createSecretVaultProvider,
|
|
22
23
|
deleteLocalSecret,
|
|
@@ -27,19 +28,28 @@ import {
|
|
|
27
28
|
getNamespaceDefinition,
|
|
28
29
|
getVaultPassphraseEnvVar,
|
|
29
30
|
getVaultSessionKeyEnvVar,
|
|
31
|
+
isDerivedValue,
|
|
32
|
+
isImmutableGitRef,
|
|
30
33
|
isPassphraseEnvRef,
|
|
31
34
|
isSecretReference,
|
|
32
35
|
listLocalSecrets,
|
|
33
36
|
listSecretVaults,
|
|
34
37
|
loadManifest,
|
|
38
|
+
normalizeDerivedValue,
|
|
39
|
+
parseDerivation,
|
|
40
|
+
parseGitUri,
|
|
35
41
|
parseYaml,
|
|
36
42
|
readKeychain,
|
|
37
43
|
readLocalSecret,
|
|
44
|
+
readRemoteRootCacheMetadata,
|
|
38
45
|
readVaultMetadata,
|
|
39
46
|
removeLocalVaultFiles,
|
|
47
|
+
resolveCnosCacheRoot,
|
|
40
48
|
resolveConfigDocumentPath,
|
|
41
49
|
resolveConfiguredVaultPassphrase,
|
|
42
50
|
resolveManifestRoot,
|
|
51
|
+
resolveRemoteRootCachePaths,
|
|
52
|
+
resolveRootUri,
|
|
43
53
|
resolveSecretPassphrase,
|
|
44
54
|
resolveSecretStoreRoot,
|
|
45
55
|
resolveSecretVaultFile,
|
|
@@ -47,11 +57,14 @@ import {
|
|
|
47
57
|
resolveVaultAuth,
|
|
48
58
|
resolveVaultDefinition,
|
|
49
59
|
stringifyYaml,
|
|
60
|
+
validateDerivedTargetNamespace,
|
|
61
|
+
validateParsedDerivation,
|
|
50
62
|
validateRuntime,
|
|
51
63
|
writeKeychain,
|
|
52
64
|
writeLocalSecret,
|
|
65
|
+
writeRemoteRootCacheMetadata,
|
|
53
66
|
writeVaultSessionKey
|
|
54
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-2TL42I6M.js";
|
|
55
68
|
|
|
56
69
|
// src/codegen/generateTypes.ts
|
|
57
70
|
function toPascalCase(value) {
|
|
@@ -209,7 +222,8 @@ function resolveCodegenPaths(repoRoot, out) {
|
|
|
209
222
|
}
|
|
210
223
|
async function writeCodegenOutput(options = {}) {
|
|
211
224
|
const loadedManifest = await loadManifest(options.root ? { root: options.root } : {});
|
|
212
|
-
const
|
|
225
|
+
const outputRoot = loadedManifest.rootResolution.remote ? loadedManifest.consumerRoot : loadedManifest.repoRoot;
|
|
226
|
+
const paths = resolveCodegenPaths(outputRoot, options.out);
|
|
213
227
|
const generated = generateCodegenContent(loadedManifest.manifest, loadedManifest.manifestPath, paths.typeImportPath);
|
|
214
228
|
await mkdir(path.dirname(paths.typesPath), { recursive: true });
|
|
215
229
|
await mkdir(path.dirname(paths.runtimePath), { recursive: true });
|
|
@@ -652,6 +666,7 @@ export {
|
|
|
652
666
|
clearAllVaultSessionKeys,
|
|
653
667
|
clearVaultSessionKey,
|
|
654
668
|
compareSchemaToGraph,
|
|
669
|
+
createRemoteRootCacheKey,
|
|
655
670
|
createSecretVault,
|
|
656
671
|
createSecretVaultProvider,
|
|
657
672
|
deleteLocalSecret,
|
|
@@ -668,23 +683,32 @@ export {
|
|
|
668
683
|
getVaultPassphraseEnvVar,
|
|
669
684
|
getVaultSessionKeyEnvVar,
|
|
670
685
|
graphRequiresSecretHydration,
|
|
686
|
+
isDerivedValue,
|
|
687
|
+
isImmutableGitRef,
|
|
671
688
|
isPassphraseEnvRef,
|
|
672
689
|
isSecretReference,
|
|
673
690
|
listLocalSecrets,
|
|
674
691
|
listSecretVaults,
|
|
675
692
|
loadManifest,
|
|
693
|
+
normalizeDerivedValue,
|
|
694
|
+
parseDerivation,
|
|
695
|
+
parseGitUri,
|
|
676
696
|
parseYaml,
|
|
677
697
|
proposeMapping,
|
|
678
698
|
readKeychain,
|
|
679
699
|
readLocalSecret,
|
|
700
|
+
readRemoteRootCacheMetadata,
|
|
680
701
|
readRuntimeGraphFromEnv,
|
|
681
702
|
readServerProjectionFromEnv,
|
|
682
703
|
readVaultMetadata,
|
|
683
704
|
removeLocalVaultFiles,
|
|
705
|
+
resolveCnosCacheRoot,
|
|
684
706
|
resolveCodegenPaths,
|
|
685
707
|
resolveConfigDocumentPath,
|
|
686
708
|
resolveConfiguredVaultPassphrase,
|
|
687
709
|
resolveManifestRoot,
|
|
710
|
+
resolveRemoteRootCachePaths,
|
|
711
|
+
resolveRootUri,
|
|
688
712
|
resolveSecretPassphrase,
|
|
689
713
|
resolveSecretStoreRoot,
|
|
690
714
|
resolveSecretVaultFile,
|
|
@@ -697,11 +721,14 @@ export {
|
|
|
697
721
|
serializeSecretPayload,
|
|
698
722
|
serializeServerProjection,
|
|
699
723
|
stringifyYaml,
|
|
724
|
+
validateDerivedTargetNamespace,
|
|
725
|
+
validateParsedDerivation,
|
|
700
726
|
validateRuntime,
|
|
701
727
|
watchFiles,
|
|
702
728
|
watchSchema,
|
|
703
729
|
writeCodegenOutput,
|
|
704
730
|
writeKeychain,
|
|
705
731
|
writeLocalSecret,
|
|
732
|
+
writeRemoteRootCacheMetadata,
|
|
706
733
|
writeVaultSessionKey
|
|
707
734
|
};
|
|
@@ -34,6 +34,13 @@ __export(basic_schema_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(basic_schema_exports);
|
|
36
36
|
|
|
37
|
+
// ../core/src/derive/evaluator.ts
|
|
38
|
+
function isDerivedValue(value) {
|
|
39
|
+
return Boolean(
|
|
40
|
+
value && typeof value === "object" && !Array.isArray(value) && "$derive" in value
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
37
44
|
// ../core/src/keychain/linux.ts
|
|
38
45
|
var import_node_child_process = require("child_process");
|
|
39
46
|
var import_node_util = require("util");
|
|
@@ -50,32 +57,47 @@ var import_node_util3 = require("util");
|
|
|
50
57
|
var execFileAsync3 = (0, import_node_util3.promisify)(import_node_child_process3.execFile);
|
|
51
58
|
|
|
52
59
|
// ../core/src/manifest/loadManifest.ts
|
|
53
|
-
var
|
|
54
|
-
var
|
|
60
|
+
var import_promises5 = require("fs/promises");
|
|
61
|
+
var import_node_path6 = __toESM(require("path"), 1);
|
|
55
62
|
|
|
56
63
|
// ../core/src/utils/path.ts
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var
|
|
64
|
+
var import_promises4 = require("fs/promises");
|
|
65
|
+
var import_node_os3 = __toESM(require("os"), 1);
|
|
66
|
+
var import_node_path5 = __toESM(require("path"), 1);
|
|
60
67
|
|
|
61
68
|
// ../core/src/discovery/findCnosrc.ts
|
|
62
|
-
var
|
|
63
|
-
var
|
|
69
|
+
var import_promises3 = require("fs/promises");
|
|
70
|
+
var import_node_path4 = __toESM(require("path"), 1);
|
|
64
71
|
|
|
65
72
|
// ../core/src/utils/yaml.ts
|
|
66
73
|
var import_yaml = require("yaml");
|
|
67
74
|
|
|
75
|
+
// ../core/src/discovery/resolveRoot.ts
|
|
76
|
+
var import_promises2 = require("fs/promises");
|
|
77
|
+
var import_node_path3 = __toESM(require("path"), 1);
|
|
78
|
+
var import_node_child_process4 = require("child_process");
|
|
79
|
+
var import_node_os2 = __toESM(require("os"), 1);
|
|
80
|
+
|
|
81
|
+
// ../core/src/discovery/cache/cacheMetadata.ts
|
|
82
|
+
var import_promises = require("fs/promises");
|
|
83
|
+
var import_node_path = __toESM(require("path"), 1);
|
|
84
|
+
|
|
85
|
+
// ../core/src/discovery/cache/cachePaths.ts
|
|
86
|
+
var import_node_crypto = require("crypto");
|
|
87
|
+
var import_node_os = __toESM(require("os"), 1);
|
|
88
|
+
var import_node_path2 = __toESM(require("path"), 1);
|
|
89
|
+
|
|
68
90
|
// ../core/src/manifest/loadWorkspaceFile.ts
|
|
69
|
-
var
|
|
70
|
-
var
|
|
91
|
+
var import_promises6 = require("fs/promises");
|
|
92
|
+
var import_node_path7 = __toESM(require("path"), 1);
|
|
71
93
|
|
|
72
94
|
// ../core/src/profiles/expandProfileChain.ts
|
|
73
|
-
var
|
|
74
|
-
var
|
|
95
|
+
var import_promises7 = require("fs/promises");
|
|
96
|
+
var import_node_path8 = __toESM(require("path"), 1);
|
|
75
97
|
|
|
76
98
|
// ../core/src/workspaces/resolveWorkspaceContext.ts
|
|
77
|
-
var
|
|
78
|
-
var
|
|
99
|
+
var import_promises8 = require("fs/promises");
|
|
100
|
+
var import_node_path9 = __toESM(require("path"), 1);
|
|
79
101
|
|
|
80
102
|
// ../core/src/validation/basicSchema.ts
|
|
81
103
|
function describeValueType(value) {
|
|
@@ -179,6 +201,10 @@ function applySchemaRules(graph, schema) {
|
|
|
179
201
|
}
|
|
180
202
|
continue;
|
|
181
203
|
}
|
|
204
|
+
if (isDerivedValue(resolvedEntry.value)) {
|
|
205
|
+
nextEntries.set(key, resolvedEntry);
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
182
208
|
const coercedValue = coerceValue(resolvedEntry.value, rule);
|
|
183
209
|
const nextResolvedEntry = coercedValue === resolvedEntry.value ? resolvedEntry : {
|
|
184
210
|
...resolvedEntry,
|
|
@@ -225,28 +251,28 @@ function applySchemaRules(graph, schema) {
|
|
|
225
251
|
}
|
|
226
252
|
|
|
227
253
|
// ../core/src/secrets/auditLog.ts
|
|
228
|
-
var
|
|
229
|
-
var
|
|
254
|
+
var import_promises11 = require("fs/promises");
|
|
255
|
+
var import_node_path12 = __toESM(require("path"), 1);
|
|
230
256
|
|
|
231
257
|
// ../core/src/utils/secretStore.ts
|
|
232
|
-
var
|
|
233
|
-
var
|
|
234
|
-
var
|
|
258
|
+
var import_node_crypto2 = require("crypto");
|
|
259
|
+
var import_promises10 = require("fs/promises");
|
|
260
|
+
var import_node_path11 = __toESM(require("path"), 1);
|
|
235
261
|
|
|
236
262
|
// ../core/src/secrets/sessionStore.ts
|
|
237
|
-
var
|
|
238
|
-
var
|
|
263
|
+
var import_promises9 = require("fs/promises");
|
|
264
|
+
var import_node_path10 = __toESM(require("path"), 1);
|
|
239
265
|
|
|
240
266
|
// ../core/src/secrets/prompt.ts
|
|
241
267
|
var import_node_readline = __toESM(require("readline"), 1);
|
|
242
268
|
var import_node_stream = require("stream");
|
|
243
269
|
|
|
244
270
|
// ../core/src/runtime/toServerProjection.ts
|
|
245
|
-
var
|
|
271
|
+
var import_node_crypto3 = require("crypto");
|
|
246
272
|
|
|
247
273
|
// ../core/src/runtime/dump.ts
|
|
248
|
-
var
|
|
249
|
-
var
|
|
274
|
+
var import_promises12 = require("fs/promises");
|
|
275
|
+
var import_node_path13 = __toESM(require("path"), 1);
|
|
250
276
|
|
|
251
277
|
// ../../plugins/basic-schema/src/index.ts
|
|
252
278
|
function createBasicSchemaPlugin() {
|
package/dist/plugin/cli-args.cjs
CHANGED
|
@@ -52,61 +52,76 @@ 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
|
|
56
|
-
var
|
|
55
|
+
var import_promises5 = require("fs/promises");
|
|
56
|
+
var import_node_path6 = __toESM(require("path"), 1);
|
|
57
57
|
|
|
58
58
|
// ../core/src/utils/path.ts
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
59
|
+
var import_promises4 = require("fs/promises");
|
|
60
|
+
var import_node_os3 = __toESM(require("os"), 1);
|
|
61
|
+
var import_node_path5 = __toESM(require("path"), 1);
|
|
62
62
|
|
|
63
63
|
// ../core/src/discovery/findCnosrc.ts
|
|
64
|
-
var
|
|
65
|
-
var
|
|
64
|
+
var import_promises3 = require("fs/promises");
|
|
65
|
+
var import_node_path4 = __toESM(require("path"), 1);
|
|
66
66
|
|
|
67
67
|
// ../core/src/utils/yaml.ts
|
|
68
68
|
var import_yaml = require("yaml");
|
|
69
69
|
|
|
70
|
+
// ../core/src/discovery/resolveRoot.ts
|
|
71
|
+
var import_promises2 = require("fs/promises");
|
|
72
|
+
var import_node_path3 = __toESM(require("path"), 1);
|
|
73
|
+
var import_node_child_process4 = require("child_process");
|
|
74
|
+
var import_node_os2 = __toESM(require("os"), 1);
|
|
75
|
+
|
|
76
|
+
// ../core/src/discovery/cache/cacheMetadata.ts
|
|
77
|
+
var import_promises = require("fs/promises");
|
|
78
|
+
var import_node_path = __toESM(require("path"), 1);
|
|
79
|
+
|
|
80
|
+
// ../core/src/discovery/cache/cachePaths.ts
|
|
81
|
+
var import_node_crypto = require("crypto");
|
|
82
|
+
var import_node_os = __toESM(require("os"), 1);
|
|
83
|
+
var import_node_path2 = __toESM(require("path"), 1);
|
|
84
|
+
|
|
70
85
|
// ../core/src/utils/path.ts
|
|
71
86
|
function joinConfigPath(...parts) {
|
|
72
87
|
return parts.flatMap((part) => part.split(".")).map((part) => part.trim()).filter(Boolean).join(".");
|
|
73
88
|
}
|
|
74
89
|
|
|
75
90
|
// ../core/src/manifest/loadWorkspaceFile.ts
|
|
76
|
-
var
|
|
77
|
-
var
|
|
91
|
+
var import_promises6 = require("fs/promises");
|
|
92
|
+
var import_node_path7 = __toESM(require("path"), 1);
|
|
78
93
|
|
|
79
94
|
// ../core/src/profiles/expandProfileChain.ts
|
|
80
|
-
var
|
|
81
|
-
var
|
|
95
|
+
var import_promises7 = require("fs/promises");
|
|
96
|
+
var import_node_path8 = __toESM(require("path"), 1);
|
|
82
97
|
|
|
83
98
|
// ../core/src/workspaces/resolveWorkspaceContext.ts
|
|
84
|
-
var
|
|
85
|
-
var
|
|
99
|
+
var import_promises8 = require("fs/promises");
|
|
100
|
+
var import_node_path9 = __toESM(require("path"), 1);
|
|
86
101
|
|
|
87
102
|
// ../core/src/secrets/auditLog.ts
|
|
88
|
-
var
|
|
89
|
-
var
|
|
103
|
+
var import_promises11 = require("fs/promises");
|
|
104
|
+
var import_node_path12 = __toESM(require("path"), 1);
|
|
90
105
|
|
|
91
106
|
// ../core/src/utils/secretStore.ts
|
|
92
|
-
var
|
|
93
|
-
var
|
|
94
|
-
var
|
|
107
|
+
var import_node_crypto2 = require("crypto");
|
|
108
|
+
var import_promises10 = require("fs/promises");
|
|
109
|
+
var import_node_path11 = __toESM(require("path"), 1);
|
|
95
110
|
|
|
96
111
|
// ../core/src/secrets/sessionStore.ts
|
|
97
|
-
var
|
|
98
|
-
var
|
|
112
|
+
var import_promises9 = require("fs/promises");
|
|
113
|
+
var import_node_path10 = __toESM(require("path"), 1);
|
|
99
114
|
|
|
100
115
|
// ../core/src/secrets/prompt.ts
|
|
101
116
|
var import_node_readline = __toESM(require("readline"), 1);
|
|
102
117
|
var import_node_stream = require("stream");
|
|
103
118
|
|
|
104
119
|
// ../core/src/runtime/toServerProjection.ts
|
|
105
|
-
var
|
|
120
|
+
var import_node_crypto3 = require("crypto");
|
|
106
121
|
|
|
107
122
|
// ../core/src/runtime/dump.ts
|
|
108
|
-
var
|
|
109
|
-
var
|
|
123
|
+
var import_promises12 = require("fs/promises");
|
|
124
|
+
var import_node_path13 = __toESM(require("path"), 1);
|
|
110
125
|
|
|
111
126
|
// ../../plugins/cli-args/src/index.ts
|
|
112
127
|
var CLI_ARGS_PLUGIN_ID = "@kitsy/cnos/plugins/cli-args";
|
package/dist/plugin/cli-args.js
CHANGED