@kubb/cli 1.1.5 → 1.1.6

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.cjs CHANGED
@@ -179,7 +179,7 @@ async function importModule(path, cwd) {
179
179
  location = require2.resolve(path);
180
180
  }
181
181
  const module = await import(url.pathToFileURL(location).href);
182
- return module.default;
182
+ return module?.default ?? module;
183
183
  }
184
184
 
185
185
  // src/utils/getPlugins.ts
@@ -364,7 +364,7 @@ ${error?.message}`));
364
364
  }
365
365
 
366
366
  // package.json
367
- var version = "1.1.5";
367
+ var version = "1.1.6";
368
368
 
369
369
  // src/index.ts
370
370
  var moduleName = "kubb";
package/dist/index.js CHANGED
@@ -168,7 +168,7 @@ async function importModule(path, cwd) {
168
168
  location = require2.resolve(path);
169
169
  }
170
170
  const module = await import(pathToFileURL(location).href);
171
- return module.default;
171
+ return module?.default ?? module;
172
172
  }
173
173
 
174
174
  // src/utils/getPlugins.ts
@@ -353,7 +353,7 @@ ${error?.message}`));
353
353
  }
354
354
 
355
355
  // package.json
356
- var version = "1.1.5";
356
+ var version = "1.1.6";
357
357
 
358
358
  // src/index.ts
359
359
  var moduleName = "kubb";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/cli",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Generator cli",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,20 +43,20 @@
43
43
  "yaml": "^2.3.1",
44
44
  "@swc/core": "^1.3.62",
45
45
  "pretty-error": "^4.0.0",
46
- "@kubb/core": "1.1.5"
46
+ "@kubb/core": "1.1.6"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/node": "^20.2.5",
50
50
  "tsup": "^6.7.0",
51
51
  "typescript": "^5.1.3",
52
- "@kubb/swagger": "1.1.5"
52
+ "@kubb/swagger": "1.1.6"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public",
56
56
  "registry": "https://registry.npmjs.org/"
57
57
  },
58
58
  "engines": {
59
- "node": ">=16",
59
+ "node": ">=18",
60
60
  "pnpm": ">=8"
61
61
  },
62
62
  "scripts": {
@@ -13,7 +13,7 @@ const SLASHES = new Set(['/', '\\'])
13
13
  * @param {string} directory The directory to check.
14
14
  * @returns {string} The normalized directory.
15
15
  */
16
- function normalizeDirectory(directory: string) {
16
+ export function normalizeDirectory(directory: string) {
17
17
  if (!SLASHES.has(directory[directory.length - 1])) {
18
18
  return `${directory}/`
19
19
  }
@@ -31,5 +31,5 @@ export async function importModule(path: string, cwd?: string) {
31
31
 
32
32
  const module = await import(pathToFileURL(location).href)
33
33
 
34
- return module.default
34
+ return module?.default ?? module
35
35
  }
@@ -0,0 +1,3 @@
1
+ module.exports = function noop() {
2
+ return 'cjs-noop'
3
+ }
@@ -0,0 +1,3 @@
1
+ export function noop() {
2
+ return 'js-noop'
3
+ }