@create-node-app/core 0.3.13 → 0.3.14
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/dist/index.js +57 -5
- package/dist/index.mjs +57 -5
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -2954,6 +2954,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
2954
2954
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
2955
2955
|
});
|
|
2956
2956
|
};
|
|
2957
|
+
function pathspec(...paths) {
|
|
2958
|
+
const key = new String(paths);
|
|
2959
|
+
cache.set(key, paths);
|
|
2960
|
+
return key;
|
|
2961
|
+
}
|
|
2957
2962
|
function isPathSpec(path4) {
|
|
2958
2963
|
return path4 instanceof String && cache.has(path4);
|
|
2959
2964
|
}
|
|
@@ -3096,6 +3101,12 @@ function pick(source, properties) {
|
|
|
3096
3101
|
function delay(duration = 0) {
|
|
3097
3102
|
return new Promise((done) => setTimeout(done, duration));
|
|
3098
3103
|
}
|
|
3104
|
+
function orVoid(input) {
|
|
3105
|
+
if (input === false) {
|
|
3106
|
+
return void 0;
|
|
3107
|
+
}
|
|
3108
|
+
return input;
|
|
3109
|
+
}
|
|
3099
3110
|
var NULL;
|
|
3100
3111
|
var NOOP;
|
|
3101
3112
|
var objectToString;
|
|
@@ -3352,6 +3363,7 @@ __export2(utils_exports, {
|
|
|
3352
3363
|
isUserFunction: () => isUserFunction,
|
|
3353
3364
|
last: () => last,
|
|
3354
3365
|
objectToString: () => objectToString,
|
|
3366
|
+
orVoid: () => orVoid,
|
|
3355
3367
|
parseStringResponse: () => parseStringResponse,
|
|
3356
3368
|
pick: () => pick,
|
|
3357
3369
|
prefixedArray: () => prefixedArray,
|
|
@@ -3786,6 +3798,28 @@ var init_config = __esm({
|
|
|
3786
3798
|
})(GitConfigScope || {});
|
|
3787
3799
|
}
|
|
3788
3800
|
});
|
|
3801
|
+
function isDiffNameStatus(input) {
|
|
3802
|
+
return diffNameStatus.has(input);
|
|
3803
|
+
}
|
|
3804
|
+
var DiffNameStatus;
|
|
3805
|
+
var diffNameStatus;
|
|
3806
|
+
var init_diff_name_status = __esm({
|
|
3807
|
+
"src/lib/tasks/diff-name-status.ts"() {
|
|
3808
|
+
DiffNameStatus = /* @__PURE__ */ ((DiffNameStatus2) => {
|
|
3809
|
+
DiffNameStatus2["ADDED"] = "A";
|
|
3810
|
+
DiffNameStatus2["COPIED"] = "C";
|
|
3811
|
+
DiffNameStatus2["DELETED"] = "D";
|
|
3812
|
+
DiffNameStatus2["MODIFIED"] = "M";
|
|
3813
|
+
DiffNameStatus2["RENAMED"] = "R";
|
|
3814
|
+
DiffNameStatus2["CHANGED"] = "T";
|
|
3815
|
+
DiffNameStatus2["UNMERGED"] = "U";
|
|
3816
|
+
DiffNameStatus2["UNKNOWN"] = "X";
|
|
3817
|
+
DiffNameStatus2["BROKEN"] = "B";
|
|
3818
|
+
return DiffNameStatus2;
|
|
3819
|
+
})(DiffNameStatus || {});
|
|
3820
|
+
diffNameStatus = new Set(Object.values(DiffNameStatus));
|
|
3821
|
+
}
|
|
3822
|
+
});
|
|
3789
3823
|
function grepQueryBuilder(...params) {
|
|
3790
3824
|
return new GrepQuery().param(...params);
|
|
3791
3825
|
}
|
|
@@ -4402,6 +4436,19 @@ var init_commit = __esm({
|
|
|
4402
4436
|
init_task();
|
|
4403
4437
|
}
|
|
4404
4438
|
});
|
|
4439
|
+
function first_commit_default() {
|
|
4440
|
+
return {
|
|
4441
|
+
firstCommit() {
|
|
4442
|
+
return this._runTask(straightThroughStringTask(["rev-list", "--max-parents=0", "HEAD"], true), trailingFunctionArgument(arguments));
|
|
4443
|
+
}
|
|
4444
|
+
};
|
|
4445
|
+
}
|
|
4446
|
+
var init_first_commit = __esm({
|
|
4447
|
+
"src/lib/tasks/first-commit.ts"() {
|
|
4448
|
+
init_utils();
|
|
4449
|
+
init_task();
|
|
4450
|
+
}
|
|
4451
|
+
});
|
|
4405
4452
|
function hashObjectTask(filePath, write) {
|
|
4406
4453
|
const commands = ["hash-object", filePath];
|
|
4407
4454
|
if (write) {
|
|
@@ -4518,6 +4565,7 @@ var init_parse_diff_summary = __esm({
|
|
|
4518
4565
|
"src/lib/parsers/parse-diff-summary.ts"() {
|
|
4519
4566
|
init_log_format();
|
|
4520
4567
|
init_DiffSummary();
|
|
4568
|
+
init_diff_name_status();
|
|
4521
4569
|
init_utils();
|
|
4522
4570
|
statParser = [
|
|
4523
4571
|
new LineParser(/(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/, (result, [file, changes, alterations = ""]) => {
|
|
@@ -4583,11 +4631,12 @@ var init_parse_diff_summary = __esm({
|
|
|
4583
4631
|
})
|
|
4584
4632
|
];
|
|
4585
4633
|
nameStatusParser = [
|
|
4586
|
-
new LineParser(/([ACDMRTUXB])\
|
|
4634
|
+
new LineParser(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/, (result, [status, _similarity, from, _to, to]) => {
|
|
4587
4635
|
result.changed++;
|
|
4588
4636
|
result.files.push({
|
|
4589
|
-
file,
|
|
4637
|
+
file: to != null ? to : from,
|
|
4590
4638
|
changes: 0,
|
|
4639
|
+
status: orVoid(isDiffNameStatus(status) && status),
|
|
4591
4640
|
insertions: 0,
|
|
4592
4641
|
deletions: 0,
|
|
4593
4642
|
binary: false
|
|
@@ -4735,7 +4784,7 @@ function parseLogOptions(opt = {}, customArgs = []) {
|
|
|
4735
4784
|
suffix.push(`${opt.from || ""}${rangeOperator}${opt.to || ""}`);
|
|
4736
4785
|
}
|
|
4737
4786
|
if (filterString(opt.file)) {
|
|
4738
|
-
|
|
4787
|
+
command.push("--follow", pathspec(opt.file));
|
|
4739
4788
|
}
|
|
4740
4789
|
appendTaskOptions(userOptions(opt), command);
|
|
4741
4790
|
return {
|
|
@@ -4772,6 +4821,7 @@ var excludeOptions;
|
|
|
4772
4821
|
var init_log = __esm({
|
|
4773
4822
|
"src/lib/tasks/log.ts"() {
|
|
4774
4823
|
init_log_format();
|
|
4824
|
+
init_pathspec();
|
|
4775
4825
|
init_parse_list_log_summary();
|
|
4776
4826
|
init_utils();
|
|
4777
4827
|
init_task();
|
|
@@ -5431,6 +5481,7 @@ var init_simple_git_api = __esm({
|
|
|
5431
5481
|
init_checkout();
|
|
5432
5482
|
init_commit();
|
|
5433
5483
|
init_config();
|
|
5484
|
+
init_first_commit();
|
|
5434
5485
|
init_grep();
|
|
5435
5486
|
init_hash_object();
|
|
5436
5487
|
init_init();
|
|
@@ -5504,7 +5555,7 @@ var init_simple_git_api = __esm({
|
|
|
5504
5555
|
return this._runTask(statusTask(getTrailingOptions(arguments)), trailingFunctionArgument(arguments));
|
|
5505
5556
|
}
|
|
5506
5557
|
};
|
|
5507
|
-
Object.assign(SimpleGitApi.prototype, checkout_default(), commit_default(), config_default(), grep_default(), log_default(), show_default(), version_default());
|
|
5558
|
+
Object.assign(SimpleGitApi.prototype, checkout_default(), commit_default(), config_default(), first_commit_default(), grep_default(), log_default(), show_default(), version_default());
|
|
5508
5559
|
}
|
|
5509
5560
|
});
|
|
5510
5561
|
var scheduler_exports = {};
|
|
@@ -6450,6 +6501,7 @@ init_task_configuration_error();
|
|
|
6450
6501
|
init_check_is_repo();
|
|
6451
6502
|
init_clean();
|
|
6452
6503
|
init_config();
|
|
6504
|
+
init_diff_name_status();
|
|
6453
6505
|
init_grep();
|
|
6454
6506
|
init_reset();
|
|
6455
6507
|
function abortPlugin(signal) {
|
|
@@ -7782,7 +7834,7 @@ var createApp = async ({
|
|
|
7782
7834
|
console.log();
|
|
7783
7835
|
const useYarn = customOptions.packageManager === "yarn" && shouldUseYarn();
|
|
7784
7836
|
const usePnpm = customOptions.packageManager === "pnpm" && shouldUsePnpm();
|
|
7785
|
-
const runCommand = useYarn ? "yarn" : "npm run";
|
|
7837
|
+
const runCommand = useYarn ? "yarn" : usePnpm ? "pnpm run" : "npm run";
|
|
7786
7838
|
const installCommand = useYarn ? "yarn" : usePnpm ? "pnpm install" : "npm install";
|
|
7787
7839
|
const { packageJson, dependencies, devDependencies } = await loadPackages({
|
|
7788
7840
|
templatesOrExtensions,
|
package/dist/index.mjs
CHANGED
|
@@ -2947,6 +2947,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
2947
2947
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
2948
2948
|
});
|
|
2949
2949
|
};
|
|
2950
|
+
function pathspec(...paths) {
|
|
2951
|
+
const key = new String(paths);
|
|
2952
|
+
cache.set(key, paths);
|
|
2953
|
+
return key;
|
|
2954
|
+
}
|
|
2950
2955
|
function isPathSpec(path4) {
|
|
2951
2956
|
return path4 instanceof String && cache.has(path4);
|
|
2952
2957
|
}
|
|
@@ -3089,6 +3094,12 @@ function pick(source, properties) {
|
|
|
3089
3094
|
function delay(duration = 0) {
|
|
3090
3095
|
return new Promise((done) => setTimeout(done, duration));
|
|
3091
3096
|
}
|
|
3097
|
+
function orVoid(input) {
|
|
3098
|
+
if (input === false) {
|
|
3099
|
+
return void 0;
|
|
3100
|
+
}
|
|
3101
|
+
return input;
|
|
3102
|
+
}
|
|
3092
3103
|
var NULL;
|
|
3093
3104
|
var NOOP;
|
|
3094
3105
|
var objectToString;
|
|
@@ -3345,6 +3356,7 @@ __export(utils_exports, {
|
|
|
3345
3356
|
isUserFunction: () => isUserFunction,
|
|
3346
3357
|
last: () => last,
|
|
3347
3358
|
objectToString: () => objectToString,
|
|
3359
|
+
orVoid: () => orVoid,
|
|
3348
3360
|
parseStringResponse: () => parseStringResponse,
|
|
3349
3361
|
pick: () => pick,
|
|
3350
3362
|
prefixedArray: () => prefixedArray,
|
|
@@ -3779,6 +3791,28 @@ var init_config = __esm({
|
|
|
3779
3791
|
})(GitConfigScope || {});
|
|
3780
3792
|
}
|
|
3781
3793
|
});
|
|
3794
|
+
function isDiffNameStatus(input) {
|
|
3795
|
+
return diffNameStatus.has(input);
|
|
3796
|
+
}
|
|
3797
|
+
var DiffNameStatus;
|
|
3798
|
+
var diffNameStatus;
|
|
3799
|
+
var init_diff_name_status = __esm({
|
|
3800
|
+
"src/lib/tasks/diff-name-status.ts"() {
|
|
3801
|
+
DiffNameStatus = /* @__PURE__ */ ((DiffNameStatus2) => {
|
|
3802
|
+
DiffNameStatus2["ADDED"] = "A";
|
|
3803
|
+
DiffNameStatus2["COPIED"] = "C";
|
|
3804
|
+
DiffNameStatus2["DELETED"] = "D";
|
|
3805
|
+
DiffNameStatus2["MODIFIED"] = "M";
|
|
3806
|
+
DiffNameStatus2["RENAMED"] = "R";
|
|
3807
|
+
DiffNameStatus2["CHANGED"] = "T";
|
|
3808
|
+
DiffNameStatus2["UNMERGED"] = "U";
|
|
3809
|
+
DiffNameStatus2["UNKNOWN"] = "X";
|
|
3810
|
+
DiffNameStatus2["BROKEN"] = "B";
|
|
3811
|
+
return DiffNameStatus2;
|
|
3812
|
+
})(DiffNameStatus || {});
|
|
3813
|
+
diffNameStatus = new Set(Object.values(DiffNameStatus));
|
|
3814
|
+
}
|
|
3815
|
+
});
|
|
3782
3816
|
function grepQueryBuilder(...params) {
|
|
3783
3817
|
return new GrepQuery().param(...params);
|
|
3784
3818
|
}
|
|
@@ -4395,6 +4429,19 @@ var init_commit = __esm({
|
|
|
4395
4429
|
init_task();
|
|
4396
4430
|
}
|
|
4397
4431
|
});
|
|
4432
|
+
function first_commit_default() {
|
|
4433
|
+
return {
|
|
4434
|
+
firstCommit() {
|
|
4435
|
+
return this._runTask(straightThroughStringTask(["rev-list", "--max-parents=0", "HEAD"], true), trailingFunctionArgument(arguments));
|
|
4436
|
+
}
|
|
4437
|
+
};
|
|
4438
|
+
}
|
|
4439
|
+
var init_first_commit = __esm({
|
|
4440
|
+
"src/lib/tasks/first-commit.ts"() {
|
|
4441
|
+
init_utils();
|
|
4442
|
+
init_task();
|
|
4443
|
+
}
|
|
4444
|
+
});
|
|
4398
4445
|
function hashObjectTask(filePath, write) {
|
|
4399
4446
|
const commands = ["hash-object", filePath];
|
|
4400
4447
|
if (write) {
|
|
@@ -4511,6 +4558,7 @@ var init_parse_diff_summary = __esm({
|
|
|
4511
4558
|
"src/lib/parsers/parse-diff-summary.ts"() {
|
|
4512
4559
|
init_log_format();
|
|
4513
4560
|
init_DiffSummary();
|
|
4561
|
+
init_diff_name_status();
|
|
4514
4562
|
init_utils();
|
|
4515
4563
|
statParser = [
|
|
4516
4564
|
new LineParser(/(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/, (result, [file, changes, alterations = ""]) => {
|
|
@@ -4576,11 +4624,12 @@ var init_parse_diff_summary = __esm({
|
|
|
4576
4624
|
})
|
|
4577
4625
|
];
|
|
4578
4626
|
nameStatusParser = [
|
|
4579
|
-
new LineParser(/([ACDMRTUXB])\
|
|
4627
|
+
new LineParser(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/, (result, [status, _similarity, from, _to, to]) => {
|
|
4580
4628
|
result.changed++;
|
|
4581
4629
|
result.files.push({
|
|
4582
|
-
file,
|
|
4630
|
+
file: to != null ? to : from,
|
|
4583
4631
|
changes: 0,
|
|
4632
|
+
status: orVoid(isDiffNameStatus(status) && status),
|
|
4584
4633
|
insertions: 0,
|
|
4585
4634
|
deletions: 0,
|
|
4586
4635
|
binary: false
|
|
@@ -4728,7 +4777,7 @@ function parseLogOptions(opt = {}, customArgs = []) {
|
|
|
4728
4777
|
suffix.push(`${opt.from || ""}${rangeOperator}${opt.to || ""}`);
|
|
4729
4778
|
}
|
|
4730
4779
|
if (filterString(opt.file)) {
|
|
4731
|
-
|
|
4780
|
+
command.push("--follow", pathspec(opt.file));
|
|
4732
4781
|
}
|
|
4733
4782
|
appendTaskOptions(userOptions(opt), command);
|
|
4734
4783
|
return {
|
|
@@ -4765,6 +4814,7 @@ var excludeOptions;
|
|
|
4765
4814
|
var init_log = __esm({
|
|
4766
4815
|
"src/lib/tasks/log.ts"() {
|
|
4767
4816
|
init_log_format();
|
|
4817
|
+
init_pathspec();
|
|
4768
4818
|
init_parse_list_log_summary();
|
|
4769
4819
|
init_utils();
|
|
4770
4820
|
init_task();
|
|
@@ -5424,6 +5474,7 @@ var init_simple_git_api = __esm({
|
|
|
5424
5474
|
init_checkout();
|
|
5425
5475
|
init_commit();
|
|
5426
5476
|
init_config();
|
|
5477
|
+
init_first_commit();
|
|
5427
5478
|
init_grep();
|
|
5428
5479
|
init_hash_object();
|
|
5429
5480
|
init_init();
|
|
@@ -5497,7 +5548,7 @@ var init_simple_git_api = __esm({
|
|
|
5497
5548
|
return this._runTask(statusTask(getTrailingOptions(arguments)), trailingFunctionArgument(arguments));
|
|
5498
5549
|
}
|
|
5499
5550
|
};
|
|
5500
|
-
Object.assign(SimpleGitApi.prototype, checkout_default(), commit_default(), config_default(), grep_default(), log_default(), show_default(), version_default());
|
|
5551
|
+
Object.assign(SimpleGitApi.prototype, checkout_default(), commit_default(), config_default(), first_commit_default(), grep_default(), log_default(), show_default(), version_default());
|
|
5501
5552
|
}
|
|
5502
5553
|
});
|
|
5503
5554
|
var scheduler_exports = {};
|
|
@@ -6443,6 +6494,7 @@ init_task_configuration_error();
|
|
|
6443
6494
|
init_check_is_repo();
|
|
6444
6495
|
init_clean();
|
|
6445
6496
|
init_config();
|
|
6497
|
+
init_diff_name_status();
|
|
6446
6498
|
init_grep();
|
|
6447
6499
|
init_reset();
|
|
6448
6500
|
function abortPlugin(signal) {
|
|
@@ -7775,7 +7827,7 @@ var createApp = async ({
|
|
|
7775
7827
|
console.log();
|
|
7776
7828
|
const useYarn = customOptions.packageManager === "yarn" && shouldUseYarn();
|
|
7777
7829
|
const usePnpm = customOptions.packageManager === "pnpm" && shouldUsePnpm();
|
|
7778
|
-
const runCommand = useYarn ? "yarn" : "npm run";
|
|
7830
|
+
const runCommand = useYarn ? "yarn" : usePnpm ? "pnpm run" : "npm run";
|
|
7779
7831
|
const installCommand = useYarn ? "yarn" : usePnpm ? "pnpm install" : "npm install";
|
|
7780
7832
|
const { packageJson, dependencies, devDependencies } = await loadPackages({
|
|
7781
7833
|
templatesOrExtensions,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@create-node-app/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.14",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"@types/download": "^8.0.2",
|
|
28
28
|
"@types/envinfo": "^7.8.1",
|
|
29
29
|
"@types/fs-extra": "^11.0.2",
|
|
30
|
-
"@types/lodash.merge": "^4.6.
|
|
30
|
+
"@types/lodash.merge": "^4.6.9",
|
|
31
31
|
"@types/node": "^18.14.6",
|
|
32
32
|
"@types/underscore": "^1.11.4",
|
|
33
33
|
"eslint": "^7.32.0",
|
|
34
|
-
"simple-git": "^3.
|
|
34
|
+
"simple-git": "^3.22.0",
|
|
35
35
|
"tsconfig": "*",
|
|
36
36
|
"typescript": "^4.5.2"
|
|
37
37
|
},
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"commander": "^7.0.0",
|
|
41
41
|
"cross-spawn": "^6.0.5",
|
|
42
42
|
"debug": "^4.2.0",
|
|
43
|
-
"download": "^
|
|
43
|
+
"download": "^3.3.0",
|
|
44
44
|
"envinfo": "^7.10.0",
|
|
45
45
|
"lodash.merge": "^4.6.2",
|
|
46
46
|
"readdirp": "^3.4.0",
|