@atproto/lex-installer 0.0.13 → 0.0.15
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/CHANGELOG.md +28 -0
- package/dist/fs.d.ts +98 -0
- package/dist/fs.d.ts.map +1 -1
- package/dist/fs.js +98 -0
- package/dist/fs.js.map +1 -1
- package/dist/index.d.ts +83 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +50 -0
- package/dist/index.js.map +1 -1
- package/dist/lex-installer.d.ts +135 -0
- package/dist/lex-installer.d.ts.map +1 -1
- package/dist/lex-installer.js +107 -0
- package/dist/lex-installer.js.map +1 -1
- package/dist/lexicons-manifest.d.ts +28 -0
- package/dist/lexicons-manifest.d.ts.map +1 -1
- package/dist/lexicons-manifest.js +25 -0
- package/dist/lexicons-manifest.js.map +1 -1
- package/dist/nsid-map.d.ts +46 -5
- package/dist/nsid-map.d.ts.map +1 -1
- package/dist/nsid-map.js +46 -5
- package/dist/nsid-map.js.map +1 -1
- package/dist/nsid-set.d.ts +41 -5
- package/dist/nsid-set.d.ts.map +1 -1
- package/dist/nsid-set.js +41 -5
- package/dist/nsid-set.js.map +1 -1
- package/package.json +9 -9
- package/src/fs.ts +98 -0
- package/src/index.ts +85 -0
- package/src/lex-installer.ts +137 -0
- package/src/lexicons-manifest.ts +28 -0
- package/src/nsid-map.ts +46 -5
- package/src/nsid-set.ts +41 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @atproto/lex-installer
|
|
2
2
|
|
|
3
|
+
## 0.0.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#4601](https://github.com/bluesky-social/atproto/pull/4601) [`ed61c62`](https://github.com/bluesky-social/atproto/commit/ed61c62f3161fcde85ee9a93f8ed339c7e06c015) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Fix `exports` field in package.json
|
|
8
|
+
|
|
9
|
+
- [#4601](https://github.com/bluesky-social/atproto/pull/4601) [`ed61c62`](https://github.com/bluesky-social/atproto/commit/ed61c62f3161fcde85ee9a93f8ed339c7e06c015) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add JSDoc
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`7b9a98a`](https://github.com/bluesky-social/atproto/commit/7b9a98a763636c5f66a06da11fe6013f29dd9157), [`7b9a98a`](https://github.com/bluesky-social/atproto/commit/7b9a98a763636c5f66a06da11fe6013f29dd9157), [`7b9a98a`](https://github.com/bluesky-social/atproto/commit/7b9a98a763636c5f66a06da11fe6013f29dd9157), [`7b9a98a`](https://github.com/bluesky-social/atproto/commit/7b9a98a763636c5f66a06da11fe6013f29dd9157), [`ed61c62`](https://github.com/bluesky-social/atproto/commit/ed61c62f3161fcde85ee9a93f8ed339c7e06c015), [`7b9a98a`](https://github.com/bluesky-social/atproto/commit/7b9a98a763636c5f66a06da11fe6013f29dd9157), [`7b9a98a`](https://github.com/bluesky-social/atproto/commit/7b9a98a763636c5f66a06da11fe6013f29dd9157), [`ed61c62`](https://github.com/bluesky-social/atproto/commit/ed61c62f3161fcde85ee9a93f8ed339c7e06c015)]:
|
|
12
|
+
- @atproto/lex-schema@0.0.12
|
|
13
|
+
- @atproto/lex-document@0.0.13
|
|
14
|
+
- @atproto/lex-resolver@0.0.14
|
|
15
|
+
- @atproto/lex-cbor@0.0.11
|
|
16
|
+
- @atproto/lex-data@0.0.11
|
|
17
|
+
- @atproto/lex-builder@0.0.14
|
|
18
|
+
|
|
19
|
+
## 0.0.14
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [[`369bb02`](https://github.com/bluesky-social/atproto/commit/369bb02b9f80f0e15e5242e54f09bd4e01117f3a)]:
|
|
24
|
+
- @atproto/lex-data@0.0.10
|
|
25
|
+
- @atproto/lex-resolver@0.0.13
|
|
26
|
+
- @atproto/lex-cbor@0.0.10
|
|
27
|
+
- @atproto/lex-document@0.0.12
|
|
28
|
+
- @atproto/lex-schema@0.0.11
|
|
29
|
+
- @atproto/lex-builder@0.0.13
|
|
30
|
+
|
|
3
31
|
## 0.0.13
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/dist/fs.d.ts
CHANGED
|
@@ -1,4 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads and parses a JSON file from the filesystem.
|
|
3
|
+
*
|
|
4
|
+
* @param path - Absolute or relative path to the JSON file
|
|
5
|
+
* @returns The parsed JSON content
|
|
6
|
+
* @throws {Error} When the file cannot be read (e.g., ENOENT, EACCES)
|
|
7
|
+
* @throws {SyntaxError} When the file contains invalid JSON
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { readJsonFile } from '@atproto/lex-installer'
|
|
12
|
+
*
|
|
13
|
+
* const manifest = await readJsonFile('./lexicons.manifest.json')
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* Handle missing file:
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import { readJsonFile, isEnoentError } from '@atproto/lex-installer'
|
|
20
|
+
*
|
|
21
|
+
* try {
|
|
22
|
+
* const data = await readJsonFile('./config.json')
|
|
23
|
+
* } catch (err) {
|
|
24
|
+
* if (isEnoentError(err)) {
|
|
25
|
+
* console.log('File does not exist, using defaults')
|
|
26
|
+
* } else {
|
|
27
|
+
* throw err
|
|
28
|
+
* }
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
1
32
|
export declare function readJsonFile(path: string): Promise<unknown>;
|
|
33
|
+
/**
|
|
34
|
+
* Writes data as formatted JSON to a file.
|
|
35
|
+
*
|
|
36
|
+
* The function:
|
|
37
|
+
* - Creates parent directories if they don't exist
|
|
38
|
+
* - Formats JSON with 2-space indentation
|
|
39
|
+
* - Overwrites existing files
|
|
40
|
+
* - Sets file permissions to 0o644 (rw-r--r--)
|
|
41
|
+
*
|
|
42
|
+
* @param path - Absolute or relative path for the output file
|
|
43
|
+
* @param data - Data to serialize as JSON
|
|
44
|
+
* @throws {Error} When the file cannot be written
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* import { writeJsonFile } from '@atproto/lex-installer'
|
|
49
|
+
*
|
|
50
|
+
* await writeJsonFile('./output/data.json', {
|
|
51
|
+
* name: 'example',
|
|
52
|
+
* values: [1, 2, 3],
|
|
53
|
+
* })
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* Write a lexicon document:
|
|
58
|
+
* ```typescript
|
|
59
|
+
* import { writeJsonFile } from '@atproto/lex-installer'
|
|
60
|
+
*
|
|
61
|
+
* await writeJsonFile('./lexicons/app/bsky/feed/post.json', lexiconDocument)
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
2
64
|
export declare function writeJsonFile(path: string, data: unknown): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Checks if an error is an ENOENT (file not found) error.
|
|
67
|
+
*
|
|
68
|
+
* Useful for handling cases where a file may or may not exist,
|
|
69
|
+
* such as reading an optional configuration file.
|
|
70
|
+
*
|
|
71
|
+
* @param err - The error to check
|
|
72
|
+
* @returns `true` if the error is an ENOENT error, `false` otherwise
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* import { readFile } from 'node:fs/promises'
|
|
77
|
+
* import { isEnoentError } from '@atproto/lex-installer'
|
|
78
|
+
*
|
|
79
|
+
* const config = await readFile('./config.json').catch((err) => {
|
|
80
|
+
* if (isEnoentError(err)) {
|
|
81
|
+
* return { defaults: true }
|
|
82
|
+
* }
|
|
83
|
+
* throw err
|
|
84
|
+
* })
|
|
85
|
+
* ```
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* In try/catch:
|
|
89
|
+
* ```typescript
|
|
90
|
+
* try {
|
|
91
|
+
* const manifest = await readFile('./lexicons.manifest.json', 'utf8')
|
|
92
|
+
* } catch (err) {
|
|
93
|
+
* if (isEnoentError(err)) {
|
|
94
|
+
* // File doesn't exist, create a new manifest
|
|
95
|
+
* return { version: 1, lexicons: [], resolutions: {} }
|
|
96
|
+
* }
|
|
97
|
+
* throw err
|
|
98
|
+
* }
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
3
101
|
export declare function isEnoentError(err: unknown): boolean;
|
|
4
102
|
//# sourceMappingURL=fs.d.ts.map
|
package/dist/fs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAGA,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGjE;AAED,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,IAAI,CAAC,CAQf;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEnD"}
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGjE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEnD"}
|
package/dist/fs.js
CHANGED
|
@@ -5,10 +5,72 @@ exports.writeJsonFile = writeJsonFile;
|
|
|
5
5
|
exports.isEnoentError = isEnoentError;
|
|
6
6
|
const promises_1 = require("node:fs/promises");
|
|
7
7
|
const node_path_1 = require("node:path");
|
|
8
|
+
/**
|
|
9
|
+
* Reads and parses a JSON file from the filesystem.
|
|
10
|
+
*
|
|
11
|
+
* @param path - Absolute or relative path to the JSON file
|
|
12
|
+
* @returns The parsed JSON content
|
|
13
|
+
* @throws {Error} When the file cannot be read (e.g., ENOENT, EACCES)
|
|
14
|
+
* @throws {SyntaxError} When the file contains invalid JSON
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* import { readJsonFile } from '@atproto/lex-installer'
|
|
19
|
+
*
|
|
20
|
+
* const manifest = await readJsonFile('./lexicons.manifest.json')
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* Handle missing file:
|
|
25
|
+
* ```typescript
|
|
26
|
+
* import { readJsonFile, isEnoentError } from '@atproto/lex-installer'
|
|
27
|
+
*
|
|
28
|
+
* try {
|
|
29
|
+
* const data = await readJsonFile('./config.json')
|
|
30
|
+
* } catch (err) {
|
|
31
|
+
* if (isEnoentError(err)) {
|
|
32
|
+
* console.log('File does not exist, using defaults')
|
|
33
|
+
* } else {
|
|
34
|
+
* throw err
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
8
39
|
async function readJsonFile(path) {
|
|
9
40
|
const contents = await (0, promises_1.readFile)(path, 'utf8');
|
|
10
41
|
return JSON.parse(contents);
|
|
11
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Writes data as formatted JSON to a file.
|
|
45
|
+
*
|
|
46
|
+
* The function:
|
|
47
|
+
* - Creates parent directories if they don't exist
|
|
48
|
+
* - Formats JSON with 2-space indentation
|
|
49
|
+
* - Overwrites existing files
|
|
50
|
+
* - Sets file permissions to 0o644 (rw-r--r--)
|
|
51
|
+
*
|
|
52
|
+
* @param path - Absolute or relative path for the output file
|
|
53
|
+
* @param data - Data to serialize as JSON
|
|
54
|
+
* @throws {Error} When the file cannot be written
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* import { writeJsonFile } from '@atproto/lex-installer'
|
|
59
|
+
*
|
|
60
|
+
* await writeJsonFile('./output/data.json', {
|
|
61
|
+
* name: 'example',
|
|
62
|
+
* values: [1, 2, 3],
|
|
63
|
+
* })
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* Write a lexicon document:
|
|
68
|
+
* ```typescript
|
|
69
|
+
* import { writeJsonFile } from '@atproto/lex-installer'
|
|
70
|
+
*
|
|
71
|
+
* await writeJsonFile('./lexicons/app/bsky/feed/post.json', lexiconDocument)
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
12
74
|
async function writeJsonFile(path, data) {
|
|
13
75
|
await (0, promises_1.mkdir)((0, node_path_1.dirname)(path), { recursive: true });
|
|
14
76
|
const contents = JSON.stringify(data, null, 2);
|
|
@@ -18,6 +80,42 @@ async function writeJsonFile(path, data) {
|
|
|
18
80
|
flag: 'w', // override
|
|
19
81
|
});
|
|
20
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Checks if an error is an ENOENT (file not found) error.
|
|
85
|
+
*
|
|
86
|
+
* Useful for handling cases where a file may or may not exist,
|
|
87
|
+
* such as reading an optional configuration file.
|
|
88
|
+
*
|
|
89
|
+
* @param err - The error to check
|
|
90
|
+
* @returns `true` if the error is an ENOENT error, `false` otherwise
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```typescript
|
|
94
|
+
* import { readFile } from 'node:fs/promises'
|
|
95
|
+
* import { isEnoentError } from '@atproto/lex-installer'
|
|
96
|
+
*
|
|
97
|
+
* const config = await readFile('./config.json').catch((err) => {
|
|
98
|
+
* if (isEnoentError(err)) {
|
|
99
|
+
* return { defaults: true }
|
|
100
|
+
* }
|
|
101
|
+
* throw err
|
|
102
|
+
* })
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* In try/catch:
|
|
107
|
+
* ```typescript
|
|
108
|
+
* try {
|
|
109
|
+
* const manifest = await readFile('./lexicons.manifest.json', 'utf8')
|
|
110
|
+
* } catch (err) {
|
|
111
|
+
* if (isEnoentError(err)) {
|
|
112
|
+
* // File doesn't exist, create a new manifest
|
|
113
|
+
* return { version: 1, lexicons: [], resolutions: {} }
|
|
114
|
+
* }
|
|
115
|
+
* throw err
|
|
116
|
+
* }
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
21
119
|
function isEnoentError(err) {
|
|
22
120
|
return err instanceof Error && 'code' in err && err.code === 'ENOENT';
|
|
23
121
|
}
|
package/dist/fs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":";;AAkCA,oCAGC;AAiCD,sCAWC;AAsCD,sCAEC;AAzHD,+CAA6D;AAC7D,yCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACI,KAAK,UAAU,YAAY,CAAC,IAAY;IAC7C,MAAM,QAAQ,GAAG,MAAM,IAAA,mBAAQ,EAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;AAC7B,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACI,KAAK,UAAU,aAAa,CACjC,IAAY,EACZ,IAAa;IAEb,MAAM,IAAA,gBAAK,EAAC,IAAA,mBAAO,EAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAC/C,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IAC9C,MAAM,IAAA,oBAAS,EAAC,IAAI,EAAE,QAAQ,EAAE;QAC9B,QAAQ,EAAE,MAAM;QAChB,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,GAAG,EAAE,WAAW;KACvB,CAAC,CAAA;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,SAAgB,aAAa,CAAC,GAAY;IACxC,OAAO,GAAG,YAAY,KAAK,IAAI,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,CAAA;AACvE,CAAC","sourcesContent":["import { mkdir, readFile, writeFile } from 'node:fs/promises'\nimport { dirname } from 'node:path'\n\n/**\n * Reads and parses a JSON file from the filesystem.\n *\n * @param path - Absolute or relative path to the JSON file\n * @returns The parsed JSON content\n * @throws {Error} When the file cannot be read (e.g., ENOENT, EACCES)\n * @throws {SyntaxError} When the file contains invalid JSON\n *\n * @example\n * ```typescript\n * import { readJsonFile } from '@atproto/lex-installer'\n *\n * const manifest = await readJsonFile('./lexicons.manifest.json')\n * ```\n *\n * @example\n * Handle missing file:\n * ```typescript\n * import { readJsonFile, isEnoentError } from '@atproto/lex-installer'\n *\n * try {\n * const data = await readJsonFile('./config.json')\n * } catch (err) {\n * if (isEnoentError(err)) {\n * console.log('File does not exist, using defaults')\n * } else {\n * throw err\n * }\n * }\n * ```\n */\nexport async function readJsonFile(path: string): Promise<unknown> {\n const contents = await readFile(path, 'utf8')\n return JSON.parse(contents)\n}\n\n/**\n * Writes data as formatted JSON to a file.\n *\n * The function:\n * - Creates parent directories if they don't exist\n * - Formats JSON with 2-space indentation\n * - Overwrites existing files\n * - Sets file permissions to 0o644 (rw-r--r--)\n *\n * @param path - Absolute or relative path for the output file\n * @param data - Data to serialize as JSON\n * @throws {Error} When the file cannot be written\n *\n * @example\n * ```typescript\n * import { writeJsonFile } from '@atproto/lex-installer'\n *\n * await writeJsonFile('./output/data.json', {\n * name: 'example',\n * values: [1, 2, 3],\n * })\n * ```\n *\n * @example\n * Write a lexicon document:\n * ```typescript\n * import { writeJsonFile } from '@atproto/lex-installer'\n *\n * await writeJsonFile('./lexicons/app/bsky/feed/post.json', lexiconDocument)\n * ```\n */\nexport async function writeJsonFile(\n path: string,\n data: unknown,\n): Promise<void> {\n await mkdir(dirname(path), { recursive: true })\n const contents = JSON.stringify(data, null, 2)\n await writeFile(path, contents, {\n encoding: 'utf8',\n mode: 0o644,\n flag: 'w', // override\n })\n}\n\n/**\n * Checks if an error is an ENOENT (file not found) error.\n *\n * Useful for handling cases where a file may or may not exist,\n * such as reading an optional configuration file.\n *\n * @param err - The error to check\n * @returns `true` if the error is an ENOENT error, `false` otherwise\n *\n * @example\n * ```typescript\n * import { readFile } from 'node:fs/promises'\n * import { isEnoentError } from '@atproto/lex-installer'\n *\n * const config = await readFile('./config.json').catch((err) => {\n * if (isEnoentError(err)) {\n * return { defaults: true }\n * }\n * throw err\n * })\n * ```\n *\n * @example\n * In try/catch:\n * ```typescript\n * try {\n * const manifest = await readFile('./lexicons.manifest.json', 'utf8')\n * } catch (err) {\n * if (isEnoentError(err)) {\n * // File doesn't exist, create a new manifest\n * return { version: 1, lexicons: [], resolutions: {} }\n * }\n * throw err\n * }\n * ```\n */\nexport function isEnoentError(err: unknown): boolean {\n return err instanceof Error && 'code' in err && err.code === 'ENOENT'\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,91 @@
|
|
|
1
1
|
import { LexInstallerOptions } from './lex-installer.js';
|
|
2
|
+
/**
|
|
3
|
+
* Options for the {@link install} function.
|
|
4
|
+
*
|
|
5
|
+
* Extends {@link LexInstallerOptions} with additional options for controlling
|
|
6
|
+
* the installation behavior.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const options: LexInstallOptions = {
|
|
11
|
+
* lexicons: './lexicons',
|
|
12
|
+
* manifest: './lexicons.manifest.json',
|
|
13
|
+
* add: ['com.example.myLexicon', 'at://did:plc:xyz/com.example.otherLexicon'],
|
|
14
|
+
* save: true,
|
|
15
|
+
* ci: false,
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
2
19
|
export type LexInstallOptions = LexInstallerOptions & {
|
|
20
|
+
/**
|
|
21
|
+
* Array of lexicons to add to the installation. Can be NSID strings
|
|
22
|
+
* (e.g., 'com.example.myLexicon') or AT URIs
|
|
23
|
+
* (e.g., 'at://did:plc:xyz/com.example.myLexicon').
|
|
24
|
+
*/
|
|
3
25
|
add?: string[];
|
|
26
|
+
/**
|
|
27
|
+
* Whether to save the updated manifest after installation.
|
|
28
|
+
* When `true`, the manifest file will be written with any new lexicons.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
4
31
|
save?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Enable CI mode for strict manifest verification.
|
|
34
|
+
* When `true`, throws an error if the manifest is out of date,
|
|
35
|
+
* useful for continuous integration pipelines.
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
5
38
|
ci?: boolean;
|
|
6
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* Installs lexicons from the network based on the provided options.
|
|
42
|
+
*
|
|
43
|
+
* This is the main entry point for programmatic lexicon installation.
|
|
44
|
+
* It reads an existing manifest (if present), installs any new lexicons,
|
|
45
|
+
* and optionally saves the updated manifest.
|
|
46
|
+
*
|
|
47
|
+
* @param options - Configuration options for the installation
|
|
48
|
+
* @throws {Error} When the manifest file cannot be read (unless it doesn't exist)
|
|
49
|
+
* @throws {Error} When in CI mode and the manifest is out of date
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* Install lexicons and save the manifest:
|
|
53
|
+
* ```typescript
|
|
54
|
+
* import { install } from '@atproto/lex-installer'
|
|
55
|
+
*
|
|
56
|
+
* await install({
|
|
57
|
+
* lexicons: './lexicons',
|
|
58
|
+
* manifest: './lexicons.manifest.json',
|
|
59
|
+
* add: ['app.bsky.feed.post', 'app.bsky.actor.profile'],
|
|
60
|
+
* save: true,
|
|
61
|
+
* })
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* Verify manifest in CI pipeline:
|
|
66
|
+
* ```typescript
|
|
67
|
+
* import { install } from '@atproto/lex-installer'
|
|
68
|
+
*
|
|
69
|
+
* // Throws if manifest is out of date
|
|
70
|
+
* await install({
|
|
71
|
+
* lexicons: './lexicons',
|
|
72
|
+
* manifest: './lexicons.manifest.json',
|
|
73
|
+
* ci: true,
|
|
74
|
+
* })
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* Install from specific AT URIs:
|
|
79
|
+
* ```typescript
|
|
80
|
+
* import { install } from '@atproto/lex-installer'
|
|
81
|
+
*
|
|
82
|
+
* await install({
|
|
83
|
+
* lexicons: './lexicons',
|
|
84
|
+
* manifest: './lexicons.manifest.json',
|
|
85
|
+
* add: ['at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post'],
|
|
86
|
+
* save: true,
|
|
87
|
+
* })
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
7
90
|
export declare function install(options: LexInstallOptions): Promise<void>;
|
|
8
91
|
//# 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,EAAgB,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAMtE,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,GAAG;IACpD,GAAG,CAAC,EAAE,MAAM,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAMtE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,GAAG;IACpD;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,EAAE,CAAA;IAEd;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;;;OAKG;IACH,EAAE,CAAC,EAAE,OAAO,CAAA;CACb,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,iBAAiB,iBA2BvD"}
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,56 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const fs_js_1 = require("./fs.js");
|
|
6
6
|
const lex_installer_js_1 = require("./lex-installer.js");
|
|
7
7
|
const lexicons_manifest_js_1 = require("./lexicons-manifest.js");
|
|
8
|
+
/**
|
|
9
|
+
* Installs lexicons from the network based on the provided options.
|
|
10
|
+
*
|
|
11
|
+
* This is the main entry point for programmatic lexicon installation.
|
|
12
|
+
* It reads an existing manifest (if present), installs any new lexicons,
|
|
13
|
+
* and optionally saves the updated manifest.
|
|
14
|
+
*
|
|
15
|
+
* @param options - Configuration options for the installation
|
|
16
|
+
* @throws {Error} When the manifest file cannot be read (unless it doesn't exist)
|
|
17
|
+
* @throws {Error} When in CI mode and the manifest is out of date
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* Install lexicons and save the manifest:
|
|
21
|
+
* ```typescript
|
|
22
|
+
* import { install } from '@atproto/lex-installer'
|
|
23
|
+
*
|
|
24
|
+
* await install({
|
|
25
|
+
* lexicons: './lexicons',
|
|
26
|
+
* manifest: './lexicons.manifest.json',
|
|
27
|
+
* add: ['app.bsky.feed.post', 'app.bsky.actor.profile'],
|
|
28
|
+
* save: true,
|
|
29
|
+
* })
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* Verify manifest in CI pipeline:
|
|
34
|
+
* ```typescript
|
|
35
|
+
* import { install } from '@atproto/lex-installer'
|
|
36
|
+
*
|
|
37
|
+
* // Throws if manifest is out of date
|
|
38
|
+
* await install({
|
|
39
|
+
* lexicons: './lexicons',
|
|
40
|
+
* manifest: './lexicons.manifest.json',
|
|
41
|
+
* ci: true,
|
|
42
|
+
* })
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* Install from specific AT URIs:
|
|
47
|
+
* ```typescript
|
|
48
|
+
* import { install } from '@atproto/lex-installer'
|
|
49
|
+
*
|
|
50
|
+
* await install({
|
|
51
|
+
* lexicons: './lexicons',
|
|
52
|
+
* manifest: './lexicons.manifest.json',
|
|
53
|
+
* add: ['at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post'],
|
|
54
|
+
* save: true,
|
|
55
|
+
* })
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
8
58
|
async function install(options) {
|
|
9
59
|
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
10
60
|
try {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAkGA,0BA2BC;;AA7HD,mCAAqD;AACrD,yDAAsE;AACtE,iEAG+B;AA2C/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACI,KAAK,UAAU,OAAO,CAAC,OAA0B;;;QACtD,MAAM,QAAQ,GAAiC,MAAM,IAAA,oBAAY,EAC/D,OAAO,CAAC,QAAQ,CACjB,CAAC,IAAI,CACJ,CAAC,IAAI,EAAE,EAAE,CAAC,6CAAsB,CAAC,KAAK,CAAC,IAAI,CAAC,EAC5C,CAAC,KAAc,EAAE,EAAE;YACjB,IAAI,IAAA,qBAAa,EAAC,KAAK,CAAC;gBAAE,OAAO,SAAS,CAAA;YAC1C,MAAM,IAAI,KAAK,CAAC,kCAAkC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;QAChE,CAAC,CACF,CAAA;QAED,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QAEtC,iEAAiE;QACjE,MAAY,SAAS,0CAAG,IAAI,+BAAY,CAAC,OAAO,CAAC,OAAA,CAAA;QAEjD,MAAM,SAAS,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAA;QAEhD,kBAAkB;QAClB,IAAI,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;YAC7D,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAA;QACrD,CAAC;QAED,4BAA4B;QAC5B,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,MAAM,SAAS,CAAC,IAAI,EAAE,CAAA;QACxB,CAAC;;;;;;;;;;;CACF","sourcesContent":["import { isEnoentError, readJsonFile } from './fs.js'\nimport { LexInstaller, LexInstallerOptions } from './lex-installer.js'\nimport {\n LexiconsManifest,\n lexiconsManifestSchema,\n} from './lexicons-manifest.js'\n\n/**\n * Options for the {@link install} function.\n *\n * Extends {@link LexInstallerOptions} with additional options for controlling\n * the installation behavior.\n *\n * @example\n * ```typescript\n * const options: LexInstallOptions = {\n * lexicons: './lexicons',\n * manifest: './lexicons.manifest.json',\n * add: ['com.example.myLexicon', 'at://did:plc:xyz/com.example.otherLexicon'],\n * save: true,\n * ci: false,\n * }\n * ```\n */\nexport type LexInstallOptions = LexInstallerOptions & {\n /**\n * Array of lexicons to add to the installation. Can be NSID strings\n * (e.g., 'com.example.myLexicon') or AT URIs\n * (e.g., 'at://did:plc:xyz/com.example.myLexicon').\n */\n add?: string[]\n\n /**\n * Whether to save the updated manifest after installation.\n * When `true`, the manifest file will be written with any new lexicons.\n * @default false\n */\n save?: boolean\n\n /**\n * Enable CI mode for strict manifest verification.\n * When `true`, throws an error if the manifest is out of date,\n * useful for continuous integration pipelines.\n * @default false\n */\n ci?: boolean\n}\n\n/**\n * Installs lexicons from the network based on the provided options.\n *\n * This is the main entry point for programmatic lexicon installation.\n * It reads an existing manifest (if present), installs any new lexicons,\n * and optionally saves the updated manifest.\n *\n * @param options - Configuration options for the installation\n * @throws {Error} When the manifest file cannot be read (unless it doesn't exist)\n * @throws {Error} When in CI mode and the manifest is out of date\n *\n * @example\n * Install lexicons and save the manifest:\n * ```typescript\n * import { install } from '@atproto/lex-installer'\n *\n * await install({\n * lexicons: './lexicons',\n * manifest: './lexicons.manifest.json',\n * add: ['app.bsky.feed.post', 'app.bsky.actor.profile'],\n * save: true,\n * })\n * ```\n *\n * @example\n * Verify manifest in CI pipeline:\n * ```typescript\n * import { install } from '@atproto/lex-installer'\n *\n * // Throws if manifest is out of date\n * await install({\n * lexicons: './lexicons',\n * manifest: './lexicons.manifest.json',\n * ci: true,\n * })\n * ```\n *\n * @example\n * Install from specific AT URIs:\n * ```typescript\n * import { install } from '@atproto/lex-installer'\n *\n * await install({\n * lexicons: './lexicons',\n * manifest: './lexicons.manifest.json',\n * add: ['at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post'],\n * save: true,\n * })\n * ```\n */\nexport async function install(options: LexInstallOptions) {\n const manifest: LexiconsManifest | undefined = await readJsonFile(\n options.manifest,\n ).then(\n (json) => lexiconsManifestSchema.parse(json),\n (cause: unknown) => {\n if (isEnoentError(cause)) return undefined\n throw new Error('Failed to read lexicons manifest', { cause })\n },\n )\n\n const additions = new Set(options.add)\n\n // Perform the installation using the existing manifest as \"hint\"\n await using installer = new LexInstaller(options)\n\n await installer.install({ additions, manifest })\n\n // Verify lockfile\n if (options.ci && (!manifest || !installer.equals(manifest))) {\n throw new Error('Lexicons manifest is out of date')\n }\n\n // Save changes if requested\n if (options.save) {\n await installer.save()\n }\n}\n"]}
|
package/dist/lex-installer.d.ts
CHANGED
|
@@ -6,11 +6,81 @@ import { AtUri, NSID } from '@atproto/syntax';
|
|
|
6
6
|
import { LexiconsManifest } from './lexicons-manifest.js';
|
|
7
7
|
import { NsidMap } from './nsid-map.js';
|
|
8
8
|
import { NsidSet } from './nsid-set.js';
|
|
9
|
+
/**
|
|
10
|
+
* Configuration options for the {@link LexInstaller} class.
|
|
11
|
+
*
|
|
12
|
+
* Extends {@link LexResolverOptions} with paths for lexicon storage
|
|
13
|
+
* and manifest management.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* const options: LexInstallerOptions = {
|
|
18
|
+
* lexicons: './lexicons',
|
|
19
|
+
* manifest: './lexicons.manifest.json',
|
|
20
|
+
* update: false,
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
9
24
|
export type LexInstallerOptions = LexResolverOptions & {
|
|
25
|
+
/**
|
|
26
|
+
* Path to the directory where lexicon JSON files will be stored.
|
|
27
|
+
* The directory structure mirrors the NSID hierarchy
|
|
28
|
+
* (e.g., 'app.bsky.feed.post' becomes 'app/bsky/feed/post.json').
|
|
29
|
+
*/
|
|
10
30
|
lexicons: string;
|
|
31
|
+
/**
|
|
32
|
+
* Path to the manifest file that tracks installed lexicons and their resolutions.
|
|
33
|
+
*/
|
|
11
34
|
manifest: string;
|
|
35
|
+
/**
|
|
36
|
+
* When `true`, forces re-fetching of lexicons from the network even if they
|
|
37
|
+
* already exist locally. Useful for updating to newer versions.
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
12
40
|
update?: boolean;
|
|
13
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* Manages the installation of Lexicon schemas from the AT Protocol network.
|
|
44
|
+
*
|
|
45
|
+
* The `LexInstaller` class handles fetching, caching, and organizing lexicon
|
|
46
|
+
* documents. It tracks dependencies between lexicons and ensures all referenced
|
|
47
|
+
* schemas are installed. The class implements `AsyncDisposable` for proper
|
|
48
|
+
* resource cleanup.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* Basic usage with async disposal:
|
|
52
|
+
* ```typescript
|
|
53
|
+
* import { LexInstaller } from '@atproto/lex-installer'
|
|
54
|
+
*
|
|
55
|
+
* await using installer = new LexInstaller({
|
|
56
|
+
* lexicons: './lexicons',
|
|
57
|
+
* manifest: './lexicons.manifest.json',
|
|
58
|
+
* })
|
|
59
|
+
*
|
|
60
|
+
* await installer.install({
|
|
61
|
+
* additions: ['app.bsky.feed.post'],
|
|
62
|
+
* })
|
|
63
|
+
*
|
|
64
|
+
* await installer.save()
|
|
65
|
+
* // Resources automatically cleaned up when block exits
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* Manual disposal:
|
|
70
|
+
* ```typescript
|
|
71
|
+
* const installer = new LexInstaller({
|
|
72
|
+
* lexicons: './lexicons',
|
|
73
|
+
* manifest: './lexicons.manifest.json',
|
|
74
|
+
* })
|
|
75
|
+
*
|
|
76
|
+
* try {
|
|
77
|
+
* await installer.install({ additions: ['app.bsky.actor.profile'] })
|
|
78
|
+
* await installer.save()
|
|
79
|
+
* } finally {
|
|
80
|
+
* await installer[Symbol.asyncDispose]()
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
14
84
|
export declare class LexInstaller implements AsyncDisposable {
|
|
15
85
|
protected readonly options: LexInstallerOptions;
|
|
16
86
|
protected readonly lexiconResolver: LexResolver;
|
|
@@ -2101,7 +2171,57 @@ export declare class LexInstaller implements AsyncDisposable {
|
|
|
2101
2171
|
protected readonly manifest: LexiconsManifest;
|
|
2102
2172
|
constructor(options: LexInstallerOptions);
|
|
2103
2173
|
[Symbol.asyncDispose](): Promise<void>;
|
|
2174
|
+
/**
|
|
2175
|
+
* Compares the current manifest state with another manifest for equality.
|
|
2176
|
+
*
|
|
2177
|
+
* Both manifests are normalized before comparison to ensure consistent
|
|
2178
|
+
* ordering of entries. Useful for detecting changes during CI verification.
|
|
2179
|
+
*
|
|
2180
|
+
* @param manifest - The manifest to compare against
|
|
2181
|
+
* @returns `true` if the manifests are equivalent, `false` otherwise
|
|
2182
|
+
*/
|
|
2104
2183
|
equals(manifest: LexiconsManifest): boolean;
|
|
2184
|
+
/**
|
|
2185
|
+
* Installs lexicons and their dependencies.
|
|
2186
|
+
*
|
|
2187
|
+
* This method processes explicit additions and restores entries from an
|
|
2188
|
+
* existing manifest. It recursively resolves and installs all referenced
|
|
2189
|
+
* lexicons to ensure complete dependency trees.
|
|
2190
|
+
*
|
|
2191
|
+
* @param options - Installation options
|
|
2192
|
+
* @param options.additions - Iterable of lexicon identifiers to add.
|
|
2193
|
+
* Can be NSID strings or AT URIs.
|
|
2194
|
+
* @param options.manifest - Existing manifest to use as a baseline.
|
|
2195
|
+
* Previously resolved URIs are preserved unless explicitly overridden.
|
|
2196
|
+
*
|
|
2197
|
+
* @example
|
|
2198
|
+
* Install new lexicons:
|
|
2199
|
+
* ```typescript
|
|
2200
|
+
* await installer.install({
|
|
2201
|
+
* additions: ['app.bsky.feed.post', 'app.bsky.actor.profile'],
|
|
2202
|
+
* })
|
|
2203
|
+
* ```
|
|
2204
|
+
*
|
|
2205
|
+
* @example
|
|
2206
|
+
* Install with existing manifest as hint:
|
|
2207
|
+
* ```typescript
|
|
2208
|
+
* const existingManifest = await readJsonFile('./lexicons.manifest.json')
|
|
2209
|
+
* await installer.install({
|
|
2210
|
+
* additions: ['com.example.newLexicon'],
|
|
2211
|
+
* manifest: existingManifest,
|
|
2212
|
+
* })
|
|
2213
|
+
* ```
|
|
2214
|
+
*
|
|
2215
|
+
* @example
|
|
2216
|
+
* Install from specific AT URIs:
|
|
2217
|
+
* ```typescript
|
|
2218
|
+
* await installer.install({
|
|
2219
|
+
* additions: [
|
|
2220
|
+
* 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post',
|
|
2221
|
+
* ],
|
|
2222
|
+
* })
|
|
2223
|
+
* ```
|
|
2224
|
+
*/
|
|
2105
2225
|
install({ additions, manifest, }?: {
|
|
2106
2226
|
additions?: Iterable<string>;
|
|
2107
2227
|
manifest?: LexiconsManifest;
|
|
@@ -2115,10 +2235,25 @@ export declare class LexInstaller implements AsyncDisposable {
|
|
|
2115
2235
|
lexicon: LexiconDocument;
|
|
2116
2236
|
uri: AtUri;
|
|
2117
2237
|
}>;
|
|
2238
|
+
/**
|
|
2239
|
+
* Fetches a lexicon document from the network and saves it locally.
|
|
2240
|
+
*
|
|
2241
|
+
* The lexicon is retrieved from the specified AT URI, written to the
|
|
2242
|
+
* local lexicons directory, and its metadata is recorded for the manifest.
|
|
2243
|
+
*
|
|
2244
|
+
* @param uri - The AT URI pointing to the lexicon document
|
|
2245
|
+
* @returns An object containing the fetched lexicon document and its CID
|
|
2246
|
+
*/
|
|
2118
2247
|
fetch(uri: AtUri): Promise<{
|
|
2119
2248
|
lexicon: LexiconDocument;
|
|
2120
2249
|
cid: Cid;
|
|
2121
2250
|
}>;
|
|
2251
|
+
/**
|
|
2252
|
+
* Saves the current manifest to disk.
|
|
2253
|
+
*
|
|
2254
|
+
* The manifest is normalized before saving to ensure consistent ordering
|
|
2255
|
+
* of entries, making it suitable for version control.
|
|
2256
|
+
*/
|
|
2122
2257
|
save(): Promise<void>;
|
|
2123
2258
|
}
|
|
2124
2259
|
//# sourceMappingURL=lex-installer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lex-installer.d.ts","sourceRoot":"","sources":["../src/lex-installer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,OAAO,EAAE,GAAG,EAAa,MAAM,mBAAmB,CAAA;AAClD,OAAO,EACL,eAAe,EAQhB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAEvE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CA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