@feathersjs/cli 5.0.0-pre.33 → 5.0.0-pre.34
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/CHANGELOG.md +14 -0
- package/lib/app/index.d.ts +2 -2
- package/lib/app/index.js +1 -1
- package/lib/app/index.js.map +1 -1
- package/lib/app/index.ts +1 -0
- package/lib/app/templates/app.test.tpl.js +2 -1
- package/lib/app/templates/app.test.tpl.js.map +1 -1
- package/lib/app/templates/app.test.tpl.ts +4 -1
- package/lib/app/templates/app.tpl.js +12 -10
- package/lib/app/templates/app.tpl.js.map +1 -1
- package/lib/app/templates/app.tpl.ts +12 -10
- package/lib/app/templates/channels.tpl.js +2 -1
- package/lib/app/templates/channels.tpl.js.map +1 -1
- package/lib/app/templates/channels.tpl.ts +2 -1
- package/lib/app/templates/client.tpl.js +2 -1
- package/lib/app/templates/client.tpl.js.map +1 -1
- package/lib/app/templates/client.tpl.ts +2 -1
- package/lib/app/templates/{config.tpl.d.ts → configuration.tpl.d.ts} +0 -0
- package/lib/app/templates/{schemas.tpl.js → configuration.tpl.js} +25 -29
- package/lib/app/templates/configuration.tpl.js.map +1 -0
- package/lib/app/templates/{schemas.tpl.ts → configuration.tpl.ts} +25 -32
- package/lib/app/templates/declarations.tpl.js +3 -2
- package/lib/app/templates/declarations.tpl.js.map +1 -1
- package/lib/app/templates/declarations.tpl.ts +3 -2
- package/lib/app/templates/logger.tpl.d.ts +1 -0
- package/lib/app/templates/logger.tpl.js +11 -5
- package/lib/app/templates/logger.tpl.js.map +1 -1
- package/lib/app/templates/logger.tpl.ts +20 -8
- package/lib/app/templates/package.json.tpl.js +5 -2
- package/lib/app/templates/package.json.tpl.js.map +1 -1
- package/lib/app/templates/package.json.tpl.ts +5 -2
- package/lib/app/templates/services.tpl.js +2 -1
- package/lib/app/templates/services.tpl.js.map +1 -1
- package/lib/app/templates/services.tpl.ts +3 -1
- package/lib/app/templates/{schemas.tpl.d.ts → validators.tpl.d.ts} +0 -0
- package/lib/app/templates/validators.tpl.js +36 -0
- package/lib/app/templates/validators.tpl.js.map +1 -0
- package/lib/app/templates/validators.tpl.ts +40 -0
- package/lib/authentication/index.d.ts +1 -1
- package/lib/authentication/templates/authentication.tpl.js +2 -1
- package/lib/authentication/templates/authentication.tpl.js.map +1 -1
- package/lib/authentication/templates/authentication.tpl.ts +2 -1
- package/lib/authentication/templates/client.test.tpl.js +2 -1
- package/lib/authentication/templates/client.test.tpl.js.map +1 -1
- package/lib/authentication/templates/client.test.tpl.ts +2 -1
- package/lib/authentication/templates/knex.tpl.js +2 -2
- package/lib/authentication/templates/knex.tpl.js.map +1 -1
- package/lib/authentication/templates/knex.tpl.ts +2 -2
- package/lib/authentication/templates/schema.json.tpl.js +30 -20
- package/lib/authentication/templates/schema.json.tpl.js.map +1 -1
- package/lib/authentication/templates/schema.json.tpl.ts +37 -21
- package/lib/authentication/templates/schema.typebox.tpl.d.ts +1 -1
- package/lib/authentication/templates/schema.typebox.tpl.js +30 -22
- package/lib/authentication/templates/schema.typebox.tpl.js.map +1 -1
- package/lib/authentication/templates/schema.typebox.tpl.ts +37 -23
- package/lib/commons.d.ts +11 -4
- package/lib/commons.js +9 -1
- package/lib/commons.js.map +1 -1
- package/lib/commons.ts +8 -0
- package/lib/connection/index.d.ts +1 -1
- package/lib/connection/index.js +1 -1
- package/lib/connection/index.ts +1 -1
- package/lib/connection/templates/knex.tpl.js +4 -2
- package/lib/connection/templates/knex.tpl.js.map +1 -1
- package/lib/connection/templates/knex.tpl.ts +6 -2
- package/lib/connection/templates/mongodb.tpl.js +2 -1
- package/lib/connection/templates/mongodb.tpl.js.map +1 -1
- package/lib/connection/templates/mongodb.tpl.ts +3 -1
- package/lib/hook/templates/hook.tpl.js +4 -2
- package/lib/hook/templates/hook.tpl.js.map +1 -1
- package/lib/hook/templates/hook.tpl.ts +4 -2
- package/lib/service/index.d.ts +1 -1
- package/lib/service/templates/schema.json.tpl.js +23 -15
- package/lib/service/templates/schema.json.tpl.js.map +1 -1
- package/lib/service/templates/schema.json.tpl.ts +28 -17
- package/lib/service/templates/schema.typebox.tpl.js +21 -15
- package/lib/service/templates/schema.typebox.tpl.js.map +1 -1
- package/lib/service/templates/schema.typebox.tpl.ts +26 -17
- package/lib/service/templates/service.tpl.js +33 -19
- package/lib/service/templates/service.tpl.js.map +1 -1
- package/lib/service/templates/service.tpl.ts +38 -20
- package/lib/service/templates/test.tpl.js +2 -1
- package/lib/service/templates/test.tpl.js.map +1 -1
- package/lib/service/templates/test.tpl.ts +6 -1
- package/lib/service/type/custom.tpl.js +8 -4
- package/lib/service/type/custom.tpl.js.map +1 -1
- package/lib/service/type/custom.tpl.ts +14 -4
- package/lib/service/type/knex.tpl.js +7 -3
- package/lib/service/type/knex.tpl.js.map +1 -1
- package/lib/service/type/knex.tpl.ts +7 -3
- package/lib/service/type/mongodb.tpl.js +5 -2
- package/lib/service/type/mongodb.tpl.js.map +1 -1
- package/lib/service/type/mongodb.tpl.ts +5 -2
- package/package.json +26 -24
- package/lib/app/templates/config.tpl.js +0 -30
- package/lib/app/templates/config.tpl.js.map +0 -1
- package/lib/app/templates/config.tpl.ts +0 -31
- package/lib/app/templates/schemas.tpl.js.map +0 -1
- package/lib/authentication/templates/client.tpl.d.ts +0 -2
- package/lib/authentication/templates/client.tpl.js +0 -14
- package/lib/authentication/templates/client.tpl.js.map +0 -1
- package/lib/authentication/templates/client.tpl.ts +0 -19
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.0.0-pre.34](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.33...v5.0.0-pre.34) (2022-12-14)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **cli:** mongodb connection string for node 17+ ([#2875](https://github.com/feathersjs/feathers/issues/2875)) ([7fa2012](https://github.com/feathersjs/feathers/commit/7fa2012897d8429b522fbca72211fc9be1c25f7e))
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **adapter:** Add patch data type to adapters and refactor AdapterBase usage ([#2906](https://github.com/feathersjs/feathers/issues/2906)) ([9ddc2e6](https://github.com/feathersjs/feathers/commit/9ddc2e6b028f026f939d6af68125847e5c6734b4))
|
|
15
|
+
- **cli:** Use separate patch schema and types ([#2916](https://github.com/feathersjs/feathers/issues/2916)) ([7088af6](https://github.com/feathersjs/feathers/commit/7088af64a539dc7f1a016d832b77b98aaaf92603))
|
|
16
|
+
- **docs:** CLI and application structure guide ([#2818](https://github.com/feathersjs/feathers/issues/2818)) ([142914f](https://github.com/feathersjs/feathers/commit/142914fc001a8420056dd56db992c1c4f1bd312c))
|
|
17
|
+
- **schema:** Split resolver options and property resolvers ([#2889](https://github.com/feathersjs/feathers/issues/2889)) ([4822c94](https://github.com/feathersjs/feathers/commit/4822c949812e5a1dceff3c62b2f9de4781b4d601))
|
|
18
|
+
- **schema:** Virtual property resolvers ([#2900](https://github.com/feathersjs/feathers/issues/2900)) ([7d03b57](https://github.com/feathersjs/feathers/commit/7d03b57ae2f633bdd4a368e0d5955011fbd6c329))
|
|
19
|
+
|
|
6
20
|
# [5.0.0-pre.33](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.32...v5.0.0-pre.33) (2022-11-08)
|
|
7
21
|
|
|
8
22
|
### Bug Fixes
|
package/lib/app/index.d.ts
CHANGED
|
@@ -21,9 +21,9 @@ export interface AppGeneratorData extends FeathersAppInfo {
|
|
|
21
21
|
*/
|
|
22
22
|
lib: string;
|
|
23
23
|
}
|
|
24
|
-
export
|
|
24
|
+
export type AppGeneratorContext = FeathersBaseContext & AppGeneratorData & {
|
|
25
25
|
dependencies: string[];
|
|
26
26
|
devDependencies: string[];
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type AppGeneratorArguments = FeathersBaseContext & Partial<AppGeneratorData>;
|
|
29
29
|
export declare const generate: (ctx: AppGeneratorArguments) => Promise<AppGeneratorContext>;
|
package/lib/app/index.js
CHANGED
|
@@ -120,7 +120,7 @@ const generate = (ctx) => (0, pinion_1.generator)(ctx)
|
|
|
120
120
|
}))
|
|
121
121
|
.then((0, pinion_1.install)(({ transports, framework, dependencyVersions, dependencies, schema }) => {
|
|
122
122
|
const hasSocketio = transports.includes('websockets');
|
|
123
|
-
dependencies.push('@feathersjs/feathers', '@feathersjs/errors', '@feathersjs/schema', '@feathersjs/configuration', '@feathersjs/transport-commons', '@feathersjs/authentication', '@feathersjs/authentication-client', 'winston');
|
|
123
|
+
dependencies.push('@feathersjs/feathers', '@feathersjs/errors', '@feathersjs/schema', '@feathersjs/configuration', '@feathersjs/transport-commons', '@feathersjs/adapter-commons', '@feathersjs/authentication', '@feathersjs/authentication-client', 'winston');
|
|
124
124
|
if (hasSocketio) {
|
|
125
125
|
dependencies.push('@feathersjs/socketio');
|
|
126
126
|
}
|
package/lib/app/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":";;;;;;AAAA,+BAA0B;AAC1B,kDAAyB;AACzB,+CAS2B;AAC3B,wCAAqG;AACrG,sDAAyG;AACzG,8CAA6F;AAiCtF,MAAM,QAAQ,GAAG,CAAC,GAA0B,EAAE,EAAE,CACrD,IAAA,kBAAS,EAAC,GAAG,CAAC;KACX,IAAI,CAAC,IAAA,+BAAqB,GAAE,CAAC;KAC7B,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACd,GAAG,GAAG;IACN,YAAY,EAAE,EAAE;IAChB,eAAe,EAAE,EAAE;CACpB,CAAC,CAAC;KACF,IAAI,CACH,IAAA,eAAM,EAA6C,CAAC,GAAG,EAAE,EAAE,CAAC;IAC1D;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,MAAM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,EAAC,YAAY,EAAE,kBAAkB,CAAC,CAAA;AACtD,CAAC,EACD,KAAK,EACL,GAAG,CAAC,QAAQ,CACb,CACF;KACA,IAAI,CACH,IAAA,gBAAO,EACL,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,kBAAkB,EAAE,EAAE,EAAE;IACpD,eAAe,CAAC,IAAI,CAClB,SAAS,EACT,OAAO,EACP,OAAO,EACP,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,yBAAyB,CAC1B,CAAA;IAED,IAAI,QAAQ,KAAK,IAAI,EAAE;QACrB,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,CAAA;KAC/F;IAED,OAAO,IAAA,qBAAW,EAAC,eAAe,EAAE,kBAAkB,CAAC,CAAA;AACzD,CAAC,EACD,IAAI,EACJ,GAAG,CAAC,QAAQ,CACb,CACF,CAAA;AApLQ,QAAA,QAAQ,YAoLhB"}
|
package/lib/app/index.ts
CHANGED
|
@@ -175,6 +175,7 @@ export const generate = (ctx: AppGeneratorArguments) =>
|
|
|
175
175
|
'@feathersjs/schema',
|
|
176
176
|
'@feathersjs/configuration',
|
|
177
177
|
'@feathersjs/transport-commons',
|
|
178
|
+
'@feathersjs/adapter-commons',
|
|
178
179
|
'@feathersjs/authentication',
|
|
179
180
|
'@feathersjs/authentication-client',
|
|
180
181
|
'winston'
|
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.generate = void 0;
|
|
4
4
|
const pinion_1 = require("@feathershq/pinion");
|
|
5
5
|
const commons_1 = require("../../commons");
|
|
6
|
-
const template = ({ lib }) => /* ts */
|
|
6
|
+
const template = ({ lib }) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/app.test.html
|
|
7
|
+
import assert from 'assert'
|
|
7
8
|
import axios from 'axios'
|
|
8
9
|
import type { Server } from 'http'
|
|
9
10
|
import { app } from '../${lib}/app'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.test.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/app.test.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,QAAQ,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"app.test.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/app.test.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,QAAQ,GAAG,CAAC,EAChB,GAAG,EACiB,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;0BAIV,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoC5B,CAAA;AAEM,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAA,sBAAY,EAAC,QAAQ,EAAE,IAAA,eAAM,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAA;AAD5D,QAAA,QAAQ,YACoD"}
|
|
@@ -2,7 +2,10 @@ import { generator, toFile } from '@feathershq/pinion'
|
|
|
2
2
|
import { renderSource } from '../../commons'
|
|
3
3
|
import { AppGeneratorContext } from '../index'
|
|
4
4
|
|
|
5
|
-
const template = ({
|
|
5
|
+
const template = ({
|
|
6
|
+
lib
|
|
7
|
+
}: AppGeneratorContext) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/app.test.html
|
|
8
|
+
import assert from 'assert'
|
|
6
9
|
import axios from 'axios'
|
|
7
10
|
import type { Server } from 'http'
|
|
8
11
|
import { app } from '../${lib}/app'
|
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.generate = void 0;
|
|
4
4
|
const pinion_1 = require("@feathershq/pinion");
|
|
5
5
|
const commons_1 = require("../../commons");
|
|
6
|
-
const tsKoaApp = ({ transports }) => /* ts */
|
|
6
|
+
const tsKoaApp = ({ transports }) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/application.html
|
|
7
|
+
import { feathers } from '@feathersjs/feathers'
|
|
7
8
|
import configuration from '@feathersjs/configuration'
|
|
8
9
|
import {
|
|
9
10
|
koa, rest, bodyParser, errorHandler, parseAuthentication, cors, serveStatic
|
|
@@ -11,8 +12,8 @@ import {
|
|
|
11
12
|
${transports.includes('websockets') ? "import socketio from '@feathersjs/socketio'" : ''}
|
|
12
13
|
|
|
13
14
|
import type { Application } from './declarations'
|
|
14
|
-
import { configurationValidator } from './
|
|
15
|
-
import {
|
|
15
|
+
import { configurationValidator } from './configuration'
|
|
16
|
+
import { logError } from './hooks/log-error'
|
|
16
17
|
import { services } from './services/index'
|
|
17
18
|
import { channels } from './channels'
|
|
18
19
|
|
|
@@ -43,7 +44,7 @@ app.configure(channels)
|
|
|
43
44
|
// Register hooks that run on all service methods
|
|
44
45
|
app.hooks({
|
|
45
46
|
around: {
|
|
46
|
-
all: [
|
|
47
|
+
all: [ logError ]
|
|
47
48
|
},
|
|
48
49
|
before: {},
|
|
49
50
|
after: {},
|
|
@@ -57,17 +58,19 @@ app.hooks({
|
|
|
57
58
|
|
|
58
59
|
export { app }
|
|
59
60
|
`;
|
|
60
|
-
const tsExpressApp = ({ transports }) => /* ts */
|
|
61
|
+
const tsExpressApp = ({ transports }) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/application.html
|
|
62
|
+
import { feathers } from '@feathersjs/feathers'
|
|
61
63
|
import express, {
|
|
62
|
-
rest, json, urlencoded, cors,
|
|
64
|
+
rest, json, urlencoded, cors,
|
|
63
65
|
serveStatic, notFound, errorHandler
|
|
64
66
|
} from '@feathersjs/express'
|
|
65
67
|
import configuration from '@feathersjs/configuration'
|
|
66
68
|
${transports.includes('websockets') ? "import socketio from '@feathersjs/socketio'" : ''}
|
|
67
69
|
|
|
68
70
|
import type { Application } from './declarations'
|
|
69
|
-
import { configurationValidator } from './
|
|
70
|
-
import { logger
|
|
71
|
+
import { configurationValidator } from './configuration'
|
|
72
|
+
import { logger } from './logger'
|
|
73
|
+
import { logError } from './hooks/log-error'
|
|
71
74
|
import { services } from './services/index'
|
|
72
75
|
import { channels } from './channels'
|
|
73
76
|
|
|
@@ -76,7 +79,6 @@ const app: Application = express(feathers())
|
|
|
76
79
|
// Load app configuration
|
|
77
80
|
app.configure(configuration(configurationValidator))
|
|
78
81
|
app.use(cors())
|
|
79
|
-
app.use(compression())
|
|
80
82
|
app.use(json())
|
|
81
83
|
app.use(urlencoded({ extended: true }))
|
|
82
84
|
// Host the public folder
|
|
@@ -101,7 +103,7 @@ app.use(errorHandler({ logger }))
|
|
|
101
103
|
// Register hooks that run on all service methods
|
|
102
104
|
app.hooks({
|
|
103
105
|
around: {
|
|
104
|
-
all: [
|
|
106
|
+
all: [ logError ]
|
|
105
107
|
},
|
|
106
108
|
before: {},
|
|
107
109
|
after: {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/app.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,QAAQ,GAAG,CAAC,EAChB,UAAU,EACU,EAAE,EAAE,CAAC,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"app.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/app.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,QAAQ,GAAG,CAAC,EAChB,UAAU,EACU,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;;EAMlC,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,6CAA6C,CAAC,CAAC,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;;;EAuBtF,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC;IAC/B,CAAC,CAAC;;;;IAIF;IACA,CAAC,CAAC,EACN;;;;;;;;;;;;;;;;;;;;CAoBC,CAAA;AAED,MAAM,YAAY,GAAG,CAAC,EACpB,UAAU,EACU,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;;;EAOlC,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,6CAA6C,CAAC,CAAC,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;;EAsBtF,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC;IAC/B,CAAC,CAAC;;;;IAIF;IACA,CAAC,CAAC,EACN;;;;;;;;;;;;;;;;;;;;;;;;CAwBC,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CAC5C,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AAE1D,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC,IAAI,CACjB,IAAA,sBAAY,EACV,QAAQ,EACR,IAAA,eAAM,EAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,CACrD,CACF,CAAA;AANU,QAAA,QAAQ,YAMlB"}
|
|
@@ -4,7 +4,8 @@ import { AppGeneratorContext } from '../index'
|
|
|
4
4
|
|
|
5
5
|
const tsKoaApp = ({
|
|
6
6
|
transports
|
|
7
|
-
}: AppGeneratorContext) => /* ts */
|
|
7
|
+
}: AppGeneratorContext) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/application.html
|
|
8
|
+
import { feathers } from '@feathersjs/feathers'
|
|
8
9
|
import configuration from '@feathersjs/configuration'
|
|
9
10
|
import {
|
|
10
11
|
koa, rest, bodyParser, errorHandler, parseAuthentication, cors, serveStatic
|
|
@@ -12,8 +13,8 @@ import {
|
|
|
12
13
|
${transports.includes('websockets') ? "import socketio from '@feathersjs/socketio'" : ''}
|
|
13
14
|
|
|
14
15
|
import type { Application } from './declarations'
|
|
15
|
-
import { configurationValidator } from './
|
|
16
|
-
import {
|
|
16
|
+
import { configurationValidator } from './configuration'
|
|
17
|
+
import { logError } from './hooks/log-error'
|
|
17
18
|
import { services } from './services/index'
|
|
18
19
|
import { channels } from './channels'
|
|
19
20
|
|
|
@@ -46,7 +47,7 @@ app.configure(channels)
|
|
|
46
47
|
// Register hooks that run on all service methods
|
|
47
48
|
app.hooks({
|
|
48
49
|
around: {
|
|
49
|
-
all: [
|
|
50
|
+
all: [ logError ]
|
|
50
51
|
},
|
|
51
52
|
before: {},
|
|
52
53
|
after: {},
|
|
@@ -63,17 +64,19 @@ export { app }
|
|
|
63
64
|
|
|
64
65
|
const tsExpressApp = ({
|
|
65
66
|
transports
|
|
66
|
-
}: AppGeneratorContext) => /* ts */
|
|
67
|
+
}: AppGeneratorContext) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/application.html
|
|
68
|
+
import { feathers } from '@feathersjs/feathers'
|
|
67
69
|
import express, {
|
|
68
|
-
rest, json, urlencoded, cors,
|
|
70
|
+
rest, json, urlencoded, cors,
|
|
69
71
|
serveStatic, notFound, errorHandler
|
|
70
72
|
} from '@feathersjs/express'
|
|
71
73
|
import configuration from '@feathersjs/configuration'
|
|
72
74
|
${transports.includes('websockets') ? "import socketio from '@feathersjs/socketio'" : ''}
|
|
73
75
|
|
|
74
76
|
import type { Application } from './declarations'
|
|
75
|
-
import { configurationValidator } from './
|
|
76
|
-
import { logger
|
|
77
|
+
import { configurationValidator } from './configuration'
|
|
78
|
+
import { logger } from './logger'
|
|
79
|
+
import { logError } from './hooks/log-error'
|
|
77
80
|
import { services } from './services/index'
|
|
78
81
|
import { channels } from './channels'
|
|
79
82
|
|
|
@@ -82,7 +85,6 @@ const app: Application = express(feathers())
|
|
|
82
85
|
// Load app configuration
|
|
83
86
|
app.configure(configuration(configurationValidator))
|
|
84
87
|
app.use(cors())
|
|
85
|
-
app.use(compression())
|
|
86
88
|
app.use(json())
|
|
87
89
|
app.use(urlencoded({ extended: true }))
|
|
88
90
|
// Host the public folder
|
|
@@ -109,7 +111,7 @@ app.use(errorHandler({ logger }))
|
|
|
109
111
|
// Register hooks that run on all service methods
|
|
110
112
|
app.hooks({
|
|
111
113
|
around: {
|
|
112
|
-
all: [
|
|
114
|
+
all: [ logError ]
|
|
113
115
|
},
|
|
114
116
|
before: {},
|
|
115
117
|
after: {},
|
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.generate = void 0;
|
|
4
4
|
const pinion_1 = require("@feathershq/pinion");
|
|
5
5
|
const commons_1 = require("../../commons");
|
|
6
|
-
const template = ({ language }) => /* ts */
|
|
6
|
+
const template = ({ language }) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/channels.html
|
|
7
|
+
import type { RealTimeConnection, Params } from '@feathersjs/feathers'
|
|
7
8
|
import '@feathersjs/transport-commons'
|
|
8
9
|
import type { Application, HookContext } from './declarations'
|
|
9
10
|
import { logger } from './logger'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channels.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/channels.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,QAAQ,GAAG,CAAC,EAChB,QAAQ,EACY,EAAE,EAAE,CAAC,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"channels.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/channels.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,QAAQ,GAAG,CAAC,EAChB,QAAQ,EACY,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;;;;;;;;kFAY8C,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BzF,CAAA;AAEM,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC,IAAI,CACjB,IAAA,sBAAY,EACV,QAAQ,EACR,IAAA,eAAM,EAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,CAC1D,CACF,CAAA;AANU,QAAA,QAAQ,YAMlB"}
|
|
@@ -4,7 +4,8 @@ import { AppGeneratorContext } from '../index'
|
|
|
4
4
|
|
|
5
5
|
const template = ({
|
|
6
6
|
language
|
|
7
|
-
}: AppGeneratorContext) => /* ts */
|
|
7
|
+
}: AppGeneratorContext) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/channels.html
|
|
8
|
+
import type { RealTimeConnection, Params } from '@feathersjs/feathers'
|
|
8
9
|
import '@feathersjs/transport-commons'
|
|
9
10
|
import type { Application, HookContext } from './declarations'
|
|
10
11
|
import { logger } from './logger'
|
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.generate = void 0;
|
|
4
4
|
const pinion_1 = require("@feathershq/pinion");
|
|
5
5
|
const commons_1 = require("../../commons");
|
|
6
|
-
const template = ({ name, language }) => /* ts */
|
|
6
|
+
const template = ({ name, language }) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/client.html
|
|
7
|
+
import { feathers } from '@feathersjs/feathers'
|
|
7
8
|
import type { TransportConnection, Params } from '@feathersjs/feathers'
|
|
8
9
|
import authenticationClient from '@feathersjs/authentication-client'
|
|
9
10
|
import type { AuthenticationClientOptions } from '@feathersjs/authentication-client'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/client.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,QAAQ,GAAG,CAAC,EAChB,IAAI,EACJ,QAAQ,EACY,EAAE,EAAE,CAAC,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"client.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/client.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,QAAQ,GAAG,CAAC,EAChB,IAAI,EACJ,QAAQ,EACY,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;;;;;;;eAWrB,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,mBAAmB,IAAI;;;;;;;;;;;;;;;;;;CAkBrE,CAAA;AAEM,MAAM,QAAQ,GAAG,KAAK,EAAE,GAAwB,EAAE,EAAE,CACzD,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC,IAAI,CACjB,IAAA,sBAAY,EACV,QAAQ,EACR,IAAA,eAAM,EAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,CACxD,CACF,CAAA;AANU,QAAA,QAAQ,YAMlB"}
|
|
@@ -5,7 +5,8 @@ import { AppGeneratorContext } from '../index'
|
|
|
5
5
|
const template = ({
|
|
6
6
|
name,
|
|
7
7
|
language
|
|
8
|
-
}: AppGeneratorContext) => /* ts */
|
|
8
|
+
}: AppGeneratorContext) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/client.html
|
|
9
|
+
import { feathers } from '@feathersjs/feathers'
|
|
9
10
|
import type { TransportConnection, Params } from '@feathersjs/feathers'
|
|
10
11
|
import authenticationClient from '@feathersjs/authentication-client'
|
|
11
12
|
import type { AuthenticationClientOptions } from '@feathersjs/authentication-client'
|
|
File without changes
|
|
@@ -3,32 +3,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.generate = void 0;
|
|
4
4
|
const pinion_1 = require("@feathershq/pinion");
|
|
5
5
|
const commons_1 = require("../../commons");
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export const dataValidator = addFormats(new Ajv({}), formats)
|
|
27
|
-
|
|
28
|
-
export const queryValidator = addFormats(new Ajv({
|
|
29
|
-
coerceTypes: true
|
|
30
|
-
}), formats)
|
|
31
|
-
`;
|
|
6
|
+
const defaultConfig = ({}) => ({
|
|
7
|
+
host: 'localhost',
|
|
8
|
+
port: 3030,
|
|
9
|
+
public: './public/',
|
|
10
|
+
origins: ['http://localhost:3030'],
|
|
11
|
+
paginate: {
|
|
12
|
+
default: 10,
|
|
13
|
+
max: 50
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
const customEnvironment = {
|
|
17
|
+
port: {
|
|
18
|
+
__name: 'PORT',
|
|
19
|
+
__format: 'number'
|
|
20
|
+
},
|
|
21
|
+
host: 'HOSTNAME'
|
|
22
|
+
};
|
|
23
|
+
const testConfig = {
|
|
24
|
+
port: 8998
|
|
25
|
+
};
|
|
32
26
|
const configurationJsonTemplate = ({}) => /* ts */ `import { defaultAppSettings, getValidator } from '@feathersjs/schema'
|
|
33
27
|
import type { FromSchema } from '@feathersjs/schema'
|
|
34
28
|
|
|
@@ -69,7 +63,9 @@ export type ApplicationConfiguration = Static<typeof configurationSchema>
|
|
|
69
63
|
export const configurationValidator = getValidator(configurationSchema, dataValidator)
|
|
70
64
|
`;
|
|
71
65
|
const generate = (ctx) => (0, pinion_1.generator)(ctx)
|
|
72
|
-
.then((0,
|
|
73
|
-
.then((0,
|
|
66
|
+
.then((0, pinion_1.writeJSON)(defaultConfig, (0, pinion_1.toFile)('config', 'default.json')))
|
|
67
|
+
.then((0, pinion_1.writeJSON)(testConfig, (0, pinion_1.toFile)('config', 'test.json')))
|
|
68
|
+
.then((0, pinion_1.writeJSON)(customEnvironment, (0, pinion_1.toFile)('config', 'custom-environment-variables.json')))
|
|
69
|
+
.then((0, commons_1.renderSource)(async (ctx) => ctx.schema === 'typebox' ? configurationTypeboxTemplate(ctx) : configurationJsonTemplate(ctx), (0, pinion_1.toFile)(({ lib }) => lib, 'configuration')));
|
|
74
70
|
exports.generate = generate;
|
|
75
|
-
//# sourceMappingURL=
|
|
71
|
+
//# sourceMappingURL=configuration.tpl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/configuration.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAiE;AACjE,2CAA4C;AAG5C,MAAM,aAAa,GAAG,CAAC,EAAuB,EAAE,EAAE,CAAC,CAAC;IAClD,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,CAAC,uBAAuB,CAAC;IAClC,QAAQ,EAAE;QACR,OAAO,EAAE,EAAE;QACX,GAAG,EAAE,EAAE;KACR;CACF,CAAC,CAAA;AAEF,MAAM,iBAAiB,GAAG;IACxB,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,QAAQ;KACnB;IACD,IAAI,EAAE,UAAU;CACjB,CAAA;AAED,MAAM,UAAU,GAAG;IACjB,IAAI,EAAE,IAAI;CACX,CAAA;AAED,MAAM,yBAAyB,GAC7B,CAAC,EAAuB,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;CAoBvC,CAAA;AAED,MAAM,4BAA4B,GAChC,CAAC,EAAuB,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;;;CAiBvC,CAAA;AAEM,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC;KACX,IAAI,CAAC,IAAA,kBAAS,EAAC,aAAa,EAAE,IAAA,eAAM,EAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC;KAChE,IAAI,CAAC,IAAA,kBAAS,EAAC,UAAU,EAAE,IAAA,eAAM,EAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;KAC1D,IAAI,CAAC,IAAA,kBAAS,EAAC,iBAAiB,EAAE,IAAA,eAAM,EAAC,QAAQ,EAAE,mCAAmC,CAAC,CAAC,CAAC;KACzF,IAAI,CACH,IAAA,sBAAY,EACV,KAAK,EAAE,GAAG,EAAE,EAAE,CACZ,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,4BAA4B,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,GAAG,CAAC,EAC/F,IAAA,eAAM,EAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,eAAe,CAAC,CAC/D,CACF,CAAA;AAXQ,QAAA,QAAQ,YAWhB"}
|
|
@@ -1,33 +1,29 @@
|
|
|
1
|
-
import { generator, toFile } from '@feathershq/pinion'
|
|
1
|
+
import { generator, toFile, writeJSON } from '@feathershq/pinion'
|
|
2
2
|
import { renderSource } from '../../commons'
|
|
3
3
|
import { AppGeneratorContext } from '../index'
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
'
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
'ipv6',
|
|
16
|
-
'uri',
|
|
17
|
-
'uri-reference',
|
|
18
|
-
'uuid',
|
|
19
|
-
'uri-template',
|
|
20
|
-
'json-pointer',
|
|
21
|
-
'relative-json-pointer',
|
|
22
|
-
'regex'
|
|
23
|
-
]
|
|
5
|
+
const defaultConfig = ({}: AppGeneratorContext) => ({
|
|
6
|
+
host: 'localhost',
|
|
7
|
+
port: 3030,
|
|
8
|
+
public: './public/',
|
|
9
|
+
origins: ['http://localhost:3030'],
|
|
10
|
+
paginate: {
|
|
11
|
+
default: 10,
|
|
12
|
+
max: 50
|
|
13
|
+
}
|
|
14
|
+
})
|
|
24
15
|
|
|
25
|
-
|
|
16
|
+
const customEnvironment = {
|
|
17
|
+
port: {
|
|
18
|
+
__name: 'PORT',
|
|
19
|
+
__format: 'number'
|
|
20
|
+
},
|
|
21
|
+
host: 'HOSTNAME'
|
|
22
|
+
}
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
`
|
|
24
|
+
const testConfig = {
|
|
25
|
+
port: 8998
|
|
26
|
+
}
|
|
31
27
|
|
|
32
28
|
const configurationJsonTemplate =
|
|
33
29
|
({}: AppGeneratorContext) => /* ts */ `import { defaultAppSettings, getValidator } from '@feathersjs/schema'
|
|
@@ -74,16 +70,13 @@ export const configurationValidator = getValidator(configurationSchema, dataVali
|
|
|
74
70
|
|
|
75
71
|
export const generate = (ctx: AppGeneratorContext) =>
|
|
76
72
|
generator(ctx)
|
|
73
|
+
.then(writeJSON(defaultConfig, toFile('config', 'default.json')))
|
|
74
|
+
.then(writeJSON(testConfig, toFile('config', 'test.json')))
|
|
75
|
+
.then(writeJSON(customEnvironment, toFile('config', 'custom-environment-variables.json')))
|
|
77
76
|
.then(
|
|
78
77
|
renderSource(
|
|
79
78
|
async (ctx) =>
|
|
80
79
|
ctx.schema === 'typebox' ? configurationTypeboxTemplate(ctx) : configurationJsonTemplate(ctx),
|
|
81
|
-
toFile<AppGeneratorContext>(({ lib }) => lib, '
|
|
82
|
-
)
|
|
83
|
-
)
|
|
84
|
-
.then(
|
|
85
|
-
renderSource(
|
|
86
|
-
validatorTemplate,
|
|
87
|
-
toFile<AppGeneratorContext>(({ lib }) => lib, 'schemas', 'validators')
|
|
80
|
+
toFile<AppGeneratorContext>(({ lib }) => lib, 'configuration')
|
|
88
81
|
)
|
|
89
82
|
)
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generate = void 0;
|
|
4
4
|
const pinion_1 = require("@feathershq/pinion");
|
|
5
|
-
const template = ({ framework }) => /* ts */
|
|
5
|
+
const template = ({ framework }) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/typescript.html
|
|
6
|
+
import { HookContext as FeathersHookContext, NextFunction } from '@feathersjs/feathers'
|
|
6
7
|
import { Application as FeathersApplication } from '@feathersjs/${framework}'
|
|
7
|
-
import { ApplicationConfiguration } from './
|
|
8
|
+
import { ApplicationConfiguration } from './configuration'
|
|
8
9
|
|
|
9
10
|
export { NextFunction }
|
|
10
11
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declarations.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/declarations.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAA4E;AAG5E,MAAM,QAAQ,GAAG,CAAC,EAChB,SAAS,EACW,EAAE,EAAE,CAAC,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"declarations.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/declarations.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAA4E;AAG5E,MAAM,QAAQ,GAAG,CAAC,EAChB,SAAS,EACW,EAAE,EAAE,CAAC,QAAQ,CAAC;;kEAE8B,SAAS;;;;;;;;;;;;;;;;;;CAkB1E,CAAA;AAEM,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC,IAAI,CACjB,IAAA,aAAI,EACF,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,KAAK,IAAI,EACnC,IAAA,uBAAc,EACZ,QAAQ,EACR,IAAA,eAAM,EAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,iBAAiB,CAAC,CACjE,CACF,CACF,CAAA;AATU,QAAA,QAAQ,YASlB"}
|
|
@@ -3,9 +3,10 @@ import { AppGeneratorContext } from '../index'
|
|
|
3
3
|
|
|
4
4
|
const template = ({
|
|
5
5
|
framework
|
|
6
|
-
}: AppGeneratorContext) => /* ts */
|
|
6
|
+
}: AppGeneratorContext) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/typescript.html
|
|
7
|
+
import { HookContext as FeathersHookContext, NextFunction } from '@feathersjs/feathers'
|
|
7
8
|
import { Application as FeathersApplication } from '@feathersjs/${framework}'
|
|
8
|
-
import { ApplicationConfiguration } from './
|
|
9
|
+
import { ApplicationConfiguration } from './configuration'
|
|
9
10
|
|
|
10
11
|
export { NextFunction }
|
|
11
12
|
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { AppGeneratorContext } from '../index';
|
|
2
|
+
export declare const logErrorTemplate = "// For more information about this file see https://dove.feathersjs.com/guides/cli/log-error.html\nimport type { HookContext, NextFunction } from '../declarations'\nimport { logger } from '../logger'\n\nexport const logError = async (context: HookContext, next: NextFunction) => {\n try {\n await next()\n } catch (error: any) {\n logger.error(error.stack)\n \n // Log validation errors\n if (error.data) {\n logger.error(error.data)\n }\n\n throw error\n }\n}\n";
|
|
2
3
|
export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generate = void 0;
|
|
3
|
+
exports.generate = exports.logErrorTemplate = void 0;
|
|
4
4
|
const pinion_1 = require("@feathershq/pinion");
|
|
5
5
|
const commons_1 = require("../../commons");
|
|
6
|
-
const template = ({}) => /* ts */
|
|
7
|
-
import
|
|
6
|
+
const template = ({}) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/logging.html
|
|
7
|
+
import { createLogger, format, transports } from 'winston'
|
|
8
8
|
|
|
9
9
|
// Configure the Winston logger. For the complete documentation see https://github.com/winstonjs/winston
|
|
10
10
|
export const logger = createLogger({
|
|
@@ -18,8 +18,12 @@ export const logger = createLogger({
|
|
|
18
18
|
new transports.Console()
|
|
19
19
|
]
|
|
20
20
|
})
|
|
21
|
+
`;
|
|
22
|
+
exports.logErrorTemplate = `// For more information about this file see https://dove.feathersjs.com/guides/cli/log-error.html
|
|
23
|
+
import type { HookContext, NextFunction } from '../declarations'
|
|
24
|
+
import { logger } from '../logger'
|
|
21
25
|
|
|
22
|
-
export const
|
|
26
|
+
export const logError = async (context: HookContext, next: NextFunction) => {
|
|
23
27
|
try {
|
|
24
28
|
await next()
|
|
25
29
|
} catch (error: any) {
|
|
@@ -34,6 +38,8 @@ export const logErrorHook = async (context: HookContext, next: NextFunction) =>
|
|
|
34
38
|
}
|
|
35
39
|
}
|
|
36
40
|
`;
|
|
37
|
-
const generate = (ctx) => (0, pinion_1.generator)(ctx)
|
|
41
|
+
const generate = (ctx) => (0, pinion_1.generator)(ctx)
|
|
42
|
+
.then((0, commons_1.renderSource)(template, (0, pinion_1.toFile)(({ lib }) => lib, 'logger')))
|
|
43
|
+
.then((0, commons_1.renderSource)(exports.logErrorTemplate, (0, pinion_1.toFile)(({ lib }) => lib, 'hooks', 'log-error')));
|
|
38
44
|
exports.generate = generate;
|
|
39
45
|
//# sourceMappingURL=logger.tpl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/logger.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,QAAQ,GACZ,CAAC,EAAuB,EAAE,EAAE,CAAC,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"logger.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/logger.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,QAAQ,GACZ,CAAC,EAAuB,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;CAevC,CAAA;AAEY,QAAA,gBAAgB,GAAY;;;;;;;;;;;;;;;;;;CAkBxC,CAAA;AAEM,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC;KACX,IAAI,CACH,IAAA,sBAAY,EACV,QAAQ,EACR,IAAA,eAAM,EAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,CACxD,CACF;KACA,IAAI,CACH,IAAA,sBAAY,EACV,wBAAgB,EAChB,IAAA,eAAM,EAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,WAAW,CAAC,CACpE,CACF,CAAA;AAbQ,QAAA,QAAQ,YAahB"}
|
|
@@ -3,8 +3,8 @@ import { renderSource } from '../../commons'
|
|
|
3
3
|
import { AppGeneratorContext } from '../index'
|
|
4
4
|
|
|
5
5
|
const template =
|
|
6
|
-
({}: AppGeneratorContext) => /* ts */
|
|
7
|
-
import
|
|
6
|
+
({}: AppGeneratorContext) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/logging.html
|
|
7
|
+
import { createLogger, format, transports } from 'winston'
|
|
8
8
|
|
|
9
9
|
// Configure the Winston logger. For the complete documentation see https://github.com/winstonjs/winston
|
|
10
10
|
export const logger = createLogger({
|
|
@@ -18,8 +18,13 @@ export const logger = createLogger({
|
|
|
18
18
|
new transports.Console()
|
|
19
19
|
]
|
|
20
20
|
})
|
|
21
|
+
`
|
|
22
|
+
|
|
23
|
+
export const logErrorTemplate = /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/log-error.html
|
|
24
|
+
import type { HookContext, NextFunction } from '../declarations'
|
|
25
|
+
import { logger } from '../logger'
|
|
21
26
|
|
|
22
|
-
export const
|
|
27
|
+
export const logError = async (context: HookContext, next: NextFunction) => {
|
|
23
28
|
try {
|
|
24
29
|
await next()
|
|
25
30
|
} catch (error: any) {
|
|
@@ -36,9 +41,16 @@ export const logErrorHook = async (context: HookContext, next: NextFunction) =>
|
|
|
36
41
|
`
|
|
37
42
|
|
|
38
43
|
export const generate = (ctx: AppGeneratorContext) =>
|
|
39
|
-
generator(ctx)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
generator(ctx)
|
|
45
|
+
.then(
|
|
46
|
+
renderSource(
|
|
47
|
+
template,
|
|
48
|
+
toFile<AppGeneratorContext>(({ lib }) => lib, 'logger')
|
|
49
|
+
)
|
|
50
|
+
)
|
|
51
|
+
.then(
|
|
52
|
+
renderSource(
|
|
53
|
+
logErrorTemplate,
|
|
54
|
+
toFile<AppGeneratorContext>(({ lib }) => lib, 'hooks', 'log-error')
|
|
55
|
+
)
|
|
43
56
|
)
|
|
44
|
-
)
|