@w5s/managed-script 1.0.0-alpha.2

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 (43) hide show
  1. package/README.md +121 -0
  2. package/dist/ManagedScript-DIacNHCc.js +149 -0
  3. package/dist/ManagedScript-DIacNHCc.js.map +1 -0
  4. package/dist/cli.d.ts +1 -0
  5. package/dist/cli.js +2808 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/defaultContext-D_QWP9aF.js +98 -0
  8. package/dist/defaultContext-D_QWP9aF.js.map +1 -0
  9. package/dist/index.d.ts +155 -0
  10. package/dist/index.js +79 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/type-DQiyX1q_.d.ts +53 -0
  13. package/dist/zx.d.ts +48 -0
  14. package/dist/zx.js +76 -0
  15. package/dist/zx.js.map +1 -0
  16. package/package.json +53 -0
  17. package/src/ManagedScript/defaultContext.ts +34 -0
  18. package/src/ManagedScript/execute.ts +98 -0
  19. package/src/ManagedScript/resolveScripts.ts +25 -0
  20. package/src/ManagedScript/runScript.ts +9 -0
  21. package/src/ManagedScript.ts +8 -0
  22. package/src/ManagedScriptEnv.ts +37 -0
  23. package/src/cli/RootCommand.ts +88 -0
  24. package/src/cli/runCLI.ts +27 -0
  25. package/src/cli.ts +4 -0
  26. package/src/defineConfig.ts +16 -0
  27. package/src/index.ts +6 -0
  28. package/src/internal/ConfigLoader.ts +33 -0
  29. package/src/internal/Executor.ts +27 -0
  30. package/src/internal/Logger.ts +58 -0
  31. package/src/internal/ScriptNameResolver.ts +17 -0
  32. package/src/mergeConfig.ts +70 -0
  33. package/src/meta.ts +12 -0
  34. package/src/type/Command.ts +37 -0
  35. package/src/type/CommandContext.ts +48 -0
  36. package/src/type/ResolvedConfig.ts +18 -0
  37. package/src/type/UserConfig.ts +5 -0
  38. package/src/type.ts +4 -0
  39. package/src/zx/ZXOptions.ts +1 -0
  40. package/src/zx/ZXShell.ts +1 -0
  41. package/src/zx/defaultZXOptions.ts +37 -0
  42. package/src/zx/zx.ts +51 -0
  43. package/src/zx.ts +19 -0
