@whook/create 8.5.0 → 9.0.1

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.
@@ -187,47 +187,49 @@ Mr Bean
187
187
  "@whook/cli": "<current_version>",
188
188
  "@whook/cors": "<current_version>",
189
189
  "@whook/http-router": "<current_version>",
190
+ "@whook/http-server": "^9.0.0",
190
191
  "@whook/http-transaction": "<current_version>",
191
192
  "@whook/swagger-ui": "<current_version>",
192
193
  "@whook/whook": "<current_version>",
193
- "common-services": "^9.0.1",
194
- "http-auth-utils": "^3.0.1",
195
- "jwt-service": "^7.1.3",
196
- "knifecycle": "^11.1.1",
197
- "strict-qs": "^6.1.4",
198
- "type-fest": "^2.3.3",
199
- "yerror": "^6.0.1",
200
- "yhttperror": "^6.0.1",
194
+ "common-services": "^10.0.2",
195
+ "http-auth-utils": "^3.0.3",
196
+ "jwt-service": "^8.0.1",
197
+ "knifecycle": "^12.0.4",
198
+ "openapi-schema-validator": "^11.0.1",
199
+ "openapi-types": "^11.0.1",
200
+ "strict-qs": "^6.1.5",
201
+ "type-fest": "^2.13.0",
202
+ "yerror": "^6.0.2",
203
+ "yhttperror": "^6.0.3",
201
204
  },
202
205
  "description": "A new Whook project",
203
206
  "devDependencies": Object {
204
- "@babel/cli": "^7.13.14",
205
- "@babel/core": "^7.13.15",
206
- "@babel/eslint-parser": "^7.13.14",
207
+ "@babel/cli": "^7.17.10",
208
+ "@babel/core": "^7.18.2",
209
+ "@babel/eslint-parser": "^7.18.2",
207
210
  "@babel/node": "^7.13.13",
208
- "@babel/plugin-proposal-class-properties": "^7.13.0",
209
- "@babel/plugin-proposal-object-rest-spread": "^7.13.8",
211
+ "@babel/plugin-proposal-class-properties": "^7.17.12",
212
+ "@babel/plugin-proposal-object-rest-spread": "^7.18.0",
210
213
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
211
214
  "@babel/plugin-syntax-import-meta": "^7.10.4",
212
- "@babel/preset-env": "^7.13.15",
213
- "@babel/preset-typescript": "^7.13.0",
214
- "@babel/register": "^7.13.14",
215
- "@types/jest": "^26.0.22",
216
- "@typescript-eslint/eslint-plugin": "^4.21.0",
217
- "@typescript-eslint/parser": "^4.21.0",
218
- "axios": "^0.21.4",
219
- "babel-plugin-knifecycle": "^5.0.1",
215
+ "@babel/preset-env": "^7.18.2",
216
+ "@babel/preset-typescript": "^7.17.12",
217
+ "@babel/register": "^7.17.7",
218
+ "@types/jest": "^27.0.2",
219
+ "@typescript-eslint/eslint-plugin": "^5.26.0",
220
+ "@typescript-eslint/parser": "^5.26.0",
221
+ "axios": "^0.27.2",
222
+ "babel-plugin-knifecycle": "^5.0.3",
220
223
  "chokidar": "^3.5.1",
221
- "eslint": "^7.23.0",
222
- "eslint-plugin-prettier": "^3.3.1",
223
- "jest": "^26.6.3",
224
- "jsarch": "^4.0.1",
225
- "openapi-schema-validator": "^8.0.0",
224
+ "eslint": "^8.16.0",
225
+ "eslint-plugin-prettier": "^4.0.0",
226
+ "jest": "^28.1.0",
227
+ "jsarch": "^5.0.1",
226
228
  "parse-gitignore": "^1.0.1",
227
- "prettier": "^2.2.1",
229
+ "prettier": "^2.6.2",
228
230
  "rimraf": "^3.0.2",
229
- "schema2dts": "^3.0.0",
230
- "typescript": "^4.2.4",
231
+ "schema2dts": "^4.1.1",
232
+ "typescript": "^4.7.2",
231
233
  },
