@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';
@@ -105,159 +106,162 @@ Mr Bean
105
106
  expect(JSON.parse(writeFile.mock.calls
106
107
  .find((call) => call[0].toString().endsWith('package.json'))?.[1]
107
108
  ?.toString() || '')).toMatchInlineSnapshot(`
108
- {
109
- "author": {
110
- "email": "wayne@warner.com",
111
- "name": "Wayne Campbell",
112
- },
113
- "dependencies": {
114
- "@whook/authorization": "<current_version>",
115
- "@whook/cors": "<current_version>",
116
- "@whook/http-router": "<current_version>",
117
- "@whook/http-server": "<current_version>",
118
- "@whook/http-transaction": "<current_version>",
119
- "@whook/swagger-ui": "<current_version>",
120
- "@whook/whook": "<current_version>",
121
- "common-services": "^12.1.0",
122
- "http-auth-utils": "^3.0.5",
123
- "jwt-service": "^9.0.4",
124
- "knifecycle": "^14.1.0",
125
- "openapi-schema-validator": "^12.0.2",
126
- "openapi-types": "^12.1.0",
127
- "pkg-dir": "^7.0.0",
128
- "strict-qs": "^7.0.2",
129
- "type-fest": "^3.4.0",
130
- "yerror": "^6.2.1",
131
- "yhttperror": "^6.1.2",
132
- },
133
- "description": "A new Whook project",
134
- "devDependencies": {
135
- "@typescript-eslint/eslint-plugin": "^5.36.0",
136
- "@typescript-eslint/parser": "^5.36.0",
137
- "axios": "^1.2.1",
138
- "chokidar": "^3.5.1",
139
- "esbuild": "^0.15.6",
140
- "esbuild-jest": "^0.5.0",
141
- "esbuild-node-externals": "^1.5.0",
142
- "eslint": "^8.23.0",
143
- "eslint-config-prettier": "^8.5.0",
144
- "eslint-plugin-prettier": "^4.2.1",
145
- "jest": "^29.0.1",
146
- "jsarch": "^6.0.0",
147
- "parse-gitignore": "^1.0.1",
148
- "prettier": "^2.7.1",
149
- "rimraf": "^3.0.2",
150
- "schema2dts": "^4.1.4",
151
- "ts-node": "^10.8.1",
152
- "typescript": "^4.8.2",
153
- },
154
- "engines": {
155
- "node": ">=16.15.0",
156
- },
157
- "eslintConfig": {
158
- "env": {
159
- "es6": true,
160
- "jest": true,
161
- "mocha": true,
162
- "node": true,
163
- },
164
- "extends": [
165
- "eslint:recommended",
166
- "plugin:prettier/recommended",
167
- "plugin:@typescript-eslint/eslint-recommended",
168
- "plugin:@typescript-eslint/recommended",
169
- ],
170
- "ignorePatterns": [
171
- "*.d.ts",
172
- ],
173
- "parser": "@typescript-eslint/parser",
174
- "parserOptions": {
175
- "ecmaVersion": 2018,
176
- "modules": true,
177
- "sourceType": "script",
178
- },
179
- "plugins": [
180
- "prettier",
181
- ],
182
- "rules": {
183
- "prettier/prettier": "error",
184
- },
185
- },
186
- "files": [
187
- "bin",
188
- "dist",
189
- "src",
190
- "LICENSE",
191
- "README.md",
192
- "CHANGELOG.md",
193
- ],
194
- "jest": {
195
- "coverageReporters": [
196
- "lcov",
197
- "html",
198
- ],
199
- "extensionsToTreatAsEsm": [
200
- ".ts",
201
- ],
202
- "moduleNameMapper": {
203
- "#(.*)": "<rootDir>/../../node_modules/$1",
204
- "(.+)\\.js": "$1",
205
- },
206
- "roots": [
207
- "<rootDir>/src",
208
- ],
209
- "testEnvironment": "node",
210
- "testPathIgnorePatterns": [
211
- "/node_modules/",
212
- ],
213
- "transform": {
214
- "^.+\\.tsx?$": [
215
- "esbuild-jest",
216
- {
217
- "format": "esm",
218
- "sourcemap": true,
219
- },
220
- ],
221
- },
222
- },
223
- "keywords": [
224
- "whook",
225
- ],
226
- "license": "SEE LICENSE",
227
- "main": "dist/index.js",
228
- "name": "super-project",
229
- "prettier": {
230
- "printWidth": 80,
231
- "proseWrap": "always",
232
- "semi": true,
233
- "singleQuote": true,
234
- "trailingComma": "all",
235
- },
236
- "private": true,
237
- "scripts": {
238
- "apitypes": "npm run --silent whook -- generateOpenAPISchema --authenticated=true | npm run --silent whook -- generateOpenAPITypes > src/openAPISchema.d.ts",
239
- "architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md",
240
- "build": "rimraf -f 'dist' && tsc --outDir dist",
241
- "cover": "npm run jest -- --coverage",
242
- "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",
243
- "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 ts-node --esm --logError --files bin/dev.js",
244
- "jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest",
245
- "lint": "eslint 'src/**/*.ts'",
246
- "postbuild": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --files -- bin/build.js",
247
- "prettier": "prettier --write 'src/**/*.ts'",
248
- "start": "PROJECT_SRC="$PWD/dist" NODE_ENV=\${NODE_ENV:-development} node bin/start.js",
249
- "test": "NODE_ENV=test npm run build && npm run jest",
250
- "watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 ts-node --esm --logError --files bin/watch.js",
251
- "whook": "NODE_ENV=\${NODE_ENV:-development} whook",
252
- "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",
253
- "whook-dev": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --logError --files -- bin/whook.js",
254
- "whook-repl": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --logError --files -- bin/repl.js",
255
- },
256
- "type": "module",
257
- "types": "dist/index.d.ts",
258
- "version": "0.0.0",
259
- }
260
- `);
109
+ {
110
+ "author": {
111
+ "email": "wayne@warner.com",
112
+ "name": "Wayne Campbell",
113
+ },
114
+ "dependencies": {
115
+ "@whook/authorization": "<current_version>",
116
+ "@whook/cors": "<current_version>",
117
+ "@whook/http-router": "<current_version>",
118
+ "@whook/http-server": "<current_version>",
119
+ "@whook/http-transaction": "<current_version>",
120
+ "@whook/swagger-ui": "<current_version>",
121
+ "@whook/whook": "<current_version>",
122
+ "application-services": "^3.0.0",
123
+ "common-services": "^14.0.0",
124
+ "http-auth-utils": "^5.0.1",
125
+ "jwt-service": "^10.0.1",
126
+ "knifecycle": "^16.0.1",
127
+ "openapi-schema-validator": "^12.1.3",
128
+ "openapi-types": "^12.1.3",
129
+ "pkg-dir": "^7.0.0",
130
+ "strict-qs": "^8.0.1",
131
+ "type-fest": "^4.2.0",
132
+ "yerror": "^8.0.0",
133
+ "yhttperror": "^8.0.0",
134
+ },
135
+ "description": "A new Whook project",
136
+ "devDependencies": {
137
+ "@swc/cli": "^0.1.62",
138
+ "@swc/core": "^1.3.77",
139
+ "@swc/helpers": "^0.5.1",
140
+ "@swc/jest": "^0.2.29",
141
+ "@typescript-eslint/eslint-plugin": "^6.4.0",
142
+ "@typescript-eslint/parser": "^6.4.0",
143
+ "axios": "^1.4.0",
144
+ "chokidar": "^3.5.1",
145
+ "esbuild-node-externals": "^1.5.0",
146
+ "eslint": "^8.47.0",
147
+ "eslint-config-prettier": "^9.0.0",
148
+ "eslint-plugin-prettier": "^5.0.0",
149
+ "jest": "^29.6.2",
150
+ "jsarch": "^6.0.1",
151
+ "parse-gitignore": "^1.0.1",
152
+ "prettier": "^3.0.2",
153
+ "rimraf": "^5.0.1",
154
+ "schema2dts": "^5.0.1",
155
+ "ts-node": "^10.8.1",
156
+ "typescript": "^5.1.6",
157
+ },
158
+ "engines": {
159
+ "node": ">=18.16.0",
160
+ },
161
+ "eslintConfig": {
162
+ "env": {
163
+ "es6": true,
164
+ "jest": true,
165
+ "mocha": true,
166
+ "node": true,
167
+ },
168
+ "extends": [
169
+ "eslint:recommended",
170
+ "plugin:prettier/recommended",
171
+ "plugin:@typescript-eslint/eslint-recommended",
172
+ "plugin:@typescript-eslint/recommended",
173
+ ],
174
+ "ignorePatterns": [
175
+ "*.d.ts",
176
+ ],
177
+ "parser": "@typescript-eslint/parser",
178
+ "parserOptions": {
179
+ "ecmaVersion": 2018,
180
+ "modules": true,
181
+ "sourceType": "script",
182
+ },
183
+ "plugins": [
184
+ "prettier",
185
+ ],
186
+ "rules": {
187
+ "prettier/prettier": "error",
188
+ },
189
+ },
190
+ "files": [
191
+ "bin",
192
+ "dist",
193
+ "src",
194
+ "LICENSE",
195
+ "README.md",
196
+ "CHANGELOG.md",
197
+ ],
198
+ "jest": {
199
+ "coverageReporters": [
200
+ "lcov",
201
+ "html",
202
+ ],
203
+ "extensionsToTreatAsEsm": [
204
+ ".ts",
205
+ ],
206
+ "moduleNameMapper": {
207
+ "#(.*)": "<rootDir>/../../node_modules/$1",
208
+ "(.+)\\.js": "$1",
209
+ },
210
+ "prettierPath": null,
211
+ "roots": [
212
+ "<rootDir>/src",
213
+ ],
214
+ "testEnvironment": "node",
215
+ "testPathIgnorePatterns": [
216
+ "/node_modules/",
217
+ ],
218
+ "transform": {
219
+ "^.+\\.tsx?$": [
220
+ "@swc/jest",
221
+ {},
222
+ ],
223
+ },
224
+ },
225
+ "keywords": [
226
+ "whook",
227
+ ],
228
+ "license": "SEE LICENSE",
229
+ "main": "dist/index.js",
230
+ "name": "super-project",
231
+ "prettier": {
232
+ "printWidth": 80,
233
+ "proseWrap": "always",
234
+ "semi": true,
235
+ "singleQuote": true,
236
+ "trailingComma": "all",
237
+ },
238
+ "private": true,
239
+ "scripts": {
240
+ "apitypes": "npm run --silent whook -- generateOpenAPISchema --authenticated=true | npm run --silent whook -- generateOpenAPITypes > src/openAPISchema.d.ts",
241
+ "architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md",
242
+ "build": "rimraf 'dist' && tsc --outDir dist",
243
+ "cover": "npm run jest -- --coverage",
244
+ "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",
245
+ "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 ts-node --esm --logError --files bin/dev.js",
246
+ "jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest",
247
+ "lint": "eslint 'src/**/*.ts'",
248
+ "postbuild": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --files -- bin/build.js",
249
+ "prettier": "prettier --write 'src/**/*.ts'",
250
+ "rebuild": "swc ./src -s -d dist -C jsc.target=es2022",
251
+ "start": "PROJECT_SRC="$PWD/dist" NODE_ENV=\${NODE_ENV:-development} node bin/start.js",
252
+ "test": "NODE_ENV=test npm run build && npm run jest",
253
+ "type-check": "tsc --pretty --noEmit",
254
+ "watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 ts-node --esm --logError --files bin/watch.js",
255
+ "whook": "NODE_ENV=\${NODE_ENV:-development} whook",
256
+ "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",
257
+ "whook-dev": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --logError --files -- bin/whook.js",
258
+ "whook-repl": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --logError --files -- bin/repl.js",
259
+ },
260
+ "type": "module",
261
+ "types": "dist/index.d.ts",
262
+ "version": "0.0.0",
263
+ }
264
+ `);
261
265
  expect({
262
266
  copyCalls: copy.mock.calls,
263
267
  writeFileCalls: writeFile.mock.calls,
@@ -306,159 +310,162 @@ Mr Bean
306
310
  expect(JSON.parse(writeFile.mock.calls
307
311
  .find((call) => call[0].toString().endsWith('package.json'))?.[1]
308
312
  ?.toString() || '')).toMatchInlineSnapshot(`
