@kubb/cli 0.56.2 → 0.56.4

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -13
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -67,7 +67,7 @@ ${err?.message}`);
67
67
  }
68
68
  return true;
69
69
  }
70
- var startWatcher = async (cb, options) => {
70
+ async function startWatcher(cb, options) {
71
71
  const { spinner: spinner2, path } = options;
72
72
  const { watch } = await import('chokidar');
73
73
  const ignored = ["**/{.git,node_modules}/**"];
@@ -84,18 +84,18 @@ var startWatcher = async (cb, options) => {
84
84
  spinner2.warn(pc3.red(e));
85
85
  }
86
86
  });
87
- };
88
- var isJSONPlugins = (plugins) => {
87
+ }
88
+ function isJSONPlugins(plugins) {
89
89
  return !!plugins?.some((plugin) => {
90
90
  return typeof plugin?.[0] === "string";
91
91
  });
92
- };
93
- var importPlugin = async (name, options) => {
92
+ }
93
+ async function importPlugin(name, options) {
94
94
  const importer = new ModuleImporter(process.cwd());
95
95
  const importedPlugin = process.env.NODE_ENV === "test" ? await import(name) : await importer.import(name);
96
96
  return importedPlugin?.default?.default ? importedPlugin.default.default(options) : importedPlugin.default(options);
97
- };
98
- var getPlugins = (plugins) => {
97
+ }
98
+ function getPlugins(plugins) {
99
99
  if (isJSONPlugins(plugins)) {
100
100
  const promises = plugins.map(async (plugin) => {
101
101
  const [name, options = {}] = plugin;
@@ -104,10 +104,10 @@ var getPlugins = (plugins) => {
104
104
  return Promise.all(promises);
105
105
  }
106
106
  return Promise.resolve(plugins);
107
- };
107
+ }
108
108
 
109
109
  // src/utils/getConfig.ts
110
- var getConfig = async (result, options) => {
110
+ async function getConfig(result, options) {
111
111
  const config = result?.config;
112
112
  let kubbUserConfig = Promise.resolve(config);
113
113
  if (typeof config === "function") {
@@ -123,8 +123,8 @@ var getConfig = async (result, options) => {
123
123
  plugins: JSONConfig.plugins ? await getPlugins(JSONConfig.plugins) : void 0
124
124
  };
125
125
  return JSONConfig;
126
- };
127
- var getCosmiConfig = async (moduleName2, config) => {
126
+ }
127
+ async function getCosmiConfig(moduleName2, config) {
128
128
  const explorer = cosmiconfig(moduleName2, {
129
129
  cache: false,
130
130
  searchPlaces: [
@@ -153,10 +153,10 @@ var getCosmiConfig = async (moduleName2, config) => {
153
153
  throw new Error("Config not defined, create a kubb.config.js or pass through your config with the option --config");
154
154
  }
155
155
  return result;
156
- };
156
+ }
157
157
 
158
158
  // package.json
159
- var version = "0.56.2";
159
+ var version = "0.56.4";
160
160
 
161
161
  // src/index.ts
162
162
  var moduleName = "kubb";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/cli",
3
- "version": "0.56.2",
3
+ "version": "0.56.4",
4
4
  "description": "Generator cli",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,11 +18,11 @@
18
18
  ],
19
19
  "sideEffects": false,
20
20
  "type": "module",
21
- "main": "dist/index.mjs",
22
- "module": "dist/index.mjs",
21
+ "main": "dist/index.js",
22
+ "module": "dist/index.js",
23
23
  "types": "./dist/index.d.ts",
24
24
  "bin": {
25
- "kubb": "dist/index.mjs"
25
+ "kubb": "dist/index.js"
26
26
  },
27
27
  "preferGlobal": true,
28
28
  "files": [
@@ -32,7 +32,7 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "@humanwhocodes/module-importer": "^1.0.1",
35
- "@kubb/core": "0.56.2",
35
+ "@kubb/core": "0.56.4",
36
36
  "chokidar": "^3.5.3",
37
37
  "commander": "^10.0.0",
38
38
  "cosmiconfig": "^8.1.0",