@nest-yalc-2/jest-config 1.3.3

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.
Files changed (47) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +31 -0
  3. package/package.json +31 -0
  4. package/src/CHANGELOG.md +8 -0
  5. package/src/README.md +31 -0
  6. package/src/config/CHANGELOG.md +8 -0
  7. package/src/config/README.md +31 -0
  8. package/src/config/gql-plugin.js +25 -0
  9. package/src/config/index.d.ts +2 -0
  10. package/src/config/index.js +19 -0
  11. package/src/config/index.js.map +1 -0
  12. package/src/config/index.ts +2 -0
  13. package/src/config/jest-conf.generator.d.ts +53 -0
  14. package/src/config/jest-conf.generator.js +228 -0
  15. package/src/config/jest-conf.generator.js.map +1 -0
  16. package/src/config/jest-conf.generator.ts +368 -0
  17. package/src/config/jest-def.config.d.ts +20 -0
  18. package/src/config/jest-def.config.js +172 -0
  19. package/src/config/jest-def.config.js.map +1 -0
  20. package/src/config/jest-def.config.ts +210 -0
  21. package/src/config/jest.setup.d.ts +0 -0
  22. package/src/config/jest.setup.js +9 -0
  23. package/src/config/jest.setup.js.map +1 -0
  24. package/src/config/jest.setup.ts +39 -0
  25. package/src/config/package.json +22 -0
  26. package/src/config/tsconfig.dev.json +3 -0
  27. package/src/config/tsconfig.json +9 -0
  28. package/src/gql-plugin.js +25 -0
  29. package/src/index.d.ts +2 -0
  30. package/src/index.js +19 -0
  31. package/src/index.js.map +1 -0
  32. package/src/index.ts +2 -0
  33. package/src/jest-conf.generator.d.ts +53 -0
  34. package/src/jest-conf.generator.js +227 -0
  35. package/src/jest-conf.generator.js.map +1 -0
  36. package/src/jest-conf.generator.ts +362 -0
  37. package/src/jest-def.config.d.ts +20 -0
  38. package/src/jest-def.config.js +187 -0
  39. package/src/jest-def.config.js.map +1 -0
  40. package/src/jest-def.config.ts +225 -0
  41. package/src/jest.setup.d.ts +0 -0
  42. package/src/jest.setup.js +25 -0
  43. package/src/jest.setup.js.map +1 -0
  44. package/src/jest.setup.ts +58 -0
  45. package/src/package.json +22 -0
  46. package/src/tsconfig.dev.json +3 -0
  47. package/src/tsconfig.json +9 -0
