create-sprint 0.0.118 → 0.0.120
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 +1 -1
- package/dist/templates/docker.js +3 -0
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/templates/docker.ts +3 -0
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { validateProjectName } from "./validators.js";
|
|
|
8
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
|
-
content = content.
|
|
11
|
+
content = content.trim();
|
|
12
12
|
await fsWriteFile(path, content, options);
|
|
13
13
|
}
|
|
14
14
|
;
|
package/dist/templates/docker.js
CHANGED
|
@@ -22,6 +22,7 @@ COPY package*.json ./
|
|
|
22
22
|
RUN npm ci --omit=dev
|
|
23
23
|
|
|
24
24
|
COPY --from=builder /app/dist ./dist
|
|
25
|
+
COPY --from=builder /app/.env.production ./
|
|
25
26
|
|
|
26
27
|
EXPOSE 5000
|
|
27
28
|
|
|
@@ -51,6 +52,8 @@ services:
|
|
|
51
52
|
build: .
|
|
52
53
|
ports:
|
|
53
54
|
- "5000:5000"
|
|
55
|
+
env_file:
|
|
56
|
+
- .env.production
|
|
54
57
|
environment:
|
|
55
58
|
- NODE_ENV=production
|
|
56
59
|
- PORT=5000
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface CLIOptions {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export async function writeFile(path: string, content: string, options?: any) {
|
|
24
|
-
if (typeof content === "string") content = content.
|
|
24
|
+
if (typeof content === "string") content = content.trim();
|
|
25
25
|
await fsWriteFile(path, content, options);
|
|
26
26
|
};
|
|
27
27
|
|
package/src/templates/docker.ts
CHANGED
|
@@ -22,6 +22,7 @@ COPY package*.json ./
|
|
|
22
22
|
RUN npm ci --omit=dev
|
|
23
23
|
|
|
24
24
|
COPY --from=builder /app/dist ./dist
|
|
25
|
+
COPY --from=builder /app/.env.production ./
|
|
25
26
|
|
|
26
27
|
EXPOSE 5000
|
|
27
28
|
|
|
@@ -51,6 +52,8 @@ services:
|
|
|
51
52
|
build: .
|
|
52
53
|
ports:
|
|
53
54
|
- "5000:5000"
|
|
55
|
+
env_file:
|
|
56
|
+
- .env.production
|
|
54
57
|
environment:
|
|
55
58
|
- NODE_ENV=production
|
|
56
59
|
- PORT=5000
|