@feathersjs/cli 5.0.0-pre.30 → 5.0.0-pre.32

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 (76) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/lib/app/index.js +5 -5
  3. package/lib/app/index.js.map +1 -1
  4. package/lib/app/index.ts +13 -12
  5. package/lib/app/templates/app.tpl.js +7 -8
  6. package/lib/app/templates/app.tpl.js.map +1 -1
  7. package/lib/app/templates/app.tpl.ts +11 -8
  8. package/lib/app/templates/channels.tpl.js +4 -30
  9. package/lib/app/templates/channels.tpl.js.map +1 -1
  10. package/lib/app/templates/channels.tpl.ts +6 -30
  11. package/lib/app/templates/client.test.tpl.d.ts +2 -0
  12. package/lib/app/templates/client.test.tpl.js +27 -0
  13. package/lib/app/templates/client.test.tpl.js.map +1 -0
  14. package/lib/app/templates/client.test.tpl.ts +26 -0
  15. package/lib/app/templates/client.tpl.js +17 -3
  16. package/lib/app/templates/client.tpl.js.map +1 -1
  17. package/lib/app/templates/client.tpl.ts +20 -3
  18. package/lib/app/templates/declarations.tpl.js +3 -0
  19. package/lib/app/templates/declarations.tpl.js.map +1 -1
  20. package/lib/app/templates/declarations.tpl.ts +3 -0
  21. package/lib/app/templates/logger.tpl.js +8 -2
  22. package/lib/app/templates/logger.tpl.js.map +1 -1
  23. package/lib/app/templates/logger.tpl.ts +8 -2
  24. package/lib/app/templates/schemas.tpl.js +4 -5
  25. package/lib/app/templates/schemas.tpl.js.map +1 -1
  26. package/lib/app/templates/schemas.tpl.ts +4 -5
  27. package/lib/authentication/index.d.ts +3 -0
  28. package/lib/authentication/index.js +5 -1
  29. package/lib/authentication/index.js.map +1 -1
  30. package/lib/authentication/index.ts +5 -0
  31. package/lib/authentication/templates/authentication.tpl.js +5 -4
  32. package/lib/authentication/templates/authentication.tpl.js.map +1 -1
  33. package/lib/authentication/templates/authentication.tpl.ts +5 -5
  34. package/lib/authentication/templates/{test.tpl.d.ts → client.test.tpl.d.ts} +0 -0
  35. package/lib/authentication/templates/client.test.tpl.js +61 -0
  36. package/lib/authentication/templates/client.test.tpl.js.map +1 -0
  37. package/lib/authentication/templates/client.test.tpl.ts +73 -0
  38. package/lib/authentication/templates/client.tpl.d.ts +2 -0
  39. package/lib/authentication/templates/client.tpl.js +14 -0
  40. package/lib/authentication/templates/client.tpl.js.map +1 -0
  41. package/lib/authentication/templates/client.tpl.ts +19 -0
  42. package/lib/authentication/templates/declarations.tpl.js +1 -1
  43. package/lib/authentication/templates/declarations.tpl.ts +1 -1
  44. package/lib/authentication/templates/knex.tpl.js +3 -3
  45. package/lib/authentication/templates/knex.tpl.ts +3 -3
  46. package/lib/authentication/templates/schema.json.tpl.js +26 -25
  47. package/lib/authentication/templates/schema.json.tpl.js.map +1 -1
  48. package/lib/authentication/templates/schema.json.tpl.ts +26 -26
  49. package/lib/authentication/templates/schema.typebox.tpl.js +26 -27
  50. package/lib/authentication/templates/schema.typebox.tpl.js.map +1 -1
  51. package/lib/authentication/templates/schema.typebox.tpl.ts +28 -28
  52. package/lib/service/index.d.ts +5 -63
  53. package/lib/service/index.js +74 -75
  54. package/lib/service/index.js.map +1 -1
  55. package/lib/service/index.ts +10 -4
  56. package/lib/service/templates/client.tpl.js +15 -20
  57. package/lib/service/templates/client.tpl.js.map +1 -1
  58. package/lib/service/templates/client.tpl.ts +29 -25
  59. package/lib/service/templates/schema.json.tpl.js +24 -22
  60. package/lib/service/templates/schema.json.tpl.js.map +1 -1
  61. package/lib/service/templates/schema.json.tpl.ts +24 -22
  62. package/lib/service/templates/schema.typebox.tpl.js +22 -25
  63. package/lib/service/templates/schema.typebox.tpl.js.map +1 -1
  64. package/lib/service/templates/schema.typebox.tpl.ts +22 -25
  65. package/lib/service/type/knex.tpl.d.ts +1 -1
  66. package/lib/service/type/knex.tpl.js +10 -8
  67. package/lib/service/type/knex.tpl.js.map +1 -1
  68. package/lib/service/type/knex.tpl.ts +10 -9
  69. package/lib/service/type/mongodb.tpl.d.ts +1 -1
  70. package/lib/service/type/mongodb.tpl.js +7 -5
  71. package/lib/service/type/mongodb.tpl.js.map +1 -1
  72. package/lib/service/type/mongodb.tpl.ts +8 -6
  73. package/package.json +18 -16
  74. package/lib/authentication/templates/test.tpl.js +0 -43
  75. package/lib/authentication/templates/test.tpl.js.map +0 -1
  76. package/lib/authentication/templates/test.tpl.ts +0 -53
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@feathersjs/cli",
3
3
  "description": "The command line interface for creating Feathers applications",
