create-sprint 0.0.100 → 0.0.110

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 CHANGED
@@ -5,7 +5,7 @@ import { join } from "path";
5
5
  import color from "picocolors";
6
6
  import * as p from "@clack/prompts";
7
7
  import { validateProjectName } from "./validators.js";
8
- import { getTypeScriptPackageJson, getJavaScriptPackageJson, getTsConfig, getViteConfig, getMainFile, getHomeRoute, getAdminRoute, getHomeController, getAdminController, getEnvExample, getInternalAuthMiddleware, getUserAuthMiddleware, getHomeSchema, getAdminSchema, getDockerfile, getDockerCompose, getGitignore, getDockerIgnore, getSprintConfigFile, getEnvDevelopment, getEnvProduction, getExampleCronJob, getGraphQLFiles } from "./generators.js";
8
+ import { getTypeScriptPackageJson, getJavaScriptPackageJson, getTsConfig, getMainFile, getHomeRoute, getAdminRoute, getHomeController, getAdminController, getEnvExample, getInternalAuthMiddleware, getUserAuthMiddleware, getHomeSchema, getAdminSchema, getDockerfile, getDockerCompose, getGitignore, getDockerIgnore, getSprintConfigFile, getEnvDevelopment, getEnvProduction, getExampleCronJob, getGraphQLFiles } from "./generators.js";
9
9
  export async function writeFile(path, content, options) {
10
10
  if (typeof content === "string")
11
11
  content = content.trimEnd();
@@ -21,7 +21,7 @@ export async function runCLI(args) {
21
21
  config = {
22
22
  projectName: options.projectName || "sprint-app",
23
23
  language: options.language || "typescript",
24
- telemetry: options.telemetry || "none",
24
+ telemetry: options.telemetry ?? "none",
25
25
  swagger: options.swagger ?? true,
26
26
  graphql: options.graphql ?? false,
27
27
  docker: options.docker || false,
@@ -32,7 +32,7 @@ export async function runCLI(args) {
32
32
  projectName: () => p.text({
33
33
  message: "Project name:",
34
34
  placeholder: "my-api",
35
- validate: (v) => validateProjectName(v) || undefined,
35
+ validate: (v) => validateProjectName(v || "sprint-app") || undefined,
36
36
  }),
37
37
  language: () => p.select({
38
38
  message: "Language:",
@@ -125,8 +125,11 @@ function parseArgs(args) {
125
125
  }
126
126
  else
127
127
  options.language = "typescript";
128
- if (hasName !== -1 && args[hasName + 1])
129
- options.projectName = args[hasName + 1];
128
+ if (hasName !== -1) {
129
+ const value = args[hasName + 1];
130
+ if (typeof value === "string")
131
+ options.projectName = value;
132
+ }
130
133
  if (args.includes("--current"))
131
134
  options.projectName = ".";
132
135
  if (args.includes("--docker"))
@@ -141,8 +144,10 @@ function parseArgs(args) {
141
144
  options.graphql = false;
142
145
  if (args.includes("--no-install"))
143
146
  options.skipInstall = true;
144
- if (telemetryArg && ["sentry", "glitchtip", "discord", "none"].includes(telemetryArg))
145
- options.telemetry = telemetryArg;
147
+ if (telemetryArg && ["sentry", "glitchtip", "discord", "none"].includes(telemetryArg)) {
148
+ if (typeof telemetryArg === "string" && ["sentry", "glitchtip", "discord", "none"].includes(telemetryArg))
149
+ options.telemetry = telemetryArg;
150
+ }
146
151
  return options;
147
152
  }
148
153
  ;
@@ -163,7 +168,6 @@ async function createProject(projectName, language, telemetry, swagger, graphql,
163
168
  await writeFile(join(targetDir, "package.json"), JSON.stringify(pkgJson, null, 2));
164
169
  if (language === "typescript") {
165
170
  await writeFile(join(targetDir, "tsconfig.json"), getTsConfig());
166
- await writeFile(join(targetDir, "vite.config.ts"), getViteConfig());
167
171
  await writeFile(join(targetDir, "sprint.config.ts"), getSprintConfigFile(language, telemetry, swagger, graphql));
168
172
  }
169
173
  else
@@ -1,55 +1,34 @@
1
1
  export function getTsConfig() {
2
- return JSON.stringify({
3
- compilerOptions: {
4
- target: "ES2022",
5
- module: "NodeNext",
6
- moduleResolution: "NodeNext",
7
- lib: ["ES2022"],
8
- types: ["node"],
9
- outDir: "./dist",
10
- rootDir: "./src",
11
- strict: true,
12
- esModuleInterop: true,
13
- skipLibCheck: true,
14
- forceConsistentCasingInFileNames: true,
15
- resolveJsonModule: true,
16
- declaration: true,
17
- declarationMap: true,
18
- sourceMap: true,
19
- baseUrl: ".",
20
- paths: {
21
- "@/*": ["./src/*"]
22
- }
23
- },
24
- include: ["src/**/*"],
25
- exclude: ["node_modules", "dist"],
26
- }, null, 2);
27
- }
28
- ;
29
- export function getViteConfig() {
30
- return `import { defineConfig } from "vite";
31
- import { resolve } from "path";
32
-
33
- export default defineConfig({
34
- build: {
35
- lib: {
36
- entry: "src/app.ts",
37
- formats: ["es"],
38
- fileName: "app"
39
- },
40
- outDir: "dist",
41
- rollupOptions: {
42
- external: ["sprint-es", "express", "cors", "morgan", "serve-favicon", "dotenv"]
43
- },
44
- target: "ES2020"
2
+ return `
3
+ {
4
+ "compilerOptions": {
5
+ "target": "ESNext",
6
+ "module": "ESNext",
7
+ "baseUrl": "./src",
8
+ "paths": {
9
+ "@/*": [
10
+ "*"
11
+ ]
45
12
  },
46
- resolve: {
47
- alias: {
48
- "@": "src"
49
- }
50
- }
51
- });
52
- `;
13
+ "moduleResolution": "Node",
14
+ "outDir": "dist",
15
+ "importsNotUsedAsValues": "remove",
16
+ "strict": true,
17
+ "esModuleInterop": true,
18
+ "skipLibCheck": true,
19
+ "forceConsistentCasingInFileNames": true,
20
+ "types": [
21
+ "vitest/globals"
22
+ ]
23
+ },
24
+ "include": [
25
+ "src/**/*"
26
+ ],
27
+ "exclude": [
28
+ "node_modules"
29
+ ]
30
+ }
31
+ `;
53
32
  }
54
33
  ;
55
34
  export function getSprintConfigFile(language, telemetry, swagger, graphql) {
@@ -1,6 +1,6 @@
1
1
  export function getDockerfile(language) {
2
2
  if (language === "typescript") {
3
- return `FROM node:20-alpine
3
+ return `FROM node:20-alpine AS builder
4
4
 
5
5
  WORKDIR /app
6
6
 
@@ -12,6 +12,17 @@ COPY . .
12
12
 
13
13
  RUN npm run build
14
14
 
15
+
16
+ FROM node:20-alpine
17
+
18
+ WORKDIR /app
19
+
20
+ COPY package*.json ./
21
+
22
+ RUN npm ci --omit=dev
23
+
24
+ COPY --from=builder /app/dist ./dist
25
+
15
26
  EXPOSE 5000
16
27
 
17
28
  CMD ["npm", "start"]
@@ -33,7 +44,7 @@ CMD ["npm", "start"]
33
44
  `;
34
45
  }
35
46
  ;
36
- export function getDockerCompose(language) {
47
+ export function getDockerCompose(_language) {
37
48
  return `
38
49
  services:
39
50
  app:
@@ -1,6 +1,5 @@
1
1
  export function getGraphQLFiles(language) {
2
2
  const isTs = language === "typescript";
3
- const ext = isTs ? "" : ".js";
4
3
  const tsTypes = `import { GraphQLObjectType, GraphQLString, GraphQLList, GraphQLNonNull } from "graphql";
5
4
 
6
5
  export const UserType = new GraphQLObjectType({
@@ -1,7 +1,7 @@
1
1
  // Package JSON
2
2
  export { generateJWTKeys, getTypeScriptPackageJson, getJavaScriptPackageJson } from "./packageJson.js";
3
- // Config Files (tsconfig, vite.config, sprint.config)
4
- export { getTsConfig, getViteConfig, getSprintConfigFile } from "./configFiles.js";
3
+ // Config Files (tsconfig, sprint.config)
4
+ export { getTsConfig, getSprintConfigFile } from "./configFiles.js";
5
5
  // Environment Files
6
6
  export { getEnvExample, getEnvDevelopment, getEnvProduction } from "./env.js";
7
7
  // Routes
@@ -10,14 +10,13 @@ export function generateJWTKeys() {
10
10
  ;
11
11
  export function getTypeScriptPackageJson(name, telemetry, swagger, graphql) {
12
12
  const deps = {
13
- "sprint-es": "^0.0.90"
13
+ "sprint-es": "^0.0.135"
14
14
  };
15
15
  const devDeps = {
16
16
  "@types/node": "^22.0.0",
17
17
  "tsx": "^4.19.0",
18
18
  typescript: "^5.6.0",
19
- vite: "^6.4.1",
20
- "vite-plugin-dts": "^4.5.4"
19
+ tsup: "^8.5.1"
21
20
  };
22
21
  if (telemetry === "sentry" || telemetry === "glitchtip")
23
22
  deps["@sentry/node"] = "^8.0.0";
@@ -36,7 +35,8 @@ export function getTypeScriptPackageJson(name, telemetry, swagger, graphql) {
36
35
  name: name === "." ? "sprint-app" : name,
37
36
  version: "0.0.1",
38
37
  description: "Sprint API",
39
- main: "dist/index.js",
38
+ main: "dist/app.js",
39
+ type: "module",
40
40
  scripts: {
41
41
  build: "sprint-es build",
42
42
  start: "sprint-es start",
@@ -45,13 +45,28 @@ export function getTypeScriptPackageJson(name, telemetry, swagger, graphql) {
45
45
  "generate:keys": "sprint-es generate-keys"
46
46
  },
47
47
  dependencies: deps,
48
- devDependencies: devDeps
48
+ devDependencies: devDeps,
49
+ tsup: {
50
+ entry: [
51
+ "src/**/*.ts"
52
+ ],
53
+ outDir: "dist",
54
+ format: [
55
+ "esm"
56
+ ],
57
+ target: "es2020",
58
+ sourcemap: true,
59
+ clean: true,
60
+ dts: true,
61
+ splitting: false,
62
+ skipNodeModulesBundle: true
63
+ }
49
64
  };
50
65
  }
51
66
  ;
52
67
  export function getJavaScriptPackageJson(name, telemetry, swagger, graphql) {
53
68
  const deps = {
54
- "sprint-es": "^0.0.90"
69
+ "sprint-es": "^0.0.135"
55
70
  };
56
71
  if (telemetry === "sentry" || telemetry === "glitchtip")
57
72
  deps["@sentry/node"] = "^8.0.0";
@@ -68,7 +83,7 @@ export function getJavaScriptPackageJson(name, telemetry, swagger, graphql) {
68
83
  name: name === "." ? "sprint-app" : name,
69
84
  version: "0.0.1",
70
85
  description: "Sprint API",
71
- main: "src/index.js",
86
+ main: "src/app.js",
72
87
  type: "module",
73
88
  scripts: {
74
89
  build: "sprint-es build",
@@ -1,6 +1,5 @@
1
1
  export function getMainFile(language, graphql = false) {
2
2
  const isTs = language === "typescript";
3
- const ext = isTs ? "" : ".js";
4
3
  if (isTs) {
5
4
  if (graphql) {
6
5
  return `import Sprint from "sprint-es";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sprint",
3
- "version": "0.0.100",
3
+ "version": "0.0.110",
4
4
  "description": "Create a new Sprint API project",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,7 +12,7 @@
12
12
  "src/**/*"
13
13
  ],
14
14
  "scripts": {
15
- "build": "tsc && node -e \"const fs=require('fs');const p='dist/cli.js';let c=fs.readFileSync(p,'utf8');if(!c.startsWith('#!')){fs.writeFileSync(p,'#!/usr/bin/env node\\n'+c)}\"",
15
+ "build": "rimraf dist && tsc && node -e \"const fs=require('fs');const p='dist/cli.js';let c=fs.readFileSync(p,'utf8');if(!c.startsWith('#!')){fs.writeFileSync(p,'#!/usr/bin/env node\\n'+c)}\"",
16
16
  "prepublishOnly": "npm version patch && npm run build",
17
17
  "start": "node dist/cli.js"
18
18
  },
@@ -30,6 +30,7 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^25.3.3",
33
+ "rimraf": "^6.0.0",
33
34
  "tsx": "^4.19.0",
34
35
  "typescript": "^5.9.3"
35
36
  },
package/src/index.ts CHANGED
@@ -5,12 +5,14 @@ import { join } from "path";
5
5
  import color from "picocolors";
6
6
  import * as p from "@clack/prompts";
7
7
  import { validateProjectName } from "./validators.js";
8
- import { getTypeScriptPackageJson, getJavaScriptPackageJson, getTsConfig, getViteConfig, getMainFile, getHomeRoute, getAdminRoute, getHomeController, getAdminController, getEnvExample, getInternalAuthMiddleware, getUserAuthMiddleware, getHomeSchema, getAdminSchema, getDockerfile, getDockerCompose, getGitignore, getDockerIgnore, getSprintConfigFile, getEnvDevelopment, getEnvProduction, getExampleCronJob, getGraphQLFiles } from "./generators.js";
8
+ import { getTypeScriptPackageJson, getJavaScriptPackageJson, getTsConfig, getMainFile, getHomeRoute, getAdminRoute, getHomeController, getAdminController, getEnvExample, getInternalAuthMiddleware, getUserAuthMiddleware, getHomeSchema, getAdminSchema, getDockerfile, getDockerCompose, getGitignore, getDockerIgnore, getSprintConfigFile, getEnvDevelopment, getEnvProduction, getExampleCronJob, getGraphQLFiles } from "./generators.js";
9
+
10
+ type TelemetryProviders = "none" | "sentry" | "glitchtip" | "discord" | "open-telemetry" | "telegram" | "nodemailer";
9
11
 
10
12
  export interface CLIOptions {
11
13
  projectName?: string;
12
14
  language?: "typescript" | "javascript";
13
- telemetry?: "none" | "sentry" | "glitchtip" | "discord";
15
+ telemetry?: TelemetryProviders;
14
16
  swagger?: boolean;
15
17
  graphql?: boolean;
16
18
  docker?: boolean;
@@ -33,7 +35,7 @@ export async function runCLI(args: string[]) {
33
35
  let config: {
34
36
  projectName: string;
35
37
  language: "typescript" | "javascript";
36
- telemetry: string;
38
+ telemetry: TelemetryProviders;
37
39
  swagger: boolean;
38
40
  graphql: boolean;
39
41
  docker: boolean;
@@ -43,7 +45,7 @@ export async function runCLI(args: string[]) {
43
45
  config = {
44
46
  projectName: options.projectName || "sprint-app",
45
47
  language: options.language || "typescript",
46
- telemetry: options.telemetry || "none",
48
+ telemetry: options.telemetry ?? "none",
47
49
  swagger: options.swagger ?? true,
48
50
  graphql: options.graphql ?? false,
49
51
  docker: options.docker || false,
@@ -55,7 +57,7 @@ export async function runCLI(args: string[]) {
55
57
  p.text({
56
58
  message: "Project name:",
57
59
  placeholder: "my-api",
58
- validate: (v) => validateProjectName(v) || undefined,
60
+ validate: (v) => validateProjectName(v || "sprint-app") || undefined,
59
61
  }),
60
62
 
61
63
  language: () =>
@@ -167,7 +169,10 @@ function parseArgs(args: string[]): CLIOptions {
167
169
  else if (hasJs) options.language = "javascript";
168
170
  } else options.language = "typescript";
169
171
 
170
- if (hasName !== -1 && args[hasName + 1]) options.projectName = args[hasName + 1];
172
+ if (hasName !== -1) {
173
+ const value = args[hasName + 1];
174
+ if (typeof value === "string") options.projectName = value;
175
+ }
171
176
 
172
177
  if (args.includes("--current")) options.projectName = ".";
173
178
 
@@ -181,7 +186,9 @@ function parseArgs(args: string[]): CLIOptions {
181
186
 
182
187
  if (args.includes("--no-install")) options.skipInstall = true;
183
188
 
184
- if (telemetryArg && ["sentry", "glitchtip", "discord", "none"].includes(telemetryArg)) options.telemetry = telemetryArg as CLIOptions["telemetry"];
189
+ if (telemetryArg && ["sentry", "glitchtip", "discord", "none"].includes(telemetryArg)) {
190
+ if (typeof telemetryArg === "string" && ["sentry", "glitchtip", "discord", "none"].includes(telemetryArg)) options.telemetry = telemetryArg as TelemetryProviders;
191
+ }
185
192
 
186
193
  return options;
187
194
  };
@@ -189,7 +196,7 @@ function parseArgs(args: string[]): CLIOptions {
189
196
  async function createProject(
190
197
  projectName: string,
191
198
  language: "typescript" | "javascript",
192
- telemetry: string,
199
+ telemetry: TelemetryProviders,
193
200
  swagger: boolean,
194
201
  graphql: boolean,
195
202
  useDocker: boolean
@@ -212,7 +219,6 @@ async function createProject(
212
219
 
213
220
  if (language === "typescript") {
214
221
  await writeFile(join(targetDir, "tsconfig.json"), getTsConfig());
215
- await writeFile(join(targetDir, "vite.config.ts"), getViteConfig());
216
222
  await writeFile(join(targetDir, "sprint.config.ts"), getSprintConfigFile(language, telemetry, swagger, graphql));
217
223
  } else await writeFile(join(targetDir, "sprint.config.js"), getSprintConfigFile(language, telemetry, swagger, graphql));
218
224
 
@@ -1,55 +1,34 @@
1
1
  export function getTsConfig() {
2
- return JSON.stringify({
3
- compilerOptions: {
4
- target: "ES2022",
5
- module: "NodeNext",
6
- moduleResolution: "NodeNext",
7
- lib: ["ES2022"],
8
- types: ["node"],
9
- outDir: "./dist",
10
- rootDir: "./src",
11
- strict: true,
12
- esModuleInterop: true,
13
- skipLibCheck: true,
14
- forceConsistentCasingInFileNames: true,
15
- resolveJsonModule: true,
16
- declaration: true,
17
- declarationMap: true,
18
- sourceMap: true,
19
- baseUrl: ".",
20
- paths: {
21
- "@/*": ["./src/*"]
22
- }
23
- },
24
- include: ["src/**/*"],
25
- exclude: ["node_modules", "dist"],
26
- }, null, 2);
27
- };
28
-
29
- export function getViteConfig() {
30
- return `import { defineConfig } from "vite";
31
- import { resolve } from "path";
32
-
33
- export default defineConfig({
34
- build: {
35
- lib: {
36
- entry: "src/app.ts",
37
- formats: ["es"],
38
- fileName: "app"
39
- },
40
- outDir: "dist",
41
- rollupOptions: {
42
- external: ["sprint-es", "express", "cors", "morgan", "serve-favicon", "dotenv"]
43
- },
44
- target: "ES2020"
2
+ return `
3
+ {
4
+ "compilerOptions": {
5
+ "target": "ESNext",
6
+ "module": "ESNext",
7
+ "baseUrl": "./src",
8
+ "paths": {
9
+ "@/*": [
10
+ "*"
11
+ ]
45
12
  },
46
- resolve: {
47
- alias: {
48
- "@": "src"
49
- }
50
- }
51
- });
52
- `;
13
+ "moduleResolution": "Node",
14
+ "outDir": "dist",
15
+ "importsNotUsedAsValues": "remove",
16
+ "strict": true,
17
+ "esModuleInterop": true,
18
+ "skipLibCheck": true,
19
+ "forceConsistentCasingInFileNames": true,
20
+ "types": [
21
+ "vitest/globals"
22
+ ]
23
+ },
24
+ "include": [
25
+ "src/**/*"
26
+ ],
27
+ "exclude": [
28
+ "node_modules"
29
+ ]
30
+ }
31
+ `;
53
32
  };
54
33
 
55
34
  export function getSprintConfigFile(language: string, telemetry: string, swagger: boolean, graphql: boolean) {
@@ -1,6 +1,6 @@
1
1
  export function getDockerfile(language: string) {
2
2
  if (language === "typescript") {
3
- return `FROM node:20-alpine
3
+ return `FROM node:20-alpine AS builder
4
4
 
5
5
  WORKDIR /app
6
6
 
@@ -12,6 +12,17 @@ COPY . .
12
12
 
13
13
  RUN npm run build
14
14
 
15
+
16
+ FROM node:20-alpine
17
+
18
+ WORKDIR /app
19
+
20
+ COPY package*.json ./
21
+
22
+ RUN npm ci --omit=dev
23
+
24
+ COPY --from=builder /app/dist ./dist
25
+
15
26
  EXPOSE 5000
16
27
 
17
28
  CMD ["npm", "start"]
@@ -33,7 +44,7 @@ CMD ["npm", "start"]
33
44
  `;
34
45
  };
35
46
 
36
- export function getDockerCompose(language: string) {
47
+ export function getDockerCompose(_language: string) {
37
48
  return `
38
49
  services:
39
50
  app:
@@ -1,6 +1,5 @@
1
1
  export function getGraphQLFiles(language: string) {
2
2
  const isTs = language === "typescript";
3
- const ext = isTs ? "" : ".js";
4
3
 
5
4
  const tsTypes = `import { GraphQLObjectType, GraphQLString, GraphQLList, GraphQLNonNull } from "graphql";
6
5
 
@@ -1,8 +1,8 @@
1
1
  // Package JSON
2
2
  export { generateJWTKeys, getTypeScriptPackageJson, getJavaScriptPackageJson } from "./packageJson.js";
3
3
 
4
- // Config Files (tsconfig, vite.config, sprint.config)
5
- export { getTsConfig, getViteConfig, getSprintConfigFile } from "./configFiles.js";
4
+ // Config Files (tsconfig, sprint.config)
5
+ export { getTsConfig, getSprintConfigFile } from "./configFiles.js";
6
6
 
7
7
  // Environment Files
8
8
  export { getEnvExample, getEnvDevelopment, getEnvProduction } from "./env.js";
@@ -16,15 +16,14 @@ export function generateJWTKeys(): JWTKeys {
16
16
 
17
17
  export function getTypeScriptPackageJson(name: string, telemetry: string, swagger: boolean, graphql: boolean) {
18
18
  const deps: Record<string, string> = {
19
- "sprint-es": "^0.0.90"
19
+ "sprint-es": "^0.0.135"
20
20
  };
21
21
 
22
22
  const devDeps: Record<string, string> = {
23
23
  "@types/node": "^22.0.0",
24
24
  "tsx": "^4.19.0",
25
25
  typescript: "^5.6.0",
26
- vite: "^6.4.1",
27
- "vite-plugin-dts": "^4.5.4"
26
+ tsup: "^8.5.1"
28
27
  };
29
28
 
30
29
  if (telemetry === "sentry" || telemetry === "glitchtip") deps["@sentry/node"] = "^8.0.0";
@@ -43,7 +42,8 @@ export function getTypeScriptPackageJson(name: string, telemetry: string, swagge
43
42
  name: name === "." ? "sprint-app" : name,
44
43
  version: "0.0.1",
45
44
  description: "Sprint API",
46
- main: "dist/index.js",
45
+ main: "dist/app.js",
46
+ type: "module",
47
47
  scripts: {
48
48
  build: "sprint-es build",
49
49
  start: "sprint-es start",
@@ -52,13 +52,28 @@ export function getTypeScriptPackageJson(name: string, telemetry: string, swagge
52
52
  "generate:keys": "sprint-es generate-keys"
53
53
  },
54
54
  dependencies: deps,
55
- devDependencies: devDeps
55
+ devDependencies: devDeps,
56
+ tsup: {
57
+ entry: [
58
+ "src/**/*.ts"
59
+ ],
60
+ outDir: "dist",
61
+ format: [
62
+ "esm"
63
+ ],
64
+ target: "es2020",
65
+ sourcemap: true,
66
+ clean: true,
67
+ dts: true,
68
+ splitting: false,
69
+ skipNodeModulesBundle: true
70
+ }
56
71
  };
57
72
  };
58
73
 
59
74
  export function getJavaScriptPackageJson(name: string, telemetry: string, swagger: boolean, graphql: boolean) {
60
75
  const deps: Record<string, string> = {
61
- "sprint-es": "^0.0.90"
76
+ "sprint-es": "^0.0.135"
62
77
  };
63
78
 
64
79
  if (telemetry === "sentry" || telemetry === "glitchtip") deps["@sentry/node"] = "^8.0.0";
@@ -76,7 +91,7 @@ export function getJavaScriptPackageJson(name: string, telemetry: string, swagge
76
91
  name: name === "." ? "sprint-app" : name,
77
92
  version: "0.0.1",
78
93
  description: "Sprint API",
79
- main: "src/index.js",
94
+ main: "src/app.js",
80
95
  type: "module",
81
96
  scripts: {
82
97
  build: "sprint-es build",
@@ -1,6 +1,5 @@
1
1
  export function getMainFile(language: string, graphql: boolean = false) {
2
2
  const isTs = language === "typescript";
3
- const ext = isTs ? "" : ".js";
4
3
 
5
4
  if (isTs) {
6
5
  if (graphql) {