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