complete-cli 1.2.0 → 1.2.2
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/UpdateCommand.js +2 -2
- package/dist/constants.js +2 -3
- package/file-templates/dynamic/Node.gitignore +25 -16
- package/file-templates/static/eslint.config.mjs +2 -2
- package/package.json +8 -8
- package/src/commands/CheckCommand.ts +2 -2
- package/src/commands/UpdateCommand.ts +2 -2
- package/src/commands/init/vsCodeInit.ts +1 -1
- package/src/constants.ts +2 -4
- package/src/main.ts +1 -1
|
@@ -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: {
|
|
@@ -8,8 +8,8 @@ export class UpdateCommand extends Command {
|
|
|
8
8
|
async execute() {
|
|
9
9
|
const hasNewDependencies = await updatePackageJSONDependencies();
|
|
10
10
|
const msg = hasNewDependencies
|
|
11
|
-
? "Successfully installed new
|
|
12
|
-
: "There were no new dependency updates
|
|
11
|
+
? "Successfully installed new dependencies."
|
|
12
|
+
: "There were no new dependency updates.";
|
|
13
13
|
console.log(msg);
|
|
14
14
|
}
|
|
15
15
|
}
|
package/dist/constants.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getPackageJSONFieldsMandatory, getPackageRoot, PackageManager, } from "complete-node";
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
export const CWD = process.cwd();
|
|
5
5
|
export const CURRENT_DIRECTORY_NAME = path.basename(CWD);
|
|
6
6
|
export const HOME_DIR = os.homedir();
|
|
7
|
-
const packageRoot =
|
|
7
|
+
const packageRoot = await getPackageRoot();
|
|
8
8
|
const { name, version } = await getPackageJSONFieldsMandatory(packageRoot, "name", "version");
|
|
9
9
|
export const PROJECT_NAME = name;
|
|
10
10
|
export const PROJECT_VERSION = version;
|
|
11
11
|
export const DEFAULT_PACKAGE_MANAGER = PackageManager.npm;
|
|
12
|
-
// ---------
|
|
13
12
|
const TEMPLATES_DIR = path.join(packageRoot, "file-templates");
|
|
14
13
|
export const TEMPLATES_STATIC_DIR = path.join(TEMPLATES_DIR, "static");
|
|
15
14
|
export const TEMPLATES_DYNAMIC_DIR = path.join(TEMPLATES_DIR, "dynamic");
|
|
@@ -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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "complete-cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "A command line tool for bootstrapping TypeScript projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript"
|
|
@@ -37,20 +37,20 @@
|
|
|
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.1
|
|
41
|
-
"complete-node": "
|
|
40
|
+
"complete-common": "2.3.1",
|
|
41
|
+
"complete-node": "7.3.0",
|
|
42
42
|
"klaw-sync": "7.0.0",
|
|
43
|
-
"yaml": "2.
|
|
43
|
+
"yaml": "2.8.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/klaw-sync": "6.0.5",
|
|
47
|
-
"@types/node": "
|
|
48
|
-
"glob": "11.0.
|
|
47
|
+
"@types/node": "24.0.4",
|
|
48
|
+
"glob": "11.0.3",
|
|
49
49
|
"ts-loader": "9.5.2",
|
|
50
50
|
"tsconfig-paths-webpack-plugin": "4.2.0",
|
|
51
51
|
"typescript": "5.8.3",
|
|
52
|
-
"typescript-eslint": "8.
|
|
53
|
-
"webpack": "5.99.
|
|
52
|
+
"typescript-eslint": "8.35.0",
|
|
53
|
+
"webpack": "5.99.9",
|
|
54
54
|
"webpack-cli": "6.0.1",
|
|
55
55
|
"webpack-shebang-plugin": "1.1.8"
|
|
56
56
|
},
|
|
@@ -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
|
|
|
@@ -12,8 +12,8 @@ export class UpdateCommand extends Command {
|
|
|
12
12
|
async execute(): Promise<void> {
|
|
13
13
|
const hasNewDependencies = await updatePackageJSONDependencies();
|
|
14
14
|
const msg = hasNewDependencies
|
|
15
|
-
? "Successfully installed new
|
|
16
|
-
: "There were no new dependency updates
|
|
15
|
+
? "Successfully installed new dependencies."
|
|
16
|
+
: "There were no new dependency updates.";
|
|
17
17
|
console.log(msg);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -106,7 +106,7 @@ async function promptVSCode(
|
|
|
106
106
|
VSCodeCommand: string,
|
|
107
107
|
vscode: boolean,
|
|
108
108
|
yes: boolean,
|
|
109
|
-
)
|
|
109
|
+
) {
|
|
110
110
|
if (vscode) {
|
|
111
111
|
// They supplied the "--vscode" command-line flag, so there is no need to prompt the user.
|
|
112
112
|
await openVSCode(projectPath, VSCodeCommand);
|
package/src/constants.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
findPackageRoot,
|
|
3
2
|
getPackageJSONFieldsMandatory,
|
|
3
|
+
getPackageRoot,
|
|
4
4
|
PackageManager,
|
|
5
5
|
} from "complete-node";
|
|
6
6
|
import os from "node:os";
|
|
@@ -11,7 +11,7 @@ export const CURRENT_DIRECTORY_NAME = path.basename(CWD);
|
|
|
11
11
|
|
|
12
12
|
export const HOME_DIR = os.homedir();
|
|
13
13
|
|
|
14
|
-
const packageRoot =
|
|
14
|
+
const packageRoot = await getPackageRoot();
|
|
15
15
|
const { name, version } = await getPackageJSONFieldsMandatory(
|
|
16
16
|
packageRoot,
|
|
17
17
|
"name",
|
|
@@ -23,8 +23,6 @@ export const PROJECT_VERSION = version;
|
|
|
23
23
|
|
|
24
24
|
export const DEFAULT_PACKAGE_MANAGER = PackageManager.npm;
|
|
25
25
|
|
|
26
|
-
// ---------
|
|
27
|
-
|
|
28
26
|
const TEMPLATES_DIR = path.join(packageRoot, "file-templates");
|
|
29
27
|
export const TEMPLATES_STATIC_DIR = path.join(TEMPLATES_DIR, "static");
|
|
30
28
|
export const TEMPLATES_DYNAMIC_DIR = path.join(TEMPLATES_DIR, "dynamic");
|