@whook/create 10.0.2 → 10.0.5
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/services/author.test.js +1 -1
- package/dist/services/author.test.js.map +1 -1
- package/dist/services/createWhook.d.ts +5 -4
- package/dist/services/createWhook.test.js +150 -153
- package/dist/services/createWhook.test.js.map +1 -1
- package/dist/services/project.d.ts +2 -1
- package/dist/services/project.test.js +1 -1
- package/dist/services/project.test.js.map +1 -1
- package/package.json +17 -18
- package/src/services/__snapshots__/author.test.ts.snap +51 -51
- package/src/services/__snapshots__/createWhook.test.ts.snap +739 -743
- package/src/services/__snapshots__/project.test.ts.snap +37 -37
- package/src/services/author.test.ts +1 -1
- package/src/services/createWhook.test.ts +150 -153
- package/src/services/project.test.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jest } from '@jest/globals';
|
|
1
|
+
import { describe, it, beforeEach, jest, expect } from '@jest/globals';
|
|
2
2
|
import initCreateWhook from './createWhook.js';
|
|
3
3
|
import { YError } from 'yerror';
|
|
4
4
|
import { readFileSync } from 'fs';
|
|
@@ -135,86 +135,85 @@ Mr Bean
|
|
|
135
135
|
?.toString() || '',
|
|
136
136
|
),
|
|
137
137
|
).toMatchInlineSnapshot(`
|
|
138
|
-
|
|
139
|
-
"author":
|
|
138
|
+
{
|
|
139
|
+
"author": {
|
|
140
140
|
"email": "wayne@warner.com",
|
|
141
141
|
"name": "Wayne Campbell",
|
|
142
142
|
},
|
|
143
|
-
"dependencies":
|
|
143
|
+
"dependencies": {
|
|
144
144
|
"@whook/authorization": "<current_version>",
|
|
145
145
|
"@whook/cli": "<current_version>",
|
|
146
146
|
"@whook/cors": "<current_version>",
|
|
147
147
|
"@whook/http-router": "<current_version>",
|
|
148
|
-
"@whook/http-server": "^10.0.
|
|
148
|
+
"@whook/http-server": "^10.0.4",
|
|
149
149
|
"@whook/http-transaction": "<current_version>",
|
|
150
150
|
"@whook/swagger-ui": "<current_version>",
|
|
151
151
|
"@whook/whook": "<current_version>",
|
|
152
|
-
"common-services": "^11.0
|
|
153
|
-
"http-auth-utils": "^3.0.
|
|
154
|
-
"jwt-service": "^9.0.
|
|
155
|
-
"knifecycle": "^14.
|
|
156
|
-
"openapi-schema-validator": "^12.0.
|
|
157
|
-
"openapi-types": "^12.0.
|
|
158
|
-
"strict-qs": "^7.0.
|
|
159
|
-
"type-fest": "^2.
|
|
152
|
+
"common-services": "^11.1.0",
|
|
153
|
+
"http-auth-utils": "^3.0.4",
|
|
154
|
+
"jwt-service": "^9.0.2",
|
|
155
|
+
"knifecycle": "^14.1.0",
|
|
156
|
+
"openapi-schema-validator": "^12.0.2",
|
|
157
|
+
"openapi-types": "^12.0.2",
|
|
158
|
+
"strict-qs": "^7.0.1",
|
|
159
|
+
"type-fest": "^2.19.0",
|
|
160
160
|
"yerror": "^6.1.1",
|
|
161
161
|
"yhttperror": "^6.1.1",
|
|
162
162
|
},
|
|
163
163
|
"description": "A new Whook project",
|
|
164
|
-
"devDependencies":
|
|
165
|
-
"@
|
|
166
|
-
"@typescript-eslint/
|
|
167
|
-
"@typescript-eslint/parser": "^5.27.0",
|
|
164
|
+
"devDependencies": {
|
|
165
|
+
"@typescript-eslint/eslint-plugin": "^5.36.0",
|
|
166
|
+
"@typescript-eslint/parser": "^5.36.0",
|
|
168
167
|
"axios": "^0.27.2",
|
|
169
168
|
"chokidar": "^3.5.1",
|
|
170
|
-
"esbuild": "^0.
|
|
169
|
+
"esbuild": "^0.15.6",
|
|
171
170
|
"esbuild-jest": "^0.5.0",
|
|
172
|
-
"esbuild-node-externals": "^1.
|
|
173
|
-
"eslint": "^8.
|
|
171
|
+
"esbuild-node-externals": "^1.5.0",
|
|
172
|
+
"eslint": "^8.23.0",
|
|
174
173
|
"eslint-config-prettier": "^8.5.0",
|
|
175
|
-
"eslint-plugin-prettier": "^4.
|
|
176
|
-
"jest": "^
|
|
177
|
-
"jsarch": "^
|
|
174
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
175
|
+
"jest": "^29.0.1",
|
|
176
|
+
"jsarch": "^6.0.0",
|
|
178
177
|
"parse-gitignore": "^1.0.1",
|
|
179
|
-
"prettier": "^2.
|
|
178
|
+
"prettier": "^2.7.1",
|
|
180
179
|
"rimraf": "^3.0.2",
|
|
181
180
|
"schema2dts": "^4.1.1",
|
|
182
181
|
"ts-node": "^10.8.1",
|
|
183
|
-
"typescript": "^4.
|
|
182
|
+
"typescript": "^4.8.2",
|
|
184
183
|
},
|
|
185
|
-
"engines":
|
|
184
|
+
"engines": {
|
|
186
185
|
"node": ">=16.15.0",
|
|
187
186
|
},
|
|
188
|
-
"eslintConfig":
|
|
189
|
-
"env":
|
|
187
|
+
"eslintConfig": {
|
|
188
|
+
"env": {
|
|
190
189
|
"es6": true,
|
|
191
190
|
"jest": true,
|
|
192
191
|
"mocha": true,
|
|
193
192
|
"node": true,
|
|
194
193
|
},
|
|
195
|
-
"extends":
|
|
194
|
+
"extends": [
|
|
196
195
|
"eslint:recommended",
|
|
197
196
|
"plugin:prettier/recommended",
|
|
198
197
|
"plugin:@typescript-eslint/eslint-recommended",
|
|
199
198
|
"plugin:@typescript-eslint/recommended",
|
|
200
199
|
],
|
|
201
|
-
"ignorePatterns":
|
|
200
|
+
"ignorePatterns": [
|
|
202
201
|
"*.d.ts",
|
|
203
202
|
],
|
|
204
203
|
"parser": "@typescript-eslint/parser",
|
|
205
|
-
"parserOptions":
|
|
204
|
+
"parserOptions": {
|
|
206
205
|
"ecmaVersion": 2018,
|
|
207
206
|
"modules": true,
|
|
208
207
|
"sourceType": "script",
|
|
209
208
|
},
|
|
210
|
-
"plugins":
|
|
209
|
+
"plugins": [
|
|
211
210
|
"prettier",
|
|
212
211
|
],
|
|
213
|
-
"rules":
|
|
212
|
+
"rules": {
|
|
214
213
|
"prettier/prettier": "error",
|
|
215
214
|
},
|
|
216
215
|
},
|
|
217
|
-
"files":
|
|
216
|
+
"files": [
|
|
218
217
|
"bin",
|
|
219
218
|
"dist",
|
|
220
219
|
"src",
|
|
@@ -222,42 +221,42 @@ Mr Bean
|
|
|
222
221
|
"README.md",
|
|
223
222
|
"CHANGELOG.md",
|
|
224
223
|
],
|
|
225
|
-
"jest":
|
|
226
|
-
"coverageReporters":
|
|
224
|
+
"jest": {
|
|
225
|
+
"coverageReporters": [
|
|
227
226
|
"lcov",
|
|
228
227
|
"html",
|
|
229
228
|
],
|
|
230
|
-
"extensionsToTreatAsEsm":
|
|
229
|
+
"extensionsToTreatAsEsm": [
|
|
231
230
|
".ts",
|
|
232
231
|
],
|
|
233
|
-
"moduleNameMapper":
|
|
232
|
+
"moduleNameMapper": {
|
|
234
233
|
"#(.*)": "<rootDir>/../../node_modules/$1",
|
|
235
|
-
"(.+)
|
|
234
|
+
"(.+)\\.js": "$1",
|
|
236
235
|
},
|
|
237
|
-
"roots":
|
|
236
|
+
"roots": [
|
|
238
237
|
"<rootDir>/src",
|
|
239
238
|
],
|
|
240
239
|
"testEnvironment": "node",
|
|
241
|
-
"testPathIgnorePatterns":
|
|
240
|
+
"testPathIgnorePatterns": [
|
|
242
241
|
"/node_modules/",
|
|
243
242
|
],
|
|
244
|
-
"transform":
|
|
245
|
-
"
|
|
243
|
+
"transform": {
|
|
244
|
+
"^.+\\.tsx?$": [
|
|
246
245
|
"esbuild-jest",
|
|
247
|
-
|
|
246
|
+
{
|
|
248
247
|
"format": "esm",
|
|
249
248
|
"sourcemap": true,
|
|
250
249
|
},
|
|
251
250
|
],
|
|
252
251
|
},
|
|
253
252
|
},
|
|
254
|
-
"keywords":
|
|
253
|
+
"keywords": [
|
|
255
254
|
"whook",
|
|
256
255
|
],
|
|
257
256
|
"license": "SEE LICENSE",
|
|
258
257
|
"main": "dist/index.js",
|
|
259
258
|
"name": "super-project",
|
|
260
|
-
"prettier":
|
|
259
|
+
"prettier": {
|
|
261
260
|
"printWidth": 80,
|
|
262
261
|
"proseWrap": "always",
|
|
263
262
|
"semi": true,
|
|
@@ -265,7 +264,7 @@ Mr Bean
|
|
|
265
264
|
"trailingComma": "all",
|
|
266
265
|
},
|
|
267
266
|
"private": true,
|
|
268
|
-
"scripts":
|
|
267
|
+
"scripts": {
|
|
269
268
|
"apitypes": "npm run --silent whook -- generateOpenAPISchema --authenticated=true | npm run --silent whook -- generateOpenAPITypes > src/openAPISchema.d.ts",
|
|
270
269
|
"architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md",
|
|
271
270
|
"build": "rimraf -f 'dist' && tsc --outDir dist",
|
|
@@ -275,14 +274,14 @@ Mr Bean
|
|
|
275
274
|
"genPackagelock": "npm i --package-lock-only",
|
|
276
275
|
"jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest",
|
|
277
276
|
"lint": "eslint 'src/**/*.ts'",
|
|
278
|
-
"postbuild": "PROJECT_SRC
|
|
277
|
+
"postbuild": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --files -- bin/build.js",
|
|
279
278
|
"prettier": "prettier --write 'src/**/*.ts'",
|
|
280
|
-
"start": "PROJECT_SRC
|
|
279
|
+
"start": "PROJECT_SRC="$PWD/dist" NODE_ENV=\${NODE_ENV:-development} node bin/start.js",
|
|
281
280
|
"test": "NODE_ENV=test npm run build && npm run jest",
|
|
282
281
|
"watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 ts-node --esm --files bin/watch.js",
|
|
283
282
|
"whook": "NODE_ENV=\${NODE_ENV:-development} whook",
|
|
284
|
-
"whook-dev": "PROJECT_SRC
|
|
285
|
-
"whook-repl": "PROJECT_SRC
|
|
283
|
+
"whook-dev": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --files -- bin/whook.js",
|
|
284
|
+
"whook-repl": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --files -- bin/repl.js",
|
|
286
285
|
},
|
|
287
286
|
"type": "module",
|
|
288
287
|
"types": "dist/index.d.ts",
|
|
@@ -356,86 +355,85 @@ Mr Bean
|
|
|
356
355
|
?.toString() || '',
|
|
357
356
|
),
|
|
358
357
|
).toMatchInlineSnapshot(`
|
|
359
|
-
|
|
360
|
-
"author":
|
|
358
|
+
{
|
|
359
|
+
"author": {
|
|
361
360
|
"email": "wayne@warner.com",
|
|
362
361
|
"name": "Wayne Campbell",
|
|
363
362
|
},
|
|
364
|
-
"dependencies":
|
|
363
|
+
"dependencies": {
|
|
365
364
|
"@whook/authorization": "<current_version>",
|
|
366
365
|
"@whook/cli": "<current_version>",
|
|
367
366
|
"@whook/cors": "<current_version>",
|
|
368
367
|
"@whook/http-router": "<current_version>",
|
|
369
|
-
"@whook/http-server": "^10.0.
|
|
368
|
+
"@whook/http-server": "^10.0.4",
|
|
370
369
|
"@whook/http-transaction": "<current_version>",
|
|
371
370
|
"@whook/swagger-ui": "<current_version>",
|
|
372
371
|
"@whook/whook": "<current_version>",
|
|
373
|
-
"common-services": "^11.0
|
|
374
|
-
"http-auth-utils": "^3.0.
|
|
375
|
-
"jwt-service": "^9.0.
|
|
376
|
-
"knifecycle": "^14.
|
|
377
|
-
"openapi-schema-validator": "^12.0.
|
|
378
|
-
"openapi-types": "^12.0.
|
|
379
|
-
"strict-qs": "^7.0.
|
|
380
|
-
"type-fest": "^2.
|
|
372
|
+
"common-services": "^11.1.0",
|
|
373
|
+
"http-auth-utils": "^3.0.4",
|
|
374
|
+
"jwt-service": "^9.0.2",
|
|
375
|
+
"knifecycle": "^14.1.0",
|
|
376
|
+
"openapi-schema-validator": "^12.0.2",
|
|
377
|
+
"openapi-types": "^12.0.2",
|
|
378
|
+
"strict-qs": "^7.0.1",
|
|
379
|
+
"type-fest": "^2.19.0",
|
|
381
380
|
"yerror": "^6.1.1",
|
|
382
381
|
"yhttperror": "^6.1.1",
|
|
383
382
|
},
|
|
384
383
|
"description": "A new Whook project",
|
|
385
|
-
"devDependencies":
|
|
386
|
-
"@
|
|
387
|
-
"@typescript-eslint/
|
|
388
|
-
"@typescript-eslint/parser": "^5.27.0",
|
|
384
|
+
"devDependencies": {
|
|
385
|
+
"@typescript-eslint/eslint-plugin": "^5.36.0",
|
|
386
|
+
"@typescript-eslint/parser": "^5.36.0",
|
|
389
387
|
"axios": "^0.27.2",
|
|
390
388
|
"chokidar": "^3.5.1",
|
|
391
|
-
"esbuild": "^0.
|
|
389
|
+
"esbuild": "^0.15.6",
|
|
392
390
|
"esbuild-jest": "^0.5.0",
|
|
393
|
-
"esbuild-node-externals": "^1.
|
|
394
|
-
"eslint": "^8.
|
|
391
|
+
"esbuild-node-externals": "^1.5.0",
|
|
392
|
+
"eslint": "^8.23.0",
|
|
395
393
|
"eslint-config-prettier": "^8.5.0",
|
|
396
|
-
"eslint-plugin-prettier": "^4.
|
|
397
|
-
"jest": "^
|
|
398
|
-
"jsarch": "^
|
|
394
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
395
|
+
"jest": "^29.0.1",
|
|
396
|
+
"jsarch": "^6.0.0",
|
|
399
397
|
"parse-gitignore": "^1.0.1",
|
|
400
|
-
"prettier": "^2.
|
|
398
|
+
"prettier": "^2.7.1",
|
|
401
399
|
"rimraf": "^3.0.2",
|
|
402
400
|
"schema2dts": "^4.1.1",
|
|
403
401
|
"ts-node": "^10.8.1",
|
|
404
|
-
"typescript": "^4.
|
|
402
|
+
"typescript": "^4.8.2",
|
|
405
403
|
},
|
|
406
|
-
"engines":
|
|
404
|
+
"engines": {
|
|
407
405
|
"node": ">=16.15.0",
|
|
408
406
|
},
|
|
409
|
-
"eslintConfig":
|
|
410
|
-
"env":
|
|
407
|
+
"eslintConfig": {
|
|
408
|
+
"env": {
|
|
411
409
|
"es6": true,
|
|
412
410
|
"jest": true,
|
|
413
411
|
"mocha": true,
|
|
414
412
|
"node": true,
|
|
415
413
|
},
|
|
416
|
-
"extends":
|
|
414
|
+
"extends": [
|
|
417
415
|
"eslint:recommended",
|
|
418
416
|
"plugin:prettier/recommended",
|
|
419
417
|
"plugin:@typescript-eslint/eslint-recommended",
|
|
420
418
|
"plugin:@typescript-eslint/recommended",
|
|
421
419
|
],
|
|
422
|
-
"ignorePatterns":
|
|
420
|
+
"ignorePatterns": [
|
|
423
421
|
"*.d.ts",
|
|
424
422
|
],
|
|
425
423
|
"parser": "@typescript-eslint/parser",
|
|
426
|
-
"parserOptions":
|
|
424
|
+
"parserOptions": {
|
|
427
425
|
"ecmaVersion": 2018,
|
|
428
426
|
"modules": true,
|
|
429
427
|
"sourceType": "script",
|
|
430
428
|
},
|
|
431
|
-
"plugins":
|
|
429
|
+
"plugins": [
|
|
432
430
|
"prettier",
|
|
433
431
|
],
|
|
434
|
-
"rules":
|
|
432
|
+
"rules": {
|
|
435
433
|
"prettier/prettier": "error",
|
|
436
434
|
},
|
|
437
435
|
},
|
|
438
|
-
"files":
|
|
436
|
+
"files": [
|
|
439
437
|
"bin",
|
|
440
438
|
"dist",
|
|
441
439
|
"src",
|
|
@@ -443,42 +441,42 @@ Mr Bean
|
|
|
443
441
|
"README.md",
|
|
444
442
|
"CHANGELOG.md",
|
|
445
443
|
],
|
|
446
|
-
"jest":
|
|
447
|
-
"coverageReporters":
|
|
444
|
+
"jest": {
|
|
445
|
+
"coverageReporters": [
|
|
448
446
|
"lcov",
|
|
449
447
|
"html",
|
|
450
448
|
],
|
|
451
|
-
"extensionsToTreatAsEsm":
|
|
449
|
+
"extensionsToTreatAsEsm": [
|
|
452
450
|
".ts",
|
|
453
451
|
],
|
|
454
|
-
"moduleNameMapper":
|
|
452
|
+
"moduleNameMapper": {
|
|
455
453
|
"#(.*)": "<rootDir>/../../node_modules/$1",
|
|
456
|
-
"(.+)
|
|
454
|
+
"(.+)\\.js": "$1",
|
|
457
455
|
},
|
|
458
|
-
"roots":
|
|
456
|
+
"roots": [
|
|
459
457
|
"<rootDir>/src",
|
|
460
458
|
],
|
|
461
459
|
"testEnvironment": "node",
|
|
462
|
-
"testPathIgnorePatterns":
|
|
460
|
+
"testPathIgnorePatterns": [
|
|
463
461
|
"/node_modules/",
|
|
464
462
|
],
|
|
465
|
-
"transform":
|
|
466
|
-
"
|
|
463
|
+
"transform": {
|
|
464
|
+
"^.+\\.tsx?$": [
|
|
467
465
|
"esbuild-jest",
|
|
468
|
-
|
|
466
|
+
{
|
|
469
467
|
"format": "esm",
|
|
470
468
|
"sourcemap": true,
|
|
471
469
|
},
|
|
472
470
|
],
|
|
473
471
|
},
|
|
474
472
|
},
|
|
475
|
-
"keywords":
|
|
473
|
+
"keywords": [
|
|
476
474
|
"whook",
|
|
477
475
|
],
|
|
478
476
|
"license": "SEE LICENSE",
|
|
479
477
|
"main": "dist/index.js",
|
|
480
478
|
"name": "super-project",
|
|
481
|
-
"prettier":
|
|
479
|
+
"prettier": {
|
|
482
480
|
"printWidth": 80,
|
|
483
481
|
"proseWrap": "always",
|
|
484
482
|
"semi": true,
|
|
@@ -486,7 +484,7 @@ Mr Bean
|
|
|
486
484
|
"trailingComma": "all",
|
|
487
485
|
},
|
|
488
486
|
"private": true,
|
|
489
|
-
"scripts":
|
|
487
|
+
"scripts": {
|
|
490
488
|
"apitypes": "npm run --silent whook -- generateOpenAPISchema --authenticated=true | npm run --silent whook -- generateOpenAPITypes > src/openAPISchema.d.ts",
|
|
491
489
|
"architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md",
|
|
492
490
|
"build": "rimraf -f 'dist' && tsc --outDir dist",
|
|
@@ -496,14 +494,14 @@ Mr Bean
|
|
|
496
494
|
"genPackagelock": "npm i --package-lock-only",
|
|
497
495
|
"jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest",
|
|
498
496
|
"lint": "eslint 'src/**/*.ts'",
|
|
499
|
-
"postbuild": "PROJECT_SRC
|
|
497
|
+
"postbuild": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --files -- bin/build.js",
|
|
500
498
|
"prettier": "prettier --write 'src/**/*.ts'",
|
|
501
|
-
"start": "PROJECT_SRC
|
|
499
|
+
"start": "PROJECT_SRC="$PWD/dist" NODE_ENV=\${NODE_ENV:-development} node bin/start.js",
|
|
502
500
|
"test": "NODE_ENV=test npm run build && npm run jest",
|
|
503
501
|
"watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 ts-node --esm --files bin/watch.js",
|
|
504
502
|
"whook": "NODE_ENV=\${NODE_ENV:-development} whook",
|
|
505
|
-
"whook-dev": "PROJECT_SRC
|
|
506
|
-
"whook-repl": "PROJECT_SRC
|
|
503
|
+
"whook-dev": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --files -- bin/whook.js",
|
|
504
|
+
"whook-repl": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --files -- bin/repl.js",
|
|
507
505
|
},
|
|
508
506
|
"type": "module",
|
|
509
507
|
"types": "dist/index.d.ts",
|
|
@@ -562,86 +560,85 @@ Mr Bean
|
|
|
562
560
|
?.toString() || '',
|
|
563
561
|
),
|
|
564
562
|
).toMatchInlineSnapshot(`
|
|
565
|
-
|
|
566
|
-
"author":
|
|
563
|
+
{
|
|
564
|
+
"author": {
|
|
567
565
|
"email": "wayne@warner.com",
|
|
568
566
|
"name": "Wayne Campbell",
|
|
569
567
|
},
|
|
570
|
-
"dependencies":
|
|
568
|
+
"dependencies": {
|
|
571
569
|
"@whook/authorization": "<current_version>",
|
|
572
570
|
"@whook/cli": "<current_version>",
|
|
573
571
|
"@whook/cors": "<current_version>",
|
|
574
572
|
"@whook/http-router": "<current_version>",
|
|
575
|
-
"@whook/http-server": "^10.0.
|
|
573
|
+
"@whook/http-server": "^10.0.4",
|
|
576
574
|
"@whook/http-transaction": "<current_version>",
|
|
577
575
|
"@whook/swagger-ui": "<current_version>",
|
|
578
576
|
"@whook/whook": "<current_version>",
|
|
579
|
-
"common-services": "^11.0
|
|
580
|
-
"http-auth-utils": "^3.0.
|
|
581
|
-
"jwt-service": "^9.0.
|
|
582
|
-
"knifecycle": "^14.
|
|
583
|
-
"openapi-schema-validator": "^12.0.
|
|
584
|
-
"openapi-types": "^12.0.
|
|
585
|
-
"strict-qs": "^7.0.
|
|
586
|
-
"type-fest": "^2.
|
|
577
|
+
"common-services": "^11.1.0",
|
|
578
|
+
"http-auth-utils": "^3.0.4",
|
|
579
|
+
"jwt-service": "^9.0.2",
|
|
580
|
+
"knifecycle": "^14.1.0",
|
|
581
|
+
"openapi-schema-validator": "^12.0.2",
|
|
582
|
+
"openapi-types": "^12.0.2",
|
|
583
|
+
"strict-qs": "^7.0.1",
|
|
584
|
+
"type-fest": "^2.19.0",
|
|
587
585
|
"yerror": "^6.1.1",
|
|
588
586
|
"yhttperror": "^6.1.1",
|
|
589
587
|
},
|
|
590
588
|
"description": "A new Whook project",
|
|
591
|
-
"devDependencies":
|
|
592
|
-
"@
|
|
593
|
-
"@typescript-eslint/
|
|
594
|
-
"@typescript-eslint/parser": "^5.27.0",
|
|
589
|
+
"devDependencies": {
|
|
590
|
+
"@typescript-eslint/eslint-plugin": "^5.36.0",
|
|
591
|
+
"@typescript-eslint/parser": "^5.36.0",
|
|
595
592
|
"axios": "^0.27.2",
|
|
596
593
|
"chokidar": "^3.5.1",
|
|
597
|
-
"esbuild": "^0.
|
|
594
|
+
"esbuild": "^0.15.6",
|
|
598
595
|
"esbuild-jest": "^0.5.0",
|
|
599
|
-
"esbuild-node-externals": "^1.
|
|
600
|
-
"eslint": "^8.
|
|
596
|
+
"esbuild-node-externals": "^1.5.0",
|
|
597
|
+
"eslint": "^8.23.0",
|
|
601
598
|
"eslint-config-prettier": "^8.5.0",
|
|
602
|
-
"eslint-plugin-prettier": "^4.
|
|
603
|
-
"jest": "^
|
|
604
|
-
"jsarch": "^
|
|
599
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
600
|
+
"jest": "^29.0.1",
|
|
601
|
+
"jsarch": "^6.0.0",
|
|
605
602
|
"parse-gitignore": "^1.0.1",
|
|
606
|
-
"prettier": "^2.
|
|
603
|
+
"prettier": "^2.7.1",
|
|
607
604
|
"rimraf": "^3.0.2",
|
|
608
605
|
"schema2dts": "^4.1.1",
|
|
609
606
|
"ts-node": "^10.8.1",
|
|
610
|
-
"typescript": "^4.
|
|
607
|
+
"typescript": "^4.8.2",
|
|
611
608
|
},
|
|
612
|
-
"engines":
|
|
609
|
+
"engines": {
|
|
613
610
|
"node": ">=16.15.0",
|
|
614
611
|
},
|
|
615
|
-
"eslintConfig":
|
|
616
|
-
"env":
|
|
612
|
+
"eslintConfig": {
|
|
613
|
+
"env": {
|
|
617
614
|
"es6": true,
|
|
618
615
|
"jest": true,
|
|
619
616
|
"mocha": true,
|
|
620
617
|
"node": true,
|
|
621
618
|
},
|
|
622
|
-
"extends":
|
|
619
|
+
"extends": [
|
|
623
620
|
"eslint:recommended",
|
|
624
621
|
"plugin:prettier/recommended",
|
|
625
622
|
"plugin:@typescript-eslint/eslint-recommended",
|
|
626
623
|
"plugin:@typescript-eslint/recommended",
|
|
627
624
|
],
|
|
628
|
-
"ignorePatterns":
|
|
625
|
+
"ignorePatterns": [
|
|
629
626
|
"*.d.ts",
|
|
630
627
|
],
|
|
631
628
|
"parser": "@typescript-eslint/parser",
|
|
632
|
-
"parserOptions":
|
|
629
|
+
"parserOptions": {
|
|
633
630
|
"ecmaVersion": 2018,
|
|
634
631
|
"modules": true,
|
|
635
632
|
"sourceType": "script",
|
|
636
633
|
},
|
|
637
|
-
"plugins":
|
|
634
|
+
"plugins": [
|
|
638
635
|
"prettier",
|
|
639
636
|
],
|
|
640
|
-
"rules":
|
|
637
|
+
"rules": {
|
|
641
638
|
"prettier/prettier": "error",
|
|
642
639
|
},
|
|
643
640
|
},
|
|
644
|
-
"files":
|
|
641
|
+
"files": [
|
|
645
642
|
"bin",
|
|
646
643
|
"dist",
|
|
647
644
|
"src",
|
|
@@ -649,42 +646,42 @@ Mr Bean
|
|
|
649
646
|
"README.md",
|
|
650
647
|
"CHANGELOG.md",
|
|
651
648
|
],
|
|
652
|
-
"jest":
|
|
653
|
-
"coverageReporters":
|
|
649
|
+
"jest": {
|
|
650
|
+
"coverageReporters": [
|
|
654
651
|
"lcov",
|
|
655
652
|
"html",
|
|
656
653
|
],
|
|
657
|
-
"extensionsToTreatAsEsm":
|
|
654
|
+
"extensionsToTreatAsEsm": [
|
|
658
655
|
".ts",
|
|
659
656
|
],
|
|
660
|
-
"moduleNameMapper":
|
|
657
|
+
"moduleNameMapper": {
|
|
661
658
|
"#(.*)": "<rootDir>/../../node_modules/$1",
|
|
662
|
-
"(.+)
|
|
659
|
+
"(.+)\\.js": "$1",
|
|
663
660
|
},
|
|
664
|
-
"roots":
|
|
661
|
+
"roots": [
|
|
665
662
|
"<rootDir>/src",
|
|
666
663
|
],
|
|
667
664
|
"testEnvironment": "node",
|
|
668
|
-
"testPathIgnorePatterns":
|
|
665
|
+
"testPathIgnorePatterns": [
|
|
669
666
|
"/node_modules/",
|
|
670
667
|
],
|
|
671
|
-
"transform":
|
|
672
|
-
"
|
|
668
|
+
"transform": {
|
|
669
|
+
"^.+\\.tsx?$": [
|
|
673
670
|
"esbuild-jest",
|
|
674
|
-
|
|
671
|
+
{
|
|
675
672
|
"format": "esm",
|
|
676
673
|
"sourcemap": true,
|
|
677
674
|
},
|
|
678
675
|
],
|
|
679
676
|
},
|
|
680
677
|
},
|
|
681
|
-
"keywords":
|
|
678
|
+
"keywords": [
|
|
682
679
|
"whook",
|
|
683
680
|
],
|
|
684
681
|
"license": "SEE LICENSE",
|
|
685
682
|
"main": "dist/index.js",
|
|
686
683
|
"name": "super-project",
|
|
687
|
-
"prettier":
|
|
684
|
+
"prettier": {
|
|
688
685
|
"printWidth": 80,
|
|
689
686
|
"proseWrap": "always",
|
|
690
687
|
"semi": true,
|
|
@@ -692,7 +689,7 @@ Mr Bean
|
|
|
692
689
|
"trailingComma": "all",
|
|
693
690
|
},
|
|
694
691
|
"private": true,
|
|
695
|
-
"scripts":
|
|
692
|
+
"scripts": {
|
|
696
693
|
"apitypes": "npm run --silent whook -- generateOpenAPISchema --authenticated=true | npm run --silent whook -- generateOpenAPITypes > src/openAPISchema.d.ts",
|
|
697
694
|
"architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md",
|
|
698
695
|
"build": "rimraf -f 'dist' && tsc --outDir dist",
|
|
@@ -702,14 +699,14 @@ Mr Bean
|
|
|
702
699
|
"genPackagelock": "npm i --package-lock-only",
|
|
703
700
|
"jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest",
|
|
704
701
|
"lint": "eslint 'src/**/*.ts'",
|
|
705
|
-
"postbuild": "PROJECT_SRC
|
|
702
|
+
"postbuild": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --files -- bin/build.js",
|
|
706
703
|
"prettier": "prettier --write 'src/**/*.ts'",
|
|
707
|
-
"start": "PROJECT_SRC
|
|
704
|
+
"start": "PROJECT_SRC="$PWD/dist" NODE_ENV=\${NODE_ENV:-development} node bin/start.js",
|
|
708
705
|
"test": "NODE_ENV=test npm run build && npm run jest",
|
|
709
706
|
"watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 ts-node --esm --files bin/watch.js",
|
|
710
707
|
"whook": "NODE_ENV=\${NODE_ENV:-development} whook",
|
|
711
|
-
"whook-dev": "PROJECT_SRC
|
|
712
|
-
"whook-repl": "PROJECT_SRC
|
|
708
|
+
"whook-dev": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --files -- bin/whook.js",
|
|
709
|
+
"whook-repl": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --files -- bin/repl.js",
|
|
713
710
|
},
|
|
714
711
|
"type": "module",
|
|
715
712
|
"types": "dist/index.d.ts",
|
|
@@ -768,9 +765,9 @@ Mr Bean
|
|
|
768
765
|
errorCode: (err as YError).code,
|
|
769
766
|
errorParams: (err as YError).params,
|
|
770
767
|
}).toMatchInlineSnapshot(`
|
|
771
|
-
|
|
768
|
+
{
|
|
772
769
|
"errorCode": "E_ACCESS",
|
|
773
|
-
"errorParams":
|
|
770
|
+
"errorParams": [],
|
|
774
771
|
}
|
|
775
772
|
`);
|
|
776
773
|
expect({
|