@kizunajs/kotlin 2.0.0-beta.2 → 2.0.0-beta.3
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.cjs
CHANGED
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as generateKotlinClient } from "./generator-
|
|
2
|
+
import { t as generateKotlinClient } from "./generator-CWQYbiS9.mjs";
|
|
3
3
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { dirname, resolve } from "node:path";
|
|
5
5
|
import { parseArgs } from "node:util";
|
|
@@ -223,8 +223,8 @@ const mapType = (schema, registry, hint) => {
|
|
|
223
223
|
optional: false
|
|
224
224
|
};
|
|
225
225
|
}
|
|
226
|
-
const { inner, optional } = unwrapOptionalWrappers(schema);
|
|
227
|
-
if (optional) {
|
|
226
|
+
const { inner, optional, nullable } = unwrapOptionalWrappers(schema);
|
|
227
|
+
if (optional || nullable) {
|
|
228
228
|
const innerResult = mapType(inner, registry, hint);
|
|
229
229
|
return {
|
|
230
230
|
expression: innerResult.expression.endsWith("?") ? innerResult.expression : `${innerResult.expression}?`,
|
|
@@ -223,8 +223,8 @@ const mapType = (schema, registry, hint) => {
|
|
|
223
223
|
optional: false
|
|
224
224
|
};
|
|
225
225
|
}
|
|
226
|
-
const { inner, optional } = (0, kizunajs_generator.unwrapOptionalWrappers)(schema);
|
|
227
|
-
if (optional) {
|
|
226
|
+
const { inner, optional, nullable } = (0, kizunajs_generator.unwrapOptionalWrappers)(schema);
|
|
227
|
+
if (optional || nullable) {
|
|
228
228
|
const innerResult = mapType(inner, registry, hint);
|
|
229
229
|
return {
|
|
230
230
|
expression: innerResult.expression.endsWith("?") ? innerResult.expression : `${innerResult.expression}?`,
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_generator = require("./generator-
|
|
2
|
+
const require_generator = require("./generator-DotGXjps.cjs");
|
|
3
3
|
//#region src/client-target.ts
|
|
4
4
|
/**
|
|
5
5
|
* A Kotlin client target for `kizuna.config.ts`.
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kizunajs/kotlin",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.3",
|
|
4
4
|
"description": "Kotlin client generation for Kizuna.js APIs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kizunajs",
|
|
@@ -60,18 +60,18 @@
|
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@kizunajs/cli": "2.0.0-beta.
|
|
63
|
+
"@kizunajs/cli": "2.0.0-beta.3"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"zod": "^4.0.0",
|
|
67
|
-
"kizunajs": "2.0.0-beta.
|
|
67
|
+
"kizunajs": "2.0.0-beta.3"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@types/node": "^22.9.0",
|
|
71
71
|
"tsdown": "^0.21.0",
|
|
72
72
|
"typescript": "^6.0.3",
|
|
73
73
|
"zod": "^4.0.0",
|
|
74
|
-
"kizunajs": "2.0.0-beta.
|
|
74
|
+
"kizunajs": "2.0.0-beta.3"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"build": "tsdown src/index.ts src/cli.ts --format esm,cjs --dts --clean --external kizunajs --external @kizunajs/cli --external zod",
|