232
234
  "engines": Object {
233
235
  "node": ">=12.19.0",
@@ -446,47 +448,49 @@ Mr Bean
446
448
  "@whook/cli": "<current_version>",
447
449
  "@whook/cors": "<current_version>",
448
450
  "@whook/http-router": "<current_version>",
451
+ "@whook/http-server": "^9.0.0",
449
452
  "@whook/http-transaction": "<current_version>",
450
453
  "@whook/swagger-ui": "<current_version>",
451
454
  "@whook/whook": "<current_version>",
452
- "common-services": "^9.0.1",
453
- "http-auth-utils": "^3.0.1",
454
- "jwt-service": "^7.1.3",
455
- "knifecycle": "^11.1.1",
456
- "strict-qs": "^6.1.4",
457
- "type-fest": "^2.3.3",
458
- "yerror": "^6.0.1",
459
- "yhttperror": "^6.0.1",
455
+ "common-services": "^10.0.2",
456
+ "http-auth-utils": "^3.0.3",
457
+ "jwt-service": "^8.0.1",
458
+ "knifecycle": "^12.0.4",
459
+ "openapi-schema-validator": "^11.0.1",
460
+ "openapi-types": "^11.0.1",
461
+ "strict-qs": "^6.1.5",
462
+ "type-fest": "^2.13.0",
463
+ "yerror": "^6.0.2",
464
+ "yhttperror": "^6.0.3",
460
465
  },
461
466
  "description": "A new Whook project",
462
467
  "devDependencies": Object {
463
- "@babel/cli": "^7.13.14",
464
- "@babel/core": "^7.13.15",
465
- "@babel/eslint-parser": "^7.13.14",
468
+ "@babel/cli": "^7.17.10",
469
+ "@babel/core": "^7.18.2",
470
+ "@babel/eslint-parser": "^7.18.2",
466
471
  "@babel/node": "^7.13.13",
467
- "@babel/plugin-proposal-class-properties": "^7.13.0",
468
- "@babel/plugin-proposal-object-rest-spread": "^7.13.8",
472
+ "@babel/plugin-proposal-class-properties": "^7.17.12",
473
+ "@babel/plugin-proposal-object-rest-spread": "^7.18.0",
469
474
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
470
475
  "@babel/plugin-syntax-import-meta": "^7.10.4",
471
- "@babel/preset-env": "^7.13.15",
472
- "@babel/preset-typescript": "^7.13.0",
473
- "@babel/register": "^7.13.14",
474
- "@types/jest": "^26.0.22",
475
- "@typescript-eslint/eslint-plugin": "^4.21.0",
476
- "@typescript-eslint/parser": "^4.21.0",
477
- "axios": "^0.21.4",
478
- "babel-plugin-knifecycle": "^5.0.1",
476
+ "@babel/preset-env": "^7.18.2",
477
+ "@babel/preset-typescript": "^7.17.12",
478
+ "@babel/register": "^7.17.7",
479
+ "@types/jest": "^27.0.2",
480
+ "@typescript-eslint/eslint-plugin": "^5.26.0",
481
+ "@typescript-eslint/parser": "^5.26.0",
482
+ "axios": "^0.27.2",
483
+ "babel-plugin-knifecycle": "^5.0.3",
479
484
  "chokidar": "^3.5.1",
480
- "eslint": "^7.23.0",
481
- "eslint-plugin-prettier": "^3.3.1",
482
- "jest": "^26.6.3",
483
- "jsarch": "^4.0.1",
484
- "openapi-schema-validator": "^8.0.0",
485
+ "eslint": "^8.16.0",
486
+ "eslint-plugin-prettier": "^4.0.0",
487
+ "jest": "^28.1.0",
488
+ "jsarch": "^5.0.1",
485
489
  "parse-gitignore": "^1.0.1",
486
- "prettier": "^2.2.1",
490
+ "prettier": "^2.6.2",
487
491
  "rimraf": "^3.0.2",
488
- "schema2dts": "^3.0.0",
489
- "typescript": "^4.2.4",
492
+ "schema2dts": "^4.1.1",
493
+ "typescript": "^4.7.2",
490
494
  },
