everything-dev 1.12.4 → 1.14.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/app.cjs +17 -5
- package/dist/app.cjs.map +1 -1
- package/dist/app.mjs +17 -5
- package/dist/app.mjs.map +1 -1
- package/dist/cli/init.cjs +151 -74
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.d.cts +1 -1
- package/dist/cli/init.d.cts.map +1 -1
- package/dist/cli/init.d.mts +1 -1
- package/dist/cli/init.d.mts.map +1 -1
- package/dist/cli/init.mjs +152 -75
- package/dist/cli/init.mjs.map +1 -1
- package/dist/cli/prompts.cjs +3 -3
- package/dist/cli/prompts.cjs.map +1 -1
- package/dist/cli/prompts.mjs +3 -3
- package/dist/cli/prompts.mjs.map +1 -1
- package/dist/cli/status.cjs +22 -0
- package/dist/cli/status.cjs.map +1 -1
- package/dist/cli/status.mjs +22 -0
- package/dist/cli/status.mjs.map +1 -1
- package/dist/cli/sync.cjs +15 -56
- package/dist/cli/sync.cjs.map +1 -1
- package/dist/cli/sync.mjs +15 -56
- package/dist/cli/sync.mjs.map +1 -1
- package/dist/cli/upgrade.cjs +59 -5
- package/dist/cli/upgrade.cjs.map +1 -1
- package/dist/cli/upgrade.mjs +59 -5
- package/dist/cli/upgrade.mjs.map +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/config.cjs +206 -69
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts +13 -6
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +13 -6
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +201 -71
- package/dist/config.mjs.map +1 -1
- package/dist/contract.d.cts +106 -10
- package/dist/contract.d.cts.map +1 -1
- package/dist/contract.d.mts +106 -10
- package/dist/contract.d.mts.map +1 -1
- package/dist/host.cjs +34 -1
- package/dist/host.cjs.map +1 -1
- package/dist/host.d.cts.map +1 -1
- package/dist/host.d.mts.map +1 -1
- package/dist/host.mjs +34 -1
- package/dist/host.mjs.map +1 -1
- package/dist/index.cjs +16 -0
- package/dist/index.d.cts +5 -3
- package/dist/index.d.mts +5 -3
- package/dist/index.mjs +5 -3
- package/dist/internal/manifest-normalizer.cjs +14 -1
- package/dist/internal/manifest-normalizer.cjs.map +1 -1
- package/dist/internal/manifest-normalizer.mjs +14 -1
- package/dist/internal/manifest-normalizer.mjs.map +1 -1
- package/dist/merge.cjs +113 -0
- package/dist/merge.cjs.map +1 -0
- package/dist/merge.d.cts +7 -0
- package/dist/merge.d.cts.map +1 -0
- package/dist/merge.d.mts +7 -0
- package/dist/merge.d.mts.map +1 -0
- package/dist/merge.mjs +107 -0
- package/dist/merge.mjs.map +1 -0
- package/dist/orchestrator.d.cts +1 -1
- package/dist/orchestrator.d.mts +1 -1
- package/dist/plugin.cjs +117 -105
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +115 -9
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts +115 -9
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +117 -105
- package/dist/plugin.mjs.map +1 -1
- package/dist/service-descriptor.cjs +21 -0
- package/dist/service-descriptor.cjs.map +1 -1
- package/dist/service-descriptor.d.cts +23 -1
- package/dist/service-descriptor.d.cts.map +1 -1
- package/dist/service-descriptor.d.mts +23 -1
- package/dist/service-descriptor.d.mts.map +1 -1
- package/dist/service-descriptor.mjs +21 -0
- package/dist/service-descriptor.mjs.map +1 -1
- package/dist/shared.cjs +24 -2
- package/dist/shared.cjs.map +1 -1
- package/dist/shared.d.cts +3 -0
- package/dist/shared.d.cts.map +1 -1
- package/dist/shared.d.mts +3 -0
- package/dist/shared.d.mts.map +1 -1
- package/dist/shared.mjs +25 -3
- package/dist/shared.mjs.map +1 -1
- package/dist/sidebar.cjs +124 -0
- package/dist/sidebar.cjs.map +1 -0
- package/dist/sidebar.d.cts +8 -0
- package/dist/sidebar.d.cts.map +1 -0
- package/dist/sidebar.d.mts +8 -0
- package/dist/sidebar.d.mts.map +1 -0
- package/dist/sidebar.mjs +122 -0
- package/dist/sidebar.mjs.map +1 -0
- package/dist/types.cjs +104 -10
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +256 -29
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +256 -29
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +100 -11
- package/dist/types.mjs.map +1 -1
- package/dist/utils/path-match.cjs +18 -0
- package/dist/utils/path-match.cjs.map +1 -0
- package/dist/utils/path-match.mjs +17 -0
- package/dist/utils/path-match.mjs.map +1 -0
- package/dist/utils/save-config.cjs +19 -0
- package/dist/utils/save-config.cjs.map +1 -0
- package/dist/utils/save-config.mjs +18 -0
- package/dist/utils/save-config.mjs.map +1 -0
- package/package.json +6 -6
- package/skills/dev-workflow/SKILL.md +8 -0
- package/skills/extends-config/SKILL.md +132 -0
- package/skills/init-upgrade/SKILL.md +128 -0
- package/skills/publish-sync/SKILL.md +30 -0
- package/src/app.ts +15 -5
- package/src/cli/init.ts +207 -108
- package/src/cli/prompts.ts +2 -2
- package/src/cli/status.ts +20 -0
- package/src/cli/sync.ts +27 -96
- package/src/cli/upgrade.ts +65 -3
- package/src/cli.ts +1 -1
- package/src/config.ts +306 -119
- package/src/host.ts +45 -0
- package/src/index.ts +1 -0
- package/src/internal/manifest-normalizer.ts +16 -4
- package/src/merge.ts +198 -0
- package/src/plugin.ts +340 -318
- package/src/service-descriptor.ts +23 -0
- package/src/shared.ts +48 -5
- package/src/sidebar.ts +162 -0
- package/src/types.ts +134 -28
- package/src/utils/path-match.ts +16 -0
- package/src/utils/save-config.ts +20 -0
- package/cli.js +0 -10
package/dist/merge.cjs
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
let defu = require("defu");
|
|
3
|
+
|
|
4
|
+
//#region src/merge.ts
|
|
5
|
+
const BOS_CONFIG_ORDER = [
|
|
6
|
+
"extends",
|
|
7
|
+
"account",
|
|
8
|
+
"domain",
|
|
9
|
+
"testnet",
|
|
10
|
+
"staging",
|
|
11
|
+
"repository",
|
|
12
|
+
"app",
|
|
13
|
+
"plugins",
|
|
14
|
+
"shared"
|
|
15
|
+
];
|
|
16
|
+
const ARRAY_UNION_KEYS = new Set(["secrets"]);
|
|
17
|
+
function isPlainObject(value) {
|
|
18
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
19
|
+
}
|
|
20
|
+
function unionArrays(a, b) {
|
|
21
|
+
const aArr = Array.isArray(a) ? a : [];
|
|
22
|
+
const bArr = Array.isArray(b) ? b : [];
|
|
23
|
+
if (aArr.length === 0 && bArr.length === 0) return void 0;
|
|
24
|
+
const seen = /* @__PURE__ */ new Set();
|
|
25
|
+
const result = [];
|
|
26
|
+
for (const item of [...aArr, ...bArr]) {
|
|
27
|
+
if (typeof item === "string") {
|
|
28
|
+
if (seen.has(item)) continue;
|
|
29
|
+
seen.add(item);
|
|
30
|
+
}
|
|
31
|
+
result.push(item);
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
function cleanNullSentinels(obj) {
|
|
36
|
+
const out = {};
|
|
37
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
38
|
+
if (value === null || value === void 0) continue;
|
|
39
|
+
if (isPlainObject(value)) {
|
|
40
|
+
const cleaned = cleanNullSentinels(value);
|
|
41
|
+
if (Object.keys(cleaned).length > 0) out[key] = cleaned;
|
|
42
|
+
} else out[key] = value;
|
|
43
|
+
}
|
|
44
|
+
return out;
|
|
45
|
+
}
|
|
46
|
+
const bosConfigMerger = (0, defu.createDefu)((obj, key, value) => {
|
|
47
|
+
if (obj[key] === null) return true;
|
|
48
|
+
if (value === null) {
|
|
49
|
+
obj[key] = null;
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
if (Array.isArray(obj[key]) && Array.isArray(value)) {
|
|
53
|
+
if (ARRAY_UNION_KEYS.has(key)) obj[key] = unionArrays(obj[key], value);
|
|
54
|
+
else obj[key] = value;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
return false;
|
|
58
|
+
});
|
|
59
|
+
function resolveExtendsRef(extendsField, env) {
|
|
60
|
+
if (!extendsField) return void 0;
|
|
61
|
+
if (typeof extendsField === "string") return extendsField;
|
|
62
|
+
return extendsField[env] ?? extendsField.production ?? Object.values(extendsField).find(Boolean);
|
|
63
|
+
}
|
|
64
|
+
function mergeBosConfigWithExtends(parent, child) {
|
|
65
|
+
const merged = bosConfigMerger(child, parent);
|
|
66
|
+
if (isPlainObject(parent.plugins) && isPlainObject(child.plugins)) {
|
|
67
|
+
const plugins = { ...parent.plugins };
|
|
68
|
+
for (const [key, rawValue] of Object.entries(child.plugins)) {
|
|
69
|
+
const value = rawValue;
|
|
70
|
+
if (value === null || value === false) delete plugins[key];
|
|
71
|
+
else if (isPlainObject(plugins[key]) && isPlainObject(value)) plugins[key] = bosConfigMerger(value, plugins[key]);
|
|
72
|
+
else plugins[key] = value;
|
|
73
|
+
}
|
|
74
|
+
merged.plugins = plugins;
|
|
75
|
+
} else if (child.plugins !== void 0) merged.plugins = cleanNullSentinels(child.plugins);
|
|
76
|
+
const mergedRecord = merged;
|
|
77
|
+
if (isPlainObject(mergedRecord.app)) for (const entryVal of Object.values(mergedRecord.app)) {
|
|
78
|
+
if (!isPlainObject(entryVal)) continue;
|
|
79
|
+
for (const secretKey of ARRAY_UNION_KEYS) if (Array.isArray(entryVal[secretKey])) entryVal[secretKey] = unionArrays(entryVal[secretKey], [])?.filter(Boolean) ?? entryVal[secretKey];
|
|
80
|
+
}
|
|
81
|
+
if (isPlainObject(mergedRecord.plugins)) for (const pluginVal of Object.values(mergedRecord.plugins)) {
|
|
82
|
+
if (!isPlainObject(pluginVal)) continue;
|
|
83
|
+
for (const secretKey of ARRAY_UNION_KEYS) if (Array.isArray(pluginVal[secretKey])) pluginVal[secretKey] = unionArrays(pluginVal[secretKey], [])?.filter(Boolean) ?? pluginVal[secretKey];
|
|
84
|
+
}
|
|
85
|
+
return rebuildOrderedConfig(mergedRecord);
|
|
86
|
+
}
|
|
87
|
+
function mergeBosConfigWithTemplate(local, template) {
|
|
88
|
+
return rebuildOrderedConfig(mergeJsonValuesPreservingLocalOrder(local, template));
|
|
89
|
+
}
|
|
90
|
+
function mergeJsonValuesPreservingLocalOrder(local, template) {
|
|
91
|
+
if (isPlainObject(local) && isPlainObject(template)) {
|
|
92
|
+
const merged = {};
|
|
93
|
+
for (const key of Object.keys(local)) merged[key] = mergeJsonValuesPreservingLocalOrder(local[key], template[key]);
|
|
94
|
+
for (const key of Object.keys(template)) if (!(key in merged)) merged[key] = template[key];
|
|
95
|
+
return merged;
|
|
96
|
+
}
|
|
97
|
+
return local ?? template;
|
|
98
|
+
}
|
|
99
|
+
function rebuildOrderedConfig(config) {
|
|
100
|
+
const ordered = {};
|
|
101
|
+
for (const key of BOS_CONFIG_ORDER) if (key in config) ordered[key] = config[key];
|
|
102
|
+
for (const key of Object.keys(config)) if (!BOS_CONFIG_ORDER.includes(key)) ordered[key] = config[key];
|
|
103
|
+
return ordered;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
//#endregion
|
|
107
|
+
exports.BOS_CONFIG_ORDER = BOS_CONFIG_ORDER;
|
|
108
|
+
exports.isPlainObject = isPlainObject;
|
|
109
|
+
exports.mergeBosConfigWithExtends = mergeBosConfigWithExtends;
|
|
110
|
+
exports.mergeBosConfigWithTemplate = mergeBosConfigWithTemplate;
|
|
111
|
+
exports.rebuildOrderedConfig = rebuildOrderedConfig;
|
|
112
|
+
exports.resolveExtendsRef = resolveExtendsRef;
|
|
113
|
+
//# sourceMappingURL=merge.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.cjs","names":[],"sources":["../src/merge.ts"],"sourcesContent":["import { createDefu } from \"defu\";\nimport type { BosConfigInput, ExtendsConfig } from \"./types\";\n\nexport const BOS_CONFIG_ORDER = [\n \"extends\",\n \"account\",\n \"domain\",\n \"testnet\",\n \"staging\",\n \"repository\",\n \"app\",\n \"plugins\",\n \"shared\",\n] as const;\n\nexport type BosConfigFieldName = (typeof BOS_CONFIG_ORDER)[number];\n\nexport type BosEnv = \"development\" | \"production\" | \"staging\";\n\nexport interface ResolvedConfigMeta {\n env: BosEnv;\n resolvedAt: string;\n extendsChain: string[];\n source?: string;\n}\n\nconst ARRAY_UNION_KEYS = new Set([\"secrets\"]);\n\nexport function isPlainObject(value: unknown): value is Record<string, unknown> {\n return Boolean(value) && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction unionArrays(a: unknown, b: unknown): unknown[] | undefined {\n const aArr = Array.isArray(a) ? a : [];\n const bArr = Array.isArray(b) ? b : [];\n if (aArr.length === 0 && bArr.length === 0) return undefined;\n const seen = new Set<string>();\n const result: unknown[] = [];\n for (const item of [...aArr, ...bArr]) {\n if (typeof item === \"string\") {\n if (seen.has(item)) continue;\n seen.add(item);\n }\n result.push(item);\n }\n return result;\n}\n\nfunction cleanNullSentinels(obj: Record<string, unknown>): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(obj)) {\n if (value === null || value === undefined) continue;\n if (isPlainObject(value)) {\n const cleaned = cleanNullSentinels(value);\n if (Object.keys(cleaned).length > 0) {\n out[key] = cleaned;\n }\n } else {\n out[key] = value;\n }\n }\n return out;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst bosConfigMerger = createDefu((obj: any, key: any, value: any): boolean | undefined => {\n if (obj[key] === null) return true;\n if (value === null) {\n obj[key] = null;\n return true;\n }\n if (Array.isArray(obj[key]) && Array.isArray(value)) {\n if (ARRAY_UNION_KEYS.has(key)) {\n obj[key] = unionArrays(obj[key], value);\n } else {\n obj[key] = value;\n }\n return true;\n }\n return false;\n});\n\nexport function resolveExtendsRef(\n extendsField: string | ExtendsConfig | undefined,\n env: BosEnv,\n): string | undefined {\n if (!extendsField) return undefined;\n if (typeof extendsField === \"string\") return extendsField;\n return extendsField[env] ?? extendsField.production ?? Object.values(extendsField).find(Boolean);\n}\n\nexport function mergeBosConfigWithExtends(\n parent: BosConfigInput,\n child: BosConfigInput,\n): BosConfigInput {\n const merged = bosConfigMerger(child, parent) as BosConfigInput;\n\n if (isPlainObject(parent.plugins) && isPlainObject(child.plugins)) {\n const plugins: Record<string, unknown> = { ...parent.plugins };\n for (const [key, rawValue] of Object.entries(child.plugins)) {\n const value = rawValue as unknown;\n if (value === null || value === false) {\n delete plugins[key];\n } else if (isPlainObject(plugins[key]) && isPlainObject(value)) {\n plugins[key] = bosConfigMerger(\n value as Record<string, unknown>,\n plugins[key] as Record<string, unknown>,\n );\n } else {\n plugins[key] = value;\n }\n }\n (merged as Record<string, unknown>).plugins = plugins;\n } else if (child.plugins !== undefined) {\n (merged as Record<string, unknown>).plugins = cleanNullSentinels(\n child.plugins as Record<string, unknown>,\n );\n }\n\n const mergedRecord = merged as Record<string, unknown>;\n\n if (isPlainObject(mergedRecord.app)) {\n for (const entryVal of Object.values(mergedRecord.app as Record<string, unknown>)) {\n if (!isPlainObject(entryVal)) continue;\n for (const secretKey of ARRAY_UNION_KEYS) {\n if (Array.isArray(entryVal[secretKey])) {\n entryVal[secretKey] =\n (unionArrays(entryVal[secretKey] as unknown[], []) as string[] | undefined)?.filter(\n Boolean,\n ) ?? entryVal[secretKey];\n }\n }\n }\n }\n\n if (isPlainObject(mergedRecord.plugins)) {\n for (const pluginVal of Object.values(mergedRecord.plugins as Record<string, unknown>)) {\n if (!isPlainObject(pluginVal)) continue;\n for (const secretKey of ARRAY_UNION_KEYS) {\n if (Array.isArray(pluginVal[secretKey])) {\n pluginVal[secretKey] =\n (unionArrays(pluginVal[secretKey] as unknown[], []) as string[] | undefined)?.filter(\n Boolean,\n ) ?? pluginVal[secretKey];\n }\n }\n }\n }\n\n return rebuildOrderedConfig(mergedRecord) as BosConfigInput;\n}\n\nexport function mergeBosConfigWithTemplate(\n local: BosConfigInput,\n template: BosConfigInput,\n): BosConfigInput {\n const merged = mergeJsonValuesPreservingLocalOrder(local, template) as BosConfigInput;\n return rebuildOrderedConfig(merged as Record<string, unknown>) as BosConfigInput;\n}\n\nfunction mergeJsonValuesPreservingLocalOrder(local: unknown, template: unknown): unknown {\n if (isPlainObject(local) && isPlainObject(template)) {\n const merged: Record<string, unknown> = {};\n for (const key of Object.keys(local)) {\n merged[key] = mergeJsonValuesPreservingLocalOrder(\n local[key],\n (template as Record<string, unknown>)[key],\n );\n }\n for (const key of Object.keys(template as Record<string, unknown>)) {\n if (!(key in merged)) {\n merged[key] = (template as Record<string, unknown>)[key];\n }\n }\n return merged;\n }\n return local ?? template;\n}\n\nexport function rebuildOrderedConfig<T extends Record<string, unknown>>(config: T): T {\n const ordered: Record<string, unknown> = {};\n\n for (const key of BOS_CONFIG_ORDER) {\n if (key in config) {\n ordered[key] = config[key];\n }\n }\n\n for (const key of Object.keys(config)) {\n if (!BOS_CONFIG_ORDER.includes(key as BosConfigFieldName)) {\n ordered[key] = config[key];\n }\n }\n\n return ordered as T;\n}\n\nexport { bosConfigMerger };\n"],"mappings":";;;;AAGA,MAAa,mBAAmB;CAC9B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAaD,MAAM,mBAAmB,IAAI,IAAI,CAAC,UAAU,CAAC;AAE7C,SAAgB,cAAc,OAAkD;AAC9E,QAAO,QAAQ,MAAM,IAAI,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,MAAM;;AAG7E,SAAS,YAAY,GAAY,GAAmC;CAClE,MAAM,OAAO,MAAM,QAAQ,EAAE,GAAG,IAAI,EAAE;CACtC,MAAM,OAAO,MAAM,QAAQ,EAAE,GAAG,IAAI,EAAE;AACtC,KAAI,KAAK,WAAW,KAAK,KAAK,WAAW,EAAG,QAAO;CACnD,MAAM,uBAAO,IAAI,KAAa;CAC9B,M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O,QACX,QAAO,OAAQ,SAAqC;AAGxD,SAAO;;AAET,QAAO,SAAS;;AAGlB,SAAgB,qBAAwD,QAAc;CACpF,MAAM,UAAmC,EAAE;AAE3C,MAAK,MAAM,OAAO,iBAChB,KAAI,OAAO,OACT,SAAQ,OAAO,OAAO;AAI1B,MAAK,MAAM,OAAO,OAAO,KAAK,OAAO,CACnC,KAAI,CAAC,iBAAiB,SAAS,IAA0B,CACvD,SAAQ,OAAO,OAAO;AAI1B,QAAO"}
|
package/dist/merge.d.cts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/merge.d.ts
|
|
2
|
+
declare const BOS_CONFIG_ORDER: readonly ["extends", "account", "domain", "testnet", "staging", "repository", "app", "plugins", "shared"];
|
|
3
|
+
type BosEnv = "development" | "production" | "staging";
|
|
4
|
+
declare function rebuildOrderedConfig<T extends Record<string, unknown>>(config: T): T;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { BOS_CONFIG_ORDER, BosEnv, rebuildOrderedConfig };
|
|
7
|
+
//# sourceMappingURL=merge.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.d.cts","names":[],"sources":["../src/merge.ts"],"mappings":";cAGa,gBAAA;AAAA,KAcD,MAAA;AAAA,iBAkKI,oBAAA,WAA+B,MAAA,kBAAA,CAAyB,MAAA,EAAQ,CAAA,GAAI,CAAA"}
|
package/dist/merge.d.mts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/merge.d.ts
|
|
2
|
+
declare const BOS_CONFIG_ORDER: readonly ["extends", "account", "domain", "testnet", "staging", "repository", "app", "plugins", "shared"];
|
|
3
|
+
type BosEnv = "development" | "production" | "staging";
|
|
4
|
+
declare function rebuildOrderedConfig<T extends Record<string, unknown>>(config: T): T;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { BOS_CONFIG_ORDER, BosEnv, rebuildOrderedConfig };
|
|
7
|
+
//# sourceMappingURL=merge.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.d.mts","names":[],"sources":["../src/merge.ts"],"mappings":";cAGa,gBAAA;AAAA,KAcD,MAAA;AAAA,iBAkKI,oBAAA,WAA+B,MAAA,kBAAA,CAAyB,MAAA,EAAQ,CAAA,GAAI,CAAA"}
|
package/dist/merge.mjs
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { createDefu } from "defu";
|
|
2
|
+
|
|
3
|
+
//#region src/merge.ts
|
|
4
|
+
const BOS_CONFIG_ORDER = [
|
|
5
|
+
"extends",
|
|
6
|
+
"account",
|
|
7
|
+
"domain",
|
|
8
|
+
"testnet",
|
|
9
|
+
"staging",
|
|
10
|
+
"repository",
|
|
11
|
+
"app",
|
|
12
|
+
"plugins",
|
|
13
|
+
"shared"
|
|
14
|
+
];
|
|
15
|
+
const ARRAY_UNION_KEYS = new Set(["secrets"]);
|
|
16
|
+
function isPlainObject(value) {
|
|
17
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
18
|
+
}
|
|
19
|
+
function unionArrays(a, b) {
|
|
20
|
+
const aArr = Array.isArray(a) ? a : [];
|
|
21
|
+
const bArr = Array.isArray(b) ? b : [];
|
|
22
|
+
if (aArr.length === 0 && bArr.length === 0) return void 0;
|
|
23
|
+
const seen = /* @__PURE__ */ new Set();
|
|
24
|
+
const result = [];
|
|
25
|
+
for (const item of [...aArr, ...bArr]) {
|
|
26
|
+
if (typeof item === "string") {
|
|
27
|
+
if (seen.has(item)) continue;
|
|
28
|
+
seen.add(item);
|
|
29
|
+
}
|
|
30
|
+
result.push(item);
|
|
31
|
+
}
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
function cleanNullSentinels(obj) {
|
|
35
|
+
const out = {};
|
|
36
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
37
|
+
if (value === null || value === void 0) continue;
|
|
38
|
+
if (isPlainObject(value)) {
|
|
39
|
+
const cleaned = cleanNullSentinels(value);
|
|
40
|
+
if (Object.keys(cleaned).length > 0) out[key] = cleaned;
|
|
41
|
+
} else out[key] = value;
|
|
42
|
+
}
|
|
43
|
+
return out;
|
|
44
|
+
}
|
|
45
|
+
const bosConfigMerger = createDefu((obj, key, value) => {
|
|
46
|
+
if (obj[key] === null) return true;
|
|
47
|
+
if (value === null) {
|
|
48
|
+
obj[key] = null;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
if (Array.isArray(obj[key]) && Array.isArray(value)) {
|
|
52
|
+
if (ARRAY_UNION_KEYS.has(key)) obj[key] = unionArrays(obj[key], value);
|
|
53
|
+
else obj[key] = value;
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
return false;
|
|
57
|
+
});
|
|
58
|
+
function resolveExtendsRef(extendsField, env) {
|
|
59
|
+
if (!extendsField) return void 0;
|
|
60
|
+
if (typeof extendsField === "string") return extendsField;
|
|
61
|
+
return extendsField[env] ?? extendsField.production ?? Object.values(extendsField).find(Boolean);
|
|
62
|
+
}
|
|
63
|
+
function mergeBosConfigWithExtends(parent, child) {
|
|
64
|
+
const merged = bosConfigMerger(child, parent);
|
|
65
|
+
if (isPlainObject(parent.plugins) && isPlainObject(child.plugins)) {
|
|
66
|
+
const plugins = { ...parent.plugins };
|
|
67
|
+
for (const [key, rawValue] of Object.entries(child.plugins)) {
|
|
68
|
+
const value = rawValue;
|
|
69
|
+
if (value === null || value === false) delete plugins[key];
|
|
70
|
+
else if (isPlainObject(plugins[key]) && isPlainObject(value)) plugins[key] = bosConfigMerger(value, plugins[key]);
|
|
71
|
+
else plugins[key] = value;
|
|
72
|
+
}
|
|
73
|
+
merged.plugins = plugins;
|
|
74
|
+
} else if (child.plugins !== void 0) merged.plugins = cleanNullSentinels(child.plugins);
|
|
75
|
+
const mergedRecord = merged;
|
|
76
|
+
if (isPlainObject(mergedRecord.app)) for (const entryVal of Object.values(mergedRecord.app)) {
|
|
77
|
+
if (!isPlainObject(entryVal)) continue;
|
|
78
|
+
for (const secretKey of ARRAY_UNION_KEYS) if (Array.isArray(entryVal[secretKey])) entryVal[secretKey] = unionArrays(entryVal[secretKey], [])?.filter(Boolean) ?? entryVal[secretKey];
|
|
79
|
+
}
|
|
80
|
+
if (isPlainObject(mergedRecord.plugins)) for (const pluginVal of Object.values(mergedRecord.plugins)) {
|
|
81
|
+
if (!isPlainObject(pluginVal)) continue;
|
|
82
|
+
for (const secretKey of ARRAY_UNION_KEYS) if (Array.isArray(pluginVal[secretKey])) pluginVal[secretKey] = unionArrays(pluginVal[secretKey], [])?.filter(Boolean) ?? pluginVal[secretKey];
|
|
83
|
+
}
|
|
84
|
+
return rebuildOrderedConfig(mergedRecord);
|
|
85
|
+
}
|
|
86
|
+
function mergeBosConfigWithTemplate(local, template) {
|
|
87
|
+
return rebuildOrderedConfig(mergeJsonValuesPreservingLocalOrder(local, template));
|
|
88
|
+
}
|
|
89
|
+
function mergeJsonValuesPreservingLocalOrder(local, template) {
|
|
90
|
+
if (isPlainObject(local) && isPlainObject(template)) {
|
|
91
|
+
const merged = {};
|
|
92
|
+
for (const key of Object.keys(local)) merged[key] = mergeJsonValuesPreservingLocalOrder(local[key], template[key]);
|
|
93
|
+
for (const key of Object.keys(template)) if (!(key in merged)) merged[key] = template[key];
|
|
94
|
+
return merged;
|
|
95
|
+
}
|
|
96
|
+
return local ?? template;
|
|
97
|
+
}
|
|
98
|
+
function rebuildOrderedConfig(config) {
|
|
99
|
+
const ordered = {};
|
|
100
|
+
for (const key of BOS_CONFIG_ORDER) if (key in config) ordered[key] = config[key];
|
|
101
|
+
for (const key of Object.keys(config)) if (!BOS_CONFIG_ORDER.includes(key)) ordered[key] = config[key];
|
|
102
|
+
return ordered;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
//#endregion
|
|
106
|
+
export { BOS_CONFIG_ORDER, isPlainObject, mergeBosConfigWithExtends, mergeBosConfigWithTemplate, rebuildOrderedConfig, resolveExtendsRef };
|
|
107
|
+
//# sourceMappingURL=merge.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.mjs","names":[],"sources":["../src/merge.ts"],"sourcesContent":["import { createDefu } from \"defu\";\nimport type { BosConfigInput, ExtendsConfig } from \"./types\";\n\nexport const BOS_CONFIG_ORDER = [\n \"extends\",\n \"account\",\n \"domain\",\n \"testnet\",\n \"staging\",\n \"repository\",\n \"app\",\n \"plugins\",\n \"shared\",\n] as const;\n\nexport type BosConfigFieldName = (typeof BOS_CONFIG_ORDER)[number];\n\nexport type BosEnv = \"development\" | \"production\" | \"staging\";\n\nexport interface ResolvedConfigMeta {\n env: BosEnv;\n resolvedAt: string;\n extendsChain: string[];\n source?: string;\n}\n\nconst ARRAY_UNION_KEYS = new Set([\"secrets\"]);\n\nexport function isPlainObject(value: unknown): value is Record<string, unknown> {\n return Boolean(value) && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction unionArrays(a: unknown, b: unknown): unknown[] | undefined {\n const aArr = Array.isArray(a) ? a : [];\n const bArr = Array.isArray(b) ? b : [];\n if (aArr.length === 0 && bArr.length === 0) return undefined;\n const seen = new Set<string>();\n const result: unknown[] = [];\n for (const item of [...aArr, ...bArr]) {\n if (typeof item === \"string\") {\n if (seen.has(item)) continue;\n seen.add(item);\n }\n result.push(item);\n }\n return result;\n}\n\nfunction cleanNullSentinels(obj: Record<string, unknown>): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(obj)) {\n if (value === null || value === undefined) continue;\n if (isPlainObject(value)) {\n const cleaned = cleanNullSentinels(value);\n if (Object.keys(cleaned).length > 0) {\n out[key] = cleaned;\n }\n } else {\n out[key] = value;\n }\n }\n return out;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst bosConfigMerger = createDefu((obj: any, key: any, value: any): boolean | undefined => {\n if (obj[key] === null) return true;\n if (value === null) {\n obj[key] = null;\n return true;\n }\n if (Array.isArray(obj[key]) && Array.isArray(value)) {\n if (ARRAY_UNION_KEYS.has(key)) {\n obj[key] = unionArrays(obj[key], value);\n } else {\n obj[key] = value;\n }\n return true;\n }\n return false;\n});\n\nexport function resolveExtendsRef(\n extendsField: string | ExtendsConfig | undefined,\n env: BosEnv,\n): string | undefined {\n if (!extendsField) return undefined;\n if (typeof extendsField === \"string\") return extendsField;\n return extendsField[env] ?? extendsField.production ?? Object.values(extendsField).find(Boolean);\n}\n\nexport function mergeBosConfigWithExtends(\n parent: BosConfigInput,\n child: BosConfigInput,\n): BosConfigInput {\n const merged = bosConfigMerger(child, parent) as BosConfigInput;\n\n if (isPlainObject(parent.plugins) && isPlainObject(child.plugins)) {\n const plugins: Record<string, unknown> = { ...parent.plugins };\n for (const [key, rawValue] of Object.entries(child.plugins)) {\n const value = rawValue as unknown;\n if (value === null || value === false) {\n delete plugins[key];\n } else if (isPlainObject(plugins[key]) && isPlainObject(value)) {\n plugins[key] = bosConfigMerger(\n value as Record<string, unknown>,\n plugins[key] as Record<string, unknown>,\n );\n } else {\n plugins[key] = value;\n }\n }\n (merged as Record<string, unknown>).plugins = plugins;\n } else if (child.plugins !== undefined) {\n (merged as Record<string, unknown>).plugins = cleanNullSentinels(\n child.plugins as Record<string, unknown>,\n );\n }\n\n const mergedRecord = merged as Record<string, unknown>;\n\n if (isPlainObject(mergedRecord.app)) {\n for (const entryVal of Object.values(mergedRecord.app as Record<string, unknown>)) {\n if (!isPlainObject(entryVal)) continue;\n for (const secretKey of ARRAY_UNION_KEYS) {\n if (Array.isArray(entryVal[secretKey])) {\n entryVal[secretKey] =\n (unionArrays(entryVal[secretKey] as unknown[], []) as string[] | undefined)?.filter(\n Boolean,\n ) ?? entryVal[secretKey];\n }\n }\n }\n }\n\n if (isPlainObject(mergedRecord.plugins)) {\n for (const pluginVal of Object.values(mergedRecord.plugins as Record<string, unknown>)) {\n if (!isPlainObject(pluginVal)) continue;\n for (const secretKey of ARRAY_UNION_KEYS) {\n if (Array.isArray(pluginVal[secretKey])) {\n pluginVal[secretKey] =\n (unionArrays(pluginVal[secretKey] as unknown[], []) as string[] | undefined)?.filter(\n Boolean,\n ) ?? pluginVal[secretKey];\n }\n }\n }\n }\n\n return rebuildOrderedConfig(mergedRecord) as BosConfigInput;\n}\n\nexport function mergeBosConfigWithTemplate(\n local: BosConfigInput,\n template: BosConfigInput,\n): BosConfigInput {\n const merged = mergeJsonValuesPreservingLocalOrder(local, template) as BosConfigInput;\n return rebuildOrderedConfig(merged as Record<string, unknown>) as BosConfigInput;\n}\n\nfunction mergeJsonValuesPreservingLocalOrder(local: unknown, template: unknown): unknown {\n if (isPlainObject(local) && isPlainObject(template)) {\n const merged: Record<string, unknown> = {};\n for (const key of Object.keys(local)) {\n merged[key] = mergeJsonValuesPreservingLocalOrder(\n local[key],\n (template as Record<string, unknown>)[key],\n );\n }\n for (const key of Object.keys(template as Record<string, unknown>)) {\n if (!(key in merged)) {\n merged[key] = (template as Record<string, unknown>)[key];\n }\n }\n return merged;\n }\n return local ?? template;\n}\n\nexport function rebuildOrderedConfig<T extends Record<string, unknown>>(config: T): T {\n const ordered: Record<string, unknown> = {};\n\n for (const key of BOS_CONFIG_ORDER) {\n if (key in config) {\n ordered[key] = config[key];\n }\n }\n\n for (const key of Object.keys(config)) {\n if (!BOS_CONFIG_ORDER.includes(key as BosConfigFieldName)) {\n ordered[key] = config[key];\n }\n }\n\n return ordered as T;\n}\n\nexport { bosConfigMerger };\n"],"mappings":";;;AAGA,MAAa,mBAAmB;CAC9B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAaD,MAAM,mBAAmB,IAAI,IAAI,CAAC,UAAU,CAAC;AAE7C,SAAgB,cAAc,OAAkD;AAC9E,QAAO,QAAQ,MAAM,IAAI,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,MAAM;;AAG7E,SAAS,YAAY,GAAY,GAAmC;CAClE,MAAM,OAAO,MAAM,QAAQ,EAAE,GAAG,IAAI,EAAE;CACtC,MAAM,OAAO,MAAM,QAAQ,EAAE,G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M,CAClC,QAAO,OAAO,oCACZ,MAAM,MACL,SAAqC,KACvC;AAEH,OAAK,MAAM,OAAO,OAAO,KAAK,SAAoC,CAChE,KAAI,EAAE,OAAO,QACX,QAAO,OAAQ,SAAqC;AAGxD,SAAO;;AAET,QAAO,SAAS;;AAGlB,SAAgB,qBAAwD,QAAc;CACpF,MAAM,UAAmC,EAAE;AAE3C,MAAK,MAAM,OAAO,iBAChB,KAAI,OAAO,OACT,SAAQ,OAAO,OAAO;AAI1B,MAAK,MAAM,OAAO,OAAO,KAAK,OAAO,CACnC,KAAI,CAAC,iBAAiB,SAAS,IAA0B,CACvD,SAAQ,OAAO,OAAO;AAI1B,QAAO"}
|
package/dist/orchestrator.d.cts
CHANGED
|
@@ -37,7 +37,7 @@ declare const makeDevProcess: (pkg: string, callbacks: ProcessCallbacks, portOve
|
|
|
37
37
|
kill: Effect.Effect<void, never, never>;
|
|
38
38
|
waitForReady: Effect.Effect<void, Error, never>;
|
|
39
39
|
waitForExit: Effect.Effect<ExitCode, _$_effect_platform_Error0.PlatformError, never>;
|
|
40
|
-
}, string | Error | _$_effect_platform_Error0.PlatformError,
|
|
40
|
+
}, string | Error | _$_effect_platform_Error0.PlatformError, _$effect_Scope0.Scope | ServiceDescriptorMap | DevRuntimeConfig | _$_effect_platform_CommandExecutor0.CommandExecutor>;
|
|
41
41
|
declare function getProcessStates(packages: string[], services: Map<string, ServiceDescriptor>, portOverride?: number): ProcessState[];
|
|
42
42
|
//#endregion
|
|
43
43
|
export { ProcessCallbacks, ProcessHandle, ProcessState, ProcessStatus, getProcessStates, makeDevProcess };
|
package/dist/orchestrator.d.mts
CHANGED
|
@@ -37,7 +37,7 @@ declare const makeDevProcess: (pkg: string, callbacks: ProcessCallbacks, portOve
|
|
|
37
37
|
kill: Effect.Effect<void, never, never>;
|
|
38
38
|
waitForReady: Effect.Effect<void, Error, never>;
|
|
39
39
|
waitForExit: Effect.Effect<ExitCode, _$_effect_platform_Error0.PlatformError, never>;
|
|
40
|
-
}, string | Error | _$_effect_platform_Error0.PlatformError,
|
|
40
|
+
}, string | Error | _$_effect_platform_Error0.PlatformError, _$effect_Scope0.Scope | ServiceDescriptorMap | DevRuntimeConfig | _$_effect_platform_CommandExecutor0.CommandExecutor>;
|
|
41
41
|
declare function getProcessStates(packages: string[], services: Map<string, ServiceDescriptor>, portOverride?: number): ProcessState[];
|
|
42
42
|
//#endregion
|
|
43
43
|
export { ProcessCallbacks, ProcessHandle, ProcessState, ProcessStatus, getProcessStates, makeDevProcess };
|