@kubb/cli 0.35.0 → 0.36.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/index.js +7 -1
- package/dist/index.mjs +7 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var module$1 = require('module');
|
|
4
5
|
var commander = require('commander');
|
|
5
6
|
var pc3 = require('picocolors');
|
|
6
7
|
var ora = require('ora');
|
|
@@ -10,6 +11,7 @@ var core = require('@kubb/core');
|
|
|
10
11
|
var cosmiconfig = require('cosmiconfig');
|
|
11
12
|
var cosmiconfigTypescriptLoader = require('cosmiconfig-typescript-loader');
|
|
12
13
|
|
|
14
|
+
module$1.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('out.js', document.baseURI).href)));
|
|
13
15
|
async function run({ config, options, spinner: spinner2 }) {
|
|
14
16
|
const logger = {
|
|
15
17
|
log(message, logLevel) {
|
|
@@ -143,7 +145,7 @@ var getCosmiConfig = async (moduleName2, config) => {
|
|
|
143
145
|
};
|
|
144
146
|
|
|
145
147
|
// package.json
|
|
146
|
-
var version = "0.
|
|
148
|
+
var version = "0.36.1";
|
|
147
149
|
|
|
148
150
|
// src/index.ts
|
|
149
151
|
var moduleName = "kubb";
|
|
@@ -160,6 +162,10 @@ var program = new commander.Command(moduleName).description("Kubb").action(async
|
|
|
160
162
|
spinner.succeed("Config loaded");
|
|
161
163
|
if (options.watch) {
|
|
162
164
|
const config = await getConfig(result, options);
|
|
165
|
+
if (typeof config.input === "string") {
|
|
166
|
+
spinner.warn(pc3.red("Input as a string cannot be used together with watch "));
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
163
169
|
startWatcher(
|
|
164
170
|
async (paths) => {
|
|
165
171
|
await run({ config, spinner, options });
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
2
3
|
import { Command, Option } from 'commander';
|
|
3
4
|
import pc3 from 'picocolors';
|
|
4
5
|
import ora from 'ora';
|
|
@@ -8,6 +9,7 @@ import { build, isPromise } from '@kubb/core';
|
|
|
8
9
|
import { cosmiconfig, defaultLoaders } from 'cosmiconfig';
|
|
9
10
|
import { TypeScriptLoader } from 'cosmiconfig-typescript-loader';
|
|
10
11
|
|
|
12
|
+
createRequire(import.meta.url);
|
|
11
13
|
async function run({ config, options, spinner: spinner2 }) {
|
|
12
14
|
const logger = {
|
|
13
15
|
log(message, logLevel) {
|
|
@@ -141,7 +143,7 @@ var getCosmiConfig = async (moduleName2, config) => {
|
|
|
141
143
|
};
|
|
142
144
|
|
|
143
145
|
// package.json
|
|
144
|
-
var version = "0.
|
|
146
|
+
var version = "0.36.1";
|
|
145
147
|
|
|
146
148
|
// src/index.ts
|
|
147
149
|
var moduleName = "kubb";
|
|
@@ -158,6 +160,10 @@ var program = new Command(moduleName).description("Kubb").action(async (options)
|
|
|
158
160
|
spinner.succeed("Config loaded");
|
|
159
161
|
if (options.watch) {
|
|
160
162
|
const config = await getConfig(result, options);
|
|
163
|
+
if (typeof config.input === "string") {
|
|
164
|
+
spinner.warn(pc3.red("Input as a string cannot be used together with watch "));
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
161
167
|
startWatcher(
|
|
162
168
|
async (paths) => {
|
|
163
169
|
await run({ config, spinner, options });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.1",
|
|
4
4
|
"description": "Generator cli",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"!/**/__tests__/**"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kubb/core": "0.
|
|
23
|
+
"@kubb/core": "0.36.1",
|
|
24
24
|
"chokidar": "^3.5.3",
|
|
25
25
|
"commander": "^9.4.1",
|
|
26
26
|
"cosmiconfig": "^8.0.0",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"execa": "^6.1.0",
|
|
29
29
|
"ora": "^6.1.2",
|
|
30
30
|
"picocolors": "^1.0.0",
|
|
31
|
-
"string-argv": "^0.3.1"
|
|
31
|
+
"string-argv": "^0.3.1",
|
|
32
|
+
"ts-node": "^10.9.1"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"@types/node": "^18.11.18",
|
|
35
|
-
"ts-node": "^10.9.1",
|
|
36
36
|
"tsup": "^6.5.0",
|
|
37
37
|
"typescript": "^4.9.4"
|
|
38
38
|
},
|