pwi-plata-type 0.3.14 → 0.3.17

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/bin/plata.ts CHANGED
@@ -61,7 +61,9 @@ const main = async () => {
61
61
 
62
62
  app.disable('x-powered-by')
63
63
 
64
- app.use(process.env._PLATA_API_ROOT ?? '/api',await buildExpressRouter())
64
+ const apiRoots = process.env._PLATA_API_ROOT ?? '/api'
65
+
66
+ app.use(apiRoots.split(','), await buildExpressRouter())
65
67
 
66
68
  app.use((err, _req, res, _next) => {
67
69
  return res.status(500).json({
package/libs/routes.ts CHANGED
@@ -266,7 +266,7 @@ export async function buildExpressRouter(): Promise<_Router> {
266
266
  path: httpPath,
267
267
  method: prr.method,
268
268
  handlers: [],
269
- swaggerHide: prr.swaggerHide
269
+ swaggerHide: prr.swaggerHide === undefined ? pr.swaggerHide : undefined
270
270
  })
271
271
  }
272
272
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pwi-plata-type",
3
- "version": "0.3.14",
3
+ "version": "0.3.17",
4
4
  "main": "index.ts",
5
5
  "bin": {
6
6
  "plata": "bin/plata.ts",
@@ -22,7 +22,7 @@
22
22
  "request": "launch",
23
23
  "runtimeArgs": [
24
24
  "run-script",
25
- "start"
25
+ "debug"
26
26
  ],
27
27
  "runtimeExecutable": "npm",
28
28
  "skipFiles": [
@@ -22,7 +22,8 @@ export async function install({ dirs, projectPackageJson }) {
22
22
  projectPackageJson.scripts.start = `ts-node -P ./tsconfig.json ./node_modules/${projectPackageJson.plata_name}/bin/plata`
23
23
  projectPackageJson.scripts.build = `npx tsc && ts-node -P ./tsconfig.json ./node_modules/${projectPackageJson.plata_name}/bin/plata-build --`
24
24
  projectPackageJson.scripts.create = `ts-node -P ./tsconfig.json ./node_modules/${projectPackageJson.plata_name}/bin/plata-create --`
25
- projectPackageJson.scripts.dev = "npx nodemon -e '.js,.mjs,.json,.ts' --exec 'npm start'"
25
+ projectPackageJson.scripts.dev = "npx nodemon -e '.js,.mjs,.json,.ts' --exec npm run debug"
26
+ projectPackageJson.scripts.debug = `node --inspect -r ts-node/register ./node_modules/${projectPackageJson.plata_name}/bin/plata`
26
27
  projectPackageJson.scripts['swagger:gen'] = `ts-node -P ./tsconfig.json ./node_modules/${projectPackageJson.plata_name}/bin/plata-swagger-gen`
27
28
  projectPackageJson.scripts['plata:reload'] = `ts-node -P ./tsconfig.json ./node_modules/${projectPackageJson.plata_name}/bin/plata-reload.ts`
28
29
  projectPackageJson.main = undefined