309
- {
310
- "author": {
311
- "email": "wayne@warner.com",
312
- "name": "Wayne Campbell",
313
- },
314
- "dependencies": {
315
- "@whook/authorization": "<current_version>",
316
- "@whook/cors": "<current_version>",
317
- "@whook/http-router": "<current_version>",
318
- "@whook/http-server": "<current_version>",
319
- "@whook/http-transaction": "<current_version>",
320
- "@whook/swagger-ui": "<current_version>",
321
- "@whook/whook": "<current_version>",
322
- "common-services": "^12.1.0",
323
- "http-auth-utils": "^3.0.5",
324
- "jwt-service": "^9.0.4",
325
- "knifecycle": "^14.1.0",
326
- "openapi-schema-validator": "^12.0.2",
327
- "openapi-types": "^12.1.0",
328
- "pkg-dir": "^7.0.0",
329
- "strict-qs": "^7.0.2",
330
- "type-fest": "^3.4.0",
331
- "yerror": "^6.2.1",
332
- "yhttperror": "^6.1.2",
333
- },
334
- "description": "A new Whook project",
335
- "devDependencies": {
336
- "@typescript-eslint/eslint-plugin": "^5.36.0",
337
- "@typescript-eslint/parser": "^5.36.0",
338
- "axios": "^1.2.1",
339
- "chokidar": "^3.5.1",
340
- "esbuild": "^0.15.6",
341
- "esbuild-jest": "^0.5.0",
342
- "esbuild-node-externals": "^1.5.0",
343
- "eslint": "^8.23.0",
344
- "eslint-config-prettier": "^8.5.0",
345
- "eslint-plugin-prettier": "^4.2.1",
346
- "jest": "^29.0.1",
347
- "jsarch": "^6.0.0",
348
- "parse-gitignore": "^1.0.1",
349
- "prettier": "^2.7.1",
350
- "rimraf": "^3.0.2",
351
- "schema2dts": "^4.1.4",
352
- "ts-node": "^10.8.1",
353
- "typescript": "^4.8.2",
354
- },
355
- "engines": {
356
- "node": ">=16.15.0",
357
- },
358
- "eslintConfig": {
359
- "env": {
360
- "es6": true,
361
- "jest": true,
362
- "mocha": true,
363
- "node": true,
364
- },
365
- "extends": [
366
- "eslint:recommended",
367
- "plugin:prettier/recommended",
368
- "plugin:@typescript-eslint/eslint-recommended",
369
- "plugin:@typescript-eslint/recommended",
370
- ],
371
- "ignorePatterns": [
372
- "*.d.ts",
373
- ],
374
- "parser": "@typescript-eslint/parser",
375
- "parserOptions": {
376
- "ecmaVersion": 2018,
377
- "modules": true,
378
- "sourceType": "script",
379
- },
380
- "plugins": [
381
- "prettier",
382
- ],
383
- "rules": {
384
- "prettier/prettier": "error",
385
- },
386
- },
387
- "files": [
388
- "bin",
389
- "dist",
390
- "src",
391
- "LICENSE",
392
- "README.md",
393
- "CHANGELOG.md",
394
- ],
395
- "jest": {
396
- "coverageReporters": [
397
- "lcov",
398
- "html",
399
- ],
400
- "extensionsToTreatAsEsm": [
401
- ".ts",
402
- ],
403
- "moduleNameMapper": {
404
- "#(.*)": "<rootDir>/../../node_modules/$1",
405
- "(.+)\\.js": "$1",
406
- },
407
- "roots": [
408
- "<rootDir>/src",
409
- ],
410
- "testEnvironment": "node",
411
- "testPathIgnorePatterns": [
412
- "/node_modules/",
413
- ],
414
- "transform": {
415
- "^.+\\.tsx?$": [
416
- "esbuild-jest",
417
- {
418
- "format": "esm",
419
- "sourcemap": true,
420
- },
421
- ],
422
- },
423
- },
424
- "keywords": [
425
- "whook",
426
- ],
427
- "license": "SEE LICENSE",
428
- "main": "dist/index.js",
429
- "name": "super-project",
430
- "prettier": {
431
- "printWidth": 80,
432
- "proseWrap": "always",
433
- "semi": true,
434
- "singleQuote": true,
435
- "trailingComma": "all",
436
- },
437
- "private": true,
438
- "scripts": {
439
- "apitypes": "npm run --silent whook -- generateOpenAPISchema --authenticated=true | npm run --silent whook -- generateOpenAPITypes > src/openAPISchema.d.ts",
440
- "architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md",
441
- "build": "rimraf -f 'dist' && tsc --outDir dist",
442
- "cover": "npm run jest -- --coverage",
443
- "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",
444
- "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 ts-node --esm --logError --files bin/dev.js",
445
- "jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest",
446
- "lint": "eslint 'src/**/*.ts'",
447
- "postbuild": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --files -- bin/build.js",
448
- "prettier": "prettier --write 'src/**/*.ts'",
449
- "start": "PROJECT_SRC="$PWD/dist" NODE_ENV=\${NODE_ENV:-development} node bin/start.js",
450
- "test": "NODE_ENV=test npm run build && npm run jest",
451
- "watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 ts-node --esm --logError --files bin/watch.js",
452
- "whook": "NODE_ENV=\${NODE_ENV:-development} whook",
453
- "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",
454
- "whook-dev": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --logError --files -- bin/whook.js",
455
- "whook-repl": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --logError --files -- bin/repl.js",
456
- },
457
- "type": "module",
458
- "types": "dist/index.d.ts",
459
- "version": "0.0.0",
460
- }
461
- `);
313
+ {
314
+ "author": {
315
+ "email": "wayne@warner.com",
316
+ "name": "Wayne Campbell",
317
+ },
318
+ "dependencies": {
319
+ "@whook/authorization": "<current_version>",
320
+ "@whook/cors": "<current_version>",
321
+ "@whook/http-router": "<current_version>",
322
+ "@whook/http-server": "<current_version>",
323
+ "@whook/http-transaction": "<current_version>",
324
+ "@whook/swagger-ui": "<current_version>",
325
+ "@whook/whook": "<current_version>",
326
+ "application-services": "^3.0.0",
327
+ "common-services": "^14.0.0",
328
+ "http-auth-utils": "^5.0.1",
329
+ "jwt-service": "^10.0.1",
330
+ "knifecycle": "^16.0.1",
331
+ "openapi-schema-validator": "^12.1.3",
332
+ "openapi-types": "^12.1.3",
333
+ "pkg-dir": "^7.0.0",
334
+ "strict-qs": "^8.0.1",
335
+ "type-fest": "^4.2.0",
336
+ "yerror": "^8.0.0",
337
+ "yhttperror": "^8.0.0",
338
+ },
339
+ "description": "A new Whook project",
340
+ "devDependencies": {
341
+ "@swc/cli": "^0.1.62",
342
+ "@swc/core": "^1.3.77",
343
+ "@swc/helpers": "^0.5.1",
344
+ "@swc/jest": "^0.2.29",
345
+ "@typescript-eslint/eslint-plugin": "^6.4.0",
346
+ "@typescript-eslint/parser": "^6.4.0",
347
+ "axios": "^1.4.0",
348
+ "chokidar": "^3.5.1",
349
+ "esbuild-node-externals": "^1.5.0",
350
+ "eslint": "^8.47.0",
351
+ "eslint-config-prettier": "^9.0.0",
352
+ "eslint-plugin-prettier": "^5.0.0",
353
+ "jest": "^29.6.2",
354
+ "jsarch": "^6.0.1",
355
+ "parse-gitignore": "^1.0.1",
356
+ "prettier": "^3.0.2",
357
+ "rimraf": "^5.0.1",
358
+ "schema2dts": "^5.0.1",
359
+ "ts-node": "^10.8.1",
360
+ "typescript": "^5.1.6",
361
+ },
362
+ "engines": {
363
+ "node": ">=18.16.0",
364
+ },
365
+ "eslintConfig": {
366
+ "env": {
367
+ "es6": true,
368
+ "jest": true,
369
+ "mocha": true,
370
+ "node": true,
371
+ },
372
+ "extends": [
373
+ "eslint:recommended",
374
+ "plugin:prettier/recommended",
375
+ "plugin:@typescript-eslint/eslint-recommended",
376
+ "plugin:@typescript-eslint/recommended",
377
+ ],
378
+ "ignorePatterns": [
379
+ "*.d.ts",
380
+ ],
381
+ "parser": "@typescript-eslint/parser",
382
+ "parserOptions": {
383
+ "ecmaVersion": 2018,
384
+ "modules": true,
385
+ "sourceType": "script",
386
+ },
387
+ "plugins": [
388
+ "prettier",
389
+ ],
390
+ "rules": {
391
+ "prettier/prettier": "error",
392
+ },
393
+ },
394
+ "files": [
395
+ "bin",
396
+ "dist",
397
+ "src",
398
+ "LICENSE",
399
+ "README.md",
400
+ "CHANGELOG.md",
401
+ ],
402
+ "jest": {
403
+ "coverageReporters": [
404
+ "lcov",
405
+ "html",
406
+ ],
407
+ "extensionsToTreatAsEsm": [
408
+ ".ts",
409
+ ],
410
+ "moduleNameMapper": {
411
+ "#(.*)": "<rootDir>/../../node_modules/$1",
412
+ "(.+)\\.js": "$1",
413
+ },
414
+ "prettierPath": null,
415
+ "roots": [
416
+ "<rootDir>/src",
417
+ ],
418
+ "testEnvironment": "node",
419
+ "testPathIgnorePatterns": [
420
+ "/node_modules/",
421
+ ],
422
+ "transform": {
423
+ "^.+\\.tsx?$": [
424
+ "@swc/jest",
425
+ {},
426
+ ],
427
+ },
428
+ },
429
+ "keywords": [
430
+ "whook",
431
+ ],
432
+ "license": "SEE LICENSE",
433
+ "main": "dist/index.js",
434
+ "name": "super-project",
435
+ "prettier": {
436
+ "printWidth": 80,
437
+ "proseWrap": "always",
438
+ "semi": true,
439
+ "singleQuote": true,
440
+ "trailingComma": "all",
441
+ },
442
+ "private": true,
443
+ "scripts": {
444
+ "apitypes": "npm run --silent whook -- generateOpenAPISchema --authenticated=true | npm run --silent whook -- generateOpenAPITypes > src/openAPISchema.d.ts",
445
+ "architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md",
446
+ "build": "rimraf 'dist' && tsc --outDir dist",
447
+ "cover": "npm run jest -- --coverage",
448
+ "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",
449
+ "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 ts-node --esm --logError --files bin/dev.js",
450
+ "jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest",
451
+ "lint": "eslint 'src/**/*.ts'",
452
+ "postbuild": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --files -- bin/build.js",
453
+ "prettier": "prettier --write 'src/**/*.ts'",
454
+ "rebuild": "swc ./src -s -d dist -C jsc.target=es2022",
455
+ "start": "PROJECT_SRC="$PWD/dist" NODE_ENV=\${NODE_ENV:-development} node bin/start.js",
456
+ "test": "NODE_ENV=test npm run build && npm run jest",
457
+ "type-check": "tsc --pretty --noEmit",
458
+ "watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 ts-node --esm --logError --files bin/watch.js",
459
+ "whook": "NODE_ENV=\${NODE_ENV:-development} whook",
460
+ "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",
461
+ "whook-dev": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --logError --files -- bin/whook.js",
462
+ "whook-repl": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --logError --files -- bin/repl.js",
463
+ },
464
+ "type": "module",
465
+ "types": "dist/index.d.ts",
466
+ "version": "0.0.0",
467
+ }
468
+ `);
462
469
  expect({
463
470
  copyCalls: copy.mock.calls,
464
471
  writeFileCalls: writeFile.mock.calls,
@@ -501,159 +508,162 @@ Mr Bean
501
508
  expect(JSON.parse(writeFile.mock.calls
502
509
  .find((call) => call[0].toString().endsWith('package.json'))?.[1]
503
510
  ?.toString() || '')).toMatchInlineSnapshot(`
504
- {
505
- "author": {
506
- "email": "wayne@warner.com",
507
- "name": "Wayne Campbell",
508
- },
509
- "dependencies": {
510
- "@whook/authorization": "<current_version>",
511
- "@whook/cors": "<current_version>",
512
- "@whook/http-router": "<current_version>",
513
- "@whook/http-server": "<current_version>",
514
- "@whook/http-transaction": "<current_version>",
515
- "@whook/swagger-ui": "<current_version>",
516
- "@whook/whook": "<current_version>",
517
- "common-services": "^12.1.0",
518
- "http-auth-utils": "^3.0.5",
519
- "jwt-service": "^9.0.4",
520
- "knifecycle": "^14.1.0",
521
- "openapi-schema-validator": "^12.0.2",
522
- "openapi-types": "^12.1.0",
523
- "pkg-dir": "^7.0.0",
524
- "strict-qs": "^7.0.2",
525
- "type-fest": "^3.4.0",
526
- "yerror": "^6.2.1",
527
- "yhttperror": "^6.1.2",
528
- },
529
- "description": "A new Whook project",
530
- "devDependencies": {
531
- "@typescript-eslint/eslint-plugin": "^5.36.0",
532
- "@typescript-eslint/parser": "^5.36.0",
533
- "axios": "^1.2.1",
534
- "chokidar": "^3.5.1",
535
- "esbuild": "^0.15.6",
536
- "esbuild-jest": "^0.5.0",
537
- "esbuild-node-externals": "^1.5.0",
538
- "eslint": "^8.23.0",
539
- "eslint-config-prettier": "^8.5.0",
540
- "eslint-plugin-prettier": "^4.2.1",
541
- "jest": "^29.0.1",
542
- "jsarch": "^6.0.0",
543
- "parse-gitignore": "^1.0.1",
544
- "prettier": "^2.7.1",
545
- "rimraf": "^3.0.2",
546
- "schema2dts": "^4.1.4",
547
- "ts-node": "^10.8.1",
548
- "typescript": "^4.8.2",
549
- },
550
- "engines": {
551
- "node": ">=16.15.0",
552
- },
553
- "eslintConfig": {
554
- "env": {
555
- "es6": true,
556
- "jest": true,
557
- "mocha": true,
558
- "node": true,
559
- },
560
- "extends": [
561
- "eslint:recommended",
562
- "plugin:prettier/recommended",
563
- "plugin:@typescript-eslint/eslint-recommended",
564
- "plugin:@typescript-eslint/recommended",
565
- ],
566
- "ignorePatterns": [
567
- "*.d.ts",
568
- ],
569
- "parser": "@typescript-eslint/parser",
570
- "parserOptions": {
571
- "ecmaVersion": 2018,
572
- "modules": true,
573
- "sourceType": "script",
574
- },
575
- "plugins": [
576
- "prettier",
577
- ],
578
- "rules": {
579
- "prettier/prettier": "error",
580
- },
581
- },
582
- "files": [
583
- "bin",
584
- "dist",
585
- "src",
586
- "LICENSE",
587
- "README.md",
588
- "CHANGELOG.md",
589
- ],
590
- "jest": {
591
- "coverageReporters": [
592
- "lcov",
593
- "html",
594
- ],
595
- "extensionsToTreatAsEsm": [
596
- ".ts",
597
- ],
598
- "moduleNameMapper": {
599
- "#(.*)": "<rootDir>/../../node_modules/$1",
600
- "(.+)\\.js": "$1",
601
- },
602
- "roots": [
603
- "<rootDir>/src",
604
- ],
605
- "testEnvironment": "node",
606
- "testPathIgnorePatterns": [
607
- "/node_modules/",
608
- ],
609
- "transform": {
610
- "^.+\\.tsx?$": [
611
- "esbuild-jest",
612
- {
613
- "format": "esm",
614
- "sourcemap": true,
615
- },
616
- ],
617
- },
618
- },
619
- "keywords": [
620
- "whook",
621
- ],
622
- "license": "SEE LICENSE",
623
- "main": "dist/index.js",
624
- "name": "super-project",
625
- "prettier": {
626
- "printWidth": 80,
627
- "proseWrap": "always",
628
- "semi": true,
629
- "singleQuote": true,
630
- "trailingComma": "all",
631
- },
632
- "private": true,
633
- "scripts": {
634
- "apitypes": "npm run --silent whook -- generateOpenAPISchema --authenticated=true | npm run --silent whook -- generateOpenAPITypes > src/openAPISchema.d.ts",
635
- "architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md",
636
- "build": "rimraf -f 'dist' && tsc --outDir dist",
637
- "cover": "npm run jest -- --coverage",
638
- "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",
639
- "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 ts-node --esm --logError --files bin/dev.js",
640
- "jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest",
641
- "lint": "eslint 'src/**/*.ts'",
642
- "postbuild": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --files -- bin/build.js",
643
- "prettier": "prettier --write 'src/**/*.ts'",
644
- "start": "PROJECT_SRC="$PWD/dist" NODE_ENV=\${NODE_ENV:-development} node bin/start.js",
645
- "test": "NODE_ENV=test npm run build && npm run jest",
646
- "watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 ts-node --esm --logError --files bin/watch.js",
647
- "whook": "NODE_ENV=\${NODE_ENV:-development} whook",
648
- "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",
649
- "whook-dev": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --logError --files -- bin/whook.js",
650
- "whook-repl": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --logError --files -- bin/repl.js",
651
- },
652
- "type": "module",
653
- "types": "dist/index.d.ts",
654
- "version": "0.0.0",
655
- }
656
- `);
511
+ {
512
+ "author": {
513
+ "email": "wayne@warner.com",
514
+ "name": "Wayne Campbell",
515
+ },
516
+ "dependencies": {
517
+ "@whook/authorization": "<current_version>",
518
+ "@whook/cors": "<current_version>",
519
+ "@whook/http-router": "<current_version>",
520
+ "@whook/http-server": "<current_version>",
521
+ "@whook/http-transaction": "<current_version>",
522
+ "@whook/swagger-ui": "<current_version>",
523
+ "@whook/whook": "<current_version>",
524
+ "application-services": "^3.0.0",
525
+ "common-services": "^14.0.0",
526
+ "http-auth-utils": "^5.0.1",
527
+ "jwt-service": "^10.0.1",
528
+ "knifecycle": "^16.0.1",
529
+ "openapi-schema-validator": "^12.1.3",
530
+ "openapi-types": "^12.1.3",
531
+ "pkg-dir": "^7.0.0",
532
+ "strict-qs": "^8.0.1",
533
+ "type-fest": "^4.2.0",
534
+ "yerror": "^8.0.0",
535
+ "yhttperror": "^8.0.0",
536
+ },
537
+ "description": "A new Whook project",
538
+ "devDependencies": {
539
+ "@swc/cli": "^0.1.62",
540
+ "@swc/core": "^1.3.77",
541
+ "@swc/helpers": "^0.5.1",
542
+ "@swc/jest": "^0.2.29",
543
+ "@typescript-eslint/eslint-plugin": "^6.4.0",
544
+ "@typescript-eslint/parser": "^6.4.0",
545
+ "axios": "^1.4.0",
546
+ "chokidar": "^3.5.1",
547
+ "esbuild-node-externals": "^1.5.0",
548
+ "eslint": "^8.47.0",
549
+ "eslint-config-prettier": "^9.0.0",
550
+ "eslint-plugin-prettier": "^5.0.0",
551
+ "jest": "^29.6.2",
552
+ "jsarch": "^6.0.1",
553
+ "parse-gitignore": "^1.0.1",
554
+ "prettier": "^3.0.2",
555
+ "rimraf": "^5.0.1",
556
+ "schema2dts": "^5.0.1",
557
+ "ts-node": "^10.8.1",
558
+ "typescript": "^5.1.6",
559
+ },
560
+ "engines": {
561
+ "node": ">=18.16.0",
562
+ },
563
+ "eslintConfig": {
564
+ "env": {
565
+ "es6": true,
566
+ "jest": true,
567
+ "mocha": true,
568
+ "node": true,
569
+ },
570
+ "extends": [
571
+ "eslint:recommended",
572
+ "plugin:prettier/recommended",
573
+ "plugin:@typescript-eslint/eslint-recommended",
574
+ "plugin:@typescript-eslint/recommended",
575
+ ],
576
+ "ignorePatterns": [
577
+ "*.d.ts",
578
+ ],
579
+ "parser": "@typescript-eslint/parser",
580
+ "parserOptions": {
581
+ "ecmaVersion": 2018,
582
+ "modules": true,
583
+ "sourceType": "script",
584
+ },
585
+ "plugins": [
586
+ "prettier",
587
+ ],
588
+ "rules": {
589
+ "prettier/prettier": "error",
590
+ },
591
+ },
592
+ "files": [
593
+ "bin",
594
+ "dist",
595
+ "src",
596
+ "LICENSE",
597
+ "README.md",
598
+ "CHANGELOG.md",
599
+ ],
600
+ "jest": {
601
+ "coverageReporters": [
602
+ "lcov",
603
+ "html",
604
+ ],
605
+ "extensionsToTreatAsEsm": [
606
+ ".ts",
607
+ ],
608
+ "moduleNameMapper": {
609
+ "#(.*)": "<rootDir>/../../node_modules/$1",
610
+ "(.+)\\.js": "$1",
611
+ },
612
+ "prettierPath": null,
613
+ "roots": [
614
+ "<rootDir>/src",
615
+ ],
616
+ "testEnvironment": "node",
617
+ "testPathIgnorePatterns": [
618
+ "/node_modules/",
619
+ ],
620
+ "transform": {
621
+ "^.+\\.tsx?$": [
622
+ "@swc/jest",
623
+ {},
624
+ ],
625
+ },
626
+ },
627
+ "keywords": [
628
+ "whook",
629
+ ],
630
+ "license": "SEE LICENSE",
631
+ "main": "dist/index.js",
632
+ "name": "super-project",
633
+ "prettier": {
634
+ "printWidth": 80,
635
+ "proseWrap": "always",
636
+ "semi": true,
637
+ "singleQuote": true,
638
+ "trailingComma": "all",
639
+ },
640
+ "private": true,
641
+ "scripts": {
642
+ "apitypes": "npm run --silent whook -- generateOpenAPISchema --authenticated=true | npm run --silent whook -- generateOpenAPITypes > src/openAPISchema.d.ts",
643
+ "architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md",
644
+ "build": "rimraf 'dist' && tsc --outDir dist",
645
+ "cover": "npm run jest -- --coverage",
646
+ "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",
647
+ "dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 ts-node --esm --logError --files bin/dev.js",
648
+ "jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest",
649
+ "lint": "eslint 'src/**/*.ts'",
650
+ "postbuild": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --files -- bin/build.js",
651
+ "prettier": "prettier --write 'src/**/*.ts'",
652
+ "rebuild": "swc ./src -s -d dist -C jsc.target=es2022",
653
+ "start": "PROJECT_SRC="$PWD/dist" NODE_ENV=\${NODE_ENV:-development} node bin/start.js",
654
+ "test": "NODE_ENV=test npm run build && npm run jest",
655
+ "type-check": "tsc --pretty --noEmit",
656
+ "watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 ts-node --esm --logError --files bin/watch.js",
657
+ "whook": "NODE_ENV=\${NODE_ENV:-development} whook",
658
+ "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",
659
+ "whook-dev": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --logError --files -- bin/whook.js",
660
+ "whook-repl": "PROJECT_SRC="$PWD/src" NODE_ENV=\${NODE_ENV:-development} ts-node --esm --logError --files -- bin/repl.js",
661
+ },
662
+ "type": "module",
663
+ "types": "dist/index.d.ts",
664
+ "version": "0.0.0",
665
+ }
666
+ `);
657
667
  expect({
658
668
  copyCalls: copy.mock.calls,
659
669
  writeFileCalls: writeFile.mock.calls,