dcs-git-utils 1.0.0 → 1.0.9

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.
@@ -1,34 +1,34 @@
1
- name: Pull Request Checks
2
-
3
- on:
4
- pull_request:
5
- branches: [ "main" ] # Or "master", depending on your default branch
6
- # This triggers on new PRs, commits to existing PRs, and re-opened PRs
7
-
8
- permissions:
9
- contents: read
10
-
11
- jobs:
12
- test:
13
- name: Run CI Tests
14
- runs-on: ubuntu-latest
15
-
16
- steps:
17
- # 1. Checkout the repository code
18
- - name: Checkout Code
19
- uses: actions/checkout@v4
20
-
21
- # 2. Setup Node.js environment
22
- - name: Setup Node.js
23
- uses: actions/setup-node@v4
24
- with:
25
- node-version: '18' # Matches your pkg target
26
- cache: 'npm' # Caches node_modules for faster runs
27
-
28
- # 3. Install dependencies strictly from package-lock.json
29
- - name: Install Dependencies
30
- run: npm ci
31
-
32
- # 4. Run the specific test command
33
- - name: Run Tests
1
+ name: Pull Request Checks
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [ "main" ] # Or "master", depending on your default branch
6
+ # This triggers on new PRs, commits to existing PRs, and re-opened PRs
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ test:
13
+ name: Run CI Tests
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ # 1. Checkout the repository code
18
+ - name: Checkout Code
19
+ uses: actions/checkout@v4
20
+
21
+ # 2. Setup Node.js environment
22
+ - name: Setup Node.js
23
+ uses: actions/setup-node@v4
24
+ with:
25
+ node-version: '18' # Matches your pkg target
26
+ cache: 'npm' # Caches node_modules for faster runs
27
+
28
+ # 3. Install dependencies strictly from package-lock.json
29
+ - name: Install Dependencies
30
+ run: npm ci
31
+
32
+ # 4. Run the specific test command
33
+ - name: Run Tests
34
34
  run: npm run test:ci