@@ -0,0 +1,362 @@
1
+ /* istanbul ignore file */
2
+
3
+ import * as path from 'path';
4
+
5
+ import type { JestConfigWithTsJest } from 'ts-jest';
6
+ import defaultConf, {
7
+ coveragePathIgnorePatterns,
8
+ globals,
9
+ coverageThreshold,
10
+ IDefaultConfOptions,
11
+ tsJestConfig,
12
+ tsJestConfigE2E,
13
+ } from './jest-def.config';
14
+ // import { options as jestOptionObject } from 'jest-cli/build/cli/args';
15
+ import yargs from 'yargs/yargs';
16
+ import { hideBin } from 'yargs/helpers';
17
+
18
+ interface IAppDep {
19
+ name: string;
20
+ path: string;
21
+ }
22
+ export interface IAppProjSetting {
23
+ confOverride?: any;
24
+ deps: IAppDep[];
25
+ }
26
+
27
+ export interface IProjectInfo {
28
+ path: string;
29
+ sourcePath: string;
30
+ type: 'library' | 'application' | string;
31
+ }
32
+
33
+ export interface IOptions {
34
+ skipProjects?: string[];
35
+ /**
36
+ * key: project name
37
+ * value: jest configurations
38
+ */
39
+ confOverrides?: { [key: string]: any };
40
+ defaultCoverageThreshold?: {
41
+ branches: number;
42
+ functions: number;
43
+ lines: number;
44
+ statements: number;
45
+ };
46
+ tsConfigPath?: { (proj: IProjectInfo): string };
47
+ coverageOutputPath?: { (subProjectPath: string): string };
48
+ defaultConfOptions?: IDefaultConfOptions;
49
+ tsJestConfig?: any;
50
+ extraSetupFiles?: string[];
51
+ setupFilesAfterEnv?: string[];
52
+ }
53
+
54
+ // considering our heap consumption (~300-700mb), 5 workers will consume around 3GB of ram
55
+ // if you want to increase/decrease this value, you can set the npm_config_jestworkers:
56
+ // * npm < 9 -> with the `npm config set` command (more info: https://docs.npmjs.com/cli/v7/commands/npm-config)
57
+ // * npm >= 9 -> with: export JEST_WORKERS=5
58
+ const maxWorkers =
59
+ process.env.npm_config_jestworkers ||
60
+ process.env.JEST_WORKERS ||
61
+ '50%';
62
+
63
+ // eslint-disable-next-line no-console
64
+ console.log(`Max workers: ${maxWorkers}`);
65
+
66
+ export function jestConfGenerator(
67
+ rootPath: string,
68
+ projectList: { [key: string]: IProjectInfo },
69
+ appProjectsSettings: {
70
+ [key: string]: IAppProjSetting;
71
+ },
72
+ options: IOptions,
73
+ ): JestConfigWithTsJest {
74
+ const createProjectSets = (projects: any[]) => {
75
+ const _projectSets: { [key: string]: any } = {};
76
+ for (const app in appProjectsSettings) {
77
+ _projectSets[app] = projects.filter((p) =>
78
+ appProjectsSettings[app].deps.some((v) =>
79
+ p.displayName.startsWith(`unit/${v.name}`),
80
+ ),
81
+ );
82
+ }
83
+
84
+ return {
85
+ ..._projectSets,
86
+ all: projects,
87
+ };
88
+ };
89
+
90
+ const cacheDirBase = '/tmp/jest_rs/';
91
+
92
+ let projects = [];
93
+
94
+ const confFactory = (
95
+ projName: string,
96
+ proj: IProjectInfo,
97
+ _projects?: any,
98
+ ) => ({
99
+ ...defaultConf(
100
+ `${rootPath}/`,
101
+ options.defaultConfOptions,
102
+ tsJestConfig(
103
+ options.tsConfigPath?.(proj) ?? `${rootPath}/${proj.path}/tsconfig.json`,
104
+ options.tsJestConfig,
105
+ ),
106
+ ),
107
+ globals: globals(),
108
+ // name: `unit/${projName}`,
109
+ displayName: `unit/${projName}`,
110
+ cacheDirectory: `${cacheDirBase}/unit/${projName}`,
111
+ rootDir: `${rootPath}/${proj.sourcePath}/`,
112
+ roots: [
113
+ `${rootPath}/${proj.path}`,
114
+ `${rootPath}/__mocks__`,
115
+ ],
116
+ setupFiles: [
117
+ `${__dirname}/jest.setup.js`,
118
+ ...(options.extraSetupFiles ?? []),
119
+ ],
120
+ coveragePathIgnorePatterns,
121
+ });
122
+
123
+ for (const projName of Object.keys(projectList)) {
124
+ const proj = projectList[projName];
125
+ if (!options.skipProjects?.includes(projName) && !options.skipProjects?.includes(proj.path)) {
126
+ let conf = confFactory(projName, proj);
127
+
128
+ if (appProjectsSettings[projName]?.confOverride) {
129
+ conf = { ...conf, ...appProjectsSettings[projName].confOverride };
130
+ }
131
+
132
+ if (options.confOverrides) {
133
+ const overrideKey = Object.keys(options.confOverrides).find(
134
+ (v) => projName === v && v,
135
+ );
136
+
137
+ const overrideConf =
138
+ overrideKey && options.confOverrides[overrideKey]
139
+ ? options.confOverrides[overrideKey]
140
+ : {};
141
+
142
+ conf = { ...conf, ...overrideConf };
143
+ }
144
+
145
+ projects.push(conf);
146
+ }
147
+ }
148
+
149
+ const projectSets: { [key: string]: any } = createProjectSets(projects);
150
+
151
+ // use argv to catch the path argument in any position
152
+ const argv: any = yargs(hideBin(process.argv))
153
+ .command('$0 [paths]', 'test paths', (yargs) => {
154
+ return yargs
155
+ .positional('path', {
156
+ describe: 'test path',
157
+ type: 'string',
158
+ coerce: (arg: string): string[] => {
159
+ return arg.split(',');
160
+ },
161
+ })
162
+ .option('proj', {
163
+ describe: 'comma-separated project names',
164
+ type: 'string',
165
+ coerce: (arg: string): string[] => {
166
+ return arg.split(',');
167
+ },
168
+ })
169
+ .option('paths', {
170
+ describe: 'comma-separated test paths',
171
+ type: 'string',
172
+ coerce: (arg: string): string[] => {
173
+ return arg.split(',');
174
+ },
175
+ });
176
+ })
177
+ .showHelpOnFail(false)
178
+ // .options(jestOptionObject)
179
+ .fail(() => {
180
+ // nothing to do
181
+ }).argv;
182
+
183
+ const selectedProj =
184
+ argv.proj || process.env.npm_config_projects?.split(',') || 'all';
185
+
186
+ projects = Array.isArray(selectedProj)
187
+ ? Object.values(projectSets)
188
+ .flat()
189
+ .filter((value) => {
190
+ return selectedProj.some((projName) => {
191
+ return value.displayName === `unit/${projName}`;
192
+ });
193
+ })
194
+ : projectSets[selectedProj];
195
+
196
+ const paths = [];
197
+
198
+ if (argv.path) {
199
+ paths.push(argv.path);
200
+ }
201
+
202
+ if (argv.paths) {
203
+ paths.push(...argv.paths);
204
+ }
205
+
206
+ const possiblePath =
207
+ (paths.length > 0 ? paths : null) ??
208
+ argv.testPathPattern?.[0] ??
209
+ argv.coverage ??
210
+ '';
211
+
212
+ // eslint-disable-next-line no-console
213
+ console.debug('possiblePaths', possiblePath);
214
+
215
+ let config: any = {};
216
+
217
+ function getSubprojectPath(testPath: string) {
218
+ // "." must be converted to "/"
219
+ let subProjectPath = testPath.startsWith('.')
220
+ ? testPath.slice(1)
221
+ : testPath;
222
+ subProjectPath = subProjectPath.startsWith(rootPath)
223
+ ? subProjectPath.slice(rootPath.length)
224
+ : subProjectPath;
225
+ // we always need "/" at the beginning of the string
226
+ subProjectPath = subProjectPath.startsWith('/')
227
+ ? subProjectPath
228
+ : `/${subProjectPath}`;
229
+
230
+ // get the project which prefix is closest to testPath
231
+ // to apply the correct path for coverage etc.
232
+ for (const proj of Object.values(projectList)) {
233
+ const root: string = proj.path;
234
+ if (testPath.startsWith(root) && subProjectPath.length < root.length) {
235
+ subProjectPath = `/${root}`;
236
+ }
237
+ }
238
+
239
+ const lastIndexOfSrc = subProjectPath.lastIndexOf(`/src/`);
240
+ if (lastIndexOfSrc >= 0)
241
+ subProjectPath = subProjectPath.substring(0, lastIndexOfSrc);
242
+
243
+ return subProjectPath;
244
+ }
245
+
246
+ let selectedProjects: any[] = [];
247
+ if (possiblePath === true) {
248
+ if (Array.isArray(selectedProj)) {
249
+ selectedProjects.push(
250
+ ...projects.filter((p: any) =>
251
+ selectedProj.some((projName) =>
252
+ p.displayName.startsWith(`unit/${projName}`),
253
+ ),
254
+ ),
255
+ );
256
+ } else {
257
+ selectedProjects = projects;
258
+ }
259
+ } else {
260
+ const testPaths: string[] = Array.isArray(possiblePath)
261
+ ? possiblePath
262
+ : [possiblePath];
263
+
264
+ // eslint-disable-next-line no-console
265
+ console.debug('testPaths', testPaths);
266
+ const subProjectPathList = testPaths.map((v) => getSubprojectPath(v));
267
+
268
+ selectedProjects = projects.filter((v: any) =>
269
+ subProjectPathList.some((subProjectPath) =>
270
+ v.rootDir.startsWith(`${rootPath}${subProjectPath}`),
271
+ ),
272
+ );
273
+
274
+ if (Array.isArray(selectedProj)) {
275
+ selectedProjects.push(
276
+ ...projects.filter((p: any) =>
277
+ selectedProj.some((projName) =>
278
+ p.displayName.startsWith(`unit/${projName}`),
279
+ ),
280
+ ),
281
+ );
282
+ }
283
+
284
+ // eslint-disable-next-line no-console
285
+ console.debug('Subproject path:', subProjectPathList ?? ['']);
286
+ }
287
+
288
+ // eslint-disable-next-line no-console
289
+ console.debug(
290
+ 'selectedProjects',
291
+ selectedProjects.map((v: any) => v.displayName),
292
+ );
293
+
294
+ // we can still support specific coverage output path when only one project is selected
295
+ const coverageFolder = selectedProjects.length > 1 ? '' : selectedProj;
296
+
297
+ config = {
298
+ maxWorkers,
299
+ coverageReporters: ['json-summary', 'json', 'lcov', 'text', 'clover'],
300
+ rootDir: `${rootPath}`,
301
+ coverageThreshold: coverageThreshold(
302
+ selectedProjects,
303
+ options.defaultCoverageThreshold,
304
+ ),
305
+ coverageDirectory: path.join(
306
+ rootPath,
307
+ options.coverageOutputPath?.(coverageFolder) ??
308
+ `var/coverage/${coverageFolder}`,
309
+ ),
310
+ collectCoverageFrom: [
311
+ `**/*.{js,ts}`,
312
+ '!**/node_modules/**',
313
+ '!**/.warmup/**',
314
+ ],
315
+ };
316
+
317
+ config.projects = selectedProjects;
318
+
319
+ return config;
320
+ }
321
+
322
+ export interface E2EOptions {
323
+ alias?: string;
324
+ e2eDirname: string;
325
+ rootDirname: string;
326
+ defaultConfOptions?: IDefaultConfOptions;
327
+ confOverride?: JestConfigWithTsJest;
328
+ withGqlPlugins?: boolean;
329
+ tsJestConfig?: any;
330
+ }
331
+
332
+ export const createE2EConfig = (options: E2EOptions): JestConfigWithTsJest => {
333
+ let conf: JestConfigWithTsJest = {
334
+ ...defaultConf(
335
+ `${options.rootDirname}`,
336
+ options.defaultConfOptions,
337
+ tsJestConfigE2E(
338
+ path.resolve(`${options.e2eDirname}/tsconfig.json`),
339
+ options.withGqlPlugins ?? false,
340
+ options.tsJestConfig,
341
+ ),
342
+ ),
343
+ testRegex: '.*\\.e2e-spec\\.ts$',
344
+ setupFilesAfterEnv: [`${options.e2eDirname}/jest.e2e-setup.ts`],
345
+ roots: [`${options.e2eDirname}`],
346
+ bail: 1,
347
+ };
348
+
349
+ if (options.alias) {
350
+ conf.displayName = `e2e/${options.alias}`;
351
+ // conf.name = `e2e/${options.alias}`;
352
+ }
353
+
354
+ if (options.confOverride) {
355
+ conf = {
356
+ ...conf,
357
+ ...options.confOverride,
358
+ };
359
+ }
360
+
361
+ return conf;
362
+ };
@@ -0,0 +1,20 @@
1
+ import type { JestConfigWithTsJest } from 'ts-jest';
2
+ export declare const coveragePathIgnorePatterns: string[];
3
+ export declare const globals: () => {
4
+ __JEST_DISABLE_DB: boolean;
5
+ };
6
+ export declare const tsJestConfigE2E: (tsConfPath?: string, withGqlPlugin?: boolean, overrideTsJestConfig?: any) => any;
7
+ export declare const tsJestConfig: (tsConfPath?: string, overrideTsJestConfig?: any) => any;
8
+ export declare const coverageThreshold: (projects?: any[], defaultCoverageThreshold?: {
9
+ branches: number;
10
+ functions: number;
11
+ lines: number;
12
+ statements: number;
13
+ }) => Record<string, any>;
14
+ export interface IDefaultConfOptions {
15
+ transformEsModules?: string[] | boolean;
16
+ tsJestConf?: any;
17
+ jestConf?: any;
18
+ }
19
+ declare const defaultConf: (dirname: string, options?: IDefaultConfOptions, _tsJestConfig?: any) => JestConfigWithTsJest;
20
+ export default defaultConf;
@@ -0,0 +1,187 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.coverageThreshold = exports.tsJestConfig = exports.tsJestConfigE2E = exports.globals = exports.coveragePathIgnorePatterns = void 0;
37
+ const path = __importStar(require("path"));
38
+ const readTsConfig = __importStar(require("get-tsconfig"));
39
+ const ts_jest_1 = require("ts-jest");
40
+ const jest_config_1 = require("jest-config");
41
+ exports.coveragePathIgnorePatterns = [
42
+ '/env/dist/',
43
+ '/node_modules/',
44
+ '/database/seeds/',
45
+ '/database/migrations/',
46
+ '/test/feature/',
47
+ ];
48
+ const globals = () => {
49
+ return {
50
+ __JEST_DISABLE_DB: true,
51
+ };
52
+ };
53
+ exports.globals = globals;
54
+ const tsJestConfigE2E = (tsConfPath = '', withGqlPlugin = true, overrideTsJestConfig) => {
55
+ const tsConfigFile = readTsConfig.getTsconfig(path.resolve(tsConfPath));
56
+ const { tsconfig, ...restTsJest } = overrideTsJestConfig ?? {};
57
+ const conf = {
58
+ diagnostics: false,
59
+ tsconfig: {
60
+ ...(tsConfigFile?.config.compilerOptions ?? {}),
61
+ ...(tsconfig ?? {}),
62
+ },
63
+ ...restTsJest,
64
+ };
65
+ if (withGqlPlugin) {
66
+ conf.astTransformers = {
67
+ before: [path.join(__dirname, 'gql-plugin.js')],
68
+ };
69
+ }
70
+ return conf;
71
+ };
72
+ exports.tsJestConfigE2E = tsJestConfigE2E;
73
+ const tsJestConfig = (tsConfPath = '', overrideTsJestConfig) => {
74
+ const tsConfigFile = readTsConfig.getTsconfig(path.resolve(path.dirname(tsConfPath)), path.basename(tsConfPath));
75
+ if (tsConfigFile?.path && path.resolve(tsConfigFile.path) !== path.resolve(tsConfPath)) {
76
+ throw new Error(`Cannot find ${tsConfPath}`);
77
+ }
78
+ const { tsconfig, ...restTsJest } = overrideTsJestConfig ?? {};
79
+ const config = {
80
+ tsconfig: {
81
+ ...(tsConfigFile?.config.compilerOptions ?? {}),
82
+ ...(tsconfig ?? {}),
83
+ },
84
+ diagnostics: false,
85
+ ...restTsJest,
86
+ };
87
+ return config;
88
+ };
89
+ exports.tsJestConfig = tsJestConfig;
90
+ const coverageThreshold = (projects = [], defaultCoverageThreshold = {
91
+ branches: 100,
92
+ functions: 100,
93
+ lines: 100,
94
+ statements: 100,
95
+ }) => {
96
+ const coverage = {
97
+ global: {
98
+ ...defaultCoverageThreshold,
99
+ },
100
+ };
101
+ projects.map((project) => {
102
+ coverage[project.rootDir] = {
103
+ ...defaultCoverageThreshold,
104
+ };
105
+ if (project?.coverageThreshold) {
106
+ coverage[project.rootDir] = {
107
+ ...coverage[project.rootDir],
108
+ ...project?.coverageThreshold,
109
+ };
110
+ }
111
+ });
112
+ return coverage;
113
+ };
114
+ exports.coverageThreshold = coverageThreshold;
115
+ const defaultConf = (dirname, options = {}, _tsJestConfig = {}) => {
116
+ const tsConfigFile = readTsConfig.getTsconfig(path.join(dirname, 'tsconfig.json'));
117
+ const compilerOptions = tsConfigFile?.config.compilerOptions ?? {};
118
+ const config = {
119
+ rootDir: dirname,
120
+ modulePathIgnorePatterns: [
121
+ '<rootDir>/var/',
122
+ '<rootDir>/env/',
123
+ '<rootDir>/docs/',
124
+ '<rootDir>/dist/',
125
+ '<rootDir>/../dist/',
126
+ '<rootDir>/node_modules/',
127
+ '.*/dist/',
128
+ ],
129
+ preset: 'ts-jest/presets/default-esm',
130
+ testEnvironment: 'node',
131
+ moduleFileExtensions: [...jest_config_1.defaults.moduleFileExtensions, 'ts'],
132
+ testRegex: '.*\\.spec\\.ts$',
133
+ transform: {
134
+ '^.+\\.(t|j)sx?$': [
135
+ '@swc/jest',
136
+ {
137
+ jsc: {
138
+ target: 'es2022',
139
+ parser: {
140
+ syntax: 'typescript',
141
+ decorators: true,
142
+ dynamicImport: true,
143
+ },
144
+ transform: {
145
+ legacyDecorator: true,
146
+ decoratorMetadata: true,
147
+ },
148
+ keepClassNames: true,
149
+ },
150
+ module: {
151
+ type: 'es6',
152
+ },
153
+ },
154
+ ],
155
+ },
156
+ moduleNameMapper: {
157
+ 'source-map-support/register': 'identity-obj-proxy',
158
+ '^(\\.{1,2}/.*)\\.js$': '$1.ts',
159
+ ...(0, ts_jest_1.pathsToModuleNameMapper)(compilerOptions.paths ?? {}, {
160
+ prefix: `${dirname}/`,
161
+ useESM: true,
162
+ }),
163
+ },
164
+ errorOnDeprecated: true,
165
+ extensionsToTreatAsEsm: ['.ts'],
166
+ ...options?.jestConf,
167
+ };
168
+ if (options.transformEsModules) {
169
+ const esModules = [
170
+ ...(Array.isArray(options.transformEsModules)
171
+ ? options.transformEsModules
172
+ : []),
173
+ 'aggregate-error',
174
+ 'clean-stack',
175
+ 'escape-string-regexp',
176
+ 'indent-string',
177
+ 'p-map',
178
+ 'lodash-es',
179
+ ].join('|');
180
+ config.transformIgnorePatterns = [
181
+ `[/\\\\]node_modules[/\\\\](?!${esModules}).+\\.(js|jsx)$`,
182
+ ];
183
+ }
184
+ return config;
185
+ };
186
+ exports.default = defaultConf;
187
+ //# sourceMappingURL=jest-def.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jest-def.config.js","sourceRoot":"","sources":["jest-def.config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;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