@uni-helper/vite-plugin-uni-pages 0.0.7 → 0.1.1
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/README.md +76 -42
- package/dist/index.cjs +346 -247
- package/dist/index.d.ts +228 -238
- package/dist/index.mjs +367 -0
- package/package.json +20 -34
- package/README.Zh-CN.md +0 -94
- package/dist/index.cjs.map +0 -1
- package/dist/index.js +0 -261
- package/dist/index.js.map +0 -1
package/dist/index.js
DELETED
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
// src/index.ts
|
|
2
|
-
import { normalizePath as normalizePath2 } from "vite";
|
|
3
|
-
|
|
4
|
-
// src/utils.ts
|
|
5
|
-
import { resolve } from "path";
|
|
6
|
-
import { createFilter } from "vite";
|
|
7
|
-
import consola from "consola";
|
|
8
|
-
var isPagePath = (path, options) => {
|
|
9
|
-
const dirPath = resolve(process.cwd(), options.pagesDir);
|
|
10
|
-
const filter = createFilter(
|
|
11
|
-
dirPath + "/**/*.(vue|nvue|uvue)",
|
|
12
|
-
options.exclude
|
|
13
|
-
);
|
|
14
|
-
return filter(path);
|
|
15
|
-
};
|
|
16
|
-
var logger = consola.create({
|
|
17
|
-
defaults: {
|
|
18
|
-
tag: "vite-plugin-uni-pages"
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
// src/constant.ts
|
|
23
|
-
var virtualModuleId = "virtual:uni-pages";
|
|
24
|
-
var resolvedVirtualModuleId = "\0" + virtualModuleId;
|
|
25
|
-
|
|
26
|
-
// src/context/index.ts
|
|
27
|
-
import { extname, join, relative, resolve as resolve2 } from "path";
|
|
28
|
-
import { loadConfig } from "unconfig";
|
|
29
|
-
import { normalizePath } from "vite";
|
|
30
|
-
import fg from "fast-glob";
|
|
31
|
-
import { parse as JSONParse } from "jsonc-parser";
|
|
32
|
-
import { parse } from "@vue/compiler-dom";
|
|
33
|
-
import fs from "fs";
|
|
34
|
-
import { defu } from "defu";
|
|
35
|
-
var Context = class {
|
|
36
|
-
constructor(options) {
|
|
37
|
-
this.pagesPathInfo = [];
|
|
38
|
-
this.pagesMeta = [];
|
|
39
|
-
this.options = options;
|
|
40
|
-
this.createOrUpdatePagesJSON();
|
|
41
|
-
}
|
|
42
|
-
async loadUserPagesConfig() {
|
|
43
|
-
const { config } = await loadConfig({
|
|
44
|
-
sources: [
|
|
45
|
-
{
|
|
46
|
-
files: "pages.config"
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
merge: false
|
|
50
|
-
});
|
|
51
|
-
if (!config) {
|
|
52
|
-
logger.error(
|
|
53
|
-
"Can't found pages.config, please create pages.config.(ts|mts|cts|js|cjs|mjs|json)"
|
|
54
|
-
);
|
|
55
|
-
process.exit(-1);
|
|
56
|
-
}
|
|
57
|
-
logger.debug("Loaded user pages config", config);
|
|
58
|
-
this.pagesConfig = config;
|
|
59
|
-
}
|
|
60
|
-
async scanPages() {
|
|
61
|
-
const files = await fg("**/*.(vue|nvue|uvue)", {
|
|
62
|
-
ignore: ["node_modules", ".git", "**/__*__/*", ...this.options.exclude],
|
|
63
|
-
onlyFiles: true,
|
|
64
|
-
cwd: resolve2(process.cwd(), this.options.pagesDir)
|
|
65
|
-
});
|
|
66
|
-
const basePath = relative(
|
|
67
|
-
resolve2(process.cwd(), this.options.outDir),
|
|
68
|
-
this.options.pagesDir
|
|
69
|
-
);
|
|
70
|
-
this.pagesPathInfo = files.map((file) => {
|
|
71
|
-
return {
|
|
72
|
-
relative: normalizePath(join(basePath, file)),
|
|
73
|
-
absolute: normalizePath(
|
|
74
|
-
resolve2(process.cwd(), this.options.pagesDir, file)
|
|
75
|
-
)
|
|
76
|
-
};
|
|
77
|
-
});
|
|
78
|
-
logger.debug("Scanned pages dir", this.pagesPathInfo);
|
|
79
|
-
}
|
|
80
|
-
async parsePage({ relative: relative2, absolute }) {
|
|
81
|
-
const code = await fs.promises.readFile(absolute, {
|
|
82
|
-
encoding: "utf-8"
|
|
83
|
-
});
|
|
84
|
-
const t = parse(code);
|
|
85
|
-
const path = relative2.replace(extname(relative2), "");
|
|
86
|
-
let pageMeta = {
|
|
87
|
-
path,
|
|
88
|
-
type: "page"
|
|
89
|
-
};
|
|
90
|
-
t == null ? void 0 : t.children.forEach((v) => {
|
|
91
|
-
var _a;
|
|
92
|
-
if (v.type !== 1) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
if (v.tag === "route") {
|
|
96
|
-
v.props.forEach((prop) => {
|
|
97
|
-
var _a2;
|
|
98
|
-
if (prop.type === 6 && prop.name === "type") {
|
|
99
|
-
pageMeta.type = ((_a2 = prop.value) == null ? void 0 : _a2.content) ?? pageMeta.type;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
const astContent = (_a = v.children) == null ? void 0 : _a[0];
|
|
103
|
-
if (astContent && astContent.type === 2) {
|
|
104
|
-
const _pageMeta = JSONParse(astContent.content);
|
|
105
|
-
Object.keys(_pageMeta).forEach((key) => {
|
|
106
|
-
pageMeta[key] = _pageMeta[key];
|
|
107
|
-
});
|
|
108
|
-
pageMeta["path"] = path;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
return pageMeta;
|
|
113
|
-
}
|
|
114
|
-
async mergePagesMeta() {
|
|
115
|
-
var _a;
|
|
116
|
-
const pagesMeta = await Promise.all(
|
|
117
|
-
(_a = this.pagesPathInfo) == null ? void 0 : _a.map(async (page) => await this.parsePage(page))
|
|
118
|
-
);
|
|
119
|
-
const pages = Object.values(defu({}, pagesMeta, this.pagesConfig.pages));
|
|
120
|
-
pages.sort((a) => a.type === "home" ? -1 : 0);
|
|
121
|
-
this.pagesMeta = pages;
|
|
122
|
-
logger.debug("merged pages", this.pagesMeta);
|
|
123
|
-
}
|
|
124
|
-
async createOrUpdatePagesJSON() {
|
|
125
|
-
const outputName = "pages.json";
|
|
126
|
-
const resolvedOutput = normalizePath(
|
|
127
|
-
resolve2(process.cwd(), this.options.outDir, outputName)
|
|
128
|
-
);
|
|
129
|
-
if (!fs.existsSync(resolvedOutput)) {
|
|
130
|
-
fs.writeFileSync(resolvedOutput, `{"pages": [{"path": ""}]}`, {
|
|
131
|
-
encoding: "utf-8"
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
this.options.onBeforeLoadUserConfig(this);
|
|
135
|
-
await this.loadUserPagesConfig();
|
|
136
|
-
this.options.onAfterLoadUserConfig(this);
|
|
137
|
-
this.options.onBeforeScanPages(this);
|
|
138
|
-
await this.scanPages();
|
|
139
|
-
this.options.onAfterScanPages(this);
|
|
140
|
-
this.options.onBeforeMergePagesMeta(this);
|
|
141
|
-
await this.mergePagesMeta();
|
|
142
|
-
this.options.onAfterMergePagesMeta(this);
|
|
143
|
-
this.options.onBeforeWriteFile(this);
|
|
144
|
-
fs.writeFileSync(resolvedOutput, this.pagesJson, {
|
|
145
|
-
encoding: "utf-8"
|
|
146
|
-
});
|
|
147
|
-
this.options.onAfterWriteFile(this);
|
|
148
|
-
}
|
|
149
|
-
async virtualModule() {
|
|
150
|
-
return `export const pages = ${JSON.stringify(this.pagesMeta)};`;
|
|
151
|
-
}
|
|
152
|
-
async pagesConfigSourcePaths() {
|
|
153
|
-
return await fg("pages.config.(ts|mts|cts|js|cjs|mjs|json)", {
|
|
154
|
-
deep: 0,
|
|
155
|
-
onlyFiles: true,
|
|
156
|
-
absolute: true
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
get pagesJson() {
|
|
160
|
-
return JSON.stringify({
|
|
161
|
-
...this.pagesConfig,
|
|
162
|
-
pages: this.pagesMeta
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
// src/config/index.ts
|
|
168
|
-
function definePages(config) {
|
|
169
|
-
return config;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
// src/index.ts
|
|
173
|
-
function resolveOptions(userOptions) {
|
|
174
|
-
return {
|
|
175
|
-
pagesDir: "src/pages",
|
|
176
|
-
outDir: "src",
|
|
177
|
-
exclude: [],
|
|
178
|
-
onBeforeLoadUserConfig: () => {
|
|
179
|
-
},
|
|
180
|
-
onAfterLoadUserConfig: () => {
|
|
181
|
-
},
|
|
182
|
-
onBeforeScanPages: () => {
|
|
183
|
-
},
|
|
184
|
-
onAfterScanPages: () => {
|
|
185
|
-
},
|
|
186
|
-
onBeforeMergePagesMeta: () => {
|
|
187
|
-
},
|
|
188
|
-
onAfterMergePagesMeta: () => {
|
|
189
|
-
},
|
|
190
|
-
onBeforeWriteFile: () => {
|
|
191
|
-
},
|
|
192
|
-
onAfterWriteFile: () => {
|
|
193
|
-
},
|
|
194
|
-
...userOptions
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
var VitePluginUniPages = async (userOptions = {}) => {
|
|
198
|
-
const options = resolveOptions(userOptions);
|
|
199
|
-
logger.debug("Create uni-pages context with", options);
|
|
200
|
-
const ctx = new Context(options);
|
|
201
|
-
return {
|
|
202
|
-
name: "vite-plugin-uni-pages",
|
|
203
|
-
enforce: "pre",
|
|
204
|
-
async configureServer({ watcher, moduleGraph, ws }) {
|
|
205
|
-
const pagesConfigSourcePaths = await ctx.pagesConfigSourcePaths();
|
|
206
|
-
logger.debug("Add watcher", pagesConfigSourcePaths);
|
|
207
|
-
watcher.add(pagesConfigSourcePaths);
|
|
208
|
-
const reloadModule = (module, path = "*") => {
|
|
209
|
-
if (module) {
|
|
210
|
-
moduleGraph.invalidateModule(module);
|
|
211
|
-
if (ws) {
|
|
212
|
-
ws.send({
|
|
213
|
-
path,
|
|
214
|
-
type: "full-reload"
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
const updateVirtualModule = () => {
|
|
220
|
-
logger.debug("Update virtualModule");
|
|
221
|
-
const module = moduleGraph.getModuleById(resolvedVirtualModuleId);
|
|
222
|
-
reloadModule(module);
|
|
223
|
-
};
|
|
224
|
-
watcher.on("change", async (path) => {
|
|
225
|
-
if (pagesConfigSourcePaths.includes(normalizePath2(path)) || isPagePath(path, options)) {
|
|
226
|
-
await ctx.createOrUpdatePagesJSON();
|
|
227
|
-
updateVirtualModule();
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
watcher.on("add", async (path) => {
|
|
231
|
-
if (isPagePath(path, options)) {
|
|
232
|
-
await ctx.createOrUpdatePagesJSON();
|
|
233
|
-
updateVirtualModule();
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
watcher.on("unlink", async (path) => {
|
|
237
|
-
if (isPagePath(path, options)) {
|
|
238
|
-
await ctx.createOrUpdatePagesJSON();
|
|
239
|
-
updateVirtualModule();
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
},
|
|
243
|
-
resolveId(id) {
|
|
244
|
-
if (id === virtualModuleId) {
|
|
245
|
-
return resolvedVirtualModuleId;
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
load(id) {
|
|
249
|
-
if (id === resolvedVirtualModuleId) {
|
|
250
|
-
return ctx.virtualModule();
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
};
|
|
255
|
-
var src_default = VitePluginUniPages;
|
|
256
|
-
export {
|
|
257
|
-
VitePluginUniPages,
|
|
258
|
-
src_default as default,
|
|
259
|
-
definePages
|
|
260
|
-
};
|
|
261
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/utils.ts","../src/constant.ts","../src/context/index.ts","../src/config/index.ts"],"sourcesContent":["import { ModuleNode, normalizePath, Plugin } from \"vite\";\nimport { ResolvedOptions, UserOptions } from \"./types\";\nimport { isPagePath, logger } from \"./utils\";\nimport { virtualModuleId, resolvedVirtualModuleId } from \"./constant\";\nimport { Context } from \"./context\";\n\nexport * from \"./config\";\n\nfunction resolveOptions(userOptions: UserOptions): ResolvedOptions {\n return {\n pagesDir: \"src/pages\",\n outDir: \"src\",\n exclude: [],\n onBeforeLoadUserConfig: () => {},\n onAfterLoadUserConfig: () => {},\n onBeforeScanPages: () => {},\n onAfterScanPages: () => {},\n onBeforeMergePagesMeta: () => {},\n onAfterMergePagesMeta: () => {},\n onBeforeWriteFile: () => {},\n onAfterWriteFile: () => {},\n ...userOptions,\n };\n}\n\nexport const VitePluginUniPages = async (\n userOptions: UserOptions = {}\n): Promise<Plugin> => {\n const options = resolveOptions(userOptions);\n logger.debug(\"Create uni-pages context with\", options);\n const ctx = new Context(options);\n return {\n name: \"vite-plugin-uni-pages\",\n enforce: \"pre\",\n async configureServer({ watcher, moduleGraph, ws }) {\n const pagesConfigSourcePaths = await ctx.pagesConfigSourcePaths();\n logger.debug(\"Add watcher\", pagesConfigSourcePaths);\n watcher.add(pagesConfigSourcePaths);\n\n const reloadModule = (module: ModuleNode | undefined, path = \"*\") => {\n if (module) {\n moduleGraph.invalidateModule(module);\n if (ws) {\n ws.send({\n path,\n type: \"full-reload\",\n });\n }\n }\n };\n const updateVirtualModule = () => {\n logger.debug(\"Update virtualModule\");\n const module = moduleGraph.getModuleById(resolvedVirtualModuleId);\n reloadModule(module);\n };\n\n watcher.on(\"change\", async (path) => {\n if (\n pagesConfigSourcePaths.includes(normalizePath(path)) ||\n isPagePath(path, options)\n ) {\n await ctx.createOrUpdatePagesJSON();\n updateVirtualModule();\n }\n });\n watcher.on(\"add\", async (path) => {\n if (isPagePath(path, options)) {\n await ctx.createOrUpdatePagesJSON();\n updateVirtualModule();\n }\n });\n watcher.on(\"unlink\", async (path) => {\n if (isPagePath(path, options)) {\n await ctx.createOrUpdatePagesJSON();\n updateVirtualModule();\n }\n });\n },\n resolveId(id) {\n if (id === virtualModuleId) {\n return resolvedVirtualModuleId;\n }\n },\n\n load(id) {\n if (id === resolvedVirtualModuleId) {\n return ctx.virtualModule();\n }\n },\n };\n};\n\nexport default VitePluginUniPages;\n","import { resolve } from \"path\";\nimport { ResolvedOptions } from \"./types\";\nimport { createFilter } from \"vite\";\nimport consola from \"consola\";\n\nexport const isPagePath = (path: string, options: ResolvedOptions) => {\n const dirPath = resolve(process.cwd(), options.pagesDir);\n const filter = createFilter(\n dirPath + \"/**/*.(vue|nvue|uvue)\",\n options.exclude\n );\n return filter(path);\n};\n\nexport const logger = consola.create({\n defaults: {\n tag: \"vite-plugin-uni-pages\",\n },\n});\n","export const virtualModuleId = \"virtual:uni-pages\";\nexport const resolvedVirtualModuleId = \"\\0\" + virtualModuleId;\n","import { extname, join, relative, resolve } from \"path\";\nimport { loadConfig } from \"unconfig\";\nimport { normalizePath } from \"vite\";\nimport { PagesConfig } from \"../config/types\";\nimport { PageMeta, PagePathInfo, ResolvedOptions } from \"../types\";\nimport fg from \"fast-glob\";\nimport { parse as JSONParse } from \"jsonc-parser\";\nimport { parse } from \"@vue/compiler-dom\";\nimport fs from \"fs\";\nimport { defu } from \"defu\";\nimport { logger } from \"../utils\";\nexport class Context {\n options: ResolvedOptions;\n pagesConfig!: PagesConfig;\n pagesPathInfo: PagePathInfo[] = [];\n pagesMeta: PageMeta[] = [];\n constructor(options: ResolvedOptions) {\n this.options = options;\n this.createOrUpdatePagesJSON();\n }\n\n async loadUserPagesConfig() {\n const { config } = await loadConfig({\n sources: [\n {\n files: \"pages.config\",\n },\n ],\n merge: false,\n });\n if (!config) {\n logger.error(\n \"Can't found pages.config, please create pages.config.(ts|mts|cts|js|cjs|mjs|json)\"\n );\n process.exit(-1);\n }\n logger.debug(\"Loaded user pages config\", config);\n this.pagesConfig = config as PagesConfig;\n }\n\n async scanPages() {\n const files = await fg(\"**/*.(vue|nvue|uvue)\", {\n ignore: [\"node_modules\", \".git\", \"**/__*__/*\", ...this.options.exclude],\n onlyFiles: true,\n cwd: resolve(process.cwd(), this.options.pagesDir),\n });\n const basePath = relative(\n resolve(process.cwd(), this.options.outDir),\n this.options.pagesDir\n );\n this.pagesPathInfo = files.map((file) => {\n return {\n relative: normalizePath(join(basePath, file)),\n absolute: normalizePath(\n resolve(process.cwd(), this.options.pagesDir, file)\n ),\n };\n });\n logger.debug(\"Scanned pages dir\", this.pagesPathInfo);\n }\n\n async parsePage({ relative, absolute }: PagePathInfo): Promise<PageMeta> {\n const code = await fs.promises.readFile(absolute, {\n encoding: \"utf-8\",\n });\n const t = parse(code);\n const path = relative.replace(extname(relative), \"\");\n let pageMeta: PageMeta = {\n path,\n type: \"page\",\n };\n t?.children.forEach((v) => {\n if (v.type !== 1) {\n return;\n }\n if (v.tag === \"route\") {\n v.props.forEach((prop) => {\n if (prop.type === 6 && prop.name === \"type\") {\n pageMeta.type = prop.value?.content ?? pageMeta.type;\n }\n });\n const astContent = v.children?.[0];\n if (astContent && astContent.type === 2) {\n const _pageMeta = JSONParse(astContent.content);\n Object.keys(_pageMeta).forEach((key) => {\n pageMeta[key] = _pageMeta[key];\n });\n // overwrite path\n pageMeta[\"path\"] = path;\n }\n }\n });\n return pageMeta;\n }\n\n async mergePagesMeta() {\n const pagesMeta = await Promise.all(\n this.pagesPathInfo?.map(async (page) => await this.parsePage(page))\n );\n const pages = Object.values(defu({}, pagesMeta, this.pagesConfig.pages));\n // @ts-ignore\n pages.sort((a) => (a.type === \"home\" ? -1 : 0));\n // @ts-ignore\n this.pagesMeta = pages;\n logger.debug(\"merged pages\", this.pagesMeta);\n }\n\n async createOrUpdatePagesJSON() {\n const outputName = \"pages.json\";\n const resolvedOutput = normalizePath(\n resolve(process.cwd(), this.options.outDir, outputName)\n );\n\n // 如果不存在,先输出一个占位文件\n if (!fs.existsSync(resolvedOutput)) {\n fs.writeFileSync(resolvedOutput, `{\"pages\": [{\"path\": \"\"}]}`, {\n encoding: \"utf-8\",\n });\n }\n\n this.options.onBeforeLoadUserConfig(this);\n await this.loadUserPagesConfig();\n this.options.onAfterLoadUserConfig(this);\n\n this.options.onBeforeScanPages(this);\n await this.scanPages();\n this.options.onAfterScanPages(this);\n\n this.options.onBeforeMergePagesMeta(this);\n await this.mergePagesMeta();\n this.options.onAfterMergePagesMeta(this);\n\n this.options.onBeforeWriteFile(this);\n fs.writeFileSync(resolvedOutput, this.pagesJson, {\n encoding: \"utf-8\",\n });\n this.options.onAfterWriteFile(this);\n }\n\n async virtualModule() {\n return `export const pages = ${JSON.stringify(this.pagesMeta)};`;\n }\n\n async pagesConfigSourcePaths() {\n return await fg(\"pages.config.(ts|mts|cts|js|cjs|mjs|json)\", {\n deep: 0,\n onlyFiles: true,\n absolute: true,\n });\n }\n\n get pagesJson() {\n return JSON.stringify({\n ...this.pagesConfig,\n pages: this.pagesMeta,\n });\n }\n}\n","import { UserPagesConfig } from \"./types\";\nexport * from \"./types\";\nexport function definePages(config: UserPagesConfig) {\n return config;\n}\n"],"mappings":";AAAA,SAAqB,iBAAAA,sBAA6B;;;ACAlD,SAAS,eAAe;AAExB,SAAS,oBAAoB;AAC7B,OAAO,aAAa;AAEb,IAAM,aAAa,CAAC,MAAc,YAA6B;AACpE,QAAM,UAAU,QAAQ,QAAQ,IAAI,GAAG,QAAQ,QAAQ;AACvD,QAAM,SAAS;AAAA,IACb,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AACA,SAAO,OAAO,IAAI;AACpB;AAEO,IAAM,SAAS,QAAQ,OAAO;AAAA,EACnC,UAAU;AAAA,IACR,KAAK;AAAA,EACP;AACF,CAAC;;;AClBM,IAAM,kBAAkB;AACxB,IAAM,0BAA0B,OAAO;;;ACD9C,SAAS,SAAS,MAAM,UAAU,WAAAC,gBAAe;AACjD,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAG9B,OAAO,QAAQ;AACf,SAAS,SAAS,iBAAiB;AACnC,SAAS,aAAa;AACtB,OAAO,QAAQ;AACf,SAAS,YAAY;AAEd,IAAM,UAAN,MAAc;AAAA,EAKnB,YAAY,SAA0B;AAFtC,yBAAgC,CAAC;AACjC,qBAAwB,CAAC;AAEvB,SAAK,UAAU;AACf,SAAK,wBAAwB;AAAA,EAC/B;AAAA,EAEA,MAAM,sBAAsB;AAC1B,UAAM,EAAE,OAAO,IAAI,MAAM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