create-sprint 0.0.74 → 0.0.76
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 +4 -8
- package/dist/templates/packageJson.js +4 -2
- package/package.json +1 -1
- package/src/index.ts +5 -10
- package/src/templates/packageJson.ts +4 -2
- package/src/validators.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -64,12 +64,10 @@ export async function runCLI(args) {
|
|
|
64
64
|
await createProject(config.projectName, config.language, config.telemetry, config.swagger, config.docker);
|
|
65
65
|
s.stop("Project created");
|
|
66
66
|
let installDeps = true;
|
|
67
|
-
if (options.skipInstall)
|
|
67
|
+
if (options.skipInstall)
|
|
68
68
|
installDeps = false;
|
|
69
|
-
|
|
70
|
-
else if (!options.skipPrompts) {
|
|
69
|
+
else if (!options.skipPrompts)
|
|
71
70
|
installDeps = await p.confirm({ message: "Install dependencies now?", initialValue: true });
|
|
72
|
-
}
|
|
73
71
|
if (installDeps) {
|
|
74
72
|
const s2 = p.spinner();
|
|
75
73
|
s2.start("Installing dependencies");
|
|
@@ -101,10 +99,8 @@ export async function runCLI(args) {
|
|
|
101
99
|
const cdCmd = config.projectName === "." ? "" : `cd ${config.projectName} && `;
|
|
102
100
|
p.note([
|
|
103
101
|
!installDeps ? `${cdCmd}npm install` : "",
|
|
104
|
-
`${cdCmd}npm run dev
|
|
105
|
-
]
|
|
106
|
-
.filter(Boolean)
|
|
107
|
-
.join("\n"), "Next steps");
|
|
102
|
+
`${cdCmd}npm run dev`
|
|
103
|
+
].filter(Boolean).join("\n"), "Next steps");
|
|
108
104
|
p.outro("Ready. Happy shipping.");
|
|
109
105
|
}
|
|
110
106
|
;
|
|
@@ -10,7 +10,7 @@ export function generateJWTKeys() {
|
|
|
10
10
|
;
|
|
11
11
|
export function getTypeScriptPackageJson(name, telemetry, swagger) {
|
|
12
12
|
const deps = {
|
|
13
|
-
"sprint-es": "^0.0.
|
|
13
|
+
"sprint-es": "^0.0.81"
|
|
14
14
|
};
|
|
15
15
|
const devDeps = {
|
|
16
16
|
"@types/node": "^22.0.0",
|
|
@@ -34,6 +34,7 @@ export function getTypeScriptPackageJson(name, telemetry, swagger) {
|
|
|
34
34
|
build: "sprint-es build",
|
|
35
35
|
start: "sprint-es start",
|
|
36
36
|
dev: "sprint-es dev",
|
|
37
|
+
doctor: "sprint-es doctor",
|
|
37
38
|
"generate:keys": "sprint-es generate-keys"
|
|
38
39
|
},
|
|
39
40
|
dependencies: deps,
|
|
@@ -43,7 +44,7 @@ export function getTypeScriptPackageJson(name, telemetry, swagger) {
|
|
|
43
44
|
;
|
|
44
45
|
export function getJavaScriptPackageJson(name, telemetry, swagger) {
|
|
45
46
|
const deps = {
|
|
46
|
-
"sprint-es": "^0.0.
|
|
47
|
+
"sprint-es": "^0.0.81"
|
|
47
48
|
};
|
|
48
49
|
if (telemetry === "sentry" || telemetry === "glitchtip")
|
|
49
50
|
deps["@sentry/node"] = "^8.0.0";
|
|
@@ -61,6 +62,7 @@ export function getJavaScriptPackageJson(name, telemetry, swagger) {
|
|
|
61
62
|
build: "sprint-es build",
|
|
62
63
|
start: "sprint-es start",
|
|
63
64
|
dev: "sprint-es dev",
|
|
65
|
+
doctor: "sprint-es doctor",
|
|
64
66
|
"generate:keys": "sprint-es generate-keys"
|
|
65
67
|
},
|
|
66
68
|
dependencies: deps
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -99,16 +99,13 @@ export async function runCLI(args: string[]) {
|
|
|
99
99
|
config.language,
|
|
100
100
|
config.telemetry,
|
|
101
101
|
config.swagger,
|
|
102
|
-
config.docker
|
|
102
|
+
config.docker
|
|
103
103
|
);
|
|
104
104
|
s.stop("Project created");
|
|
105
105
|
|
|
106
106
|
let installDeps = true;
|
|
107
|
-
if (options.skipInstall)
|
|
108
|
-
|
|
109
|
-
} else if (!options.skipPrompts) {
|
|
110
|
-
installDeps = await p.confirm({ message: "Install dependencies now?", initialValue: true }) as boolean;
|
|
111
|
-
}
|
|
107
|
+
if (options.skipInstall) installDeps = false;
|
|
108
|
+
else if (!options.skipPrompts) installDeps = await p.confirm({ message: "Install dependencies now?", initialValue: true }) as boolean;
|
|
112
109
|
|
|
113
110
|
if (installDeps) {
|
|
114
111
|
const s2 = p.spinner();
|
|
@@ -140,10 +137,8 @@ export async function runCLI(args: string[]) {
|
|
|
140
137
|
p.note(
|
|
141
138
|
[
|
|
142
139
|
!installDeps ? `${cdCmd}npm install` : "",
|
|
143
|
-
`${cdCmd}npm run dev
|
|
144
|
-
]
|
|
145
|
-
.filter(Boolean)
|
|
146
|
-
.join("\n"),
|
|
140
|
+
`${cdCmd}npm run dev`
|
|
141
|
+
].filter(Boolean).join("\n"),
|
|
147
142
|
"Next steps"
|
|
148
143
|
);
|
|
149
144
|
|
|
@@ -16,7 +16,7 @@ export function generateJWTKeys(): JWTKeys {
|
|
|
16
16
|
|
|
17
17
|
export function getTypeScriptPackageJson(name: string, telemetry: string, swagger: boolean) {
|
|
18
18
|
const deps: Record<string, string> = {
|
|
19
|
-
"sprint-es": "^0.0.
|
|
19
|
+
"sprint-es": "^0.0.81"
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
const devDeps: Record<string, string> = {
|
|
@@ -40,6 +40,7 @@ export function getTypeScriptPackageJson(name: string, telemetry: string, swagge
|
|
|
40
40
|
build: "sprint-es build",
|
|
41
41
|
start: "sprint-es start",
|
|
42
42
|
dev: "sprint-es dev",
|
|
43
|
+
doctor: "sprint-es doctor",
|
|
43
44
|
"generate:keys": "sprint-es generate-keys"
|
|
44
45
|
},
|
|
45
46
|
dependencies: deps,
|
|
@@ -49,7 +50,7 @@ export function getTypeScriptPackageJson(name: string, telemetry: string, swagge
|
|
|
49
50
|
|
|
50
51
|
export function getJavaScriptPackageJson(name: string, telemetry: string, swagger: boolean) {
|
|
51
52
|
const deps: Record<string, string> = {
|
|
52
|
-
"sprint-es": "^0.0.
|
|
53
|
+
"sprint-es": "^0.0.81"
|
|
53
54
|
};
|
|
54
55
|
|
|
55
56
|
if (telemetry === "sentry" || telemetry === "glitchtip") deps["@sentry/node"] = "^8.0.0";
|
|
@@ -67,6 +68,7 @@ export function getJavaScriptPackageJson(name: string, telemetry: string, swagge
|
|
|
67
68
|
build: "sprint-es build",
|
|
68
69
|
start: "sprint-es start",
|
|
69
70
|
dev: "sprint-es dev",
|
|
71
|
+
doctor: "sprint-es doctor",
|
|
70
72
|
"generate:keys": "sprint-es generate-keys"
|
|
71
73
|
},
|
|
72
74
|
dependencies: deps
|
package/src/validators.ts
CHANGED
|
@@ -13,7 +13,6 @@ export function validateProjectName(name: string): string | null {
|
|
|
13
13
|
|
|
14
14
|
if (n !== encodeURIComponent(n)) return "Project name must be URL-safe";
|
|
15
15
|
|
|
16
|
-
|
|
17
16
|
const reserved = ["node_modules", "favicon.ico"];
|
|
18
17
|
if (reserved.includes(n.toLowerCase())) return `Cannot use "${n}" as project name`;
|
|
19
18
|
|