491
495
  "engines": Object {
492
496
  "node": ">=12.19.0",
@@ -690,47 +694,49 @@ Mr Bean
690
694
  "@whook/cli": "<current_version>",
691
695
  "@whook/cors": "<current_version>",
692
696
  "@whook/http-router": "<current_version>",
697
+ "@whook/http-server": "^9.0.0",
693
698
  "@whook/http-transaction": "<current_version>",
694
699
  "@whook/swagger-ui": "<current_version>",
695
700
  "@whook/whook": "<current_version>",
696
- "common-services": "^9.0.1",
697
- "http-auth-utils": "^3.0.1",
698
- "jwt-service": "^7.1.3",
699
- "knifecycle": "^11.1.1",
700
- "strict-qs": "^6.1.4",
701
- "type-fest": "^2.3.3",
702
- "yerror": "^6.0.1",
703
- "yhttperror": "^6.0.1",
701
+ "common-services": "^10.0.2",
702
+ "http-auth-utils": "^3.0.3",
703
+ "jwt-service": "^8.0.1",
704
+ "knifecycle": "^12.0.4",
705
+ "openapi-schema-validator": "^11.0.1",
706
+ "openapi-types": "^11.0.1",
707
+ "strict-qs": "^6.1.5",
708
+ "type-fest": "^2.13.0",
709
+ "yerror": "^6.0.2",
710
+ "yhttperror": "^6.0.3",
704
711
  },
705
712
  "description": "A new Whook project",
706
713
  "devDependencies": Object {
707
- "@babel/cli": "^7.13.14",
708
- "@babel/core": "^7.13.15",
709
- "@babel/eslint-parser": "^7.13.14",
714
+ "@babel/cli": "^7.17.10",
715
+ "@babel/core": "^7.18.2",
716
+ "@babel/eslint-parser": "^7.18.2",
710
717
  "@babel/node": "^7.13.13",
711
- "@babel/plugin-proposal-class-properties": "^7.13.0",
712
- "@babel/plugin-proposal-object-rest-spread": "^7.13.8",
718
+ "@babel/plugin-proposal-class-properties": "^7.17.12",
719
+ "@babel/plugin-proposal-object-rest-spread": "^7.18.0",
713
720
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
714
721
  "@babel/plugin-syntax-import-meta": "^7.10.4",
715
- "@babel/preset-env": "^7.13.15",
716
- "@babel/preset-typescript": "^7.13.0",
717
- "@babel/register": "^7.13.14",
718
- "@types/jest": "^26.0.22",
719
- "@typescript-eslint/eslint-plugin": "^4.21.0",
720
- "@typescript-eslint/parser": "^4.21.0",
721
- "axios": "^0.21.4",
722
- "babel-plugin-knifecycle": "^5.0.1",
722
+ "@babel/preset-env": "^7.18.2",
723
+ "@babel/preset-typescript": "^7.17.12",
724
+ "@babel/register": "^7.17.7",
725
+ "@types/jest": "^27.0.2",
726
+ "@typescript-eslint/eslint-plugin": "^5.26.0",
727
+ "@typescript-eslint/parser": "^5.26.0",
728
+ "axios": "^0.27.2",
729
+ "babel-plugin-knifecycle": "^5.0.3",
723
730
  "chokidar": "^3.5.1",
724
- "eslint": "^7.23.0",
725
- "eslint-plugin-prettier": "^3.3.1",
726
- "jest": "^26.6.3",
727
- "jsarch": "^4.0.1",
728
- "openapi-schema-validator": "^8.0.0",
731
+ "eslint": "^8.16.0",
732
+ "eslint-plugin-prettier": "^4.0.0",
733
+ "jest": "^28.1.0",
734
+ "jsarch": "^5.0.1",
729
735
  "parse-gitignore": "^1.0.1",
730
- "prettier": "^2.2.1",
736
+ "prettier": "^2.6.2",
731
737
  "rimraf": "^3.0.2",
732
- "schema2dts": "^3.0.0",
733
- "typescript": "^4.2.4",
738
+ "schema2dts": "^4.1.1",
739
+ "typescript": "^4.7.2",
734
740
  },