4
- "version": "5.0.0-pre.30",
4
+ "version": "5.0.0-pre.32",
5
5
  "homepage": "https://feathersjs.com",
6
6
  "main": "lib/",
7
7
  "bin": {
@@ -58,20 +58,22 @@
58
58
  "prettier": "^2.7.1"
59
59
  },
60
60
  "devDependencies": {
61
- "@feathersjs/authentication": "^5.0.0-pre.30",
62
- "@feathersjs/authentication-local": "^5.0.0-pre.30",
63
- "@feathersjs/authentication-oauth": "^5.0.0-pre.30",
64
- "@feathersjs/configuration": "^5.0.0-pre.30",
65
- "@feathersjs/errors": "^5.0.0-pre.30",
66
- "@feathersjs/express": "^5.0.0-pre.30",
67
- "@feathersjs/feathers": "^5.0.0-pre.30",
68
- "@feathersjs/knex": "^5.0.0-pre.30",
69
- "@feathersjs/koa": "^5.0.0-pre.30",
70
- "@feathersjs/mongodb": "^5.0.0-pre.30",
71
- "@feathersjs/schema": "^5.0.0-pre.30",
72
- "@feathersjs/socketio": "^5.0.0-pre.30",
73
- "@feathersjs/transport-commons": "^5.0.0-pre.30",
74
- "@feathersjs/typebox": "^5.0.0-pre.30",
61
+ "@feathersjs/authentication": "^5.0.0-pre.32",
62
+ "@feathersjs/authentication-client": "^5.0.0-pre.32",
63
+ "@feathersjs/authentication-local": "^5.0.0-pre.32",
64
+ "@feathersjs/authentication-oauth": "^5.0.0-pre.32",
65
+ "@feathersjs/configuration": "^5.0.0-pre.32",
66
+ "@feathersjs/errors": "^5.0.0-pre.32",
67
+ "@feathersjs/express": "^5.0.0-pre.32",
68
+ "@feathersjs/feathers": "^5.0.0-pre.32",
69
+ "@feathersjs/knex": "^5.0.0-pre.32",
70
+ "@feathersjs/koa": "^5.0.0-pre.32",
71
+ "@feathersjs/mongodb": "^5.0.0-pre.32",
72
+ "@feathersjs/rest-client": "^5.0.0-pre.32",
73
+ "@feathersjs/schema": "^5.0.0-pre.32",
74
+ "@feathersjs/socketio": "^5.0.0-pre.32",
75
+ "@feathersjs/transport-commons": "^5.0.0-pre.32",
76
+ "@feathersjs/typebox": "^5.0.0-pre.32",
75
77
  "@types/mocha": "^10.0.0",
76
78
  "@types/node": "^18.8.2",
77
79
  "@types/prettier": "^2.7.1",
@@ -82,5 +84,5 @@
82
84
  "type-fest": "^3.0.0",
83
85
  "typescript": "^4.8.4"
84
86
  },
