@kitsy/cnos 1.5.0 → 1.6.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 +333 -117
- 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-HMM76UYZ.js → chunk-BMAD24KC.js} +1 -1
- package/dist/{chunk-ZTPSFXWP.js → chunk-JYWQFMW5.js} +1 -1
- package/dist/{chunk-FWJC4Y2D.js → chunk-MW4OVAT3.js} +1 -1
- package/dist/chunk-QU5CXL47.js +577 -0
- package/dist/{chunk-APIU4GTB.js → chunk-S7H2UULC.js} +315 -107
- package/dist/{chunk-WCHX2QFY.js → chunk-UJBQS7CJ.js} +1 -1
- package/dist/{chunk-RYGSG3GR.js → chunk-UOKVLCFL.js} +10 -10
- package/dist/{chunk-T6Y57KTT.js → chunk-UR7CHHNN.js} +1 -1
- package/dist/{chunk-J4K4JUJL.js → chunk-VGZREX5D.js} +1 -1
- package/dist/{chunk-EQSKV3DP.js → chunk-XSUP7JKH.js} +23 -1
- package/dist/configure/index.cjs +332 -122
- 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 +754 -143
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/internal.cjs +229 -103
- 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 +34 -22
- 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 +752 -143
- package/dist/runtime/index.d.cts +19 -1
- package/dist/runtime/index.d.ts +19 -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-TO76YYS4.js +0 -189
|
@@ -14,7 +14,7 @@ interface SchemaRule {
|
|
|
14
14
|
default?: unknown;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
type WorkspaceSource = 'cli' | 'workspace-file' | 'manifest-default' | 'implicit';
|
|
17
|
+
type WorkspaceSource = 'cli' | 'workspace-file' | 'anchor-file' | 'manifest-default' | 'implicit' | 'directory-inferred';
|
|
18
18
|
type GlobalRootSource = 'cli' | 'workspace-file' | 'manifest' | 'CNOS_HOME';
|
|
19
19
|
interface WorkspaceFile {
|
|
20
20
|
workspace?: string;
|
|
@@ -167,15 +167,43 @@ interface NormalizedManifest {
|
|
|
167
167
|
}
|
|
168
168
|
interface LoadManifestOptions {
|
|
169
169
|
root?: string;
|
|
170
|
+
cwd?: string;
|
|
170
171
|
}
|
|
171
172
|
interface LoadedManifest {
|
|
172
173
|
manifestRoot: string;
|
|
173
174
|
repoRoot: string;
|
|
175
|
+
consumerRoot: string;
|
|
176
|
+
anchorPath?: string;
|
|
177
|
+
anchoredWorkspace?: string;
|
|
174
178
|
manifestPath: string;
|
|
175
179
|
manifest: NormalizedManifest;
|
|
176
180
|
rawManifest: ManifestFile;
|
|
177
181
|
}
|
|
178
182
|
|
|
183
|
+
interface SecretReference {
|
|
184
|
+
provider: string;
|
|
185
|
+
ref: string;
|
|
186
|
+
vault?: string;
|
|
187
|
+
}
|
|
188
|
+
interface VaultAuthConfig {
|
|
189
|
+
passphrase?: string;
|
|
190
|
+
token?: string;
|
|
191
|
+
derivedKey?: Buffer;
|
|
192
|
+
method: 'passphrase' | 'environment' | 'token' | 'iam' | 'keychain';
|
|
193
|
+
config?: Record<string, unknown>;
|
|
194
|
+
}
|
|
195
|
+
interface SecretVaultProvider {
|
|
196
|
+
readonly vaultId: string;
|
|
197
|
+
readonly definition: VaultDefinition;
|
|
198
|
+
authenticate(authConfig: VaultAuthConfig): Promise<void>;
|
|
199
|
+
isAuthenticated(): boolean;
|
|
200
|
+
batchGet(refs: string[]): Promise<Map<string, string>>;
|
|
201
|
+
get(ref: string): Promise<string | undefined>;
|
|
202
|
+
set(ref: string, value: string): Promise<void>;
|
|
203
|
+
delete(ref: string): Promise<void>;
|
|
204
|
+
list(): Promise<string[]>;
|
|
205
|
+
}
|
|
206
|
+
|
|
179
207
|
type LogicalKey = string;
|
|
180
208
|
type NamespaceName = string;
|
|
181
209
|
interface ConfigOrigin {
|
|
@@ -235,11 +263,13 @@ interface InspectResult {
|
|
|
235
263
|
}>;
|
|
236
264
|
}
|
|
237
265
|
interface CnosCreateOptions {
|
|
266
|
+
cwd?: string;
|
|
238
267
|
root?: string;
|
|
239
268
|
profile?: string;
|
|
240
269
|
workspace?: string;
|
|
241
270
|
globalRoot?: string;
|
|
242
|
-
secretResolution?: 'eager' | 'lazy';
|
|
271
|
+
secretResolution?: 'eager' | 'lazy' | 'refreshing';
|
|
272
|
+
secretRefreshTtl?: number;
|
|
243
273
|
cnosVersion?: string;
|
|
244
274
|
plugins?: CnosPlugin[];
|
|
245
275
|
cliArgs?: string[];
|
|
@@ -287,6 +317,25 @@ interface CnosRuntime {
|
|
|
287
317
|
toNamespace(namespace: NamespaceName): Record<string, unknown>;
|
|
288
318
|
toEnv(options?: ToEnvOptions): Record<string, string>;
|
|
289
319
|
toPublicEnv(options?: ToPublicEnvOptions): Record<string, string>;
|
|
320
|
+
toServerProjection(): ServerProjection;
|
|
321
|
+
refreshSecrets(): Promise<void>;
|
|
322
|
+
refreshSecret(key: LogicalKey): Promise<void>;
|
|
323
|
+
}
|
|
324
|
+
interface ServerProjection {
|
|
325
|
+
version: 1;
|
|
326
|
+
workspace: string;
|
|
327
|
+
profile: string;
|
|
328
|
+
resolvedAt: string;
|
|
329
|
+
configHash: string;
|
|
330
|
+
values: Record<string, unknown>;
|
|
331
|
+
secretRefs: Record<string, SecretReference>;
|
|
332
|
+
publicKeys: string[];
|
|
333
|
+
meta: {
|
|
334
|
+
workspace: string;
|
|
335
|
+
profile: string;
|
|
336
|
+
cnos_version: string;
|
|
337
|
+
namespaces?: string[];
|
|
338
|
+
};
|
|
290
339
|
}
|
|
291
340
|
|
|
292
341
|
type CnosPluginKind = 'loader' | 'resolver' | 'validator' | 'exporter' | 'inspector';
|
|
@@ -347,4 +396,4 @@ interface ExporterPlugin extends CnosPlugin {
|
|
|
347
396
|
export(graph: ResolvedGraph, context: ExportContext): Promise<ExportResult>;
|
|
348
397
|
}
|
|
349
398
|
|
|
350
|
-
export type { CnosCreateOptions as C, DumpPlanOptions as D, ExporterPlugin as E, InspectResult as I, LoaderPlugin as L, ManifestFile as M, NormalizedManifest as N, ResolvedGraph as R, ToEnvOptions as T, ValidatorPlugin as V, WorkspaceRoot as W, ConfigEntry as a, LogicalKey as b, ToPublicEnvOptions as c, DumpPlan as d, DumpOptions as e, DumpResult as f, CnosRuntime as g, CnosPlugin as h, NamespaceName as i, LoadManifestOptions as j, LoadedManifest as k, NamespaceDefinition as l, VaultDefinition as m,
|
|
399
|
+
export type { CnosCreateOptions as C, DumpPlanOptions as D, ExporterPlugin as E, InspectResult as I, LoaderPlugin as L, ManifestFile as M, NormalizedManifest as N, ResolvedGraph as R, ServerProjection as S, ToEnvOptions as T, ValidatorPlugin as V, WorkspaceRoot as W, ConfigEntry as a, LogicalKey as b, ToPublicEnvOptions as c, DumpPlan as d, DumpOptions as e, DumpResult as f, CnosRuntime as g, CnosPlugin as h, NamespaceName as i, LoadManifestOptions as j, LoadedManifest as k, NamespaceDefinition as l, VaultDefinition as m, VaultAuthConfig as n, SecretVaultProvider as o, SecretReference as p, ValidationSummary as q, ValidationIssue as r, WorkspaceFile as s };
|