735
741
  "engines": Object {
736
742
  "node": ">=12.19.0",
@@ -874,8 +880,8 @@ Mr Bean
874
880
  throw new YError('E_UNEXPECTED_SUCCESS');
875
881
  } catch (err) {
876
882
  expect({
877
- errorCode: err.code,
878
- errorParams: err.params,
883
+ errorCode: (err as YError).code,
884
+ errorParams: (err as YError).params,
879
885
  }).toMatchInlineSnapshot(`
880
886
  Object {
881
887
  "errorCode": "E_ACCESS",
@@ -45,7 +45,7 @@ export default autoService(async function initCreateWhook({
45
45
  copy: typeof _copy;
46
46
  axios?: typeof _axios;
47
47
  ora?: typeof _ora;
48
- log?: LogService;
48
+ log: LogService;
49
49
  }): Promise<CreateWhookService> {
50
50
  return async function createWhook() {
51
51
  log('warning', "🏁️ - Starting Whook project's creation!");
@@ -158,7 +158,7 @@ ${author.name}
158
158
  'error',
159
159
  `⚠️ - Could not retrieve the \`.gitignore\` file contents from: "${GIT_IGNORE_URL}"`,
160
160
  );
161
- log('stack', err.stack);
161
+ log('error-stack', (err as Error).stack || 'no_stack_trace');
162
162
  }),
163
163
  new Promise((resolve, reject) =>
164
164
  exec(
@@ -168,8 +168,8 @@ ${author.name}
168
168
  },
169
169
  (err, stdout, stderr) => {
170
170
  if (err) {
171
- log('stack', stderr);
172
- reject(YError.wrap(err));
171
+ log('error-stack', stderr);
172
+ reject(YError.wrap(err as Error));
173
173
  return;
174
174
  }
175
175
  resolve(stdout.trim());
@@ -177,7 +177,7 @@ ${author.name}
177
177
  ),
178
178
  ).catch((err) => {
179
179
  log('error', '⚠️ - Could not initialize the git project!');
180
- log('stack', err.stack);
180
+ log('error-stack', (err as Error).stack || 'no_stack_trace');
181
181
  }),
182
182
  ]);
183
183
 
@@ -196,8 +196,8 @@ ${author.name}
196
196
  },
197
197
  (err, stdout, stderr) => {
198
198
  if (err) {
199
- log('stack', stderr);
200
- reject(YError.wrap(err));
199
+ log('error-stack', stderr);
200
+ reject(YError.wrap(err as Error));
201
201
  return;
202
202
  }
203
203
  resolve(stdout.trim());
@@ -213,7 +213,7 @@ ${author.name}
213
213
  symbol: '❌',
214
214
  text: 'Failed to install dependencies',
215
215
  });
216
- log('stack', err.stack);
216
+ log('error-stack', (err as Error).stack || 'no_stack_trace');
217
217
  }
218
218
 
219
219
  log(
@@ -68,8 +68,8 @@ describe('initProject', () => {
68
68
  throw new YError('E_UNEXPECTED_SUCCESS');
69
69
  } catch (err) {
70
70
  expect({
71
- errorCode: err.code,
72
- errorParams: err.params,
71
+ errorCode: (err as YError).code,
72
+ errorParams: (err as YError).params,
73
73
  inquirerPromptCalls: inquirer.prompt.mock.calls,
74
74
  lockTakeCalls: lock.take.mock.calls,
75
75
  lockReleaseCalls: lock.release.mock.calls,
@@ -53,8 +53,8 @@ export default autoService(async function initProject({
53
53
  'error',
54
54
  `Cannot create the project's directory: "${projectDirectory}"`,
55
55
  );
56
- log('stack', err.stack);
57
- throw YError.wrap(err, 'E_PROJECT_DIR', projectDirectory);
56
+ log('error-stack', (err as Error).stack || 'no_stack_trace');
57
+ throw YError.wrap(err as Error, 'E_PROJECT_DIR', projectDirectory);
58
58
  }
59
59
 
60
60
  return {
@@ -63,6 +63,6 @@ export default autoService(async function initProject({
63
63
  };
64
64
  } catch (err) {
65
65
  await lock.release('cli:input');
66
- throw YError.cast(err);
66
+ throw YError.cast(err as Error);
67
67
  }
68
68
  });