@storm-software/workspace-tools 1.23.0 → 1.23.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/CHANGELOG.md +12 -0
- package/README.md +3 -1
- package/index.js +21530 -18170
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +9230 -6055
- package/src/executors/tsup/get-config.js +12 -12
- package/src/executors/tsup-neutral/executor.js +12233 -9058
- package/src/executors/tsup-node/executor.js +12233 -9058
- package/src/generators/config-schema/generator.js +46 -46
- package/src/generators/init/init.js +46 -46
- package/src/generators/node-library/generator.js +2679 -772
- package/src/generators/preset/generator.js +46 -46
|
@@ -578,9 +578,9 @@ var init_tslib_es6 = __esm({
|
|
|
578
578
|
}
|
|
579
579
|
});
|
|
580
580
|
|
|
581
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
581
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/nx.js
|
|
582
582
|
var require_nx = __commonJS({
|
|
583
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
583
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/nx.js"(exports) {
|
|
584
584
|
"use strict";
|
|
585
585
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
586
586
|
exports.requireNx = void 0;
|
|
@@ -600,9 +600,9 @@ var require_nx = __commonJS({
|
|
|
600
600
|
}
|
|
601
601
|
});
|
|
602
602
|
|
|
603
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
603
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/generators/format-files.js
|
|
604
604
|
var require_format_files = __commonJS({
|
|
605
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
605
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/generators/format-files.js"(exports) {
|
|
606
606
|
"use strict";
|
|
607
607
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
608
608
|
exports.formatFiles = void 0;
|
|
@@ -688,9 +688,9 @@ var require_format_files = __commonJS({
|
|
|
688
688
|
}
|
|
689
689
|
});
|
|
690
690
|
|
|
691
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
691
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/binary-extensions.js
|
|
692
692
|
var require_binary_extensions = __commonJS({
|
|
693
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
693
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/binary-extensions.js"(exports) {
|
|
694
694
|
"use strict";
|
|
695
695
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
696
696
|
exports.isBinaryPath = void 0;
|
|
@@ -1688,9 +1688,9 @@ var require_ejs = __commonJS({
|
|
|
1688
1688
|
}
|
|
1689
1689
|
});
|
|
1690
1690
|
|
|
1691
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
1691
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/generators/generate-files.js
|
|
1692
1692
|
var require_generate_files = __commonJS({
|
|
1693
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
1693
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/generators/generate-files.js"(exports) {
|
|
1694
1694
|
"use strict";
|
|
1695
1695
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1696
1696
|
exports.generateFiles = void 0;
|
|
@@ -1759,9 +1759,9 @@ var require_generate_files = __commonJS({
|
|
|
1759
1759
|
}
|
|
1760
1760
|
});
|
|
1761
1761
|
|
|
1762
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
1762
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/versions.js
|
|
1763
1763
|
var require_versions = __commonJS({
|
|
1764
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
1764
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/versions.js"(exports) {
|
|
1765
1765
|
"use strict";
|
|
1766
1766
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1767
1767
|
exports.typescriptVersion = void 0;
|
|
@@ -4197,9 +4197,9 @@ var require_semver2 = __commonJS({
|
|
|
4197
4197
|
}
|
|
4198
4198
|
});
|
|
4199
4199
|
|
|
4200
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
4200
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/tasks/install-packages-task.js
|
|
4201
4201
|
var require_install_packages_task = __commonJS({
|
|
4202
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
4202
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/tasks/install-packages-task.js"(exports) {
|
|
4203
4203
|
"use strict";
|
|
4204
4204
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4205
4205
|
exports.installPackagesTask = void 0;
|
|
@@ -7218,9 +7218,9 @@ var require_tmp = __commonJS({
|
|
|
7218
7218
|
}
|
|
7219
7219
|
});
|
|
7220
7220
|
|
|
7221
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
7221
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/package-json.js
|
|
7222
7222
|
var require_package_json = __commonJS({
|
|
7223
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
7223
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/package-json.js"(exports) {
|
|
7224
7224
|
"use strict";
|
|
7225
7225
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7226
7226
|
exports.NX_VERSION = exports.ensurePackage = exports.removeDependenciesFromPackageJson = exports.addDependenciesToPackageJson = void 0;
|
|
@@ -7497,9 +7497,9 @@ var require_package_json = __commonJS({
|
|
|
7497
7497
|
}
|
|
7498
7498
|
});
|
|
7499
7499
|
|
|
7500
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
7500
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/generators/to-js.js
|
|
7501
7501
|
var require_to_js = __commonJS({
|
|
7502
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
7502
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/generators/to-js.js"(exports) {
|
|
7503
7503
|
"use strict";
|
|
7504
7504
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7505
7505
|
exports.toJS = void 0;
|
|
@@ -7522,9 +7522,9 @@ var require_to_js = __commonJS({
|
|
|
7522
7522
|
}
|
|
7523
7523
|
});
|
|
7524
7524
|
|
|
7525
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
7525
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/generators/update-ts-configs-to-js.js
|
|
7526
7526
|
var require_update_ts_configs_to_js = __commonJS({
|
|
7527
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
7527
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/generators/update-ts-configs-to-js.js"(exports) {
|
|
7528
7528
|
"use strict";
|
|
7529
7529
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7530
7530
|
exports.updateTsConfigsToJs = void 0;
|
|
@@ -7576,9 +7576,9 @@ var require_update_ts_configs_to_js = __commonJS({
|
|
|
7576
7576
|
}
|
|
7577
7577
|
});
|
|
7578
7578
|
|
|
7579
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
7579
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/generators/run-tasks-in-serial.js
|
|
7580
7580
|
var require_run_tasks_in_serial = __commonJS({
|
|
7581
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
7581
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/generators/run-tasks-in-serial.js"(exports) {
|
|
7582
7582
|
"use strict";
|
|
7583
7583
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7584
7584
|
exports.runTasksInSerial = void 0;
|
|
@@ -7593,9 +7593,9 @@ var require_run_tasks_in_serial = __commonJS({
|
|
|
7593
7593
|
}
|
|
7594
7594
|
});
|
|
7595
7595
|
|
|
7596
|
-
// node_modules/.pnpm/ignore@5.
|
|
7596
|
+
// node_modules/.pnpm/ignore@5.3.0/node_modules/ignore/index.js
|
|
7597
7597
|
var require_ignore = __commonJS({
|
|
7598
|
-
"node_modules/.pnpm/ignore@5.
|
|
7598
|
+
"node_modules/.pnpm/ignore@5.3.0/node_modules/ignore/index.js"(exports, module2) {
|
|
7599
7599
|
function makeArray(subject) {
|
|
7600
7600
|
return Array.isArray(subject) ? subject : [subject];
|
|
7601
7601
|
}
|
|
@@ -7966,9 +7966,9 @@ var require_ignore = __commonJS({
|
|
|
7966
7966
|
}
|
|
7967
7967
|
});
|
|
7968
7968
|
|
|
7969
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
7969
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/generators/visit-not-ignored-files.js
|
|
7970
7970
|
var require_visit_not_ignored_files = __commonJS({
|
|
7971
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
7971
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/generators/visit-not-ignored-files.js"(exports) {
|
|
7972
7972
|
"use strict";
|
|
7973
7973
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7974
7974
|
exports.visitNotIgnoredFiles = void 0;
|
|
@@ -8008,9 +8008,9 @@ var require_visit_not_ignored_files = __commonJS({
|
|
|
8008
8008
|
}
|
|
8009
8009
|
});
|
|
8010
8010
|
|
|
8011
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
8011
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/executors/parse-target-string.js
|
|
8012
8012
|
var require_parse_target_string = __commonJS({
|
|
8013
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
8013
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/executors/parse-target-string.js"(exports) {
|
|
8014
8014
|
"use strict";
|
|
8015
8015
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8016
8016
|
exports.targetToTargetString = exports.parseTargetString = void 0;
|
|
@@ -8049,9 +8049,9 @@ var require_parse_target_string = __commonJS({
|
|
|
8049
8049
|
}
|
|
8050
8050
|
});
|
|
8051
8051
|
|
|
8052
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
8052
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/executors/read-target-options.js
|
|
8053
8053
|
var require_read_target_options = __commonJS({
|
|
8054
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
8054
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/executors/read-target-options.js"(exports) {
|
|
8055
8055
|
"use strict";
|
|
8056
8056
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8057
8057
|
exports.readTargetOptions = void 0;
|
|
@@ -8081,9 +8081,9 @@ var require_read_target_options = __commonJS({
|
|
|
8081
8081
|
}
|
|
8082
8082
|
});
|
|
8083
8083
|
|
|
8084
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
8084
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/names.js
|
|
8085
8085
|
var require_names = __commonJS({
|
|
8086
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
8086
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/names.js"(exports) {
|
|
8087
8087
|
"use strict";
|
|
8088
8088
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8089
8089
|
exports.names = void 0;
|
|
@@ -8116,9 +8116,9 @@ var require_names = __commonJS({
|
|
|
8116
8116
|
}
|
|
8117
8117
|
});
|
|
8118
8118
|
|
|
8119
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
8119
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/get-workspace-layout.js
|
|
8120
8120
|
var require_get_workspace_layout = __commonJS({
|
|
8121
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
8121
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/get-workspace-layout.js"(exports) {
|
|
8122
8122
|
"use strict";
|
|
8123
8123
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8124
8124
|
exports.extractLayoutDirectory = exports.getWorkspaceLayout = void 0;
|
|
@@ -8158,9 +8158,9 @@ var require_get_workspace_layout = __commonJS({
|
|
|
8158
8158
|
}
|
|
8159
8159
|
});
|
|
8160
8160
|
|
|
8161
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
8161
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/string-change.js
|
|
8162
8162
|
var require_string_change = __commonJS({
|
|
8163
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
8163
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/string-change.js"(exports) {
|
|
8164
8164
|
"use strict";
|
|
8165
8165
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8166
8166
|
exports.applyChangesToString = exports.ChangeType = void 0;
|
|
@@ -8237,9 +8237,9 @@ var require_string_change = __commonJS({
|
|
|
8237
8237
|
}
|
|
8238
8238
|
});
|
|
8239
8239
|
|
|
8240
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
8240
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/offset-from-root.js
|
|
8241
8241
|
var require_offset_from_root = __commonJS({
|
|
8242
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
8242
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/offset-from-root.js"(exports) {
|
|
8243
8243
|
"use strict";
|
|
8244
8244
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8245
8245
|
exports.offsetFromRoot = void 0;
|
|
@@ -8260,9 +8260,9 @@ var require_offset_from_root = __commonJS({
|
|
|
8260
8260
|
}
|
|
8261
8261
|
});
|
|
8262
8262
|
|
|
8263
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
8263
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/invoke-nx-generator.js
|
|
8264
8264
|
var require_invoke_nx_generator = __commonJS({
|
|
8265
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
8265
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/invoke-nx-generator.js"(exports) {
|
|
8266
8266
|
"use strict";
|
|
8267
8267
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8268
8268
|
exports.convertNxGenerator = void 0;
|
|
@@ -18016,9 +18016,9 @@ var require_cjs = __commonJS({
|
|
|
18016
18016
|
}
|
|
18017
18017
|
});
|
|
18018
18018
|
|
|
18019
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
18019
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/convert-nx-executor.js
|
|
18020
18020
|
var require_convert_nx_executor = __commonJS({
|
|
18021
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
18021
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/convert-nx-executor.js"(exports) {
|
|
18022
18022
|
"use strict";
|
|
18023
18023
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18024
18024
|
exports.convertNxExecutor = void 0;
|
|
@@ -18097,9 +18097,9 @@ var require_convert_nx_executor = __commonJS({
|
|
|
18097
18097
|
}
|
|
18098
18098
|
});
|
|
18099
18099
|
|
|
18100
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
18100
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/move-dir.js
|
|
18101
18101
|
var require_move_dir = __commonJS({
|
|
18102
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
18102
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/utils/move-dir.js"(exports) {
|
|
18103
18103
|
"use strict";
|
|
18104
18104
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18105
18105
|
exports.moveFilesToNewDirectory = void 0;
|
|
@@ -18126,9 +18126,9 @@ var require_move_dir = __commonJS({
|
|
|
18126
18126
|
}
|
|
18127
18127
|
});
|
|
18128
18128
|
|
|
18129
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
18129
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/public-api.js
|
|
18130
18130
|
var require_public_api = __commonJS({
|
|
18131
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
18131
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/public-api.js"(exports) {
|
|
18132
18132
|
"use strict";
|
|
18133
18133
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18134
18134
|
exports.moveFilesToNewDirectory = exports.convertNxExecutor = exports.convertNxGenerator = exports.offsetFromRoot = exports.ChangeType = exports.applyChangesToString = exports.extractLayoutDirectory = exports.getWorkspaceLayout = exports.names = exports.installPackagesTask = exports.NX_VERSION = exports.removeDependenciesFromPackageJson = exports.ensurePackage = exports.addDependenciesToPackageJson = exports.readTargetOptions = exports.targetToTargetString = exports.parseTargetString = exports.visitNotIgnoredFiles = exports.runTasksInSerial = exports.updateTsConfigsToJs = exports.toJS = exports.generateFiles = exports.formatFiles = void 0;
|
|
@@ -18221,9 +18221,9 @@ var require_public_api = __commonJS({
|
|
|
18221
18221
|
}
|
|
18222
18222
|
});
|
|
18223
18223
|
|
|
18224
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
18224
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/index.js
|
|
18225
18225
|
var require_devkit = __commonJS({
|
|
18226
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
18226
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/index.js"(exports) {
|
|
18227
18227
|
"use strict";
|
|
18228
18228
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18229
18229
|
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
@@ -30853,9 +30853,9 @@ var require_enquirer = __commonJS({
|
|
|
30853
30853
|
}
|
|
30854
30854
|
});
|
|
30855
30855
|
|
|
30856
|
-
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
30856
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/generators/project-name-and-root-utils.js
|
|
30857
30857
|
var require_project_name_and_root_utils = __commonJS({
|
|
30858
|
-
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.
|
|
30858
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.1.3/node_modules/@nx/devkit/src/generators/project-name-and-root-utils.js"(exports) {
|
|
30859
30859
|
"use strict";
|
|
30860
30860
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30861
30861
|
exports.setCwd = exports.determineProjectNameAndRootOptions = void 0;
|
|
@@ -31038,117 +31038,1661 @@ var require_project_name_and_root_utils = __commonJS({
|
|
|
31038
31038
|
}
|
|
31039
31039
|
});
|
|
31040
31040
|
|
|
31041
|
-
// node_modules/.pnpm/@nx+
|
|
31042
|
-
var
|
|
31043
|
-
"node_modules/.pnpm/@nx+
|
|
31044
|
-
|
|
31045
|
-
|
|
31046
|
-
|
|
31047
|
-
|
|
31048
|
-
|
|
31049
|
-
|
|
31050
|
-
|
|
31051
|
-
|
|
31052
|
-
|
|
31053
|
-
|
|
31054
|
-
|
|
31055
|
-
|
|
31056
|
-
|
|
31057
|
-
|
|
31058
|
-
|
|
31059
|
-
|
|
31060
|
-
"CLI"
|
|
31061
|
-
],
|
|
31062
|
-
main: "./src/index.js",
|
|
31063
|
-
typings: "src/index.d.ts",
|
|
31064
|
-
license: "MIT",
|
|
31065
|
-
bugs: {
|
|
31066
|
-
url: "https://github.com/nrwl/nx/issues"
|
|
31067
|
-
},
|
|
31068
|
-
homepage: "https://nx.dev",
|
|
31069
|
-
"ng-update": {
|
|
31070
|
-
requirements: {},
|
|
31071
|
-
migrations: "./migrations.json"
|
|
31072
|
-
},
|
|
31073
|
-
generators: "./generators.json",
|
|
31074
|
-
executors: "./executors.json",
|
|
31075
|
-
dependencies: {
|
|
31076
|
-
"@babel/core": "^7.22.9",
|
|
31077
|
-
"@babel/plugin-proposal-decorators": "^7.22.7",
|
|
31078
|
-
"@babel/plugin-transform-runtime": "^7.22.9",
|
|
31079
|
-
"@babel/plugin-transform-class-properties": "^7.22.5",
|
|
31080
|
-
"@babel/preset-env": "^7.22.9",
|
|
31081
|
-
"@babel/preset-typescript": "^7.22.5",
|
|
31082
|
-
"@babel/runtime": "^7.22.6",
|
|
31083
|
-
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
31084
|
-
"babel-plugin-const-enum": "^1.0.1",
|
|
31085
|
-
"babel-plugin-macros": "^2.8.0",
|
|
31086
|
-
"babel-plugin-transform-typescript-metadata": "^0.3.1",
|
|
31087
|
-
chalk: "^4.1.0",
|
|
31088
|
-
columnify: "^1.6.0",
|
|
31089
|
-
"detect-port": "^1.5.1",
|
|
31090
|
-
"fast-glob": "3.2.7",
|
|
31091
|
-
"fs-extra": "^11.1.0",
|
|
31092
|
-
"npm-package-arg": "11.0.1",
|
|
31093
|
-
"npm-run-path": "^4.0.1",
|
|
31094
|
-
"ts-node": "10.9.1",
|
|
31095
|
-
"tsconfig-paths": "^4.1.2",
|
|
31096
|
-
ignore: "^5.0.4",
|
|
31097
|
-
"js-tokens": "^4.0.0",
|
|
31098
|
-
minimatch: "3.0.5",
|
|
31099
|
-
ora: "5.3.0",
|
|
31100
|
-
semver: "7.5.3",
|
|
31101
|
-
"source-map-support": "0.5.19",
|
|
31102
|
-
tslib: "^2.3.0",
|
|
31103
|
-
"@nx/devkit": "17.0.3",
|
|
31104
|
-
"@nx/workspace": "17.0.3",
|
|
31105
|
-
"@nrwl/js": "17.0.3"
|
|
31106
|
-
},
|
|
31107
|
-
peerDependencies: {
|
|
31108
|
-
verdaccio: "^5.0.4"
|
|
31109
|
-
},
|
|
31110
|
-
peerDependenciesMeta: {
|
|
31111
|
-
verdaccio: {
|
|
31112
|
-
optional: true
|
|
31113
|
-
}
|
|
31114
|
-
},
|
|
31115
|
-
publishConfig: {
|
|
31116
|
-
access: "public"
|
|
31117
|
-
},
|
|
31118
|
-
type: "commonjs"
|
|
31119
|
-
};
|
|
31041
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/nx.js
|
|
31042
|
+
var require_nx2 = __commonJS({
|
|
31043
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/nx.js"(exports) {
|
|
31044
|
+
"use strict";
|
|
31045
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31046
|
+
exports.requireNx = void 0;
|
|
31047
|
+
function requireNx() {
|
|
31048
|
+
let result = { ...require("nx/src/devkit-exports") };
|
|
31049
|
+
try {
|
|
31050
|
+
result = {
|
|
31051
|
+
...result,
|
|
31052
|
+
// Remove in Nx v18, devkit should not support Nx v16.0.2 at that point.
|
|
31053
|
+
...require("nx/src/devkit-internals")
|
|
31054
|
+
};
|
|
31055
|
+
} catch {
|
|
31056
|
+
}
|
|
31057
|
+
return result;
|
|
31058
|
+
}
|
|
31059
|
+
exports.requireNx = requireNx;
|
|
31120
31060
|
}
|
|
31121
31061
|
});
|
|
31122
31062
|
|
|
31123
|
-
// node_modules/.pnpm/@nx+
|
|
31124
|
-
var
|
|
31125
|
-
"node_modules/.pnpm/@nx+
|
|
31063
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/generators/format-files.js
|
|
31064
|
+
var require_format_files2 = __commonJS({
|
|
31065
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/generators/format-files.js"(exports) {
|
|
31126
31066
|
"use strict";
|
|
31127
31067
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31128
|
-
exports.
|
|
31129
|
-
|
|
31130
|
-
|
|
31131
|
-
|
|
31132
|
-
|
|
31133
|
-
|
|
31134
|
-
|
|
31135
|
-
|
|
31136
|
-
|
|
31137
|
-
|
|
31138
|
-
|
|
31139
|
-
|
|
31140
|
-
|
|
31068
|
+
exports.formatFiles = void 0;
|
|
31069
|
+
var path = require("path");
|
|
31070
|
+
var nx_1 = require_nx2();
|
|
31071
|
+
var { updateJson: updateJson2, readJson: readJson2, sortObjectByKeys } = (0, nx_1.requireNx)();
|
|
31072
|
+
sortObjectByKeys = sortObjectByKeys ?? require("nx/src/utils/object-sort").sortObjectByKeys;
|
|
31073
|
+
async function formatFiles3(tree) {
|
|
31074
|
+
let prettier;
|
|
31075
|
+
try {
|
|
31076
|
+
prettier = await Promise.resolve().then(() => require("prettier"));
|
|
31077
|
+
} catch {
|
|
31078
|
+
}
|
|
31079
|
+
sortTsConfig(tree);
|
|
31080
|
+
if (!prettier)
|
|
31081
|
+
return;
|
|
31082
|
+
const files = new Set(tree.listChanges().filter((file) => file.type !== "DELETE"));
|
|
31083
|
+
const changedPrettierInTree = getChangedPrettierConfigInTree(tree);
|
|
31084
|
+
await Promise.all(Array.from(files).map(async (file) => {
|
|
31085
|
+
try {
|
|
31086
|
+
const systemPath = path.join(tree.root, file.path);
|
|
31087
|
+
const resolvedOptions = await prettier.resolveConfig(systemPath, {
|
|
31088
|
+
editorconfig: true
|
|
31089
|
+
});
|
|
31090
|
+
const options = {
|
|
31091
|
+
...resolvedOptions,
|
|
31092
|
+
...changedPrettierInTree,
|
|
31093
|
+
filepath: systemPath
|
|
31094
|
+
};
|
|
31095
|
+
if (file.path.endsWith(".swcrc")) {
|
|
31096
|
+
options.parser = "json";
|
|
31097
|
+
}
|
|
31098
|
+
const support = await prettier.getFileInfo(systemPath, options);
|
|
31099
|
+
if (support.ignored || !support.inferredParser) {
|
|
31100
|
+
return;
|
|
31101
|
+
}
|
|
31102
|
+
tree.write(
|
|
31103
|
+
file.path,
|
|
31104
|
+
// In prettier v3 the format result is a promise
|
|
31105
|
+
await prettier.format(file.content.toString("utf-8"), options)
|
|
31106
|
+
);
|
|
31107
|
+
} catch (e) {
|
|
31108
|
+
console.warn(`Could not format ${file.path}. Error: "${e.message}"`);
|
|
31109
|
+
}
|
|
31110
|
+
}));
|
|
31111
|
+
}
|
|
31112
|
+
exports.formatFiles = formatFiles3;
|
|
31113
|
+
function sortTsConfig(tree) {
|
|
31114
|
+
try {
|
|
31115
|
+
const tsConfigPath = getRootTsConfigPath(tree);
|
|
31116
|
+
if (!tsConfigPath) {
|
|
31117
|
+
return;
|
|
31118
|
+
}
|
|
31119
|
+
updateJson2(tree, tsConfigPath, (tsconfig) => ({
|
|
31120
|
+
...tsconfig,
|
|
31121
|
+
compilerOptions: {
|
|
31122
|
+
...tsconfig.compilerOptions,
|
|
31123
|
+
paths: sortObjectByKeys(tsconfig.compilerOptions.paths)
|
|
31124
|
+
}
|
|
31125
|
+
}));
|
|
31126
|
+
} catch (e) {
|
|
31127
|
+
}
|
|
31128
|
+
}
|
|
31129
|
+
function getRootTsConfigPath(tree) {
|
|
31130
|
+
for (const path2 of ["tsconfig.base.json", "tsconfig.json"]) {
|
|
31131
|
+
if (tree.exists(path2)) {
|
|
31132
|
+
return path2;
|
|
31133
|
+
}
|
|
31134
|
+
}
|
|
31135
|
+
return null;
|
|
31136
|
+
}
|
|
31137
|
+
function getChangedPrettierConfigInTree(tree) {
|
|
31138
|
+
if (tree.listChanges().find((file) => file.path === ".prettierrc")) {
|
|
31139
|
+
try {
|
|
31140
|
+
return readJson2(tree, ".prettierrc");
|
|
31141
|
+
} catch {
|
|
31142
|
+
return null;
|
|
31143
|
+
}
|
|
31144
|
+
} else {
|
|
31145
|
+
return null;
|
|
31146
|
+
}
|
|
31147
|
+
}
|
|
31141
31148
|
}
|
|
31142
31149
|
});
|
|
31143
31150
|
|
|
31144
|
-
// node_modules/.pnpm/@nx+
|
|
31145
|
-
var
|
|
31146
|
-
"node_modules/.pnpm/@nx+
|
|
31151
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/binary-extensions.js
|
|
31152
|
+
var require_binary_extensions2 = __commonJS({
|
|
31153
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/binary-extensions.js"(exports) {
|
|
31147
31154
|
"use strict";
|
|
31148
31155
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31149
|
-
exports.
|
|
31150
|
-
var
|
|
31151
|
-
var
|
|
31156
|
+
exports.isBinaryPath = void 0;
|
|
31157
|
+
var path_1 = require("path");
|
|
31158
|
+
var binaryExtensions = /* @__PURE__ */ new Set([
|
|
31159
|
+
// types originally from https://github.com/sindresorhus/binary-extensions/blob/40e44b510d87a63dcf42300bc8fbcb105f45a61c/binary-extensions.json
|
|
31160
|
+
".3dm",
|
|
31161
|
+
".3ds",
|
|
31162
|
+
".3g2",
|
|
31163
|
+
".3gp",
|
|
31164
|
+
".7z",
|
|
31165
|
+
".a",
|
|
31166
|
+
".aac",
|
|
31167
|
+
".adp",
|
|
31168
|
+
".ai",
|
|
31169
|
+
".aif",
|
|
31170
|
+
".aiff",
|
|
31171
|
+
".alz",
|
|
31172
|
+
".ape",
|
|
31173
|
+
".apk",
|
|
31174
|
+
".appimage",
|
|
31175
|
+
".ar",
|
|
31176
|
+
".arj",
|
|
31177
|
+
".asf",
|
|
31178
|
+
".au",
|
|
31179
|
+
".avi",
|
|
31180
|
+
".bak",
|
|
31181
|
+
".baml",
|
|
31182
|
+
".bh",
|
|
31183
|
+
".bin",
|
|
31184
|
+
".bk",
|
|
31185
|
+
".bmp",
|
|
31186
|
+
".btif",
|
|
31187
|
+
".bz2",
|
|
31188
|
+
".bzip2",
|
|
31189
|
+
".cab",
|
|
31190
|
+
".caf",
|
|
31191
|
+
".cgm",
|
|
31192
|
+
".class",
|
|
31193
|
+
".cmx",
|
|
31194
|
+
".cpio",
|
|
31195
|
+
".cr2",
|
|
31196
|
+
".cur",
|
|
31197
|
+
".dat",
|
|
31198
|
+
".dcm",
|
|
31199
|
+
".deb",
|
|
31200
|
+
".dex",
|
|
31201
|
+
".djvu",
|
|
31202
|
+
".dll",
|
|
31203
|
+
".dmg",
|
|
31204
|
+
".dng",
|
|
31205
|
+
".doc",
|
|
31206
|
+
".docm",
|
|
31207
|
+
".docx",
|
|
31208
|
+
".dot",
|
|
31209
|
+
".dotm",
|
|
31210
|
+
".dra",
|
|
31211
|
+
".DS_Store",
|
|
31212
|
+
".dsk",
|
|
31213
|
+
".dts",
|
|
31214
|
+
".dtshd",
|
|
31215
|
+
".dvb",
|
|
31216
|
+
".dwg",
|
|
31217
|
+
".dxf",
|
|
31218
|
+
".ecelp4800",
|
|
31219
|
+
".ecelp7470",
|
|
31220
|
+
".ecelp9600",
|
|
31221
|
+
".egg",
|
|
31222
|
+
".eol",
|
|
31223
|
+
".eot",
|
|
31224
|
+
".epub",
|
|
31225
|
+
".exe",
|
|
31226
|
+
".f4v",
|
|
31227
|
+
".fbs",
|
|
31228
|
+
".fh",
|
|
31229
|
+
".fla",
|
|
31230
|
+
".flac",
|
|
31231
|
+
".flatpak",
|
|
31232
|
+
".fli",
|
|
31233
|
+
".flv",
|
|
31234
|
+
".fpx",
|
|
31235
|
+
".fst",
|
|
31236
|
+
".fvt",
|
|
31237
|
+
".g3",
|
|
31238
|
+
".gh",
|
|
31239
|
+
".gif",
|
|
31240
|
+
".glb",
|
|
31241
|
+
".graffle",
|
|
31242
|
+
".gz",
|
|
31243
|
+
".gzip",
|
|
31244
|
+
".h261",
|
|
31245
|
+
".h263",
|
|
31246
|
+
".h264",
|
|
31247
|
+
".icns",
|
|
31248
|
+
".ico",
|
|
31249
|
+
".ief",
|
|
31250
|
+
".img",
|
|
31251
|
+
".ipa",
|
|
31252
|
+
".iso",
|
|
31253
|
+
".jar",
|
|
31254
|
+
".jpeg",
|
|
31255
|
+
".jpg",
|
|
31256
|
+
".jpgv",
|
|
31257
|
+
".jpm",
|
|
31258
|
+
".jxr",
|
|
31259
|
+
".key",
|
|
31260
|
+
".keystore",
|
|
31261
|
+
".ktx",
|
|
31262
|
+
".lha",
|
|
31263
|
+
".lib",
|
|
31264
|
+
".lvp",
|
|
31265
|
+
".lz",
|
|
31266
|
+
".lzh",
|
|
31267
|
+
".lzma",
|
|
31268
|
+
".lzo",
|
|
31269
|
+
".m3u",
|
|
31270
|
+
".m4a",
|
|
31271
|
+
".m4v",
|
|
31272
|
+
".mar",
|
|
31273
|
+
".mdi",
|
|
31274
|
+
".mht",
|
|
31275
|
+
".mid",
|
|
31276
|
+
".midi",
|
|
31277
|
+
".mj2",
|
|
31278
|
+
".mka",
|
|
31279
|
+
".mkv",
|
|
31280
|
+
".mmr",
|
|
31281
|
+
".mng",
|
|
31282
|
+
".mobi",
|
|
31283
|
+
".mov",
|
|
31284
|
+
".movie",
|
|
31285
|
+
".mp3",
|
|
31286
|
+
".mp4",
|
|
31287
|
+
".mp4a",
|
|
31288
|
+
".mpeg",
|
|
31289
|
+
".mpg",
|
|
31290
|
+
".mpga",
|
|
31291
|
+
".msi",
|
|
31292
|
+
".mxu",
|
|
31293
|
+
".nef",
|
|
31294
|
+
".npx",
|
|
31295
|
+
".numbers",
|
|
31296
|
+
".nupkg",
|
|
31297
|
+
".o",
|
|
31298
|
+
".odp",
|
|
31299
|
+
".ods",
|
|
31300
|
+
".odt",
|
|
31301
|
+
".oga",
|
|
31302
|
+
".ogg",
|
|
31303
|
+
".ogv",
|
|
31304
|
+
".otf",
|
|
31305
|
+
".ott",
|
|
31306
|
+
".pages",
|
|
31307
|
+
".pbm",
|
|
31308
|
+
".pbf",
|
|
31309
|
+
".pcx",
|
|
31310
|
+
".pdb",
|
|
31311
|
+
".pdf",
|
|
31312
|
+
".pea",
|
|
31313
|
+
".pgm",
|
|
31314
|
+
".pic",
|
|
31315
|
+
".png",
|
|
31316
|
+
".pnm",
|
|
31317
|
+
".pot",
|
|
31318
|
+
".potm",
|
|
31319
|
+
".potx",
|
|
31320
|
+
".ppa",
|
|
31321
|
+
".ppam",
|
|
31322
|
+
".ppm",
|
|
31323
|
+
".pps",
|
|
31324
|
+
".ppsm",
|
|
31325
|
+
".ppsx",
|
|
31326
|
+
".ppt",
|
|
31327
|
+
".pptm",
|
|
31328
|
+
".pptx",
|
|
31329
|
+
".psd",
|
|
31330
|
+
".pxd",
|
|
31331
|
+
".pxz",
|
|
31332
|
+
".pya",
|
|
31333
|
+
".pyc",
|
|
31334
|
+
".pyo",
|
|
31335
|
+
".pyv",
|
|
31336
|
+
".qt",
|
|
31337
|
+
".rar",
|
|
31338
|
+
".ras",
|
|
31339
|
+
".raw",
|
|
31340
|
+
".resources",
|
|
31341
|
+
".rgb",
|
|
31342
|
+
".rip",
|
|
31343
|
+
".rlc",
|
|
31344
|
+
".rmf",
|
|
31345
|
+
".rmvb",
|
|
31346
|
+
".rpm",
|
|
31347
|
+
".rtf",
|
|
31348
|
+
".rz",
|
|
31349
|
+
".s3m",
|
|
31350
|
+
".s7z",
|
|
31351
|
+
".scpt",
|
|
31352
|
+
".sgi",
|
|
31353
|
+
".shar",
|
|
31354
|
+
".snap",
|
|
31355
|
+
".sil",
|
|
31356
|
+
".sketch",
|
|
31357
|
+
".slk",
|
|
31358
|
+
".smv",
|
|
31359
|
+
".snk",
|
|
31360
|
+
".so",
|
|
31361
|
+
".stl",
|
|
31362
|
+
".suo",
|
|
31363
|
+
".sub",
|
|
31364
|
+
".swf",
|
|
31365
|
+
".tar",
|
|
31366
|
+
".tbz",
|
|
31367
|
+
".tbz2",
|
|
31368
|
+
".tga",
|
|
31369
|
+
".tgz",
|
|
31370
|
+
".thmx",
|
|
31371
|
+
".tif",
|
|
31372
|
+
".tiff",
|
|
31373
|
+
".tlz",
|
|
31374
|
+
".ttc",
|
|
31375
|
+
".ttf",
|
|
31376
|
+
".txz",
|
|
31377
|
+
".udf",
|
|
31378
|
+
".uvh",
|
|
31379
|
+
".uvi",
|
|
31380
|
+
".uvm",
|
|
31381
|
+
".uvp",
|
|
31382
|
+
".uvs",
|
|
31383
|
+
".uvu",
|
|
31384
|
+
".viv",
|
|
31385
|
+
".vob",
|
|
31386
|
+
".war",
|
|
31387
|
+
".wav",
|
|
31388
|
+
".wax",
|
|
31389
|
+
".wbmp",
|
|
31390
|
+
".wdp",
|
|
31391
|
+
".weba",
|
|
31392
|
+
".webm",
|
|
31393
|
+
".webp",
|
|
31394
|
+
".whl",
|
|
31395
|
+
".wim",
|
|
31396
|
+
".wm",
|
|
31397
|
+
".wma",
|
|
31398
|
+
".wmv",
|
|
31399
|
+
".wmx",
|
|
31400
|
+
".woff",
|
|
31401
|
+
".woff2",
|
|
31402
|
+
".wrm",
|
|
31403
|
+
".wvx",
|
|
31404
|
+
".xbm",
|
|
31405
|
+
".xif",
|
|
31406
|
+
".xla",
|
|
31407
|
+
".xlam",
|
|
31408
|
+
".xls",
|
|
31409
|
+
".xlsb",
|
|
31410
|
+
".xlsm",
|
|
31411
|
+
".xlsx",
|
|
31412
|
+
".xlt",
|
|
31413
|
+
".xltm",
|
|
31414
|
+
".xltx",
|
|
31415
|
+
".xm",
|
|
31416
|
+
".xmind",
|
|
31417
|
+
".xpi",
|
|
31418
|
+
".xpm",
|
|
31419
|
+
".xwd",
|
|
31420
|
+
".xz",
|
|
31421
|
+
".z",
|
|
31422
|
+
".zip",
|
|
31423
|
+
".zipx"
|
|
31424
|
+
]);
|
|
31425
|
+
function isBinaryPath(path) {
|
|
31426
|
+
return binaryExtensions.has((0, path_1.extname)(path).toLowerCase());
|
|
31427
|
+
}
|
|
31428
|
+
exports.isBinaryPath = isBinaryPath;
|
|
31429
|
+
}
|
|
31430
|
+
});
|
|
31431
|
+
|
|
31432
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/generators/generate-files.js
|
|
31433
|
+
var require_generate_files2 = __commonJS({
|
|
31434
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/generators/generate-files.js"(exports) {
|
|
31435
|
+
"use strict";
|
|
31436
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31437
|
+
exports.generateFiles = void 0;
|
|
31438
|
+
var fs_1 = require("fs");
|
|
31439
|
+
var path = require("path");
|
|
31440
|
+
var nx_1 = require_nx2();
|
|
31441
|
+
var binary_extensions_1 = require_binary_extensions2();
|
|
31442
|
+
var { logger } = (0, nx_1.requireNx)();
|
|
31443
|
+
function generateFiles2(tree, srcFolder, target, substitutions) {
|
|
31444
|
+
const ejs = require_ejs();
|
|
31445
|
+
const files = allFilesInDir(srcFolder);
|
|
31446
|
+
if (files.length === 0) {
|
|
31447
|
+
throw new Error(`generateFiles: No files found in "${srcFolder}". Are you sure you specified the correct path?`);
|
|
31448
|
+
} else {
|
|
31449
|
+
files.forEach((filePath) => {
|
|
31450
|
+
let newContent;
|
|
31451
|
+
const computedPath = computePath(srcFolder, target, filePath, substitutions);
|
|
31452
|
+
if ((0, binary_extensions_1.isBinaryPath)(filePath)) {
|
|
31453
|
+
newContent = (0, fs_1.readFileSync)(filePath);
|
|
31454
|
+
} else {
|
|
31455
|
+
const template = (0, fs_1.readFileSync)(filePath, "utf-8");
|
|
31456
|
+
try {
|
|
31457
|
+
newContent = ejs.render(template, substitutions, {
|
|
31458
|
+
filename: filePath
|
|
31459
|
+
});
|
|
31460
|
+
} catch (e) {
|
|
31461
|
+
logger.error(`Error in ${filePath.replace(`${tree.root}/`, "")}:`);
|
|
31462
|
+
throw e;
|
|
31463
|
+
}
|
|
31464
|
+
}
|
|
31465
|
+
tree.write(computedPath, newContent);
|
|
31466
|
+
});
|
|
31467
|
+
}
|
|
31468
|
+
}
|
|
31469
|
+
exports.generateFiles = generateFiles2;
|
|
31470
|
+
function computePath(srcFolder, target, filePath, substitutions) {
|
|
31471
|
+
const relativeFromSrcFolder = path.relative(srcFolder, filePath);
|
|
31472
|
+
let computedPath = path.join(target, relativeFromSrcFolder);
|
|
31473
|
+
if (computedPath.endsWith(".template")) {
|
|
31474
|
+
computedPath = computedPath.substring(0, computedPath.length - 9);
|
|
31475
|
+
}
|
|
31476
|
+
Object.entries(substitutions).forEach(([propertyName, value]) => {
|
|
31477
|
+
computedPath = computedPath.split(`__${propertyName}__`).join(value);
|
|
31478
|
+
});
|
|
31479
|
+
return computedPath;
|
|
31480
|
+
}
|
|
31481
|
+
function allFilesInDir(parent) {
|
|
31482
|
+
let res = [];
|
|
31483
|
+
try {
|
|
31484
|
+
(0, fs_1.readdirSync)(parent).forEach((c) => {
|
|
31485
|
+
const child = path.join(parent, c);
|
|
31486
|
+
try {
|
|
31487
|
+
const s = (0, fs_1.statSync)(child);
|
|
31488
|
+
if (!s.isDirectory()) {
|
|
31489
|
+
res.push(child);
|
|
31490
|
+
} else if (s.isDirectory()) {
|
|
31491
|
+
res = [...res, ...allFilesInDir(child)];
|
|
31492
|
+
}
|
|
31493
|
+
} catch {
|
|
31494
|
+
}
|
|
31495
|
+
});
|
|
31496
|
+
} catch {
|
|
31497
|
+
}
|
|
31498
|
+
return res;
|
|
31499
|
+
}
|
|
31500
|
+
}
|
|
31501
|
+
});
|
|
31502
|
+
|
|
31503
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/versions.js
|
|
31504
|
+
var require_versions2 = __commonJS({
|
|
31505
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/versions.js"(exports) {
|
|
31506
|
+
"use strict";
|
|
31507
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31508
|
+
exports.typescriptVersion = void 0;
|
|
31509
|
+
exports.typescriptVersion = "~5.1.3";
|
|
31510
|
+
}
|
|
31511
|
+
});
|
|
31512
|
+
|
|
31513
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/tasks/install-packages-task.js
|
|
31514
|
+
var require_install_packages_task2 = __commonJS({
|
|
31515
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/tasks/install-packages-task.js"(exports) {
|
|
31516
|
+
"use strict";
|
|
31517
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31518
|
+
exports.installPackagesTask = void 0;
|
|
31519
|
+
var child_process_1 = require("child_process");
|
|
31520
|
+
var path_1 = require("path");
|
|
31521
|
+
var nx_1 = require_nx2();
|
|
31522
|
+
var { detectPackageManager, getPackageManagerCommand, joinPathFragments: joinPathFragments3 } = (0, nx_1.requireNx)();
|
|
31523
|
+
function installPackagesTask(tree, alwaysRun = false, cwd = "", packageManager = detectPackageManager(cwd)) {
|
|
31524
|
+
if (!tree.listChanges().find((f) => f.path === joinPathFragments3(cwd, "package.json")) && !alwaysRun) {
|
|
31525
|
+
return;
|
|
31526
|
+
}
|
|
31527
|
+
const packageJsonValue = tree.read(joinPathFragments3(cwd, "package.json"), "utf-8");
|
|
31528
|
+
let storedPackageJsonValue = global["__packageJsonInstallCache__"];
|
|
31529
|
+
if (storedPackageJsonValue != packageJsonValue || alwaysRun) {
|
|
31530
|
+
global["__packageJsonInstallCache__"] = packageJsonValue;
|
|
31531
|
+
const pmc = getPackageManagerCommand(packageManager);
|
|
31532
|
+
const execSyncOptions = {
|
|
31533
|
+
cwd: (0, path_1.join)(tree.root, cwd),
|
|
31534
|
+
stdio: process.env.NX_GENERATE_QUIET === "true" ? "ignore" : "inherit"
|
|
31535
|
+
};
|
|
31536
|
+
if (process.env.npm_config_registry && process.env.npm_config_registry.match(/^https:\/\/registry\.(npmjs\.org|yarnpkg\.com)/)) {
|
|
31537
|
+
delete process.env.npm_config_registry;
|
|
31538
|
+
}
|
|
31539
|
+
(0, child_process_1.execSync)(pmc.install, execSyncOptions);
|
|
31540
|
+
}
|
|
31541
|
+
}
|
|
31542
|
+
exports.installPackagesTask = installPackagesTask;
|
|
31543
|
+
}
|
|
31544
|
+
});
|
|
31545
|
+
|
|
31546
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/package-json.js
|
|
31547
|
+
var require_package_json2 = __commonJS({
|
|
31548
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/package-json.js"(exports) {
|
|
31549
|
+
"use strict";
|
|
31550
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31551
|
+
exports.NX_VERSION = exports.ensurePackage = exports.removeDependenciesFromPackageJson = exports.addDependenciesToPackageJson = void 0;
|
|
31552
|
+
var child_process_1 = require("child_process");
|
|
31553
|
+
var module_1 = require("module");
|
|
31554
|
+
var semver_1 = require_semver2();
|
|
31555
|
+
var install_packages_task_1 = require_install_packages_task2();
|
|
31556
|
+
var nx_1 = require_nx2();
|
|
31557
|
+
var tmp_1 = require_tmp();
|
|
31558
|
+
var path_1 = require("path");
|
|
31559
|
+
var fs_1 = require("fs");
|
|
31560
|
+
var { readJson: readJson2, updateJson: updateJson2, getPackageManagerCommand, workspaceRoot, detectPackageManager, createTempNpmDirectory, getPackageManagerVersion } = (0, nx_1.requireNx)();
|
|
31561
|
+
var UNIDENTIFIED_VERSION = "UNIDENTIFIED_VERSION";
|
|
31562
|
+
var NON_SEMVER_TAGS = {
|
|
31563
|
+
"*": 2,
|
|
31564
|
+
[UNIDENTIFIED_VERSION]: 2,
|
|
31565
|
+
next: 1,
|
|
31566
|
+
latest: 0,
|
|
31567
|
+
previous: -1,
|
|
31568
|
+
legacy: -2
|
|
31569
|
+
};
|
|
31570
|
+
function filterExistingDependencies(dependencies, existingAltDependencies) {
|
|
31571
|
+
if (!existingAltDependencies) {
|
|
31572
|
+
return dependencies;
|
|
31573
|
+
}
|
|
31574
|
+
return Object.keys(dependencies ?? {}).filter((d) => !existingAltDependencies[d]).reduce((acc, d) => ({ ...acc, [d]: dependencies[d] }), {});
|
|
31575
|
+
}
|
|
31576
|
+
function cleanSemver(version) {
|
|
31577
|
+
return (0, semver_1.clean)(version) ?? (0, semver_1.coerce)(version);
|
|
31578
|
+
}
|
|
31579
|
+
function isIncomingVersionGreater(incomingVersion, existingVersion) {
|
|
31580
|
+
const incomingVersionCompareBy = incomingVersion in NON_SEMVER_TAGS ? incomingVersion : cleanSemver(incomingVersion)?.toString() ?? UNIDENTIFIED_VERSION;
|
|
31581
|
+
const existingVersionCompareBy = existingVersion in NON_SEMVER_TAGS ? existingVersion : cleanSemver(existingVersion)?.toString() ?? UNIDENTIFIED_VERSION;
|
|
31582
|
+
if (incomingVersionCompareBy in NON_SEMVER_TAGS && existingVersionCompareBy in NON_SEMVER_TAGS) {
|
|
31583
|
+
return NON_SEMVER_TAGS[incomingVersionCompareBy] > NON_SEMVER_TAGS[existingVersionCompareBy];
|
|
31584
|
+
}
|
|
31585
|
+
if (incomingVersionCompareBy in NON_SEMVER_TAGS || existingVersionCompareBy in NON_SEMVER_TAGS) {
|
|
31586
|
+
return true;
|
|
31587
|
+
}
|
|
31588
|
+
return (0, semver_1.gt)(cleanSemver(incomingVersion), cleanSemver(existingVersion));
|
|
31589
|
+
}
|
|
31590
|
+
function updateExistingAltDependenciesVersion(dependencies, existingAltDependencies) {
|
|
31591
|
+
return Object.keys(existingAltDependencies || {}).filter((d) => {
|
|
31592
|
+
if (!dependencies[d]) {
|
|
31593
|
+
return false;
|
|
31594
|
+
}
|
|
31595
|
+
const incomingVersion = dependencies[d];
|
|
31596
|
+
const existingVersion = existingAltDependencies[d];
|
|
31597
|
+
return isIncomingVersionGreater(incomingVersion, existingVersion);
|
|
31598
|
+
}).reduce((acc, d) => ({ ...acc, [d]: dependencies[d] }), {});
|
|
31599
|
+
}
|
|
31600
|
+
function updateExistingDependenciesVersion(dependencies, existingDependencies = {}) {
|
|
31601
|
+
return Object.keys(dependencies).filter((d) => {
|
|
31602
|
+
if (!existingDependencies[d]) {
|
|
31603
|
+
return true;
|
|
31604
|
+
}
|
|
31605
|
+
const incomingVersion = dependencies[d];
|
|
31606
|
+
const existingVersion = existingDependencies[d];
|
|
31607
|
+
return isIncomingVersionGreater(incomingVersion, existingVersion);
|
|
31608
|
+
}).reduce((acc, d) => ({ ...acc, [d]: dependencies[d] }), {});
|
|
31609
|
+
}
|
|
31610
|
+
function addDependenciesToPackageJson2(tree, dependencies, devDependencies, packageJsonPath = "package.json") {
|
|
31611
|
+
const currentPackageJson = readJson2(tree, packageJsonPath);
|
|
31612
|
+
let filteredDependencies = filterExistingDependencies(dependencies, currentPackageJson.devDependencies);
|
|
31613
|
+
let filteredDevDependencies = filterExistingDependencies(devDependencies, currentPackageJson.dependencies);
|
|
31614
|
+
filteredDependencies = {
|
|
31615
|
+
...updateExistingDependenciesVersion(filteredDependencies, currentPackageJson.dependencies),
|
|
31616
|
+
...updateExistingAltDependenciesVersion(devDependencies, currentPackageJson.dependencies)
|
|
31617
|
+
};
|
|
31618
|
+
filteredDevDependencies = {
|
|
31619
|
+
...updateExistingDependenciesVersion(filteredDevDependencies, currentPackageJson.devDependencies),
|
|
31620
|
+
...updateExistingAltDependenciesVersion(dependencies, currentPackageJson.devDependencies)
|
|
31621
|
+
};
|
|
31622
|
+
filteredDependencies = removeLowerVersions(filteredDependencies, currentPackageJson.dependencies);
|
|
31623
|
+
filteredDevDependencies = removeLowerVersions(filteredDevDependencies, currentPackageJson.devDependencies);
|
|
31624
|
+
if (requiresAddingOfPackages(currentPackageJson, filteredDependencies, filteredDevDependencies)) {
|
|
31625
|
+
updateJson2(tree, packageJsonPath, (json) => {
|
|
31626
|
+
json.dependencies = {
|
|
31627
|
+
...json.dependencies || {},
|
|
31628
|
+
...filteredDependencies
|
|
31629
|
+
};
|
|
31630
|
+
json.devDependencies = {
|
|
31631
|
+
...json.devDependencies || {},
|
|
31632
|
+
...filteredDevDependencies
|
|
31633
|
+
};
|
|
31634
|
+
json.dependencies = sortObjectByKeys(json.dependencies);
|
|
31635
|
+
json.devDependencies = sortObjectByKeys(json.devDependencies);
|
|
31636
|
+
return json;
|
|
31637
|
+
});
|
|
31638
|
+
return () => {
|
|
31639
|
+
(0, install_packages_task_1.installPackagesTask)(tree);
|
|
31640
|
+
};
|
|
31641
|
+
}
|
|
31642
|
+
return () => {
|
|
31643
|
+
};
|
|
31644
|
+
}
|
|
31645
|
+
exports.addDependenciesToPackageJson = addDependenciesToPackageJson2;
|
|
31646
|
+
function removeLowerVersions(incomingDeps, existingDeps) {
|
|
31647
|
+
return Object.keys(incomingDeps).reduce((acc, d) => {
|
|
31648
|
+
if (existingDeps?.[d] && !isIncomingVersionGreater(incomingDeps[d], existingDeps[d])) {
|
|
31649
|
+
return acc;
|
|
31650
|
+
}
|
|
31651
|
+
return { ...acc, [d]: incomingDeps[d] };
|
|
31652
|
+
}, {});
|
|
31653
|
+
}
|
|
31654
|
+
function removeDependenciesFromPackageJson(tree, dependencies, devDependencies, packageJsonPath = "package.json") {
|
|
31655
|
+
const currentPackageJson = readJson2(tree, packageJsonPath);
|
|
31656
|
+
if (requiresRemovingOfPackages(currentPackageJson, dependencies, devDependencies)) {
|
|
31657
|
+
updateJson2(tree, packageJsonPath, (json) => {
|
|
31658
|
+
for (const dep of dependencies) {
|
|
31659
|
+
delete json.dependencies[dep];
|
|
31660
|
+
}
|
|
31661
|
+
for (const devDep of devDependencies) {
|
|
31662
|
+
delete json.devDependencies[devDep];
|
|
31663
|
+
}
|
|
31664
|
+
json.dependencies = sortObjectByKeys(json.dependencies);
|
|
31665
|
+
json.devDependencies = sortObjectByKeys(json.devDependencies);
|
|
31666
|
+
return json;
|
|
31667
|
+
});
|
|
31668
|
+
}
|
|
31669
|
+
return () => {
|
|
31670
|
+
(0, install_packages_task_1.installPackagesTask)(tree);
|
|
31671
|
+
};
|
|
31672
|
+
}
|
|
31673
|
+
exports.removeDependenciesFromPackageJson = removeDependenciesFromPackageJson;
|
|
31674
|
+
function sortObjectByKeys(obj) {
|
|
31675
|
+
if (!obj || typeof obj !== "object" || Array.isArray(obj)) {
|
|
31676
|
+
return obj;
|
|
31677
|
+
}
|
|
31678
|
+
return Object.keys(obj).sort().reduce((result, key) => {
|
|
31679
|
+
return {
|
|
31680
|
+
...result,
|
|
31681
|
+
[key]: obj[key]
|
|
31682
|
+
};
|
|
31683
|
+
}, {});
|
|
31684
|
+
}
|
|
31685
|
+
function requiresAddingOfPackages(packageJsonFile, deps, devDeps) {
|
|
31686
|
+
let needsDepsUpdate = false;
|
|
31687
|
+
let needsDevDepsUpdate = false;
|
|
31688
|
+
packageJsonFile.dependencies = packageJsonFile.dependencies || {};
|
|
31689
|
+
packageJsonFile.devDependencies = packageJsonFile.devDependencies || {};
|
|
31690
|
+
if (Object.keys(deps).length > 0) {
|
|
31691
|
+
needsDepsUpdate = Object.keys(deps).some((entry) => {
|
|
31692
|
+
const incomingVersion = deps[entry];
|
|
31693
|
+
if (packageJsonFile.dependencies[entry]) {
|
|
31694
|
+
const existingVersion = packageJsonFile.dependencies[entry];
|
|
31695
|
+
return isIncomingVersionGreater(incomingVersion, existingVersion);
|
|
31696
|
+
}
|
|
31697
|
+
if (packageJsonFile.devDependencies[entry]) {
|
|
31698
|
+
const existingVersion = packageJsonFile.devDependencies[entry];
|
|
31699
|
+
return isIncomingVersionGreater(incomingVersion, existingVersion);
|
|
31700
|
+
}
|
|
31701
|
+
return true;
|
|
31702
|
+
});
|
|
31703
|
+
}
|
|
31704
|
+
if (Object.keys(devDeps).length > 0) {
|
|
31705
|
+
needsDevDepsUpdate = Object.keys(devDeps).some((entry) => {
|
|
31706
|
+
const incomingVersion = devDeps[entry];
|
|
31707
|
+
if (packageJsonFile.devDependencies[entry]) {
|
|
31708
|
+
const existingVersion = packageJsonFile.devDependencies[entry];
|
|
31709
|
+
return isIncomingVersionGreater(incomingVersion, existingVersion);
|
|
31710
|
+
}
|
|
31711
|
+
if (packageJsonFile.dependencies[entry]) {
|
|
31712
|
+
const existingVersion = packageJsonFile.dependencies[entry];
|
|
31713
|
+
return isIncomingVersionGreater(incomingVersion, existingVersion);
|
|
31714
|
+
}
|
|
31715
|
+
return true;
|
|
31716
|
+
});
|
|
31717
|
+
}
|
|
31718
|
+
return needsDepsUpdate || needsDevDepsUpdate;
|
|
31719
|
+
}
|
|
31720
|
+
function requiresRemovingOfPackages(packageJsonFile, deps, devDeps) {
|
|
31721
|
+
let needsDepsUpdate = false;
|
|
31722
|
+
let needsDevDepsUpdate = false;
|
|
31723
|
+
packageJsonFile.dependencies = packageJsonFile.dependencies || {};
|
|
31724
|
+
packageJsonFile.devDependencies = packageJsonFile.devDependencies || {};
|
|
31725
|
+
if (deps.length > 0) {
|
|
31726
|
+
needsDepsUpdate = deps.some((entry) => packageJsonFile.dependencies[entry]);
|
|
31727
|
+
}
|
|
31728
|
+
if (devDeps.length > 0) {
|
|
31729
|
+
needsDevDepsUpdate = devDeps.some((entry) => packageJsonFile.devDependencies[entry]);
|
|
31730
|
+
}
|
|
31731
|
+
return needsDepsUpdate || needsDevDepsUpdate;
|
|
31732
|
+
}
|
|
31733
|
+
var packageMapCache = /* @__PURE__ */ new Map();
|
|
31734
|
+
function ensurePackage2(pkgOrTree, requiredVersionOrPackage, maybeRequiredVersion, _) {
|
|
31735
|
+
let pkg;
|
|
31736
|
+
let requiredVersion;
|
|
31737
|
+
if (typeof pkgOrTree === "string") {
|
|
31738
|
+
pkg = pkgOrTree;
|
|
31739
|
+
requiredVersion = requiredVersionOrPackage;
|
|
31740
|
+
} else {
|
|
31741
|
+
pkg = requiredVersionOrPackage;
|
|
31742
|
+
requiredVersion = maybeRequiredVersion;
|
|
31743
|
+
}
|
|
31744
|
+
if (packageMapCache.has(pkg)) {
|
|
31745
|
+
return packageMapCache.get(pkg);
|
|
31746
|
+
}
|
|
31747
|
+
try {
|
|
31748
|
+
return require(pkg);
|
|
31749
|
+
} catch (e) {
|
|
31750
|
+
if (e.code === "ERR_REQUIRE_ESM") {
|
|
31751
|
+
return null;
|
|
31752
|
+
} else if (e.code !== "MODULE_NOT_FOUND") {
|
|
31753
|
+
throw e;
|
|
31754
|
+
}
|
|
31755
|
+
}
|
|
31756
|
+
if (process.env.NX_DRY_RUN && process.env.NX_DRY_RUN !== "false") {
|
|
31757
|
+
throw new Error('NOTE: This generator does not support --dry-run. If you are running this in Nx Console, it should execute fine once you hit the "Run" button.\n');
|
|
31758
|
+
}
|
|
31759
|
+
const { dir: tempDir } = createTempNpmDirectory?.() ?? {
|
|
31760
|
+
dir: (0, tmp_1.dirSync)().name
|
|
31761
|
+
};
|
|
31762
|
+
console.log(`Fetching ${pkg}...`);
|
|
31763
|
+
const packageManager = detectPackageManager();
|
|
31764
|
+
const isVerbose = process.env.NX_VERBOSE_LOGGING === "true";
|
|
31765
|
+
generatePackageManagerFiles(tempDir, packageManager);
|
|
31766
|
+
const preInstallCommand = getPackageManagerCommand(packageManager).preInstall;
|
|
31767
|
+
if (preInstallCommand) {
|
|
31768
|
+
(0, child_process_1.execSync)(preInstallCommand, {
|
|
31769
|
+
cwd: tempDir,
|
|
31770
|
+
stdio: isVerbose ? "inherit" : "ignore"
|
|
31771
|
+
});
|
|
31772
|
+
}
|
|
31773
|
+
let addCommand = getPackageManagerCommand(packageManager).addDev;
|
|
31774
|
+
if (packageManager === "pnpm") {
|
|
31775
|
+
addCommand = "pnpm add -D";
|
|
31776
|
+
}
|
|
31777
|
+
(0, child_process_1.execSync)(`${addCommand} ${pkg}@${requiredVersion}`, {
|
|
31778
|
+
cwd: tempDir,
|
|
31779
|
+
stdio: isVerbose ? "inherit" : "ignore"
|
|
31780
|
+
});
|
|
31781
|
+
addToNodePath((0, path_1.join)(workspaceRoot, "node_modules"));
|
|
31782
|
+
addToNodePath((0, path_1.join)(tempDir, "node_modules"));
|
|
31783
|
+
module_1.Module._initPaths();
|
|
31784
|
+
try {
|
|
31785
|
+
const result = require(require.resolve(pkg, {
|
|
31786
|
+
paths: [tempDir]
|
|
31787
|
+
}));
|
|
31788
|
+
packageMapCache.set(pkg, result);
|
|
31789
|
+
return result;
|
|
31790
|
+
} catch (e) {
|
|
31791
|
+
if (e.code === "ERR_REQUIRE_ESM") {
|
|
31792
|
+
packageMapCache.set(pkg, null);
|
|
31793
|
+
return null;
|
|
31794
|
+
}
|
|
31795
|
+
throw e;
|
|
31796
|
+
}
|
|
31797
|
+
}
|
|
31798
|
+
exports.ensurePackage = ensurePackage2;
|
|
31799
|
+
function generatePackageManagerFiles(root, packageManager = detectPackageManager()) {
|
|
31800
|
+
const [pmMajor] = getPackageManagerVersion(packageManager).split(".");
|
|
31801
|
+
switch (packageManager) {
|
|
31802
|
+
case "yarn":
|
|
31803
|
+
if (+pmMajor >= 2) {
|
|
31804
|
+
(0, fs_1.writeFileSync)((0, path_1.join)(root, ".yarnrc.yml"), "nodeLinker: node-modules\nenableScripts: false");
|
|
31805
|
+
}
|
|
31806
|
+
break;
|
|
31807
|
+
}
|
|
31808
|
+
}
|
|
31809
|
+
function addToNodePath(dir) {
|
|
31810
|
+
const delimiter = require("os").platform() === "win32" ? ";" : ":";
|
|
31811
|
+
const paths = process.env.NODE_PATH ? process.env.NODE_PATH.split(delimiter) : [];
|
|
31812
|
+
if (paths.includes(dir)) {
|
|
31813
|
+
return;
|
|
31814
|
+
}
|
|
31815
|
+
paths.push(dir);
|
|
31816
|
+
process.env.NODE_PATH = paths.join(delimiter);
|
|
31817
|
+
}
|
|
31818
|
+
function getPackageVersion(pkg) {
|
|
31819
|
+
return require((0, path_1.join)(pkg, "package.json")).version;
|
|
31820
|
+
}
|
|
31821
|
+
exports.NX_VERSION = getPackageVersion("nx");
|
|
31822
|
+
}
|
|
31823
|
+
});
|
|
31824
|
+
|
|
31825
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/generators/to-js.js
|
|
31826
|
+
var require_to_js2 = __commonJS({
|
|
31827
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/generators/to-js.js"(exports) {
|
|
31828
|
+
"use strict";
|
|
31829
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31830
|
+
exports.toJS = void 0;
|
|
31831
|
+
var versions_1 = require_versions2();
|
|
31832
|
+
var package_json_1 = require_package_json2();
|
|
31833
|
+
function toJS(tree) {
|
|
31834
|
+
const { JsxEmit, ScriptTarget, transpile } = (0, package_json_1.ensurePackage)("typescript", versions_1.typescriptVersion);
|
|
31835
|
+
for (const c of tree.listChanges()) {
|
|
31836
|
+
if ((c.path.endsWith(".ts") || c.path.endsWith("tsx")) && c.type === "CREATE") {
|
|
31837
|
+
tree.write(c.path, transpile(c.content.toString("utf-8"), {
|
|
31838
|
+
allowJs: true,
|
|
31839
|
+
jsx: JsxEmit.Preserve,
|
|
31840
|
+
target: ScriptTarget.ESNext
|
|
31841
|
+
}));
|
|
31842
|
+
tree.rename(c.path, c.path.replace(/\.tsx?$/, ".js"));
|
|
31843
|
+
}
|
|
31844
|
+
}
|
|
31845
|
+
}
|
|
31846
|
+
exports.toJS = toJS;
|
|
31847
|
+
}
|
|
31848
|
+
});
|
|
31849
|
+
|
|
31850
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/generators/update-ts-configs-to-js.js
|
|
31851
|
+
var require_update_ts_configs_to_js2 = __commonJS({
|
|
31852
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/generators/update-ts-configs-to-js.js"(exports) {
|
|
31853
|
+
"use strict";
|
|
31854
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31855
|
+
exports.updateTsConfigsToJs = void 0;
|
|
31856
|
+
var nx_1 = require_nx2();
|
|
31857
|
+
var { updateJson: updateJson2 } = (0, nx_1.requireNx)();
|
|
31858
|
+
function updateTsConfigsToJs(tree, options) {
|
|
31859
|
+
let updateConfigPath;
|
|
31860
|
+
const paths = {
|
|
31861
|
+
tsConfig: `${options.projectRoot}/tsconfig.json`,
|
|
31862
|
+
tsConfigLib: `${options.projectRoot}/tsconfig.lib.json`,
|
|
31863
|
+
tsConfigApp: `${options.projectRoot}/tsconfig.app.json`
|
|
31864
|
+
};
|
|
31865
|
+
const getProjectType = (tree2) => {
|
|
31866
|
+
if (tree2.exists(paths.tsConfigApp)) {
|
|
31867
|
+
return "application";
|
|
31868
|
+
}
|
|
31869
|
+
if (tree2.exists(paths.tsConfigLib)) {
|
|
31870
|
+
return "library";
|
|
31871
|
+
}
|
|
31872
|
+
throw new Error(`project is missing tsconfig.lib.json or tsconfig.app.json`);
|
|
31873
|
+
};
|
|
31874
|
+
updateJson2(tree, paths.tsConfig, (json) => {
|
|
31875
|
+
if (json.compilerOptions) {
|
|
31876
|
+
json.compilerOptions.allowJs = true;
|
|
31877
|
+
} else {
|
|
31878
|
+
json.compilerOptions = { allowJs: true };
|
|
31879
|
+
}
|
|
31880
|
+
return json;
|
|
31881
|
+
});
|
|
31882
|
+
const projectType = getProjectType(tree);
|
|
31883
|
+
if (projectType === "library") {
|
|
31884
|
+
updateConfigPath = paths.tsConfigLib;
|
|
31885
|
+
}
|
|
31886
|
+
if (projectType === "application") {
|
|
31887
|
+
updateConfigPath = paths.tsConfigApp;
|
|
31888
|
+
}
|
|
31889
|
+
updateJson2(tree, updateConfigPath, (json) => {
|
|
31890
|
+
json.include = uniq([...json.include, "src/**/*.js"]);
|
|
31891
|
+
json.exclude = uniq([
|
|
31892
|
+
...json.exclude,
|
|
31893
|
+
"src/**/*.spec.js",
|
|
31894
|
+
"src/**/*.test.js"
|
|
31895
|
+
]);
|
|
31896
|
+
return json;
|
|
31897
|
+
});
|
|
31898
|
+
}
|
|
31899
|
+
exports.updateTsConfigsToJs = updateTsConfigsToJs;
|
|
31900
|
+
var uniq = (value) => [...new Set(value)];
|
|
31901
|
+
}
|
|
31902
|
+
});
|
|
31903
|
+
|
|
31904
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/generators/run-tasks-in-serial.js
|
|
31905
|
+
var require_run_tasks_in_serial2 = __commonJS({
|
|
31906
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/generators/run-tasks-in-serial.js"(exports) {
|
|
31907
|
+
"use strict";
|
|
31908
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31909
|
+
exports.runTasksInSerial = void 0;
|
|
31910
|
+
function runTasksInSerial(...tasks) {
|
|
31911
|
+
return async () => {
|
|
31912
|
+
for (const task of tasks) {
|
|
31913
|
+
await task();
|
|
31914
|
+
}
|
|
31915
|
+
};
|
|
31916
|
+
}
|
|
31917
|
+
exports.runTasksInSerial = runTasksInSerial;
|
|
31918
|
+
}
|
|
31919
|
+
});
|
|
31920
|
+
|
|
31921
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/generators/visit-not-ignored-files.js
|
|
31922
|
+
var require_visit_not_ignored_files2 = __commonJS({
|
|
31923
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/generators/visit-not-ignored-files.js"(exports) {
|
|
31924
|
+
"use strict";
|
|
31925
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31926
|
+
exports.visitNotIgnoredFiles = void 0;
|
|
31927
|
+
var ignore_1 = require_ignore();
|
|
31928
|
+
var path_1 = require("path");
|
|
31929
|
+
function visitNotIgnoredFiles(tree, dirPath = tree.root, visitor) {
|
|
31930
|
+
let ig;
|
|
31931
|
+
if (tree.exists(".gitignore")) {
|
|
31932
|
+
ig = (0, ignore_1.default)();
|
|
31933
|
+
ig.add(".git");
|
|
31934
|
+
ig.add(tree.read(".gitignore", "utf-8"));
|
|
31935
|
+
}
|
|
31936
|
+
if (tree.exists(".nxignore")) {
|
|
31937
|
+
ig ??= (0, ignore_1.default)();
|
|
31938
|
+
ig.add(tree.read(".nxignore", "utf-8"));
|
|
31939
|
+
}
|
|
31940
|
+
dirPath = normalizePathRelativeToRoot(dirPath, tree.root);
|
|
31941
|
+
if (dirPath !== "" && ig?.ignores(dirPath)) {
|
|
31942
|
+
return;
|
|
31943
|
+
}
|
|
31944
|
+
for (const child of tree.children(dirPath)) {
|
|
31945
|
+
const fullPath = (0, path_1.join)(dirPath, child);
|
|
31946
|
+
if (ig?.ignores(fullPath)) {
|
|
31947
|
+
continue;
|
|
31948
|
+
}
|
|
31949
|
+
if (tree.isFile(fullPath)) {
|
|
31950
|
+
visitor(fullPath);
|
|
31951
|
+
} else {
|
|
31952
|
+
visitNotIgnoredFiles(tree, fullPath, visitor);
|
|
31953
|
+
}
|
|
31954
|
+
}
|
|
31955
|
+
}
|
|
31956
|
+
exports.visitNotIgnoredFiles = visitNotIgnoredFiles;
|
|
31957
|
+
function normalizePathRelativeToRoot(path, root) {
|
|
31958
|
+
return (0, path_1.relative)(root, (0, path_1.join)(root, path)).split(path_1.sep).join("/");
|
|
31959
|
+
}
|
|
31960
|
+
}
|
|
31961
|
+
});
|
|
31962
|
+
|
|
31963
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/executors/parse-target-string.js
|
|
31964
|
+
var require_parse_target_string2 = __commonJS({
|
|
31965
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/executors/parse-target-string.js"(exports) {
|
|
31966
|
+
"use strict";
|
|
31967
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31968
|
+
exports.targetToTargetString = exports.parseTargetString = void 0;
|
|
31969
|
+
var nx_1 = require_nx2();
|
|
31970
|
+
var { readCachedProjectGraph, splitTarget, splitByColons } = (0, nx_1.requireNx)();
|
|
31971
|
+
splitTarget = splitTarget ?? require("nx/src/utils/split-target").splitTarget;
|
|
31972
|
+
splitByColons = splitByColons ?? ((s) => s.split(":"));
|
|
31973
|
+
function parseTargetString(targetString, projectGraphOrCtx) {
|
|
31974
|
+
let projectGraph = projectGraphOrCtx && "projectGraph" in projectGraphOrCtx ? projectGraphOrCtx.projectGraph : projectGraphOrCtx;
|
|
31975
|
+
if (!projectGraph) {
|
|
31976
|
+
try {
|
|
31977
|
+
projectGraph = readCachedProjectGraph();
|
|
31978
|
+
} catch (e) {
|
|
31979
|
+
projectGraph = { nodes: {} };
|
|
31980
|
+
}
|
|
31981
|
+
}
|
|
31982
|
+
const [maybeProject] = splitByColons(targetString);
|
|
31983
|
+
if (!projectGraph.nodes[maybeProject] && projectGraphOrCtx && "projectName" in projectGraphOrCtx) {
|
|
31984
|
+
targetString = `${projectGraphOrCtx.projectName}:${targetString}`;
|
|
31985
|
+
}
|
|
31986
|
+
const [project, target, configuration] = splitTarget(targetString, projectGraph);
|
|
31987
|
+
if (!project || !target) {
|
|
31988
|
+
throw new Error(`Invalid Target String: ${targetString}`);
|
|
31989
|
+
}
|
|
31990
|
+
return {
|
|
31991
|
+
project,
|
|
31992
|
+
target,
|
|
31993
|
+
configuration
|
|
31994
|
+
};
|
|
31995
|
+
}
|
|
31996
|
+
exports.parseTargetString = parseTargetString;
|
|
31997
|
+
function targetToTargetString({ project, target, configuration }) {
|
|
31998
|
+
return `${project}:${target.indexOf(":") > -1 ? `"${target}"` : target}${configuration !== void 0 ? ":" + configuration : ""}`;
|
|
31999
|
+
}
|
|
32000
|
+
exports.targetToTargetString = targetToTargetString;
|
|
32001
|
+
}
|
|
32002
|
+
});
|
|
32003
|
+
|
|
32004
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/executors/read-target-options.js
|
|
32005
|
+
var require_read_target_options2 = __commonJS({
|
|
32006
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/executors/read-target-options.js"(exports) {
|
|
32007
|
+
"use strict";
|
|
32008
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32009
|
+
exports.readTargetOptions = void 0;
|
|
32010
|
+
var nx_1 = require_nx2();
|
|
32011
|
+
var path_1 = require("path");
|
|
32012
|
+
var { Workspaces, getExecutorInformation, calculateDefaultProjectName, combineOptionsForExecutor } = (0, nx_1.requireNx)();
|
|
32013
|
+
combineOptionsForExecutor = combineOptionsForExecutor ?? require("nx/src/utils/params").combineOptionsForExecutor;
|
|
32014
|
+
function readTargetOptions({ project, target, configuration }, context) {
|
|
32015
|
+
const projectConfiguration = (context.workspace || context.projectsConfigurations).projects[project];
|
|
32016
|
+
if (!projectConfiguration) {
|
|
32017
|
+
throw new Error(`Unable to find project ${project}`);
|
|
32018
|
+
}
|
|
32019
|
+
const targetConfiguration = projectConfiguration.targets[target];
|
|
32020
|
+
const ws = new Workspaces(context.root);
|
|
32021
|
+
const [nodeModule, executorName] = targetConfiguration.executor.split(":");
|
|
32022
|
+
const { schema } = getExecutorInformation ? getExecutorInformation(nodeModule, executorName, context.root) : (
|
|
32023
|
+
// TODO(v18): remove readExecutor. This is to be backwards compatible with Nx 16.5 and below.
|
|
32024
|
+
ws.readExecutor(nodeModule, executorName)
|
|
32025
|
+
);
|
|
32026
|
+
const defaultProject = calculateDefaultProjectName ? calculateDefaultProjectName(context.cwd, context.root, { version: 2, projects: context.projectsConfigurations.projects }, context.nxJsonConfiguration) : (
|
|
32027
|
+
// TODO(v18): remove calculateDefaultProjectName. This is to be backwards compatible with Nx 16.5 and below.
|
|
32028
|
+
ws.calculateDefaultProjectName(context.cwd, { version: 2, projects: context.projectsConfigurations.projects }, context.nxJsonConfiguration)
|
|
32029
|
+
);
|
|
32030
|
+
return combineOptionsForExecutor({}, configuration ?? targetConfiguration.defaultConfiguration ?? "", targetConfiguration, schema, defaultProject, (0, path_1.relative)(context.root, context.cwd));
|
|
32031
|
+
}
|
|
32032
|
+
exports.readTargetOptions = readTargetOptions;
|
|
32033
|
+
}
|
|
32034
|
+
});
|
|
32035
|
+
|
|
32036
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/names.js
|
|
32037
|
+
var require_names2 = __commonJS({
|
|
32038
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/names.js"(exports) {
|
|
32039
|
+
"use strict";
|
|
32040
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32041
|
+
exports.names = void 0;
|
|
32042
|
+
function names3(name) {
|
|
32043
|
+
return {
|
|
32044
|
+
name,
|
|
32045
|
+
className: toClassName(name),
|
|
32046
|
+
propertyName: toPropertyName(name),
|
|
32047
|
+
constantName: toConstantName(name),
|
|
32048
|
+
fileName: toFileName(name)
|
|
32049
|
+
};
|
|
32050
|
+
}
|
|
32051
|
+
exports.names = names3;
|
|
32052
|
+
function toClassName(str) {
|
|
32053
|
+
return toCapitalCase(toPropertyName(str));
|
|
32054
|
+
}
|
|
32055
|
+
function toPropertyName(s) {
|
|
32056
|
+
return s.replace(/([^a-zA-Z0-9])+(.)?/g, (_, __, chr) => chr ? chr.toUpperCase() : "").replace(/[^a-zA-Z\d]/g, "").replace(/^([A-Z])/, (m) => m.toLowerCase());
|
|
32057
|
+
}
|
|
32058
|
+
function toConstantName(s) {
|
|
32059
|
+
const normalizedS = s.toUpperCase() === s ? s.toLowerCase() : s;
|
|
32060
|
+
return toFileName(toPropertyName(normalizedS)).replace(/([^a-zA-Z0-9])/g, "_").toUpperCase();
|
|
32061
|
+
}
|
|
32062
|
+
function toFileName(s) {
|
|
32063
|
+
return s.replace(/([a-z\d])([A-Z])/g, "$1_$2").toLowerCase().replace(/(?!^[_])[ _]/g, "-");
|
|
32064
|
+
}
|
|
32065
|
+
function toCapitalCase(s) {
|
|
32066
|
+
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
32067
|
+
}
|
|
32068
|
+
}
|
|
32069
|
+
});
|
|
32070
|
+
|
|
32071
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/get-workspace-layout.js
|
|
32072
|
+
var require_get_workspace_layout2 = __commonJS({
|
|
32073
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/get-workspace-layout.js"(exports) {
|
|
32074
|
+
"use strict";
|
|
32075
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32076
|
+
exports.extractLayoutDirectory = exports.getWorkspaceLayout = void 0;
|
|
32077
|
+
var nx_1 = require_nx2();
|
|
32078
|
+
var { readNxJson } = (0, nx_1.requireNx)();
|
|
32079
|
+
function getWorkspaceLayout(tree) {
|
|
32080
|
+
const nxJson = readNxJson(tree);
|
|
32081
|
+
return {
|
|
32082
|
+
appsDir: nxJson?.workspaceLayout?.appsDir ?? inOrderOfPreference(tree, ["apps", "packages"], "."),
|
|
32083
|
+
libsDir: nxJson?.workspaceLayout?.libsDir ?? inOrderOfPreference(tree, ["libs", "packages"], "."),
|
|
32084
|
+
standaloneAsDefault: true
|
|
32085
|
+
};
|
|
32086
|
+
}
|
|
32087
|
+
exports.getWorkspaceLayout = getWorkspaceLayout;
|
|
32088
|
+
function extractLayoutDirectory(directory) {
|
|
32089
|
+
if (directory) {
|
|
32090
|
+
directory = directory.startsWith("/") ? directory.substring(1) : directory;
|
|
32091
|
+
for (let dir of ["apps", "libs", "packages"]) {
|
|
32092
|
+
if (directory.startsWith(dir + "/") || directory === dir) {
|
|
32093
|
+
return {
|
|
32094
|
+
layoutDirectory: dir,
|
|
32095
|
+
projectDirectory: directory.substring(dir.length + 1)
|
|
32096
|
+
};
|
|
32097
|
+
}
|
|
32098
|
+
}
|
|
32099
|
+
}
|
|
32100
|
+
return { layoutDirectory: null, projectDirectory: directory };
|
|
32101
|
+
}
|
|
32102
|
+
exports.extractLayoutDirectory = extractLayoutDirectory;
|
|
32103
|
+
function inOrderOfPreference(tree, selectedFolders, defaultChoice) {
|
|
32104
|
+
for (let i = 0; i < selectedFolders.length; ++i) {
|
|
32105
|
+
if (tree.exists(selectedFolders[i]))
|
|
32106
|
+
return selectedFolders[i];
|
|
32107
|
+
}
|
|
32108
|
+
return defaultChoice;
|
|
32109
|
+
}
|
|
32110
|
+
}
|
|
32111
|
+
});
|
|
32112
|
+
|
|
32113
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/string-change.js
|
|
32114
|
+
var require_string_change2 = __commonJS({
|
|
32115
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/string-change.js"(exports) {
|
|
32116
|
+
"use strict";
|
|
32117
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32118
|
+
exports.applyChangesToString = exports.ChangeType = void 0;
|
|
32119
|
+
var ChangeType;
|
|
32120
|
+
(function(ChangeType2) {
|
|
32121
|
+
ChangeType2["Delete"] = "Delete";
|
|
32122
|
+
ChangeType2["Insert"] = "Insert";
|
|
32123
|
+
})(ChangeType || (exports.ChangeType = ChangeType = {}));
|
|
32124
|
+
function applyChangesToString(text, changes) {
|
|
32125
|
+
assertChangesValid(changes);
|
|
32126
|
+
const sortedChanges = changes.sort((a, b) => {
|
|
32127
|
+
const diff = getChangeIndex(a) - getChangeIndex(b);
|
|
32128
|
+
if (diff === 0) {
|
|
32129
|
+
if (a.type === b.type) {
|
|
32130
|
+
return 0;
|
|
32131
|
+
} else {
|
|
32132
|
+
return isStringInsertion(a) ? -1 : 1;
|
|
32133
|
+
}
|
|
32134
|
+
}
|
|
32135
|
+
return diff;
|
|
32136
|
+
});
|
|
32137
|
+
let offset = 0;
|
|
32138
|
+
for (const change of sortedChanges) {
|
|
32139
|
+
const index = getChangeIndex(change) + offset;
|
|
32140
|
+
if (isStringInsertion(change)) {
|
|
32141
|
+
text = text.slice(0, index) + change.text + text.slice(index);
|
|
32142
|
+
offset += change.text.length;
|
|
32143
|
+
} else {
|
|
32144
|
+
text = text.slice(0, index) + text.slice(index + change.length);
|
|
32145
|
+
offset -= change.length;
|
|
32146
|
+
}
|
|
32147
|
+
}
|
|
32148
|
+
return text;
|
|
32149
|
+
}
|
|
32150
|
+
exports.applyChangesToString = applyChangesToString;
|
|
32151
|
+
function assertChangesValid(changes) {
|
|
32152
|
+
for (const change of changes) {
|
|
32153
|
+
if (isStringInsertion(change)) {
|
|
32154
|
+
if (!Number.isInteger(change.index)) {
|
|
32155
|
+
throw new TypeError(`${change.index} must be an integer.`);
|
|
32156
|
+
}
|
|
32157
|
+
if (change.index < 0) {
|
|
32158
|
+
throw new Error(`${change.index} must be a positive integer.`);
|
|
32159
|
+
}
|
|
32160
|
+
if (typeof change.text !== "string") {
|
|
32161
|
+
throw new Error(`${change.text} must be a string.`);
|
|
32162
|
+
}
|
|
32163
|
+
} else {
|
|
32164
|
+
if (!Number.isInteger(change.start)) {
|
|
32165
|
+
throw new TypeError(`${change.start} must be an integer.`);
|
|
32166
|
+
}
|
|
32167
|
+
if (change.start < 0) {
|
|
32168
|
+
throw new Error(`${change.start} must be a positive integer.`);
|
|
32169
|
+
}
|
|
32170
|
+
if (!Number.isInteger(change.length)) {
|
|
32171
|
+
throw new TypeError(`${change.length} must be an integer.`);
|
|
32172
|
+
}
|
|
32173
|
+
if (change.length < 0) {
|
|
32174
|
+
throw new Error(`${change.length} must be a positive integer.`);
|
|
32175
|
+
}
|
|
32176
|
+
}
|
|
32177
|
+
}
|
|
32178
|
+
}
|
|
32179
|
+
function getChangeIndex(change) {
|
|
32180
|
+
if (isStringInsertion(change)) {
|
|
32181
|
+
return change.index;
|
|
32182
|
+
} else {
|
|
32183
|
+
return change.start;
|
|
32184
|
+
}
|
|
32185
|
+
}
|
|
32186
|
+
function isStringInsertion(change) {
|
|
32187
|
+
return change.type === ChangeType.Insert;
|
|
32188
|
+
}
|
|
32189
|
+
}
|
|
32190
|
+
});
|
|
32191
|
+
|
|
32192
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/offset-from-root.js
|
|
32193
|
+
var require_offset_from_root2 = __commonJS({
|
|
32194
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/offset-from-root.js"(exports) {
|
|
32195
|
+
"use strict";
|
|
32196
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32197
|
+
exports.offsetFromRoot = void 0;
|
|
32198
|
+
var path_1 = require("path");
|
|
32199
|
+
function offsetFromRoot3(fullPathToDir) {
|
|
32200
|
+
if (fullPathToDir === ".")
|
|
32201
|
+
return "./";
|
|
32202
|
+
const parts = (0, path_1.normalize)(fullPathToDir).split(path_1.sep);
|
|
32203
|
+
let offset = "";
|
|
32204
|
+
for (let i = 0; i < parts.length; ++i) {
|
|
32205
|
+
if (parts[i].length > 0) {
|
|
32206
|
+
offset += "../";
|
|
32207
|
+
}
|
|
32208
|
+
}
|
|
32209
|
+
return offset;
|
|
32210
|
+
}
|
|
32211
|
+
exports.offsetFromRoot = offsetFromRoot3;
|
|
32212
|
+
}
|
|
32213
|
+
});
|
|
32214
|
+
|
|
32215
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/invoke-nx-generator.js
|
|
32216
|
+
var require_invoke_nx_generator2 = __commonJS({
|
|
32217
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/invoke-nx-generator.js"(exports) {
|
|
32218
|
+
"use strict";
|
|
32219
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32220
|
+
exports.convertNxGenerator = void 0;
|
|
32221
|
+
var path_1 = require("path");
|
|
32222
|
+
var nx_1 = require_nx2();
|
|
32223
|
+
var { logger, stripIndent } = (0, nx_1.requireNx)();
|
|
32224
|
+
stripIndent = stripIndent ?? require("nx/src/utils/logger").stripIndent;
|
|
32225
|
+
var RunCallbackTask = class {
|
|
32226
|
+
constructor(callback) {
|
|
32227
|
+
this.callback = callback;
|
|
32228
|
+
}
|
|
32229
|
+
toConfiguration() {
|
|
32230
|
+
return {
|
|
32231
|
+
name: "RunCallback",
|
|
32232
|
+
options: {
|
|
32233
|
+
callback: this.callback
|
|
32234
|
+
}
|
|
32235
|
+
};
|
|
32236
|
+
}
|
|
32237
|
+
};
|
|
32238
|
+
function createRunCallbackTask() {
|
|
32239
|
+
return {
|
|
32240
|
+
name: "RunCallback",
|
|
32241
|
+
create: () => {
|
|
32242
|
+
return Promise.resolve(async ({ callback }) => {
|
|
32243
|
+
await callback();
|
|
32244
|
+
});
|
|
32245
|
+
}
|
|
32246
|
+
};
|
|
32247
|
+
}
|
|
32248
|
+
function convertNxGenerator(generator, skipWritingConfigInOldFormat = false) {
|
|
32249
|
+
return (generatorOptions) => invokeNxGenerator(generator, generatorOptions);
|
|
32250
|
+
}
|
|
32251
|
+
exports.convertNxGenerator = convertNxGenerator;
|
|
32252
|
+
function invokeNxGenerator(generator, options, skipWritingConfigInOldFormat) {
|
|
32253
|
+
return async (tree, context) => {
|
|
32254
|
+
if (context.engine.workflow) {
|
|
32255
|
+
const engineHost = context.engine.workflow.engineHost;
|
|
32256
|
+
engineHost.registerTaskExecutor(createRunCallbackTask());
|
|
32257
|
+
}
|
|
32258
|
+
const root = context.engine.workflow && context.engine.workflow.engineHost.paths ? context.engine.workflow.engineHost.paths[1] : tree.root.path;
|
|
32259
|
+
const adapterTree = new DevkitTreeFromAngularDevkitTree(tree, root, skipWritingConfigInOldFormat);
|
|
32260
|
+
const result = await generator(adapterTree, options);
|
|
32261
|
+
if (!result) {
|
|
32262
|
+
return adapterTree["tree"];
|
|
32263
|
+
}
|
|
32264
|
+
if (typeof result === "function") {
|
|
32265
|
+
if (context.engine.workflow) {
|
|
32266
|
+
context.addTask(new RunCallbackTask(result));
|
|
32267
|
+
}
|
|
32268
|
+
}
|
|
32269
|
+
};
|
|
32270
|
+
}
|
|
32271
|
+
var actionToFileChangeMap = {
|
|
32272
|
+
c: "CREATE",
|
|
32273
|
+
o: "UPDATE",
|
|
32274
|
+
d: "DELETE"
|
|
32275
|
+
};
|
|
32276
|
+
var DevkitTreeFromAngularDevkitTree = class {
|
|
32277
|
+
constructor(tree, _root, skipWritingConfigInOldFormat) {
|
|
32278
|
+
this.tree = tree;
|
|
32279
|
+
this._root = _root;
|
|
32280
|
+
this.skipWritingConfigInOldFormat = skipWritingConfigInOldFormat;
|
|
32281
|
+
try {
|
|
32282
|
+
const { UnitTestTree } = require("@angular-devkit/schematics/testing");
|
|
32283
|
+
if (tree instanceof UnitTestTree && _root === "/") {
|
|
32284
|
+
this._root = "/virtual";
|
|
32285
|
+
}
|
|
32286
|
+
} catch {
|
|
32287
|
+
}
|
|
32288
|
+
}
|
|
32289
|
+
get root() {
|
|
32290
|
+
return this._root;
|
|
32291
|
+
}
|
|
32292
|
+
children(dirPath) {
|
|
32293
|
+
const { subdirs, subfiles } = this.tree.getDir(dirPath);
|
|
32294
|
+
return [...subdirs, ...subfiles];
|
|
32295
|
+
}
|
|
32296
|
+
delete(filePath) {
|
|
32297
|
+
this.tree.delete(filePath);
|
|
32298
|
+
}
|
|
32299
|
+
exists(filePath) {
|
|
32300
|
+
if (this.isFile(filePath)) {
|
|
32301
|
+
return this.tree.exists(filePath);
|
|
32302
|
+
} else {
|
|
32303
|
+
return this.children(filePath).length > 0;
|
|
32304
|
+
}
|
|
32305
|
+
}
|
|
32306
|
+
isFile(filePath) {
|
|
32307
|
+
return this.tree.exists(filePath) && !!this.tree.read(filePath);
|
|
32308
|
+
}
|
|
32309
|
+
listChanges() {
|
|
32310
|
+
const fileChanges = [];
|
|
32311
|
+
for (const action of this.tree.actions) {
|
|
32312
|
+
if (action.kind === "r") {
|
|
32313
|
+
fileChanges.push({
|
|
32314
|
+
path: this.normalize(action.to),
|
|
32315
|
+
type: "CREATE",
|
|
32316
|
+
content: this.read(action.to)
|
|
32317
|
+
});
|
|
32318
|
+
fileChanges.push({
|
|
32319
|
+
path: this.normalize(action.path),
|
|
32320
|
+
type: "DELETE",
|
|
32321
|
+
content: null
|
|
32322
|
+
});
|
|
32323
|
+
} else if (action.kind === "c" || action.kind === "o") {
|
|
32324
|
+
fileChanges.push({
|
|
32325
|
+
path: this.normalize(action.path),
|
|
32326
|
+
type: actionToFileChangeMap[action.kind],
|
|
32327
|
+
content: action.content
|
|
32328
|
+
});
|
|
32329
|
+
} else {
|
|
32330
|
+
fileChanges.push({
|
|
32331
|
+
path: this.normalize(action.path),
|
|
32332
|
+
type: "DELETE",
|
|
32333
|
+
content: null
|
|
32334
|
+
});
|
|
32335
|
+
}
|
|
32336
|
+
}
|
|
32337
|
+
return fileChanges;
|
|
32338
|
+
}
|
|
32339
|
+
normalize(path) {
|
|
32340
|
+
return (0, path_1.relative)(this.root, (0, path_1.join)(this.root, path));
|
|
32341
|
+
}
|
|
32342
|
+
read(filePath, encoding) {
|
|
32343
|
+
return encoding ? this.tree.read(filePath).toString(encoding) : this.tree.read(filePath);
|
|
32344
|
+
}
|
|
32345
|
+
rename(from, to) {
|
|
32346
|
+
this.tree.rename(from, to);
|
|
32347
|
+
}
|
|
32348
|
+
write(filePath, content, options) {
|
|
32349
|
+
if (options?.mode) {
|
|
32350
|
+
this.warnUnsupportedFilePermissionsChange(filePath, options.mode);
|
|
32351
|
+
}
|
|
32352
|
+
if (this.tree.exists(filePath)) {
|
|
32353
|
+
this.tree.overwrite(filePath, content);
|
|
32354
|
+
} else {
|
|
32355
|
+
this.tree.create(filePath, content);
|
|
32356
|
+
}
|
|
32357
|
+
}
|
|
32358
|
+
changePermissions(filePath, mode) {
|
|
32359
|
+
this.warnUnsupportedFilePermissionsChange(filePath, mode);
|
|
32360
|
+
}
|
|
32361
|
+
warnUnsupportedFilePermissionsChange(filePath, mode) {
|
|
32362
|
+
logger.warn(stripIndent(`The Angular DevKit tree does not support changing a file permissions.
|
|
32363
|
+
Ignoring changing ${filePath} permissions to ${mode}.`));
|
|
32364
|
+
}
|
|
32365
|
+
};
|
|
32366
|
+
}
|
|
32367
|
+
});
|
|
32368
|
+
|
|
32369
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/convert-nx-executor.js
|
|
32370
|
+
var require_convert_nx_executor2 = __commonJS({
|
|
32371
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/convert-nx-executor.js"(exports) {
|
|
32372
|
+
"use strict";
|
|
32373
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32374
|
+
exports.convertNxExecutor = void 0;
|
|
32375
|
+
var nx_1 = require_nx2();
|
|
32376
|
+
var { Workspaces, readNxJsonFromDisk, retrieveProjectConfigurationsWithAngularProjects } = (0, nx_1.requireNx)();
|
|
32377
|
+
function convertNxExecutor(executor) {
|
|
32378
|
+
const builderFunction = (options, builderContext) => {
|
|
32379
|
+
const workspaces = new Workspaces(builderContext.workspaceRoot);
|
|
32380
|
+
const nxJsonConfiguration = readNxJsonFromDisk ? readNxJsonFromDisk(builderContext.workspaceRoot) : (
|
|
32381
|
+
// TODO(v18): remove readNxJson. This is to be backwards compatible with Nx 16.5 and below.
|
|
32382
|
+
workspaces.readNxJson()
|
|
32383
|
+
);
|
|
32384
|
+
const promise = async () => {
|
|
32385
|
+
const projectsConfigurations = retrieveProjectConfigurationsWithAngularProjects ? {
|
|
32386
|
+
version: 2,
|
|
32387
|
+
projects: await retrieveProjectConfigurationsWithAngularProjects(builderContext.workspaceRoot, nxJsonConfiguration).then((p) => p.projectNodes)
|
|
32388
|
+
} : (
|
|
32389
|
+
// TODO(v18): remove retrieveProjectConfigurations. This is to be backwards compatible with Nx 16.5 and below.
|
|
32390
|
+
workspaces.readProjectsConfigurations({
|
|
32391
|
+
_includeProjectsFromAngularJson: true
|
|
32392
|
+
})
|
|
32393
|
+
);
|
|
32394
|
+
const context = {
|
|
32395
|
+
root: builderContext.workspaceRoot,
|
|
32396
|
+
projectName: builderContext.target.project,
|
|
32397
|
+
targetName: builderContext.target.target,
|
|
32398
|
+
target: builderContext.target.target,
|
|
32399
|
+
configurationName: builderContext.target.configuration,
|
|
32400
|
+
projectsConfigurations,
|
|
32401
|
+
nxJsonConfiguration,
|
|
32402
|
+
cwd: process.cwd(),
|
|
32403
|
+
projectGraph: null,
|
|
32404
|
+
taskGraph: null,
|
|
32405
|
+
isVerbose: false
|
|
32406
|
+
};
|
|
32407
|
+
return executor(options, context);
|
|
32408
|
+
};
|
|
32409
|
+
return toObservable(promise());
|
|
32410
|
+
};
|
|
32411
|
+
return require("@angular-devkit/architect").createBuilder(builderFunction);
|
|
32412
|
+
}
|
|
32413
|
+
exports.convertNxExecutor = convertNxExecutor;
|
|
32414
|
+
function toObservable(promiseOrAsyncIterator) {
|
|
32415
|
+
return new (require_cjs()).Observable((subscriber) => {
|
|
32416
|
+
promiseOrAsyncIterator.then((value) => {
|
|
32417
|
+
if (!value.next) {
|
|
32418
|
+
subscriber.next(value);
|
|
32419
|
+
subscriber.complete();
|
|
32420
|
+
} else {
|
|
32421
|
+
let recurse = function(iterator) {
|
|
32422
|
+
iterator.next().then((result) => {
|
|
32423
|
+
if (!result.done) {
|
|
32424
|
+
subscriber.next(result.value);
|
|
32425
|
+
recurse(iterator);
|
|
32426
|
+
} else {
|
|
32427
|
+
if (result.value) {
|
|
32428
|
+
subscriber.next(result.value);
|
|
32429
|
+
}
|
|
32430
|
+
subscriber.complete();
|
|
32431
|
+
}
|
|
32432
|
+
}).catch((e) => {
|
|
32433
|
+
subscriber.error(e);
|
|
32434
|
+
});
|
|
32435
|
+
};
|
|
32436
|
+
let asyncIterator = value;
|
|
32437
|
+
recurse(asyncIterator);
|
|
32438
|
+
return () => {
|
|
32439
|
+
asyncIterator.return();
|
|
32440
|
+
};
|
|
32441
|
+
}
|
|
32442
|
+
}).catch((err) => {
|
|
32443
|
+
subscriber.error(err);
|
|
32444
|
+
});
|
|
32445
|
+
});
|
|
32446
|
+
}
|
|
32447
|
+
}
|
|
32448
|
+
});
|
|
32449
|
+
|
|
32450
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/move-dir.js
|
|
32451
|
+
var require_move_dir2 = __commonJS({
|
|
32452
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/utils/move-dir.js"(exports) {
|
|
32453
|
+
"use strict";
|
|
32454
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32455
|
+
exports.moveFilesToNewDirectory = void 0;
|
|
32456
|
+
var path_1 = require("path");
|
|
32457
|
+
var visit_not_ignored_files_1 = require_visit_not_ignored_files2();
|
|
32458
|
+
var nx_1 = require_nx2();
|
|
32459
|
+
var { normalizePath } = (0, nx_1.requireNx)();
|
|
32460
|
+
function moveFilesToNewDirectory(tree, oldDir, newDir) {
|
|
32461
|
+
oldDir = normalizePath(oldDir);
|
|
32462
|
+
newDir = normalizePath(newDir);
|
|
32463
|
+
(0, visit_not_ignored_files_1.visitNotIgnoredFiles)(tree, oldDir, (file) => {
|
|
32464
|
+
try {
|
|
32465
|
+
tree.rename(file, `${newDir}/${(0, path_1.relative)(oldDir, file)}`);
|
|
32466
|
+
} catch (e) {
|
|
32467
|
+
if (!tree.exists(oldDir)) {
|
|
32468
|
+
console.warn(`Path ${oldDir} does not exist`);
|
|
32469
|
+
} else if (!tree.exists(newDir)) {
|
|
32470
|
+
console.warn(`Path ${newDir} does not exist`);
|
|
32471
|
+
}
|
|
32472
|
+
}
|
|
32473
|
+
});
|
|
32474
|
+
}
|
|
32475
|
+
exports.moveFilesToNewDirectory = moveFilesToNewDirectory;
|
|
32476
|
+
}
|
|
32477
|
+
});
|
|
32478
|
+
|
|
32479
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/public-api.js
|
|
32480
|
+
var require_public_api2 = __commonJS({
|
|
32481
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/public-api.js"(exports) {
|
|
32482
|
+
"use strict";
|
|
32483
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32484
|
+
exports.moveFilesToNewDirectory = exports.convertNxExecutor = exports.convertNxGenerator = exports.offsetFromRoot = exports.ChangeType = exports.applyChangesToString = exports.extractLayoutDirectory = exports.getWorkspaceLayout = exports.names = exports.installPackagesTask = exports.NX_VERSION = exports.removeDependenciesFromPackageJson = exports.ensurePackage = exports.addDependenciesToPackageJson = exports.readTargetOptions = exports.targetToTargetString = exports.parseTargetString = exports.visitNotIgnoredFiles = exports.runTasksInSerial = exports.updateTsConfigsToJs = exports.toJS = exports.generateFiles = exports.formatFiles = void 0;
|
|
32485
|
+
var format_files_1 = require_format_files2();
|
|
32486
|
+
Object.defineProperty(exports, "formatFiles", { enumerable: true, get: function() {
|
|
32487
|
+
return format_files_1.formatFiles;
|
|
32488
|
+
} });
|
|
32489
|
+
var generate_files_1 = require_generate_files2();
|
|
32490
|
+
Object.defineProperty(exports, "generateFiles", { enumerable: true, get: function() {
|
|
32491
|
+
return generate_files_1.generateFiles;
|
|
32492
|
+
} });
|
|
32493
|
+
var to_js_1 = require_to_js2();
|
|
32494
|
+
Object.defineProperty(exports, "toJS", { enumerable: true, get: function() {
|
|
32495
|
+
return to_js_1.toJS;
|
|
32496
|
+
} });
|
|
32497
|
+
var update_ts_configs_to_js_1 = require_update_ts_configs_to_js2();
|
|
32498
|
+
Object.defineProperty(exports, "updateTsConfigsToJs", { enumerable: true, get: function() {
|
|
32499
|
+
return update_ts_configs_to_js_1.updateTsConfigsToJs;
|
|
32500
|
+
} });
|
|
32501
|
+
var run_tasks_in_serial_1 = require_run_tasks_in_serial2();
|
|
32502
|
+
Object.defineProperty(exports, "runTasksInSerial", { enumerable: true, get: function() {
|
|
32503
|
+
return run_tasks_in_serial_1.runTasksInSerial;
|
|
32504
|
+
} });
|
|
32505
|
+
var visit_not_ignored_files_1 = require_visit_not_ignored_files2();
|
|
32506
|
+
Object.defineProperty(exports, "visitNotIgnoredFiles", { enumerable: true, get: function() {
|
|
32507
|
+
return visit_not_ignored_files_1.visitNotIgnoredFiles;
|
|
32508
|
+
} });
|
|
32509
|
+
var parse_target_string_1 = require_parse_target_string2();
|
|
32510
|
+
Object.defineProperty(exports, "parseTargetString", { enumerable: true, get: function() {
|
|
32511
|
+
return parse_target_string_1.parseTargetString;
|
|
32512
|
+
} });
|
|
32513
|
+
Object.defineProperty(exports, "targetToTargetString", { enumerable: true, get: function() {
|
|
32514
|
+
return parse_target_string_1.targetToTargetString;
|
|
32515
|
+
} });
|
|
32516
|
+
var read_target_options_1 = require_read_target_options2();
|
|
32517
|
+
Object.defineProperty(exports, "readTargetOptions", { enumerable: true, get: function() {
|
|
32518
|
+
return read_target_options_1.readTargetOptions;
|
|
32519
|
+
} });
|
|
32520
|
+
var package_json_1 = require_package_json2();
|
|
32521
|
+
Object.defineProperty(exports, "addDependenciesToPackageJson", { enumerable: true, get: function() {
|
|
32522
|
+
return package_json_1.addDependenciesToPackageJson;
|
|
32523
|
+
} });
|
|
32524
|
+
Object.defineProperty(exports, "ensurePackage", { enumerable: true, get: function() {
|
|
32525
|
+
return package_json_1.ensurePackage;
|
|
32526
|
+
} });
|
|
32527
|
+
Object.defineProperty(exports, "removeDependenciesFromPackageJson", { enumerable: true, get: function() {
|
|
32528
|
+
return package_json_1.removeDependenciesFromPackageJson;
|
|
32529
|
+
} });
|
|
32530
|
+
Object.defineProperty(exports, "NX_VERSION", { enumerable: true, get: function() {
|
|
32531
|
+
return package_json_1.NX_VERSION;
|
|
32532
|
+
} });
|
|
32533
|
+
var install_packages_task_1 = require_install_packages_task2();
|
|
32534
|
+
Object.defineProperty(exports, "installPackagesTask", { enumerable: true, get: function() {
|
|
32535
|
+
return install_packages_task_1.installPackagesTask;
|
|
32536
|
+
} });
|
|
32537
|
+
var names_1 = require_names2();
|
|
32538
|
+
Object.defineProperty(exports, "names", { enumerable: true, get: function() {
|
|
32539
|
+
return names_1.names;
|
|
32540
|
+
} });
|
|
32541
|
+
var get_workspace_layout_1 = require_get_workspace_layout2();
|
|
32542
|
+
Object.defineProperty(exports, "getWorkspaceLayout", { enumerable: true, get: function() {
|
|
32543
|
+
return get_workspace_layout_1.getWorkspaceLayout;
|
|
32544
|
+
} });
|
|
32545
|
+
Object.defineProperty(exports, "extractLayoutDirectory", { enumerable: true, get: function() {
|
|
32546
|
+
return get_workspace_layout_1.extractLayoutDirectory;
|
|
32547
|
+
} });
|
|
32548
|
+
var string_change_1 = require_string_change2();
|
|
32549
|
+
Object.defineProperty(exports, "applyChangesToString", { enumerable: true, get: function() {
|
|
32550
|
+
return string_change_1.applyChangesToString;
|
|
32551
|
+
} });
|
|
32552
|
+
Object.defineProperty(exports, "ChangeType", { enumerable: true, get: function() {
|
|
32553
|
+
return string_change_1.ChangeType;
|
|
32554
|
+
} });
|
|
32555
|
+
var offset_from_root_1 = require_offset_from_root2();
|
|
32556
|
+
Object.defineProperty(exports, "offsetFromRoot", { enumerable: true, get: function() {
|
|
32557
|
+
return offset_from_root_1.offsetFromRoot;
|
|
32558
|
+
} });
|
|
32559
|
+
var invoke_nx_generator_1 = require_invoke_nx_generator2();
|
|
32560
|
+
Object.defineProperty(exports, "convertNxGenerator", { enumerable: true, get: function() {
|
|
32561
|
+
return invoke_nx_generator_1.convertNxGenerator;
|
|
32562
|
+
} });
|
|
32563
|
+
var convert_nx_executor_1 = require_convert_nx_executor2();
|
|
32564
|
+
Object.defineProperty(exports, "convertNxExecutor", { enumerable: true, get: function() {
|
|
32565
|
+
return convert_nx_executor_1.convertNxExecutor;
|
|
32566
|
+
} });
|
|
32567
|
+
var move_dir_1 = require_move_dir2();
|
|
32568
|
+
Object.defineProperty(exports, "moveFilesToNewDirectory", { enumerable: true, get: function() {
|
|
32569
|
+
return move_dir_1.moveFilesToNewDirectory;
|
|
32570
|
+
} });
|
|
32571
|
+
}
|
|
32572
|
+
});
|
|
32573
|
+
|
|
32574
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/index.js
|
|
32575
|
+
var require_devkit2 = __commonJS({
|
|
32576
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/index.js"(exports) {
|
|
32577
|
+
"use strict";
|
|
32578
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32579
|
+
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
32580
|
+
tslib_1.__exportStar(require("nx/src/devkit-exports"), exports);
|
|
32581
|
+
tslib_1.__exportStar(require_public_api2(), exports);
|
|
32582
|
+
}
|
|
32583
|
+
});
|
|
32584
|
+
|
|
32585
|
+
// node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/package.json
|
|
32586
|
+
var require_package2 = __commonJS({
|
|
32587
|
+
"node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/package.json"(exports, module2) {
|
|
32588
|
+
module2.exports = {
|
|
32589
|
+
name: "@nx/js",
|
|
32590
|
+
version: "17.0.3",
|
|
32591
|
+
private: false,
|
|
32592
|
+
description: "The JS plugin for Nx contains executors and generators that provide the best experience for developing JavaScript and TypeScript projects. ",
|
|
32593
|
+
repository: {
|
|
32594
|
+
type: "git",
|
|
32595
|
+
url: "https://github.com/nrwl/nx.git",
|
|
32596
|
+
directory: "packages/js"
|
|
32597
|
+
},
|
|
32598
|
+
keywords: [
|
|
32599
|
+
"Monorepo",
|
|
32600
|
+
"Web",
|
|
32601
|
+
"Node",
|
|
32602
|
+
"Swc",
|
|
32603
|
+
"Tsc",
|
|
32604
|
+
"CLI"
|
|
32605
|
+
],
|
|
32606
|
+
main: "./src/index.js",
|
|
32607
|
+
typings: "src/index.d.ts",
|
|
32608
|
+
license: "MIT",
|
|
32609
|
+
bugs: {
|
|
32610
|
+
url: "https://github.com/nrwl/nx/issues"
|
|
32611
|
+
},
|
|
32612
|
+
homepage: "https://nx.dev",
|
|
32613
|
+
"ng-update": {
|
|
32614
|
+
requirements: {},
|
|
32615
|
+
migrations: "./migrations.json"
|
|
32616
|
+
},
|
|
32617
|
+
generators: "./generators.json",
|
|
32618
|
+
executors: "./executors.json",
|
|
32619
|
+
dependencies: {
|
|
32620
|
+
"@babel/core": "^7.22.9",
|
|
32621
|
+
"@babel/plugin-proposal-decorators": "^7.22.7",
|
|
32622
|
+
"@babel/plugin-transform-runtime": "^7.22.9",
|
|
32623
|
+
"@babel/plugin-transform-class-properties": "^7.22.5",
|
|
32624
|
+
"@babel/preset-env": "^7.22.9",
|
|
32625
|
+
"@babel/preset-typescript": "^7.22.5",
|
|
32626
|
+
"@babel/runtime": "^7.22.6",
|
|
32627
|
+
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
32628
|
+
"babel-plugin-const-enum": "^1.0.1",
|
|
32629
|
+
"babel-plugin-macros": "^2.8.0",
|
|
32630
|
+
"babel-plugin-transform-typescript-metadata": "^0.3.1",
|
|
32631
|
+
chalk: "^4.1.0",
|
|
32632
|
+
columnify: "^1.6.0",
|
|
32633
|
+
"detect-port": "^1.5.1",
|
|
32634
|
+
"fast-glob": "3.2.7",
|
|
32635
|
+
"fs-extra": "^11.1.0",
|
|
32636
|
+
"npm-package-arg": "11.0.1",
|
|
32637
|
+
"npm-run-path": "^4.0.1",
|
|
32638
|
+
"ts-node": "10.9.1",
|
|
32639
|
+
"tsconfig-paths": "^4.1.2",
|
|
32640
|
+
ignore: "^5.0.4",
|
|
32641
|
+
"js-tokens": "^4.0.0",
|
|
32642
|
+
minimatch: "3.0.5",
|
|
32643
|
+
ora: "5.3.0",
|
|
32644
|
+
semver: "7.5.3",
|
|
32645
|
+
"source-map-support": "0.5.19",
|
|
32646
|
+
tslib: "^2.3.0",
|
|
32647
|
+
"@nx/devkit": "17.0.3",
|
|
32648
|
+
"@nx/workspace": "17.0.3",
|
|
32649
|
+
"@nrwl/js": "17.0.3"
|
|
32650
|
+
},
|
|
32651
|
+
peerDependencies: {
|
|
32652
|
+
verdaccio: "^5.0.4"
|
|
32653
|
+
},
|
|
32654
|
+
peerDependenciesMeta: {
|
|
32655
|
+
verdaccio: {
|
|
32656
|
+
optional: true
|
|
32657
|
+
}
|
|
32658
|
+
},
|
|
32659
|
+
publishConfig: {
|
|
32660
|
+
access: "public"
|
|
32661
|
+
},
|
|
32662
|
+
type: "commonjs"
|
|
32663
|
+
};
|
|
32664
|
+
}
|
|
32665
|
+
});
|
|
32666
|
+
|
|
32667
|
+
// node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/src/utils/versions.js
|
|
32668
|
+
var require_versions3 = __commonJS({
|
|
32669
|
+
"node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/src/utils/versions.js"(exports) {
|
|
32670
|
+
"use strict";
|
|
32671
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32672
|
+
exports.supportedTypescriptVersions = exports.typescriptVersion = exports.verdaccioVersion = exports.typesNodeVersion = exports.tsLibVersion = exports.swcNodeVersion = exports.swcHelpersVersion = exports.swcCoreVersion = exports.swcCliVersion = exports.prettierVersion = exports.esbuildVersion = exports.nxVersion = void 0;
|
|
32673
|
+
exports.nxVersion = require_package2().version;
|
|
32674
|
+
exports.esbuildVersion = "^0.19.2";
|
|
32675
|
+
exports.prettierVersion = "^2.6.2";
|
|
32676
|
+
exports.swcCliVersion = "~0.1.62";
|
|
32677
|
+
exports.swcCoreVersion = "~1.3.85";
|
|
32678
|
+
exports.swcHelpersVersion = "~0.5.2";
|
|
32679
|
+
exports.swcNodeVersion = "~1.6.7";
|
|
32680
|
+
exports.tsLibVersion = "^2.3.0";
|
|
32681
|
+
exports.typesNodeVersion = "18.7.1";
|
|
32682
|
+
exports.verdaccioVersion = "^5.0.4";
|
|
32683
|
+
exports.typescriptVersion = "~5.1.3";
|
|
32684
|
+
exports.supportedTypescriptVersions = ">=4.6.2";
|
|
32685
|
+
}
|
|
32686
|
+
});
|
|
32687
|
+
|
|
32688
|
+
// node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/src/utils/typescript/add-tslib-dependencies.js
|
|
32689
|
+
var require_add_tslib_dependencies = __commonJS({
|
|
32690
|
+
"node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/src/utils/typescript/add-tslib-dependencies.js"(exports) {
|
|
32691
|
+
"use strict";
|
|
32692
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32693
|
+
exports.addTsLibDependencies = void 0;
|
|
32694
|
+
var devkit_1 = require_devkit2();
|
|
32695
|
+
var versions_1 = require_versions3();
|
|
31152
32696
|
function addTsLibDependencies(tree) {
|
|
31153
32697
|
return (0, devkit_1.addDependenciesToPackageJson)(tree, {
|
|
31154
32698
|
tslib: versions_1.tsLibVersion
|
|
@@ -31164,7 +32708,7 @@ var require_load_ts_transformers = __commonJS({
|
|
|
31164
32708
|
"use strict";
|
|
31165
32709
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31166
32710
|
exports.loadTsTransformers = void 0;
|
|
31167
|
-
var devkit_1 =
|
|
32711
|
+
var devkit_1 = require_devkit2();
|
|
31168
32712
|
var path_1 = require("path");
|
|
31169
32713
|
function loadTsTransformers(plugins, moduleResolver = require.resolve) {
|
|
31170
32714
|
const beforeHooks = [];
|
|
@@ -31250,6 +32794,337 @@ var require_print_diagnostics = __commonJS({
|
|
|
31250
32794
|
}
|
|
31251
32795
|
});
|
|
31252
32796
|
|
|
32797
|
+
// node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js
|
|
32798
|
+
var require_util3 = __commonJS({
|
|
32799
|
+
"node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js"(exports, module2) {
|
|
32800
|
+
"use strict";
|
|
32801
|
+
var stringReplaceAll = (string, substring, replacer) => {
|
|
32802
|
+
let index = string.indexOf(substring);
|
|
32803
|
+
if (index === -1) {
|
|
32804
|
+
return string;
|
|
32805
|
+
}
|
|
32806
|
+
const substringLength = substring.length;
|
|
32807
|
+
let endIndex = 0;
|
|
32808
|
+
let returnValue = "";
|
|
32809
|
+
do {
|
|
32810
|
+
returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
|
|
32811
|
+
endIndex = index + substringLength;
|
|
32812
|
+
index = string.indexOf(substring, endIndex);
|
|
32813
|
+
} while (index !== -1);
|
|
32814
|
+
returnValue += string.substr(endIndex);
|
|
32815
|
+
return returnValue;
|
|
32816
|
+
};
|
|
32817
|
+
var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
|
|
32818
|
+
let endIndex = 0;
|
|
32819
|
+
let returnValue = "";
|
|
32820
|
+
do {
|
|
32821
|
+
const gotCR = string[index - 1] === "\r";
|
|
32822
|
+
returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
32823
|
+
endIndex = index + 1;
|
|
32824
|
+
index = string.indexOf("\n", endIndex);
|
|
32825
|
+
} while (index !== -1);
|
|
32826
|
+
returnValue += string.substr(endIndex);
|
|
32827
|
+
return returnValue;
|
|
32828
|
+
};
|
|
32829
|
+
module2.exports = {
|
|
32830
|
+
stringReplaceAll,
|
|
32831
|
+
stringEncaseCRLFWithFirstIndex
|
|
32832
|
+
};
|
|
32833
|
+
}
|
|
32834
|
+
});
|
|
32835
|
+
|
|
32836
|
+
// node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js
|
|
32837
|
+
var require_templates3 = __commonJS({
|
|
32838
|
+
"node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js"(exports, module2) {
|
|
32839
|
+
"use strict";
|
|
32840
|
+
var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
32841
|
+
var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
32842
|
+
var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
|
32843
|
+
var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
|
|
32844
|
+
var ESCAPES = /* @__PURE__ */ new Map([
|
|
32845
|
+
["n", "\n"],
|
|
32846
|
+
["r", "\r"],
|
|
32847
|
+
["t", " "],
|
|
32848
|
+
["b", "\b"],
|
|
32849
|
+
["f", "\f"],
|
|
32850
|
+
["v", "\v"],
|
|
32851
|
+
["0", "\0"],
|
|
32852
|
+
["\\", "\\"],
|
|
32853
|
+
["e", "\x1B"],
|
|
32854
|
+
["a", "\x07"]
|
|
32855
|
+
]);
|
|
32856
|
+
function unescape(c) {
|
|
32857
|
+
const u = c[0] === "u";
|
|
32858
|
+
const bracket = c[1] === "{";
|
|
32859
|
+
if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) {
|
|
32860
|
+
return String.fromCharCode(parseInt(c.slice(1), 16));
|
|
32861
|
+
}
|
|
32862
|
+
if (u && bracket) {
|
|
32863
|
+
return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
|
|
32864
|
+
}
|
|
32865
|
+
return ESCAPES.get(c) || c;
|
|
32866
|
+
}
|
|
32867
|
+
function parseArguments(name, arguments_) {
|
|
32868
|
+
const results = [];
|
|
32869
|
+
const chunks = arguments_.trim().split(/\s*,\s*/g);
|
|
32870
|
+
let matches;
|
|
32871
|
+
for (const chunk of chunks) {
|
|
32872
|
+
const number = Number(chunk);
|
|
32873
|
+
if (!Number.isNaN(number)) {
|
|
32874
|
+
results.push(number);
|
|
32875
|
+
} else if (matches = chunk.match(STRING_REGEX)) {
|
|
32876
|
+
results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
|
|
32877
|
+
} else {
|
|
32878
|
+
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
|
|
32879
|
+
}
|
|
32880
|
+
}
|
|
32881
|
+
return results;
|
|
32882
|
+
}
|
|
32883
|
+
function parseStyle(style) {
|
|
32884
|
+
STYLE_REGEX.lastIndex = 0;
|
|
32885
|
+
const results = [];
|
|
32886
|
+
let matches;
|
|
32887
|
+
while ((matches = STYLE_REGEX.exec(style)) !== null) {
|
|
32888
|
+
const name = matches[1];
|
|
32889
|
+
if (matches[2]) {
|
|
32890
|
+
const args = parseArguments(name, matches[2]);
|
|
32891
|
+
results.push([name].concat(args));
|
|
32892
|
+
} else {
|
|
32893
|
+
results.push([name]);
|
|
32894
|
+
}
|
|
32895
|
+
}
|
|
32896
|
+
return results;
|
|
32897
|
+
}
|
|
32898
|
+
function buildStyle(chalk2, styles) {
|
|
32899
|
+
const enabled = {};
|
|
32900
|
+
for (const layer of styles) {
|
|
32901
|
+
for (const style of layer.styles) {
|
|
32902
|
+
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
32903
|
+
}
|
|
32904
|
+
}
|
|
32905
|
+
let current = chalk2;
|
|
32906
|
+
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
32907
|
+
if (!Array.isArray(styles2)) {
|
|
32908
|
+
continue;
|
|
32909
|
+
}
|
|
32910
|
+
if (!(styleName in current)) {
|
|
32911
|
+
throw new Error(`Unknown Chalk style: ${styleName}`);
|
|
32912
|
+
}
|
|
32913
|
+
current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName];
|
|
32914
|
+
}
|
|
32915
|
+
return current;
|
|
32916
|
+
}
|
|
32917
|
+
module2.exports = (chalk2, temporary) => {
|
|
32918
|
+
const styles = [];
|
|
32919
|
+
const chunks = [];
|
|
32920
|
+
let chunk = [];
|
|
32921
|
+
temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
|
|
32922
|
+
if (escapeCharacter) {
|
|
32923
|
+
chunk.push(unescape(escapeCharacter));
|
|
32924
|
+
} else if (style) {
|
|
32925
|
+
const string = chunk.join("");
|
|
32926
|
+
chunk = [];
|
|
32927
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk2, styles)(string));
|
|
32928
|
+
styles.push({ inverse, styles: parseStyle(style) });
|
|
32929
|
+
} else if (close) {
|
|
32930
|
+
if (styles.length === 0) {
|
|
32931
|
+
throw new Error("Found extraneous } in Chalk template literal");
|
|
32932
|
+
}
|
|
32933
|
+
chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
|
|
32934
|
+
chunk = [];
|
|
32935
|
+
styles.pop();
|
|
32936
|
+
} else {
|
|
32937
|
+
chunk.push(character);
|
|
32938
|
+
}
|
|
32939
|
+
});
|
|
32940
|
+
chunks.push(chunk.join(""));
|
|
32941
|
+
if (styles.length > 0) {
|
|
32942
|
+
const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
|
|
32943
|
+
throw new Error(errMessage);
|
|
32944
|
+
}
|
|
32945
|
+
return chunks.join("");
|
|
32946
|
+
};
|
|
32947
|
+
}
|
|
32948
|
+
});
|
|
32949
|
+
|
|
32950
|
+
// node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js
|
|
32951
|
+
var require_source2 = __commonJS({
|
|
32952
|
+
"node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"(exports, module2) {
|
|
32953
|
+
"use strict";
|
|
32954
|
+
var ansiStyles = require_ansi_styles2();
|
|
32955
|
+
var { stdout: stdoutColor, stderr: stderrColor } = require_supports_color2();
|
|
32956
|
+
var {
|
|
32957
|
+
stringReplaceAll,
|
|
32958
|
+
stringEncaseCRLFWithFirstIndex
|
|
32959
|
+
} = require_util3();
|
|
32960
|
+
var { isArray } = Array;
|
|
32961
|
+
var levelMapping = [
|
|
32962
|
+
"ansi",
|
|
32963
|
+
"ansi",
|
|
32964
|
+
"ansi256",
|
|
32965
|
+
"ansi16m"
|
|
32966
|
+
];
|
|
32967
|
+
var styles = /* @__PURE__ */ Object.create(null);
|
|
32968
|
+
var applyOptions = (object, options = {}) => {
|
|
32969
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
32970
|
+
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
32971
|
+
}
|
|
32972
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
32973
|
+
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
32974
|
+
};
|
|
32975
|
+
var ChalkClass = class {
|
|
32976
|
+
constructor(options) {
|
|
32977
|
+
return chalkFactory(options);
|
|
32978
|
+
}
|
|
32979
|
+
};
|
|
32980
|
+
var chalkFactory = (options) => {
|
|
32981
|
+
const chalk3 = {};
|
|
32982
|
+
applyOptions(chalk3, options);
|
|
32983
|
+
chalk3.template = (...arguments_) => chalkTag(chalk3.template, ...arguments_);
|
|
32984
|
+
Object.setPrototypeOf(chalk3, Chalk.prototype);
|
|
32985
|
+
Object.setPrototypeOf(chalk3.template, chalk3);
|
|
32986
|
+
chalk3.template.constructor = () => {
|
|
32987
|
+
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
32988
|
+
};
|
|
32989
|
+
chalk3.template.Instance = ChalkClass;
|
|
32990
|
+
return chalk3.template;
|
|
32991
|
+
};
|
|
32992
|
+
function Chalk(options) {
|
|
32993
|
+
return chalkFactory(options);
|
|
32994
|
+
}
|
|
32995
|
+
for (const [styleName, style] of Object.entries(ansiStyles)) {
|
|
32996
|
+
styles[styleName] = {
|
|
32997
|
+
get() {
|
|
32998
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
|
|
32999
|
+
Object.defineProperty(this, styleName, { value: builder });
|
|
33000
|
+
return builder;
|
|
33001
|
+
}
|
|
33002
|
+
};
|
|
33003
|
+
}
|
|
33004
|
+
styles.visible = {
|
|
33005
|
+
get() {
|
|
33006
|
+
const builder = createBuilder(this, this._styler, true);
|
|
33007
|
+
Object.defineProperty(this, "visible", { value: builder });
|
|
33008
|
+
return builder;
|
|
33009
|
+
}
|
|
33010
|
+
};
|
|
33011
|
+
var usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
|
|
33012
|
+
for (const model of usedModels) {
|
|
33013
|
+
styles[model] = {
|
|
33014
|
+
get() {
|
|
33015
|
+
const { level } = this;
|
|
33016
|
+
return function(...arguments_) {
|
|
33017
|
+
const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
|
|
33018
|
+
return createBuilder(this, styler, this._isEmpty);
|
|
33019
|
+
};
|
|
33020
|
+
}
|
|
33021
|
+
};
|
|
33022
|
+
}
|
|
33023
|
+
for (const model of usedModels) {
|
|
33024
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
33025
|
+
styles[bgModel] = {
|
|
33026
|
+
get() {
|
|
33027
|
+
const { level } = this;
|
|
33028
|
+
return function(...arguments_) {
|
|
33029
|
+
const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
|
|
33030
|
+
return createBuilder(this, styler, this._isEmpty);
|
|
33031
|
+
};
|
|
33032
|
+
}
|
|
33033
|
+
};
|
|
33034
|
+
}
|
|
33035
|
+
var proto = Object.defineProperties(() => {
|
|
33036
|
+
}, {
|
|
33037
|
+
...styles,
|
|
33038
|
+
level: {
|
|
33039
|
+
enumerable: true,
|
|
33040
|
+
get() {
|
|
33041
|
+
return this._generator.level;
|
|
33042
|
+
},
|
|
33043
|
+
set(level) {
|
|
33044
|
+
this._generator.level = level;
|
|
33045
|
+
}
|
|
33046
|
+
}
|
|
33047
|
+
});
|
|
33048
|
+
var createStyler = (open, close, parent) => {
|
|
33049
|
+
let openAll;
|
|
33050
|
+
let closeAll;
|
|
33051
|
+
if (parent === void 0) {
|
|
33052
|
+
openAll = open;
|
|
33053
|
+
closeAll = close;
|
|
33054
|
+
} else {
|
|
33055
|
+
openAll = parent.openAll + open;
|
|
33056
|
+
closeAll = close + parent.closeAll;
|
|
33057
|
+
}
|
|
33058
|
+
return {
|
|
33059
|
+
open,
|
|
33060
|
+
close,
|
|
33061
|
+
openAll,
|
|
33062
|
+
closeAll,
|
|
33063
|
+
parent
|
|
33064
|
+
};
|
|
33065
|
+
};
|
|
33066
|
+
var createBuilder = (self, _styler, _isEmpty) => {
|
|
33067
|
+
const builder = (...arguments_) => {
|
|
33068
|
+
if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
|
|
33069
|
+
return applyStyle(builder, chalkTag(builder, ...arguments_));
|
|
33070
|
+
}
|
|
33071
|
+
return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
33072
|
+
};
|
|
33073
|
+
Object.setPrototypeOf(builder, proto);
|
|
33074
|
+
builder._generator = self;
|
|
33075
|
+
builder._styler = _styler;
|
|
33076
|
+
builder._isEmpty = _isEmpty;
|
|
33077
|
+
return builder;
|
|
33078
|
+
};
|
|
33079
|
+
var applyStyle = (self, string) => {
|
|
33080
|
+
if (self.level <= 0 || !string) {
|
|
33081
|
+
return self._isEmpty ? "" : string;
|
|
33082
|
+
}
|
|
33083
|
+
let styler = self._styler;
|
|
33084
|
+
if (styler === void 0) {
|
|
33085
|
+
return string;
|
|
33086
|
+
}
|
|
33087
|
+
const { openAll, closeAll } = styler;
|
|
33088
|
+
if (string.indexOf("\x1B") !== -1) {
|
|
33089
|
+
while (styler !== void 0) {
|
|
33090
|
+
string = stringReplaceAll(string, styler.close, styler.open);
|
|
33091
|
+
styler = styler.parent;
|
|
33092
|
+
}
|
|
33093
|
+
}
|
|
33094
|
+
const lfIndex = string.indexOf("\n");
|
|
33095
|
+
if (lfIndex !== -1) {
|
|
33096
|
+
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
33097
|
+
}
|
|
33098
|
+
return openAll + string + closeAll;
|
|
33099
|
+
};
|
|
33100
|
+
var template;
|
|
33101
|
+
var chalkTag = (chalk3, ...strings) => {
|
|
33102
|
+
const [firstString] = strings;
|
|
33103
|
+
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
33104
|
+
return strings.join(" ");
|
|
33105
|
+
}
|
|
33106
|
+
const arguments_ = strings.slice(1);
|
|
33107
|
+
const parts = [firstString.raw[0]];
|
|
33108
|
+
for (let i = 1; i < firstString.length; i++) {
|
|
33109
|
+
parts.push(
|
|
33110
|
+
String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
|
|
33111
|
+
String(firstString.raw[i])
|
|
33112
|
+
);
|
|
33113
|
+
}
|
|
33114
|
+
if (template === void 0) {
|
|
33115
|
+
template = require_templates3();
|
|
33116
|
+
}
|
|
33117
|
+
return template(chalk3, parts.join(""));
|
|
33118
|
+
};
|
|
33119
|
+
Object.defineProperties(Chalk.prototype, styles);
|
|
33120
|
+
var chalk2 = Chalk();
|
|
33121
|
+
chalk2.supportsColor = stdoutColor;
|
|
33122
|
+
chalk2.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
33123
|
+
chalk2.stderr.supportsColor = stderrColor;
|
|
33124
|
+
module2.exports = chalk2;
|
|
33125
|
+
}
|
|
33126
|
+
});
|
|
33127
|
+
|
|
31253
33128
|
// node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/src/utils/code-frames/identifiers.js
|
|
31254
33129
|
var require_identifiers2 = __commonJS({
|
|
31255
33130
|
"node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/src/utils/code-frames/identifiers.js"(exports) {
|
|
@@ -31311,7 +33186,7 @@ var require_highlight = __commonJS({
|
|
|
31311
33186
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31312
33187
|
exports.highlight = void 0;
|
|
31313
33188
|
var jsTokens = require_js_tokens();
|
|
31314
|
-
var chalk2 =
|
|
33189
|
+
var chalk2 = require_source2();
|
|
31315
33190
|
var identifiers_1 = require_identifiers2();
|
|
31316
33191
|
function getDefs(chalk3) {
|
|
31317
33192
|
return {
|
|
@@ -31377,8 +33252,8 @@ var require_ensure_typescript = __commonJS({
|
|
|
31377
33252
|
"use strict";
|
|
31378
33253
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31379
33254
|
exports.ensureTypescript = void 0;
|
|
31380
|
-
var devkit_1 =
|
|
31381
|
-
var versions_1 =
|
|
33255
|
+
var devkit_1 = require_devkit2();
|
|
33256
|
+
var versions_1 = require_versions3();
|
|
31382
33257
|
function ensureTypescript() {
|
|
31383
33258
|
return (0, devkit_1.ensurePackage)("typescript", versions_1.typescriptVersion);
|
|
31384
33259
|
}
|
|
@@ -31392,7 +33267,7 @@ var require_ts_config = __commonJS({
|
|
|
31392
33267
|
"use strict";
|
|
31393
33268
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31394
33269
|
exports.readTsConfigPaths = exports.addTsConfigPath = exports.getRootTsConfigFileName = exports.getRootTsConfigPath = exports.getRelativePathToRootTsConfig = exports.getRootTsConfigPathInTree = exports.readTsConfig = void 0;
|
|
31395
|
-
var devkit_1 =
|
|
33270
|
+
var devkit_1 = require_devkit2();
|
|
31396
33271
|
var fs_1 = require("fs");
|
|
31397
33272
|
var path_1 = require("path");
|
|
31398
33273
|
var ensure_typescript_1 = require_ensure_typescript();
|
|
@@ -31477,7 +33352,7 @@ var require_run_type_check = __commonJS({
|
|
|
31477
33352
|
"use strict";
|
|
31478
33353
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31479
33354
|
exports.getFormattedDiagnostic = exports.runTypeCheck = exports.runTypeCheckWatch = void 0;
|
|
31480
|
-
var chalk2 =
|
|
33355
|
+
var chalk2 = require_source2();
|
|
31481
33356
|
var path = require("path");
|
|
31482
33357
|
var code_frames_1 = require("nx/src/utils/code-frames");
|
|
31483
33358
|
var highlight_1 = require_highlight();
|
|
@@ -31633,7 +33508,7 @@ var require_compiler_helper_dependency = __commonJS({
|
|
|
31633
33508
|
"use strict";
|
|
31634
33509
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31635
33510
|
exports.getHelperDependenciesFromProjectGraph = exports.getHelperDependency = exports.HelperDependency = void 0;
|
|
31636
|
-
var devkit_1 =
|
|
33511
|
+
var devkit_1 = require_devkit2();
|
|
31637
33512
|
var path_1 = require("path");
|
|
31638
33513
|
var ts_config_1 = require_ts_config();
|
|
31639
33514
|
var get_swcrc_path_1 = require_get_swcrc_path();
|
|
@@ -31863,7 +33738,7 @@ var require_package3 = __commonJS({
|
|
|
31863
33738
|
});
|
|
31864
33739
|
|
|
31865
33740
|
// node_modules/.pnpm/@nx+workspace@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96/node_modules/@nx/workspace/src/utils/versions.js
|
|
31866
|
-
var
|
|
33741
|
+
var require_versions4 = __commonJS({
|
|
31867
33742
|
"node_modules/.pnpm/@nx+workspace@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96/node_modules/@nx/workspace/src/utils/versions.js"(exports) {
|
|
31868
33743
|
"use strict";
|
|
31869
33744
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -31880,7 +33755,7 @@ var require_ts_config2 = __commonJS({
|
|
|
31880
33755
|
"use strict";
|
|
31881
33756
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31882
33757
|
exports.findNodes = exports.getRootTsConfigFileName = exports.getRelativePathToRootTsConfig = exports.getRootTsConfigPathInTree = exports.readTsConfig = void 0;
|
|
31883
|
-
var devkit_1 =
|
|
33758
|
+
var devkit_1 = require_devkit2();
|
|
31884
33759
|
var fs_1 = require("fs");
|
|
31885
33760
|
var path_1 = require("path");
|
|
31886
33761
|
var typescript_1 = require_typescript();
|
|
@@ -31951,7 +33826,7 @@ var require_compilation = __commonJS({
|
|
|
31951
33826
|
"use strict";
|
|
31952
33827
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31953
33828
|
exports.compileTypeScriptWatcher = exports.compileTypeScript = void 0;
|
|
31954
|
-
var devkit_1 =
|
|
33829
|
+
var devkit_1 = require_devkit2();
|
|
31955
33830
|
var fs_1 = require("fs");
|
|
31956
33831
|
var ts_config_1 = require_ts_config2();
|
|
31957
33832
|
var typescript_1 = require_typescript();
|
|
@@ -32093,9 +33968,9 @@ var require_typescript = __commonJS({
|
|
|
32093
33968
|
"use strict";
|
|
32094
33969
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32095
33970
|
exports.ensureTypescript = exports.resolveModuleByImport = exports.getSourceNodes = exports.compileTypeScript = void 0;
|
|
32096
|
-
var devkit_1 =
|
|
33971
|
+
var devkit_1 = require_devkit2();
|
|
32097
33972
|
var path_1 = require("path");
|
|
32098
|
-
var versions_1 =
|
|
33973
|
+
var versions_1 = require_versions4();
|
|
32099
33974
|
var compilation_1 = require_compilation();
|
|
32100
33975
|
Object.defineProperty(exports, "compileTypeScript", { enumerable: true, get: function() {
|
|
32101
33976
|
return compilation_1.compileTypeScript;
|
|
@@ -32151,7 +34026,7 @@ var require_ast_utils = __commonJS({
|
|
|
32151
34026
|
exports.findNodes = exports.findClass = exports.addMethod = exports.addParameterToConstructor = exports.replaceNodeValue = exports.getImport = exports.addGlobal = exports.insertImport = exports.removeChange = exports.replaceChange = exports.insertChange = exports.resolveModuleByImport = void 0;
|
|
32152
34027
|
var typescript_1 = require_typescript();
|
|
32153
34028
|
var ensure_typescript_1 = require_ensure_typescript();
|
|
32154
|
-
var devkit_1 =
|
|
34029
|
+
var devkit_1 = require_devkit2();
|
|
32155
34030
|
var path_1 = require("path");
|
|
32156
34031
|
var normalizedAppRoot = devkit_1.workspaceRoot.replace(/\\/g, "/");
|
|
32157
34032
|
var tsModule;
|
|
@@ -32390,7 +34265,7 @@ var require_watch_for_single_file_changes = __commonJS({
|
|
|
32390
34265
|
"use strict";
|
|
32391
34266
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32392
34267
|
exports.watchForSingleFileChanges = void 0;
|
|
32393
|
-
var devkit_1 =
|
|
34268
|
+
var devkit_1 = require_devkit2();
|
|
32394
34269
|
var client_1 = require("nx/src/daemon/client/client");
|
|
32395
34270
|
var path_1 = require("path");
|
|
32396
34271
|
async function watchForSingleFileChanges(projectName, projectRoot, relativeFilePath, callback) {
|
|
@@ -32410,9 +34285,9 @@ var require_watch_for_single_file_changes = __commonJS({
|
|
|
32410
34285
|
}
|
|
32411
34286
|
});
|
|
32412
34287
|
|
|
32413
|
-
// node_modules/.pnpm/universalify@2.0.
|
|
34288
|
+
// node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
|
|
32414
34289
|
var require_universalify = __commonJS({
|
|
32415
|
-
"node_modules/.pnpm/universalify@2.0.
|
|
34290
|
+
"node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports) {
|
|
32416
34291
|
"use strict";
|
|
32417
34292
|
exports.fromCallback = function(fn) {
|
|
32418
34293
|
return Object.defineProperty(function(...args) {
|
|
@@ -32420,11 +34295,8 @@ var require_universalify = __commonJS({
|
|
|
32420
34295
|
fn.apply(this, args);
|
|
32421
34296
|
else {
|
|
32422
34297
|
return new Promise((resolve, reject) => {
|
|
32423
|
-
|
|
32424
|
-
|
|
32425
|
-
...args,
|
|
32426
|
-
(err, res) => err != null ? reject(err) : resolve(res)
|
|
32427
|
-
);
|
|
34298
|
+
args.push((err, res) => err != null ? reject(err) : resolve(res));
|
|
34299
|
+
fn.apply(this, args);
|
|
32428
34300
|
});
|
|
32429
34301
|
}
|
|
32430
34302
|
}, "name", { value: fn.name });
|
|
@@ -32434,8 +34306,10 @@ var require_universalify = __commonJS({
|
|
|
32434
34306
|
const cb = args[args.length - 1];
|
|
32435
34307
|
if (typeof cb !== "function")
|
|
32436
34308
|
return fn.apply(this, args);
|
|
32437
|
-
else
|
|
32438
|
-
|
|
34309
|
+
else {
|
|
34310
|
+
args.pop();
|
|
34311
|
+
fn.apply(this, args).then((r) => cb(null, r), cb);
|
|
34312
|
+
}
|
|
32439
34313
|
}, "name", { value: fn.name });
|
|
32440
34314
|
};
|
|
32441
34315
|
}
|
|
@@ -33249,9 +35123,9 @@ var require_graceful_fs = __commonJS({
|
|
|
33249
35123
|
}
|
|
33250
35124
|
});
|
|
33251
35125
|
|
|
33252
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
35126
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js
|
|
33253
35127
|
var require_fs2 = __commonJS({
|
|
33254
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
35128
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js"(exports) {
|
|
33255
35129
|
"use strict";
|
|
33256
35130
|
var u = require_universalify().fromCallback;
|
|
33257
35131
|
var fs = require_graceful_fs();
|
|
@@ -33365,9 +35239,9 @@ var require_fs2 = __commonJS({
|
|
|
33365
35239
|
}
|
|
33366
35240
|
});
|
|
33367
35241
|
|
|
33368
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
35242
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js
|
|
33369
35243
|
var require_utils3 = __commonJS({
|
|
33370
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
35244
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module2) {
|
|
33371
35245
|
"use strict";
|
|
33372
35246
|
var path = require("path");
|
|
33373
35247
|
module2.exports.checkPath = function checkPath(pth) {
|
|
@@ -33383,9 +35257,9 @@ var require_utils3 = __commonJS({
|
|
|
33383
35257
|
}
|
|
33384
35258
|
});
|
|
33385
35259
|
|
|
33386
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
35260
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js
|
|
33387
35261
|
var require_make_dir = __commonJS({
|
|
33388
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
35262
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module2) {
|
|
33389
35263
|
"use strict";
|
|
33390
35264
|
var fs = require_fs2();
|
|
33391
35265
|
var { checkPath } = require_utils3();
|
|
@@ -33412,9 +35286,9 @@ var require_make_dir = __commonJS({
|
|
|
33412
35286
|
}
|
|
33413
35287
|
});
|
|
33414
35288
|
|
|
33415
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
35289
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js
|
|
33416
35290
|
var require_mkdirs = __commonJS({
|
|
33417
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
35291
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module2) {
|
|
33418
35292
|
"use strict";
|
|
33419
35293
|
var u = require_universalify().fromPromise;
|
|
33420
35294
|
var { makeDir: _makeDir, makeDirSync } = require_make_dir();
|
|
@@ -33431,9 +35305,9 @@ var require_mkdirs = __commonJS({
|
|
|
33431
35305
|
}
|
|
33432
35306
|
});
|
|
33433
35307
|
|
|
33434
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
35308
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js
|
|
33435
35309
|
var require_path_exists = __commonJS({
|
|
33436
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
35310
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js"(exports, module2) {
|
|
33437
35311
|
"use strict";
|
|
33438
35312
|
var u = require_universalify().fromPromise;
|
|
33439
35313
|
var fs = require_fs2();
|
|
@@ -33447,22 +35321,27 @@ var require_path_exists = __commonJS({
|
|
|
33447
35321
|
}
|
|
33448
35322
|
});
|
|
33449
35323
|
|
|
33450
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
35324
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js
|
|
33451
35325
|
var require_utimes = __commonJS({
|
|
33452
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
35326
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js"(exports, module2) {
|
|
33453
35327
|
"use strict";
|
|
33454
|
-
var fs =
|
|
33455
|
-
|
|
33456
|
-
|
|
33457
|
-
|
|
33458
|
-
|
|
33459
|
-
|
|
33460
|
-
|
|
33461
|
-
|
|
33462
|
-
|
|
33463
|
-
|
|
33464
|
-
})
|
|
33465
|
-
|
|
35328
|
+
var fs = require_fs2();
|
|
35329
|
+
var u = require_universalify().fromPromise;
|
|
35330
|
+
async function utimesMillis(path, atime, mtime) {
|
|
35331
|
+
const fd = await fs.open(path, "r+");
|
|
35332
|
+
let closeErr = null;
|
|
35333
|
+
try {
|
|
35334
|
+
await fs.futimes(fd, atime, mtime);
|
|
35335
|
+
} finally {
|
|
35336
|
+
try {
|
|
35337
|
+
await fs.close(fd);
|
|
35338
|
+
} catch (e) {
|
|
35339
|
+
closeErr = e;
|
|
35340
|
+
}
|
|
35341
|
+
}
|
|
35342
|
+
if (closeErr) {
|
|
35343
|
+
throw closeErr;
|
|
35344
|
+
}
|
|
33466
35345
|
}
|
|
33467
35346
|
function utimesMillisSync(path, atime, mtime) {
|
|
33468
35347
|
const fd = fs.openSync(path, "r+");
|
|
@@ -33470,19 +35349,19 @@ var require_utimes = __commonJS({
|
|
|
33470
35349
|
return fs.closeSync(fd);
|
|
33471
35350
|
}
|
|
33472
35351
|
module2.exports = {
|
|
33473
|
-
utimesMillis,
|
|
35352
|
+
utimesMillis: u(utimesMillis),
|
|
33474
35353
|
utimesMillisSync
|
|
33475
35354
|
};
|
|
33476
35355
|
}
|
|
33477
35356
|
});
|
|
33478
35357
|
|
|
33479
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
35358
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js
|
|
33480
35359
|
var require_stat = __commonJS({
|
|
33481
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
35360
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js"(exports, module2) {
|
|
33482
35361
|
"use strict";
|
|
33483
35362
|
var fs = require_fs2();
|
|
33484
35363
|
var path = require("path");
|
|
33485
|
-
var
|
|
35364
|
+
var u = require_universalify().fromPromise;
|
|
33486
35365
|
function getStats(src, dest, opts) {
|
|
33487
35366
|
const statFunc = opts.dereference ? (file) => fs.stat(file, { bigint: true }) : (file) => fs.lstat(file, { bigint: true });
|
|
33488
35367
|
return Promise.all([
|
|
@@ -33507,32 +35386,28 @@ var require_stat = __commonJS({
|
|
|
33507
35386
|
}
|
|
33508
35387
|
return { srcStat, destStat };
|
|
33509
35388
|
}
|
|
33510
|
-
function checkPaths(src, dest, funcName, opts
|
|
33511
|
-
|
|
33512
|
-
|
|
33513
|
-
|
|
33514
|
-
|
|
33515
|
-
|
|
33516
|
-
if (
|
|
33517
|
-
|
|
33518
|
-
const destBaseName = path.basename(dest);
|
|
33519
|
-
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
33520
|
-
return cb(null, { srcStat, destStat, isChangingCase: true });
|
|
33521
|
-
}
|
|
33522
|
-
return cb(new Error("Source and destination must not be the same."));
|
|
33523
|
-
}
|
|
33524
|
-
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
|
33525
|
-
return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`));
|
|
33526
|
-
}
|
|
33527
|
-
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
|
33528
|
-
return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`));
|
|
35389
|
+
async function checkPaths(src, dest, funcName, opts) {
|
|
35390
|
+
const { srcStat, destStat } = await getStats(src, dest, opts);
|
|
35391
|
+
if (destStat) {
|
|
35392
|
+
if (areIdentical(srcStat, destStat)) {
|
|
35393
|
+
const srcBaseName = path.basename(src);
|
|
35394
|
+
const destBaseName = path.basename(dest);
|
|
35395
|
+
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
35396
|
+
return { srcStat, destStat, isChangingCase: true };
|
|
33529
35397
|
}
|
|
35398
|
+
throw new Error("Source and destination must not be the same.");
|
|
33530
35399
|
}
|
|
33531
|
-
if (srcStat.isDirectory() &&
|
|
33532
|
-
|
|
35400
|
+
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
|
35401
|
+
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
|
|
33533
35402
|
}
|
|
33534
|
-
|
|
33535
|
-
|
|
35403
|
+
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
|
35404
|
+
throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`);
|
|
35405
|
+
}
|
|
35406
|
+
}
|
|
35407
|
+
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
|
|
35408
|
+
throw new Error(errMsg(src, dest, funcName));
|
|
35409
|
+
}
|
|
35410
|
+
return { srcStat, destStat };
|
|
33536
35411
|
}
|
|
33537
35412
|
function checkPathsSync(src, dest, funcName, opts) {
|
|
33538
35413
|
const { srcStat, destStat } = getStatsSync(src, dest, opts);
|
|
@@ -33557,22 +35432,23 @@ var require_stat = __commonJS({
|
|
|
33557
35432
|
}
|
|
33558
35433
|
return { srcStat, destStat };
|
|
33559
35434
|
}
|
|
33560
|
-
function checkParentPaths(src, srcStat, dest, funcName
|
|
35435
|
+
async function checkParentPaths(src, srcStat, dest, funcName) {
|
|
33561
35436
|
const srcParent = path.resolve(path.dirname(src));
|
|
33562
35437
|
const destParent = path.resolve(path.dirname(dest));
|
|
33563
35438
|
if (destParent === srcParent || destParent === path.parse(destParent).root)
|
|
33564
|
-
return
|
|
33565
|
-
|
|
33566
|
-
|
|
33567
|
-
|
|
33568
|
-
|
|
33569
|
-
|
|
33570
|
-
|
|
33571
|
-
|
|
33572
|
-
|
|
33573
|
-
|
|
33574
|
-
|
|
33575
|
-
}
|
|
35439
|
+
return;
|
|
35440
|
+
let destStat;
|
|
35441
|
+
try {
|
|
35442
|
+
destStat = await fs.stat(destParent, { bigint: true });
|
|
35443
|
+
} catch (err) {
|
|
35444
|
+
if (err.code === "ENOENT")
|
|
35445
|
+
return;
|
|
35446
|
+
throw err;
|
|
35447
|
+
}
|
|
35448
|
+
if (areIdentical(srcStat, destStat)) {
|
|
35449
|
+
throw new Error(errMsg(src, dest, funcName));
|
|
35450
|
+
}
|
|
35451
|
+
return checkParentPaths(src, srcStat, destParent, funcName);
|
|
33576
35452
|
}
|
|
33577
35453
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
33578
35454
|
const srcParent = path.resolve(path.dirname(src));
|
|
@@ -33598,42 +35474,39 @@ var require_stat = __commonJS({
|
|
|
33598
35474
|
function isSrcSubdir(src, dest) {
|
|
33599
35475
|
const srcArr = path.resolve(src).split(path.sep).filter((i) => i);
|
|
33600
35476
|
const destArr = path.resolve(dest).split(path.sep).filter((i) => i);
|
|
33601
|
-
return srcArr.
|
|
35477
|
+
return srcArr.every((cur, i) => destArr[i] === cur);
|
|
33602
35478
|
}
|
|
33603
35479
|
function errMsg(src, dest, funcName) {
|
|
33604
35480
|
return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`;
|
|
33605
35481
|
}
|
|
33606
35482
|
module2.exports = {
|
|
33607
|
-
checkPaths
|
|
35483
|
+
// checkPaths
|
|
35484
|
+
checkPaths: u(checkPaths),
|
|
33608
35485
|
checkPathsSync,
|
|
33609
|
-
|
|
35486
|
+
// checkParent
|
|
35487
|
+
checkParentPaths: u(checkParentPaths),
|
|
33610
35488
|
checkParentPathsSync,
|
|
35489
|
+
// Misc
|
|
33611
35490
|
isSrcSubdir,
|
|
33612
35491
|
areIdentical
|
|
33613
35492
|
};
|
|
33614
35493
|
}
|
|
33615
35494
|
});
|
|
33616
35495
|
|
|
33617
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
35496
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js
|
|
33618
35497
|
var require_copy = __commonJS({
|
|
33619
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
35498
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module2) {
|
|
33620
35499
|
"use strict";
|
|
33621
|
-
var fs =
|
|
35500
|
+
var fs = require_fs2();
|
|
33622
35501
|
var path = require("path");
|
|
33623
|
-
var mkdirs = require_mkdirs()
|
|
33624
|
-
var pathExists = require_path_exists()
|
|
33625
|
-
var utimesMillis = require_utimes()
|
|
35502
|
+
var { mkdirs } = require_mkdirs();
|
|
35503
|
+
var { pathExists } = require_path_exists();
|
|
35504
|
+
var { utimesMillis } = require_utimes();
|
|
33626
35505
|
var stat = require_stat();
|
|
33627
|
-
function copy(src, dest, opts
|
|
33628
|
-
if (typeof opts === "function"
|
|
33629
|
-
cb = opts;
|
|
33630
|
-
opts = {};
|
|
33631
|
-
} else if (typeof opts === "function") {
|
|
35506
|
+
async function copy(src, dest, opts = {}) {
|
|
35507
|
+
if (typeof opts === "function") {
|
|
33632
35508
|
opts = { filter: opts };
|
|
33633
35509
|
}
|
|
33634
|
-
cb = cb || function() {
|
|
33635
|
-
};
|
|
33636
|
-
opts = opts || {};
|
|
33637
35510
|
opts.clobber = "clobber" in opts ? !!opts.clobber : true;
|
|
33638
35511
|
opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
|
|
33639
35512
|
if (opts.preserveTimestamps && process.arch === "ia32") {
|
|
@@ -33643,212 +35516,119 @@ var require_copy = __commonJS({
|
|
|
33643
35516
|
"fs-extra-WARN0001"
|
|
33644
35517
|
);
|
|
33645
35518
|
}
|
|
33646
|
-
stat.checkPaths(src, dest, "copy", opts
|
|
33647
|
-
|
|
33648
|
-
|
|
33649
|
-
|
|
33650
|
-
|
|
33651
|
-
if (err2)
|
|
33652
|
-
return cb(err2);
|
|
33653
|
-
runFilter(src, dest, opts, (err3, include) => {
|
|
33654
|
-
if (err3)
|
|
33655
|
-
return cb(err3);
|
|
33656
|
-
if (!include)
|
|
33657
|
-
return cb();
|
|
33658
|
-
checkParentDir(destStat, src, dest, opts, cb);
|
|
33659
|
-
});
|
|
33660
|
-
});
|
|
33661
|
-
});
|
|
33662
|
-
}
|
|
33663
|
-
function checkParentDir(destStat, src, dest, opts, cb) {
|
|
35519
|
+
const { srcStat, destStat } = await stat.checkPaths(src, dest, "copy", opts);
|
|
35520
|
+
await stat.checkParentPaths(src, srcStat, dest, "copy");
|
|
35521
|
+
const include = await runFilter(src, dest, opts);
|
|
35522
|
+
if (!include)
|
|
35523
|
+
return;
|
|
33664
35524
|
const destParent = path.dirname(dest);
|
|
33665
|
-
pathExists(destParent
|
|
33666
|
-
|
|
33667
|
-
|
|
33668
|
-
|
|
33669
|
-
|
|
33670
|
-
mkdirs(destParent, (err2) => {
|
|
33671
|
-
if (err2)
|
|
33672
|
-
return cb(err2);
|
|
33673
|
-
return getStats(destStat, src, dest, opts, cb);
|
|
33674
|
-
});
|
|
33675
|
-
});
|
|
35525
|
+
const dirExists = await pathExists(destParent);
|
|
35526
|
+
if (!dirExists) {
|
|
35527
|
+
await mkdirs(destParent);
|
|
35528
|
+
}
|
|
35529
|
+
await getStatsAndPerformCopy(destStat, src, dest, opts);
|
|
33676
35530
|
}
|
|
33677
|
-
function runFilter(src, dest, opts
|
|
35531
|
+
async function runFilter(src, dest, opts) {
|
|
33678
35532
|
if (!opts.filter)
|
|
33679
|
-
return
|
|
33680
|
-
|
|
35533
|
+
return true;
|
|
35534
|
+
return opts.filter(src, dest);
|
|
33681
35535
|
}
|
|
33682
|
-
function
|
|
33683
|
-
const
|
|
33684
|
-
|
|
33685
|
-
|
|
33686
|
-
|
|
33687
|
-
|
|
33688
|
-
|
|
33689
|
-
|
|
33690
|
-
|
|
33691
|
-
|
|
33692
|
-
|
|
33693
|
-
|
|
33694
|
-
|
|
33695
|
-
|
|
33696
|
-
return cb(new Error(`Cannot copy a FIFO pipe: ${src}`));
|
|
33697
|
-
return cb(new Error(`Unknown file: ${src}`));
|
|
33698
|
-
});
|
|
33699
|
-
}
|
|
33700
|
-
function onFile(srcStat, destStat, src, dest, opts, cb) {
|
|
33701
|
-
if (!destStat)
|
|
33702
|
-
return copyFile(srcStat, src, dest, opts, cb);
|
|
33703
|
-
return mayCopyFile(srcStat, src, dest, opts, cb);
|
|
35536
|
+
async function getStatsAndPerformCopy(destStat, src, dest, opts) {
|
|
35537
|
+
const statFn = opts.dereference ? fs.stat : fs.lstat;
|
|
35538
|
+
const srcStat = await statFn(src);
|
|
35539
|
+
if (srcStat.isDirectory())
|
|
35540
|
+
return onDir(srcStat, destStat, src, dest, opts);
|
|
35541
|
+
if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
|
|
35542
|
+
return onFile(srcStat, destStat, src, dest, opts);
|
|
35543
|
+
if (srcStat.isSymbolicLink())
|
|
35544
|
+
return onLink(destStat, src, dest, opts);
|
|
35545
|
+
if (srcStat.isSocket())
|
|
35546
|
+
throw new Error(`Cannot copy a socket file: ${src}`);
|
|
35547
|
+
if (srcStat.isFIFO())
|
|
35548
|
+
throw new Error(`Cannot copy a FIFO pipe: ${src}`);
|
|
35549
|
+
throw new Error(`Unknown file: ${src}`);
|
|
33704
35550
|
}
|
|
33705
|
-
function
|
|
35551
|
+
async function onFile(srcStat, destStat, src, dest, opts) {
|
|
35552
|
+
if (!destStat)
|
|
35553
|
+
return copyFile(srcStat, src, dest, opts);
|
|
33706
35554
|
if (opts.overwrite) {
|
|
33707
|
-
fs.unlink(dest
|
|
33708
|
-
|
|
33709
|
-
|
|
33710
|
-
|
|
33711
|
-
});
|
|
33712
|
-
}
|
|
33713
|
-
return cb(new Error(`'${dest}' already exists`));
|
|
33714
|
-
} else
|
|
33715
|
-
return cb();
|
|
33716
|
-
}
|
|
33717
|
-
function copyFile(srcStat, src, dest, opts, cb) {
|
|
33718
|
-
fs.copyFile(src, dest, (err) => {
|
|
33719
|
-
if (err)
|
|
33720
|
-
return cb(err);
|
|
33721
|
-
if (opts.preserveTimestamps)
|
|
33722
|
-
return handleTimestampsAndMode(srcStat.mode, src, dest, cb);
|
|
33723
|
-
return setDestMode(dest, srcStat.mode, cb);
|
|
33724
|
-
});
|
|
35555
|
+
await fs.unlink(dest);
|
|
35556
|
+
return copyFile(srcStat, src, dest, opts);
|
|
35557
|
+
}
|
|
35558
|
+
if (opts.errorOnExist) {
|
|
35559
|
+
throw new Error(`'${dest}' already exists`);
|
|
35560
|
+
}
|
|
33725
35561
|
}
|
|
33726
|
-
function
|
|
33727
|
-
|
|
33728
|
-
|
|
33729
|
-
|
|
33730
|
-
|
|
33731
|
-
|
|
33732
|
-
|
|
35562
|
+
async function copyFile(srcStat, src, dest, opts) {
|
|
35563
|
+
await fs.copyFile(src, dest);
|
|
35564
|
+
if (opts.preserveTimestamps) {
|
|
35565
|
+
if (fileIsNotWritable(srcStat.mode)) {
|
|
35566
|
+
await makeFileWritable(dest, srcStat.mode);
|
|
35567
|
+
}
|
|
35568
|
+
const updatedSrcStat = await fs.stat(src);
|
|
35569
|
+
await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
33733
35570
|
}
|
|
33734
|
-
return
|
|
35571
|
+
return fs.chmod(dest, srcStat.mode);
|
|
33735
35572
|
}
|
|
33736
35573
|
function fileIsNotWritable(srcMode) {
|
|
33737
35574
|
return (srcMode & 128) === 0;
|
|
33738
35575
|
}
|
|
33739
|
-
function makeFileWritable(dest, srcMode
|
|
33740
|
-
return
|
|
33741
|
-
}
|
|
33742
|
-
function setDestTimestampsAndMode(srcMode, src, dest, cb) {
|
|
33743
|
-
setDestTimestamps(src, dest, (err) => {
|
|
33744
|
-
if (err)
|
|
33745
|
-
return cb(err);
|
|
33746
|
-
return setDestMode(dest, srcMode, cb);
|
|
33747
|
-
});
|
|
33748
|
-
}
|
|
33749
|
-
function setDestMode(dest, srcMode, cb) {
|
|
33750
|
-
return fs.chmod(dest, srcMode, cb);
|
|
33751
|
-
}
|
|
33752
|
-
function setDestTimestamps(src, dest, cb) {
|
|
33753
|
-
fs.stat(src, (err, updatedSrcStat) => {
|
|
33754
|
-
if (err)
|
|
33755
|
-
return cb(err);
|
|
33756
|
-
return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb);
|
|
33757
|
-
});
|
|
33758
|
-
}
|
|
33759
|
-
function onDir(srcStat, destStat, src, dest, opts, cb) {
|
|
33760
|
-
if (!destStat)
|
|
33761
|
-
return mkDirAndCopy(srcStat.mode, src, dest, opts, cb);
|
|
33762
|
-
return copyDir(src, dest, opts, cb);
|
|
33763
|
-
}
|
|
33764
|
-
function mkDirAndCopy(srcMode, src, dest, opts, cb) {
|
|
33765
|
-
fs.mkdir(dest, (err) => {
|
|
33766
|
-
if (err)
|
|
33767
|
-
return cb(err);
|
|
33768
|
-
copyDir(src, dest, opts, (err2) => {
|
|
33769
|
-
if (err2)
|
|
33770
|
-
return cb(err2);
|
|
33771
|
-
return setDestMode(dest, srcMode, cb);
|
|
33772
|
-
});
|
|
33773
|
-
});
|
|
33774
|
-
}
|
|
33775
|
-
function copyDir(src, dest, opts, cb) {
|
|
33776
|
-
fs.readdir(src, (err, items) => {
|
|
33777
|
-
if (err)
|
|
33778
|
-
return cb(err);
|
|
33779
|
-
return copyDirItems(items, src, dest, opts, cb);
|
|
33780
|
-
});
|
|
33781
|
-
}
|
|
33782
|
-
function copyDirItems(items, src, dest, opts, cb) {
|
|
33783
|
-
const item = items.pop();
|
|
33784
|
-
if (!item)
|
|
33785
|
-
return cb();
|
|
33786
|
-
return copyDirItem(items, item, src, dest, opts, cb);
|
|
35576
|
+
function makeFileWritable(dest, srcMode) {
|
|
35577
|
+
return fs.chmod(dest, srcMode | 128);
|
|
33787
35578
|
}
|
|
33788
|
-
function
|
|
33789
|
-
|
|
33790
|
-
|
|
33791
|
-
|
|
33792
|
-
|
|
33793
|
-
|
|
35579
|
+
async function onDir(srcStat, destStat, src, dest, opts) {
|
|
35580
|
+
if (!destStat) {
|
|
35581
|
+
await fs.mkdir(dest);
|
|
35582
|
+
}
|
|
35583
|
+
const items = await fs.readdir(src);
|
|
35584
|
+
await Promise.all(items.map(async (item) => {
|
|
35585
|
+
const srcItem = path.join(src, item);
|
|
35586
|
+
const destItem = path.join(dest, item);
|
|
35587
|
+
const include = await runFilter(srcItem, destItem, opts);
|
|
33794
35588
|
if (!include)
|
|
33795
|
-
return
|
|
33796
|
-
stat.checkPaths(srcItem, destItem, "copy", opts
|
|
33797
|
-
|
|
33798
|
-
|
|
33799
|
-
|
|
33800
|
-
|
|
33801
|
-
|
|
33802
|
-
return cb(err3);
|
|
33803
|
-
return copyDirItems(items, src, dest, opts, cb);
|
|
33804
|
-
});
|
|
33805
|
-
});
|
|
33806
|
-
});
|
|
33807
|
-
}
|
|
33808
|
-
function onLink(destStat, src, dest, opts, cb) {
|
|
33809
|
-
fs.readlink(src, (err, resolvedSrc) => {
|
|
33810
|
-
if (err)
|
|
33811
|
-
return cb(err);
|
|
33812
|
-
if (opts.dereference) {
|
|
33813
|
-
resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
|
|
33814
|
-
}
|
|
33815
|
-
if (!destStat) {
|
|
33816
|
-
return fs.symlink(resolvedSrc, dest, cb);
|
|
33817
|
-
} else {
|
|
33818
|
-
fs.readlink(dest, (err2, resolvedDest) => {
|
|
33819
|
-
if (err2) {
|
|
33820
|
-
if (err2.code === "EINVAL" || err2.code === "UNKNOWN")
|
|
33821
|
-
return fs.symlink(resolvedSrc, dest, cb);
|
|
33822
|
-
return cb(err2);
|
|
33823
|
-
}
|
|
33824
|
-
if (opts.dereference) {
|
|
33825
|
-
resolvedDest = path.resolve(process.cwd(), resolvedDest);
|
|
33826
|
-
}
|
|
33827
|
-
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
33828
|
-
return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`));
|
|
33829
|
-
}
|
|
33830
|
-
if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
|
33831
|
-
return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`));
|
|
33832
|
-
}
|
|
33833
|
-
return copyLink(resolvedSrc, dest, cb);
|
|
33834
|
-
});
|
|
33835
|
-
}
|
|
33836
|
-
});
|
|
35589
|
+
return;
|
|
35590
|
+
const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
|
|
35591
|
+
return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
|
|
35592
|
+
}));
|
|
35593
|
+
if (!destStat) {
|
|
35594
|
+
await fs.chmod(dest, srcStat.mode);
|
|
35595
|
+
}
|
|
33837
35596
|
}
|
|
33838
|
-
function
|
|
33839
|
-
fs.
|
|
33840
|
-
|
|
33841
|
-
|
|
33842
|
-
|
|
33843
|
-
|
|
35597
|
+
async function onLink(destStat, src, dest, opts) {
|
|
35598
|
+
let resolvedSrc = await fs.readlink(src);
|
|
35599
|
+
if (opts.dereference) {
|
|
35600
|
+
resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
|
|
35601
|
+
}
|
|
35602
|
+
if (!destStat) {
|
|
35603
|
+
return fs.symlink(resolvedSrc, dest);
|
|
35604
|
+
}
|
|
35605
|
+
let resolvedDest = null;
|
|
35606
|
+
try {
|
|
35607
|
+
resolvedDest = await fs.readlink(dest);
|
|
35608
|
+
} catch (e) {
|
|
35609
|
+
if (e.code === "EINVAL" || e.code === "UNKNOWN")
|
|
35610
|
+
return fs.symlink(resolvedSrc, dest);
|
|
35611
|
+
throw e;
|
|
35612
|
+
}
|
|
35613
|
+
if (opts.dereference) {
|
|
35614
|
+
resolvedDest = path.resolve(process.cwd(), resolvedDest);
|
|
35615
|
+
}
|
|
35616
|
+
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
35617
|
+
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
35618
|
+
}
|
|
35619
|
+
if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
|
35620
|
+
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
35621
|
+
}
|
|
35622
|
+
await fs.unlink(dest);
|
|
35623
|
+
return fs.symlink(resolvedSrc, dest);
|
|
33844
35624
|
}
|
|
33845
35625
|
module2.exports = copy;
|
|
33846
35626
|
}
|
|
33847
35627
|
});
|
|
33848
35628
|
|
|
33849
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
35629
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js
|
|
33850
35630
|
var require_copy_sync = __commonJS({
|
|
33851
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
35631
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module2) {
|
|
33852
35632
|
"use strict";
|
|
33853
35633
|
var fs = require_graceful_fs();
|
|
33854
35634
|
var path = require("path");
|
|
@@ -33987,11 +35767,11 @@ var require_copy_sync = __commonJS({
|
|
|
33987
35767
|
}
|
|
33988
35768
|
});
|
|
33989
35769
|
|
|
33990
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
35770
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js
|
|
33991
35771
|
var require_copy2 = __commonJS({
|
|
33992
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
35772
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js"(exports, module2) {
|
|
33993
35773
|
"use strict";
|
|
33994
|
-
var u = require_universalify().
|
|
35774
|
+
var u = require_universalify().fromPromise;
|
|
33995
35775
|
module2.exports = {
|
|
33996
35776
|
copy: u(require_copy()),
|
|
33997
35777
|
copySync: require_copy_sync()
|
|
@@ -33999,9 +35779,9 @@ var require_copy2 = __commonJS({
|
|
|
33999
35779
|
}
|
|
34000
35780
|
});
|
|
34001
35781
|
|
|
34002
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
35782
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js
|
|
34003
35783
|
var require_remove = __commonJS({
|
|
34004
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
35784
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js"(exports, module2) {
|
|
34005
35785
|
"use strict";
|
|
34006
35786
|
var fs = require_graceful_fs();
|
|
34007
35787
|
var u = require_universalify().fromCallback;
|
|
@@ -34018,9 +35798,9 @@ var require_remove = __commonJS({
|
|
|
34018
35798
|
}
|
|
34019
35799
|
});
|
|
34020
35800
|
|
|
34021
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
35801
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js
|
|
34022
35802
|
var require_empty2 = __commonJS({
|
|
34023
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
35803
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js"(exports, module2) {
|
|
34024
35804
|
"use strict";
|
|
34025
35805
|
var u = require_universalify().fromPromise;
|
|
34026
35806
|
var fs = require_fs2();
|
|
@@ -34057,47 +35837,40 @@ var require_empty2 = __commonJS({
|
|
|
34057
35837
|
}
|
|
34058
35838
|
});
|
|
34059
35839
|
|
|
34060
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
35840
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js
|
|
34061
35841
|
var require_file = __commonJS({
|
|
34062
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
35842
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module2) {
|
|
34063
35843
|
"use strict";
|
|
34064
|
-
var u = require_universalify().
|
|
35844
|
+
var u = require_universalify().fromPromise;
|
|
34065
35845
|
var path = require("path");
|
|
34066
|
-
var fs =
|
|
35846
|
+
var fs = require_fs2();
|
|
34067
35847
|
var mkdir = require_mkdirs();
|
|
34068
|
-
function createFile(file
|
|
34069
|
-
|
|
34070
|
-
|
|
34071
|
-
|
|
34072
|
-
|
|
34073
|
-
|
|
34074
|
-
|
|
35848
|
+
async function createFile(file) {
|
|
35849
|
+
let stats;
|
|
35850
|
+
try {
|
|
35851
|
+
stats = await fs.stat(file);
|
|
35852
|
+
} catch {
|
|
35853
|
+
}
|
|
35854
|
+
if (stats && stats.isFile())
|
|
35855
|
+
return;
|
|
35856
|
+
const dir = path.dirname(file);
|
|
35857
|
+
let dirStats = null;
|
|
35858
|
+
try {
|
|
35859
|
+
dirStats = await fs.stat(dir);
|
|
35860
|
+
} catch (err) {
|
|
35861
|
+
if (err.code === "ENOENT") {
|
|
35862
|
+
await mkdir.mkdirs(dir);
|
|
35863
|
+
await fs.writeFile(file, "");
|
|
35864
|
+
return;
|
|
35865
|
+
} else {
|
|
35866
|
+
throw err;
|
|
35867
|
+
}
|
|
35868
|
+
}
|
|
35869
|
+
if (dirStats.isDirectory()) {
|
|
35870
|
+
await fs.writeFile(file, "");
|
|
35871
|
+
} else {
|
|
35872
|
+
await fs.readdir(dir);
|
|
34075
35873
|
}
|
|
34076
|
-
fs.stat(file, (err, stats) => {
|
|
34077
|
-
if (!err && stats.isFile())
|
|
34078
|
-
return callback();
|
|
34079
|
-
const dir = path.dirname(file);
|
|
34080
|
-
fs.stat(dir, (err2, stats2) => {
|
|
34081
|
-
if (err2) {
|
|
34082
|
-
if (err2.code === "ENOENT") {
|
|
34083
|
-
return mkdir.mkdirs(dir, (err3) => {
|
|
34084
|
-
if (err3)
|
|
34085
|
-
return callback(err3);
|
|
34086
|
-
makeFile();
|
|
34087
|
-
});
|
|
34088
|
-
}
|
|
34089
|
-
return callback(err2);
|
|
34090
|
-
}
|
|
34091
|
-
if (stats2.isDirectory())
|
|
34092
|
-
makeFile();
|
|
34093
|
-
else {
|
|
34094
|
-
fs.readdir(dir, (err3) => {
|
|
34095
|
-
if (err3)
|
|
34096
|
-
return callback(err3);
|
|
34097
|
-
});
|
|
34098
|
-
}
|
|
34099
|
-
});
|
|
34100
|
-
});
|
|
34101
35874
|
}
|
|
34102
35875
|
function createFileSync(file) {
|
|
34103
35876
|
let stats;
|
|
@@ -34127,46 +35900,37 @@ var require_file = __commonJS({
|
|
|
34127
35900
|
}
|
|
34128
35901
|
});
|
|
34129
35902
|
|
|
34130
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
35903
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js
|
|
34131
35904
|
var require_link = __commonJS({
|
|
34132
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
35905
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module2) {
|
|
34133
35906
|
"use strict";
|
|
34134
|
-
var u = require_universalify().
|
|
35907
|
+
var u = require_universalify().fromPromise;
|
|
34135
35908
|
var path = require("path");
|
|
34136
|
-
var fs =
|
|
35909
|
+
var fs = require_fs2();
|
|
34137
35910
|
var mkdir = require_mkdirs();
|
|
34138
|
-
var pathExists = require_path_exists()
|
|
35911
|
+
var { pathExists } = require_path_exists();
|
|
34139
35912
|
var { areIdentical } = require_stat();
|
|
34140
|
-
function createLink(srcpath, dstpath
|
|
34141
|
-
|
|
34142
|
-
|
|
34143
|
-
|
|
34144
|
-
|
|
34145
|
-
callback(null);
|
|
34146
|
-
});
|
|
35913
|
+
async function createLink(srcpath, dstpath) {
|
|
35914
|
+
let dstStat;
|
|
35915
|
+
try {
|
|
35916
|
+
dstStat = await fs.lstat(dstpath);
|
|
35917
|
+
} catch {
|
|
34147
35918
|
}
|
|
34148
|
-
|
|
34149
|
-
|
|
34150
|
-
|
|
34151
|
-
|
|
34152
|
-
|
|
34153
|
-
|
|
34154
|
-
|
|
34155
|
-
|
|
34156
|
-
|
|
34157
|
-
|
|
34158
|
-
|
|
34159
|
-
|
|
34160
|
-
|
|
34161
|
-
|
|
34162
|
-
|
|
34163
|
-
if (err3)
|
|
34164
|
-
return callback(err3);
|
|
34165
|
-
makeLink(srcpath, dstpath);
|
|
34166
|
-
});
|
|
34167
|
-
});
|
|
34168
|
-
});
|
|
34169
|
-
});
|
|
35919
|
+
let srcStat;
|
|
35920
|
+
try {
|
|
35921
|
+
srcStat = await fs.lstat(srcpath);
|
|
35922
|
+
} catch (err) {
|
|
35923
|
+
err.message = err.message.replace("lstat", "ensureLink");
|
|
35924
|
+
throw err;
|
|
35925
|
+
}
|
|
35926
|
+
if (dstStat && areIdentical(srcStat, dstStat))
|
|
35927
|
+
return;
|
|
35928
|
+
const dir = path.dirname(dstpath);
|
|
35929
|
+
const dirExists = await pathExists(dir);
|
|
35930
|
+
if (!dirExists) {
|
|
35931
|
+
await mkdir.mkdirs(dir);
|
|
35932
|
+
}
|
|
35933
|
+
await fs.link(srcpath, dstpath);
|
|
34170
35934
|
}
|
|
34171
35935
|
function createLinkSync(srcpath, dstpath) {
|
|
34172
35936
|
let dstStat;
|
|
@@ -34196,109 +35960,102 @@ var require_link = __commonJS({
|
|
|
34196
35960
|
}
|
|
34197
35961
|
});
|
|
34198
35962
|
|
|
34199
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
35963
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js
|
|
34200
35964
|
var require_symlink_paths = __commonJS({
|
|
34201
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
35965
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module2) {
|
|
34202
35966
|
"use strict";
|
|
34203
35967
|
var path = require("path");
|
|
34204
|
-
var fs =
|
|
34205
|
-
var pathExists = require_path_exists()
|
|
34206
|
-
|
|
35968
|
+
var fs = require_fs2();
|
|
35969
|
+
var { pathExists } = require_path_exists();
|
|
35970
|
+
var u = require_universalify().fromPromise;
|
|
35971
|
+
async function symlinkPaths(srcpath, dstpath) {
|
|
34207
35972
|
if (path.isAbsolute(srcpath)) {
|
|
34208
|
-
|
|
34209
|
-
|
|
34210
|
-
|
|
34211
|
-
|
|
34212
|
-
|
|
34213
|
-
|
|
34214
|
-
|
|
34215
|
-
|
|
34216
|
-
|
|
34217
|
-
}
|
|
34218
|
-
}
|
|
34219
|
-
|
|
34220
|
-
|
|
34221
|
-
|
|
34222
|
-
|
|
34223
|
-
|
|
34224
|
-
|
|
34225
|
-
|
|
34226
|
-
|
|
34227
|
-
|
|
34228
|
-
|
|
34229
|
-
|
|
34230
|
-
|
|
34231
|
-
|
|
34232
|
-
|
|
34233
|
-
return callback(err2);
|
|
34234
|
-
}
|
|
34235
|
-
return callback(null, {
|
|
34236
|
-
toCwd: srcpath,
|
|
34237
|
-
toDst: path.relative(dstdir, srcpath)
|
|
34238
|
-
});
|
|
34239
|
-
});
|
|
34240
|
-
}
|
|
34241
|
-
});
|
|
35973
|
+
try {
|
|
35974
|
+
await fs.lstat(srcpath);
|
|
35975
|
+
} catch (err) {
|
|
35976
|
+
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
35977
|
+
throw err;
|
|
35978
|
+
}
|
|
35979
|
+
return {
|
|
35980
|
+
toCwd: srcpath,
|
|
35981
|
+
toDst: srcpath
|
|
35982
|
+
};
|
|
35983
|
+
}
|
|
35984
|
+
const dstdir = path.dirname(dstpath);
|
|
35985
|
+
const relativeToDst = path.join(dstdir, srcpath);
|
|
35986
|
+
const exists = await pathExists(relativeToDst);
|
|
35987
|
+
if (exists) {
|
|
35988
|
+
return {
|
|
35989
|
+
toCwd: relativeToDst,
|
|
35990
|
+
toDst: srcpath
|
|
35991
|
+
};
|
|
35992
|
+
}
|
|
35993
|
+
try {
|
|
35994
|
+
await fs.lstat(srcpath);
|
|
35995
|
+
} catch (err) {
|
|
35996
|
+
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
35997
|
+
throw err;
|
|
34242
35998
|
}
|
|
35999
|
+
return {
|
|
36000
|
+
toCwd: srcpath,
|
|
36001
|
+
toDst: path.relative(dstdir, srcpath)
|
|
36002
|
+
};
|
|
34243
36003
|
}
|
|
34244
36004
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
34245
|
-
let exists;
|
|
34246
36005
|
if (path.isAbsolute(srcpath)) {
|
|
34247
|
-
|
|
34248
|
-
if (!
|
|
36006
|
+
const exists2 = fs.existsSync(srcpath);
|
|
36007
|
+
if (!exists2)
|
|
34249
36008
|
throw new Error("absolute srcpath does not exist");
|
|
34250
36009
|
return {
|
|
34251
36010
|
toCwd: srcpath,
|
|
34252
36011
|
toDst: srcpath
|
|
34253
36012
|
};
|
|
34254
|
-
} else {
|
|
34255
|
-
const dstdir = path.dirname(dstpath);
|
|
34256
|
-
const relativeToDst = path.join(dstdir, srcpath);
|
|
34257
|
-
exists = fs.existsSync(relativeToDst);
|
|
34258
|
-
if (exists) {
|
|
34259
|
-
return {
|
|
34260
|
-
toCwd: relativeToDst,
|
|
34261
|
-
toDst: srcpath
|
|
34262
|
-
};
|
|
34263
|
-
} else {
|
|
34264
|
-
exists = fs.existsSync(srcpath);
|
|
34265
|
-
if (!exists)
|
|
34266
|
-
throw new Error("relative srcpath does not exist");
|
|
34267
|
-
return {
|
|
34268
|
-
toCwd: srcpath,
|
|
34269
|
-
toDst: path.relative(dstdir, srcpath)
|
|
34270
|
-
};
|
|
34271
|
-
}
|
|
34272
36013
|
}
|
|
36014
|
+
const dstdir = path.dirname(dstpath);
|
|
36015
|
+
const relativeToDst = path.join(dstdir, srcpath);
|
|
36016
|
+
const exists = fs.existsSync(relativeToDst);
|
|
36017
|
+
if (exists) {
|
|
36018
|
+
return {
|
|
36019
|
+
toCwd: relativeToDst,
|
|
36020
|
+
toDst: srcpath
|
|
36021
|
+
};
|
|
36022
|
+
}
|
|
36023
|
+
const srcExists = fs.existsSync(srcpath);
|
|
36024
|
+
if (!srcExists)
|
|
36025
|
+
throw new Error("relative srcpath does not exist");
|
|
36026
|
+
return {
|
|
36027
|
+
toCwd: srcpath,
|
|
36028
|
+
toDst: path.relative(dstdir, srcpath)
|
|
36029
|
+
};
|
|
34273
36030
|
}
|
|
34274
36031
|
module2.exports = {
|
|
34275
|
-
symlinkPaths,
|
|
36032
|
+
symlinkPaths: u(symlinkPaths),
|
|
34276
36033
|
symlinkPathsSync
|
|
34277
36034
|
};
|
|
34278
36035
|
}
|
|
34279
36036
|
});
|
|
34280
36037
|
|
|
34281
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
36038
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js
|
|
34282
36039
|
var require_symlink_type = __commonJS({
|
|
34283
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
36040
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module2) {
|
|
34284
36041
|
"use strict";
|
|
34285
|
-
var fs =
|
|
34286
|
-
|
|
34287
|
-
|
|
34288
|
-
type = typeof type === "function" ? false : type;
|
|
36042
|
+
var fs = require_fs2();
|
|
36043
|
+
var u = require_universalify().fromPromise;
|
|
36044
|
+
async function symlinkType(srcpath, type) {
|
|
34289
36045
|
if (type)
|
|
34290
|
-
return
|
|
34291
|
-
|
|
34292
|
-
|
|
34293
|
-
|
|
34294
|
-
|
|
34295
|
-
|
|
34296
|
-
}
|
|
36046
|
+
return type;
|
|
36047
|
+
let stats;
|
|
36048
|
+
try {
|
|
36049
|
+
stats = await fs.lstat(srcpath);
|
|
36050
|
+
} catch {
|
|
36051
|
+
return "file";
|
|
36052
|
+
}
|
|
36053
|
+
return stats && stats.isDirectory() ? "dir" : "file";
|
|
34297
36054
|
}
|
|
34298
36055
|
function symlinkTypeSync(srcpath, type) {
|
|
34299
|
-
let stats;
|
|
34300
36056
|
if (type)
|
|
34301
36057
|
return type;
|
|
36058
|
+
let stats;
|
|
34302
36059
|
try {
|
|
34303
36060
|
stats = fs.lstatSync(srcpath);
|
|
34304
36061
|
} catch {
|
|
@@ -34307,69 +36064,46 @@ var require_symlink_type = __commonJS({
|
|
|
34307
36064
|
return stats && stats.isDirectory() ? "dir" : "file";
|
|
34308
36065
|
}
|
|
34309
36066
|
module2.exports = {
|
|
34310
|
-
symlinkType,
|
|
36067
|
+
symlinkType: u(symlinkType),
|
|
34311
36068
|
symlinkTypeSync
|
|
34312
36069
|
};
|
|
34313
36070
|
}
|
|
34314
36071
|
});
|
|
34315
36072
|
|
|
34316
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
36073
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js
|
|
34317
36074
|
var require_symlink = __commonJS({
|
|
34318
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
36075
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module2) {
|
|
34319
36076
|
"use strict";
|
|
34320
|
-
var u = require_universalify().
|
|
36077
|
+
var u = require_universalify().fromPromise;
|
|
34321
36078
|
var path = require("path");
|
|
34322
36079
|
var fs = require_fs2();
|
|
34323
|
-
var
|
|
34324
|
-
var
|
|
34325
|
-
var
|
|
34326
|
-
var
|
|
34327
|
-
var symlinkPaths = _symlinkPaths.symlinkPaths;
|
|
34328
|
-
var symlinkPathsSync = _symlinkPaths.symlinkPathsSync;
|
|
34329
|
-
var _symlinkType = require_symlink_type();
|
|
34330
|
-
var symlinkType = _symlinkType.symlinkType;
|
|
34331
|
-
var symlinkTypeSync = _symlinkType.symlinkTypeSync;
|
|
34332
|
-
var pathExists = require_path_exists().pathExists;
|
|
36080
|
+
var { mkdirs, mkdirsSync } = require_mkdirs();
|
|
36081
|
+
var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
|
|
36082
|
+
var { symlinkType, symlinkTypeSync } = require_symlink_type();
|
|
36083
|
+
var { pathExists } = require_path_exists();
|
|
34333
36084
|
var { areIdentical } = require_stat();
|
|
34334
|
-
function createSymlink(srcpath, dstpath, type
|
|
34335
|
-
|
|
34336
|
-
|
|
34337
|
-
|
|
34338
|
-
|
|
34339
|
-
|
|
34340
|
-
|
|
34341
|
-
|
|
34342
|
-
|
|
34343
|
-
|
|
34344
|
-
|
|
34345
|
-
|
|
34346
|
-
|
|
34347
|
-
|
|
34348
|
-
|
|
34349
|
-
|
|
34350
|
-
|
|
34351
|
-
|
|
34352
|
-
|
|
34353
|
-
|
|
34354
|
-
|
|
34355
|
-
|
|
34356
|
-
symlinkType(relative.toCwd, type, (err2, type2) => {
|
|
34357
|
-
if (err2)
|
|
34358
|
-
return callback(err2);
|
|
34359
|
-
const dir = path.dirname(dstpath);
|
|
34360
|
-
pathExists(dir, (err3, dirExists) => {
|
|
34361
|
-
if (err3)
|
|
34362
|
-
return callback(err3);
|
|
34363
|
-
if (dirExists)
|
|
34364
|
-
return fs.symlink(srcpath, dstpath, type2, callback);
|
|
34365
|
-
mkdirs(dir, (err4) => {
|
|
34366
|
-
if (err4)
|
|
34367
|
-
return callback(err4);
|
|
34368
|
-
fs.symlink(srcpath, dstpath, type2, callback);
|
|
34369
|
-
});
|
|
34370
|
-
});
|
|
34371
|
-
});
|
|
34372
|
-
});
|
|
36085
|
+
async function createSymlink(srcpath, dstpath, type) {
|
|
36086
|
+
let stats;
|
|
36087
|
+
try {
|
|
36088
|
+
stats = await fs.lstat(dstpath);
|
|
36089
|
+
} catch {
|
|
36090
|
+
}
|
|
36091
|
+
if (stats && stats.isSymbolicLink()) {
|
|
36092
|
+
const [srcStat, dstStat] = await Promise.all([
|
|
36093
|
+
fs.stat(srcpath),
|
|
36094
|
+
fs.stat(dstpath)
|
|
36095
|
+
]);
|
|
36096
|
+
if (areIdentical(srcStat, dstStat))
|
|
36097
|
+
return;
|
|
36098
|
+
}
|
|
36099
|
+
const relative = await symlinkPaths(srcpath, dstpath);
|
|
36100
|
+
srcpath = relative.toDst;
|
|
36101
|
+
const toType = await symlinkType(relative.toCwd, type);
|
|
36102
|
+
const dir = path.dirname(dstpath);
|
|
36103
|
+
if (!await pathExists(dir)) {
|
|
36104
|
+
await mkdirs(dir);
|
|
36105
|
+
}
|
|
36106
|
+
return fs.symlink(srcpath, dstpath, toType);
|
|
34373
36107
|
}
|
|
34374
36108
|
function createSymlinkSync(srcpath, dstpath, type) {
|
|
34375
36109
|
let stats;
|
|
@@ -34400,9 +36134,9 @@ var require_symlink = __commonJS({
|
|
|
34400
36134
|
}
|
|
34401
36135
|
});
|
|
34402
36136
|
|
|
34403
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
36137
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js
|
|
34404
36138
|
var require_ensure = __commonJS({
|
|
34405
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
36139
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js"(exports, module2) {
|
|
34406
36140
|
"use strict";
|
|
34407
36141
|
var { createFile, createFileSync } = require_file();
|
|
34408
36142
|
var { createLink, createLinkSync } = require_link();
|
|
@@ -34427,6 +36161,37 @@ var require_ensure = __commonJS({
|
|
|
34427
36161
|
}
|
|
34428
36162
|
});
|
|
34429
36163
|
|
|
36164
|
+
// node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js
|
|
36165
|
+
var require_universalify2 = __commonJS({
|
|
36166
|
+
"node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports) {
|
|
36167
|
+
"use strict";
|
|
36168
|
+
exports.fromCallback = function(fn) {
|
|
36169
|
+
return Object.defineProperty(function(...args) {
|
|
36170
|
+
if (typeof args[args.length - 1] === "function")
|
|
36171
|
+
fn.apply(this, args);
|
|
36172
|
+
else {
|
|
36173
|
+
return new Promise((resolve, reject) => {
|
|
36174
|
+
fn.call(
|
|
36175
|
+
this,
|
|
36176
|
+
...args,
|
|
36177
|
+
(err, res) => err != null ? reject(err) : resolve(res)
|
|
36178
|
+
);
|
|
36179
|
+
});
|
|
36180
|
+
}
|
|
36181
|
+
}, "name", { value: fn.name });
|
|
36182
|
+
};
|
|
36183
|
+
exports.fromPromise = function(fn) {
|
|
36184
|
+
return Object.defineProperty(function(...args) {
|
|
36185
|
+
const cb = args[args.length - 1];
|
|
36186
|
+
if (typeof cb !== "function")
|
|
36187
|
+
return fn.apply(this, args);
|
|
36188
|
+
else
|
|
36189
|
+
fn.apply(this, args.slice(0, -1)).then((r) => cb(null, r), cb);
|
|
36190
|
+
}, "name", { value: fn.name });
|
|
36191
|
+
};
|
|
36192
|
+
}
|
|
36193
|
+
});
|
|
36194
|
+
|
|
34430
36195
|
// node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js
|
|
34431
36196
|
var require_utils4 = __commonJS({
|
|
34432
36197
|
"node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports, module2) {
|
|
@@ -34453,7 +36218,7 @@ var require_jsonfile = __commonJS({
|
|
|
34453
36218
|
} catch (_) {
|
|
34454
36219
|
_fs = require("fs");
|
|
34455
36220
|
}
|
|
34456
|
-
var universalify =
|
|
36221
|
+
var universalify = require_universalify2();
|
|
34457
36222
|
var { stringify, stripBom } = require_utils4();
|
|
34458
36223
|
async function _readFile(file, options = {}) {
|
|
34459
36224
|
if (typeof options === "string") {
|
|
@@ -34517,9 +36282,9 @@ var require_jsonfile = __commonJS({
|
|
|
34517
36282
|
}
|
|
34518
36283
|
});
|
|
34519
36284
|
|
|
34520
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
36285
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js
|
|
34521
36286
|
var require_jsonfile2 = __commonJS({
|
|
34522
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
36287
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module2) {
|
|
34523
36288
|
"use strict";
|
|
34524
36289
|
var jsonFile = require_jsonfile();
|
|
34525
36290
|
module2.exports = {
|
|
@@ -34532,39 +36297,27 @@ var require_jsonfile2 = __commonJS({
|
|
|
34532
36297
|
}
|
|
34533
36298
|
});
|
|
34534
36299
|
|
|
34535
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
36300
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js
|
|
34536
36301
|
var require_output_file = __commonJS({
|
|
34537
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
36302
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js"(exports, module2) {
|
|
34538
36303
|
"use strict";
|
|
34539
|
-
var u = require_universalify().
|
|
34540
|
-
var fs =
|
|
36304
|
+
var u = require_universalify().fromPromise;
|
|
36305
|
+
var fs = require_fs2();
|
|
34541
36306
|
var path = require("path");
|
|
34542
36307
|
var mkdir = require_mkdirs();
|
|
34543
36308
|
var pathExists = require_path_exists().pathExists;
|
|
34544
|
-
function outputFile(file, data, encoding
|
|
34545
|
-
if (typeof encoding === "function") {
|
|
34546
|
-
callback = encoding;
|
|
34547
|
-
encoding = "utf8";
|
|
34548
|
-
}
|
|
36309
|
+
async function outputFile(file, data, encoding = "utf-8") {
|
|
34549
36310
|
const dir = path.dirname(file);
|
|
34550
|
-
pathExists(dir
|
|
34551
|
-
|
|
34552
|
-
|
|
34553
|
-
|
|
34554
|
-
return fs.writeFile(file, data, encoding, callback);
|
|
34555
|
-
mkdir.mkdirs(dir, (err2) => {
|
|
34556
|
-
if (err2)
|
|
34557
|
-
return callback(err2);
|
|
34558
|
-
fs.writeFile(file, data, encoding, callback);
|
|
34559
|
-
});
|
|
34560
|
-
});
|
|
36311
|
+
if (!await pathExists(dir)) {
|
|
36312
|
+
await mkdir.mkdirs(dir);
|
|
36313
|
+
}
|
|
36314
|
+
return fs.writeFile(file, data, encoding);
|
|
34561
36315
|
}
|
|
34562
36316
|
function outputFileSync(file, ...args) {
|
|
34563
36317
|
const dir = path.dirname(file);
|
|
34564
|
-
if (fs.existsSync(dir)) {
|
|
34565
|
-
|
|
36318
|
+
if (!fs.existsSync(dir)) {
|
|
36319
|
+
mkdir.mkdirsSync(dir);
|
|
34566
36320
|
}
|
|
34567
|
-
mkdir.mkdirsSync(dir);
|
|
34568
36321
|
fs.writeFileSync(file, ...args);
|
|
34569
36322
|
}
|
|
34570
36323
|
module2.exports = {
|
|
@@ -34574,9 +36327,9 @@ var require_output_file = __commonJS({
|
|
|
34574
36327
|
}
|
|
34575
36328
|
});
|
|
34576
36329
|
|
|
34577
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
36330
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js
|
|
34578
36331
|
var require_output_json = __commonJS({
|
|
34579
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
36332
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js"(exports, module2) {
|
|
34580
36333
|
"use strict";
|
|
34581
36334
|
var { stringify } = require_utils4();
|
|
34582
36335
|
var { outputFile } = require_output_file();
|
|
@@ -34588,9 +36341,9 @@ var require_output_json = __commonJS({
|
|
|
34588
36341
|
}
|
|
34589
36342
|
});
|
|
34590
36343
|
|
|
34591
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
36344
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js
|
|
34592
36345
|
var require_output_json_sync = __commonJS({
|
|
34593
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
36346
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module2) {
|
|
34594
36347
|
"use strict";
|
|
34595
36348
|
var { stringify } = require_utils4();
|
|
34596
36349
|
var { outputFileSync } = require_output_file();
|
|
@@ -34602,9 +36355,9 @@ var require_output_json_sync = __commonJS({
|
|
|
34602
36355
|
}
|
|
34603
36356
|
});
|
|
34604
36357
|
|
|
34605
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
36358
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js
|
|
34606
36359
|
var require_json2 = __commonJS({
|
|
34607
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
36360
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js"(exports, module2) {
|
|
34608
36361
|
"use strict";
|
|
34609
36362
|
var u = require_universalify().fromPromise;
|
|
34610
36363
|
var jsonFile = require_jsonfile2();
|
|
@@ -34620,92 +36373,61 @@ var require_json2 = __commonJS({
|
|
|
34620
36373
|
}
|
|
34621
36374
|
});
|
|
34622
36375
|
|
|
34623
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
36376
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js
|
|
34624
36377
|
var require_move = __commonJS({
|
|
34625
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
36378
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js"(exports, module2) {
|
|
34626
36379
|
"use strict";
|
|
34627
|
-
var fs =
|
|
36380
|
+
var fs = require_fs2();
|
|
34628
36381
|
var path = require("path");
|
|
34629
|
-
var copy = require_copy2()
|
|
34630
|
-
var remove = require_remove()
|
|
34631
|
-
var mkdirp = require_mkdirs()
|
|
34632
|
-
var pathExists = require_path_exists()
|
|
36382
|
+
var { copy } = require_copy2();
|
|
36383
|
+
var { remove } = require_remove();
|
|
36384
|
+
var { mkdirp } = require_mkdirs();
|
|
36385
|
+
var { pathExists } = require_path_exists();
|
|
34633
36386
|
var stat = require_stat();
|
|
34634
|
-
function move(src, dest, opts
|
|
34635
|
-
if (typeof opts === "function") {
|
|
34636
|
-
cb = opts;
|
|
34637
|
-
opts = {};
|
|
34638
|
-
}
|
|
34639
|
-
opts = opts || {};
|
|
36387
|
+
async function move(src, dest, opts = {}) {
|
|
34640
36388
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
34641
|
-
stat.checkPaths(src, dest, "move", opts
|
|
34642
|
-
|
|
34643
|
-
|
|
34644
|
-
|
|
34645
|
-
|
|
34646
|
-
|
|
34647
|
-
return cb(err2);
|
|
34648
|
-
if (isParentRoot(dest))
|
|
34649
|
-
return doRename(src, dest, overwrite, isChangingCase, cb);
|
|
34650
|
-
mkdirp(path.dirname(dest), (err3) => {
|
|
34651
|
-
if (err3)
|
|
34652
|
-
return cb(err3);
|
|
34653
|
-
return doRename(src, dest, overwrite, isChangingCase, cb);
|
|
34654
|
-
});
|
|
34655
|
-
});
|
|
34656
|
-
});
|
|
34657
|
-
}
|
|
34658
|
-
function isParentRoot(dest) {
|
|
34659
|
-
const parent = path.dirname(dest);
|
|
34660
|
-
const parsedPath = path.parse(parent);
|
|
34661
|
-
return parsedPath.root === parent;
|
|
34662
|
-
}
|
|
34663
|
-
function doRename(src, dest, overwrite, isChangingCase, cb) {
|
|
34664
|
-
if (isChangingCase)
|
|
34665
|
-
return rename(src, dest, overwrite, cb);
|
|
34666
|
-
if (overwrite) {
|
|
34667
|
-
return remove(dest, (err) => {
|
|
34668
|
-
if (err)
|
|
34669
|
-
return cb(err);
|
|
34670
|
-
return rename(src, dest, overwrite, cb);
|
|
34671
|
-
});
|
|
36389
|
+
const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
|
|
36390
|
+
await stat.checkParentPaths(src, srcStat, dest, "move");
|
|
36391
|
+
const destParent = path.dirname(dest);
|
|
36392
|
+
const parsedParentPath = path.parse(destParent);
|
|
36393
|
+
if (parsedParentPath.root !== destParent) {
|
|
36394
|
+
await mkdirp(destParent);
|
|
34672
36395
|
}
|
|
34673
|
-
|
|
34674
|
-
if (err)
|
|
34675
|
-
return cb(err);
|
|
34676
|
-
if (destExists)
|
|
34677
|
-
return cb(new Error("dest already exists."));
|
|
34678
|
-
return rename(src, dest, overwrite, cb);
|
|
34679
|
-
});
|
|
36396
|
+
return doRename(src, dest, overwrite, isChangingCase);
|
|
34680
36397
|
}
|
|
34681
|
-
function
|
|
34682
|
-
|
|
34683
|
-
if (
|
|
34684
|
-
|
|
34685
|
-
if (
|
|
34686
|
-
|
|
34687
|
-
|
|
34688
|
-
}
|
|
36398
|
+
async function doRename(src, dest, overwrite, isChangingCase) {
|
|
36399
|
+
if (!isChangingCase) {
|
|
36400
|
+
if (overwrite) {
|
|
36401
|
+
await remove(dest);
|
|
36402
|
+
} else if (await pathExists(dest)) {
|
|
36403
|
+
throw new Error("dest already exists.");
|
|
36404
|
+
}
|
|
36405
|
+
}
|
|
36406
|
+
try {
|
|
36407
|
+
await fs.rename(src, dest);
|
|
36408
|
+
} catch (err) {
|
|
36409
|
+
if (err.code !== "EXDEV") {
|
|
36410
|
+
throw err;
|
|
36411
|
+
}
|
|
36412
|
+
await moveAcrossDevice(src, dest, overwrite);
|
|
36413
|
+
}
|
|
34689
36414
|
}
|
|
34690
|
-
function moveAcrossDevice(src, dest, overwrite
|
|
36415
|
+
async function moveAcrossDevice(src, dest, overwrite) {
|
|
34691
36416
|
const opts = {
|
|
34692
36417
|
overwrite,
|
|
34693
36418
|
errorOnExist: true,
|
|
34694
36419
|
preserveTimestamps: true
|
|
34695
36420
|
};
|
|
34696
|
-
copy(src, dest, opts
|
|
34697
|
-
|
|
34698
|
-
return cb(err);
|
|
34699
|
-
return remove(src, cb);
|
|
34700
|
-
});
|
|
36421
|
+
await copy(src, dest, opts);
|
|
36422
|
+
return remove(src);
|
|
34701
36423
|
}
|
|
34702
36424
|
module2.exports = move;
|
|
34703
36425
|
}
|
|
34704
36426
|
});
|
|
34705
36427
|
|
|
34706
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
36428
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js
|
|
34707
36429
|
var require_move_sync = __commonJS({
|
|
34708
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
36430
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module2) {
|
|
34709
36431
|
"use strict";
|
|
34710
36432
|
var fs = require_graceful_fs();
|
|
34711
36433
|
var path = require("path");
|
|
@@ -34760,11 +36482,11 @@ var require_move_sync = __commonJS({
|
|
|
34760
36482
|
}
|
|
34761
36483
|
});
|
|
34762
36484
|
|
|
34763
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
36485
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js
|
|
34764
36486
|
var require_move2 = __commonJS({
|
|
34765
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
36487
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js"(exports, module2) {
|
|
34766
36488
|
"use strict";
|
|
34767
|
-
var u = require_universalify().
|
|
36489
|
+
var u = require_universalify().fromPromise;
|
|
34768
36490
|
module2.exports = {
|
|
34769
36491
|
move: u(require_move()),
|
|
34770
36492
|
moveSync: require_move_sync()
|
|
@@ -34772,9 +36494,9 @@ var require_move2 = __commonJS({
|
|
|
34772
36494
|
}
|
|
34773
36495
|
});
|
|
34774
36496
|
|
|
34775
|
-
// node_modules/.pnpm/fs-extra@11.
|
|
36497
|
+
// node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js
|
|
34776
36498
|
var require_lib4 = __commonJS({
|
|
34777
|
-
"node_modules/.pnpm/fs-extra@11.
|
|
36499
|
+
"node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js"(exports, module2) {
|
|
34778
36500
|
"use strict";
|
|
34779
36501
|
module2.exports = {
|
|
34780
36502
|
// Export promiseified graceful-fs:
|
|
@@ -34818,7 +36540,7 @@ var require_update_package_json = __commonJS({
|
|
|
34818
36540
|
exports.getUpdatedPackageJsonContent = exports.getExports = exports.updatePackageJson = void 0;
|
|
34819
36541
|
var lock_file_1 = require("nx/src/plugins/js/lock-file/lock-file");
|
|
34820
36542
|
var create_package_json_1 = require("nx/src/plugins/js/package-json/create-package-json");
|
|
34821
|
-
var devkit_1 =
|
|
36543
|
+
var devkit_1 = require_devkit2();
|
|
34822
36544
|
var path_1 = require("path");
|
|
34823
36545
|
var fs_extra_1 = require_lib4();
|
|
34824
36546
|
var fileutils_1 = require("nx/src/utils/fileutils");
|
|
@@ -34976,7 +36698,7 @@ var require_buildable_libs_utils = __commonJS({
|
|
|
34976
36698
|
"use strict";
|
|
34977
36699
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34978
36700
|
exports.updateBuildableProjectPackageJsonDependencies = exports.updatePaths = exports.findMissingBuildDependencies = exports.checkDependentProjectsHaveBeenBuilt = exports.createTmpTsConfig = exports.computeCompilerOptionsPaths = exports.calculateDependenciesFromTaskGraph = exports.calculateProjectDependencies = exports.calculateProjectBuildableDependencies = void 0;
|
|
34979
|
-
var devkit_1 =
|
|
36701
|
+
var devkit_1 = require_devkit2();
|
|
34980
36702
|
var fs_1 = require("fs");
|
|
34981
36703
|
var operators_1 = require("nx/src/project-graph/operators");
|
|
34982
36704
|
var fileutils_1 = require("nx/src/utils/fileutils");
|
|
@@ -35323,7 +37045,7 @@ var require_check_dependencies = __commonJS({
|
|
|
35323
37045
|
});
|
|
35324
37046
|
|
|
35325
37047
|
// node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/src/utils/package-json/index.js
|
|
35326
|
-
var
|
|
37048
|
+
var require_package_json3 = __commonJS({
|
|
35327
37049
|
"node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/src/utils/package-json/index.js"(exports) {
|
|
35328
37050
|
"use strict";
|
|
35329
37051
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -41314,7 +43036,7 @@ var require_copy_assets_handler = __commonJS({
|
|
|
41314
43036
|
var fse = require_lib4();
|
|
41315
43037
|
var ignore_1 = require_ignore();
|
|
41316
43038
|
var fg = require_out4();
|
|
41317
|
-
var devkit_1 =
|
|
43039
|
+
var devkit_1 = require_devkit2();
|
|
41318
43040
|
var client_1 = require("nx/src/daemon/client/client");
|
|
41319
43041
|
var defaultFileEventHandler = (events) => {
|
|
41320
43042
|
const dirs = new Set(events.map((event) => path.dirname(event.dest)));
|
|
@@ -41491,7 +43213,7 @@ var require_create_entry_points = __commonJS({
|
|
|
41491
43213
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41492
43214
|
exports.createEntryPoints = void 0;
|
|
41493
43215
|
var fast_glob_1 = require_out4();
|
|
41494
|
-
var devkit_1 =
|
|
43216
|
+
var devkit_1 = require_devkit2();
|
|
41495
43217
|
function createEntryPoints(additionalEntryPoints, root) {
|
|
41496
43218
|
if (!additionalEntryPoints?.length)
|
|
41497
43219
|
return [];
|
|
@@ -41508,6 +43230,191 @@ var require_create_entry_points = __commonJS({
|
|
|
41508
43230
|
}
|
|
41509
43231
|
});
|
|
41510
43232
|
|
|
43233
|
+
// node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/generators/project-name-and-root-utils.js
|
|
43234
|
+
var require_project_name_and_root_utils2 = __commonJS({
|
|
43235
|
+
"node_modules/.pnpm/@nx+devkit@17.0.3_nx@17.0.3/node_modules/@nx/devkit/src/generators/project-name-and-root-utils.js"(exports) {
|
|
43236
|
+
"use strict";
|
|
43237
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43238
|
+
exports.setCwd = exports.determineProjectNameAndRootOptions = void 0;
|
|
43239
|
+
var enquirer_1 = require_enquirer();
|
|
43240
|
+
var path_1 = require("path");
|
|
43241
|
+
var nx_1 = require_nx2();
|
|
43242
|
+
var get_workspace_layout_1 = require_get_workspace_layout2();
|
|
43243
|
+
var names_1 = require_names2();
|
|
43244
|
+
var { joinPathFragments: joinPathFragments3, normalizePath, logger, readJson: readJson2, stripIndents, workspaceRoot } = (0, nx_1.requireNx)();
|
|
43245
|
+
var deprecationWarning = stripIndents`
|
|
43246
|
+
In Nx 18, generating projects will no longer derive the name and root.
|
|
43247
|
+
Please provide the exact project name and root in the future.`;
|
|
43248
|
+
async function determineProjectNameAndRootOptions2(tree, options) {
|
|
43249
|
+
validateName(options.name, options.projectNameAndRootFormat);
|
|
43250
|
+
const formats = getProjectNameAndRootFormats(tree, options);
|
|
43251
|
+
const format = options.projectNameAndRootFormat ?? await determineFormat(tree, formats, options.callingGenerator);
|
|
43252
|
+
return {
|
|
43253
|
+
...formats[format],
|
|
43254
|
+
projectNameAndRootFormat: format
|
|
43255
|
+
};
|
|
43256
|
+
}
|
|
43257
|
+
exports.determineProjectNameAndRootOptions = determineProjectNameAndRootOptions2;
|
|
43258
|
+
function validateName(name, projectNameAndRootFormat) {
|
|
43259
|
+
if (projectNameAndRootFormat === "derived" && name.startsWith("@")) {
|
|
43260
|
+
throw new Error(`The project name "${name}" cannot start with "@" when the "projectNameAndRootFormat" is "derived".`);
|
|
43261
|
+
}
|
|
43262
|
+
const pattern = "(?:^@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*\\/[a-zA-Z0-9-~][a-zA-Z0-9-._~]*|^[a-zA-Z][^:]*)$";
|
|
43263
|
+
const validationRegex = new RegExp(pattern);
|
|
43264
|
+
if (!validationRegex.test(name)) {
|
|
43265
|
+
throw new Error(`The project name should match the pattern "${pattern}". The provided value "${name}" does not match.`);
|
|
43266
|
+
}
|
|
43267
|
+
}
|
|
43268
|
+
function getExample(callingGenerator, formats) {
|
|
43269
|
+
return `Example: nx g ${callingGenerator} ${formats["as-provided"].projectName} --directory ${formats["as-provided"].projectRoot}`;
|
|
43270
|
+
}
|
|
43271
|
+
async function determineFormat(tree, formats, callingGenerator) {
|
|
43272
|
+
if (!formats.derived) {
|
|
43273
|
+
return "as-provided";
|
|
43274
|
+
}
|
|
43275
|
+
if (process.env.NX_INTERACTIVE !== "true" || !isTTY()) {
|
|
43276
|
+
return "derived";
|
|
43277
|
+
}
|
|
43278
|
+
const asProvidedDescription = `As provided:
|
|
43279
|
+
Name: ${formats["as-provided"].projectName}
|
|
43280
|
+
Root: ${formats["as-provided"].projectRoot}`;
|
|
43281
|
+
const asProvidedSelectedValue = `${formats["as-provided"].projectName} @ ${formats["as-provided"].projectRoot}`;
|
|
43282
|
+
const derivedDescription = `Derived:
|
|
43283
|
+
Name: ${formats["derived"].projectName}
|
|
43284
|
+
Root: ${formats["derived"].projectRoot}`;
|
|
43285
|
+
const derivedSelectedValue = `${formats["derived"].projectName} @ ${formats["derived"].projectRoot}`;
|
|
43286
|
+
if (asProvidedSelectedValue === derivedSelectedValue) {
|
|
43287
|
+
return "as-provided";
|
|
43288
|
+
}
|
|
43289
|
+
const result = await (0, enquirer_1.prompt)({
|
|
43290
|
+
type: "select",
|
|
43291
|
+
name: "format",
|
|
43292
|
+
message: "What should be the project name and where should it be generated?",
|
|
43293
|
+
choices: [
|
|
43294
|
+
{
|
|
43295
|
+
message: asProvidedDescription,
|
|
43296
|
+
name: asProvidedSelectedValue
|
|
43297
|
+
},
|
|
43298
|
+
{
|
|
43299
|
+
message: derivedDescription,
|
|
43300
|
+
name: derivedSelectedValue
|
|
43301
|
+
}
|
|
43302
|
+
],
|
|
43303
|
+
initial: "as-provided"
|
|
43304
|
+
}).then(({ format }) => format === asProvidedSelectedValue ? "as-provided" : "derived");
|
|
43305
|
+
if (result === "derived" && callingGenerator) {
|
|
43306
|
+
const example = getExample(callingGenerator, formats);
|
|
43307
|
+
logger.warn(deprecationWarning + "\n" + example);
|
|
43308
|
+
}
|
|
43309
|
+
return result;
|
|
43310
|
+
}
|
|
43311
|
+
function getProjectNameAndRootFormats(tree, options) {
|
|
43312
|
+
const directory = options.directory ? normalizePath(options.directory.replace(/^\.?\//, "")) : void 0;
|
|
43313
|
+
const asProvidedProjectName = options.name;
|
|
43314
|
+
let asProvidedProjectDirectory;
|
|
43315
|
+
const relativeCwd = normalizePath((0, path_1.relative)(workspaceRoot, getCwd())).replace(/\/$/, "");
|
|
43316
|
+
if (directory) {
|
|
43317
|
+
if (directory === relativeCwd || directory.startsWith(`${relativeCwd}/`)) {
|
|
43318
|
+
asProvidedProjectDirectory = directory;
|
|
43319
|
+
} else {
|
|
43320
|
+
asProvidedProjectDirectory = joinPathFragments3(relativeCwd, directory);
|
|
43321
|
+
}
|
|
43322
|
+
} else if (options.rootProject) {
|
|
43323
|
+
asProvidedProjectDirectory = ".";
|
|
43324
|
+
} else {
|
|
43325
|
+
asProvidedProjectDirectory = relativeCwd;
|
|
43326
|
+
if (!relativeCwd.endsWith(asProvidedProjectName) && !relativeCwd.endsWith(options.name)) {
|
|
43327
|
+
asProvidedProjectDirectory = joinPathFragments3(relativeCwd, asProvidedProjectName);
|
|
43328
|
+
}
|
|
43329
|
+
}
|
|
43330
|
+
if (asProvidedProjectName.startsWith("@")) {
|
|
43331
|
+
const nameWithoutScope = asProvidedProjectName.split("/")[1];
|
|
43332
|
+
return {
|
|
43333
|
+
"as-provided": {
|
|
43334
|
+
projectName: asProvidedProjectName,
|
|
43335
|
+
names: {
|
|
43336
|
+
projectSimpleName: nameWithoutScope,
|
|
43337
|
+
projectFileName: nameWithoutScope
|
|
43338
|
+
},
|
|
43339
|
+
importPath: options.importPath ?? asProvidedProjectName,
|
|
43340
|
+
projectRoot: asProvidedProjectDirectory
|
|
43341
|
+
}
|
|
43342
|
+
};
|
|
43343
|
+
}
|
|
43344
|
+
let asProvidedImportPath;
|
|
43345
|
+
let npmScope;
|
|
43346
|
+
if (options.projectType === "library") {
|
|
43347
|
+
asProvidedImportPath = options.importPath;
|
|
43348
|
+
if (!asProvidedImportPath) {
|
|
43349
|
+
npmScope = getNpmScope(tree);
|
|
43350
|
+
asProvidedImportPath = asProvidedProjectDirectory === "." ? readJson2(tree, "package.json").name ?? getImportPath(npmScope, asProvidedProjectName) : getImportPath(npmScope, asProvidedProjectName);
|
|
43351
|
+
}
|
|
43352
|
+
}
|
|
43353
|
+
const name = (0, names_1.names)(options.name).fileName;
|
|
43354
|
+
let { projectDirectory, layoutDirectory } = getDirectories(tree, directory, options.projectType);
|
|
43355
|
+
const derivedProjectDirectoryWithoutLayout = projectDirectory ? `${(0, names_1.names)(projectDirectory).fileName}/${name}` : options.rootProject ? "." : name;
|
|
43356
|
+
const derivedProjectName = derivedProjectDirectoryWithoutLayout === "." ? name : derivedProjectDirectoryWithoutLayout.replace(/\//g, "-");
|
|
43357
|
+
const derivedSimpleProjectName = name;
|
|
43358
|
+
let derivedProjectDirectory = derivedProjectDirectoryWithoutLayout;
|
|
43359
|
+
if (derivedProjectDirectoryWithoutLayout !== ".") {
|
|
43360
|
+
derivedProjectDirectory = joinPathFragments3(layoutDirectory, derivedProjectDirectory);
|
|
43361
|
+
}
|
|
43362
|
+
let derivedImportPath;
|
|
43363
|
+
if (options.projectType === "library") {
|
|
43364
|
+
derivedImportPath = options.importPath;
|
|
43365
|
+
if (!derivedImportPath) {
|
|
43366
|
+
derivedImportPath = derivedProjectDirectory === "." ? readJson2(tree, "package.json").name ?? getImportPath(npmScope, derivedProjectName) : getImportPath(npmScope, derivedProjectDirectoryWithoutLayout);
|
|
43367
|
+
}
|
|
43368
|
+
}
|
|
43369
|
+
return {
|
|
43370
|
+
"as-provided": {
|
|
43371
|
+
projectName: asProvidedProjectName,
|
|
43372
|
+
names: {
|
|
43373
|
+
projectSimpleName: asProvidedProjectName,
|
|
43374
|
+
projectFileName: asProvidedProjectName
|
|
43375
|
+
},
|
|
43376
|
+
importPath: asProvidedImportPath,
|
|
43377
|
+
projectRoot: asProvidedProjectDirectory
|
|
43378
|
+
},
|
|
43379
|
+
derived: {
|
|
43380
|
+
projectName: derivedProjectName,
|
|
43381
|
+
names: {
|
|
43382
|
+
projectSimpleName: derivedSimpleProjectName,
|
|
43383
|
+
projectFileName: derivedProjectName
|
|
43384
|
+
},
|
|
43385
|
+
importPath: derivedImportPath,
|
|
43386
|
+
projectRoot: derivedProjectDirectory
|
|
43387
|
+
}
|
|
43388
|
+
};
|
|
43389
|
+
}
|
|
43390
|
+
function getDirectories(tree, directory, projectType) {
|
|
43391
|
+
let { projectDirectory, layoutDirectory } = (0, get_workspace_layout_1.extractLayoutDirectory)(directory);
|
|
43392
|
+
if (!layoutDirectory) {
|
|
43393
|
+
const { appsDir, libsDir } = (0, get_workspace_layout_1.getWorkspaceLayout)(tree);
|
|
43394
|
+
layoutDirectory = projectType === "application" ? appsDir : libsDir;
|
|
43395
|
+
}
|
|
43396
|
+
return { projectDirectory, layoutDirectory };
|
|
43397
|
+
}
|
|
43398
|
+
function getImportPath(npmScope, name) {
|
|
43399
|
+
return npmScope ? `${npmScope === "@" ? "" : "@"}${npmScope}/${name}` : name;
|
|
43400
|
+
}
|
|
43401
|
+
function getNpmScope(tree) {
|
|
43402
|
+
const { name } = tree.exists("package.json") ? readJson2(tree, "package.json") : { name: null };
|
|
43403
|
+
return name?.startsWith("@") ? name.split("/")[0].substring(1) : void 0;
|
|
43404
|
+
}
|
|
43405
|
+
function isTTY() {
|
|
43406
|
+
return !!process.stdout.isTTY && process.env["CI"] !== "true";
|
|
43407
|
+
}
|
|
43408
|
+
function getCwd() {
|
|
43409
|
+
return process.env.INIT_CWD?.startsWith(workspaceRoot) ? process.env.INIT_CWD : process.cwd();
|
|
43410
|
+
}
|
|
43411
|
+
function setCwd(path) {
|
|
43412
|
+
process.env.INIT_CWD = (0, path_1.join)(workspaceRoot, path);
|
|
43413
|
+
}
|
|
43414
|
+
exports.setCwd = setCwd;
|
|
43415
|
+
}
|
|
43416
|
+
});
|
|
43417
|
+
|
|
41511
43418
|
// node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/src/utils/minimal-publish-script.js
|
|
41512
43419
|
var require_minimal_publish_script = __commonJS({
|
|
41513
43420
|
"node_modules/.pnpm/@nx+js@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_nx@17.0.3_typescript@5.2.2_verdaccio@5.27.0/node_modules/@nx/js/src/utils/minimal-publish-script.js"(exports) {
|
|
@@ -41641,8 +43548,8 @@ var require_add_swc_dependencies = __commonJS({
|
|
|
41641
43548
|
"use strict";
|
|
41642
43549
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41643
43550
|
exports.addSwcRegisterDependencies = exports.addSwcDependencies = void 0;
|
|
41644
|
-
var devkit_1 =
|
|
41645
|
-
var versions_1 =
|
|
43551
|
+
var devkit_1 = require_devkit2();
|
|
43552
|
+
var versions_1 = require_versions3();
|
|
41646
43553
|
function addSwcDependencies(tree) {
|
|
41647
43554
|
return (0, devkit_1.addDependenciesToPackageJson)(tree, {
|
|
41648
43555
|
"@swc/helpers": versions_1.swcHelpersVersion
|
|
@@ -41689,12 +43596,12 @@ var require_init = __commonJS({
|
|
|
41689
43596
|
"use strict";
|
|
41690
43597
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41691
43598
|
exports.initGenerator = void 0;
|
|
41692
|
-
var devkit_1 =
|
|
43599
|
+
var devkit_1 = require_devkit2();
|
|
41693
43600
|
var semver_1 = require_semver3();
|
|
41694
43601
|
var package_json_1 = require("nx/src/utils/package-json");
|
|
41695
43602
|
var semver_2 = require_semver2();
|
|
41696
43603
|
var ts_config_1 = require_ts_config();
|
|
41697
|
-
var versions_1 =
|
|
43604
|
+
var versions_1 = require_versions3();
|
|
41698
43605
|
var path_1 = require("path");
|
|
41699
43606
|
async function getInstalledTypescriptVersion(tree) {
|
|
41700
43607
|
const rootPackageJson = (0, devkit_1.readJson)(tree, "package.json");
|
|
@@ -41797,9 +43704,9 @@ var require_generator = __commonJS({
|
|
|
41797
43704
|
"use strict";
|
|
41798
43705
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41799
43706
|
exports.setupVerdaccio = void 0;
|
|
41800
|
-
var devkit_1 =
|
|
43707
|
+
var devkit_1 = require_devkit2();
|
|
41801
43708
|
var path = require("path");
|
|
41802
|
-
var versions_1 =
|
|
43709
|
+
var versions_1 = require_versions3();
|
|
41803
43710
|
var child_process_1 = require("child_process");
|
|
41804
43711
|
async function setupVerdaccio2(tree, options) {
|
|
41805
43712
|
if (!tree.exists(".verdaccio/config.yml")) {
|
|
@@ -41869,7 +43776,7 @@ var require_ast_utils2 = __commonJS({
|
|
|
41869
43776
|
"use strict";
|
|
41870
43777
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41871
43778
|
exports.generateAst = exports.mapFilePath = exports.mapFilePaths = exports.generateFlatOverride = exports.generateRequire = exports.stringifyNodeList = exports.generatePluginExtendsElement = exports.generateSpreadElement = exports.createNodeList = exports.addCompatToFlatConfig = exports.addPluginsToExportsBlock = exports.removeCompatExtends = exports.removePlugin = exports.addBlockToFlatConfigExport = exports.addImportToFlatConfig = exports.replaceOverride = exports.hasOverride = exports.removeOverridesFromLintConfig = void 0;
|
|
41872
|
-
var devkit_1 =
|
|
43779
|
+
var devkit_1 = require_devkit2();
|
|
41873
43780
|
var ts = require("typescript");
|
|
41874
43781
|
function removeOverridesFromLintConfig(content) {
|
|
41875
43782
|
const source = ts.createSourceFile("", content, ts.ScriptTarget.Latest, true, ts.ScriptKind.JS);
|
|
@@ -42343,7 +44250,7 @@ var require_eslint_file = __commonJS({
|
|
|
42343
44250
|
"use strict";
|
|
42344
44251
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42345
44252
|
exports.getPluginImport = exports.addIgnoresToLintConfig = exports.addPluginsToLintConfig = exports.addExtendsToLintConfig = exports.replaceOverridesInLintConfig = exports.lintConfigHasOverride = exports.updateOverrideInLintConfig = exports.addOverrideToLintConfig = exports.updateRelativePathsInConfig = exports.isEslintConfigSupported = exports.findEslintFile = exports.baseEsLintFlatConfigFile = exports.baseEsLintConfigFile = exports.eslintConfigFileWhitelist = void 0;
|
|
42346
|
-
var devkit_1 =
|
|
44253
|
+
var devkit_1 = require_devkit2();
|
|
42347
44254
|
var flat_config_1 = require_flat_config();
|
|
42348
44255
|
var ast_utils_1 = require_ast_utils2();
|
|
42349
44256
|
exports.eslintConfigFileWhitelist = [
|
|
@@ -42656,7 +44563,7 @@ var require_package4 = __commonJS({
|
|
|
42656
44563
|
});
|
|
42657
44564
|
|
|
42658
44565
|
// node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/utils/versions.js
|
|
42659
|
-
var
|
|
44566
|
+
var require_versions5 = __commonJS({
|
|
42660
44567
|
"node_modules/.pnpm/@nx+eslint@17.0.3_@swc-node+register@1.6.8_@swc+core@1.3.96_@types+node@20.9.0_eslint@8.53.0_nx@17.0.3_verdaccio@5.27.0/node_modules/@nx/eslint/src/utils/versions.js"(exports) {
|
|
42661
44568
|
"use strict";
|
|
42662
44569
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -42763,8 +44670,8 @@ var require_init2 = __commonJS({
|
|
|
42763
44670
|
"use strict";
|
|
42764
44671
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42765
44672
|
exports.lintInitGenerator = void 0;
|
|
42766
|
-
var devkit_1 =
|
|
42767
|
-
var versions_1 =
|
|
44673
|
+
var devkit_1 = require_devkit2();
|
|
44674
|
+
var versions_1 = require_versions5();
|
|
42768
44675
|
var eslint_file_1 = require_eslint_file();
|
|
42769
44676
|
var global_eslint_config_1 = require_global_eslint_config();
|
|
42770
44677
|
function addTargetDefaults(tree) {
|
|
@@ -42829,12 +44736,12 @@ var require_init_migration = __commonJS({
|
|
|
42829
44736
|
"use strict";
|
|
42830
44737
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42831
44738
|
exports.findLintTarget = exports.migrateConfigToMonorepoStyle = void 0;
|
|
42832
|
-
var devkit_1 =
|
|
44739
|
+
var devkit_1 = require_devkit2();
|
|
42833
44740
|
var path_1 = require("path");
|
|
42834
44741
|
var eslint_file_1 = require_eslint_file();
|
|
42835
44742
|
var global_eslint_config_1 = require_global_eslint_config();
|
|
42836
44743
|
var flat_config_1 = require_flat_config();
|
|
42837
|
-
var versions_1 =
|
|
44744
|
+
var versions_1 = require_versions5();
|
|
42838
44745
|
var ast_utils_1 = require_ast_utils2();
|
|
42839
44746
|
function migrateConfigToMonorepoStyle(projects, tree, unitTestRunner) {
|
|
42840
44747
|
if ((0, flat_config_1.useFlatConfig)(tree)) {
|
|
@@ -42920,7 +44827,7 @@ var require_lint_project = __commonJS({
|
|
|
42920
44827
|
"use strict";
|
|
42921
44828
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42922
44829
|
exports.lintProjectGenerator = exports.mapLintPattern = void 0;
|
|
42923
|
-
var devkit_1 =
|
|
44830
|
+
var devkit_1 = require_devkit2();
|
|
42924
44831
|
var eslint_file_1 = require_eslint_file();
|
|
42925
44832
|
var path_1 = require("path");
|
|
42926
44833
|
var init_1 = require_init2();
|
|
@@ -43091,14 +44998,14 @@ var require_library = __commonJS({
|
|
|
43091
44998
|
"use strict";
|
|
43092
44999
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43093
45000
|
exports.addLint = exports.libraryGeneratorInternal = exports.libraryGenerator = void 0;
|
|
43094
|
-
var devkit_1 =
|
|
43095
|
-
var project_name_and_root_utils_1 =
|
|
45001
|
+
var devkit_1 = require_devkit2();
|
|
45002
|
+
var project_name_and_root_utils_1 = require_project_name_and_root_utils2();
|
|
43096
45003
|
var ts_config_1 = require_ts_config();
|
|
43097
45004
|
var path_1 = require("path");
|
|
43098
45005
|
var minimal_publish_script_1 = require_minimal_publish_script();
|
|
43099
45006
|
var add_swc_config_1 = require_add_swc_config();
|
|
43100
45007
|
var add_swc_dependencies_1 = require_add_swc_dependencies();
|
|
43101
|
-
var versions_1 =
|
|
45008
|
+
var versions_1 = require_versions3();
|
|
43102
45009
|
var init_1 = require_init();
|
|
43103
45010
|
var generator_1 = require_generator();
|
|
43104
45011
|
var create_ts_config_1 = require_create_ts_config();
|
|
@@ -43652,7 +45559,7 @@ var require_src = __commonJS({
|
|
|
43652
45559
|
tslib_1.__exportStar(require_ts_config(), exports);
|
|
43653
45560
|
tslib_1.__exportStar(require_create_ts_config(), exports);
|
|
43654
45561
|
tslib_1.__exportStar(require_ast_utils(), exports);
|
|
43655
|
-
tslib_1.__exportStar(
|
|
45562
|
+
tslib_1.__exportStar(require_package_json3(), exports);
|
|
43656
45563
|
tslib_1.__exportStar(require_assets(), exports);
|
|
43657
45564
|
tslib_1.__exportStar(require_update_package_json(), exports);
|
|
43658
45565
|
tslib_1.__exportStar(require_create_entry_points(), exports);
|