@orkestrel/scaffold 0.0.9 → 0.0.11
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 +47 -21
- package/dist/bin/scaffold.js.map +1 -1
- package/dist/host/guides/src/scaffold.md +64 -29
- package/dist/host/tests/setupPolicy.ts +87 -2
- package/dist/src/core/index.cjs +78 -54
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +51 -21
- package/dist/src/core/index.d.ts +51 -21
- package/dist/src/core/index.js +77 -55
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +9 -3
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +2 -1
- package/dist/src/server/index.d.ts +2 -1
- package/dist/src/server/index.js +11 -5
- package/dist/src/server/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -141,7 +141,8 @@ export declare const DEFAULT_SYNC_TIMEOUT = 10000;
|
|
|
141
141
|
* `app/<environment>/`; a target with no environment on either axis is also a coded
|
|
142
142
|
* `TARGET` failure. The `bin`, `integration`, and `service` facts probe physical
|
|
143
143
|
* directories at `src/bin`, `tests/integration`, and `tests/service`, respectively,
|
|
144
|
-
*
|
|
144
|
+
* while `global` probes the physical exact-case `tests/setupGlobal.ts` file; none is
|
|
145
|
+
* inferred from the workspace name. `dependencies` /
|
|
145
146
|
* `peers` are the `@orkestrel/`-prefixed entries of `manifest.dependencies` /
|
|
146
147
|
* `manifest.peerDependencies` (a peer flagged `peerDependenciesMeta[name]
|
|
147
148
|
* .optional === true` carries `optional: true`). `extras` is EVERY entry of
|
|
@@ -141,7 +141,8 @@ export declare const DEFAULT_SYNC_TIMEOUT = 10000;
|
|
|
141
141
|
* `app/<environment>/`; a target with no environment on either axis is also a coded
|
|
142
142
|
* `TARGET` failure. The `bin`, `integration`, and `service` facts probe physical
|
|
143
143
|
* directories at `src/bin`, `tests/integration`, and `tests/service`, respectively,
|
|
144
|
-
*
|
|
144
|
+
* while `global` probes the physical exact-case `tests/setupGlobal.ts` file; none is
|
|
145
|
+
* inferred from the workspace name. `dependencies` /
|
|
145
146
|
* `peers` are the `@orkestrel/`-prefixed entries of `manifest.dependencies` /
|
|
146
147
|
* `manifest.peerDependencies` (a peer flagged `peerDependenciesMeta[name]
|
|
147
148
|
* .optional === true` carries `optional: true`). `extras` is EVERY entry of
|
package/dist/src/server/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CONTROL_CHARACTER_PATTERN, DEFAULT_ENGINES, DEFAULT_VERSION, DEPENDENCY_NAME_PATTERN, ENVIRONMENTS, HEX_PATTERN, HOST_PATHS, INVALID_PATH_CHARACTER_PATTERN, MAX_ARTIFACT_BYTES, MAX_ARTIFACT_HEX_LENGTH, MAX_COLLECTION_ITEMS, MAX_MANIFEST_BYTES, MAX_PATH_LENGTH, MAX_TOTAL_ARTIFACT_BYTES, SERVICE_SCRIPT_PATH, SYNC_BASELINE_PATTERN, ScaffoldError, VERSION_PATTERN, blueprint, bytesToHex, contentByteLength, devDependenciesFor, diffPlan, findFileConflict, findPathConflict, hasOnlyDataProperties, hasValidAuditBytes, hasValidSnapshotBytes, isDenseDataArray, isDependency, isEmitterErrorHandler, isPlan, isSyncReport, isWorkspaceName, manifestToDependencies, manifestToName, ownDataValue, parsePlan, parseSyncReport, rangeToFreshness, snapshotPlan, validateDependencyArray, validatePlan } from "../core/index.js";
|
|
1
|
+
import { CONTROL_CHARACTER_PATTERN, DEFAULT_ENGINES, DEFAULT_VERSION, DEPENDENCY_NAME_PATTERN, ENVIRONMENTS, GLOBAL_SETUP_PATH, HEX_PATTERN, HOST_PATHS, INVALID_PATH_CHARACTER_PATTERN, MAX_ARTIFACT_BYTES, MAX_ARTIFACT_HEX_LENGTH, MAX_COLLECTION_ITEMS, MAX_MANIFEST_BYTES, MAX_PATH_LENGTH, MAX_TOTAL_ARTIFACT_BYTES, SERVICE_SCRIPT_PATH, SYNC_BASELINE_PATTERN, ScaffoldError, VERSION_PATTERN, blueprint, bytesToHex, contentByteLength, devDependenciesFor, diffPlan, findFileConflict, findPathConflict, hasOnlyDataProperties, hasValidAuditBytes, hasValidSnapshotBytes, isDenseDataArray, isDependency, isEmitterErrorHandler, isPlan, isSyncReport, isWorkspaceName, manifestToDependencies, manifestToName, ownDataValue, parsePlan, parseSyncReport, rangeToFreshness, snapshotPlan, validateDependencyArray, validatePlan } from "../core/index.js";
|
|
2
2
|
import { attempt, booleanShape, createContract, integerShape, isError, isFunction, isRecord, isString, objectShape, optionalShape, parseJSON, parseJSONAs, stringShape } from "@orkestrel/contract";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
|
-
import { chmodSync, closeSync, constants, copyFileSync, existsSync, fstatSync, linkSync, lstatSync, mkdirSync, openSync, opendirSync, readSync, realpathSync, renameSync, rmSync, rmdirSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { chmodSync, closeSync, constants, copyFileSync, existsSync, fstatSync, linkSync, lstatSync, mkdirSync, openSync, opendirSync, readSync, readdirSync, realpathSync, renameSync, rmSync, rmdirSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { basename, dirname, join, relative, resolve, sep } from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import { flattenText, isBlockquoteNode, isParagraphNode, parseDocument, walkNodes } from "@orkestrel/markdown";
|
|
@@ -1745,7 +1745,8 @@ function selectOrkestrelEntries(value) {
|
|
|
1745
1745
|
* `app/<environment>/`; a target with no environment on either axis is also a coded
|
|
1746
1746
|
* `TARGET` failure. The `bin`, `integration`, and `service` facts probe physical
|
|
1747
1747
|
* directories at `src/bin`, `tests/integration`, and `tests/service`, respectively,
|
|
1748
|
-
*
|
|
1748
|
+
* while `global` probes the physical exact-case `tests/setupGlobal.ts` file; none is
|
|
1749
|
+
* inferred from the workspace name. `dependencies` /
|
|
1749
1750
|
* `peers` are the `@orkestrel/`-prefixed entries of `manifest.dependencies` /
|
|
1750
1751
|
* `manifest.peerDependencies` (a peer flagged `peerDependenciesMeta[name]
|
|
1751
1752
|
* .optional === true` carries `optional: true`). `extras` is EVERY entry of
|
|
@@ -1803,6 +1804,9 @@ function deriveBlueprint(target) {
|
|
|
1803
1804
|
const bin = isRealDirectory(join(target, "src", "bin"));
|
|
1804
1805
|
const integration = isRealDirectory(join(target, "tests", "integration"));
|
|
1805
1806
|
const service = isRealDirectory(join(target, "tests", "service"));
|
|
1807
|
+
const tests = join(target, dirname(GLOBAL_SETUP_PATH));
|
|
1808
|
+
const entries = attempt(() => readdirSync(tests));
|
|
1809
|
+
const global = entries.success && entries.value.includes(basename(GLOBAL_SETUP_PATH)) && isRealFile(join(target, GLOBAL_SETUP_PATH));
|
|
1806
1810
|
if (service) {
|
|
1807
1811
|
const missing = [];
|
|
1808
1812
|
if (!isRealFile(join(target, "tests", "setupService.ts"))) missing.push("tests/setupService.ts");
|
|
@@ -1840,7 +1844,8 @@ function deriveBlueprint(target) {
|
|
|
1840
1844
|
extras: [],
|
|
1841
1845
|
bin,
|
|
1842
1846
|
integration,
|
|
1843
|
-
service
|
|
1847
|
+
service,
|
|
1848
|
+
global
|
|
1844
1849
|
}))));
|
|
1845
1850
|
const rawDevDependencies = ownDataValue(parsed, "devDependencies");
|
|
1846
1851
|
const devDependencies = isRecord(rawDevDependencies) ? rawDevDependencies : {};
|
|
@@ -1861,7 +1866,8 @@ function deriveBlueprint(target) {
|
|
|
1861
1866
|
overrides: [],
|
|
1862
1867
|
bin,
|
|
1863
1868
|
integration,
|
|
1864
|
-
service
|
|
1869
|
+
service,
|
|
1870
|
+
global
|
|
1865
1871
|
});
|
|
1866
1872
|
}
|
|
1867
1873
|
/**
|