@refrakt-md/types 0.26.0 → 0.28.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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/pipeline.d.ts +12 -8
- package/dist/pipeline.d.ts.map +1 -1
- package/dist/project-files.d.ts +86 -0
- package/dist/project-files.d.ts.map +1 -0
- package/dist/project-files.js +202 -0
- package/dist/project-files.js.map +1 -0
- package/package.json +5 -1
package/dist/index.d.ts
CHANGED
|
@@ -14,4 +14,5 @@ export { resolveSecurityPolicy } from './security.js';
|
|
|
14
14
|
export type { TemplateManifest, TemplateSiteConfig, PresetScope, PresetEntry, PresetPackManifest, } from './distribution.js';
|
|
15
15
|
export type { SemverParts, CompatResult } from './compat.js';
|
|
16
16
|
export { parseVersion, satisfiesRange, checkRefraktCompat } from './compat.js';
|
|
17
|
+
export type { ProjectFiles, ProjectFilesAccess } from './project-files.js';
|
|
17
18
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACP,QAAQ,GACT,MAAM,iBAAiB,CAAC;AAIzB,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,YAAY,EACZ,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAG7B,YAAY,EACV,aAAa,EACb,UAAU,EACV,eAAe,EACf,UAAU,EACV,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAG7C,YAAY,EACV,MAAM,EACN,UAAU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,EAChB,iBAAiB,EACjB,WAAW,GACX,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAGtD,YAAY,EACX,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,kBAAkB,GAClB,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAK/E,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/pipeline.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** Cross-page pipeline types */
|
|
2
|
+
import type { ProjectFiles } from './project-files.js';
|
|
2
3
|
/** A page heading (level, text, generated anchor id) */
|
|
3
4
|
export interface PipelineHeadingInfo {
|
|
4
5
|
level: number;
|
|
@@ -164,6 +165,11 @@ export interface PluginConfigureOptions {
|
|
|
164
165
|
/** Absolute path to the directory containing `refrakt.config.json`.
|
|
165
166
|
* Useful for resolving config-relative paths (`plan.dir`, etc.). */
|
|
166
167
|
configDir: string;
|
|
168
|
+
/** The project's files (SPEC-113). A plugin that scans the project at
|
|
169
|
+
* configure time (e.g. the plan plugin reading `plan.dir`) reads through
|
|
170
|
+
* this provider so a hosted in-memory build stays fs-free. Undefined when
|
|
171
|
+
* no provider is wired — the plugin falls back to direct `fs`. */
|
|
172
|
+
projectFiles?: ProjectFiles;
|
|
167
173
|
/** Dynamically register a file-root namespace. Use this when the plugin's
|
|
168
174
|
* contribution depends on user config (e.g., the plan plugin registers
|
|
169
175
|
* `plan:` pointing at the user's `plan.dir`, which isn't knowable
|
|
@@ -184,14 +190,12 @@ export interface PreprocessContext extends PipelineContext {
|
|
|
184
190
|
* anchor; any preprocessor that resolves files relative to the project
|
|
185
191
|
* root reads it here. */
|
|
186
192
|
projectRoot?: string;
|
|
187
|
-
/**
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
exists: (path: string) => boolean;
|
|
194
|
-
};
|
|
193
|
+
/** The project's files, as a {@link ProjectFiles} provider (SPEC-113).
|
|
194
|
+
* Preprocess runs before the transform config exists, so the same provider
|
|
195
|
+
* the transform-time sandbox reads through is exposed here for any
|
|
196
|
+
* file-reading preprocessor. Keys are normalized POSIX project-root-relative
|
|
197
|
+
* paths; containment is the provider's contract. */
|
|
198
|
+
sandbox?: ProjectFiles;
|
|
195
199
|
/** Markdoc variables that would otherwise be available to transforms
|
|
196
200
|
* via `config.variables`. Snippet's preprocess uses these to resolve
|
|
197
201
|
* attribute values that come in as Markdoc `Variable` nodes (e.g.
|
package/dist/pipeline.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../src/pipeline.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACX;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC/B,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC;;;;;OAKG;IACH,UAAU,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IAClC,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;I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rB,UAAU,EAAE,cAAc,EAC1B,GAAG,EAAE,eAAe,KAChB,eAAe,CAAC;CACrB;AAED,gFAAgF;AAChF,MAAM,WAAW,sBAAuB,SAAQ,eAAe;IAC9D,mEAAmE;IACnE,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;IACnC,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;oEACgE;IAChE,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;kFACkF;AAClF,MAAM,WAAW,eAAe;IAC/B,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;IACZ,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB;kFAC8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,wDAAwD;IACxD,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACjD"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `ProjectFiles` seam (SPEC-113).
|
|
3
|
+
*
|
|
4
|
+
* One synchronous interface for reading a project's files, rooted at the
|
|
5
|
+
* project root, replacing the handful of ad-hoc `node:fs` seams at the
|
|
6
|
+
* pipeline edges (sandbox example reads, snippet/expand/file-ref readers,
|
|
7
|
+
* `fileRoots` scanning, the plan plugin's scan). Containment is part of the
|
|
8
|
+
* interface contract — implementations reject absolute paths and any path
|
|
9
|
+
* that escapes the root after normalization, so no consumer re-implements
|
|
10
|
+
* path-safety.
|
|
11
|
+
*
|
|
12
|
+
* The interface type ({@link ProjectFiles}, {@link ProjectFilesAccess}) is
|
|
13
|
+
* re-exported from the package root (`@refrakt-md/types`) as a type-only
|
|
14
|
+
* export, keeping the main entry point free of `node:fs`. The providers in
|
|
15
|
+
* this module — one of which ({@link fsProjectFiles}) wraps `node:fs` — are
|
|
16
|
+
* reached via the `@refrakt-md/types/project-files` subpath so a browser
|
|
17
|
+
* bundle that only imports the root never pulls in Node builtins.
|
|
18
|
+
*
|
|
19
|
+
* See ADR-025 for why {@link recordingProjectFiles} exists: centralizing I/O
|
|
20
|
+
* through this one choke point is what makes per-page reads recordable, the
|
|
21
|
+
* load-bearing prerequisite for future incremental rebuild.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Synchronous read access to the project's files, rooted at the project
|
|
25
|
+
* root. Paths are normalized POSIX, project-root-relative keys — never
|
|
26
|
+
* absolute, never containing `..` after normalization. Implementations treat
|
|
27
|
+
* a containment violation (absolute path, traversal escape, symlink escape)
|
|
28
|
+
* the same as an absent file: `read` returns `null`, `list` returns `[]`,
|
|
29
|
+
* `exists` returns `false`.
|
|
30
|
+
*/
|
|
31
|
+
export interface ProjectFiles {
|
|
32
|
+
/** File contents as UTF-8 text, or `null` if absent / not a file /
|
|
33
|
+
* contained out. */
|
|
34
|
+
read(path: string): string | null;
|
|
35
|
+
/** Immediate child entry names (basenames, like `readdir`) directly under
|
|
36
|
+
* the given directory key, or `[]` if absent / contained out. The empty
|
|
37
|
+
* string lists the project root. */
|
|
38
|
+
list(path: string): string[];
|
|
39
|
+
/** Whether a file or directory exists at the key (and is contained). */
|
|
40
|
+
exists(path: string): boolean;
|
|
41
|
+
}
|
|
42
|
+
/** A single access reported by {@link recordingProjectFiles}. The `key` is the
|
|
43
|
+
* caller-supplied path, verbatim — the recorder is a pure pass-through and
|
|
44
|
+
* does not normalize. */
|
|
45
|
+
export interface ProjectFilesAccess {
|
|
46
|
+
op: 'read' | 'list' | 'exists';
|
|
47
|
+
key: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Normalize a caller-supplied path into a POSIX project-root-relative key, or
|
|
51
|
+
* `null` if it is absolute or escapes the root after normalization.
|
|
52
|
+
*
|
|
53
|
+
* The shared containment primitive: both providers funnel every path through
|
|
54
|
+
* this so the rules — absolute reject, `..`-escape reject — live in exactly
|
|
55
|
+
* one place. Accepts either separator; emits forward slashes. The empty
|
|
56
|
+
* string (and `.`) normalize to `''`, the project root.
|
|
57
|
+
*/
|
|
58
|
+
export declare function normalizeProjectKey(input: string): string | null;
|
|
59
|
+
/**
|
|
60
|
+
* The OSS/CLI default provider: reads through `node:fs`, anchored at
|
|
61
|
+
* `rootDir`. Promotes the containment rules `read-file.ts` already implements
|
|
62
|
+
* for snippets — absolute reject, traversal reject, and symlink-escape reject
|
|
63
|
+
* via `realpath` — up to the provider, so every consumer inherits them.
|
|
64
|
+
*/
|
|
65
|
+
export declare function fsProjectFiles(rootDir: string): ProjectFiles;
|
|
66
|
+
/**
|
|
67
|
+
* The hosted/editor provider: backed by a plain `Map` of normalized POSIX
|
|
68
|
+
* keys to file contents. Traversal is structurally impossible — lookups are
|
|
69
|
+
* dictionary keys, and the dictionary holds exactly one project — so the only
|
|
70
|
+
* containment work is normalizing the *query* path (the map's own keys are
|
|
71
|
+
* assumed already normalized, per the contract).
|
|
72
|
+
*
|
|
73
|
+
* Reads through to the live `files` map on every call, so a host may keep the
|
|
74
|
+
* map resident and patch a single key between builds (warm instances —
|
|
75
|
+
* SPEC-113 §4) without reconstructing the provider.
|
|
76
|
+
*/
|
|
77
|
+
export declare function memoryProjectFiles(files: Map<string, string>): ProjectFiles;
|
|
78
|
+
/**
|
|
79
|
+
* A thin wrapper that forwards every call to `inner` unchanged and reports
|
|
80
|
+
* each access to `onRead`. Pure instrumentation — no behaviour change. This
|
|
81
|
+
* is the per-page read-set capture point ADR-025 requires: with all I/O
|
|
82
|
+
* funneled through `ProjectFiles`, wrapping it makes a page's dependency set
|
|
83
|
+
* recordable for free.
|
|
84
|
+
*/
|
|
85
|
+
export declare function recordingProjectFiles(inner: ProjectFiles, onRead: (access: ProjectFilesAccess) => void): ProjectFiles;
|
|
86
|
+
//# sourceMappingURL=project-files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-files.d.ts","sourceRoot":"","sources":["../src/project-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC5B;yBACqB;IACrB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAClC;;yCAEqC;IACrC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC7B,wEAAwE;IACxE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CAC9B;AAED;;0BAE0B;AAC1B,MAAM,WAAW,kBAAkB;IAClC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC/B,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAmBhE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAoD5D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,YAAY,CAkC3E;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACpC,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,GAC1C,YAAY,CAed"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `ProjectFiles` seam (SPEC-113).
|
|
3
|
+
*
|
|
4
|
+
* One synchronous interface for reading a project's files, rooted at the
|
|
5
|
+
* project root, replacing the handful of ad-hoc `node:fs` seams at the
|
|
6
|
+
* pipeline edges (sandbox example reads, snippet/expand/file-ref readers,
|
|
7
|
+
* `fileRoots` scanning, the plan plugin's scan). Containment is part of the
|
|
8
|
+
* interface contract — implementations reject absolute paths and any path
|
|
9
|
+
* that escapes the root after normalization, so no consumer re-implements
|
|
10
|
+
* path-safety.
|
|
11
|
+
*
|
|
12
|
+
* The interface type ({@link ProjectFiles}, {@link ProjectFilesAccess}) is
|
|
13
|
+
* re-exported from the package root (`@refrakt-md/types`) as a type-only
|
|
14
|
+
* export, keeping the main entry point free of `node:fs`. The providers in
|
|
15
|
+
* this module — one of which ({@link fsProjectFiles}) wraps `node:fs` — are
|
|
16
|
+
* reached via the `@refrakt-md/types/project-files` subpath so a browser
|
|
17
|
+
* bundle that only imports the root never pulls in Node builtins.
|
|
18
|
+
*
|
|
19
|
+
* See ADR-025 for why {@link recordingProjectFiles} exists: centralizing I/O
|
|
20
|
+
* through this one choke point is what makes per-page reads recordable, the
|
|
21
|
+
* load-bearing prerequisite for future incremental rebuild.
|
|
22
|
+
*/
|
|
23
|
+
import * as fs from 'node:fs';
|
|
24
|
+
import * as path from 'node:path';
|
|
25
|
+
/**
|
|
26
|
+
* Normalize a caller-supplied path into a POSIX project-root-relative key, or
|
|
27
|
+
* `null` if it is absolute or escapes the root after normalization.
|
|
28
|
+
*
|
|
29
|
+
* The shared containment primitive: both providers funnel every path through
|
|
30
|
+
* this so the rules — absolute reject, `..`-escape reject — live in exactly
|
|
31
|
+
* one place. Accepts either separator; emits forward slashes. The empty
|
|
32
|
+
* string (and `.`) normalize to `''`, the project root.
|
|
33
|
+
*/
|
|
34
|
+
export function normalizeProjectKey(input) {
|
|
35
|
+
if (typeof input !== 'string')
|
|
36
|
+
return null;
|
|
37
|
+
// Absolute paths are never project-relative keys: POSIX root, Windows UNC
|
|
38
|
+
// / backslash root, and drive-letter prefixes are all rejected.
|
|
39
|
+
if (input.startsWith('/') || input.startsWith('\\'))
|
|
40
|
+
return null;
|
|
41
|
+
if (/^[A-Za-z]:/.test(input))
|
|
42
|
+
return null;
|
|
43
|
+
const out = [];
|
|
44
|
+
for (const segment of input.split(/[/\\]+/)) {
|
|
45
|
+
if (segment === '' || segment === '.')
|
|
46
|
+
continue;
|
|
47
|
+
if (segment === '..') {
|
|
48
|
+
// `..` at the root would escape — reject the whole key.
|
|
49
|
+
if (out.length === 0)
|
|
50
|
+
return null;
|
|
51
|
+
out.pop();
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
out.push(segment);
|
|
55
|
+
}
|
|
56
|
+
return out.join('/');
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The OSS/CLI default provider: reads through `node:fs`, anchored at
|
|
60
|
+
* `rootDir`. Promotes the containment rules `read-file.ts` already implements
|
|
61
|
+
* for snippets — absolute reject, traversal reject, and symlink-escape reject
|
|
62
|
+
* via `realpath` — up to the provider, so every consumer inherits them.
|
|
63
|
+
*/
|
|
64
|
+
export function fsProjectFiles(rootDir) {
|
|
65
|
+
const root = path.resolve(rootDir);
|
|
66
|
+
const rootWithSep = root.endsWith(path.sep) ? root : root + path.sep;
|
|
67
|
+
/** Resolve a key to a contained absolute path, or `null` on any
|
|
68
|
+
* containment violation (absolute, traversal, or symlink escape). */
|
|
69
|
+
function resolve(input) {
|
|
70
|
+
const key = normalizeProjectKey(input);
|
|
71
|
+
if (key === null)
|
|
72
|
+
return null;
|
|
73
|
+
const abs = key === '' ? root : path.resolve(root, key);
|
|
74
|
+
// Defense in depth: the normalized key can't escape, but re-check the
|
|
75
|
+
// resolved absolute path against the root anyway.
|
|
76
|
+
if (abs !== root && !abs.startsWith(rootWithSep))
|
|
77
|
+
return null;
|
|
78
|
+
// Symlink-escape check via realpath. Fail-open on ENOENT (the file
|
|
79
|
+
// simply doesn't exist yet — read/exists below report that); fail-closed
|
|
80
|
+
// on any other error.
|
|
81
|
+
try {
|
|
82
|
+
const real = fs.realpathSync(abs);
|
|
83
|
+
if (real !== root && !real.startsWith(rootWithSep))
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
if (err.code !== 'ENOENT')
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
return abs;
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
read(input) {
|
|
94
|
+
const abs = resolve(input);
|
|
95
|
+
if (abs === null)
|
|
96
|
+
return null;
|
|
97
|
+
try {
|
|
98
|
+
const stat = fs.statSync(abs);
|
|
99
|
+
if (!stat.isFile())
|
|
100
|
+
return null;
|
|
101
|
+
return fs.readFileSync(abs, 'utf-8');
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
list(input) {
|
|
108
|
+
const abs = resolve(input);
|
|
109
|
+
if (abs === null)
|
|
110
|
+
return [];
|
|
111
|
+
try {
|
|
112
|
+
return fs.readdirSync(abs);
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
return [];
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
exists(input) {
|
|
119
|
+
const abs = resolve(input);
|
|
120
|
+
if (abs === null)
|
|
121
|
+
return false;
|
|
122
|
+
return fs.existsSync(abs);
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The hosted/editor provider: backed by a plain `Map` of normalized POSIX
|
|
128
|
+
* keys to file contents. Traversal is structurally impossible — lookups are
|
|
129
|
+
* dictionary keys, and the dictionary holds exactly one project — so the only
|
|
130
|
+
* containment work is normalizing the *query* path (the map's own keys are
|
|
131
|
+
* assumed already normalized, per the contract).
|
|
132
|
+
*
|
|
133
|
+
* Reads through to the live `files` map on every call, so a host may keep the
|
|
134
|
+
* map resident and patch a single key between builds (warm instances —
|
|
135
|
+
* SPEC-113 §4) without reconstructing the provider.
|
|
136
|
+
*/
|
|
137
|
+
export function memoryProjectFiles(files) {
|
|
138
|
+
return {
|
|
139
|
+
read(input) {
|
|
140
|
+
const key = normalizeProjectKey(input);
|
|
141
|
+
if (key === null || key === '')
|
|
142
|
+
return null;
|
|
143
|
+
const value = files.get(key);
|
|
144
|
+
return value === undefined ? null : value;
|
|
145
|
+
},
|
|
146
|
+
list(input) {
|
|
147
|
+
const key = normalizeProjectKey(input);
|
|
148
|
+
if (key === null)
|
|
149
|
+
return [];
|
|
150
|
+
const prefix = key === '' ? '' : key + '/';
|
|
151
|
+
const names = new Set();
|
|
152
|
+
for (const mapKey of files.keys()) {
|
|
153
|
+
if (prefix !== '' && !mapKey.startsWith(prefix))
|
|
154
|
+
continue;
|
|
155
|
+
const rest = mapKey.slice(prefix.length);
|
|
156
|
+
if (rest === '')
|
|
157
|
+
continue;
|
|
158
|
+
const slash = rest.indexOf('/');
|
|
159
|
+
names.add(slash === -1 ? rest : rest.slice(0, slash));
|
|
160
|
+
}
|
|
161
|
+
return [...names];
|
|
162
|
+
},
|
|
163
|
+
exists(input) {
|
|
164
|
+
const key = normalizeProjectKey(input);
|
|
165
|
+
if (key === null)
|
|
166
|
+
return false;
|
|
167
|
+
if (key !== '' && files.has(key))
|
|
168
|
+
return true;
|
|
169
|
+
// A directory key "exists" when any file sits under it.
|
|
170
|
+
const prefix = key === '' ? '' : key + '/';
|
|
171
|
+
for (const mapKey of files.keys()) {
|
|
172
|
+
if (mapKey.startsWith(prefix))
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
return false;
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* A thin wrapper that forwards every call to `inner` unchanged and reports
|
|
181
|
+
* each access to `onRead`. Pure instrumentation — no behaviour change. This
|
|
182
|
+
* is the per-page read-set capture point ADR-025 requires: with all I/O
|
|
183
|
+
* funneled through `ProjectFiles`, wrapping it makes a page's dependency set
|
|
184
|
+
* recordable for free.
|
|
185
|
+
*/
|
|
186
|
+
export function recordingProjectFiles(inner, onRead) {
|
|
187
|
+
return {
|
|
188
|
+
read(key) {
|
|
189
|
+
onRead({ op: 'read', key });
|
|
190
|
+
return inner.read(key);
|
|
191
|
+
},
|
|
192
|
+
list(key) {
|
|
193
|
+
onRead({ op: 'list', key });
|
|
194
|
+
return inner.list(key);
|
|
195
|
+
},
|
|
196
|
+
exists(key) {
|
|
197
|
+
onRead({ op: 'exists', key });
|
|
198
|
+
return inner.exists(key);
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=project-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-files.js","sourceRoot":"","sources":["../src/project-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AA8BlC;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAChD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC3C,0EAA0E;IAC1E,gEAAgE;IAChE,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACjE,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAE1C,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7C,IAAI,OAAO,KAAK,EAAE,IAAI,OAAO,KAAK,GAAG;YAAE,SAAS;QAChD,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACtB,wDAAwD;YACxD,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,IAAI,CAAC;YAClC,GAAG,CAAC,GAAG,EAAE,CAAC;YACV,SAAS;QACV,CAA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G,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC;YAC3C,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;gBACnC,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC;oBAAE,OAAO,IAAI,CAAC;YAC5C,CAAC;YACD,OAAO,KAAK,CAAC;QACd,CAAC;KACD,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACpC,KAAmB,EACnB,MAA4C;IAE5C,OAAO;QACN,IAAI,CAAC,GAAG;YACP,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;YAC5B,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,CAAC,GAAG;YACP,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;YAC5B,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,MAAM,CAAC,GAAG;YACT,MAAM,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC;YAC9B,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;KACD,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refrakt-md/types",
|
|
3
3
|
"description": "Shared type definitions for refrakt.md",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.28.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
".": {
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
22
|
"default": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./project-files": {
|
|
25
|
+
"types": "./dist/project-files.d.ts",
|
|
26
|
+
"default": "./dist/project-files.js"
|
|
23
27
|
}
|
|
24
28
|
},
|
|
25
29
|
"files": [
|