@whook/create 20.1.1 → 21.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.
- package/dist/services/author.test.js +1 -1
- package/dist/services/author.test.js.map +1 -1
- package/dist/services/createWhook.js +1 -1
- package/dist/services/createWhook.js.map +1 -1
- package/dist/services/createWhook.test.js +404 -377
- package/dist/services/createWhook.test.js.map +1 -1
- package/dist/services/project.js +1 -1
- package/dist/services/project.js.map +1 -1
- package/dist/services/project.test.js +1 -1
- package/dist/services/project.test.js.map +1 -1
- package/package.json +38 -29
- package/src/services/__snapshots__/author.test.ts.snap +1 -1
- package/src/services/__snapshots__/createWhook.test.ts.snap +172 -136
- package/src/services/__snapshots__/project.test.ts.snap +1 -1
- package/src/services/author.test.ts +25 -7
- package/src/services/createWhook.test.ts +496 -421
- package/src/services/createWhook.ts +4 -2
- package/src/services/project.test.ts +1 -1
- package/src/services/project.ts +1 -1
|
@@ -121,130 +121,139 @@ describe('initCreateWhook', () => {
|
|
|
121
121
|
expect(JSON.parse(outputFile.mock.calls
|
|
122
122
|
.find((call) => call[0].toString().endsWith('package.json'))?.[1]
|
|
123
123
|
?.toString() || '')).toMatchInlineSnapshot(`
|
|
124
|
-
{
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
|
|
124
|
+
{
|
|
125
|
+
"author": {
|
|
126
|
+
"email": "wayne@warner.com",
|
|
127
|
+
"name": "Wayne Campbell",
|
|
128
|
+
},
|
|
129
|
+
"dependencies": {
|
|
130
|
+
"@whook/authorization": "<current_version>",
|
|
131
|
+
"@whook/cors": "<current_version>",
|
|
132
|
+
"@whook/http-router": "<current_version>",
|
|
133
|
+
"@whook/http-server": "<current_version>",
|
|
134
|
+
"@whook/http-transaction": "<current_version>",
|
|
135
|
+
"@whook/swagger-ui": "<current_version>",
|
|
136
|
+
"@whook/whook": "<current_version>",
|
|
137
|
+
"application-services": "^8.0.1",
|
|
138
|
+
"common-services": "^18.0.1",
|
|
139
|
+
"http-auth-utils": "^7.0.0",
|
|
140
|
+
"jwt-service": "^12.0.0",
|
|
141
|
+
"knifecycle": "^20.0.0",
|
|
142
|
+
"strict-qs": "^9.0.0",
|
|
143
|
+
"type-fest": "^5.5.0",
|
|
144
|
+
"ya-json-schema-types": "^2.0.0",
|
|
145
|
+
"ya-open-api-types": "^2.1.0",
|
|
146
|
+
"yerror": "^9.1.1",
|
|
147
|
+
"yhttperror": "^9.0.1",
|
|
148
|
+
},
|
|
149
|
+
"description": "A new Whook project",
|
|
150
|
+
"devDependencies": {
|
|
151
|
+
"@eslint/js": "^10.0.1",
|
|
152
|
+
"@swc/cli": "^0.8.0",
|
|
153
|
+
"@swc/core": "^1.15.21",
|
|
154
|
+
"@swc/jest": "^0.2.39",
|
|
155
|
+
"axios": "^1.13.6",
|
|
156
|
+
"esbuild-node-externals": "^1.20.1",
|
|
157
|
+
"eslint": "^10.1.0",
|
|
158
|
+
"eslint-config-prettier": "^10.1.8",
|
|
159
|
+
"eslint-plugin-jest": "^29.15.1",
|
|
160
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
161
|
+
"jest": "^30.3.0",
|
|
162
|
+
"jsarch": "^7.0.0",
|
|
163
|
+
"prettier": "^3.8.1",
|
|
164
|
+
"rimraf": "^6.1.3",
|
|
165
|
+
"schema2dts": "^9.0.0",
|
|
166
|
+
"streamtest": "^4.0.0",
|
|
167
|
+
"tsx": "^4.21.0",
|
|
168
|
+
"typescript": "^6.0.2",
|
|
169
|
+
"typescript-eslint": "^8.57.2",
|
|
170
|
+
},
|
|
171
|
+
"engines": {
|
|
172
|
+
"node": ">=24.14.0",
|
|
173
|
+
},
|
|
174
|
+
"files": [
|
|
175
|
+
"bin",
|
|
176
|
+
"dist",
|
|
177
|
+
"src",
|
|
178
|
+
"LICENSE",
|
|
179
|
+
"README.md",
|
|
180
|
+
"CHANGELOG.md",
|
|
181
|
+
],
|
|
182
|
+
"jest": {
|
|
183
|
+
"coverageReporters": [
|
|
184
|
+
"lcov",
|
|
185
|
+
"html",
|
|
186
|
+
],
|
|
187
|
+
"extensionsToTreatAsEsm": [
|
|
188
|
+
".ts",
|
|
189
|
+
],
|
|
190
|
+
"moduleNameMapper": {
|
|
191
|
+
"#(.*)": "<rootDir>/../../node_modules/$1",
|
|
192
|
+
"(.+)\\.js": "$1",
|
|
193
|
+
},
|
|
194
|
+
"roots": [
|
|
195
|
+
"<rootDir>/src",
|
|
196
|
+
],
|
|
197
|
+
"testEnvironment": "node",
|
|
198
|
+
"testPathIgnorePatterns": [
|
|
199
|
+
"/node_modules/",
|
|
200
|
+
],
|
|
201
|
+
"transform": {
|
|
202
|
+
"^.+\\.tsx?$": [
|
|
203
|
+
"@swc/jest",
|
|
204
|
+
{},
|
|
205
|
+
],
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
"keywords": [
|
|
209
|
+
"whook",
|
|
210
|
+
],
|
|
211
|
+
"license": "SEE LICENSE",
|
|
212
|
+
"main": "dist/index.js",
|
|
213
|
+
"name": "super-project",
|
|
214
|
+
"overrides": {
|
|
215
|
+
"@typescript-eslint/eslint-plugin": {
|
|
216
|
+
"typescript": "^6",
|
|
217
|
+
},
|
|
218
|
+
"@typescript-eslint/parser": {
|
|
219
|
+
"typescript": "^6",
|
|
220
|
+
},
|
|
221
|
+
"typescript-eslint": {
|
|
222
|
+
"typescript": "^6",
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
"prettier": {
|
|
226
|
+
"printWidth": 80,
|
|
227
|
+
"proseWrap": "always",
|
|
228
|
+
"semi": true,
|
|
229
|
+
"singleQuote": true,
|
|
230
|
+
"trailingComma": "all",
|
|
231
|
+
},
|
|
232
|
+
"private": true,
|
|
233
|
+
"scripts": {
|
|
234
|
+
"apitypes": "npm run --silent whook -- generateOpenAPISchema --authenticated=true | npm run --silent whook -- generateOpenAPITypes > src/openAPISchema.d.ts",
|
|
235
|
+
"architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md",
|
|
236
|
+
"build": "rimraf 'dist' && tsc --outDir dist",
|
|
237
|
+
"cover": "node --run jest -- --coverage",
|
|
238
|
+
"debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/whook.js",
|
|
239
|
+
"dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx src/run.js",
|
|
240
|
+
"format": "node --run prettier",
|
|
241
|
+
"jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest",
|
|
242
|
+
"lint": "eslint 'src/**/*.ts'",
|
|
243
|
+
"postbuild": "NODE_ENV=\${NODE_ENV:-development} tsx src/runBuild.js",
|
|
244
|
+
"prettier": "prettier --write 'src/**/*.ts'",
|
|
245
|
+
"rebuild": "swc ./src -s -d dist -C jsc.target=es2022",
|
|
246
|
+
"repl": "NODE_ENV=\${NODE_ENV:-development} tsx src/run.js -- __inject repl",
|
|
247
|
+
"start": "NODE_ENV=\${NODE_ENV:-development} node dist/run.js",
|
|
248
|
+
"test": "NODE_ENV=test npm run build && node --run jest && node --run jest",
|
|
249
|
+
"watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx src/runWatch.js",
|
|
250
|
+
"whook": "NODE_ENV=\${NODE_ENV:-development} whook",
|
|
251
|
+
},
|
|
252
|
+
"type": "module",
|
|
253
|
+
"types": "dist/index.d.ts",
|
|
254
|
+
"version": "0.0.0",
|
|
255
|
+
}
|
|
256
|
+
`);
|
|
248
257
|
expect({
|
|
249
258
|
copyCalls: copy.mock.calls,
|
|
250
259
|
outputFileCalls: outputFile.mock.calls,
|
|
@@ -292,130 +301,139 @@ describe('initCreateWhook', () => {
|
|
|
292
301
|
expect(JSON.parse(outputFile.mock.calls
|
|
293
302
|
.find((call) => call[0].toString().endsWith('package.json'))?.[1]
|
|
294
303
|
?.toString() || '')).toMatchInlineSnapshot(`
|
|
295
|
-
{
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
}
|
|
418
|
-
|
|
304
|
+
{
|
|
305
|
+
"author": {
|
|
306
|
+
"email": "wayne@warner.com",
|
|
307
|
+
"name": "Wayne Campbell",
|
|
308
|
+
},
|
|
309
|
+
"dependencies": {
|
|
310
|
+
"@whook/authorization": "<current_version>",
|
|
311
|
+
"@whook/cors": "<current_version>",
|
|
312
|
+
"@whook/http-router": "<current_version>",
|
|
313
|
+
"@whook/http-server": "<current_version>",
|
|
314
|
+
"@whook/http-transaction": "<current_version>",
|
|
315
|
+
"@whook/swagger-ui": "<current_version>",
|
|
316
|
+
"@whook/whook": "<current_version>",
|
|
317
|
+
"application-services": "^8.0.1",
|
|
318
|
+
"common-services": "^18.0.1",
|
|
319
|
+
"http-auth-utils": "^7.0.0",
|
|
320
|
+
"jwt-service": "^12.0.0",
|
|
321
|
+
"knifecycle": "^20.0.0",
|
|
322
|
+
"strict-qs": "^9.0.0",
|
|
323
|
+
"type-fest": "^5.5.0",
|
|
324
|
+
"ya-json-schema-types": "^2.0.0",
|
|
325
|
+
"ya-open-api-types": "^2.1.0",
|
|
326
|
+
"yerror": "^9.1.1",
|
|
327
|
+
"yhttperror": "^9.0.1",
|
|
328
|
+
},
|
|
329
|
+
"description": "A new Whook project",
|
|
330
|
+
"devDependencies": {
|
|
331
|
+
"@eslint/js": "^10.0.1",
|
|
332
|
+
"@swc/cli": "^0.8.0",
|
|
333
|
+
"@swc/core": "^1.15.21",
|
|
334
|
+
"@swc/jest": "^0.2.39",
|
|
335
|
+
"axios": "^1.13.6",
|
|
336
|
+
"esbuild-node-externals": "^1.20.1",
|
|
337
|
+
"eslint": "^10.1.0",
|
|
338
|
+
"eslint-config-prettier": "^10.1.8",
|
|
339
|
+
"eslint-plugin-jest": "^29.15.1",
|
|
340
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
341
|
+
"jest": "^30.3.0",
|
|
342
|
+
"jsarch": "^7.0.0",
|
|
343
|
+
"prettier": "^3.8.1",
|
|
344
|
+
"rimraf": "^6.1.3",
|
|
345
|
+
"schema2dts": "^9.0.0",
|
|
346
|
+
"streamtest": "^4.0.0",
|
|
347
|
+
"tsx": "^4.21.0",
|
|
348
|
+
"typescript": "^6.0.2",
|
|
349
|
+
"typescript-eslint": "^8.57.2",
|
|
350
|
+
},
|
|
351
|
+
"engines": {
|
|
352
|
+
"node": ">=24.14.0",
|
|
353
|
+
},
|
|
354
|
+
"files": [
|
|
355
|
+
"bin",
|
|
356
|
+
"dist",
|
|
357
|
+
"src",
|
|
358
|
+
"LICENSE",
|
|
359
|
+
"README.md",
|
|
360
|
+
"CHANGELOG.md",
|
|
361
|
+
],
|
|
362
|
+
"jest": {
|
|
363
|
+
"coverageReporters": [
|
|
364
|
+
"lcov",
|
|
365
|
+
"html",
|
|
366
|
+
],
|
|
367
|
+
"extensionsToTreatAsEsm": [
|
|
368
|
+
".ts",
|
|
369
|
+
],
|
|
370
|
+
"moduleNameMapper": {
|
|
371
|
+
"#(.*)": "<rootDir>/../../node_modules/$1",
|
|
372
|
+
"(.+)\\.js": "$1",
|
|
373
|
+
},
|
|
374
|
+
"roots": [
|
|
375
|
+
"<rootDir>/src",
|
|
376
|
+
],
|
|
377
|
+
"testEnvironment": "node",
|
|
378
|
+
"testPathIgnorePatterns": [
|
|
379
|
+
"/node_modules/",
|
|
380
|
+
],
|
|
381
|
+
"transform": {
|
|
382
|
+
"^.+\\.tsx?$": [
|
|
383
|
+
"@swc/jest",
|
|
384
|
+
{},
|
|
385
|
+
],
|
|
386
|
+
},
|
|
387
|
+
},
|
|
388
|
+
"keywords": [
|
|
389
|
+
"whook",
|
|
390
|
+
],
|
|
391
|
+
"license": "SEE LICENSE",
|
|
392
|
+
"main": "dist/index.js",
|
|
393
|
+
"name": "super-project",
|
|
394
|
+
"overrides": {
|
|
395
|
+
"@typescript-eslint/eslint-plugin": {
|
|
396
|
+
"typescript": "^6",
|
|
397
|
+
},
|
|
398
|
+
"@typescript-eslint/parser": {
|
|
399
|
+
"typescript": "^6",
|
|
400
|
+
},
|
|
401
|
+
"typescript-eslint": {
|
|
402
|
+
"typescript": "^6",
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
"prettier": {
|
|
406
|
+
"printWidth": 80,
|
|
407
|
+
"proseWrap": "always",
|
|
408
|
+
"semi": true,
|
|
409
|
+
"singleQuote": true,
|
|
410
|
+
"trailingComma": "all",
|
|
411
|
+
},
|
|
412
|
+
"private": true,
|
|
413
|
+
"scripts": {
|
|
414
|
+
"apitypes": "npm run --silent whook -- generateOpenAPISchema --authenticated=true | npm run --silent whook -- generateOpenAPITypes > src/openAPISchema.d.ts",
|
|
415
|
+
"architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md",
|
|
416
|
+
"build": "rimraf 'dist' && tsc --outDir dist",
|
|
417
|
+
"cover": "node --run jest -- --coverage",
|
|
418
|
+
"debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/whook.js",
|
|
419
|
+
"dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx src/run.js",
|
|
420
|
+
"format": "node --run prettier",
|
|
421
|
+
"jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest",
|
|
422
|
+
"lint": "eslint 'src/**/*.ts'",
|
|
423
|
+
"postbuild": "NODE_ENV=\${NODE_ENV:-development} tsx src/runBuild.js",
|
|
424
|
+
"prettier": "prettier --write 'src/**/*.ts'",
|
|
425
|
+
"rebuild": "swc ./src -s -d dist -C jsc.target=es2022",
|
|
426
|
+
"repl": "NODE_ENV=\${NODE_ENV:-development} tsx src/run.js -- __inject repl",
|
|
427
|
+
"start": "NODE_ENV=\${NODE_ENV:-development} node dist/run.js",
|
|
428
|
+
"test": "NODE_ENV=test npm run build && node --run jest && node --run jest",
|
|
429
|
+
"watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx src/runWatch.js",
|
|
430
|
+
"whook": "NODE_ENV=\${NODE_ENV:-development} whook",
|
|
431
|
+
},
|
|
432
|
+
"type": "module",
|
|
433
|
+
"types": "dist/index.d.ts",
|
|
434
|
+
"version": "0.0.0",
|
|
435
|
+
}
|
|
436
|
+
`);
|
|
419
437
|
expect({
|
|
420
438
|
copyCalls: copy.mock.calls,
|
|
421
439
|
outputFileCalls: outputFile.mock.calls,
|
|
@@ -457,130 +475,139 @@ describe('initCreateWhook', () => {
|
|
|
457
475
|
expect(JSON.parse(outputFile.mock.calls
|
|
458
476
|
.find((call) => call[0].toString().endsWith('package.json'))?.[1]
|
|
459
477
|
?.toString() || '')).toMatchInlineSnapshot(`
|
|
460
|
-
{
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
}
|
|
583
|
-
|
|
478
|
+
{
|
|
479
|
+
"author": {
|
|
480
|
+
"email": "wayne@warner.com",
|
|
481
|
+
"name": "Wayne Campbell",
|
|
482
|
+
},
|
|
483
|
+
"dependencies": {
|
|
484
|
+
"@whook/authorization": "<current_version>",
|
|
485
|
+
"@whook/cors": "<current_version>",
|
|
486
|
+
"@whook/http-router": "<current_version>",
|
|
487
|
+
"@whook/http-server": "<current_version>",
|
|
488
|
+
"@whook/http-transaction": "<current_version>",
|
|
489
|
+
"@whook/swagger-ui": "<current_version>",
|
|
490
|
+
"@whook/whook": "<current_version>",
|
|
491
|
+
"application-services": "^8.0.1",
|
|
492
|
+
"common-services": "^18.0.1",
|
|
493
|
+
"http-auth-utils": "^7.0.0",
|
|
494
|
+
"jwt-service": "^12.0.0",
|
|
495
|
+
"knifecycle": "^20.0.0",
|
|
496
|
+
"strict-qs": "^9.0.0",
|
|
497
|
+
"type-fest": "^5.5.0",
|
|
498
|
+
"ya-json-schema-types": "^2.0.0",
|
|
499
|
+
"ya-open-api-types": "^2.1.0",
|
|
500
|
+
"yerror": "^9.1.1",
|
|
501
|
+
"yhttperror": "^9.0.1",
|
|
502
|
+
},
|
|
503
|
+
"description": "A new Whook project",
|
|
504
|
+
"devDependencies": {
|
|
505
|
+
"@eslint/js": "^10.0.1",
|
|
506
|
+
"@swc/cli": "^0.8.0",
|
|
507
|
+
"@swc/core": "^1.15.21",
|
|
508
|
+
"@swc/jest": "^0.2.39",
|
|
509
|
+
"axios": "^1.13.6",
|
|
510
|
+
"esbuild-node-externals": "^1.20.1",
|
|
511
|
+
"eslint": "^10.1.0",
|
|
512
|
+
"eslint-config-prettier": "^10.1.8",
|
|
513
|
+
"eslint-plugin-jest": "^29.15.1",
|
|
514
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
515
|
+
"jest": "^30.3.0",
|
|
516
|
+
"jsarch": "^7.0.0",
|
|
517
|
+
"prettier": "^3.8.1",
|
|
518
|
+
"rimraf": "^6.1.3",
|
|
519
|
+
"schema2dts": "^9.0.0",
|
|
520
|
+
"streamtest": "^4.0.0",
|
|
521
|
+
"tsx": "^4.21.0",
|
|
522
|
+
"typescript": "^6.0.2",
|
|
523
|
+
"typescript-eslint": "^8.57.2",
|
|
524
|
+
},
|
|
525
|
+
"engines": {
|
|
526
|
+
"node": ">=24.14.0",
|
|
527
|
+
},
|
|
528
|
+
"files": [
|
|
529
|
+
"bin",
|
|
530
|
+
"dist",
|
|
531
|
+
"src",
|
|
532
|
+
"LICENSE",
|
|
533
|
+
"README.md",
|
|
534
|
+
"CHANGELOG.md",
|
|
535
|
+
],
|
|
536
|
+
"jest": {
|
|
537
|
+
"coverageReporters": [
|
|
538
|
+
"lcov",
|
|
539
|
+
"html",
|
|
540
|
+
],
|
|
541
|
+
"extensionsToTreatAsEsm": [
|
|
542
|
+
".ts",
|
|
543
|
+
],
|
|
544
|
+
"moduleNameMapper": {
|
|
545
|
+
"#(.*)": "<rootDir>/../../node_modules/$1",
|
|
546
|
+
"(.+)\\.js": "$1",
|
|
547
|
+
},
|
|
548
|
+
"roots": [
|
|
549
|
+
"<rootDir>/src",
|
|
550
|
+
],
|
|
551
|
+
"testEnvironment": "node",
|
|
552
|
+
"testPathIgnorePatterns": [
|
|
553
|
+
"/node_modules/",
|
|
554
|
+
],
|
|
555
|
+
"transform": {
|
|
556
|
+
"^.+\\.tsx?$": [
|
|
557
|
+
"@swc/jest",
|
|
558
|
+
{},
|
|
559
|
+
],
|
|
560
|
+
},
|
|
561
|
+
},
|
|
562
|
+
"keywords": [
|
|
563
|
+
"whook",
|
|
564
|
+
],
|
|
565
|
+
"license": "SEE LICENSE",
|
|
566
|
+
"main": "dist/index.js",
|
|
567
|
+
"name": "super-project",
|
|
568
|
+
"overrides": {
|
|
569
|
+
"@typescript-eslint/eslint-plugin": {
|
|
570
|
+
"typescript": "^6",
|
|
571
|
+
},
|
|
572
|
+
"@typescript-eslint/parser": {
|
|
573
|
+
"typescript": "^6",
|
|
574
|
+
},
|
|
575
|
+
"typescript-eslint": {
|
|
576
|
+
"typescript": "^6",
|
|
577
|
+
},
|
|
578
|
+
},
|
|
579
|
+
"prettier": {
|
|
580
|
+
"printWidth": 80,
|
|
581
|
+
"proseWrap": "always",
|
|
582
|
+
"semi": true,
|
|
583
|
+
"singleQuote": true,
|
|
584
|
+
"trailingComma": "all",
|
|
585
|
+
},
|
|
586
|
+
"private": true,
|
|
587
|
+
"scripts": {
|
|
588
|
+
"apitypes": "npm run --silent whook -- generateOpenAPISchema --authenticated=true | npm run --silent whook -- generateOpenAPITypes > src/openAPISchema.d.ts",
|
|
589
|
+
"architecture": "jsarch 'src/**/*.ts' > ARCHITECTURE.md && git add ARCHITECTURE.md",
|
|
590
|
+
"build": "rimraf 'dist' && tsc --outDir dist",
|
|
591
|
+
"cover": "node --run jest -- --coverage",
|
|
592
|
+
"debug": "NODE_OPTIONS=\${NODE_OPTIONS:-'--inspect'} NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 DEBUG=\${DEBUG:-whook} tsx bin/whook.js",
|
|
593
|
+
"dev": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx src/run.js",
|
|
594
|
+
"format": "node --run prettier",
|
|
595
|
+
"jest": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest",
|
|
596
|
+
"lint": "eslint 'src/**/*.ts'",
|
|
597
|
+
"postbuild": "NODE_ENV=\${NODE_ENV:-development} tsx src/runBuild.js",
|
|
598
|
+
"prettier": "prettier --write 'src/**/*.ts'",
|
|
599
|
+
"rebuild": "swc ./src -s -d dist -C jsc.target=es2022",
|
|
600
|
+
"repl": "NODE_ENV=\${NODE_ENV:-development} tsx src/run.js -- __inject repl",
|
|
601
|
+
"start": "NODE_ENV=\${NODE_ENV:-development} node dist/run.js",
|
|
602
|
+
"test": "NODE_ENV=test npm run build && node --run jest && node --run jest",
|
|
603
|
+
"watch": "NODE_ENV=\${NODE_ENV:-development} DEV_MODE=1 DESTROY_SOCKETS=1 tsx src/runWatch.js",
|
|
604
|
+
"whook": "NODE_ENV=\${NODE_ENV:-development} whook",
|
|
605
|
+
},
|
|
606
|
+
"type": "module",
|
|
607
|
+
"types": "dist/index.d.ts",
|
|
608
|
+
"version": "0.0.0",
|
|
609
|
+
}
|
|
610
|
+
`);
|
|
584
611
|
expect({
|
|
585
612
|
copyCalls: copy.mock.calls,
|
|
586
613
|
outputFileCalls: outputFile.mock.calls,
|
|
@@ -625,12 +652,12 @@ describe('initCreateWhook', () => {
|
|
|
625
652
|
catch (err) {
|
|
626
653
|
expect({
|
|
627
654
|
errorCode: err.code,
|
|
628
|
-
|
|
655
|
+
errorDebugValues: err.debugValues,
|
|
629
656
|
}).toMatchInlineSnapshot(`
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
657
|
+
{
|
|
658
|
+
"errorCode": "E_ACCESS",
|
|
659
|
+
"errorDebugValues": [],
|
|
660
|
+
}
|
|
634
661
|
`);
|
|
635
662
|
expect({
|
|
636
663
|
copyCalls: copy.mock.calls,
|