drizzle-docs-generator 0.1.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/LICENSE +21 -0
- package/README.ja.md +89 -0
- package/README.md +89 -0
- package/dist/cli/index.d.ts +8 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +69 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/generator/common.d.ts +393 -0
- package/dist/generator/common.d.ts.map +1 -0
- package/dist/generator/common.js +699 -0
- package/dist/generator/common.js.map +1 -0
- package/dist/generator/index.d.ts +15 -0
- package/dist/generator/index.d.ts.map +1 -0
- package/dist/generator/mysql.d.ts +36 -0
- package/dist/generator/mysql.d.ts.map +1 -0
- package/dist/generator/mysql.js +16 -0
- package/dist/generator/mysql.js.map +1 -0
- package/dist/generator/pg.d.ts +48 -0
- package/dist/generator/pg.d.ts.map +1 -0
- package/dist/generator/pg.js +52 -0
- package/dist/generator/pg.js.map +1 -0
- package/dist/generator/sqlite.d.ts +36 -0
- package/dist/generator/sqlite.d.ts.map +1 -0
- package/dist/generator/sqlite.js +16 -0
- package/dist/generator/sqlite.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/parser/comments.d.ts +31 -0
- package/dist/parser/comments.d.ts.map +1 -0
- package/dist/parser/comments.js +113 -0
- package/dist/parser/comments.js.map +1 -0
- package/dist/parser/index.d.ts +5 -0
- package/dist/parser/index.d.ts.map +1 -0
- package/dist/parser/relations.d.ts +34 -0
- package/dist/parser/relations.d.ts.map +1 -0
- package/dist/parser/relations.js +111 -0
- package/dist/parser/relations.js.map +1 -0
- package/dist/test-utils/cli-runner.d.ts +35 -0
- package/dist/test-utils/cli-runner.d.ts.map +1 -0
- package/dist/test-utils/dbml-validator.d.ts +70 -0
- package/dist/test-utils/dbml-validator.d.ts.map +1 -0
- package/dist/test-utils/index.d.ts +7 -0
- package/dist/test-utils/index.d.ts.map +1 -0
- package/dist/types.d.ts +53 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +69 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ryuya Ikeda
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.ja.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# drizzle-docs-generator
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/drizzle-docs-generator)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
Drizzle ORM スキーマから DBML を生成する CLI。JSDoc コメントを Note 句として出力できる。
|
|
7
|
+
|
|
8
|
+
[English README](./README.md)
|
|
9
|
+
|
|
10
|
+
## インストール
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g drizzle-docs-generator
|
|
14
|
+
# or
|
|
15
|
+
pnpm add -g drizzle-docs-generator
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## 使い方
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# 基本
|
|
22
|
+
drizzle-docs generate ./src/db/schema.ts -d postgresql
|
|
23
|
+
|
|
24
|
+
# ファイル出力
|
|
25
|
+
drizzle-docs generate ./src/db/schema.ts -d postgresql -o schema.dbml
|
|
26
|
+
|
|
27
|
+
# relations() を使う
|
|
28
|
+
drizzle-docs generate ./src/db/schema.ts -d postgresql -r
|
|
29
|
+
|
|
30
|
+
# watch モード
|
|
31
|
+
drizzle-docs generate ./src/db/schema.ts -d postgresql -w
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### オプション
|
|
35
|
+
|
|
36
|
+
| オプション | 説明 |
|
|
37
|
+
| ------------------------- | -------------------------------------------------- |
|
|
38
|
+
| `-o, --output <file>` | 出力ファイルパス |
|
|
39
|
+
| `-d, --dialect <dialect>` | DB 種別: `postgresql` (default), `mysql`, `sqlite` |
|
|
40
|
+
| `-r, --relational` | relations() 定義からリファレンスを生成 |
|
|
41
|
+
| `-w, --watch` | ファイル変更時に自動再生成 |
|
|
42
|
+
|
|
43
|
+
## 例
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
/** ユーザーテーブル */
|
|
47
|
+
export const users = pgTable("users", {
|
|
48
|
+
/** ユーザーID */
|
|
49
|
+
id: serial("id").primaryKey(),
|
|
50
|
+
/** ユーザー名 */
|
|
51
|
+
name: text("name").notNull(),
|
|
52
|
+
});
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
↓
|
|
56
|
+
|
|
57
|
+
```dbml
|
|
58
|
+
Table users {
|
|
59
|
+
id serial [pk, increment, note: 'ユーザーID']
|
|
60
|
+
name text [not null, note: 'ユーザー名']
|
|
61
|
+
|
|
62
|
+
Note: 'ユーザーテーブル'
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## API
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
import { pgGenerate } from "drizzle-docs-generator";
|
|
70
|
+
import * as schema from "./schema";
|
|
71
|
+
|
|
72
|
+
const dbml = pgGenerate({
|
|
73
|
+
schema,
|
|
74
|
+
source: "./schema.ts",
|
|
75
|
+
relational: false,
|
|
76
|
+
out: "./output.dbml", // optional
|
|
77
|
+
});
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`mysqlGenerate`, `sqliteGenerate` も同様。
|
|
81
|
+
|
|
82
|
+
## 動作環境
|
|
83
|
+
|
|
84
|
+
- Node.js >= 24
|
|
85
|
+
- Drizzle ORM v1 beta (1.0.0-beta.10+)
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
MIT
|
package/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# drizzle-docs-generator
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/drizzle-docs-generator)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
CLI tool to generate DBML from Drizzle ORM schemas. Extracts JSDoc comments and outputs them as Note clauses.
|
|
7
|
+
|
|
8
|
+
[日本語版READMEはこちら](./README.ja.md)
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g drizzle-docs-generator
|
|
14
|
+
# or
|
|
15
|
+
pnpm add -g drizzle-docs-generator
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Basic
|
|
22
|
+
drizzle-docs generate ./src/db/schema.ts -d postgresql
|
|
23
|
+
|
|
24
|
+
# Output to file
|
|
25
|
+
drizzle-docs generate ./src/db/schema.ts -d postgresql -o schema.dbml
|
|
26
|
+
|
|
27
|
+
# Use relations() definitions
|
|
28
|
+
drizzle-docs generate ./src/db/schema.ts -d postgresql -r
|
|
29
|
+
|
|
30
|
+
# Watch mode
|
|
31
|
+
drizzle-docs generate ./src/db/schema.ts -d postgresql -w
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Options
|
|
35
|
+
|
|
36
|
+
| Option | Description |
|
|
37
|
+
| ------------------------- | --------------------------------------------------- |
|
|
38
|
+
| `-o, --output <file>` | Output file path |
|
|
39
|
+
| `-d, --dialect <dialect>` | Database: `postgresql` (default), `mysql`, `sqlite` |
|
|
40
|
+
| `-r, --relational` | Generate refs from relations() definitions |
|
|
41
|
+
| `-w, --watch` | Regenerate on file changes |
|
|
42
|
+
|
|
43
|
+
## Example
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
/** Users table */
|
|
47
|
+
export const users = pgTable("users", {
|
|
48
|
+
/** User ID */
|
|
49
|
+
id: serial("id").primaryKey(),
|
|
50
|
+
/** User name */
|
|
51
|
+
name: text("name").notNull(),
|
|
52
|
+
});
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
↓
|
|
56
|
+
|
|
57
|
+
```dbml
|
|
58
|
+
Table users {
|
|
59
|
+
id serial [pk, increment, note: 'User ID']
|
|
60
|
+
name text [not null, note: 'User name']
|
|
61
|
+
|
|
62
|
+
Note: 'Users table'
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## API
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
import { pgGenerate } from "drizzle-docs-generator";
|
|
70
|
+
import * as schema from "./schema";
|
|
71
|
+
|
|
72
|
+
const dbml = pgGenerate({
|
|
73
|
+
schema,
|
|
74
|
+
source: "./schema.ts",
|
|
75
|
+
relational: false,
|
|
76
|
+
out: "./output.dbml", // optional
|
|
77
|
+
});
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`mysqlGenerate`, `sqliteGenerate` are also available.
|
|
81
|
+
|
|
82
|
+
## Requirements
|
|
83
|
+
|
|
84
|
+
- Node.js >= 24
|
|
85
|
+
- Drizzle ORM v1 beta (1.0.0-beta.10+)
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA;;;;GAIG"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command as m } from "commander";
|
|
3
|
+
import { readFileSync as u, existsSync as f, watch as d } from "node:fs";
|
|
4
|
+
import { join as g, resolve as i } from "node:path";
|
|
5
|
+
import { pathToFileURL as p } from "node:url";
|
|
6
|
+
import { pgGenerate as h } from "../generator/pg.js";
|
|
7
|
+
import { mysqlGenerate as w } from "../generator/mysql.js";
|
|
8
|
+
import { sqliteGenerate as y } from "../generator/sqlite.js";
|
|
9
|
+
import "drizzle-orm";
|
|
10
|
+
import "drizzle-orm/pg-core";
|
|
11
|
+
import "drizzle-orm/mysql-core";
|
|
12
|
+
import "drizzle-orm/sqlite-core";
|
|
13
|
+
import "typescript";
|
|
14
|
+
const c = new m(), q = g(import.meta.dirname, "../../package.json"), s = JSON.parse(u(q, "utf-8"));
|
|
15
|
+
c.name("drizzle-docs").description(s.description).version(s.version);
|
|
16
|
+
function D(o) {
|
|
17
|
+
switch (o) {
|
|
18
|
+
case "mysql":
|
|
19
|
+
return w;
|
|
20
|
+
case "sqlite":
|
|
21
|
+
return y;
|
|
22
|
+
default:
|
|
23
|
+
return h;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
async function l(o, e) {
|
|
27
|
+
const r = p(o).href, t = e.watch ? `?t=${Date.now()}` : "", n = await import(r + t);
|
|
28
|
+
return D(e.dialect)({
|
|
29
|
+
schema: n,
|
|
30
|
+
out: e.output,
|
|
31
|
+
relational: e.relational,
|
|
32
|
+
source: o
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
async function $(o, e) {
|
|
36
|
+
const r = i(process.cwd(), o);
|
|
37
|
+
f(r) || (console.error(`Error: Schema file not found: ${r}`), process.exit(1));
|
|
38
|
+
try {
|
|
39
|
+
const t = await l(r, e);
|
|
40
|
+
!e.output && t ? console.log(t) : e.output && console.log(`DBML generated: ${e.output}`);
|
|
41
|
+
} catch (t) {
|
|
42
|
+
t instanceof Error ? console.error(`Error generating DBML: ${t.message}`) : console.error("Error generating DBML:", t), process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function b(o, e) {
|
|
46
|
+
const r = i(process.cwd(), o);
|
|
47
|
+
console.log(`Watching for changes: ${r}`);
|
|
48
|
+
let t = null;
|
|
49
|
+
d(r, async (n) => {
|
|
50
|
+
n === "change" && (t && clearTimeout(t), t = setTimeout(async () => {
|
|
51
|
+
console.log(`
|
|
52
|
+
File changed, regenerating...`);
|
|
53
|
+
try {
|
|
54
|
+
const a = await l(r, e);
|
|
55
|
+
!e.output && a ? console.log(a) : e.output && console.log(`DBML regenerated: ${e.output}`);
|
|
56
|
+
} catch (a) {
|
|
57
|
+
a instanceof Error ? console.error(`Error: ${a.message}`) : console.error("Error:", a);
|
|
58
|
+
}
|
|
59
|
+
}, 100));
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
c.command("generate").description("Generate DBML from Drizzle schema files").argument("<schema>", "Path to Drizzle schema file").option("-o, --output <file>", "Output file path").option("-d, --dialect <dialect>", "Database dialect (postgresql, mysql, sqlite)", "postgresql").option("-r, --relational", "Use relations() definitions instead of foreign keys").option("-w, --watch", "Watch for file changes and regenerate").action(async (o, e) => {
|
|
63
|
+
const r = ["postgresql", "mysql", "sqlite"];
|
|
64
|
+
r.includes(e.dialect) || (console.error(
|
|
65
|
+
`Error: Invalid dialect "${e.dialect}". Valid options: ${r.join(", ")}`
|
|
66
|
+
), process.exit(1)), await $(o, e), e.watch && b(o, e);
|
|
67
|
+
});
|
|
68
|
+
c.parse();
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/cli/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\n/**\n * CLI for drizzle-docs-generator\n *\n * Generates DBML files from Drizzle ORM schema definitions.\n */\n\nimport { Command } from \"commander\";\nimport { existsSync, readFileSync, watch } from \"node:fs\";\nimport { join, resolve } from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { pgGenerate, mysqlGenerate, sqliteGenerate } from \"../generator/index\";\n\nconst program = new Command();\n\n// Use import.meta.dirname (Node 20.11+) to resolve package.json\n// This works correctly even after bundling\nconst packageJsonPath = join(import.meta.dirname, \"../../package.json\");\nconst packageJson = JSON.parse(readFileSync(packageJsonPath, \"utf-8\")) as {\n version: string;\n description: string;\n};\n\nprogram.name(\"drizzle-docs\").description(packageJson.description).version(packageJson.version);\n\ntype Dialect = \"postgresql\" | \"mysql\" | \"sqlite\";\n\ninterface GenerateCommandOptions {\n output?: string;\n dialect: Dialect;\n relational?: boolean;\n watch?: boolean;\n}\n\n/**\n * Get the generate function based on dialect\n */\nfunction getGenerator(dialect: Dialect) {\n switch (dialect) {\n case \"mysql\":\n return mysqlGenerate;\n case \"sqlite\":\n return sqliteGenerate;\n case \"postgresql\":\n default:\n return pgGenerate;\n }\n}\n\n/**\n * Generate DBML from a schema file\n */\nasync function generateDbml(\n schemaPath: string,\n options: GenerateCommandOptions,\n): Promise<string | undefined> {\n // Use file URL for dynamic import (required for ESM)\n const schemaUrl = pathToFileURL(schemaPath).href;\n\n // Dynamic import with cache busting for watch mode\n const cacheBuster = options.watch ? `?t=${Date.now()}` : \"\";\n const schemaModule = (await import(schemaUrl + cacheBuster)) as Record<string, unknown>;\n\n const generate = getGenerator(options.dialect);\n\n const dbml = generate({\n schema: schemaModule,\n out: options.output,\n relational: options.relational,\n source: schemaPath,\n });\n\n return dbml;\n}\n\n/**\n * Run the generate command\n */\nasync function runGenerate(schema: string, options: GenerateCommandOptions): Promise<void> {\n const schemaPath = resolve(process.cwd(), schema);\n\n // Check if file exists\n if (!existsSync(schemaPath)) {\n console.error(`Error: Schema file not found: ${schemaPath}`);\n process.exit(1);\n }\n\n try {\n const dbml = await generateDbml(schemaPath, options);\n\n if (!options.output && dbml) {\n console.log(dbml);\n } else if (options.output) {\n console.log(`DBML generated: ${options.output}`);\n }\n } catch (error) {\n if (error instanceof Error) {\n console.error(`Error generating DBML: ${error.message}`);\n } else {\n console.error(\"Error generating DBML:\", error);\n }\n process.exit(1);\n }\n}\n\n/**\n * Watch mode: regenerate DBML on file changes\n */\nfunction watchSchema(schema: string, options: GenerateCommandOptions): void {\n const schemaPath = resolve(process.cwd(), schema);\n\n console.log(`Watching for changes: ${schemaPath}`);\n\n let debounceTimer: NodeJS.Timeout | null = null;\n\n watch(schemaPath, async (eventType) => {\n if (eventType === \"change\") {\n // Debounce to avoid multiple triggers\n if (debounceTimer) {\n clearTimeout(debounceTimer);\n }\n\n debounceTimer = setTimeout(async () => {\n console.log(\"\\nFile changed, regenerating...\");\n try {\n const dbml = await generateDbml(schemaPath, options);\n\n if (!options.output && dbml) {\n console.log(dbml);\n } else if (options.output) {\n console.log(`DBML regenerated: ${options.output}`);\n }\n } catch (error) {\n if (error instanceof Error) {\n console.error(`Error: ${error.message}`);\n } else {\n console.error(\"Error:\", error);\n }\n }\n }, 100);\n }\n });\n}\n\nprogram\n .command(\"generate\")\n .description(\"Generate DBML from Drizzle schema files\")\n .argument(\"<schema>\", \"Path to Drizzle schema file\")\n .option(\"-o, --output <file>\", \"Output file path\")\n .option(\"-d, --dialect <dialect>\", \"Database dialect (postgresql, mysql, sqlite)\", \"postgresql\")\n .option(\"-r, --relational\", \"Use relations() definitions instead of foreign keys\")\n .option(\"-w, --watch\", \"Watch for file changes and regenerate\")\n .action(async (schema: string, options: GenerateCommandOptions) => {\n // Validate dialect\n const validDialects: Dialect[] = [\"postgresql\", \"mysql\", \"sqlite\"];\n if (!validDialects.includes(options.dialect)) {\n console.error(\n `Error: Invalid dialect \"${options.dialect}\". Valid options: ${validDialects.join(\", \")}`,\n );\n process.exit(1);\n }\n\n // Initial generation\n await runGenerate(schema, options);\n\n // Start watch mode if requested\n if (options.watch) {\n watchSchema(schema, options);\n }\n });\n\nprogram.parse();\n"],"names":["program","Command","packageJsonPath","join","packageJson","readFileSync","getGenerator","dialect","mysqlGenerate","sqliteGenerate","pgGenerate","generateDbml","schemaPath","options","schemaUrl","pathToFileURL","cacheBuster","schemaModule","runGenerate","schema","resolve","existsSync","dbml","error","watchSchema","debounceTimer","watch","eventType","validDialects"],"mappings":";;;;;;;;;;;;;AAcA,MAAMA,IAAU,IAAIC,EAAA,GAIdC,IAAkBC,EAAK,YAAY,SAAS,oBAAoB,GAChEC,IAAc,KAAK,MAAMC,EAAaH,GAAiB,OAAO,CAAC;AAKrEF,EAAQ,KAAK,cAAc,EAAE,YAAYI,EAAY,WAAW,EAAE,QAAQA,EAAY,OAAO;AAc7F,SAASE,EAAaC,GAAkB;AACtC,UAAQA,GAAA;AAAA,IACN,KAAK;AACH,aAAOC;AAAA,IACT,KAAK;AACH,aAAOC;AAAA,IAET;AACE,aAAOC;AAAA,EAAA;AAEb;AAKA,eAAeC,EACbC,GACAC,GAC6B;AAE7B,QAAMC,IAAYC,EAAcH,CAAU,EAAE,MAGtCI,IAAcH,EAAQ,QAAQ,MAAM,KAAK,KAAK,KAAK,IACnDI,IAAgB,MAAM,OAAOH,IAAYE;AAW/C,SATiBV,EAAaO,EAAQ,OAAO,EAEvB;AAAA,IACpB,QAAQI;AAAA,IACR,KAAKJ,EAAQ;AAAA,IACb,YAAYA,EAAQ;AAAA,IACpB,QAAQD;AAAA,EAAA,CACT;AAGH;AAKA,eAAeM,EAAYC,GAAgBN,GAAgD;AACzF,QAAMD,IAAaQ,EAAQ,QAAQ,IAAA,GAAOD,C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