@guanjinke/artifact-client 1.3.0 → 1.5.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 +186 -229
- package/dist/cli/config-manager.d.ts +15 -0
- package/dist/cli/config-manager.d.ts.map +1 -1
- package/dist/cli/config-manager.js +31 -0
- package/dist/cli/config-manager.js.map +1 -1
- package/dist/cli/environment.d.ts +7 -0
- package/dist/cli/environment.d.ts.map +1 -0
- package/dist/cli/environment.js +200 -0
- package/dist/cli/environment.js.map +1 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +160 -2
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli.js +4 -1
- package/dist/cli.js.map +1 -1
- package/dist/environment/archive.d.ts +7 -0
- package/dist/environment/archive.d.ts.map +1 -0
- package/dist/environment/archive.js +132 -0
- package/dist/environment/archive.js.map +1 -0
- package/dist/environment/builder.d.ts +6 -0
- package/dist/environment/builder.d.ts.map +1 -0
- package/dist/environment/builder.js +323 -0
- package/dist/environment/builder.js.map +1 -0
- package/dist/environment/catalog.d.ts +9 -0
- package/dist/environment/catalog.d.ts.map +1 -0
- package/dist/environment/catalog.js +35 -0
- package/dist/environment/catalog.js.map +1 -0
- package/dist/environment/config.d.ts +8 -0
- package/dist/environment/config.d.ts.map +1 -0
- package/dist/environment/config.js +60 -0
- package/dist/environment/config.js.map +1 -0
- package/dist/environment/manager.d.ts +43 -0
- package/dist/environment/manager.d.ts.map +1 -0
- package/dist/environment/manager.js +383 -0
- package/dist/environment/manager.js.map +1 -0
- package/dist/environment/plan.d.ts +10 -0
- package/dist/environment/plan.d.ts.map +1 -0
- package/dist/environment/plan.js +131 -0
- package/dist/environment/plan.js.map +1 -0
- package/dist/environment/process.d.ts +94 -0
- package/dist/environment/process.d.ts.map +1 -0
- package/dist/environment/process.js +381 -0
- package/dist/environment/process.js.map +1 -0
- package/dist/environment/registry.d.ts +45 -0
- package/dist/environment/registry.d.ts.map +1 -0
- package/dist/environment/registry.js +157 -0
- package/dist/environment/registry.js.map +1 -0
- package/dist/environment/root.d.ts +33 -0
- package/dist/environment/root.d.ts.map +1 -0
- package/dist/environment/root.js +119 -0
- package/dist/environment/root.js.map +1 -0
- package/dist/environment/types.d.ts +66 -0
- package/dist/environment/types.d.ts.map +1 -0
- package/dist/environment/types.js +3 -0
- package/dist/environment/types.js.map +1 -0
- package/dist/environment/update.d.ts +106 -0
- package/dist/environment/update.d.ts.map +1 -0
- package/dist/environment/update.js +810 -0
- package/dist/environment/update.js.map +1 -0
- package/dist/environment/validate.d.ts +36 -0
- package/dist/environment/validate.d.ts.map +1 -0
- package/dist/environment/validate.js +147 -0
- package/dist/environment/validate.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +13 -4
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.validateArchivePath = validateArchivePath;
|
|
37
|
+
exports.extractArchive = extractArchive;
|
|
38
|
+
const fs = __importStar(require("fs"));
|
|
39
|
+
const fsp = __importStar(require("fs/promises"));
|
|
40
|
+
const path = __importStar(require("path"));
|
|
41
|
+
const promises_1 = require("stream/promises");
|
|
42
|
+
const stream_1 = require("stream");
|
|
43
|
+
const yauzl = __importStar(require("yauzl"));
|
|
44
|
+
const crc32 = require("buffer-crc32");
|
|
45
|
+
function validateArchivePath(name) {
|
|
46
|
+
if (!name || /[\\:\x00-\x1f\x7f]/.test(name) || name.startsWith('/'))
|
|
47
|
+
throw new Error('Unsafe ZIP path.');
|
|
48
|
+
const directory = name.endsWith('/');
|
|
49
|
+
const segments = (directory ? name.slice(0, -1) : name).split('/');
|
|
50
|
+
if (segments.some(s => !s || s === '.' || s === '..' || /[. ]$/.test(s) || /[<>"|?*]/.test(s) || /^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\.|$)/i.test(s)))
|
|
51
|
+
throw new Error('Unsafe Windows ZIP path.');
|
|
52
|
+
return segments.join('/');
|
|
53
|
+
}
|
|
54
|
+
async function extractArchive(archive, destination, limits = {}) {
|
|
55
|
+
await fsp.mkdir(destination, { recursive: true });
|
|
56
|
+
const maxEntries = limits.maxEntries ?? 100000;
|
|
57
|
+
const maxBytes = limits.maxBytes ?? 20 * 1024 * 1024 * 1024;
|
|
58
|
+
const zip = await new Promise((resolve, reject) => yauzl.open(archive, { lazyEntries: true, autoClose: false, strictFileNames: true, validateEntrySizes: true }, (err, file) => err || !file ? reject(err ?? new Error('Invalid ZIP')) : resolve(file)));
|
|
59
|
+
const known = new Map();
|
|
60
|
+
let count = 0;
|
|
61
|
+
let bytes = 0;
|
|
62
|
+
let actualBytes = 0;
|
|
63
|
+
try {
|
|
64
|
+
await new Promise((resolve, reject) => {
|
|
65
|
+
let failed = false;
|
|
66
|
+
const fail = (error) => { if (!failed) {
|
|
67
|
+
failed = true;
|
|
68
|
+
reject(error);
|
|
69
|
+
} };
|
|
70
|
+
zip.on('error', fail);
|
|
71
|
+
zip.on('end', resolve);
|
|
72
|
+
zip.on('entry', (entry) => {
|
|
73
|
+
void (async () => {
|
|
74
|
+
if (++count > maxEntries || (bytes += entry.uncompressedSize) > maxBytes)
|
|
75
|
+
throw new Error('ZIP resource limit exceeded.');
|
|
76
|
+
if ((entry.generalPurposeBitFlag & 1) !== 0)
|
|
77
|
+
throw new Error('Encrypted ZIP entries are unsupported.');
|
|
78
|
+
const mode = (entry.externalFileAttributes >>> 16) & 0xf000;
|
|
79
|
+
if (mode && mode !== 0x8000 && mode !== 0x4000)
|
|
80
|
+
throw new Error('ZIP links and special files are forbidden.');
|
|
81
|
+
const relative = validateArchivePath(entry.fileName);
|
|
82
|
+
const directory = entry.fileName.endsWith('/');
|
|
83
|
+
if ((mode === 0x4000 && !directory) || (directory && (mode === 0x8000 || entry.uncompressedSize !== 0)))
|
|
84
|
+
throw new Error('Inconsistent ZIP directory.');
|
|
85
|
+
const originalParts = relative.split('/');
|
|
86
|
+
const parts = relative.toLowerCase().split('/');
|
|
87
|
+
for (let i = 1; i < parts.length; i++) {
|
|
88
|
+
const parent = parts.slice(0, i).join('/');
|
|
89
|
+
const spelling = originalParts.slice(0, i).join('/');
|
|
90
|
+
const previous = known.get(parent);
|
|
91
|
+
if (previous && (previous.type === 'file' || previous.spelling !== spelling))
|
|
92
|
+
throw new Error('ZIP path conflict.');
|
|
93
|
+
if (!previous)
|
|
94
|
+
known.set(parent, { type: 'directory', explicit: false, spelling });
|
|
95
|
+
}
|
|
96
|
+
const key = parts.join('/');
|
|
97
|
+
const prior = known.get(key);
|
|
98
|
+
if (prior && (prior.explicit || !directory || prior.type !== 'directory' || prior.spelling !== relative))
|
|
99
|
+
throw new Error('Duplicate or conflicting ZIP path.');
|
|
100
|
+
known.set(key, { type: directory ? 'directory' : 'file', explicit: true, spelling: relative });
|
|
101
|
+
const target = path.join(destination, ...relative.split('/'));
|
|
102
|
+
if (directory)
|
|
103
|
+
await fsp.mkdir(target, { recursive: true });
|
|
104
|
+
else {
|
|
105
|
+
await fsp.mkdir(path.dirname(target), { recursive: true });
|
|
106
|
+
const stream = await new Promise((res, rej) => zip.openReadStream(entry, (err, input) => err || !input ? rej(err ?? new Error('Invalid ZIP stream')) : res(input)));
|
|
107
|
+
let entryBytes = 0;
|
|
108
|
+
let checksum = 0;
|
|
109
|
+
const guard = new stream_1.Transform({ transform(chunk, _encoding, callback) {
|
|
110
|
+
checksum = crc32.unsigned(chunk, checksum);
|
|
111
|
+
entryBytes += chunk.length;
|
|
112
|
+
actualBytes += chunk.length;
|
|
113
|
+
callback(entryBytes > entry.uncompressedSize || actualBytes > maxBytes ? new Error('ZIP expanded size limit exceeded.') : null, chunk);
|
|
114
|
+
} });
|
|
115
|
+
await (0, promises_1.pipeline)(stream, guard, fs.createWriteStream(target, { flags: 'wx' }));
|
|
116
|
+
if (entryBytes !== entry.uncompressedSize)
|
|
117
|
+
throw new Error('ZIP size mismatch.');
|
|
118
|
+
if (checksum !== entry.crc32)
|
|
119
|
+
throw new Error('ZIP checksum mismatch.');
|
|
120
|
+
}
|
|
121
|
+
if (!failed)
|
|
122
|
+
zip.readEntry();
|
|
123
|
+
})().catch(fail);
|
|
124
|
+
});
|
|
125
|
+
zip.readEntry();
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
finally {
|
|
129
|
+
zip.close();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=archive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"archive.js","sourceRoot":"","sources":["../../src/environment/archive.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,kDAMC;AAED,wCA4DC;AA7ED,uCAAyB;AACzB,iDAAmC;AACnC,2CAA6B;AAC7B,8CAA2C;AAC3C,mCAAmC;AACnC,6CAA+B;AAC/B,sCAAuC;AAGvC,SAAgB,mBAAmB,CAAC,IAAY;IAC9C,IAAI,CAAC,IAAI,IAAI,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAC1G,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IACrC,MAAM,QAAQ,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnE,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,+CAA+C,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,C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,mCAAmC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;4BACzI,CAAC,EAAE,CAAC,CAAC;wBACL,MAAM,IAAA,mBAAQ,EAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;wBAC7E,IAAI,UAAU,KAAK,KAAK,CAAC,gBAAgB;4BAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;wBACjF,IAAI,QAAQ,KAAK,KAAK,CAAC,KAAK;4BAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;oBAC1E,CAAC;oBACD,IAAI,CAAC,MAAM;wBAAE,GAAG,CAAC,SAAS,EAAE,CAAC;gBAC/B,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACnB,CAAC,CAAC,CAAC;YACH,GAAG,CAAC,SAAS,EAAE,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC;YAAS,CAAC;QAAC,GAAG,CAAC,KAAK,EAAE,CAAC;IAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EnvironmentDependencies, EnvironmentPlan, EnvironmentResult } from './types';
|
|
2
|
+
export declare function regularFile(file: string): Promise<void>;
|
|
3
|
+
export declare function hashFile(file: string): Promise<string>;
|
|
4
|
+
export declare function copyTree(source: string, destination: string, excludedNames?: readonly string[]): Promise<void>;
|
|
5
|
+
export declare function executeEnvironmentPlan(inputPlan: EnvironmentPlan, dependencies: EnvironmentDependencies): Promise<EnvironmentResult>;
|
|
6
|
+
//# sourceMappingURL=builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/environment/builder.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAwBtF,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG7D;AACD,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAI5D;AACD,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,GAAE,SAAS,MAAM,EAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAUxH;AA8CD,wBAAsB,sBAAsB,CAAC,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,uBAAuB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA8H1I"}
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.regularFile = regularFile;
|
|
37
|
+
exports.hashFile = hashFile;
|
|
38
|
+
exports.copyTree = copyTree;
|
|
39
|
+
exports.executeEnvironmentPlan = executeEnvironmentPlan;
|
|
40
|
+
const fs = __importStar(require("fs/promises"));
|
|
41
|
+
const fsSync = __importStar(require("fs"));
|
|
42
|
+
const path = __importStar(require("path"));
|
|
43
|
+
const crypto_1 = require("crypto");
|
|
44
|
+
const catalog_1 = require("./catalog");
|
|
45
|
+
const archive_1 = require("./archive");
|
|
46
|
+
const config_1 = require("./config");
|
|
47
|
+
const plan_1 = require("./plan");
|
|
48
|
+
function frameworkRequirements(document) {
|
|
49
|
+
const object = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
50
|
+
if (!object(document) || !object(document.runtimeOptions))
|
|
51
|
+
throw new Error('Invalid runtime configuration.');
|
|
52
|
+
const options = document.runtimeOptions;
|
|
53
|
+
const frameworks = options.frameworks ?? (options.framework ? [options.framework] : []);
|
|
54
|
+
if (!Array.isArray(frameworks) || !frameworks.length)
|
|
55
|
+
throw new Error('Missing .NET framework requirement.');
|
|
56
|
+
return frameworks.map((framework) => {
|
|
57
|
+
if (!object(framework) || typeof framework.name !== 'string' || typeof framework.version !== 'string' || !/^[A-Za-z0-9][A-Za-z0-9._-]{0,100}$/.test(framework.name) || !/^[0-9][A-Za-z0-9._-]{0,100}$/.test(framework.version))
|
|
58
|
+
throw new Error('Invalid .NET framework requirement.');
|
|
59
|
+
return { name: framework.name, version: framework.version };
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
async function runtimeRequirements(directory) {
|
|
63
|
+
const frameworks = [];
|
|
64
|
+
for (const entry of await fs.readdir(directory, { withFileTypes: true })) {
|
|
65
|
+
const file = path.join(directory, entry.name);
|
|
66
|
+
if (entry.isDirectory())
|
|
67
|
+
frameworks.push(...await runtimeRequirements(file));
|
|
68
|
+
else if (entry.isFile() && entry.name.endsWith('.runtimeconfig.json'))
|
|
69
|
+
frameworks.push(...frameworkRequirements(JSON.parse(await fs.readFile(file, 'utf8'))));
|
|
70
|
+
}
|
|
71
|
+
return frameworks;
|
|
72
|
+
}
|
|
73
|
+
async function regularFile(file) {
|
|
74
|
+
const stat = await fs.lstat(file);
|
|
75
|
+
if (!stat.isFile() || stat.isSymbolicLink())
|
|
76
|
+
throw new Error(`Required file missing: ${path.basename(file)}.`);
|
|
77
|
+
}
|
|
78
|
+
async function hashFile(file) {
|
|
79
|
+
const hash = (0, crypto_1.createHash)('sha256');
|
|
80
|
+
for await (const chunk of fsSync.createReadStream(file))
|
|
81
|
+
hash.update(chunk);
|
|
82
|
+
return hash.digest('hex');
|
|
83
|
+
}
|
|
84
|
+
async function copyTree(source, destination, excludedNames = []) {
|
|
85
|
+
await fs.mkdir(destination, { recursive: true });
|
|
86
|
+
for (const entry of await fs.readdir(source, { withFileTypes: true })) {
|
|
87
|
+
if (excludedNames.includes(entry.name.toLowerCase()))
|
|
88
|
+
continue;
|
|
89
|
+
const from = path.join(source, entry.name);
|
|
90
|
+
const to = path.join(destination, entry.name);
|
|
91
|
+
if (entry.isDirectory())
|
|
92
|
+
await copyTree(from, to);
|
|
93
|
+
else if (entry.isFile())
|
|
94
|
+
await fs.copyFile(from, to, fsSync.constants.COPYFILE_EXCL);
|
|
95
|
+
else
|
|
96
|
+
throw new Error('Unexpected link in extracted archive.');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// Claim a fresh root and publish each path exclusively. Never overwrite a racing writer.
|
|
100
|
+
async function publish(staging, root) {
|
|
101
|
+
await (0, plan_1.validateTarget)(root);
|
|
102
|
+
try {
|
|
103
|
+
await fs.rmdir(root);
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
if (error.code !== 'ENOENT')
|
|
107
|
+
throw error;
|
|
108
|
+
}
|
|
109
|
+
await fs.mkdir(root);
|
|
110
|
+
const owned = [];
|
|
111
|
+
const remember = async (file, directory) => {
|
|
112
|
+
const stat = await fs.lstat(file);
|
|
113
|
+
owned.push({ file, directory, ino: stat.ino, dev: stat.dev, size: stat.size, mtime: stat.mtimeMs });
|
|
114
|
+
};
|
|
115
|
+
await remember(root, true);
|
|
116
|
+
try {
|
|
117
|
+
const visit = async (source, target) => {
|
|
118
|
+
for (const entry of await fs.readdir(source, { withFileTypes: true })) {
|
|
119
|
+
const from = path.join(source, entry.name);
|
|
120
|
+
const to = path.join(target, entry.name);
|
|
121
|
+
if ((await fs.lstat(target)).isSymbolicLink())
|
|
122
|
+
throw new Error('Publish destination became a link.');
|
|
123
|
+
if (entry.isDirectory()) {
|
|
124
|
+
await fs.mkdir(to);
|
|
125
|
+
await remember(to, true);
|
|
126
|
+
await visit(from, to);
|
|
127
|
+
}
|
|
128
|
+
else if (entry.isFile()) {
|
|
129
|
+
await fs.copyFile(from, to, fsSync.constants.COPYFILE_EXCL);
|
|
130
|
+
await remember(to, false);
|
|
131
|
+
}
|
|
132
|
+
else
|
|
133
|
+
throw new Error('Unexpected staging link.');
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
await visit(staging, root);
|
|
137
|
+
const link = path.join(root, 'Monitor', 'conf');
|
|
138
|
+
await fs.symlink(path.join(root, 'conf'), link, 'junction');
|
|
139
|
+
await remember(link, false);
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
for (const item of owned.reverse()) {
|
|
143
|
+
try {
|
|
144
|
+
const stat = await fs.lstat(item.file);
|
|
145
|
+
if (stat.ino !== item.ino || stat.dev !== item.dev || (!item.directory && (stat.size !== item.size || stat.mtimeMs !== item.mtime)))
|
|
146
|
+
continue;
|
|
147
|
+
if (item.directory)
|
|
148
|
+
await fs.rmdir(item.file);
|
|
149
|
+
else
|
|
150
|
+
await fs.unlink(item.file);
|
|
151
|
+
}
|
|
152
|
+
catch { /* Preserve paths changed by another writer. */ }
|
|
153
|
+
}
|
|
154
|
+
throw error;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
async function executeEnvironmentPlan(inputPlan, dependencies) {
|
|
158
|
+
if (!inputPlan || typeof inputPlan !== 'object')
|
|
159
|
+
throw new Error('Invalid environment plan.');
|
|
160
|
+
const plan = structuredClone(inputPlan);
|
|
161
|
+
if ((dependencies.platform ?? process.platform) !== 'win32')
|
|
162
|
+
throw new Error('Environment execution is Windows-only. Use dry-run on other platforms.');
|
|
163
|
+
for (const field of [plan.selectedModules, plan.autoAddedModules, plan.requirements, plan.warnings]) {
|
|
164
|
+
if (!Array.isArray(field) || field.some(value => typeof value !== 'string'))
|
|
165
|
+
throw new Error('Invalid environment plan arrays.');
|
|
166
|
+
}
|
|
167
|
+
if (!Array.isArray(plan.artifacts) || plan.artifacts.some(artifact => !artifact || typeof artifact !== 'object'))
|
|
168
|
+
throw new Error('Invalid environment plan artifacts.');
|
|
169
|
+
const normalized = await (0, plan_1.validateEnvironmentOptions)({ root: plan.root, major: plan.major, modules: plan.selectedModules, edition: plan.edition, profile: plan.profile, port: plan.port });
|
|
170
|
+
if (plan.root !== normalized.root || plan.port !== normalized.port || plan.edition !== normalized.edition || plan.profile !== normalized.profile || JSON.stringify(plan.selectedModules) !== JSON.stringify(normalized.modules))
|
|
171
|
+
throw new Error('Invalid normalized environment plan.');
|
|
172
|
+
// Plans are public data: do not trust caller-supplied mappings or artifact names.
|
|
173
|
+
const expectedModules = ['server', 'monitoring', 'common', 'analysis', ...plan.selectedModules];
|
|
174
|
+
if (plan.schema !== 'pending' || JSON.stringify(plan.autoAddedModules) !== JSON.stringify(expectedModules.filter(module => !plan.selectedModules.includes(module))) || JSON.stringify(plan.artifacts.map(a => a.module)) !== JSON.stringify(expectedModules))
|
|
175
|
+
throw new Error('Invalid environment plan selections.');
|
|
176
|
+
for (const artifact of plan.artifacts) {
|
|
177
|
+
const entry = catalog_1.catalog[artifact.module];
|
|
178
|
+
if (!artifact.path || /[?:\\\x00-\x1f]/.test(artifact.path) || artifact.path.startsWith('/') || artifact.path.split('/').includes('..'))
|
|
179
|
+
throw new Error('Invalid environment plan remote path.');
|
|
180
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(artifact.version) || artifact.plugin !== entry.plugin || artifact.name !== entry.filename(artifact.version, plan.edition) || JSON.stringify(artifact.mappings) !== JSON.stringify(entry.mappings))
|
|
181
|
+
throw new Error('Invalid environment plan artifact.');
|
|
182
|
+
}
|
|
183
|
+
const parent = path.dirname(plan.root);
|
|
184
|
+
await fs.mkdir(parent, { recursive: true });
|
|
185
|
+
const workspace = await fs.mkdtemp(path.join(parent, '.afm-env-'));
|
|
186
|
+
try {
|
|
187
|
+
const staging = path.join(workspace, 'staging');
|
|
188
|
+
const cache = path.join(workspace, 'cache');
|
|
189
|
+
const runtime = [];
|
|
190
|
+
const requirements = [...plan.requirements];
|
|
191
|
+
const hashes = [];
|
|
192
|
+
await fs.mkdir(staging);
|
|
193
|
+
for (const [index, artifact] of plan.artifacts.entries()) {
|
|
194
|
+
const download = path.join(cache, String(index));
|
|
195
|
+
const extracted = path.join(workspace, `expanded-${index}`);
|
|
196
|
+
await fs.mkdir(download, { recursive: true });
|
|
197
|
+
const label = `[${index + 1}/${plan.artifacts.length}] ${artifact.plugin}/${artifact.version}/${artifact.name}`;
|
|
198
|
+
try {
|
|
199
|
+
dependencies.onProgress?.(`${label}: Downloading`);
|
|
200
|
+
await dependencies.client.downloadArtifact(artifact.plugin, artifact.version, artifact.name, download);
|
|
201
|
+
const archive = path.join(download, artifact.name);
|
|
202
|
+
await regularFile(archive);
|
|
203
|
+
dependencies.onProgress?.(`${label}: Download complete; calculating SHA256`);
|
|
204
|
+
hashes.push({ plugin: artifact.plugin, version: artifact.version, name: artifact.name, sha256: await hashFile(archive) });
|
|
205
|
+
dependencies.onProgress?.(`${label}: Extracting and validating ZIP`);
|
|
206
|
+
await (0, archive_1.extractArchive)(archive, extracted);
|
|
207
|
+
dependencies.onProgress?.(`${label}: Assembling installation directories`);
|
|
208
|
+
for (const mapping of artifact.mappings) {
|
|
209
|
+
const source = path.join(extracted, mapping.source);
|
|
210
|
+
const destination = path.join(staging, mapping.destination);
|
|
211
|
+
if (!(await fs.lstat(source)).isDirectory())
|
|
212
|
+
throw new Error('Required source directory missing.');
|
|
213
|
+
const excludedNames = mapping.role === 'server' ? ['appsettings.json', 'appsettings.development.json'] : [];
|
|
214
|
+
if (excludedNames.length)
|
|
215
|
+
dependencies.onProgress?.(`${label}: Excluding Server appsettings.json and appsettings.Development.json`);
|
|
216
|
+
await copyTree(source, destination, excludedNames);
|
|
217
|
+
const assemblies = [];
|
|
218
|
+
for (const name of mapping.assemblies) {
|
|
219
|
+
try {
|
|
220
|
+
await regularFile(path.join(destination, name));
|
|
221
|
+
assemblies.push(name);
|
|
222
|
+
}
|
|
223
|
+
catch (error) {
|
|
224
|
+
if (error.code !== 'ENOENT')
|
|
225
|
+
throw error;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (assemblies.length !== 1)
|
|
229
|
+
throw new Error(`Expected one runtime assembly in ${mapping.destination || 'root'}.`);
|
|
230
|
+
const assembly = assemblies[0];
|
|
231
|
+
runtime.push({ ...mapping, assembly, path: path.posix.join(mapping.destination, assembly) });
|
|
232
|
+
if (mapping.role !== 'plugin') {
|
|
233
|
+
const runtimeConfig = path.join(destination, assembly.replace(/\.dll$/, '.runtimeconfig.json'));
|
|
234
|
+
await regularFile(runtimeConfig);
|
|
235
|
+
frameworkRequirements(JSON.parse(await fs.readFile(runtimeConfig, 'utf8')));
|
|
236
|
+
}
|
|
237
|
+
for (const framework of await runtimeRequirements(destination))
|
|
238
|
+
requirements.push(`${framework.name} ${framework.version} (${artifact.module})`);
|
|
239
|
+
}
|
|
240
|
+
if (artifact.module === 'monitoring') {
|
|
241
|
+
await regularFile(path.join(staging, 'Monitor', 'Wyn.Configuration.dll'));
|
|
242
|
+
await regularFile(path.join(staging, 'Monitor', 'appsettings.json'));
|
|
243
|
+
}
|
|
244
|
+
if (artifact.module === 'server')
|
|
245
|
+
await regularFile(path.join(staging, 'Server', 'Wyn.Identity.Service.dll'));
|
|
246
|
+
if (artifact.module === 'dashboard') {
|
|
247
|
+
const contents = path.join(extracted, 'Web Contents');
|
|
248
|
+
try {
|
|
249
|
+
await copyTree(contents, path.join(staging, 'Web Contents'));
|
|
250
|
+
}
|
|
251
|
+
catch (error) {
|
|
252
|
+
if (error.code !== 'ENOENT')
|
|
253
|
+
throw error;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
dependencies.onProgress?.(`${label}: Assembly and runtime requirement checks complete`);
|
|
257
|
+
}
|
|
258
|
+
catch {
|
|
259
|
+
throw new Error(`Environment assembly failed for ${artifact.plugin}/${artifact.version}/${artifact.name} (download, archive, layout or required runtime files).`);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
dependencies.onProgress?.('Detecting configuration schema and checking schema assets');
|
|
263
|
+
const monitor = plan.artifacts.find(a => a.module === 'monitoring');
|
|
264
|
+
try {
|
|
265
|
+
const template = path.join(staging, 'Monitor', 'conf', 'Wyn.conf');
|
|
266
|
+
await regularFile(template);
|
|
267
|
+
plan.schema = (0, config_1.detectConfigurationSchema)(await fs.readFile(template, 'utf8'));
|
|
268
|
+
}
|
|
269
|
+
catch {
|
|
270
|
+
throw new Error(`Configuration schema validation failed for ${monitor.plugin}/${monitor.version}/${monitor.name}: unsupported or invalid template.`);
|
|
271
|
+
}
|
|
272
|
+
for (const module of ['monitoring', 'server']) {
|
|
273
|
+
const artifact = plan.artifacts.find(a => a.module === module);
|
|
274
|
+
const relative = `xsd/${plan.schema}/Wyn.conf.xsd`;
|
|
275
|
+
try {
|
|
276
|
+
await regularFile(path.join(staging, module === 'monitoring' ? 'Monitor' : 'Server', relative));
|
|
277
|
+
}
|
|
278
|
+
catch (error) {
|
|
279
|
+
if (module === 'server' && error.code === 'ENOENT') {
|
|
280
|
+
plan.warnings.push(`Server package ${artifact.plugin}/${artifact.version}/${artifact.name} is missing ${relative}; Server will skip XSD validation. XML reader compatibility and runtime startup have not been verified.`);
|
|
281
|
+
continue;
|
|
282
|
+
}
|
|
283
|
+
throw new Error(`Configuration schema validation failed for ${artifact.plugin}/${artifact.version}/${artifact.name}: ${module === 'monitoring' ? 'Monitor' : 'Server'} package is missing ${relative}.`);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
dependencies.onProgress?.(`Generating ${plan.schema} Wyn.conf and environment lock manifest`);
|
|
287
|
+
const canonical = path.join(staging, 'conf');
|
|
288
|
+
await fs.mkdir(canonical, { recursive: true });
|
|
289
|
+
const bundled = path.join(staging, 'Monitor', 'conf');
|
|
290
|
+
try {
|
|
291
|
+
for (const entry of await fs.readdir(bundled)) {
|
|
292
|
+
if (entry.toLowerCase() === 'wyn.conf')
|
|
293
|
+
continue;
|
|
294
|
+
const source = path.join(bundled, entry);
|
|
295
|
+
const destination = path.join(canonical, entry);
|
|
296
|
+
if ((await fs.lstat(source)).isDirectory())
|
|
297
|
+
await copyTree(source, destination);
|
|
298
|
+
else
|
|
299
|
+
await fs.copyFile(source, destination, fsSync.constants.COPYFILE_EXCL);
|
|
300
|
+
}
|
|
301
|
+
await fs.rm(bundled, { recursive: true });
|
|
302
|
+
}
|
|
303
|
+
catch (error) {
|
|
304
|
+
if (error.code !== 'ENOENT')
|
|
305
|
+
throw error;
|
|
306
|
+
}
|
|
307
|
+
await fs.writeFile(path.join(canonical, 'Wyn.conf'), (0, config_1.createEnvironmentConfig)(plan, runtime), 'utf8');
|
|
308
|
+
for (const directory of ['logs', 'wyndbs'])
|
|
309
|
+
await fs.mkdir(path.join(staging, directory), { recursive: true });
|
|
310
|
+
const manifestName = 'environment.lock.json';
|
|
311
|
+
await fs.writeFile(path.join(staging, manifestName), JSON.stringify({ ...plan, ...(dependencies.managed ? { managed: { ...dependencies.managed, root: plan.root, port: plan.port } } : {}), requirements: [...new Set(requirements)], downloads: hashes }, null, 2) + '\n', { flag: 'wx' });
|
|
312
|
+
if (dependencies.managed)
|
|
313
|
+
await fs.writeFile(path.join(staging, '.afm-environment.json'), JSON.stringify({ version: 1, id: dependencies.managed.id, name: dependencies.managed.name, root: plan.root, port: plan.port }, null, 2) + '\n', { flag: 'wx' });
|
|
314
|
+
dependencies.onProgress?.('Publishing environment and creating Monitor configuration junction');
|
|
315
|
+
await publish(staging, plan.root);
|
|
316
|
+
dependencies.onProgress?.('Environment published successfully; no services were started');
|
|
317
|
+
return { root: plan.root, manifest: path.join(plan.root, manifestName), requirements: [...new Set(requirements)], warnings: plan.warnings };
|
|
318
|
+
}
|
|
319
|
+
finally {
|
|
320
|
+
await fs.rm(workspace, { recursive: true, force: true });
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
//# sourceMappingURL=builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/environment/builder.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,kCAGC;AACD,4BAIC;AACD,4BAUC;AA8CD,wDA8HC;AA/ND,gDAAkC;AAClC,2CAA6B;AAC7B,2CAA6B;AAC7B,mCAAoC;AACpC,uCAAoC;AACpC,uCAA2C;AAC3C,qCAA+F;AAC/F,iCAAoE;AAGpE,SAAS,qBAAqB,CAAC,QAAiB;IAC9C,MAAM,MAAM,GAAG,CAAC,KAAc,EAAoC,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,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AC,CAAC;QAChG,MAAM,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAClC,YAAY,CAAC,UAAU,EAAE,CAAC,8DAA8D,CAAC,CAAC;QAC1F,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC9I,CAAC;YAAS,CAAC;QACT,MAAM,EAAE,CAAC,EAAE,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LayoutMapping } from './types';
|
|
2
|
+
interface CatalogEntry {
|
|
3
|
+
plugin: string;
|
|
4
|
+
filename: (version: string, edition: string) => string;
|
|
5
|
+
mappings: LayoutMapping[];
|
|
6
|
+
}
|
|
7
|
+
export declare const catalog: Record<string, CatalogEntry>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/environment/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IACvD,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B;AAED,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CA6BhD,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.catalog = void 0;
|
|
4
|
+
const mapping = (source, destination, assemblies, role, service) => ({ source, destination, assemblies, role, ...(service ? { service } : {}) });
|
|
5
|
+
exports.catalog = {
|
|
6
|
+
server: {
|
|
7
|
+
plugin: 'gces-server', filename: (v, e) => `server-${e}.v${v}.zip`,
|
|
8
|
+
mappings: [mapping('', 'Server', ['Wyn.Server.dll'], 'server', 'Server')],
|
|
9
|
+
},
|
|
10
|
+
monitoring: {
|
|
11
|
+
plugin: 'gces-monitoring', filename: (v, e) => `monitoring-netcore.${v}-${e}.zip`,
|
|
12
|
+
mappings: [mapping('', 'Monitor', ['Wyn.ServiceMonitor.dll'], 'monitor')],
|
|
13
|
+
},
|
|
14
|
+
common: {
|
|
15
|
+
plugin: 'gces-common', filename: v => `dataset-and-account.${v}.zip`,
|
|
16
|
+
mappings: [mapping('dataset', 'Plugins/Dataset', ['Wyn.Dataset.Plugin.dll'], 'plugin'), mapping('account', 'Plugins/Account', ['Wyn.Account.Plugin.dll'], 'plugin'), mapping('cot-worker', 'CotWorker', ['Wyn.CotWorker.dll'], 'worker', 'CotWorker')],
|
|
17
|
+
},
|
|
18
|
+
dashboard: {
|
|
19
|
+
plugin: 'gces-dashboard', filename: v => `dashboard.${v}.zip`,
|
|
20
|
+
mappings: [mapping('dashboard', 'Plugins/Dashboard', ['Wyn.Dashboards.Plugin.dll'], 'plugin'), mapping('dashboard-worker', 'DashboardWorker', ['Wyn.Dashboards.Worker.dll'], 'worker', 'DashboardWorker')],
|
|
21
|
+
},
|
|
22
|
+
reporting: {
|
|
23
|
+
plugin: 'gces-reporting', filename: v => `reporting.v${v}.zip`,
|
|
24
|
+
mappings: [mapping('plugin', 'Plugins/Reporting', ['Wyn.Reporting.Plugin.dll', 'Gces.Reporting.Plugin.dll'], 'plugin'), mapping('worker', 'ReportingWorker', ['Wyn.Reporting.Worker.dll', 'ReportingWorker.dll'], 'worker', 'ReportingWorker')],
|
|
25
|
+
},
|
|
26
|
+
analysis: {
|
|
27
|
+
plugin: 'gces-analysis', filename: v => `analysis-model.${v}.zip`,
|
|
28
|
+
mappings: [mapping('analysis', 'Plugins/AnalysisModel', ['Wyn.AnalysisModel.Plugin.dll'], 'plugin')],
|
|
29
|
+
},
|
|
30
|
+
sheets: {
|
|
31
|
+
plugin: 'wyn-sheets', filename: v => `wyn-sheets.v${v}.zip`,
|
|
32
|
+
mappings: [mapping('', 'Plugins/Sheet', ['Wyn.Sheets.Plugin.dll'], 'plugin')],
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/environment/catalog.ts"],"names":[],"mappings":";;;AAOA,MAAM,OAAO,GAAG,CAAC,MAAc,EAAE,WAAmB,EAAE,UAAoB,EAAE,IAA2B,EAAE,OAAgB,EAAiB,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC7M,QAAA,OAAO,GAAiC;IACnD,MAAM,EAAE;QACN,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM;QAClE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,gBAAgB,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;KAC1E;IACD,UAAU,EAAE;QACV,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,sBAAsB,CAAC,IAAI,C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e,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,kBAAkB,CAAC,MAAM;QACjE,QAAQ,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,uBAAuB,EAAE,CAAC,8BAA8B,CAAC,EAAE,QAAQ,CAAC,CAAC;KACrG;IACD,MAAM,EAAE;QACN,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,eAAe,CAAC,MAAM;QAC3D,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,eAAe,EAAE,CAAC,uBAAuB,CAAC,EAAE,QAAQ,CAAC,CAAC;KAC9E;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EnvironmentPlan, EnvironmentSchema, LayoutMapping } from './types';
|
|
2
|
+
export declare function detectConfigurationSchema(template: string): EnvironmentSchema;
|
|
3
|
+
export interface RuntimeAssembly extends LayoutMapping {
|
|
4
|
+
assembly: string;
|
|
5
|
+
path: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function createEnvironmentConfig(plan: EnvironmentPlan, assemblies: RuntimeAssembly[]): string;
|
|
8
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/environment/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAK5E,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAQ7E;AAED,MAAM,WAAW,eAAgB,SAAQ,aAAa;IAAG,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AAEzF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,MAAM,CAuCpG"}
|