@kitsy/cnos 1.1.2 → 1.2.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/README.md +4 -1
- package/dist/browser/index.cjs +94 -0
- package/dist/browser/index.d.cts +16 -0
- package/dist/browser/index.d.ts +16 -0
- package/dist/browser/index.js +67 -0
- package/dist/build/index.cjs +2100 -0
- package/dist/build/index.d.cts +5 -0
- package/dist/build/index.d.ts +5 -0
- package/dist/build/index.js +14 -0
- package/dist/{chunk-33ZDYDQJ.js → chunk-APCTXRUN.js} +550 -349
- package/dist/{chunk-IHSV5AFX.js → chunk-EIN55XXA.js} +1 -1
- package/dist/chunk-JUHPBAEH.js +20 -0
- package/dist/{chunk-JQGGSNCL.js → chunk-MLQGYCO7.js} +1 -1
- package/dist/chunk-PQ4KSV76.js +50 -0
- package/dist/{chunk-IQOUWY6T.js → chunk-RD5WMHPM.js} +1 -1
- package/dist/chunk-SO5XREEU.js +179 -0
- package/dist/{chunk-7FBRVJD6.js → chunk-SXTMTACL.js} +2 -2
- package/dist/{chunk-53HXUSM6.js → chunk-WHUGFPE4.js} +1 -1
- package/dist/{chunk-HOS4E7XO.js → chunk-ZA74BO47.js} +1 -1
- package/dist/{envNaming-BrOk5ndZ.d.cts → envNaming-BTJpH93W.d.cts} +1 -1
- package/dist/{envNaming-DCaNdnrF.d.ts → envNaming-CcsqAel3.d.ts} +1 -1
- package/dist/index.cjs +242 -74
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +14 -132
- package/dist/internal.cjs +428 -10
- package/dist/internal.d.cts +29 -3
- package/dist/internal.d.ts +29 -3
- package/dist/internal.js +27 -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.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 +4 -4
- 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 +29 -46
- 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 +1 -1
- 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 -4
- 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-BVNEHj19.d.cts → plugin-DkOIT5uI.d.cts} +30 -2
- package/dist/{plugin-BVNEHj19.d.ts → plugin-DkOIT5uI.d.ts} +30 -2
- package/dist/runtime/index.cjs +2288 -0
- package/dist/runtime/index.d.cts +23 -0
- package/dist/runtime/index.d.ts +23 -0
- package/dist/runtime/index.js +190 -0
- package/dist/{toPublicEnv-Gwz3xTK0.d.ts → toPublicEnv-C9clvXLo.d.ts} +1 -1
- package/dist/{toPublicEnv-Dd152fFy.d.cts → toPublicEnv-DvFeV3qG.d.cts} +1 -1
- package/package.json +16 -1
package/dist/plugin/cli-args.js
CHANGED
package/dist/plugin/dotenv.cjs
CHANGED
|
@@ -94,6 +94,10 @@ var import_node_crypto = require("crypto");
|
|
|
94
94
|
var import_promises6 = require("fs/promises");
|
|
95
95
|
var import_node_path6 = __toESM(require("path"), 1);
|
|
96
96
|
|
|
97
|
+
// ../core/src/runtime/dump.ts
|
|
98
|
+
var import_promises7 = require("fs/promises");
|
|
99
|
+
var import_node_path7 = __toESM(require("path"), 1);
|
|
100
|
+
|
|
97
101
|
// ../core/src/utils/envNaming.ts
|
|
98
102
|
function normalizeMappingConfig(config = {}) {
|
|
99
103
|
return {
|
|
@@ -126,10 +130,6 @@ function envVarToLogicalKey(envVar, config = {}) {
|
|
|
126
130
|
return `value.${fromScreamingSnake(envVar)}`;
|
|
127
131
|
}
|
|
128
132
|
|
|
129
|
-
// ../core/src/runtime/dump.ts
|
|
130
|
-
var import_promises7 = require("fs/promises");
|
|
131
|
-
var import_node_path7 = __toESM(require("path"), 1);
|
|
132
|
-
|
|
133
133
|
// ../../plugins/dotenv/src/index.ts
|
|
134
134
|
var DOTENV_PLUGIN_ID = "@kitsy/cnos/plugins/dotenv";
|
|
135
135
|
function parseDoubleQuoted(value) {
|
package/dist/plugin/dotenv.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LoaderPlugin, f as ConfigEntry } from '../plugin-
|
|
2
|
-
import { E as EnvMappingConfig } from '../envNaming-
|
|
1
|
+
import { L as LoaderPlugin, f as ConfigEntry } from '../plugin-DkOIT5uI.cjs';
|
|
2
|
+
import { E as EnvMappingConfig } from '../envNaming-BTJpH93W.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, f as ConfigEntry } from '../plugin-
|
|
2
|
-
import { E as EnvMappingConfig } from '../envNaming-
|
|
1
|
+
import { L as LoaderPlugin, f as ConfigEntry } from '../plugin-DkOIT5uI.js';
|
|
2
|
+
import { E as EnvMappingConfig } from '../envNaming-CcsqAel3.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
|
@@ -60,6 +60,9 @@ var import_node_path2 = __toESM(require("path"), 1);
|
|
|
60
60
|
var import_promises = require("fs/promises");
|
|
61
61
|
var import_node_os = __toESM(require("os"), 1);
|
|
62
62
|
var import_node_path = __toESM(require("path"), 1);
|
|
63
|
+
function stripNamespace(key) {
|
|
64
|
+
return key.split(".").slice(1).join(".");
|
|
65
|
+
}
|
|
63
66
|
|
|
64
67
|
// ../core/src/utils/yaml.ts
|
|
65
68
|
var import_yaml = require("yaml");
|
|
@@ -72,6 +75,23 @@ var import_node_path3 = __toESM(require("path"), 1);
|
|
|
72
75
|
var import_promises4 = require("fs/promises");
|
|
73
76
|
var import_node_path4 = __toESM(require("path"), 1);
|
|
74
77
|
|
|
78
|
+
// ../core/src/promotions/validatePromotion.ts
|
|
79
|
+
var DEFAULT_DATA_NAMESPACE = {
|
|
80
|
+
kind: "data",
|
|
81
|
+
shareable: false
|
|
82
|
+
};
|
|
83
|
+
function getNamespaceNameForKey(key) {
|
|
84
|
+
const [namespace] = key.split(".");
|
|
85
|
+
if (!namespace || !key.includes(".")) {
|
|
86
|
+
throw new CnosManifestError(`Logical key must be namespace-qualified: ${key}`);
|
|
87
|
+
}
|
|
88
|
+
return namespace;
|
|
89
|
+
}
|
|
90
|
+
function getNamespaceDefinition(manifest, namespaceOrKey) {
|
|
91
|
+
const namespace = namespaceOrKey.includes(".") ? getNamespaceNameForKey(namespaceOrKey) : namespaceOrKey;
|
|
92
|
+
return manifest.namespaces[namespace] ?? DEFAULT_DATA_NAMESPACE;
|
|
93
|
+
}
|
|
94
|
+
|
|
75
95
|
// ../core/src/workspaces/resolveWorkspaceContext.ts
|
|
76
96
|
var import_promises5 = require("fs/promises");
|
|
77
97
|
var import_node_path5 = __toESM(require("path"), 1);
|
|
@@ -111,6 +131,10 @@ function toEnv(graph, manifest, options = {}) {
|
|
|
111
131
|
if (!entry) {
|
|
112
132
|
continue;
|
|
113
133
|
}
|
|
134
|
+
const namespaceDefinition = getNamespaceDefinition(manifest, entry.namespace);
|
|
135
|
+
if (namespaceDefinition.kind !== "data" || !namespaceDefinition.shareable || namespaceDefinition.sensitive) {
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
114
138
|
if (entry.namespace === "secret" && !includeSecrets) {
|
|
115
139
|
continue;
|
|
116
140
|
}
|
|
@@ -122,40 +146,9 @@ function toEnv(graph, manifest, options = {}) {
|
|
|
122
146
|
return output;
|
|
123
147
|
}
|
|
124
148
|
|
|
125
|
-
// ../core/src/utils/envNaming.ts
|
|
126
|
-
function normalizeMappingConfig(config = {}) {
|
|
127
|
-
return {
|
|
128
|
-
convention: config.convention,
|
|
129
|
-
explicit: config.explicit ?? {}
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
function toScreamingSnakeSegment(segment) {
|
|
133
|
-
return segment.replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^A-Za-z0-9]+/g, "_").replace(/_+/g, "_").replace(/^_+|_+$/g, "").toUpperCase();
|
|
134
|
-
}
|
|
135
|
-
function toScreamingSnake(path8) {
|
|
136
|
-
return path8.split(".").map((segment) => toScreamingSnakeSegment(segment)).filter(Boolean).join("_");
|
|
137
|
-
}
|
|
138
|
-
function logicalKeyToEnvVar(key, config = {}) {
|
|
139
|
-
const normalized = normalizeMappingConfig(config);
|
|
140
|
-
const explicitEntry = Object.entries(normalized.explicit).find(([, logicalKey]) => logicalKey === key);
|
|
141
|
-
if (explicitEntry) {
|
|
142
|
-
return explicitEntry[0];
|
|
143
|
-
}
|
|
144
|
-
if (normalized.convention !== "SCREAMING_SNAKE") {
|
|
145
|
-
return void 0;
|
|
146
|
-
}
|
|
147
|
-
if (key.startsWith("value.")) {
|
|
148
|
-
return toScreamingSnake(key.slice("value.".length));
|
|
149
|
-
}
|
|
150
|
-
if (key.startsWith("secret.")) {
|
|
151
|
-
return `SECRET_${toScreamingSnake(key.slice("secret.".length))}`;
|
|
152
|
-
}
|
|
153
|
-
return void 0;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
149
|
// ../core/src/runtime/toPublicEnv.ts
|
|
157
|
-
function
|
|
158
|
-
return
|
|
150
|
+
function fallbackPublicEnvVar(valuePath) {
|
|
151
|
+
return valuePath.replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^A-Za-z0-9]+/g, "_").replace(/_+/g, "_").replace(/^_+|_+$/g, "").toUpperCase();
|
|
159
152
|
}
|
|
160
153
|
function normalizeEnvValue2(value) {
|
|
161
154
|
if (value === void 0 || value === null) {
|
|
@@ -182,22 +175,12 @@ function resolvePublicPrefix(manifest, options) {
|
|
|
182
175
|
}
|
|
183
176
|
return configuredPrefix;
|
|
184
177
|
}
|
|
185
|
-
function ensurePublicPromotionKey(key) {
|
|
186
|
-
if (!key.startsWith("value.")) {
|
|
187
|
-
throw new CnosManifestError(`public.promote may only contain value.* keys: ${key}`);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
178
|
function toPublicEnv(graph, manifest, options = {}) {
|
|
191
179
|
const prefix = resolvePublicPrefix(manifest, options);
|
|
192
180
|
const output = {};
|
|
193
|
-
const promotions =
|
|
194
|
-
for (const
|
|
195
|
-
|
|
196
|
-
const resolved = graph.entries.get(key);
|
|
197
|
-
if (!resolved) {
|
|
198
|
-
continue;
|
|
199
|
-
}
|
|
200
|
-
const baseEnvVar = logicalKeyToEnvVar(key, manifest.envMapping) ?? fallbackValueEnvVar(key);
|
|
181
|
+
const promotions = Array.from(graph.entries.values()).filter((entry) => entry.namespace === "public").sort((left, right) => left.key.localeCompare(right.key));
|
|
182
|
+
for (const resolved of promotions) {
|
|
183
|
+
const baseEnvVar = fallbackPublicEnvVar(stripNamespace(resolved.key));
|
|
201
184
|
const envVar = prefix && !baseEnvVar.startsWith(prefix) ? `${prefix}${baseEnvVar}` : baseEnvVar;
|
|
202
185
|
output[envVar] = normalizeEnvValue2(resolved.value);
|
|
203
186
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as ExporterPlugin } from '../plugin-
|
|
2
|
-
export { t as toEnv, a as toPublicEnv } from '../toPublicEnv-
|
|
1
|
+
import { E as ExporterPlugin } from '../plugin-DkOIT5uI.cjs';
|
|
2
|
+
export { t as toEnv, a as toPublicEnv } from '../toPublicEnv-DvFeV3qG.cjs';
|
|
3
3
|
|
|
4
4
|
declare function createEnvExportPlugin(): ExporterPlugin;
|
|
5
5
|
declare function createPublicEnvExportPlugin(): ExporterPlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as ExporterPlugin } from '../plugin-
|
|
2
|
-
export { t as toEnv, a as toPublicEnv } from '../toPublicEnv-
|
|
1
|
+
import { E as ExporterPlugin } from '../plugin-DkOIT5uI.js';
|
|
2
|
+
export { t as toEnv, a as toPublicEnv } from '../toPublicEnv-C9clvXLo.js';
|
|
3
3
|
|
|
4
4
|
declare function createEnvExportPlugin(): ExporterPlugin;
|
|
5
5
|
declare function createPublicEnvExportPlugin(): ExporterPlugin;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createEnvExportPlugin,
|
|
3
3
|
createPublicEnvExportPlugin
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-EIN55XXA.js";
|
|
5
5
|
import {
|
|
6
6
|
toEnv,
|
|
7
7
|
toPublicEnv
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-APCTXRUN.js";
|
|
9
9
|
export {
|
|
10
10
|
createEnvExportPlugin,
|
|
11
11
|
createPublicEnvExportPlugin,
|
|
@@ -257,7 +257,7 @@ async function resolveSecretValue(value, processEnv) {
|
|
|
257
257
|
value.vault
|
|
258
258
|
);
|
|
259
259
|
}
|
|
260
|
-
if (value.provider === "env") {
|
|
260
|
+
if (value.provider === "env" || value.provider === "github-secrets") {
|
|
261
261
|
const resolved = processEnv?.[value.ref];
|
|
262
262
|
if (resolved === void 0) {
|
|
263
263
|
return value;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as LoaderPlugin, f as ConfigEntry,
|
|
1
|
+
import { L as LoaderPlugin, f as ConfigEntry, n as WorkspaceRoot, o as NamespaceName } from '../plugin-DkOIT5uI.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, f as ConfigEntry,
|
|
1
|
+
import { L as LoaderPlugin, f as ConfigEntry, n as WorkspaceRoot, o as NamespaceName } from '../plugin-DkOIT5uI.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-SXTMTACL.js";
|
|
9
|
+
import "../chunk-APCTXRUN.js";
|
|
10
10
|
export {
|
|
11
11
|
collectFilesystemLayerFiles,
|
|
12
12
|
createFilesystemSecretsPlugin,
|
|
@@ -64,6 +64,10 @@ var import_node_crypto = require("crypto");
|
|
|
64
64
|
var import_promises6 = require("fs/promises");
|
|
65
65
|
var import_node_path6 = __toESM(require("path"), 1);
|
|
66
66
|
|
|
67
|
+
// ../core/src/runtime/dump.ts
|
|
68
|
+
var import_promises7 = require("fs/promises");
|
|
69
|
+
var import_node_path7 = __toESM(require("path"), 1);
|
|
70
|
+
|
|
67
71
|
// ../core/src/utils/envNaming.ts
|
|
68
72
|
function normalizeMappingConfig(config = {}) {
|
|
69
73
|
return {
|
|
@@ -96,10 +100,6 @@ function envVarToLogicalKey(envVar, config = {}) {
|
|
|
96
100
|
return `value.${fromScreamingSnake(envVar)}`;
|
|
97
101
|
}
|
|
98
102
|
|
|
99
|
-
// ../core/src/runtime/dump.ts
|
|
100
|
-
var import_promises7 = require("fs/promises");
|
|
101
|
-
var import_node_path7 = __toESM(require("path"), 1);
|
|
102
|
-
|
|
103
103
|
// ../../plugins/process-env/src/index.ts
|
|
104
104
|
var PROCESS_ENV_PLUGIN_ID = "@kitsy/cnos/plugins/process-env";
|
|
105
105
|
function processEnvEntriesFromObject(env, mapping = {}, workspaceId = "default") {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LoaderPlugin, f as ConfigEntry } from '../plugin-
|
|
2
|
-
import { E as EnvMappingConfig } from '../envNaming-
|
|
1
|
+
import { L as LoaderPlugin, f as ConfigEntry } from '../plugin-DkOIT5uI.cjs';
|
|
2
|
+
import { E as EnvMappingConfig } from '../envNaming-BTJpH93W.cjs';
|
|
3
3
|
|
|
4
4
|
declare function processEnvEntriesFromObject(env: Record<string, string | undefined>, mapping?: EnvMappingConfig, workspaceId?: string): ConfigEntry[];
|
|
5
5
|
declare function createProcessEnvPlugin(): LoaderPlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LoaderPlugin, f as ConfigEntry } from '../plugin-
|
|
2
|
-
import { E as EnvMappingConfig } from '../envNaming-
|
|
1
|
+
import { L as LoaderPlugin, f as ConfigEntry } from '../plugin-DkOIT5uI.js';
|
|
2
|
+
import { E as EnvMappingConfig } from '../envNaming-CcsqAel3.js';
|
|
3
3
|
|
|
4
4
|
declare function processEnvEntriesFromObject(env: Record<string, string | undefined>, mapping?: EnvMappingConfig, workspaceId?: string): ConfigEntry[];
|
|
5
5
|
declare function createProcessEnvPlugin(): LoaderPlugin;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProcessEnvPlugin,
|
|
3
3
|
processEnvEntriesFromObject
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-WHUGFPE4.js";
|
|
5
|
+
import "../chunk-APCTXRUN.js";
|
|
6
6
|
export {
|
|
7
7
|
createProcessEnvPlugin,
|
|
8
8
|
processEnvEntriesFromObject
|
|
@@ -44,6 +44,20 @@ interface WorkspaceContext {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
type ResolutionArrayPolicy = 'replace' | 'append' | 'unique-append';
|
|
47
|
+
type NamespaceKind = 'data' | 'projection' | 'system';
|
|
48
|
+
type NamespaceProjectionSource = 'promote' | 'envMapping';
|
|
49
|
+
type VaultProviderName = 'local' | 'github-secrets' | (string & {});
|
|
50
|
+
interface NamespaceDefinition {
|
|
51
|
+
kind: NamespaceKind;
|
|
52
|
+
shareable: boolean;
|
|
53
|
+
sensitive?: boolean;
|
|
54
|
+
readonly?: boolean;
|
|
55
|
+
source?: NamespaceProjectionSource;
|
|
56
|
+
}
|
|
57
|
+
interface VaultDefinition {
|
|
58
|
+
provider: VaultProviderName;
|
|
59
|
+
passphrase?: string;
|
|
60
|
+
}
|
|
47
61
|
interface ManifestFile {
|
|
48
62
|
version?: number;
|
|
49
63
|
project?: {
|
|
@@ -82,6 +96,8 @@ interface ManifestFile {
|
|
|
82
96
|
promote?: LogicalKey[];
|
|
83
97
|
frameworks?: Record<string, string>;
|
|
84
98
|
};
|
|
99
|
+
namespaces?: Record<string, Partial<NamespaceDefinition>>;
|
|
100
|
+
vaults?: Record<string, Partial<VaultDefinition>>;
|
|
85
101
|
writePolicy?: {
|
|
86
102
|
define?: {
|
|
87
103
|
defaultProfile?: string;
|
|
@@ -128,6 +144,8 @@ interface NormalizedManifest {
|
|
|
128
144
|
promote: LogicalKey[];
|
|
129
145
|
frameworks: Record<string, string>;
|
|
130
146
|
};
|
|
147
|
+
namespaces: Record<string, NamespaceDefinition>;
|
|
148
|
+
vaults: Record<string, VaultDefinition>;
|
|
131
149
|
writePolicy: {
|
|
132
150
|
define: {
|
|
133
151
|
defaultProfile: string;
|
|
@@ -136,9 +154,19 @@ interface NormalizedManifest {
|
|
|
136
154
|
};
|
|
137
155
|
schema: Record<LogicalKey, SchemaRule>;
|
|
138
156
|
}
|
|
157
|
+
interface LoadManifestOptions {
|
|
158
|
+
root?: string;
|
|
159
|
+
}
|
|
160
|
+
interface LoadedManifest {
|
|
161
|
+
manifestRoot: string;
|
|
162
|
+
repoRoot: string;
|
|
163
|
+
manifestPath: string;
|
|
164
|
+
manifest: NormalizedManifest;
|
|
165
|
+
rawManifest: ManifestFile;
|
|
166
|
+
}
|
|
139
167
|
|
|
140
168
|
type LogicalKey = string;
|
|
141
|
-
type NamespaceName =
|
|
169
|
+
type NamespaceName = string;
|
|
142
170
|
interface ConfigOrigin {
|
|
143
171
|
file?: string;
|
|
144
172
|
line?: number;
|
|
@@ -306,4 +334,4 @@ interface ExporterPlugin extends CnosPlugin {
|
|
|
306
334
|
export(graph: ResolvedGraph, context: ExportContext): Promise<ExportResult>;
|
|
307
335
|
}
|
|
308
336
|
|
|
309
|
-
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,
|
|
337
|
+
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, VaultDefinition as V, WorkspaceFile as W, DumpPlan as a, DumpOptions as b, DumpResult as c, CnosRuntime as d, CnosPlugin as e, ConfigEntry as f, LogicalKey as g, ToPublicEnvOptions as h, LoadManifestOptions as i, LoadedManifest as j, ValidationSummary as k, ValidationIssue as l, ValidatorPlugin as m, WorkspaceRoot as n, NamespaceName as o };
|
|
@@ -44,6 +44,20 @@ interface WorkspaceContext {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
type ResolutionArrayPolicy = 'replace' | 'append' | 'unique-append';
|
|
47
|
+
type NamespaceKind = 'data' | 'projection' | 'system';
|
|
48
|
+
type NamespaceProjectionSource = 'promote' | 'envMapping';
|
|
49
|
+
type VaultProviderName = 'local' | 'github-secrets' | (string & {});
|
|
50
|
+
interface NamespaceDefinition {
|
|
51
|
+
kind: NamespaceKind;
|
|
52
|
+
shareable: boolean;
|
|
53
|
+
sensitive?: boolean;
|
|
54
|
+
readonly?: boolean;
|
|
55
|
+
source?: NamespaceProjectionSource;
|
|
56
|
+
}
|
|
57
|
+
interface VaultDefinition {
|
|
58
|
+
provider: VaultProviderName;
|
|
59
|
+
passphrase?: string;
|
|
60
|
+
}
|
|
47
61
|
interface ManifestFile {
|
|
48
62
|
version?: number;
|
|
49
63
|
project?: {
|
|
@@ -82,6 +96,8 @@ interface ManifestFile {
|
|
|
82
96
|
promote?: LogicalKey[];
|
|
83
97
|
frameworks?: Record<string, string>;
|
|
84
98
|
};
|
|
99
|
+
namespaces?: Record<string, Partial<NamespaceDefinition>>;
|
|
100
|
+
vaults?: Record<string, Partial<VaultDefinition>>;
|
|
85
101
|
writePolicy?: {
|
|
86
102
|
define?: {
|
|
87
103
|
defaultProfile?: string;
|
|
@@ -128,6 +144,8 @@ interface NormalizedManifest {
|
|
|
128
144
|
promote: LogicalKey[];
|
|
129
145
|
frameworks: Record<string, string>;
|
|
130
146
|
};
|
|
147
|
+
namespaces: Record<string, NamespaceDefinition>;
|
|
148
|
+
vaults: Record<string, VaultDefinition>;
|
|
131
149
|
writePolicy: {
|
|
132
150
|
define: {
|
|
133
151
|
defaultProfile: string;
|
|
@@ -136,9 +154,19 @@ interface NormalizedManifest {
|
|
|
136
154
|
};
|
|
137
155
|
schema: Record<LogicalKey, SchemaRule>;
|
|
138
156
|
}
|
|
157
|
+
interface LoadManifestOptions {
|
|
158
|
+
root?: string;
|
|
159
|
+
}
|
|
160
|
+
interface LoadedManifest {
|
|
161
|
+
manifestRoot: string;
|
|
162
|
+
repoRoot: string;
|
|
163
|
+
manifestPath: string;
|
|
164
|
+
manifest: NormalizedManifest;
|
|
165
|
+
rawManifest: ManifestFile;
|
|
166
|
+
}
|
|
139
167
|
|
|
140
168
|
type LogicalKey = string;
|
|
141
|
-
type NamespaceName =
|
|
169
|
+
type NamespaceName = string;
|
|
142
170
|
interface ConfigOrigin {
|
|
143
171
|
file?: string;
|
|
144
172
|
line?: number;
|
|
@@ -306,4 +334,4 @@ interface ExporterPlugin extends CnosPlugin {
|
|
|
306
334
|
export(graph: ResolvedGraph, context: ExportContext): Promise<ExportResult>;
|
|
307
335
|
}
|
|
308
336
|
|
|
309
|
-
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,
|
|
337
|
+
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, VaultDefinition as V, WorkspaceFile as W, DumpPlan as a, DumpOptions as b, DumpResult as c, CnosRuntime as d, CnosPlugin as e, ConfigEntry as f, LogicalKey as g, ToPublicEnvOptions as h, LoadManifestOptions as i, LoadedManifest as j, ValidationSummary as k, ValidationIssue as l, ValidatorPlugin as m, WorkspaceRoot as n, NamespaceName as o };
|