complete-cli 1.2.1 → 1.2.3
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/commands/CheckCommand.js +2 -2
- package/dist/commands/init/vsCodeInit.js +8 -12
- package/file-templates/dynamic/Node.gitignore +25 -16
- package/file-templates/static/eslint.config.mjs +2 -2
- package/file-templates/static/scripts/lint.ts +5 -1
- package/package.json +7 -8
- package/src/commands/CheckCommand.ts +2 -2
- package/src/commands/init/vsCodeInit.ts +9 -19
|
@@ -56,11 +56,11 @@ async function checkTemplateDirectory(templateDirectory, ignoreFileNamesSet, ver
|
|
|
56
56
|
let projectFilePath = path.join(CWD, relativeTemplateFilePath);
|
|
57
57
|
switch (templateFileName) {
|
|
58
58
|
case "_cspell.config.jsonc": {
|
|
59
|
-
projectFilePath = path.
|
|
59
|
+
projectFilePath = path.resolve(projectFilePath, "..", "cspell.config.jsonc");
|
|
60
60
|
break;
|
|
61
61
|
}
|
|
62
62
|
case "_gitattributes": {
|
|
63
|
-
projectFilePath = path.
|
|
63
|
+
projectFilePath = path.resolve(projectFilePath, "..", ".gitattributes");
|
|
64
64
|
break;
|
|
65
65
|
}
|
|
66
66
|
default: {
|
|
@@ -17,18 +17,14 @@ export async function vsCodeInit(projectPath, vscode, yes) {
|
|
|
17
17
|
await promptVSCode(projectPath, VSCodeCommand, vscode, yes);
|
|
18
18
|
}
|
|
19
19
|
async function getVSCodeCommand() {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const existingCommands = commandChecks
|
|
29
|
-
.filter((check) => check.exists)
|
|
30
|
-
.map((check) => check.command);
|
|
31
|
-
return existingCommands[0];
|
|
20
|
+
for (const command of VS_CODE_COMMANDS) {
|
|
21
|
+
// eslint-disable-next-line no-await-in-loop
|
|
22
|
+
const exists = await commandExists(command);
|
|
23
|
+
if (exists) {
|
|
24
|
+
return command;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return undefined;
|
|
32
28
|
}
|
|
33
29
|
async function installVSCodeExtensions(projectPath, vsCodeCommand) {
|
|
34
30
|
// Installing extensions from inside WSL on Windows will result in the VSCode process never
|
|
@@ -5,7 +5,6 @@ npm-debug.log*
|
|
|
5
5
|
yarn-debug.log*
|
|
6
6
|
yarn-error.log*
|
|
7
7
|
lerna-debug.log*
|
|
8
|
-
.pnpm-debug.log*
|
|
9
8
|
|
|
10
9
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
11
10
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
@@ -57,12 +56,6 @@ web_modules/
|
|
|
57
56
|
# Optional stylelint cache
|
|
58
57
|
.stylelintcache
|
|
59
58
|
|
|
60
|
-
# Microbundle cache
|
|
61
|
-
.rpt2_cache/
|
|
62
|
-
.rts2_cache_cjs/
|
|
63
|
-
.rts2_cache_es/
|
|
64
|
-
.rts2_cache_umd/
|
|
65
|
-
|
|
66
59
|
# Optional REPL history
|
|
67
60
|
.node_repl_history
|
|
68
61
|
|
|
@@ -74,10 +67,8 @@ web_modules/
|
|
|
74
67
|
|
|
75
68
|
# dotenv environment variable files
|
|
76
69
|
.env
|
|
77
|
-
.env
|
|
78
|
-
|
|
79
|
-
.env.production.local
|
|
80
|
-
.env.local
|
|
70
|
+
.env.*
|
|
71
|
+
!.env.example
|
|
81
72
|
|
|
82
73
|
# parcel-bundler cache (https://parceljs.org/)
|
|
83
74
|
.cache
|
|
@@ -104,6 +95,15 @@ dist
|
|
|
104
95
|
.temp
|
|
105
96
|
.cache
|
|
106
97
|
|
|
98
|
+
# Sveltekit cache directory
|
|
99
|
+
.svelte-kit/
|
|
100
|
+
|
|
101
|
+
# vitepress build output
|
|
102
|
+
**/.vitepress/dist
|
|
103
|
+
|
|
104
|
+
# vitepress cache directory
|
|
105
|
+
**/.vitepress/cache
|
|
106
|
+
|
|
107
107
|
# Docusaurus cache and generated files
|
|
108
108
|
.docusaurus
|
|
109
109
|
|
|
@@ -116,15 +116,24 @@ dist
|
|
|
116
116
|
# DynamoDB Local files
|
|
117
117
|
.dynamodb/
|
|
118
118
|
|
|
119
|
+
# Firebase cache directory
|
|
120
|
+
.firebase/
|
|
121
|
+
|
|
119
122
|
# TernJS port file
|
|
120
123
|
.tern-port
|
|
121
124
|
|
|
122
125
|
# Stores VSCode versions used for testing VSCode extensions
|
|
123
126
|
.vscode-test
|
|
124
127
|
|
|
125
|
-
# yarn
|
|
126
|
-
.yarn/cache
|
|
127
|
-
.yarn/unplugged
|
|
128
|
-
.yarn/build-state.yml
|
|
129
|
-
.yarn/install-state.gz
|
|
128
|
+
# yarn v3
|
|
130
129
|
.pnp.*
|
|
130
|
+
.yarn/*
|
|
131
|
+
!.yarn/patches
|
|
132
|
+
!.yarn/plugins
|
|
133
|
+
!.yarn/releases
|
|
134
|
+
!.yarn/sdks
|
|
135
|
+
!.yarn/versions
|
|
136
|
+
|
|
137
|
+
# Vite logs files
|
|
138
|
+
vite.config.js.timestamp-*
|
|
139
|
+
vite.config.ts.timestamp-*
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
// @ts-check
|
|
5
5
|
|
|
6
|
-
import { completeConfigBase } from "eslint-config-complete";
|
|
7
|
-
import tseslint from "typescript-eslint";
|
|
6
|
+
import { completeConfigBase } from "eslint-config-complete";
|
|
7
|
+
import tseslint from "typescript-eslint";
|
|
8
8
|
|
|
9
9
|
export default tseslint.config(
|
|
10
10
|
// https://github.com/complete-ts/complete/blob/main/packages/eslint-config-complete/src/base.js
|
|
@@ -15,7 +15,11 @@ await lintScript(async () => {
|
|
|
15
15
|
$`prettier --log-level=warn --check .`,
|
|
16
16
|
|
|
17
17
|
// Use Knip to check for unused files, exports, and dependencies.
|
|
18
|
-
|
|
18
|
+
// - "--no-progress" - Don’t show dynamic progress updates. Progress is automatically disabled
|
|
19
|
+
// in CI environments.
|
|
20
|
+
// - "--treat-config-hints-as-errors" - Exit with non-zero code (1) if there are any
|
|
21
|
+
// configuration hints.
|
|
22
|
+
$`knip --no-progress --treat-config-hints-as-errors`,
|
|
19
23
|
|
|
20
24
|
// Use CSpell to spell check every file.
|
|
21
25
|
// - "--no-progress" and "--no-summary" make it only output errors.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "complete-cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "A command line tool for bootstrapping TypeScript projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript"
|
|
@@ -31,26 +31,25 @@
|
|
|
31
31
|
"build": "tsx ./scripts/build.ts",
|
|
32
32
|
"lint": "tsx ./scripts/lint.ts",
|
|
33
33
|
"start": "tsx ./src/main.ts",
|
|
34
|
-
"test": "
|
|
34
|
+
"test": "tsx --test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@zamiell/clack-prompts": "0.10.2",
|
|
38
38
|
"chalk": "5.4.1",
|
|
39
39
|
"clipanion": "4.0.0-rc.4",
|
|
40
|
-
"complete-common": "2.
|
|
41
|
-
"complete-node": "7.0
|
|
40
|
+
"complete-common": "2.5.0",
|
|
41
|
+
"complete-node": "7.4.4-dev.0",
|
|
42
42
|
"klaw-sync": "7.0.0",
|
|
43
43
|
"yaml": "2.8.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/klaw-sync": "6.0.5",
|
|
47
|
-
"@types/node": "24.0
|
|
48
|
-
"glob": "11.0.3",
|
|
47
|
+
"@types/node": "24.1.0",
|
|
49
48
|
"ts-loader": "9.5.2",
|
|
50
49
|
"tsconfig-paths-webpack-plugin": "4.2.0",
|
|
51
50
|
"typescript": "5.8.3",
|
|
52
|
-
"typescript-eslint": "8.
|
|
53
|
-
"webpack": "5.
|
|
51
|
+
"typescript-eslint": "8.38.0",
|
|
52
|
+
"webpack": "5.101.0",
|
|
54
53
|
"webpack-cli": "6.0.1",
|
|
55
54
|
"webpack-shebang-plugin": "1.1.8"
|
|
56
55
|
},
|
|
@@ -101,7 +101,7 @@ async function checkTemplateDirectory(
|
|
|
101
101
|
let projectFilePath = path.join(CWD, relativeTemplateFilePath);
|
|
102
102
|
switch (templateFileName) {
|
|
103
103
|
case "_cspell.config.jsonc": {
|
|
104
|
-
projectFilePath = path.
|
|
104
|
+
projectFilePath = path.resolve(
|
|
105
105
|
projectFilePath,
|
|
106
106
|
"..",
|
|
107
107
|
"cspell.config.jsonc",
|
|
@@ -110,7 +110,7 @@ async function checkTemplateDirectory(
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
case "_gitattributes": {
|
|
113
|
-
projectFilePath = path.
|
|
113
|
+
projectFilePath = path.resolve(projectFilePath, "..", ".gitattributes");
|
|
114
114
|
break;
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -26,26 +26,16 @@ export async function vsCodeInit(
|
|
|
26
26
|
await promptVSCode(projectPath, VSCodeCommand, vscode, yes);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
async function getVSCodeCommand(): Promise<
|
|
30
|
-
(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const commandChecks = await Promise.all(
|
|
38
|
-
commandCheckPromises.map(async (check) => ({
|
|
39
|
-
command: check.command,
|
|
40
|
-
exists: await check.existsPromise,
|
|
41
|
-
})),
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
const existingCommands = commandChecks
|
|
45
|
-
.filter((check) => check.exists)
|
|
46
|
-
.map((check) => check.command);
|
|
29
|
+
async function getVSCodeCommand(): Promise<string | undefined> {
|
|
30
|
+
for (const command of VS_CODE_COMMANDS) {
|
|
31
|
+
// eslint-disable-next-line no-await-in-loop
|
|
32
|
+
const exists = await commandExists(command);
|
|
33
|
+
if (exists) {
|
|
34
|
+
return command;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
47
37
|
|
|
48
|
-
return
|
|
38
|
+
return undefined;
|
|
49
39
|
}
|
|
50
40
|
|
|
51
41
|
async function installVSCodeExtensions(
|