@@ -1,65 +1,72 @@
1
- name: Build and Release
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'v*' # Triggers only on version tags like v1.0.0, v2.1.5
7
-
8
- permissions:
9
- contents: write # Required to create releases and upload assets
10
-
11
- jobs:
12
- build-and-release:
13
- runs-on: ubuntu-latest
14
-
15
- steps:
16
- # 1. Checkout the code
17
- - name: Checkout code
18
- uses: actions/checkout@v4
19
-
20
- # 2. Setup Node.js
21
- - name: Setup Node.js
22
- uses: actions/setup-node@v4
23
- with:
24
- node-version: '18'
25
- cache: 'npm'
26
-
27
- # 3. Install Dependencies
28
- - name: Install Dependencies
29
- run: npm ci
30
-
31
- - name: Set Package Version from Git Tag
32
- # The github.ref is the full tag path (refs/tags/v1.0.1).
33
- # We use a shell command to trim "refs/tags/v" to get "1.0.1".
34
- run: |
35
- VERSION="${{ github.ref_name }}"
36
- # The 'npm version' command updates package.json and package-lock.json
37
- npm version "$VERSION" --no-git-tag-version --allow-same-version
38
-
39
- - name: Verify Updated Version
40
- run: cat package.json | grep version
41
-
42
- # 4. Build (TypeScript -> JS + Copy Lua Assets)
43
- - name: Build Project
44
- run: npm run build
45
-
46
- # 5. Package (Generate Binaries)
47
- # This runs 'pkg .' and creates the 3 executables (win, linux, macos)
48
- - name: Create Executables
49
- run: npm run package
50
-
51
- # 6. Create GitHub Release
52
- - name: Create Release
53
- id: create_release
54
- uses: softprops/action-gh-release@v1
55
- with:
56
- tag_name: ${{ github.ref_name }}
57
- name: Release ${{ github.ref_name }}
58
- draft: false
59
- prerelease: false
60
- generate_release_notes: true
61
- files: |
62
- bin/DCS-Git-Utils-win.exe
63
- bin/DCS-Git-Utils-linux
64
- env:
1
+ name: Build and Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*' # Triggers only on version tags like v1.0.0, v2.1.5
7
+ permissions:
8
+ contents: write
9
+ id-token: write
10
+
11
+ jobs:
12
+ build-and-release:
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ # 1. Checkout the code
17
+ - name: Checkout code
18
+ uses: actions/checkout@v4
19
+
20
+
21
+ # 2. Setup Node.js
22
+ - name: Setup Node.js
23
+ uses: actions/setup-node@v6
24
+ with:
25
+ node-version: '18'
26
+
27
+ - name: Update npm
28
+ run: sudo npm install -g npm@latest
29
+
30
+ # 3. Install Dependencies
31
+ - name: Install Dependencies
32
+ run: npm ci
33
+
34
+ - name: Set Package Version from Git Tag
35
+ # The github.ref is the full tag path (refs/tags/v1.0.1).
36
+ # We use a shell command to trim "refs/tags/v" to get "1.0.1".
37
+ run: |
38
+ VERSION="${{ github.ref_name }}"
39
+ # The 'npm version' command updates package.json and package-lock.json
40
+ npm version "$VERSION" --no-git-tag-version --allow-same-version
41
+
42
+ - name: Verify Updated Version
43
+ run: cat package.json | grep version
44
+
45
+ # 4. Build (TypeScript -> JS + Copy Lua Assets)
46
+ - name: Build Project
47
+ run: npm run build
48
+
49
+ - run: npm config set //registry.npmjs.org/:_authToken "${{ secrets.NPM_TOKEN }}"
50
+
51
+ - run: npm publish
52
+
53
+ # 5. Package (Generate Binaries)
54
+ # This runs 'pkg .' and creates the 3 executables (win, linux, macos)
55
+ - name: Create Executables
56
+ run: npm run package
57
+
58
+ # 6. Create GitHub Release
59
+ - name: Create Release
60
+ id: create_release
61
+ uses: softprops/action-gh-release@v1
62
+ with:
63
+ tag_name: ${{ github.ref_name }}
64
+ name: Release ${{ github.ref_name }}
65
+ draft: false
66
+ prerelease: false
67
+ generate_release_notes: true
68
+ files: |
69
+ bin/dcs-git-utils-win.exe
70
+ bin/dcs-git-utils-linux
71
+ env:
65
72
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,23 +1,23 @@
1
- {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
- "configurations": [
7
- {
8
- "name": "DEbug",
9
- "type": "node",
10
- "request": "launch",
11
- "preLaunchTask": "npm: prestart",
12
- "autoAttachChildProcesses": true,
13
- "skipFiles": [
14
- "<node_internals>/**",
15
- "**/node_modules/**"
16
- ],
17
- "program": "${workspaceRoot}/dist/main.js",
18
- "cwd": "${workspaceRoot}",
19
- "smartStep": true,
20
- "console": "integratedTerminal"
21
- }
22
- ]
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "name": "DEbug",
9
+ "type": "node",
10
+ "request": "launch",
11
+ "preLaunchTask": "npm: prestart",
12
+ "autoAttachChildProcesses": true,
13
+ "skipFiles": [
14
+ "<node_internals>/**",
15
+ "**/node_modules/**"
16
+ ],
17
+ "program": "${workspaceRoot}/dist/main.js",
18
+ "cwd": "${workspaceRoot}",
19
+ "smartStep": true,
20
+ "console": "integratedTerminal"
21
+ }
22
+ ]
23
23
  }
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Martin Backudd
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Martin Backudd
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.md CHANGED
@@ -1,15 +1,24 @@
1
- # DCS git tool
2
-
3
- DCS shuffles the keys in the configs when saving, to be able to version control, we need to sort the keys of config objects.
4
-
5
- ## Flow
6
-
7
- - If .miz is selected, extracts content into ./out and sorts all configs.
8
- - If ./out exists, creates a .miz
9
-
10
- - (When saving in editor) After writing the .miz completes, it unpacks the archive and sorts the content, THEN re-archives into the .miz again to keep everything consistent for version control.
11
- - When editing anything in ./out, archive (.miz) is created from ./out.
12
-
13
- ### Cmd args for debugging purposes
14
-
15
- a single arg of a .miz filepath can be given to override file selection
1
+ # DCS git tool
2
+
3
+ DCS shuffles the keys in the configs when saving, to be able to version control, we need to sort the keys of config objects.
4
+
5
+ ## Getting started
6
+ Select the .miz you want to work on and use git to version control the mission!
7
+
8
+ ## Alternatives to running it
9
+
10
+ - ```npx dcs-git-utils```
11
+ - download the exe's from releases
12
+ - clone the repo
13
+
14
+ ## Flow
15
+
16
+ - If .miz is selected, extracts content into ./out and sorts all configs.
17
+ - If ./out exists, creates a .miz
18
+
19
+ - (When saving in editor) After writing the .miz completes, it unpacks the archive and sorts the content, THEN re-archives into the .miz again to keep everything consistent for version control.
20
+ - When editing anything in ./out, archive (.miz) is created from ./out.
21
+
22
+ ### Cmd args for debugging purposes
23
+
24
+ a single arg of a .miz filepath can be given to override file selection
@@ -1,110 +1,120 @@
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 (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- };
34
- var __importDefault = (this && this.__importDefault) || function (mod) {
35
- return (mod && mod.__esModule) ? mod : { "default": mod };
36
- };
37
- Object.defineProperty(exports, "__esModule", { value: true });
38
- exports.unpackMiz = exports.handleArchive = exports.checkStable = void 0;
39
- const node_fs_1 = __importStar(require("node:fs"));
40
- const archiver_1 = __importDefault(require("archiver"));
41
- const decompress_1 = __importDefault(require("decompress"));
42
- function checkStable(filePath, stableChecks = 10, // how many *consecutive* stable reads required
43
- interval = 250 // ms between checks
44
- ) {
45
- return __awaiter(this, void 0, void 0, function* () {
46
- let lastSize = null;
47
- let stableCount = 0;
48
- while (stableCount < stableChecks) {
49
- let stat;
50
- try {
51
- stat = yield node_fs_1.promises.stat(filePath);
52
- }
53
- catch (_a) {
54
- // file might not exist yet – reset
55
- lastSize = null;
56
- stableCount = 0;
57
- yield new Promise((res) => setTimeout(res, interval));
58
- continue;
59
- }
60
- const size = stat.size;
61
- if (lastSize !== null && size === lastSize) {
62
- stableCount++;
63
- }
64
- else {
65
- stableCount = 0; // reset if changed
66
- }
67
- lastSize = size;
68
- yield new Promise((res) => setTimeout(res, interval));
69
- }
70
- return true; // stable!
71
- });
72
- }
73
- exports.checkStable = checkStable;
74
- const handleArchive = (dirPath, mizpath) => {
75
- return new Promise((resolve, reject) => __awaiter(void 0, void 0, void 0, function* () {
76
- const archive = (0, archiver_1.default)("zip", { zlib: { level: 9 } });
77
- const output = node_fs_1.default.createWriteStream(mizpath);
78
- // Handle events
79
- output.on('close', function () {
80
- console.log(`Archive created successfully at ${mizpath}, total bytes: ${archive.pointer()}`);
81
- resolve();
82
- });
83
- archive.on('error', function (err) {
84
- throw err;
85
- });
86
- // Pipe archive data to the file
87
- archive.pipe(output);
88
- // Append directory
89
- archive.directory(dirPath, false); // false = no root folder in zip
90
- // Finalize the archive
91
- yield archive.finalize();
92
- }));
93
- };
94
- exports.handleArchive = handleArchive;
95
- const unpackMiz = (path, outPath) => __awaiter(void 0, void 0, void 0, function* () {
96
- try {
97
- console.log('decompressing');
98
- const result = yield (0, decompress_1.default)(path, outPath);
99
- if (!result.length) {
100
- throw new Error('Decompression yielded no results, something is wrong with the .miz');
101
- }
102
- return result;
103
- }
104
- catch (err) {
105
- console.error(err);
106
- throw err;
107
- }
108
- });
109
- exports.unpackMiz = unpackMiz;
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
43
+ };
44
+ var __importDefault = (this && this.__importDefault) || function (mod) {
45
+ return (mod && mod.__esModule) ? mod : { "default": mod };
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.unpackMiz = exports.handleArchive = void 0;
49
+ exports.checkStable = checkStable;
50
+ const node_fs_1 = __importStar(require("node:fs"));
51
+ const archiver_1 = __importDefault(require("archiver"));
52
+ const decompress_1 = __importDefault(require("decompress"));
53
+ function checkStable(filePath_1) {
54
+ return __awaiter(this, arguments, void 0, function* (filePath, stableChecks = 10, // how many *consecutive* stable reads required
55
+ interval = 250 // ms between checks
56
+ ) {
57
+ let lastSize = null;
58
+ let stableCount = 0;
59
+ while (stableCount < stableChecks) {
60
+ let stat;
61
+ try {
62
+ stat = yield node_fs_1.promises.stat(filePath);
63
+ }
64
+ catch (_a) {
65
+ // file might not exist yet – reset
66
+ lastSize = null;
67
+ stableCount = 0;
68
+ yield new Promise((res) => setTimeout(res, interval));
69
+ continue;
70
+ }
71
+ const size = stat.size;
72
+ if (lastSize !== null && size === lastSize) {
73
+ stableCount++;
74
+ }
75
+ else {
76
+ stableCount = 0; // reset if changed
77
+ }
78
+ lastSize = size;
79
+ yield new Promise((res) => setTimeout(res, interval));
80
+ }
81
+ return true; // stable!
82
+ });
83
+ }
84
+ const handleArchive = (dirPath, mizpath) => {
85
+ return new Promise((resolve, reject) => __awaiter(void 0, void 0, void 0, function* () {
86
+ const archive = (0, archiver_1.default)("zip", { zlib: { level: 9 } });
87
+ const output = node_fs_1.default.createWriteStream(mizpath);
88
+ // Handle events
89
+ output.on('close', function () {
90
+ console.log(`Archive created successfully at ${mizpath}, total bytes: ${archive.pointer()}`);
91
+ resolve();
92
+ });
93
+ archive.on('error', function (err) {
94
+ throw err;
95
+ });
96
+ // Pipe archive data to the file
97
+ archive.pipe(output);
98
+ // Append directory
99
+ archive.directory(dirPath, false); // false = no root folder in zip
100
+ // Finalize the archive
101
+ yield archive.finalize();
102
+ }));
103
+ };
104
+ exports.handleArchive = handleArchive;
105
+ const unpackMiz = (path, outPath) => __awaiter(void 0, void 0, void 0, function* () {
106
+ try {
107
+ console.log('decompressing');
108
+ const result = yield (0, decompress_1.default)(path, outPath);
109
+ if (!result.length) {
110
+ throw new Error('Decompression yielded no results, something is wrong with the .miz');
111
+ }
112
+ return result;
113
+ }
114
+ catch (err) {
115
+ console.error(err);
116
+ throw err;
117
+ }
118
+ });
119
+ exports.unpackMiz = unpackMiz;
110
120
  //# sourceMappingURL=compression.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compression.js","sourceRoot":"","sources":["../src/compression.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,mDAAuC;AACvC,wDAAgC;AAChC,4DAAoC;AAEpC,SAAsB,WAAW,CAC7B,QAAgB,EAChB,YAAY,GAAG,EAAE,EAAO,+CAA+C;AACvE,QAAQ,GAAG,GAAG,CAAS,oBAAoB;;;QAG3C,IAAI,QAAQ,GAAkB,IAAI,CAAC;QACnC,IAAI,WAAW,GAAG,CAAC,CAAC;QAEpB,OAAO,WAAW,GAAG,YAAY,EAAE;YAC/B,IAAI,IAAI,CAAC;YAET,IAAI;gBACA,IAAI,GAAG,MAAM,kBAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aACxC;YAAC,WAAM;gBACJ,mCAAmC;gBACnC,QAAQ,GAAG,IAAI,CAAC;gBAChB,WAAW,GAAG,CAAC,CAAC;gBAChB,MAAM,IAAI,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;gBACtD,SAAS;aACZ;YAED,MAAM,IAAI,G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