swaggie 1.7.0 → 1.7.1
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/dist/cli.js +4 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict"; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
3
|
-
var
|
|
3
|
+
var _picocolors = require('picocolors');
|
|
4
4
|
var _commander = require('commander');
|
|
5
5
|
var _nodefs = require('node:fs'); var _nodefs2 = _interopRequireDefault(_nodefs);
|
|
6
6
|
var _nodepath = require('node:path'); var _nodepath2 = _interopRequireDefault(_nodepath);
|
|
@@ -63,8 +63,8 @@ _index.runCodeGenerator.call(void 0, options).then(complete, error);
|
|
|
63
63
|
|
|
64
64
|
function complete([code, opts]) {
|
|
65
65
|
if (opts.out) {
|
|
66
|
-
const from = typeof opts.src === 'string' ? `from ${
|
|
67
|
-
console.info(
|
|
66
|
+
const from = typeof opts.src === 'string' ? `from ${_picocolors.bold.call(void 0, opts.src)} ` : '';
|
|
67
|
+
console.info(_picocolors.cyan.call(void 0, `Api ${from}code generated into ${_picocolors.bold.call(void 0, opts.out)}`));
|
|
68
68
|
} else {
|
|
69
69
|
console.log(code);
|
|
70
70
|
}
|
|
@@ -74,7 +74,7 @@ function complete([code, opts]) {
|
|
|
74
74
|
|
|
75
75
|
function error(e) {
|
|
76
76
|
const msg = e instanceof Error ? e.message : e;
|
|
77
|
-
console.error(
|
|
77
|
+
console.error(_picocolors.red.call(void 0, msg));
|
|
78
78
|
process.exit(1);
|
|
79
79
|
}
|
|
80
80
|
|