pwi-plata-type 0.2.15 → 0.2.16
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 +10 -5
- package/libs/model.ts +3 -1
- package/libs/swagger.ts +2 -1
- package/package.json +2 -2
package/Dockerfile
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
FROM node:16-alpine
|
|
1
|
+
FROM node:16-alpine AS build
|
|
2
2
|
|
|
3
3
|
WORKDIR /usr/src/app
|
|
4
4
|
|
|
5
|
-
COPY
|
|
5
|
+
COPY . ./
|
|
6
|
+
|
|
7
|
+
RUN npm ci --only=production && \
|
|
8
|
+
npm run build
|
|
9
|
+
|
|
10
|
+
FROM node:16-alpine AS bin
|
|
6
11
|
|
|
7
12
|
EXPOSE 3050
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
WORKDIR /usr/src/app
|
|
10
15
|
|
|
11
|
-
COPY .
|
|
16
|
+
COPY --from=build /usr/src/app/build .
|
|
12
17
|
|
|
13
|
-
CMD [ "
|
|
18
|
+
CMD [ "npm", "start" ]
|
package/libs/model.ts
CHANGED
package/libs/swagger.ts
CHANGED
|
@@ -45,7 +45,8 @@ export namespace PlataSwagger {
|
|
|
45
45
|
|
|
46
46
|
obj.paths[httpPath][metodo] = { ...header, responses: response }
|
|
47
47
|
|
|
48
|
-
if
|
|
48
|
+
//https://bobbyhadz.com/blog/javascript-check-if-object-is-empty
|
|
49
|
+
if (Object.keys(body).length !== 0) {
|
|
49
50
|
if (!Array.isArray(obj.paths[httpPath][metodo].parameters)) {
|
|
50
51
|
obj.paths[httpPath][metodo].parameters = []
|
|
51
52
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pwi-plata-type",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"bin": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"jest": "^28.1.1",
|
|
24
24
|
"swagger-ui-express": "^4.4.0",
|
|
25
25
|
"ts-jest": "^28.0.4",
|
|
26
|
-
"ts-node": "
|
|
26
|
+
"ts-node": "10.8.2"
|
|
27
27
|
},
|
|
28
28
|
"description": "",
|
|
29
29
|
"devDependencies": {
|