@orkestrel/scaffold 0.0.11 → 0.0.13
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/bin/scaffold.js +16 -7
- package/dist/bin/scaffold.js.map +1 -1
- package/dist/host/guides/src/scaffold.md +1 -1
- package/dist/src/core/index.cjs +73 -17
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +6 -6
- package/dist/src/core/index.d.ts +6 -6
- package/dist/src/core/index.js +73 -17
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +12 -6
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.js +12 -6
- package/dist/src/server/index.js.map +1 -1
- package/package.json +7 -7
|
@@ -1776,7 +1776,8 @@ function selectOrkestrelEntries(value) {
|
|
|
1776
1776
|
* ```
|
|
1777
1777
|
*/
|
|
1778
1778
|
function deriveBlueprint(target) {
|
|
1779
|
-
const
|
|
1779
|
+
const text = readManifest(target);
|
|
1780
|
+
const parsed = (0, _orkestrel_contract.parseJSON)(text);
|
|
1780
1781
|
if (!(0, _orkestrel_contract.isRecord)(parsed)) throw new _src_core.ScaffoldError("TARGET", `Manifest at ${target} is not a valid JSON object`, { target });
|
|
1781
1782
|
const src = _src_core.ENVIRONMENTS.filter((environment) => isRealDirectory((0, node_path.join)(target, "src", environment)));
|
|
1782
1783
|
const app = _src_core.ENVIRONMENTS.filter((environment) => isRealDirectory((0, node_path.join)(target, "app", environment)));
|
|
@@ -1800,7 +1801,8 @@ function deriveBlueprint(target) {
|
|
|
1800
1801
|
const keywords = Array.isArray(rawKeywords) && rawKeywords.every((word) => typeof word === "string") ? rawKeywords : [];
|
|
1801
1802
|
const rawVersion = (0, _src_core.ownDataValue)(parsed, "version");
|
|
1802
1803
|
const version = typeof rawVersion === "string" ? rawVersion : _src_core.DEFAULT_VERSION;
|
|
1803
|
-
const
|
|
1804
|
+
const rawEngines = (0, _src_core.ownDataValue)(parsed, "engines");
|
|
1805
|
+
const rawNode = (0, _src_core.ownDataValue)(rawEngines, "node");
|
|
1804
1806
|
const engines = typeof rawNode === "string" ? rawNode : _src_core.DEFAULT_ENGINES;
|
|
1805
1807
|
const bin = isRealDirectory((0, node_path.join)(target, "src", "bin"));
|
|
1806
1808
|
const integration = isRealDirectory((0, node_path.join)(target, "tests", "integration"));
|
|
@@ -2523,7 +2525,8 @@ function stageHost(root, out, paths = _src_core.HOST_PATHS) {
|
|
|
2523
2525
|
root,
|
|
2524
2526
|
destination: entry.destination
|
|
2525
2527
|
});
|
|
2526
|
-
|
|
2528
|
+
const destination = resolvePhysicalPath(staging, entry.storage, "WRITE", "staging");
|
|
2529
|
+
(0, node_fs.mkdirSync)((0, node_path.dirname)(destination), { recursive: true });
|
|
2527
2530
|
validateWriteAnchor(stagingAnchor, "host staging root");
|
|
2528
2531
|
const containedDestination = resolvePhysicalPath(staging, entry.storage, "WRITE", "staging");
|
|
2529
2532
|
(0, node_fs.copyFileSync)(source, containedDestination, node_fs.constants.COPYFILE_EXCL);
|
|
@@ -3235,7 +3238,8 @@ var Materializer = class {
|
|
|
3235
3238
|
const sourceDigest = digestFile(source);
|
|
3236
3239
|
const expectedHex = preview.value[file.path];
|
|
3237
3240
|
if (expectedHex === void 0 || sourceDigest !== digestHex(expectedHex)) throw new _src_core.ScaffoldError("WRITE", `Prune target changed at ${file.path}`, { path: file.path });
|
|
3238
|
-
|
|
3241
|
+
const destination = resolvePhysicalPath(transaction.backup, file.path, "WRITE", "quarantine");
|
|
3242
|
+
(0, node_fs.mkdirSync)((0, node_path.dirname)(destination), { recursive: true });
|
|
3239
3243
|
validateWriteTarget(transaction, void 0);
|
|
3240
3244
|
const containedDestination = resolvePhysicalPath(transaction.backup, file.path, "WRITE", "quarantine");
|
|
3241
3245
|
(0, node_fs.renameSync)(source, containedDestination);
|
|
@@ -3351,7 +3355,8 @@ var Materializer = class {
|
|
|
3351
3355
|
return;
|
|
3352
3356
|
}
|
|
3353
3357
|
if (manifest === void 0 && artifact.hex === void 0) {
|
|
3354
|
-
const
|
|
3358
|
+
const directory = resolvePhysicalPath(this.#host, source, "TARGET", "host");
|
|
3359
|
+
const status = (0, node_fs.lstatSync)(directory);
|
|
3355
3360
|
if (!status.isDirectory() || status.isSymbolicLink()) throw new _src_core.ScaffoldError("TARGET", `Host artifact is not a physical directory at ${source}`, { source });
|
|
3356
3361
|
const destination = resolvePhysicalPath(transaction.stage, artifact.path, "WRITE", "staging");
|
|
3357
3362
|
(0, node_fs.mkdirSync)(destination, { recursive: true });
|
|
@@ -3694,7 +3699,8 @@ var Sync = class Sync {
|
|
|
3694
3699
|
limit: _src_core.MAX_ARTIFACT_BYTES
|
|
3695
3700
|
});
|
|
3696
3701
|
validateWriteDirectories(transaction);
|
|
3697
|
-
|
|
3702
|
+
const candidate = resolvePhysicalPath(transaction.stage, guide.path, "WRITE", "staging");
|
|
3703
|
+
(0, node_fs.mkdirSync)((0, node_path.dirname)(candidate), { recursive: true });
|
|
3698
3704
|
validateWriteDirectories(transaction);
|
|
3699
3705
|
const destination = resolvePhysicalPath(transaction.stage, guide.path, "WRITE", "staging");
|
|
3700
3706
|
(0, node_fs.writeFileSync)(destination, guide.content, {
|