@feathersjs/cli 5.0.14 → 5.0.16
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 +10 -0
- package/bin/feathers +1 -1
- package/lib/index.js +22 -43
- package/lib/index.js.map +1 -1
- package/package.json +26 -25
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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.16](https://github.com/feathersjs/feathers/compare/v5.0.15...v5.0.16) (2024-01-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @feathersjs/cli
|
|
9
|
+
|
|
10
|
+
## [5.0.15](https://github.com/feathersjs/feathers/compare/v5.0.14...v5.0.15) (2024-01-22)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **generators:** Move generators and CLI to featherscloud/pinion ([#3386](https://github.com/feathersjs/feathers/issues/3386)) ([eb87c99](https://github.com/feathersjs/feathers/commit/eb87c9922db56c5610e5b808f3ffe033c830e2b2))
|
|
15
|
+
|
|
6
16
|
## [5.0.14](https://github.com/feathersjs/feathers/compare/v5.0.13...v5.0.14) (2024-01-05)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @feathersjs/cli
|
package/bin/feathers
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,76 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
-
};
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.program = exports.commandRunner = exports.chalk = void 0;
|
|
21
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
22
|
-
exports.chalk = chalk_1.default;
|
|
23
|
-
const commander_1 = require("commander");
|
|
24
|
-
const path_1 = require("path");
|
|
25
|
-
const generators_1 = require("@feathersjs/generators");
|
|
26
|
-
__exportStar(require("commander"), exports);
|
|
27
|
-
const commandRunner = (name) => async (options) => {
|
|
28
|
-
const folder = (0, path_1.dirname)(require.resolve('@feathersjs/generators'));
|
|
29
|
-
const ctx = (0, generators_1.getContext)({
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
import { dirname } from 'path';
|
|
4
|
+
import { runGenerator, getContext, version } from '@feathersjs/generators';
|
|
5
|
+
export * from 'commander';
|
|
6
|
+
export { chalk };
|
|
7
|
+
export const commandRunner = (name) => async (options) => {
|
|
8
|
+
const folder = dirname(require.resolve('@feathersjs/generators'));
|
|
9
|
+
const ctx = getContext({
|
|
30
10
|
...options
|
|
31
11
|
});
|
|
32
|
-
await
|
|
33
|
-
.then(
|
|
12
|
+
await Promise.resolve(ctx)
|
|
13
|
+
.then(runGenerator(folder, name, 'index'))
|
|
34
14
|
.catch((error) => {
|
|
35
15
|
const { logger } = ctx.pinion;
|
|
36
|
-
logger.error(`Error: ${
|
|
16
|
+
logger.error(`Error: ${chalk.white(error.message)}`);
|
|
37
17
|
});
|
|
38
18
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
exports.program
|
|
19
|
+
export const program = new Command();
|
|
20
|
+
program
|
|
42
21
|
.name('feathers')
|
|
43
22
|
.description('The Feathers command line interface 🕊️')
|
|
44
|
-
.version(
|
|
23
|
+
.version(version)
|
|
45
24
|
.showHelpAfterError();
|
|
46
|
-
const generate =
|
|
25
|
+
const generate = program.command('generate').alias('g');
|
|
47
26
|
generate
|
|
48
27
|
.command('app')
|
|
49
28
|
.description('Generate a new application')
|
|
50
29
|
.option('--name <name>', 'The name of the application')
|
|
51
|
-
.action(
|
|
30
|
+
.action(commandRunner('app'));
|
|
52
31
|
generate
|
|
53
32
|
.command('service')
|
|
54
33
|
.description('Generate a new service')
|
|
55
34
|
.option('--name <name>', 'The service name')
|
|
56
35
|
.option('--path <path>', 'The path to register the service on')
|
|
57
36
|
.option('--type <type>', 'The service type (knex, mongodb, custom)')
|
|
58
|
-
.action(
|
|
37
|
+
.action(commandRunner('service'));
|
|
59
38
|
generate
|
|
60
39
|
.command('hook')
|
|
61
40
|
.description('Generate a hook')
|
|
62
41
|
.option('--name <name>', 'The name of the hook')
|
|
63
42
|
.option('--type <type>', 'The hook type (around or regular)')
|
|
64
|
-
.action(
|
|
43
|
+
.action(commandRunner('hook'));
|
|
65
44
|
generate
|
|
66
45
|
.command('connection')
|
|
67
46
|
.description('Add a new database connection')
|
|
68
|
-
.action(
|
|
47
|
+
.action(commandRunner('connection'));
|
|
69
48
|
generate
|
|
70
49
|
.command('authentication')
|
|
71
50
|
.description('Add authentication to the application')
|
|
72
|
-
.action(
|
|
51
|
+
.action(commandRunner('authentication'));
|
|
73
52
|
generate.description(`Run a generator. Currently available: \n ${generate.commands
|
|
74
|
-
.map((cmd) => `${
|
|
53
|
+
.map((cmd) => `${chalk.blue(cmd.name())}: ${cmd.description()} `)
|
|
75
54
|
.join('\n ')}`);
|
|
76
55
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,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athers applications",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.16",
|
|
5
5
|
"homepage": "https://feathersjs.com",
|
|
6
|
-
"main": "lib/",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"type": "module",
|
|
7
8
|
"bin": {
|
|
8
9
|
"feathers": "./bin/feathers"
|
|
9
10
|
},
|
|
@@ -45,44 +46,44 @@
|
|
|
45
46
|
"scripts": {
|
|
46
47
|
"prepublish": "npm run compile",
|
|
47
48
|
"compile": "shx rm -rf lib/ && tsc",
|
|
48
|
-
"mocha": "mocha --timeout 60000 --config ../../.mocharc.json --recursive test/**.test.ts test/**/*.test.ts",
|
|
49
|
+
"mocha": "mocha --timeout 60000 --config ../../.mocharc.json --require tsx --recursive test/**.test.ts test/**/*.test.ts",
|
|
49
50
|
"test": "npm run compile && npm run mocha"
|
|
50
51
|
},
|
|
51
52
|
"publishConfig": {
|
|
52
53
|
"access": "public"
|
|
53
54
|
},
|
|
54
55
|
"dependencies": {
|
|
55
|
-
"@feathersjs/generators": "^5.0.
|
|
56
|
-
"chalk": "^
|
|
56
|
+
"@feathersjs/generators": "^5.0.16",
|
|
57
|
+
"chalk": "^5.3.0",
|
|
57
58
|
"commander": "^11.1.0"
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
60
|
-
"@feathersjs/adapter-commons": "^5.0.
|
|
61
|
-
"@feathersjs/authentication": "^5.0.
|
|
62
|
-
"@feathersjs/authentication-client": "^5.0.
|
|
63
|
-
"@feathersjs/authentication-local": "^5.0.
|
|
64
|
-
"@feathersjs/authentication-oauth": "^5.0.
|
|
65
|
-
"@feathersjs/configuration": "^5.0.
|
|
66
|
-
"@feathersjs/errors": "^5.0.
|
|
67
|
-
"@feathersjs/express": "^5.0.
|
|
68
|
-
"@feathersjs/feathers": "^5.0.
|
|
69
|
-
"@feathersjs/knex": "^5.0.
|
|
70
|
-
"@feathersjs/koa": "^5.0.
|
|
71
|
-
"@feathersjs/mongodb": "^5.0.
|
|
72
|
-
"@feathersjs/rest-client": "^5.0.
|
|
73
|
-
"@feathersjs/schema": "^5.0.
|
|
74
|
-
"@feathersjs/socketio": "^5.0.
|
|
75
|
-
"@feathersjs/transport-commons": "^5.0.
|
|
76
|
-
"@feathersjs/typebox": "^5.0.
|
|
61
|
+
"@feathersjs/adapter-commons": "^5.0.16",
|
|
62
|
+
"@feathersjs/authentication": "^5.0.16",
|
|
63
|
+
"@feathersjs/authentication-client": "^5.0.16",
|
|
64
|
+
"@feathersjs/authentication-local": "^5.0.16",
|
|
65
|
+
"@feathersjs/authentication-oauth": "^5.0.16",
|
|
66
|
+
"@feathersjs/configuration": "^5.0.16",
|
|
67
|
+
"@feathersjs/errors": "^5.0.16",
|
|
68
|
+
"@feathersjs/express": "^5.0.16",
|
|
69
|
+
"@feathersjs/feathers": "^5.0.16",
|
|
70
|
+
"@feathersjs/knex": "^5.0.16",
|
|
71
|
+
"@feathersjs/koa": "^5.0.16",
|
|
72
|
+
"@feathersjs/mongodb": "^5.0.16",
|
|
73
|
+
"@feathersjs/rest-client": "^5.0.16",
|
|
74
|
+
"@feathersjs/schema": "^5.0.16",
|
|
75
|
+
"@feathersjs/socketio": "^5.0.16",
|
|
76
|
+
"@feathersjs/transport-commons": "^5.0.16",
|
|
77
|
+
"@feathersjs/typebox": "^5.0.16",
|
|
77
78
|
"@types/mocha": "^10.0.6",
|
|
78
|
-
"@types/node": "^20.
|
|
79
|
+
"@types/node": "^20.11.5",
|
|
79
80
|
"@types/prettier": "^2.7.3",
|
|
80
|
-
"axios": "^1.6.
|
|
81
|
+
"axios": "^1.6.5",
|
|
81
82
|
"mocha": "^10.2.0",
|
|
82
83
|
"shx": "^0.3.4",
|
|
83
84
|
"ts-node": "^10.9.2",
|
|
84
85
|
"type-fest": "^4.9.0",
|
|
85
86
|
"typescript": "^5.3.3"
|
|
86
87
|
},
|
|
87
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "067e4d939a17df3d8b99b60875834865bf808efe"
|
|
88
89
|
}
|