@feathersjs/cli 5.0.14 → 5.0.15

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 CHANGED
@@ -3,6 +3,12 @@
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.15](https://github.com/feathersjs/feathers/compare/v5.0.14...v5.0.15) (2024-01-22)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **generators:** Move generators and CLI to featherscloud/pinion ([#3386](https://github.com/feathersjs/feathers/issues/3386)) ([eb87c99](https://github.com/feathersjs/feathers/commit/eb87c9922db56c5610e5b808f3ffe033c830e2b2))
11
+
6
12
  ## [5.0.14](https://github.com/feathersjs/feathers/compare/v5.0.13...v5.0.14) (2024-01-05)
7
13
 
8
14
  **Note:** Version bump only for package @feathersjs/cli
package/bin/feathers CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict'
3
3
 
4
- const { program } = require('../lib')
4
+ import { program } from '../lib/index.js'
5
5
 
6
6
  program.parse()
package/lib/index.js CHANGED
@@ -1,76 +1,55 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
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 (0, generators_1.generator)(ctx)
33
- .then((0, generators_1.runGenerator)(folder, name, 'index'))
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: ${chalk_1.default.white(error.message)}`);
16
+ logger.error(`Error: ${chalk.white(error.message)}`);
37
17
  });
38
18
  };
39
- exports.commandRunner = commandRunner;
40
- exports.program = new commander_1.Command();
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(generators_1.version)
23
+ .version(version)
45
24
  .showHelpAfterError();
46
- const generate = exports.program.command('generate').alias('g');
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((0, exports.commandRunner)('app'));
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((0, exports.commandRunner)('service'));
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((0, exports.commandRunner)('hook'));
43
+ .action(commandRunner('hook'));
65
44
  generate
66
45
  .command('connection')
67
46
  .description('Add a new database connection')
68
- .action((0, exports.commandRunner)('connection'));
47
+ .action(commandRunner('connection'));
69
48
  generate
70
49
  .command('authentication')
71
50
  .description('Add authentication to the application')
72
- .action((0, exports.commandRunner)('authentication'));
51
+ .action(commandRunner('authentication'));
73
52
  generate.description(`Run a generator. Currently available: \n ${generate.commands
74
- .map((cmd) => `${chalk_1.default.blue(cmd.name())}: ${cmd.description()} `)
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":";;;;;;;;;;;;;;;;;;;;AAAA,kDAAyB;AAMhB,gBANF,eAAK,CAME;AALd,yCAAmC;AACnC,+BAA8B;AAC9B,uDAA0G;AAE1G,4CAAyB;AAGlB,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,EAAE,OAAY,EAAE,EAAE;IACpE,MAAM,MAAM,GAAG,IAAA,cAAO,EAAC,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAA;IACjE,MAAM,GAAG,GAAG,IAAA,uBAAU,EAAsB;QAC1C,GAAG,OAAO;KACX,CAAC,CAAA;IAEF,MAAM,IAAA,sBAAS,EAAC,GAAG,CAAC;SACjB,IAAI,CAAC,IAAA,yBAAY,EAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;SACzC,KAAK,CAAC,CAAC,KAAK,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;KACrB,WAAW,CAAC,+BAA+B,CAAC;KAC5C,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAA;AAEtC,QAAQ;KACL,OAAO,CAAC,gBAAgB,CAAC;KACzB,WAAW,CAAC,uCAAuC,CAAC;KACpD,MAAM,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAA;AAE1C,QAAQ,CAAC,WAAW,CAClB,6CAA6C,QAAQ,CAAC,QAAQ;KAC3D,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC;KAChE,IAAI,CAAC,MAAM,CAAC,EAAE,CAClB,CAAA"}
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@feathersjs/cli",
3
3
  "description": "The command line interface for creating Feathers applications",
4
- "version": "5.0.14",
4
+ "version": "5.0.15",
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.14",
56
- "chalk": "^4.0.1",
56
+ "@feathersjs/generators": "^5.0.15",
57
+ "chalk": "^5.3.0",
57
58
  "commander": "^11.1.0"
58
59
  },
59
60
  "devDependencies": {
60
- "@feathersjs/adapter-commons": "^5.0.14",
61
- "@feathersjs/authentication": "^5.0.14",
62
- "@feathersjs/authentication-client": "^5.0.14",
63
- "@feathersjs/authentication-local": "^5.0.14",
64
- "@feathersjs/authentication-oauth": "^5.0.14",
65
- "@feathersjs/configuration": "^5.0.14",
66
- "@feathersjs/errors": "^5.0.14",
67
- "@feathersjs/express": "^5.0.14",
68
- "@feathersjs/feathers": "^5.0.14",
69
- "@feathersjs/knex": "^5.0.14",
70
- "@feathersjs/koa": "^5.0.14",
71
- "@feathersjs/mongodb": "^5.0.14",
72
- "@feathersjs/rest-client": "^5.0.14",
73
- "@feathersjs/schema": "^5.0.14",
74
- "@feathersjs/socketio": "^5.0.14",
75
- "@feathersjs/transport-commons": "^5.0.14",
76
- "@feathersjs/typebox": "^5.0.14",
61
+ "@feathersjs/adapter-commons": "^5.0.15",
62
+ "@feathersjs/authentication": "^5.0.15",
63
+ "@feathersjs/authentication-client": "^5.0.15",
64
+ "@feathersjs/authentication-local": "^5.0.15",
65
+ "@feathersjs/authentication-oauth": "^5.0.15",
66
+ "@feathersjs/configuration": "^5.0.15",
67
+ "@feathersjs/errors": "^5.0.15",
68
+ "@feathersjs/express": "^5.0.15",
69
+ "@feathersjs/feathers": "^5.0.15",
70
+ "@feathersjs/knex": "^5.0.15",
71
+ "@feathersjs/koa": "^5.0.15",
72
+ "@feathersjs/mongodb": "^5.0.15",
73
+ "@feathersjs/rest-client": "^5.0.15",
74
+ "@feathersjs/schema": "^5.0.15",
75
+ "@feathersjs/socketio": "^5.0.15",
76
+ "@feathersjs/transport-commons": "^5.0.15",
77
+ "@feathersjs/typebox": "^5.0.15",
77
78
  "@types/mocha": "^10.0.6",
78
- "@types/node": "^20.10.6",
79
+ "@types/node": "^20.11.5",
79
80
  "@types/prettier": "^2.7.3",
80
- "axios": "^1.6.3",
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": "43e752653271566e8a397a8b82cd6e45fcbc6768"
88
+ "gitHead": "a39910e534c5685aa9093b395ca1625ee8b187a6"
88
89
  }