@whook/create 9.0.1 → 10.0.2

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.
Files changed (42) hide show
  1. package/README.md +2 -2
  2. package/bin/create.js +2 -2
  3. package/dist/index.js +47 -68
  4. package/dist/index.js.map +1 -1
  5. package/dist/services/author.js +46 -72
  6. package/dist/services/author.js.map +1 -1
  7. package/dist/services/author.test.js +86 -92
  8. package/dist/services/author.test.js.map +1 -1
  9. package/dist/services/createWhook.d.ts +8 -11
  10. package/dist/services/createWhook.js +142 -144
  11. package/dist/services/createWhook.js.map +1 -1
  12. package/dist/services/createWhook.test.js +392 -506
  13. package/dist/services/createWhook.test.js.map +1 -1
  14. package/dist/services/project.d.ts +2 -2
  15. package/dist/services/project.js +40 -62
  16. package/dist/services/project.js.map +1 -1
  17. package/dist/services/project.test.js +73 -80
  18. package/dist/services/project.test.js.map +1 -1
  19. package/package.json +50 -96
  20. package/src/index.ts +24 -17
  21. package/src/services/__snapshots__/author.test.ts.snap +3 -3
  22. package/src/services/__snapshots__/createWhook.test.ts.snap +712 -4
  23. package/src/services/author.test.ts +8 -6
  24. package/src/services/author.ts +2 -2
  25. package/src/services/createWhook.test.ts +197 -312
  26. package/src/services/createWhook.ts +38 -13
  27. package/src/services/project.test.ts +11 -6
  28. package/src/services/project.ts +3 -2
  29. package/dist/index.mjs +0 -47
  30. package/dist/index.mjs.map +0 -1
  31. package/dist/services/author.mjs +0 -63
  32. package/dist/services/author.mjs.map +0 -1
  33. package/dist/services/author.test.mjs +0 -94
  34. package/dist/services/author.test.mjs.map +0 -1
  35. package/dist/services/createWhook.mjs +0 -135
  36. package/dist/services/createWhook.mjs.map +0 -1
  37. package/dist/services/createWhook.test.mjs +0 -834
  38. package/dist/services/createWhook.test.mjs.map +0 -1
  39. package/dist/services/project.mjs +0 -50
  40. package/dist/services/project.mjs.map +0 -1
  41. package/dist/services/project.test.mjs +0 -80
  42. package/dist/services/project.test.mjs.map +0 -1
@@ -1,15 +1,17 @@
1
+ import { jest } from '@jest/globals';
1
2
  import _inquirer from 'inquirer';
2
- import initAuthor from './author';
3
- import YError from 'yerror';
3
+ import initAuthor from './author.js';
4
+ import { YError } from 'yerror';
5
+ import type { LogService, LockService } from 'common-services';
4
6
 
5
7
  describe('initAuthor', () => {
6
8
  const exec = jest.fn() as any;
7
9
  const lock = {
8
- take: jest.fn(),
9
- release: jest.fn(),
10
+ take: jest.fn<LockService<unknown>['take']>(),
11
+ release: jest.fn<LockService<unknown>['release']>(),
10
12
  };
11
- const inquirer = { prompt: jest.fn() };
12
- const log = jest.fn();
13
+ const inquirer = { prompt: jest.fn<typeof _inquirer['prompt']>() };
14
+ const log = jest.fn<LogService>();
13
15
 
14
16
  beforeEach(() => {
15
17
  exec.mockReset();
@@ -1,6 +1,6 @@
1
1
  import { autoService } from 'knifecycle';
2
2
  import _inquirer from 'inquirer';
3
- import YError from 'yerror';
3
+ import { YError } from 'yerror';
4
4
  import { exec as _exec } from 'child_process';
5
5
  import type { LockService, LogService } from 'common-services';
6
6
 
@@ -41,7 +41,7 @@ export default autoService(async function initAuthor({
41
41
  },
42
42
  {
43
43
  name: 'authorEmail',
44
- message: 'You email?',
44
+ message: 'Your email?',
45
45
  default: userEmail,
46
46
  },
47
47
  ])) as { authorName: string; authorEmail: string };