create-mn-app 0.3.28 โ†’ 0.4.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.
@@ -0,0 +1,320 @@
1
+ // This module is structured to be extracted into a standalone package
2
+ // (@midnight-ntwrk/dapp-network or similar) without code changes. Do not
3
+ // introduce template substitutions, sibling-template imports, or globals
4
+ // here. All side-effecting inputs flow through function parameters.
5
+
6
+ import * as fs from 'node:fs';
7
+ import * as path from 'node:path';
8
+ import * as crypto from 'node:crypto';
9
+
10
+ export type NetworkId = 'undeployed' | 'preview' | 'preprod';
11
+
12
+ export const NETWORK_IDS: readonly NetworkId[] = ['undeployed', 'preview', 'preprod'] as const;
13
+
14
+ export interface NetworkConfig {
15
+ networkId: NetworkId;
16
+ indexer: string;
17
+ indexerWS: string;
18
+ node: string;
19
+ proofServer: string;
20
+ faucet: string | null;
21
+ composeServices: string[];
22
+ }
23
+
24
+ export interface DeploymentRecord {
25
+ address: string;
26
+ deployedAt: string;
27
+ deployer: string;
28
+ }
29
+
30
+ export interface NetworkState {
31
+ version: 1;
32
+ activeNetwork: NetworkId;
33
+ wallets: Partial<Record<NetworkId, { seed: string; createdAt: string }>>;
34
+ deployments: Partial<Record<NetworkId, DeploymentRecord>>;
35
+ }
36
+
37
+ export const STATE_FILE_NAME = '.midnight-state.json';
38
+ export const STATE_VERSION = 1 as const;
39
+
40
+ export const NETWORK_CONFIGS: Record<NetworkId, NetworkConfig> = {
41
+ undeployed: {
42
+ networkId: 'undeployed',
43
+ indexer: 'http://127.0.0.1:8088/api/v4/graphql',
44
+ indexerWS: 'ws://127.0.0.1:8088/api/v4/graphql/ws',
45
+ node: 'ws://127.0.0.1:9944',
46
+ proofServer: 'http://127.0.0.1:6300',
47
+ faucet: null,
48
+ composeServices: ['node', 'indexer', 'proof-server'],
49
+ },
50
+ preview: {
51
+ networkId: 'preview',
52
+ indexer: 'https://indexer.preview.midnight.network/api/v4/graphql',
53
+ indexerWS: 'wss://indexer.preview.midnight.network/api/v4/graphql/ws',
54
+ node: 'https://rpc.preview.midnight.network',
55
+ proofServer: 'http://127.0.0.1:6300',
56
+ faucet: 'https://faucet.preview.midnight.network',
57
+ composeServices: ['proof-server'],
58
+ },
59
+ preprod: {
60
+ networkId: 'preprod',
61
+ indexer: 'https://indexer.preprod.midnight.network/api/v4/graphql',
62
+ indexerWS: 'wss://indexer.preprod.midnight.network/api/v4/graphql/ws',
63
+ node: 'https://rpc.preprod.midnight.network',
64
+ proofServer: 'http://127.0.0.1:6300',
65
+ faucet: 'https://faucet.preprod.midnight.network',
66
+ composeServices: ['proof-server'],
67
+ },
68
+ };
69
+
70
+ export function isNetworkId(v: unknown): v is NetworkId {
71
+ return typeof v === 'string' && (NETWORK_IDS as readonly string[]).includes(v);
72
+ }
73
+
74
+ export interface FsOptions {
75
+ cwd?: string;
76
+ }
77
+
78
+ function statePath(opts: FsOptions = {}): string {
79
+ return path.join(opts.cwd ?? process.cwd(), STATE_FILE_NAME);
80
+ }
81
+
82
+ export function loadState(opts: FsOptions = {}): NetworkState | null {
83
+ const p = statePath(opts);
84
+ if (!fs.existsSync(p)) return null;
85
+ const raw = fs.readFileSync(p, 'utf-8');
86
+ let parsed: unknown;
87
+ try {
88
+ parsed = JSON.parse(raw);
89
+ } catch (e) {
90
+ throw new Error(`Failed to parse ${p}: ${(e as Error).message}. Run \`npm run clean\` to reset.`);
91
+ }
92
+ if (
93
+ !parsed ||
94
+ typeof parsed !== 'object' ||
95
+ (parsed as { version?: unknown }).version !== STATE_VERSION
96
+ ) {
97
+ throw new Error(
98
+ `Unsupported state-file version in ${p} (expected ${STATE_VERSION}). Run \`npm run clean\` to reset.`,
99
+ );
100
+ }
101
+ if (!isNetworkId((parsed as { activeNetwork?: unknown }).activeNetwork)) {
102
+ throw new Error(
103
+ `Invalid activeNetwork in ${p}. Run \`npm run clean\` to reset.`,
104
+ );
105
+ }
106
+ return parsed as NetworkState;
107
+ }
108
+
109
+ export function saveState(state: NetworkState, opts: FsOptions = {}): void {
110
+ const p = statePath(opts);
111
+ // Write to a sibling tmp file then rename โ†’ atomic on POSIX.
112
+ const tmp = `${p}.tmp-${process.pid}-${Date.now()}`;
113
+ fs.writeFileSync(tmp, `${JSON.stringify(state, null, 2)}\n`);
114
+ fs.renameSync(tmp, p);
115
+ }
116
+
117
+ export function parseNetworkFlag(argv: string[]): NetworkId | null {
118
+ for (let i = 2; i < argv.length; i++) {
119
+ const arg = argv[i];
120
+ if (arg === '--network') {
121
+ const v = argv[i + 1];
122
+ if (v === undefined) throw new Error('--network requires a value');
123
+ if (!isNetworkId(v)) {
124
+ throw new Error(`Unknown network: ${v}. Supported: ${NETWORK_IDS.join(', ')}.`);
125
+ }
126
+ return v;
127
+ }
128
+ if (arg.startsWith('--network=')) {
129
+ const v = arg.slice('--network='.length);
130
+ if (!isNetworkId(v)) {
131
+ throw new Error(`Unknown network: ${v}. Supported: ${NETWORK_IDS.join(', ')}.`);
132
+ }
133
+ return v;
134
+ }
135
+ }
136
+ return null;
137
+ }
138
+
139
+ export interface ResolveOptions {
140
+ argv?: string[];
141
+ env?: NodeJS.ProcessEnv;
142
+ cwd?: string;
143
+ }
144
+
145
+ export type ResolveSource = 'flag' | 'state' | 'default';
146
+
147
+ export interface ResolveResult {
148
+ network: NetworkId;
149
+ config: NetworkConfig;
150
+ source: ResolveSource;
151
+ }
152
+
153
+ const ENV_OVERRIDES: Array<[keyof NetworkConfig, string]> = [
154
+ ['indexer', 'MIDNIGHT_INDEXER_URL'],
155
+ ['indexerWS', 'MIDNIGHT_INDEXER_WS_URL'],
156
+ ['node', 'MIDNIGHT_NODE_URL'],
157
+ ['faucet', 'MIDNIGHT_FAUCET_URL'],
158
+ ['proofServer', 'MIDNIGHT_PROOF_SERVER_URL'],
159
+ ];
160
+
161
+ function applyEnvOverrides(base: NetworkConfig, env: NodeJS.ProcessEnv): NetworkConfig {
162
+ const out: NetworkConfig = { ...base, composeServices: [...base.composeServices] };
163
+ for (const [field, varName] of ENV_OVERRIDES) {
164
+ const v = env[varName];
165
+ if (v) (out as unknown as Record<string, unknown>)[field] = v;
166
+ }
167
+ return out;
168
+ }
169
+
170
+ export function resolveNetwork(opts: ResolveOptions = {}): ResolveResult {
171
+ const argv = opts.argv ?? process.argv;
172
+ const env = opts.env ?? process.env;
173
+ const cwd = opts.cwd ?? process.cwd();
174
+
175
+ const flag = parseNetworkFlag(argv);
176
+ let network: NetworkId;
177
+ let source: ResolveSource;
178
+
179
+ if (flag) {
180
+ network = flag;
181
+ source = 'flag';
182
+ } else {
183
+ const state = loadState({ cwd });
184
+ if (state) {
185
+ network = state.activeNetwork;
186
+ source = 'state';
187
+ } else {
188
+ network = 'undeployed';
189
+ source = 'default';
190
+ }
191
+ }
192
+
193
+ const config = applyEnvOverrides(NETWORK_CONFIGS[network], env);
194
+ return { network, config, source };
195
+ }
196
+
197
+ export const GENESIS_SEED = '0000000000000000000000000000000000000000000000000000000000000001';
198
+
199
+ export interface SeedOptions {
200
+ env?: NodeJS.ProcessEnv;
201
+ cwd?: string;
202
+ }
203
+
204
+ export function getOrCreateSeed(network: NetworkId, opts: SeedOptions = {}): string {
205
+ const env = opts.env ?? process.env;
206
+ const cwd = opts.cwd ?? process.cwd();
207
+
208
+ if (network === 'undeployed') return GENESIS_SEED;
209
+
210
+ const fromEnv = env.MIDNIGHT_WALLET_SEED;
211
+ if (fromEnv) return fromEnv;
212
+
213
+ const existing = loadState({ cwd });
214
+ const persisted = existing?.wallets?.[network]?.seed;
215
+ if (persisted) return persisted;
216
+
217
+ const seed = crypto.randomBytes(32).toString('hex');
218
+ const next: NetworkState = existing ?? {
219
+ version: STATE_VERSION,
220
+ activeNetwork: network,
221
+ wallets: {},
222
+ deployments: {},
223
+ };
224
+ next.activeNetwork = network;
225
+ next.wallets = {
226
+ ...next.wallets,
227
+ [network]: { seed, createdAt: new Date().toISOString() },
228
+ };
229
+ saveState(next, { cwd });
230
+ return seed;
231
+ }
232
+
233
+ export function getDeployment(network: NetworkId, opts: FsOptions = {}): DeploymentRecord | null {
234
+ const state = loadState(opts);
235
+ return state?.deployments?.[network] ?? null;
236
+ }
237
+
238
+ export function recordDeployment(
239
+ network: NetworkId,
240
+ address: string,
241
+ deployer: string,
242
+ opts: FsOptions = {},
243
+ ): void {
244
+ const cwd = opts.cwd ?? process.cwd();
245
+ const existing = loadState({ cwd });
246
+ const next: NetworkState = existing ?? {
247
+ version: STATE_VERSION,
248
+ activeNetwork: network,
249
+ wallets: {},
250
+ deployments: {},
251
+ };
252
+ next.deployments = {
253
+ ...next.deployments,
254
+ [network]: { address, deployer, deployedAt: new Date().toISOString() },
255
+ };
256
+ saveState(next, { cwd });
257
+ }
258
+
259
+ export function setActiveNetwork(network: NetworkId, opts: FsOptions = {}): void {
260
+ const cwd = opts.cwd ?? process.cwd();
261
+ const existing = loadState({ cwd });
262
+ if (existing && existing.activeNetwork === network) return; // no-op
263
+ const next: NetworkState = existing ?? {
264
+ version: STATE_VERSION,
265
+ activeNetwork: network,
266
+ wallets: {},
267
+ deployments: {},
268
+ };
269
+ next.activeNetwork = network;
270
+ saveState(next, { cwd });
271
+ }
272
+
273
+ // CLI entry point. Activates only when the file is run directly via tsx,
274
+ // not when imported. Keeps the module tree-shakeable for the future
275
+ // extracted package.
276
+ function isMain(): boolean {
277
+ // import.meta.url is a `file://` URL; argv[1] is a filesystem path.
278
+ // Compare resolved paths to handle symlinks/aliases.
279
+ try {
280
+ const here = new URL(import.meta.url).pathname;
281
+ const invoked = process.argv[1] && fs.realpathSync(process.argv[1]);
282
+ return invoked === fs.realpathSync(here);
283
+ } catch {
284
+ return false;
285
+ }
286
+ }
287
+
288
+ function cliMain(argv: string[]): number {
289
+ const args = argv.slice(2);
290
+ if (args.length === 0) {
291
+ const r = resolveNetwork({ argv });
292
+ const dep = getDeployment(r.network);
293
+ process.stdout.write(`Active network: ${r.network}${r.source === 'default' ? ' (default)' : ''}\n`);
294
+ if (dep) process.stdout.write(`Last deploy: ${dep.address}\n`);
295
+ return 0;
296
+ }
297
+ const candidate = args[0];
298
+ if (!isNetworkId(candidate)) {
299
+ process.stderr.write(`Unknown network: ${candidate}. Supported: ${NETWORK_IDS.join(', ')}.\n`);
300
+ return 1;
301
+ }
302
+ setActiveNetwork(candidate);
303
+ process.stdout.write(`Active network is now: ${candidate}\n`);
304
+ if (candidate !== 'undeployed') {
305
+ const seed = loadState()?.wallets?.[candidate]?.seed;
306
+ if (!seed) {
307
+ process.stdout.write(`Wallet not yet generated โ€” run \`npm run setup\` to fund and deploy.\n`);
308
+ }
309
+ }
310
+ return 0;
311
+ }
312
+
313
+ if (isMain()) {
314
+ try {
315
+ process.exit(cliMain(process.argv));
316
+ } catch (e) {
317
+ process.stderr.write(`${(e as Error).message}\n`);
318
+ process.exit(1);
319
+ }
320
+ }
@@ -0,0 +1,37 @@
1
+ // Orchestrator for `npm run setup`. Replaces the prior package.json chain
2
+ // `docker compose up -d --wait && npm run compile && npm run deploy` so
3
+ // we can branch on --network and forward it to deploy.
4
+ import { spawnSync } from 'node:child_process';
5
+ import { resolveNetwork, setActiveNetwork, parseNetworkFlag } from './network';
6
+
7
+ function run(cmd: string, args: string[]): void {
8
+ const r = spawnSync(cmd, args, { stdio: 'inherit', shell: false });
9
+ if (r.status !== 0) {
10
+ process.stderr.write(`\nCommand failed: ${cmd} ${args.join(' ')}\n`);
11
+ process.exit(r.status ?? 1);
12
+ }
13
+ }
14
+
15
+ async function main(): Promise<void> {
16
+ const argv = process.argv;
17
+ const flag = parseNetworkFlag(argv);
18
+ if (flag) setActiveNetwork(flag);
19
+ const { network, config } = resolveNetwork({ argv });
20
+
21
+ process.stdout.write(`\nโ†’ Setting up {{projectName}} on network: ${network}\n\n`);
22
+
23
+ // 1. Bring up only the services this network needs.
24
+ run('docker', ['compose', 'up', '-d', '--wait', ...config.composeServices]);
25
+
26
+ // 2. Compile the contract (network-agnostic).
27
+ run('npm', ['run', 'compile']);
28
+
29
+ // 3. Deploy. Forward --network so deploy.ts sees the same network.
30
+ const deployArgs = network === 'undeployed' ? [] : ['--', '--network', network];
31
+ run('npm', ['run', 'deploy', ...deployArgs]);
32
+ }
33
+
34
+ main().catch((e) => {
35
+ process.stderr.write(`\nSetup failed: ${(e as Error).message}\n`);
36
+ process.exit(1);
37
+ });
@@ -2,7 +2,7 @@
2
2
  "compilerOptions": {
3
3
  "target": "ES2022",
4
4
  "module": "ESNext",
5
- "moduleResolution": "node",
5
+ "moduleResolution": "bundler",
6
6
  "outDir": "./dist",
7
7
  "rootDir": "./src",
8
8
  "strict": true,
@@ -1,4 +0,0 @@
1
- export declare class WalletGenerator {
2
- generate(projectPath: string): Promise<string>;
3
- }
4
- //# sourceMappingURL=wallet-generator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wallet-generator.d.ts","sourceRoot":"","sources":["../../src/installers/wallet-generator.ts"],"names":[],"mappings":"AAmBA,qBAAa,eAAe;IACpB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAwDrD"}
@@ -1,78 +0,0 @@
1
- "use strict";
2
- // This file is part of create-mn-app.
3
- // Copyright (C) 2025 Midnight Foundation
4
- // SPDX-License-Identifier: Apache-2.0
5
- // Licensed under the Apache License, Version 2.0 (the "License");
6
- // You may not use this file except in compliance with the License.
7
- // You may obtain a copy of the License at
8
- //
9
- // https://www.apache.org/licenses/LICENSE-2.0
10
- //
11
- // Unless required by applicable law or agreed to in writing, software
12
- // distributed under the License is distributed on an "AS IS" BASIS,
13
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- // See the License for the specific language governing permissions and
15
- // limitations under the License.
16
- var __importDefault = (this && this.__importDefault) || function (mod) {
17
- return (mod && mod.__esModule) ? mod : { "default": mod };
18
- };
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.WalletGenerator = void 0;
21
- const path_1 = __importDefault(require("path"));
22
- const fs_extra_1 = __importDefault(require("fs-extra"));
23
- const crypto_1 = __importDefault(require("crypto"));
24
- class WalletGenerator {
25
- async generate(projectPath) {
26
- // Generate 32 random bytes and convert to hex string
27
- const bytes = crypto_1.default.randomBytes(32);
28
- const walletSeed = bytes.toString("hex");
29
- // Create .env file
30
- const envPath = path_1.default.join(projectPath, ".env");
31
- const envContent = `# Midnight Network Configuration
32
- # Generated on ${new Date().toISOString()}
33
-
34
- # Network Configuration
35
- MIDNIGHT_NETWORK=preprod
36
- PROOF_SERVER_URL=http://127.0.0.1:6300
37
-
38
- # Wallet Configuration (KEEP PRIVATE!)
39
- WALLET_SEED=${walletSeed}
40
-
41
- # Contract Configuration
42
- CONTRACT_NAME=hello-world
43
-
44
- # Development Settings
45
- DEBUG_LEVEL=info
46
- AUTO_START_PROOF_SERVER=true
47
-
48
- # Security Warning:
49
- # Keep your wallet seed private and secure!
50
- # Never commit this file to version control.
51
- # Add .env to your .gitignore file.
52
- `;
53
- await fs_extra_1.default.writeFile(envPath, envContent);
54
- // Also create .env.example for reference
55
- const envExamplePath = path_1.default.join(projectPath, ".env.example");
56
- const envExampleContent = `# Midnight Network Configuration
57
- # Copy this file to .env and fill in your values
58
-
59
- # Network Configuration
60
- MIDNIGHT_NETWORK=preprod
61
- PROOF_SERVER_URL=http://127.0.0.1:6300
62
-
63
- # Wallet Configuration (KEEP PRIVATE!)
64
- WALLET_SEED=your_64_character_wallet_seed_here
65
-
66
- # Contract Configuration
67
- CONTRACT_NAME=hello-world
68
-
69
- # Development Settings
70
- DEBUG_LEVEL=info
71
- AUTO_START_PROOF_SERVER=true
72
- `;
73
- await fs_extra_1.default.writeFile(envExamplePath, envExampleContent);
74
- return walletSeed;
75
- }
76
- }
77
- exports.WalletGenerator = WalletGenerator;
78
- //# sourceMappingURL=wallet-generator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wallet-generator.js","sourceRoot":"","sources":["../../src/installers/wallet-generator.ts"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,yCAAyC;AACzC,sCAAsC;AACtC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;AAEjC,gDAAwB;AACxB,wDAA0B;AAC1B,oDAA4B;AAE5B,MAAa,eAAe;IAC1B,KAAK,CAAC,QAAQ,CAAC,WAAmB;QAChC,qDAAqD;QACrD,MAAM,KAAK,GAAG,gBAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QACrC,MAAM,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAEzC,mBAAmB;QACnB,MAAM,OAAO,GAAG,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAC/C,MAAM,UAAU,GAAG;iBACN,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;;;;;;;cAO3B,UAAU;;;;;;;;;;;;;CAavB,CAAC;QAEE,MAAM,kBAAE,CAAC,SAAS,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAExC,yCAAyC;QACzC,MAAM,cAAc,GAAG,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QAC9D,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;CAgB7B,CAAC;QAEE,MAAM,kBAAE,CAAC,SAAS,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;QAEtD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF;AAzDD,0CAyDC"}
package/dist/test.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":""}
package/dist/test.js DELETED
@@ -1,65 +0,0 @@
1
- "use strict";
2
- // This file is part of create-mn-app.
3
- // Copyright (C) 2025 Midnight Foundation
4
- // SPDX-License-Identifier: Apache-2.0
5
- // Licensed under the Apache License, Version 2.0 (the "License");
6
- // You may not use this file except in compliance with the License.
7
- // You may obtain a copy of the License at
8
- //
9
- // https://www.apache.org/licenses/LICENSE-2.0
10
- //
11
- // Unless required by applicable law or agreed to in writing, software
12
- // distributed under the License is distributed on an "AS IS" BASIS,
13
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- // See the License for the specific language governing permissions and
15
- // limitations under the License.
16
- var __importDefault = (this && this.__importDefault) || function (mod) {
17
- return (mod && mod.__esModule) ? mod : { "default": mod };
18
- };
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- const fs_extra_1 = __importDefault(require("fs-extra"));
21
- const path_1 = __importDefault(require("path"));
22
- const create_app_1 = require("./create-app");
23
- async function testCreateApp() {
24
- console.log("๐Ÿงช Testing create-mn-app...\n");
25
- const testDir = path_1.default.join(process.cwd(), "test-app");
26
- // Clean up any existing test
27
- if (fs_extra_1.default.existsSync(testDir)) {
28
- await fs_extra_1.default.remove(testDir);
29
- }
30
- try {
31
- await (0, create_app_1.createApp)("test-app", {
32
- template: "hello-world",
33
- useNpm: true,
34
- skipInstall: false,
35
- skipGit: true,
36
- verbose: true,
37
- });
38
- console.log("\nโœ… Test completed successfully!");
39
- // Verify structure
40
- const requiredFiles = [
41
- "package.json",
42
- "tsconfig.json",
43
- ".gitignore",
44
- "README.md",
45
- "docker-compose.yml",
46
- "contracts/hello-world.compact",
47
- "src/deploy.ts",
48
- "src/cli.ts",
49
- "src/check-balance.ts",
50
- ];
51
- for (const file of requiredFiles) {
52
- const filePath = path_1.default.join(testDir, file);
53
- if (!fs_extra_1.default.existsSync(filePath)) {
54
- throw new Error(`Missing file: ${file}`);
55
- }
56
- }
57
- console.log("โœ… All required files present");
58
- }
59
- catch (error) {
60
- console.error("โŒ Test failed:", error);
61
- process.exit(1);
62
- }
63
- }
64
- testCreateApp();
65
- //# sourceMappingURL=test.js.map
package/dist/test.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"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