package/README.md ADDED
@@ -0,0 +1,121 @@
1
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=# W5S Managed Script _(${name})_) -->
2
+ # W5S Managed Script _(@w5s/managed-script)_
3
+ <!-- AUTO-GENERATED-CONTENT:END -->
4
+
5
+ [![NPM Version][package-version-svg]][package-url]
6
+ [![License][license-image]][license-url]
7
+
8
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=> ${description}&unknownTxt= ) -->
9
+ > CLI tool to manage project scripts. Standardize, remove duplication.
10
+ <!-- AUTO-GENERATED-CONTENT:END -->
11
+
12
+ ## Installation
13
+
14
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=```console\nnpm install --save-dev ${name}\n```) -->
15
+ ```console
16
+ npm install --save-dev @w5s/managed-script
17
+ ```
18
+ <!-- AUTO-GENERATED-CONTENT:END -->
19
+
20
+ ## Usage
21
+
22
+ ### Simple example
23
+
24
+ #### 1. Setup a global configuration
25
+
26
+ ```jsonc
27
+ // package.json
28
+ {
29
+ "managed-script": {
30
+ "scripts": {
31
+ "my-script": "echo 'Hello world!'"
32
+ }
33
+ }
34
+ }
35
+ ```
36
+
37
+ #### 2. Forward execution to managed-script
38
+
39
+ When you want to use the managed-script configuration simply execute the cli to forward to the configured command.
40
+ `managed-script`
41
+
42
+ ```jsonc
43
+ // package.json, **/packages.json, etc.
44
+ {
45
+ "scripts": {
46
+ "my-script": "managed-script" // > 'Hello world'
47
+ }
48
+ }
49
+ ```
50
+
51
+ ### Global shared configuration (npm)
52
+
53
+ ```jsonc
54
+ // package.json
55
+ {
56
+ "managed-script": {
57
+ "extends": ["@acme/managed-script-config"], // Extend one or more configuration installed as node package
58
+ "scripts": {
59
+ "my-script": "echo 'Hello world!'" // Configuration can still be overridden
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ ## Miscellaneous
66
+
67
+ ### Working directory and config origins
68
+
69
+ Use `--cwd` to choose the directory used to resolve configuration and run the selected script. The equivalent environment variable is `MANAGED_SCRIPT_CWD`; the CLI option takes precedence over the environment variable, which takes precedence over the current process directory.
70
+
71
+ ### Dry run
72
+
73
+ Use `--dry-run,-n` to print the resolved command instead of executing it. This is a CLI-only flag; it is not part of the configuration.
74
+
75
+ ### Logging
76
+
77
+ Use `--loglevel <level>` to control status messages, with `silent`, `error`, `warn`, `info` (default) and `debug` levels. `--silent,-s` and `--verbose,-v` are shortcuts for `--loglevel silent` and `--loglevel debug`; `--silent` takes precedence if both are passed. Status messages are written to stderr, keeping stdout free for `--dry-run` output.
78
+
79
+ The equivalent environment variable is `MANAGED_SCRIPT_LOGLEVEL`; the CLI option takes precedence over the environment variable. This is a CLI-only flag; it is not part of the configuration.
80
+
81
+ Scripts receive these environment variables:
82
+
83
+ - `MANAGED_SCRIPT_NAME`: the resolved script name.
84
+ - `MANAGED_SCRIPT_CWD`: the invocation directory used to resolve configuration and spawn the script.
85
+ - `MANAGED_SCRIPT_CONFIG_FILE`: the root configuration file, when one was found.
86
+ - `MANAGED_SCRIPT_CONFIG_DIR`: the directory of the configuration layer that declared the selected script.
87
+ - `MANAGED_SCRIPT_LOGLEVEL`: the resolved log level, so the invoked script can match its own verbosity.
88
+
89
+ The spawn directory always remains `MANAGED_SCRIPT_CWD`. This lets a shared configuration package ship scripts and locate files beside its config without changing the project's execution context.
90
+
91
+ ### Writing scripts with zx
92
+
93
+ Scripts launched by managed-script can import a `$` preset that applies those environment variables as zx defaults (`cwd`, `env`, `verbose` / `quiet`, inherited stdio, and command logging):
94
+
95
+ ```ts
96
+ import { $ } from '@w5s/managed-script/zx';
97
+
98
+ await $`pnpm test`;
99
+ ```
100
+
101
+ Use `create$()` when you need an explicit context (tests, nested runners) instead of the process environment.
102
+
103
+
104
+
105
+ ## License
106
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[${license}][license-url] © ${author}) -->
107
+ [MIT][license-url] © Julien Polo <julien.polo@gmail.com>
108
+ <!-- AUTO-GENERATED-CONTENT:END -->
109
+
110
+ <!-- VARIABLES -->
111
+
112
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square) -->
113
+ [package-version-svg]: https://img.shields.io/npm/v/@w5s/managed-script.svg?style=flat-square
114
+ <!-- AUTO-GENERATED-CONTENT:END -->
115
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}) -->
116
+ [package-url]: https://www.npmjs.com/package/@w5s/managed-script
117
+ <!-- AUTO-GENERATED-CONTENT:END -->
118
+ <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square) -->
119
+ [license-image]: https://img.shields.io/badge/license-MIT-green.svg?style=flat-square
120
+ <!-- AUTO-GENERATED-CONTENT:END -->
121
+ [license-url]: ../../LICENSE
@@ -0,0 +1,149 @@
1
+ import { n as ManagedScriptEnv, r as Logger, t as defaultContext } from "./defaultContext-D_QWP9aF.js";
2
+ import { loadConfig } from "c12";
3
+ import { spawn } from "node:child_process";
4
+ import path from "node:path/win32";
5
+ //#region src/meta.ts
6
+ const meta = Object.freeze({
7
+ binaryLabel: "W5S Managed Script",
8
+ binaryName: "managed-script",
9
+ binaryVersion: "1.0.0-alpha.2",
10
+ buildNumber: 1,
11
+ name: "@w5s/managed-script",
12
+ version: "1.0.0-alpha.2"
13
+ });
14
+ //#endregion
15
+ //#region src/internal/ConfigLoader.ts
16
+ const ConfigLoader = { async load(options) {
17
+ const result = await loadConfig({
18
+ cwd: options.cwd,
19
+ name: meta.binaryName,
20
+ packageJson: [meta.binaryName]
21
+ });
22
+ return {
23
+ config: result.config,
24
+ configFile: result.configFile ?? void 0,
25
+ layers: result.layers ?? []
26
+ };
27
+ } };
28
+ //#endregion
29
+ //#region src/internal/Executor.ts
30
+ /**
31
+ * Executes a command via the system shell, inheriting stdio and forwarding its exit code.
32
+ */
33
+ const Executor = { async run(command, options = {}) {
34
+ return new Promise((resolve, reject) => {
35
+ const child = spawn(command, {
36
+ cwd: options.cwd,
37
+ env: options.env == null ? process.env : {
38
+ ...process.env,
39
+ ...options.env
40
+ },
41
+ shell: true,
42
+ stdio: "inherit"
43
+ });
44
+ child.on("error", reject);
45
+ child.on("close", (code, signal) => {
46
+ resolve(code ?? (signal == null ? 1 : 128));
47
+ });
48
+ });
49
+ } };
50
+ //#endregion
51
+ //#region src/internal/ScriptNameResolver.ts
52
+ /**
53
+ * Resolves the script name to run.
54
+ *
55
+ * Priority: first positional CLI argument > `MANAGED_SCRIPT_NAME` env var > `npm_lifecycle_event` env var.
56
+ */
57
+ const ScriptNameResolver = { resolve({ env, scriptName }) {
58
+ return scriptName ?? env[ManagedScriptEnv.Name] ?? env["npm_lifecycle_event"];
59
+ } };
60
+ //#endregion
61
+ //#region src/ManagedScript/resolveScripts.ts
62
+ function resolveScripts(loaded) {
63
+ const scripts = {};
64
+ const layers = loaded.layers.length > 0 ? loaded.layers : [{ config: loaded.config }];
65
+ for (const layer of layers) for (const [name, command] of Object.entries(layer.config?.scripts ?? {})) {
66
+ const configFile = layer.configFile ?? loaded.configFile;
67
+ const configDir = configFile == null ? void 0 : path.dirname(configFile);
68
+ scripts[name] ??= {
69
+ command,
70
+ configDir,
71
+ configFile
72
+ };
73
+ }
74
+ return { scripts };
75
+ }
76
+ //#endregion
77
+ //#region src/ManagedScript/execute.ts
78
+ const handlers = { RunScript: async (command) => {
79
+ const { context: { color, cwd, dryRun, env, logLevel, stderr, stdout }, parameters: { scriptArgs = [], scriptName } } = command;
80
+ const logger = Logger.create({
81
+ color,
82
+ level: logLevel,
83
+ stderr,
84
+ stdout
85
+ });
86
+ const loaded = await ConfigLoader.load({ cwd });
87
+ logger.debug(`Resolved configuration from ${loaded.configFile ?? "defaults (no config file found)"}.`);
88
+ const { scripts } = resolveScripts(loaded);
89
+ const name = ScriptNameResolver.resolve({
90
+ env,
91
+ scriptName
92
+ });
93
+ if (name == null) throw new Error("Unable to resolve the script name. Pass it as the first argument, set the MANAGED_SCRIPT_NAME environment variable, or run through an npm/pnpm script (npm_lifecycle_event).");
94
+ const script = scripts[name];
95
+ if (script == null) {
96
+ const available = Object.keys(scripts);
97
+ throw new Error(`No script named "${name}" found in the configuration.${available.length > 0 ? ` Available scripts: ${available.join(", ")}.` : " No scripts are configured."}`);
98
+ }
99
+ const commandLine = [script.command, ...scriptArgs.map((argument) => `'${argument.replaceAll("'", String.raw`'\''`)}'`)].join(" ");
100
+ if (dryRun) {
101
+ stdout.write(`${commandLine}\n`);
102
+ return 0;
103
+ }
104
+ logger.info(`Running script "${name}": ${commandLine}`);
105
+ const scriptEnv = {
106
+ [ManagedScriptEnv.Color]: color,
107
+ [ManagedScriptEnv.ConfigDir]: script.configDir,
108
+ [ManagedScriptEnv.ConfigFile]: script.configFile,
109
+ [ManagedScriptEnv.Cwd]: cwd,
110
+ [ManagedScriptEnv.LogLevel]: logLevel,
111
+ [ManagedScriptEnv.Name]: name
112
+ };
113
+ const exitCode = await Executor.run(commandLine, {
114
+ cwd,
115
+ env: scriptEnv
116
+ });
117
+ if (exitCode !== 0) throw new Error(`Script "${name}" exited with code ${exitCode}.`);
118
+ return exitCode;
119
+ } };
120
+ /**
121
+ * Dispatch the command to the appropriate handler based on its type.
122
+ *
123
+ * @param command
124
+ */
125
+ async function execute(command) {
126
+ const context = defaultContext(command.context);
127
+ return handlers[command._]({
128
+ ...command,
129
+ context
130
+ });
131
+ }
132
+ //#endregion
133
+ //#region src/ManagedScript/runScript.ts
134
+ async function runScript(options) {
135
+ return execute({
136
+ _: "RunScript",
137
+ ...options
138
+ });
139
+ }
140
+ //#endregion
141
+ //#region src/ManagedScript.ts
142
+ /**
143
+ * @namespace
144
+ */
145
+ const ManagedScript = Object.freeze({ runScript });
146
+ //#endregion
147
+ export { meta as n, ManagedScript as t };
148
+
149
+ //# sourceMappingURL=ManagedScript-DIacNHCc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManagedScript-DIacNHCc.js","names":[],"sources":["../src/meta.ts","../src/internal/ConfigLoader.ts","../src/internal/Executor.ts","../src/internal/ScriptNameResolver.ts","../src/ManagedScript/resolveScripts.ts","../src/ManagedScript/execute.ts","../src/ManagedScript/runScript.ts","../src/ManagedScript.ts"],"sourcesContent":["export const meta = Object.freeze({\n binaryLabel: 'W5S Managed Script',\n binaryName: 'managed-script',\n // @ts-ignore - these variables are injected at build time\n binaryVersion: (typeof __PACKAGE_VERSION__ === 'undefined' ? '' : __PACKAGE_VERSION__) as string,\n // @ts-ignore - these variables are injected at build time\n buildNumber: 1, // (typeof __PACKAGE_BUILD_NUMBER__ === 'undefined' ? 0 : __PACKAGE_BUILD_NUMBER__) as number,\n // @ts-ignore - these variables are injected at build time\n name: (typeof __PACKAGE_NAME__ === 'undefined' ? '' : __PACKAGE_NAME__) as string,\n // @ts-ignore - these variables are injected at build time\n version: (typeof __PACKAGE_VERSION__ === 'undefined' ? '' : __PACKAGE_VERSION__) as string,\n});\n","import type { ConfigLayer } from 'c12';\n\nimport { loadConfig } from 'c12';\n\nimport type { UserConfig } from '../type/UserConfig.js';\n\nimport { meta } from '../meta.js';\n\nexport interface ConfigLoaderOptions {\n readonly cwd: string;\n}\n\nexport interface ConfigLoaderResult {\n readonly config: UserConfig;\n readonly configFile: string | undefined;\n readonly layers: Array<ConfigLayer<UserConfig>>;\n}\n\nexport const ConfigLoader = {\n async load(options: ConfigLoaderOptions): Promise<ConfigLoaderResult> {\n const result = await loadConfig<UserConfig>({\n cwd: options.cwd,\n name: meta.binaryName,\n packageJson: [meta.binaryName],\n });\n\n return {\n config: result.config,\n configFile: result.configFile ?? undefined,\n layers: result.layers ?? [],\n };\n },\n};\n","import { spawn } from 'node:child_process';\n\nexport interface ExecutorRunOptions {\n readonly cwd?: string | undefined;\n readonly env?: NodeJS.ProcessEnv | undefined;\n}\n\n/**\n * Executes a command via the system shell, inheriting stdio and forwarding its exit code.\n */\nexport const Executor = {\n async run(command: string, options: ExecutorRunOptions = {}): Promise<number> {\n return new Promise((resolve, reject) => {\n const child = spawn(command, {\n cwd: options.cwd,\n env: options.env == null ? process.env : { ...process.env, ...options.env },\n shell: true,\n stdio: 'inherit',\n });\n\n child.on('error', reject);\n child.on('close', (code, signal) => {\n resolve(code ?? (signal == null ? 1 : 128));\n });\n });\n },\n};\n","import { ManagedScriptEnv } from '../ManagedScriptEnv.js';\n\nexport interface ScriptNameResolverOptions {\n readonly env: NodeJS.ProcessEnv;\n readonly scriptName: string | undefined;\n}\n\n/**\n * Resolves the script name to run.\n *\n * Priority: first positional CLI argument > `MANAGED_SCRIPT_NAME` env var > `npm_lifecycle_event` env var.\n */\nexport const ScriptNameResolver = {\n resolve({ env, scriptName }: ScriptNameResolverOptions): string | undefined {\n return scriptName ?? env[ManagedScriptEnv.Name] ?? env['npm_lifecycle_event'];\n },\n};\n","import path from 'node:path/win32';\n\nimport type { ConfigLoaderResult } from '../internal/ConfigLoader.js';\nimport type { ResolvedConfig } from '../type/ResolvedConfig.js';\n\nexport function resolveScripts(loaded: ConfigLoaderResult): ResolvedConfig {\n const scripts: ResolvedConfig['scripts'] = {};\n const layers = loaded.layers.length > 0 ? loaded.layers : [{ config: loaded.config }];\n\n for (const layer of layers) {\n for (const [name, command] of Object.entries(layer.config?.scripts ?? {})) {\n const configFile = layer.configFile ?? loaded.configFile;\n const configDir = configFile == null ? undefined : path.dirname(configFile);\n scripts[name] ??= {\n command,\n configDir,\n configFile,\n };\n }\n }\n\n return {\n scripts,\n };\n}\n","import type { ManagedScriptCommand } from '../type.js';\n\nimport { ConfigLoader } from '../internal/ConfigLoader.js';\nimport { Executor } from '../internal/Executor.js';\nimport { Logger } from '../internal/Logger.js';\nimport { ScriptNameResolver } from '../internal/ScriptNameResolver.js';\nimport { ManagedScriptEnv } from '../ManagedScriptEnv.js';\nimport { defaultContext } from './defaultContext.js';\nimport { resolveScripts } from './resolveScripts.js';\n\nconst handlers = {\n RunScript: async (command: ManagedScriptCommand.RunScript): Promise<number> => {\n const {\n context: { color, cwd, dryRun, env, logLevel, stderr, stdout },\n parameters: { scriptArgs = [], scriptName },\n } = command;\n const logger = Logger.create({ color, level: logLevel, stderr, stdout });\n const loaded = await ConfigLoader.load({ cwd });\n logger.debug(`Resolved configuration from ${loaded.configFile ?? 'defaults (no config file found)'}.`);\n const resolved = resolveScripts(loaded);\n const { scripts } = resolved;\n\n const name = ScriptNameResolver.resolve({ env, scriptName: scriptName });\n if (name == null) {\n throw new Error(\n 'Unable to resolve the script name. Pass it as the first argument, set the MANAGED_SCRIPT_NAME environment variable, or run through an npm/pnpm script (npm_lifecycle_event).',\n );\n }\n\n const script = scripts[name];\n if (script == null) {\n const available = Object.keys(scripts);\n throw new Error(\n `No script named \"${name}\" found in the configuration.${\n available.length > 0 ? ` Available scripts: ${available.join(', ')}.` : ' No scripts are configured.'\n }`,\n );\n }\n\n const commandLine = [\n script.command,\n ...scriptArgs.map((argument) => `'${argument.replaceAll(\"'\", String.raw`'\\''`)}'`),\n ].join(' ');\n\n if (dryRun) {\n stdout.write(`${commandLine}\\n`);\n return 0;\n }\n\n logger.info(`Running script \"${name}\": ${commandLine}`);\n\n // Prepare the environment variables for the script execution.\n const scriptEnv = {\n [ManagedScriptEnv.Color]: color,\n [ManagedScriptEnv.ConfigDir]: script.configDir,\n [ManagedScriptEnv.ConfigFile]: script.configFile,\n [ManagedScriptEnv.Cwd]: cwd,\n [ManagedScriptEnv.LogLevel]: logLevel,\n [ManagedScriptEnv.Name]: name,\n };\n\n const exitCode = await Executor.run(commandLine, { cwd, env: scriptEnv });\n\n if (exitCode !== 0) {\n throw new Error(`Script \"${name}\" exited with code ${exitCode}.`);\n }\n\n return exitCode;\n },\n} satisfies {\n [K in ManagedScriptCommand['_']]: (command: Extract<ManagedScriptCommand, { _: K }>) => Promise<any>;\n};\n\nexport type ExecuteCommand<T extends ManagedScriptCommand> = Omit<T, 'context'> & {\n /**\n * Context is optional\n */\n context?: Partial<ManagedScriptCommand['context']>;\n};\n\n/**\n * Extract command parameter from execute handler\n */\nexport type ExecuteCommandParameters<T extends ManagedScriptCommand> = Omit<Parameters<typeof execute<T>>[0], '_'>;\n\n/**\n * Dispatch the command to the appropriate handler based on its type.\n *\n * @param command\n */\nexport async function execute<T extends ManagedScriptCommand>(command: ExecuteCommand<T>): Promise<Awaited<ReturnType<typeof handlers[T['_']]>>> {\n const context = defaultContext(command.context);\n // @ts-ignore we know this works\n return handlers[command._]({\n ...command,\n context,\n });\n}\n","import { ManagedScriptCommand } from '../type.js';\nimport { execute, type ExecuteCommandParameters } from './execute.js';\n\nexport async function runScript(options: ExecuteCommandParameters<ManagedScriptCommand.RunScript>) {\n return execute({\n _: 'RunScript',\n ...options,\n });\n}\n","import { runScript } from './ManagedScript/runScript.js';\n\n/**\n * @namespace\n */\nexport const ManagedScript = Object.freeze({\n runScript,\n});\n"],"mappings":";;;;;AAAA,MAAa,OAAO,OAAO,OAAO;CAChC,aAAa;CACb,YAAY;CAEZ,eAAA;CAEA,aAAa;CAEb,MAAA;CAEA,SAAA;AACF,CAAC;;;ACOD,MAAa,eAAe,EAC1B,MAAM,KAAK,SAA2D;CACpE,MAAM,SAAS,MAAM,WAAuB;EAC1C,KAAK,QAAQ;EACb,MAAM,KAAK;EACX,aAAa,CAAC,KAAK,UAAU;CAC/B,CAAC;CAED,OAAO;EACL,QAAQ,OAAO;EACf,YAAY,OAAO,cAAc,KAAA;EACjC,QAAQ,OAAO,UAAU,CAAC;CAC5B;AACF,EACF;;;;;;ACtBA,MAAa,WAAW,EACtB,MAAM,IAAI,SAAiB,UAA8B,CAAC,GAAoB;CAC5E,OAAO,IAAI,SAAS,SAAS,WAAW;EACtC,MAAM,QAAQ,MAAM,SAAS;GAC3B,KAAK,QAAQ;GACb,KAAK,QAAQ,OAAO,OAAO,QAAQ,MAAM;IAAE,GAAG,QAAQ;IAAK,GAAG,QAAQ;GAAI;GA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