complete-cli 1.0.31 → 1.0.32
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/git.js +6 -6
- package/dist/prompt.js +5 -3
- package/package.json +6 -6
- package/src/git.ts +6 -6
- package/src/prompt.ts +5 -3
package/dist/git.js
CHANGED
|
@@ -119,15 +119,15 @@ export async function initGitRepository(projectPath, gitRemoteURL) {
|
|
|
119
119
|
if (gitRemoteURL === undefined) {
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
|
-
const $$ = $q({ cwd: projectPath });
|
|
123
|
-
await $$ `git init --initial-branch main`;
|
|
124
|
-
await $$ `git remote add origin ${gitRemoteURL}`;
|
|
122
|
+
const $$q = $q({ cwd: projectPath });
|
|
123
|
+
await $$q `git init --initial-branch main`;
|
|
124
|
+
await $$q `git remote add origin ${gitRemoteURL}`;
|
|
125
125
|
const gitNameAndEmailConfigured = await isGitNameAndEmailConfigured();
|
|
126
126
|
if (gitNameAndEmailConfigured) {
|
|
127
|
-
await $$ `git add --all`;
|
|
127
|
+
await $$q `git add --all`;
|
|
128
128
|
const commitMessage = `chore: add files from ${PROJECT_NAME} ${PROJECT_VERSION} template`;
|
|
129
|
-
await $$ `git commit --message ${commitMessage}`;
|
|
130
|
-
await $$ `git push --set-upstream origin main`;
|
|
129
|
+
await $$q `git commit --message ${commitMessage}`;
|
|
130
|
+
await $$q `git push --set-upstream origin main`;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
async function isGitNameAndEmailConfigured() {
|
package/dist/prompt.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Both the Inquirer.js library and the Prompts library have a bug where text is duplicated in a Git
|
|
2
2
|
// Bash terminal. Thus, we revert to using the simpler Prompt library.
|
|
3
|
-
import { cancel, confirm, intro, isCancel, log, outro, spinner, text, } from "@clack
|
|
3
|
+
import { cancel, confirm, intro, isCancel, log, outro, spinner, text, } from "@zamiell/clack-prompts";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
import { PROJECT_NAME } from "./constants.js";
|
|
6
6
|
export function promptStart() {
|
|
@@ -31,8 +31,10 @@ export async function getInputString(msg, defaultValue) {
|
|
|
31
31
|
cancel("Canceled.");
|
|
32
32
|
process.exit(1);
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
// The "text" return type is bugged: "input" is equal to "undefined" if the user did not enter any
|
|
35
|
+
// input.
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
37
|
+
if (input === undefined || input.trim() === "") {
|
|
36
38
|
promptError("You must enter a non-empty value.");
|
|
37
39
|
}
|
|
38
40
|
return input.trim();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "complete-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"description": "A command line tool for bootstrapping TypeScript projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript"
|
|
@@ -34,22 +34,22 @@
|
|
|
34
34
|
"test": "glob \"./src/**/*.test.ts\" --cmd=\"node --import tsx --test --test-reporter spec\""
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@clack
|
|
37
|
+
"@zamiell/clack-prompts": "0.10.2",
|
|
38
38
|
"chalk": "5.4.1",
|
|
39
39
|
"clipanion": "4.0.0-rc.4",
|
|
40
|
-
"complete-common": "1.
|
|
41
|
-
"complete-node": "5.1.
|
|
40
|
+
"complete-common": "2.1.0",
|
|
41
|
+
"complete-node": "5.1.2",
|
|
42
42
|
"klaw-sync": "6.0.0",
|
|
43
43
|
"yaml": "2.7.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/klaw-sync": "6.0.5",
|
|
47
|
-
"@types/node": "22.13.
|
|
47
|
+
"@types/node": "22.13.10",
|
|
48
48
|
"glob": "11.0.1",
|
|
49
49
|
"ts-loader": "9.5.2",
|
|
50
50
|
"tsconfig-paths-webpack-plugin": "4.2.0",
|
|
51
51
|
"typescript": "5.8.2",
|
|
52
|
-
"typescript-eslint": "8.26.
|
|
52
|
+
"typescript-eslint": "8.26.1",
|
|
53
53
|
"webpack": "5.98.0",
|
|
54
54
|
"webpack-cli": "6.0.1",
|
|
55
55
|
"webpack-shebang-plugin": "1.1.8"
|
package/src/git.ts
CHANGED
|
@@ -163,17 +163,17 @@ export async function initGitRepository(
|
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
const $$ = $q({ cwd: projectPath });
|
|
166
|
+
const $$q = $q({ cwd: projectPath });
|
|
167
167
|
|
|
168
|
-
await
|
|
169
|
-
await
|
|
168
|
+
await $$q`git init --initial-branch main`;
|
|
169
|
+
await $$q`git remote add origin ${gitRemoteURL}`;
|
|
170
170
|
|
|
171
171
|
const gitNameAndEmailConfigured = await isGitNameAndEmailConfigured();
|
|
172
172
|
if (gitNameAndEmailConfigured) {
|
|
173
|
-
await
|
|
173
|
+
await $$q`git add --all`;
|
|
174
174
|
const commitMessage = `chore: add files from ${PROJECT_NAME} ${PROJECT_VERSION} template`;
|
|
175
|
-
await
|
|
176
|
-
await
|
|
175
|
+
await $$q`git commit --message ${commitMessage}`;
|
|
176
|
+
await $$q`git push --set-upstream origin main`;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
|
package/src/prompt.ts
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
outro,
|
|
11
11
|
spinner,
|
|
12
12
|
text,
|
|
13
|
-
} from "@clack
|
|
13
|
+
} from "@zamiell/clack-prompts";
|
|
14
14
|
import chalk from "chalk";
|
|
15
15
|
import { PROJECT_NAME } from "./constants.js";
|
|
16
16
|
|
|
@@ -55,8 +55,10 @@ export async function getInputString(
|
|
|
55
55
|
process.exit(1);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
// The "text" return type is bugged: "input" is equal to "undefined" if the user did not enter any
|
|
59
|
+
// input.
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
61
|
+
if (input === undefined || input.trim() === "") {
|
|
60
62
|
promptError("You must enter a non-empty value.");
|
|
61
63
|
}
|
|
62
64
|
|