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