85
- "gitHead": "b535c91197f4b997520e0a0e608793eeba791931"
87
+ "gitHead": "b405e205fc6d9fbd42b42c7a3f30ea4bf33d121d"
86
88
  }
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generate = void 0;
4
- const pinion_1 = require("@feathershq/pinion");
5
- const commons_1 = require("../../commons");
6
- const template = ({ authStrategies, path, lib }) => /* ts */ `import assert from 'assert';
7
- import { app } from '../${lib}/app';
8
-
9
- describe('authentication', () => {
10
- ${authStrategies.includes('local')
11
- ? `
12
- const userInfo = {
13
- email: 'someone@example.com',
14
- password: 'supersecret'
15
- }
16
-
17
- before(async () => {
18
- try {
19
- await app.service('${path}').create(userInfo)
20
- } catch (error) {
21
- // Do nothing, it just means the user already exists and can be tested
22
- }
23
- });
24
-
25
- it('authenticates user and creates accessToken', async () => {
26
- const { user, accessToken } = await app.service('authentication').create({
27
- strategy: 'local',
28
- ...userInfo
29
- }, {})
30
-
31
- assert.ok(accessToken, 'Created access token for user')
32
- assert.ok(user, 'Includes user in authentication data')
33
- })`
34
- : ''}
35
-
36
- it('registered the authentication service', () => {
37
- assert.ok(app.service('authentication'))
38
- })
39
- })
40
- `;
41
- const generate = (ctx) => (0, pinion_1.generator)(ctx).then((0, commons_1.renderSource)(template, (0, pinion_1.toFile)(({ test }) => test, 'authentication.test')));
42
- exports.generate = generate;
43
- //# sourceMappingURL=test.tpl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test.tpl.js","sourceRoot":"","sources":["../../../src/authentication/templates/test.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,QAAQ,GAAG,CAAC,EAChB,cAAc,EACd,IAAI,EACJ,GAAG,EAC4B,EAAE,EAAE,CAAC,QAAQ,CAAC;0BACrB,GAAG;;;IAIzB,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC;IAC9B,CAAC,CAAC;;;;;;;;2BAQmB,IAAI;;;;;;;;;;;;;;KAc1B;IACC,CAAC,CAAC,EACN;;;;;;CAMD,CAAA;AAEM,MAAM,QAAQ,GAAG,CAAC,GAAmC,EAAE,EAAE,CAC9D,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC,IAAI,CACjB,IAAA,sBAAY,EACV,QAAQ,EACR,IAAA,eAAM,EAAiC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAClF,CACF,CAAA;AANU,QAAA,QAAQ,YAMlB"}
@@ -1,53 +0,0 @@
1
- import { generator, toFile } from '@feathershq/pinion'
2
- import { renderSource } from '../../commons'
3
- import { AuthenticationGeneratorContext } from '../index'
4
-
5
- const template = ({
6
- authStrategies,
7
- path,
8
- lib
9
- }: AuthenticationGeneratorContext) => /* ts */ `import assert from 'assert';
10
- import { app } from '../${lib}/app';
11
-
12
- describe('authentication', () => {
13
- ${
14
- authStrategies.includes('local')
15
- ? `
16
- const userInfo = {
17
- email: 'someone@example.com',
18
- password: 'supersecret'
19
- }
20
-
21
- before(async () => {
22
- try {
23
- await app.service('${path}').create(userInfo)
24
- } catch (error) {
25
- // Do nothing, it just means the user already exists and can be tested
26
- }
27
- });
28
-
29
- it('authenticates user and creates accessToken', async () => {
30
- const { user, accessToken } = await app.service('authentication').create({
31
- strategy: 'local',
32
- ...userInfo
33
- }, {})
34
-
35
- assert.ok(accessToken, 'Created access token for user')
36
- assert.ok(user, 'Includes user in authentication data')
37
- })`
38
- : ''
39
- }
40
-
41
- it('registered the authentication service', () => {
42
- assert.ok(app.service('authentication'))
43
- })
44
- })
45
- `
46
-
47
- export const generate = (ctx: AuthenticationGeneratorContext) =>
48
- generator(ctx).then(
49
- renderSource(
50
- template,
51
- toFile<AuthenticationGeneratorContext>(({ test }) => test, 'authentication.test')
52
- )
53
- )