@mrpelz/boilerplate-node 11.2.2 → 12.0.0

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/Dockerfile ADDED
@@ -0,0 +1,16 @@
1
+ FROM node:lts
2
+
3
+ ENV NODE_ENV="production"
4
+
5
+ ARG PACKAGE_SPEC
6
+
7
+ RUN --mount="type=secret,id=.npmrc,target=/kaniko/.npmrc" \
8
+ export NPM_CONFIG_USERCONFIG="/kaniko/.npmrc" && \
9
+ export PACKAGE_BUNDLE="$(npm pack --silent "${PACKAGE_SPEC}")" && \
10
+ \
11
+ tar --strip-components=1 -xf "${PACKAGE_BUNDLE}" "package/" && \
12
+ rm "${PACKAGE_BUNDLE}" && \
13
+ \
14
+ npm install --audit=false --fund=false
15
+
16
+ CMD ["node", "--use_strict", "--enable-source-maps", "--stack-trace-limit=100", "dist/main.js"]
package/dist/main.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":""}
package/dist/main.js ADDED
@@ -0,0 +1,4 @@
1
+ export {};
2
+ // noop
3
+ // eslint-disable-next-line unicorn/no-empty-file
4
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAAA,OAAO;AACP,iDAAiD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrpelz/boilerplate-node",
3
- "version": "11.2.2",
3
+ "version": "12.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/mrpelz/boilerplate.git",
@@ -18,6 +18,7 @@
18
18
  "files": [
19
19
  "dist/**/*.{js,map,ts}",
20
20
  "commitlint.config.mjs",
21
+ "Dockerfile",
21
22
  "eslint.config.js",
22
23
  "jest.config.js",
23
24
  "Makefile",
@@ -130,4 +130,11 @@ fi
130
130
  # shellcheck disable=SC1091
131
131
  source "${SCRIPT_PATH}/common-post.sh"
132
132
 
133
+ if check_response "🐳 use Docker and copy Dockerfile from \"$BOILERPLATE_NODE_MODULE_NAME\"?" y; then
134
+ npm pkg set --workspaces=false \
135
+ "files[]=Dockerfile"
136
+
137
+ make_config Dockerfile "$(cat "${BOILERPLATE_NODE_MODULE_PATH}/Dockerfile")"
138
+ fi
139
+
133
140
  echo "✅ done"