@agent-teams/engineering-foundation 0.13.0 → 0.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/canonical-json.d.ts +12 -0
- package/dist/canonical-json.d.ts.map +1 -0
- package/dist/canonical-json.js +151 -0
- package/dist/canonical-json.js.map +1 -0
- package/dist/document-authoring/adapters/canonical-markdown.d.ts +14 -0
- package/dist/document-authoring/adapters/canonical-markdown.d.ts.map +1 -0
- package/dist/document-authoring/adapters/canonical-markdown.js +354 -0
- package/dist/document-authoring/adapters/canonical-markdown.js.map +1 -0
- package/dist/document-authoring/adapters/node/node-authoring-profile-reader.d.ts.map +1 -1
- package/dist/document-authoring/adapters/node/node-authoring-profile-reader.js +4 -1
- package/dist/document-authoring/adapters/node/node-authoring-profile-reader.js.map +1 -1
- package/dist/document-authoring/adapters/node/read-document-authority-file.d.ts.map +1 -1
- package/dist/document-authoring/adapters/node/read-document-authority-file.js +3 -13
- package/dist/document-authoring/adapters/node/read-document-authority-file.js.map +1 -1
- package/dist/document-authoring/application/policies/authoring-profile-semantics.d.ts +38 -0
- package/dist/document-authoring/application/policies/authoring-profile-semantics.d.ts.map +1 -0
- package/dist/document-authoring/application/policies/authoring-profile-semantics.js +122 -0
- package/dist/document-authoring/application/policies/authoring-profile-semantics.js.map +1 -0
- package/dist/document-authoring/application/policies/document-contract-digests.d.ts +20 -0
- package/dist/document-authoring/application/policies/document-contract-digests.d.ts.map +1 -0
- package/dist/document-authoring/application/policies/document-contract-digests.js +275 -0
- package/dist/document-authoring/application/policies/document-contract-digests.js.map +1 -0
- package/dist/document-authoring/application/policies/document-repository-path.d.ts +1 -0
- package/dist/document-authoring/application/policies/document-repository-path.d.ts.map +1 -1
- package/dist/document-authoring/application/policies/document-repository-path.js +21 -2
- package/dist/document-authoring/application/policies/document-repository-path.js.map +1 -1
- package/dist/document-authoring/application/policies/document-temporary-path.d.ts +7 -0
- package/dist/document-authoring/application/policies/document-temporary-path.d.ts.map +1 -0
- package/dist/document-authoring/application/policies/document-temporary-path.js +34 -0
- package/dist/document-authoring/application/policies/document-temporary-path.js.map +1 -0
- package/dist/document-authoring/application/ports/canonical-document-renderer.d.ts +29 -0
- package/dist/document-authoring/application/ports/canonical-document-renderer.d.ts.map +1 -0
- package/dist/document-authoring/application/ports/canonical-document-renderer.js +2 -0
- package/dist/document-authoring/application/ports/canonical-document-renderer.js.map +1 -0
- package/dist/repository-mutation/adapters/node/node-absent-file-publication.d.ts +31 -0
- package/dist/repository-mutation/adapters/node/node-absent-file-publication.d.ts.map +1 -0
- package/dist/repository-mutation/adapters/node/node-absent-file-publication.js +272 -0
- package/dist/repository-mutation/adapters/node/node-absent-file-publication.js.map +1 -0
- package/dist/repository-mutation/adapters/node/node-bounded-regular-file.d.ts +20 -0
- package/dist/repository-mutation/adapters/node/node-bounded-regular-file.d.ts.map +1 -0
- package/dist/repository-mutation/adapters/node/node-bounded-regular-file.js +123 -0
- package/dist/repository-mutation/adapters/node/node-bounded-regular-file.js.map +1 -0
- package/dist/repository-mutation/adapters/node/node-directory-durability.d.ts +12 -0
- package/dist/repository-mutation/adapters/node/node-directory-durability.d.ts.map +1 -0
- package/dist/repository-mutation/adapters/node/node-directory-durability.js +32 -0
- package/dist/repository-mutation/adapters/node/node-directory-durability.js.map +1 -0
- package/dist/repository-mutation/adapters/node/node-existing-repository-ancestors.d.ts +13 -0
- package/dist/repository-mutation/adapters/node/node-existing-repository-ancestors.d.ts.map +1 -0
- package/dist/repository-mutation/adapters/node/node-existing-repository-ancestors.js +67 -0
- package/dist/repository-mutation/adapters/node/node-existing-repository-ancestors.js.map +1 -0
- package/dist/repository-mutation/adapters/node/node-repository-path.d.ts +2 -0
- package/dist/repository-mutation/adapters/node/node-repository-path.d.ts.map +1 -0
- package/dist/repository-mutation/adapters/node/node-repository-path.js +7 -0
- package/dist/repository-mutation/adapters/node/node-repository-path.js.map +1 -0
- package/dist/repository-mutation/application/model/exact-postimage.d.ts +17 -0
- package/dist/repository-mutation/application/model/exact-postimage.d.ts.map +1 -0
- package/dist/repository-mutation/application/model/exact-postimage.js +11 -0
- package/dist/repository-mutation/application/model/exact-postimage.js.map +1 -0
- package/dist/repository-mutation/application/model/path-identity.d.ts +7 -0
- package/dist/repository-mutation/application/model/path-identity.d.ts.map +1 -0
- package/dist/repository-mutation/application/model/path-identity.js +2 -0
- package/dist/repository-mutation/application/model/path-identity.js.map +1 -0
- package/dist/repository-mutation/application/model/repository-path.d.ts +8 -0
- package/dist/repository-mutation/application/model/repository-path.d.ts.map +1 -0
- package/dist/repository-mutation/application/model/repository-path.js +74 -0
- package/dist/repository-mutation/application/model/repository-path.js.map +1 -0
- package/dist/scaffolding/adapters/node/filesystem-file-identity.d.ts +3 -23
- package/dist/scaffolding/adapters/node/filesystem-file-identity.d.ts.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-file-identity.js +1 -122
- package/dist/scaffolding/adapters/node/filesystem-file-identity.js.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-operation-state.d.ts +2 -1
- package/dist/scaffolding/adapters/node/filesystem-operation-state.d.ts.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-operation-state.js +73 -122
- package/dist/scaffolding/adapters/node/filesystem-operation-state.js.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-path-guard.d.ts.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-path-guard.js +27 -68
- package/dist/scaffolding/adapters/node/filesystem-path-guard.js.map +1 -1
- package/dist/scaffolding/application/policies/legacy-scaffolding-repository-path.d.ts +4 -0
- package/dist/scaffolding/application/policies/legacy-scaffolding-repository-path.d.ts.map +1 -0
- package/dist/scaffolding/application/policies/legacy-scaffolding-repository-path.js +48 -0
- package/dist/scaffolding/application/policies/legacy-scaffolding-repository-path.js.map +1 -0
- package/dist/transaction-coordination/adapters/node/document-temporary-identity.d.ts +4 -0
- package/dist/transaction-coordination/adapters/node/document-temporary-identity.d.ts.map +1 -0
- package/dist/transaction-coordination/adapters/node/document-temporary-identity.js +30 -0
- package/dist/transaction-coordination/adapters/node/document-temporary-identity.js.map +1 -0
- package/dist/transaction-coordination/adapters/node/installed-foundation-build-identity.js +1 -1
- package/dist/transaction-coordination/adapters/node/installed-foundation-build-identity.js.map +1 -1
- package/dist/transaction-coordination/adapters/node/legacy-document-envelope-v2.d.ts +5 -0
- package/dist/transaction-coordination/adapters/node/legacy-document-envelope-v2.d.ts.map +1 -0
- package/dist/transaction-coordination/adapters/node/legacy-document-envelope-v2.js +212 -0
- package/dist/transaction-coordination/adapters/node/legacy-document-envelope-v2.js.map +1 -0
- package/dist/transaction-coordination/adapters/node/node-foundation-operation-lock.d.ts.map +1 -1
- package/dist/transaction-coordination/adapters/node/node-foundation-operation-lock.js +1 -1
- package/dist/transaction-coordination/adapters/node/node-foundation-operation-lock.js.map +1 -1
- package/dist/transaction-coordination/adapters/node/node-foundation-transaction-slot.d.ts.map +1 -1
- package/dist/transaction-coordination/adapters/node/node-foundation-transaction-slot.js +48 -26
- package/dist/transaction-coordination/adapters/node/node-foundation-transaction-slot.js.map +1 -1
- package/package.json +1 -1
- package/schemas/document-authoring-profile/v1.schema.json +64 -15
- package/schemas/document-command-envelope/v1.schema.json +1 -1
- package/schemas/document-intent/v1.schema.json +48 -6
- package/schemas/document-plan/v1.schema.json +20 -4
- package/schemas/document-receipt/v1.schema.json +1 -1
- package/schemas/foundation-transaction-envelope/v2.schema.json +21 -3
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { lstat, readdir, realpath } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { portableRepositoryPathIdentity } from "../../application/model/repository-path.js";
|
|
4
|
+
import { isLexicallyContainedPath } from "./node-repository-path.js";
|
|
5
|
+
export class ExistingRepositoryAncestorError extends Error {
|
|
6
|
+
problem;
|
|
7
|
+
existingName;
|
|
8
|
+
requestedName;
|
|
9
|
+
constructor(problem, options = {}) {
|
|
10
|
+
super(`Existing repository ancestor is unsafe: ${problem}.`);
|
|
11
|
+
this.name = "ExistingRepositoryAncestorError";
|
|
12
|
+
this.problem = problem;
|
|
13
|
+
this.existingName = options.existingName;
|
|
14
|
+
this.requestedName = options.requestedName;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function isMissing(error) {
|
|
18
|
+
return (error instanceof Error &&
|
|
19
|
+
"code" in error &&
|
|
20
|
+
error.code === "ENOENT");
|
|
21
|
+
}
|
|
22
|
+
export async function assertNoPortableNameCollision(parent, requestedName, pathIdentity = portableRepositoryPathIdentity, ordering = "binary", readEntries = readdir) {
|
|
23
|
+
const observedEntries = await readEntries(parent).catch((error) => {
|
|
24
|
+
if (isMissing(error)) {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
throw error;
|
|
28
|
+
});
|
|
29
|
+
const entries = ordering === "binary"
|
|
30
|
+
? observedEntries.toSorted((left, right) => Buffer.compare(Buffer.from(left), Buffer.from(right)))
|
|
31
|
+
: observedEntries;
|
|
32
|
+
const requestedIdentity = pathIdentity(requestedName);
|
|
33
|
+
const collision = entries.find((entry) => entry !== requestedName && pathIdentity(entry) === requestedIdentity);
|
|
34
|
+
if (collision !== undefined) {
|
|
35
|
+
throw new ExistingRepositoryAncestorError("name-collision", {
|
|
36
|
+
existingName: collision,
|
|
37
|
+
requestedName
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export async function assertSafeExistingRepositoryAncestors(root, repositoryPath, pathIdentity = portableRepositoryPathIdentity, ordering = "binary") {
|
|
42
|
+
const segments = repositoryPath.split("/");
|
|
43
|
+
let current = root;
|
|
44
|
+
for (const segment of segments.slice(0, -1)) {
|
|
45
|
+
await assertNoPortableNameCollision(current, segment, pathIdentity, ordering);
|
|
46
|
+
const next = join(current, segment);
|
|
47
|
+
const metadata = await lstat(next).catch((error) => {
|
|
48
|
+
if (isMissing(error)) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
throw error;
|
|
52
|
+
});
|
|
53
|
+
if (metadata === null) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (metadata.isSymbolicLink() || !metadata.isDirectory()) {
|
|
57
|
+
throw new ExistingRepositoryAncestorError("not-directory");
|
|
58
|
+
}
|
|
59
|
+
const canonical = await realpath(next);
|
|
60
|
+
if (!isLexicallyContainedPath(root, canonical)) {
|
|
61
|
+
throw new ExistingRepositoryAncestorError("outside-root");
|
|
62
|
+
}
|
|
63
|
+
current = canonical;
|
|
64
|
+
}
|
|
65
|
+
await assertNoPortableNameCollision(current, segments.at(-1) ?? "", pathIdentity, ordering);
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=node-existing-repository-ancestors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-existing-repository-ancestors.js","sourceRoot":"","sources":["../../../../src/repository-mutation/adapters/node/node-existing-repository-ancestors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAOrE,MAAM,OAAO,+BAAgC,SAAQ,KAAK;IAC/C,OAAO,CAAoC;IAC3C,YAAY,CAAqB;IACjC,aAAa,CAAqB;IAE3C,YACE,OAA0C,EAC1C,OAAO,GAAwE,EAAE;QAEjF,KAAK,CAAC,2CAA2C,OAAO,GAAG,CAAC,CAAC;QAC7D,IAAI,CAAC,IAAI,GAAG,iCAAiC,CAAC;QAC9C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;IAC7C,CAAC;CACF;AAED,SA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0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-repository-path.d.ts","sourceRoot":"","sources":["../../../../src/repository-mutation/adapters/node/node-repository-path.ts"],"names":[],"mappings":"AAEA,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAMjF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { isAbsolute, relative, sep } from "node:path";
|
|
2
|
+
export function isLexicallyContainedPath(root, candidate) {
|
|
3
|
+
const relation = relative(root, candidate);
|
|
4
|
+
return (relation === "" ||
|
|
5
|
+
(!relation.startsWith(`..${sep}`) && relation !== ".." && !isAbsolute(relation)));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=node-repository-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-repository-path.js","sourceRoot":"","sources":["../../../../src/repository-mutation/adapters/node/node-repository-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEtD,MAAM,UAAU,wBAAwB,CAAC,IAAY,EAAE,SAAiB;IACtE,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC3C,OAAO,CACL,QAAQ,KAAK,EAAE;QACf,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,GAAG,EAAE,CAAC,IAAI,QAAQ,KAAK,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CACjF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface ExactFilePostimage {
|
|
2
|
+
readonly bytes: Uint8Array;
|
|
3
|
+
readonly digest: string;
|
|
4
|
+
readonly mode: number;
|
|
5
|
+
readonly size: number;
|
|
6
|
+
}
|
|
7
|
+
export type ExactFilePostimageState = "absent" | "conflict" | "exact";
|
|
8
|
+
export type AbsentFilePublicationOutcome = "already-satisfied" | "published";
|
|
9
|
+
export type AbsentFilePublicationErrorCode = "CLEANUP_FAILED" | "CONFLICT" | "INVALID_ERROR" | "INVALID_POSTIMAGE" | "PUBLICATION_INVALID" | "PUBLICATION_INCOMPLETE" | "PUBLICATION_UNSUPPORTED" | "TEMPORARY_EXISTS" | "TEMPORARY_REPLACED" | "VERIFICATION_FAILED";
|
|
10
|
+
export declare class AbsentFilePublicationError extends Error {
|
|
11
|
+
readonly code: AbsentFilePublicationErrorCode;
|
|
12
|
+
readonly cleanupError: unknown;
|
|
13
|
+
constructor(code: AbsentFilePublicationErrorCode, message: string, options?: ErrorOptions & {
|
|
14
|
+
readonly cleanupError?: unknown;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=exact-postimage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exact-postimage.d.ts","sourceRoot":"","sources":["../../../../src/repository-mutation/application/model/exact-postimage.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;AAEtE,MAAM,MAAM,4BAA4B,GAAG,mBAAmB,GAAG,WAAW,CAAC;AAE7E,MAAM,MAAM,8BAA8B,GACtC,gBAAgB,GAChB,UAAU,GACV,eAAe,GACf,mBAAmB,GACnB,qBAAqB,GACrB,wBAAwB,GACxB,yBAAyB,GACzB,kBAAkB,GAClB,oBAAoB,GACpB,qBAAqB,CAAC;AAE1B,qBAAa,0BAA2B,SAAQ,KAAK;IACnD,QAAQ,CAAC,IAAI,EAAE,8BAA8B,CAAC;IAC9C,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAE/B,YACE,IAAI,EAAE,8BAA8B,EACpC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,YAAY,GAAG;QAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,EAM7D;CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export class AbsentFilePublicationError extends Error {
|
|
2
|
+
code;
|
|
3
|
+
cleanupError;
|
|
4
|
+
constructor(code, message, options) {
|
|
5
|
+
super(message, options);
|
|
6
|
+
this.name = "AbsentFilePublicationError";
|
|
7
|
+
this.code = code;
|
|
8
|
+
this.cleanupError = options?.cleanupError;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=exact-postimage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exact-postimage.js","sourceRoot":"","sources":["../../../../src/repository-mutation/application/model/exact-postimage.ts"],"names":[],"mappings":"AAuBA,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IAC1C,IAAI,CAAiC;IACrC,YAAY,CAAU;IAE/B,YACE,IAAoC,EACpC,OAAe,EACf,OAA4D;QAE5D,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,OAAO,EAAE,YAAY,CAAC;IAC5C,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-identity.d.ts","sourceRoot":"","sources":["../../../../src/repository-mutation/application/model/path-identity.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-identity.js","sourceRoot":"","sources":["../../../../src/repository-mutation/application/model/path-identity.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type PortableRepositoryPathProblem = "absolute" | "backslash" | "control-character" | "empty-segment" | "invalid-character" | "invalid-segment" | "path-too-long" | "reserved-name" | "segment-too-long" | "trailing-dot" | "trailing-space";
|
|
2
|
+
export declare function portableRepositoryPathProblem(repositoryPath: string): PortableRepositoryPathProblem | undefined;
|
|
3
|
+
export declare function portableRepositoryPathIdentity(repositoryPath: string): string;
|
|
4
|
+
export declare function findPortableRepositoryPathCollision(repositoryPaths: readonly string[]): {
|
|
5
|
+
readonly first: string;
|
|
6
|
+
readonly second: string;
|
|
7
|
+
} | undefined;
|
|
8
|
+
//# sourceMappingURL=repository-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository-path.d.ts","sourceRoot":"","sources":["../../../../src/repository-mutation/application/model/repository-path.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,6BAA6B,GACrC,UAAU,GACV,WAAW,GACX,mBAAmB,GACnB,eAAe,GACf,mBAAmB,GACnB,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,cAAc,GACd,gBAAgB,CAAC;AAYrB,wBAAgB,6BAA6B,CAC3C,cAAc,EAAE,MAAM,GACrB,6BAA6B,GAAG,SAAS,CAiD3C;AAED,wBAAgB,8BAA8B,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED,wBAAgB,mCAAmC,CACjD,eAAe,EAAE,SAAS,MAAM,EAAE,GACjC;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAWjE"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
const WINDOWS_RESERVED_NAMES = new Set([
|
|
2
|
+
"AUX",
|
|
3
|
+
"CON",
|
|
4
|
+
"NUL",
|
|
5
|
+
"PRN",
|
|
6
|
+
...Array.from({ length: 9 }, (_unused, index) => `COM${index + 1}`),
|
|
7
|
+
...Array.from({ length: 9 }, (_unused, index) => `LPT${index + 1}`)
|
|
8
|
+
]);
|
|
9
|
+
const PORTABLE_SEGMENT = /^[A-Za-z0-9._@+-]+$/u;
|
|
10
|
+
function isPortableAbsolutePath(repositoryPath) {
|
|
11
|
+
return (repositoryPath.startsWith("/") ||
|
|
12
|
+
repositoryPath.startsWith("\\\\") ||
|
|
13
|
+
/^[A-Za-z]:[\\/]/u.test(repositoryPath));
|
|
14
|
+
}
|
|
15
|
+
export function portableRepositoryPathProblem(repositoryPath) {
|
|
16
|
+
if (repositoryPath.length > 512 ||
|
|
17
|
+
new TextEncoder().encode(repositoryPath).byteLength > 512) {
|
|
18
|
+
return "path-too-long";
|
|
19
|
+
}
|
|
20
|
+
if (isPortableAbsolutePath(repositoryPath)) {
|
|
21
|
+
return "absolute";
|
|
22
|
+
}
|
|
23
|
+
if (repositoryPath.includes("\\")) {
|
|
24
|
+
return "backslash";
|
|
25
|
+
}
|
|
26
|
+
const segments = repositoryPath.split("/");
|
|
27
|
+
for (const segment of segments) {
|
|
28
|
+
if (segment.length === 0) {
|
|
29
|
+
return "empty-segment";
|
|
30
|
+
}
|
|
31
|
+
if (segment === "." || segment === "..") {
|
|
32
|
+
return "invalid-segment";
|
|
33
|
+
}
|
|
34
|
+
if (segment.length > 255 ||
|
|
35
|
+
new TextEncoder().encode(segment).byteLength > 255) {
|
|
36
|
+
return "segment-too-long";
|
|
37
|
+
}
|
|
38
|
+
if (segment.endsWith(".")) {
|
|
39
|
+
return "trailing-dot";
|
|
40
|
+
}
|
|
41
|
+
if (segment.endsWith(" ")) {
|
|
42
|
+
return "trailing-space";
|
|
43
|
+
}
|
|
44
|
+
if (Array.from(segment).some((character) => {
|
|
45
|
+
const codePoint = character.codePointAt(0) ?? 0;
|
|
46
|
+
return codePoint < 32 || codePoint === 127;
|
|
47
|
+
})) {
|
|
48
|
+
return "control-character";
|
|
49
|
+
}
|
|
50
|
+
if (WINDOWS_RESERVED_NAMES.has((segment.split(".")[0] ?? "").toUpperCase())) {
|
|
51
|
+
return "reserved-name";
|
|
52
|
+
}
|
|
53
|
+
if (!PORTABLE_SEGMENT.test(segment)) {
|
|
54
|
+
return "invalid-character";
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
export function portableRepositoryPathIdentity(repositoryPath) {
|
|
60
|
+
return repositoryPath.normalize("NFC").toLowerCase();
|
|
61
|
+
}
|
|
62
|
+
export function findPortableRepositoryPathCollision(repositoryPaths) {
|
|
63
|
+
const observed = new Map();
|
|
64
|
+
for (const repositoryPath of repositoryPaths) {
|
|
65
|
+
const identity = portableRepositoryPathIdentity(repositoryPath);
|
|
66
|
+
const first = observed.get(identity);
|
|
67
|
+
if (first !== undefined) {
|
|
68
|
+
return { first, second: repositoryPath };
|
|
69
|
+
}
|
|
70
|
+
observed.set(identity, repositoryPath);
|
|
71
|
+
}
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=repository-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository-path.js","sourceRoot":"","sources":["../../../../src/repository-mutation/application/model/repository-path.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC;IACrC,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,KAAK,GAAG,CAAC,EAAE,CAAC;IACnE,GAAG,KAAK,CAAC,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AQ,CAAC,CAAC;QACrC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;QAC3C,CAAC;QACD,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
readonly dev: bigint;
|
|
5
|
-
readonly ino: bigint;
|
|
6
|
-
}
|
|
7
|
-
export type BoundedRegularFileRead = {
|
|
8
|
-
readonly outcome: "read";
|
|
9
|
-
readonly bytes: Buffer;
|
|
10
|
-
readonly identity: PortableFileIdentity;
|
|
11
|
-
readonly mode: number;
|
|
12
|
-
} | {
|
|
13
|
-
readonly outcome: "changed";
|
|
14
|
-
} | {
|
|
15
|
-
readonly outcome: "invalid";
|
|
16
|
-
};
|
|
17
|
-
export type BoundedRegularFileReadFaultInjector = (point: {
|
|
18
|
-
readonly phase: "before-stability-check";
|
|
19
|
-
readonly path: string;
|
|
20
|
-
}) => Promise<void> | void;
|
|
21
|
-
export declare function readBoundedRegularFile(path: string, maximumBytes: number, faultInjector?: BoundedRegularFileReadFaultInjector): Promise<BoundedRegularFileRead>;
|
|
22
|
-
export declare function captureFileHandleIdentity(handle: FileHandle): Promise<PortableFileIdentity>;
|
|
23
|
-
export declare function pathMatchesFileIdentity(path: string, expected: PortableFileIdentity): Promise<"different" | "match" | "missing">;
|
|
1
|
+
export { captureFileHandleIdentity, pathMatchesRegularFileIdentity as pathMatchesFileIdentity, readBoundedRegularFile } from "../../../repository-mutation/adapters/node/node-bounded-regular-file.js";
|
|
2
|
+
export type { BoundedRegularFileRead, BoundedRegularFileReadFaultInjector } from "../../../repository-mutation/adapters/node/node-bounded-regular-file.js";
|
|
3
|
+
export type { PortablePathIdentity as PortableFileIdentity } from "../../../repository-mutation/application/model/path-identity.js";
|
|
24
4
|
//# sourceMappingURL=filesystem-file-identity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filesystem-file-identity.d.ts","sourceRoot":"","sources":["../../../../src/scaffolding/adapters/node/filesystem-file-identity.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"filesystem-file-identity.d.ts","sourceRoot":"","sources":["../../../../src/scaffolding/adapters/node/filesystem-file-identity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,8BAA8B,IAAI,uBAAuB,EACzD,sBAAsB,EACvB,MAAM,yEAAyE,CAAC;AACjF,YAAY,EACV,sBAAsB,EACtB,mCAAmC,EACpC,MAAM,yEAAyE,CAAC;AACjF,YAAY,EAAE,oBAAoB,IAAI,oBAAoB,EAAE,MAAM,iEAAiE,CAAC"}
|
|
@@ -1,123 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
function identityFromStat(metadata) {
|
|
3
|
-
return {
|
|
4
|
-
birthtimeNs: metadata.birthtimeNs,
|
|
5
|
-
dev: metadata.dev,
|
|
6
|
-
ino: metadata.ino
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
function isMissing(error) {
|
|
10
|
-
return (error instanceof Error &&
|
|
11
|
-
"code" in error &&
|
|
12
|
-
error.code === "ENOENT");
|
|
13
|
-
}
|
|
14
|
-
function hasErrorCode(error, code) {
|
|
15
|
-
return (error instanceof Error &&
|
|
16
|
-
"code" in error &&
|
|
17
|
-
error.code === code);
|
|
18
|
-
}
|
|
19
|
-
async function isExistingNonRegularPath(path) {
|
|
20
|
-
try {
|
|
21
|
-
const metadata = await lstat(path);
|
|
22
|
-
return metadata.isSymbolicLink() || !metadata.isFile();
|
|
23
|
-
}
|
|
24
|
-
catch {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function sameFileObservation(left, right) {
|
|
29
|
-
return (left.dev === right.dev &&
|
|
30
|
-
left.ino === right.ino &&
|
|
31
|
-
left.birthtimeNs === right.birthtimeNs &&
|
|
32
|
-
left.ctimeNs === right.ctimeNs &&
|
|
33
|
-
left.mtimeNs === right.mtimeNs &&
|
|
34
|
-
left.size === right.size);
|
|
35
|
-
}
|
|
36
|
-
async function readAtMost(handle, maximumBytes) {
|
|
37
|
-
const chunks = [];
|
|
38
|
-
let total = 0;
|
|
39
|
-
while (total <= maximumBytes) {
|
|
40
|
-
const remaining = maximumBytes + 1 - total;
|
|
41
|
-
const buffer = Buffer.allocUnsafe(Math.min(64 * 1024, remaining));
|
|
42
|
-
const { bytesRead } = await handle.read(buffer, 0, buffer.byteLength, null);
|
|
43
|
-
if (bytesRead === 0) {
|
|
44
|
-
return Buffer.concat(chunks, total);
|
|
45
|
-
}
|
|
46
|
-
chunks.push(buffer.subarray(0, bytesRead));
|
|
47
|
-
total += bytesRead;
|
|
48
|
-
}
|
|
49
|
-
return undefined;
|
|
50
|
-
}
|
|
51
|
-
export async function readBoundedRegularFile(path, maximumBytes, faultInjector) {
|
|
52
|
-
if (!Number.isSafeInteger(maximumBytes) || maximumBytes < 0) {
|
|
53
|
-
throw new TypeError("maximumBytes must be a non-negative safe integer.");
|
|
54
|
-
}
|
|
55
|
-
if (await isExistingNonRegularPath(path)) {
|
|
56
|
-
return { outcome: "invalid" };
|
|
57
|
-
}
|
|
58
|
-
const noFollow = process.platform === "win32" ? 0 : constants.O_NOFOLLOW;
|
|
59
|
-
const nonBlocking = process.platform === "win32" ? 0 : constants.O_NONBLOCK;
|
|
60
|
-
let handle;
|
|
61
|
-
try {
|
|
62
|
-
handle = await open(path, constants.O_RDONLY | noFollow | nonBlocking);
|
|
63
|
-
}
|
|
64
|
-
catch (error) {
|
|
65
|
-
if (hasErrorCode(error, "ELOOP") ||
|
|
66
|
-
(await isExistingNonRegularPath(path))) {
|
|
67
|
-
return { outcome: "invalid" };
|
|
68
|
-
}
|
|
69
|
-
throw error;
|
|
70
|
-
}
|
|
71
|
-
try {
|
|
72
|
-
const before = await handle.stat({ bigint: true });
|
|
73
|
-
if (!before.isFile() || before.size > BigInt(maximumBytes)) {
|
|
74
|
-
return { outcome: "invalid" };
|
|
75
|
-
}
|
|
76
|
-
const identity = identityFromStat(before);
|
|
77
|
-
const bytes = await readAtMost(handle, maximumBytes);
|
|
78
|
-
if (bytes === undefined) {
|
|
79
|
-
return { outcome: "invalid" };
|
|
80
|
-
}
|
|
81
|
-
await faultInjector?.({ phase: "before-stability-check", path });
|
|
82
|
-
const after = await handle.stat({ bigint: true });
|
|
83
|
-
if (!after.isFile() ||
|
|
84
|
-
!sameFileObservation(before, after) ||
|
|
85
|
-
after.size !== BigInt(bytes.byteLength) ||
|
|
86
|
-
(await pathMatchesFileIdentity(path, identity)) !== "match") {
|
|
87
|
-
return { outcome: "changed" };
|
|
88
|
-
}
|
|
89
|
-
return {
|
|
90
|
-
outcome: "read",
|
|
91
|
-
bytes,
|
|
92
|
-
identity,
|
|
93
|
-
mode: Number(after.mode)
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
finally {
|
|
97
|
-
await handle.close();
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
export async function captureFileHandleIdentity(handle) {
|
|
101
|
-
return identityFromStat(await handle.stat({ bigint: true }));
|
|
102
|
-
}
|
|
103
|
-
export async function pathMatchesFileIdentity(path, expected) {
|
|
104
|
-
try {
|
|
105
|
-
const metadata = await lstat(path, { bigint: true });
|
|
106
|
-
if (metadata.isSymbolicLink() || !metadata.isFile()) {
|
|
107
|
-
return "different";
|
|
108
|
-
}
|
|
109
|
-
const observed = identityFromStat(metadata);
|
|
110
|
-
return observed.dev === expected.dev &&
|
|
111
|
-
observed.ino === expected.ino &&
|
|
112
|
-
observed.birthtimeNs === expected.birthtimeNs
|
|
113
|
-
? "match"
|
|
114
|
-
: "different";
|
|
115
|
-
}
|
|
116
|
-
catch (error) {
|
|
117
|
-
if (isMissing(error)) {
|
|
118
|
-
return "missing";
|
|
119
|
-
}
|
|
120
|
-
throw error;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
1
|
+
export { captureFileHandleIdentity, pathMatchesRegularFileIdentity as pathMatchesFileIdentity, readBoundedRegularFile } from "../../../repository-mutation/adapters/node/node-bounded-regular-file.js";
|
|
123
2
|
//# sourceMappingURL=filesystem-file-identity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filesystem-file-identity.js","sourceRoot":"","sources":["../../../../src/scaffolding/adapters/node/filesystem-file-identity.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"filesystem-file-identity.js","sourceRoot":"","sources":["../../../../src/scaffolding/adapters/node/filesystem-file-identity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,8BAA8B,IAAI,uBAAuB,EACzD,sBAAsB,EACvB,MAAM,yEAAyE,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { type AbsentFilePublicationFaultPoint } from "../../../repository-mutation/adapters/node/node-absent-file-publication.js";
|
|
1
2
|
import type { MaterializeFileOperation } from "../../contract/scaffold-contract.js";
|
|
2
3
|
export type FilesystemOperationState = "absent" | "after" | "conflict";
|
|
3
4
|
interface FilesystemPublicationFaultPoint {
|
|
4
|
-
readonly phase: "
|
|
5
|
+
readonly phase: AbsentFilePublicationFaultPoint["phase"];
|
|
5
6
|
readonly operationIndex: number;
|
|
6
7
|
readonly operationPath: string;
|
|
7
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filesystem-operation-state.d.ts","sourceRoot":"","sources":["../../../../src/scaffolding/adapters/node/filesystem-operation-state.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"filesystem-operation-state.d.ts","sourceRoot":"","sources":["../../../../src/scaffolding/adapters/node/filesystem-operation-state.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,+BAA+B,EACrC,MAAM,4EAA4E,CAAC;AAEpF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AASpF,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AAEvE,UAAU,+BAA+B;IACvC,QAAQ,CAAC,KAAK,EAAE,+BAA+B,CAAC,OAAO,CAAC,CAAC;IACzD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,MAAM,kCAAkC,GAAG,CAC/C,KAAK,EAAE,+BAA+B,KACnC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAW1B,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,wBAAwB,GAClC,OAAO,CAAC,wBAAwB,CAAC,CAOnC;AAYD,wBAAsB,kCAAkC,CACtD,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE;IACJ,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,SAAS,wBAAwB,EAAE,CAAC;CAC1D,GACA,OAAO,CAAC,IAAI,CAAC,CA8Bf;AAyDD,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,wBAAwB,EACnC,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,EACtB,aAAa,CAAC,EAAE,kCAAkC,GACjD,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAwC1C"}
|