@powerlines/plugin-prisma 0.4.13 → 0.4.14
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/api/client/client.gen.mjs +1 -2
- package/dist/api/client/utils.gen.mjs +1 -2
- package/dist/api/client.gen.mjs +1 -2
- package/dist/api/core/auth.gen.mjs +1 -2
- package/dist/api/core/bodySerializer.gen.mjs +1 -2
- package/dist/api/core/params.gen.mjs +1 -2
- package/dist/api/core/pathSerializer.gen.mjs +1 -2
- package/dist/api/core/queryKeySerializer.gen.mjs +1 -2
- package/dist/api/core/serverSentEvents.gen.mjs +1 -2
- package/dist/api/core/utils.gen.mjs +1 -2
- package/dist/api/sdk.gen.mjs +1 -2
- package/dist/helpers/get-schema.mjs +1 -2
- package/dist/helpers/prisma-postgres.mjs +1 -2
- package/dist/helpers/schema-creator.mjs +1 -2
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +3 -4
- package/dist/node_modules/.pnpm/{@stryke_string-format@0.17.1 → @stryke_string-format@0.17.2}/node_modules/@stryke/string-format/dist/constant-case.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_string-format@0.17.1 → @stryke_string-format@0.17.2}/node_modules/@stryke/string-format/dist/constant-case.mjs +2 -3
- package/dist/node_modules/.pnpm/{@stryke_string-format@0.17.1 → @stryke_string-format@0.17.2}/node_modules/@stryke/string-format/dist/get-words.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_string-format@0.17.1 → @stryke_string-format@0.17.2}/node_modules/@stryke/string-format/dist/get-words.mjs +2 -3
- package/dist/node_modules/.pnpm/{@stryke_string-format@0.17.1 → @stryke_string-format@0.17.2}/node_modules/@stryke/string-format/dist/kebab-case.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_string-format@0.17.1 → @stryke_string-format@0.17.2}/node_modules/@stryke/string-format/dist/kebab-case.mjs +2 -3
- package/dist/node_modules/.pnpm/{@stryke_string-format@0.17.1 → @stryke_string-format@0.17.2}/node_modules/@stryke/string-format/dist/snake-case.cjs +1 -1
- package/dist/node_modules/.pnpm/{@stryke_string-format@0.17.1 → @stryke_string-format@0.17.2}/node_modules/@stryke/string-format/dist/snake-case.mjs +2 -3
- package/package.json +11 -11
- package/dist/api/client/client.gen.d.cts +0 -7
- package/dist/api/client/client.gen.d.cts.map +0 -1
- package/dist/api/client/client.gen.d.mts +0 -7
- package/dist/api/client/client.gen.d.mts.map +0 -1
- package/dist/api/client/client.gen.mjs.map +0 -1
- package/dist/api/client/index.d.cts +0 -8
- package/dist/api/client/index.d.mts +0 -8
- package/dist/api/client/types.gen.d.cts +0 -131
- package/dist/api/client/types.gen.d.cts.map +0 -1
- package/dist/api/client/types.gen.d.mts +0 -131
- package/dist/api/client/types.gen.d.mts.map +0 -1
- package/dist/api/client/utils.gen.d.cts +0 -44
- package/dist/api/client/utils.gen.d.cts.map +0 -1
- package/dist/api/client/utils.gen.d.mts +0 -44
- package/dist/api/client/utils.gen.d.mts.map +0 -1
- package/dist/api/client/utils.gen.mjs.map +0 -1
- package/dist/api/client.gen.d.cts +0 -19
- package/dist/api/client.gen.d.cts.map +0 -1
- package/dist/api/client.gen.d.mts +0 -19
- package/dist/api/client.gen.d.mts.map +0 -1
- package/dist/api/client.gen.mjs.map +0 -1
- package/dist/api/core/auth.gen.d.cts +0 -24
- package/dist/api/core/auth.gen.d.cts.map +0 -1
- package/dist/api/core/auth.gen.d.mts +0 -24
- package/dist/api/core/auth.gen.d.mts.map +0 -1
- package/dist/api/core/auth.gen.mjs.map +0 -1
- package/dist/api/core/bodySerializer.gen.d.cts +0 -32
- package/dist/api/core/bodySerializer.gen.d.cts.map +0 -1
- package/dist/api/core/bodySerializer.gen.d.mts +0 -32
- package/dist/api/core/bodySerializer.gen.d.mts.map +0 -1
- package/dist/api/core/bodySerializer.gen.mjs.map +0 -1
- package/dist/api/core/params.gen.d.cts +0 -49
- package/dist/api/core/params.gen.d.cts.map +0 -1
- package/dist/api/core/params.gen.d.mts +0 -49
- package/dist/api/core/params.gen.d.mts.map +0 -1
- package/dist/api/core/params.gen.mjs.map +0 -1
- package/dist/api/core/pathSerializer.gen.d.cts +0 -56
- package/dist/api/core/pathSerializer.gen.d.cts.map +0 -1
- package/dist/api/core/pathSerializer.gen.d.mts +0 -56
- package/dist/api/core/pathSerializer.gen.d.mts.map +0 -1
- package/dist/api/core/pathSerializer.gen.mjs.map +0 -1
- package/dist/api/core/queryKeySerializer.gen.d.cts +0 -23
- package/dist/api/core/queryKeySerializer.gen.d.cts.map +0 -1
- package/dist/api/core/queryKeySerializer.gen.d.mts +0 -23
- package/dist/api/core/queryKeySerializer.gen.d.mts.map +0 -1
- package/dist/api/core/queryKeySerializer.gen.mjs.map +0 -1
- package/dist/api/core/serverSentEvents.gen.d.cts +0 -91
- package/dist/api/core/serverSentEvents.gen.d.cts.map +0 -1
- package/dist/api/core/serverSentEvents.gen.d.mts +0 -91
- package/dist/api/core/serverSentEvents.gen.d.mts.map +0 -1
- package/dist/api/core/serverSentEvents.gen.mjs.map +0 -1
- package/dist/api/core/types.gen.d.cts +0 -80
- package/dist/api/core/types.gen.d.cts.map +0 -1
- package/dist/api/core/types.gen.d.mts +0 -80
- package/dist/api/core/types.gen.d.mts.map +0 -1
- package/dist/api/core/utils.gen.d.cts +0 -34
- package/dist/api/core/utils.gen.d.cts.map +0 -1
- package/dist/api/core/utils.gen.d.mts +0 -34
- package/dist/api/core/utils.gen.d.mts.map +0 -1
- package/dist/api/core/utils.gen.mjs.map +0 -1
- package/dist/api/sdk.gen.d.cts +0 -226
- package/dist/api/sdk.gen.d.cts.map +0 -1
- package/dist/api/sdk.gen.d.mts +0 -226
- package/dist/api/sdk.gen.d.mts.map +0 -1
- package/dist/api/sdk.gen.mjs.map +0 -1
- package/dist/api/types.gen.d.cts +0 -2369
- package/dist/api/types.gen.d.cts.map +0 -1
- package/dist/api/types.gen.d.mts +0 -2369
- package/dist/api/types.gen.d.mts.map +0 -1
- package/dist/helpers/get-schema.d.cts +0 -14
- package/dist/helpers/get-schema.d.cts.map +0 -1
- package/dist/helpers/get-schema.d.mts +0 -14
- package/dist/helpers/get-schema.d.mts.map +0 -1
- package/dist/helpers/get-schema.mjs.map +0 -1
- package/dist/helpers/index.d.cts +0 -4
- package/dist/helpers/index.d.mts +0 -4
- package/dist/helpers/prisma-postgres.d.cts +0 -15
- package/dist/helpers/prisma-postgres.d.cts.map +0 -1
- package/dist/helpers/prisma-postgres.d.mts +0 -15
- package/dist/helpers/prisma-postgres.d.mts.map +0 -1
- package/dist/helpers/prisma-postgres.mjs.map +0 -1
- package/dist/helpers/schema-creator.d.cts +0 -21
- package/dist/helpers/schema-creator.d.cts.map +0 -1
- package/dist/helpers/schema-creator.d.mts +0 -21
- package/dist/helpers/schema-creator.d.mts.map +0 -1
- package/dist/helpers/schema-creator.mjs.map +0 -1
- package/dist/index.d.cts +0 -21
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts +0 -21
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.1/node_modules/@stryke/string-format/dist/constant-case.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.1/node_modules/@stryke/string-format/dist/get-words.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.1/node_modules/@stryke/string-format/dist/kebab-case.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.1/node_modules/@stryke/string-format/dist/snake-case.mjs.map +0 -1
- package/dist/types/index.d.cts +0 -3
- package/dist/types/index.d.mts +0 -3
- package/dist/types/plugin.d.cts +0 -93
- package/dist/types/plugin.d.cts.map +0 -1
- package/dist/types/plugin.d.mts +0 -93
- package/dist/types/plugin.d.mts.map +0 -1
- package/dist/types/prisma.d.cts +0 -85
- package/dist/types/prisma.d.cts.map +0 -1
- package/dist/types/prisma.d.mts +0 -85
- package/dist/types/prisma.d.mts.map +0 -1
|
@@ -177,5 +177,4 @@ const createConfig = (override = {}) => ({
|
|
|
177
177
|
});
|
|
178
178
|
|
|
179
179
|
//#endregion
|
|
180
|
-
export { buildUrl, createConfig, createInterceptors, createQuerySerializer, getParseAs, mergeConfigs, mergeHeaders, setAuthParams };
|
|
181
|
-
//# sourceMappingURL=utils.gen.mjs.map
|
|
180
|
+
export { buildUrl, createConfig, createInterceptors, createQuerySerializer, getParseAs, mergeConfigs, mergeHeaders, setAuthParams };
|
package/dist/api/client.gen.mjs
CHANGED
|
@@ -29,5 +29,4 @@ const urlSearchParamsBodySerializer = { bodySerializer: (body) => {
|
|
|
29
29
|
} };
|
|
30
30
|
|
|
31
31
|
//#endregion
|
|
32
|
-
export { formDataBodySerializer, jsonBodySerializer, urlSearchParamsBodySerializer };
|
|
33
|
-
//# sourceMappingURL=bodySerializer.gen.mjs.map
|
|
32
|
+
export { formDataBodySerializer, jsonBodySerializer, urlSearchParamsBodySerializer };
|
|
@@ -78,5 +78,4 @@ const serializeObjectParam = ({ allowReserved, explode, name, style, value, valu
|
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
//#endregion
|
|
81
|
-
export { separatorArrayExplode, separatorArrayNoExplode, separatorObjectExplode, serializeArrayParam, serializeObjectParam, serializePrimitiveParam };
|
|
82
|
-
//# sourceMappingURL=pathSerializer.gen.mjs.map
|
|
81
|
+
export { separatorArrayExplode, separatorArrayNoExplode, separatorObjectExplode, serializeArrayParam, serializeObjectParam, serializePrimitiveParam };
|
|
@@ -60,5 +60,4 @@ const serializeQueryKeyValue = (value) => {
|
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
//#endregion
|
|
63
|
-
export { queryKeyJsonReplacer, serializeQueryKeyValue, stringifyToJsonValue };
|
|
64
|
-
//# sourceMappingURL=queryKeySerializer.gen.mjs.map
|
|
63
|
+
export { queryKeyJsonReplacer, serializeQueryKeyValue, stringifyToJsonValue };
|
|
@@ -75,5 +75,4 @@ function getValidRequestBody(options) {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
//#endregion
|
|
78
|
-
export { PATH_PARAM_RE, defaultPathSerializer, getUrl, getValidRequestBody };
|
|
79
|
-
//# sourceMappingURL=utils.gen.mjs.map
|
|
78
|
+
export { PATH_PARAM_RE, defaultPathSerializer, getUrl, getValidRequestBody };
|
package/dist/api/sdk.gen.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
3
|
-
const require_constant_case = require('./node_modules/.pnpm/@stryke_string-format@0.17.
|
|
4
|
-
const require_kebab_case = require('./node_modules/.pnpm/@stryke_string-format@0.17.
|
|
3
|
+
const require_constant_case = require('./node_modules/.pnpm/@stryke_string-format@0.17.2/node_modules/@stryke/string-format/dist/constant-case.cjs');
|
|
4
|
+
const require_kebab_case = require('./node_modules/.pnpm/@stryke_string-format@0.17.2/node_modules/@stryke/string-format/dist/kebab-case.cjs');
|
|
5
5
|
const require_helpers_get_schema = require('./helpers/get-schema.cjs');
|
|
6
6
|
const require_helpers_schema_creator = require('./helpers/schema-creator.cjs');
|
|
7
7
|
let __pulumi_prisma_postgres = require("@pulumi/prisma-postgres");
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { constantCase } from "./node_modules/.pnpm/@stryke_string-format@0.17.
|
|
2
|
-
import { kebabCase } from "./node_modules/.pnpm/@stryke_string-format@0.17.
|
|
1
|
+
import { constantCase } from "./node_modules/.pnpm/@stryke_string-format@0.17.2/node_modules/@stryke/string-format/dist/constant-case.mjs";
|
|
2
|
+
import { kebabCase } from "./node_modules/.pnpm/@stryke_string-format@0.17.2/node_modules/@stryke/string-format/dist/kebab-case.mjs";
|
|
3
3
|
import { getSchema } from "./helpers/get-schema.mjs";
|
|
4
4
|
import { PrismaSchemaCreator } from "./helpers/schema-creator.mjs";
|
|
5
5
|
import * as prismaPostgres from "@pulumi/prisma-postgres";
|
|
@@ -114,5 +114,4 @@ const plugin = (options = {}) => {
|
|
|
114
114
|
var src_default = plugin;
|
|
115
115
|
|
|
116
116
|
//#endregion
|
|
117
|
-
export { src_default as default, plugin };
|
|
118
|
-
//# sourceMappingURL=index.mjs.map
|
|
117
|
+
export { src_default as default, plugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_get_words = require('./get-words.cjs');
|
|
2
2
|
const require_snake_case = require('./snake-case.cjs');
|
|
3
3
|
|
|
4
|
-
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.
|
|
4
|
+
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.2/node_modules/@stryke/string-format/dist/constant-case.mjs
|
|
5
5
|
/**
|
|
6
6
|
* Check if the input string is in constant case.
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getWords } from "./get-words.mjs";
|
|
2
2
|
import { isSnakeCase } from "./snake-case.mjs";
|
|
3
3
|
|
|
4
|
-
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.
|
|
4
|
+
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.2/node_modules/@stryke/string-format/dist/constant-case.mjs
|
|
5
5
|
/**
|
|
6
6
|
* Check if the input string is in constant case.
|
|
7
7
|
*
|
|
@@ -28,5 +28,4 @@ function constantCase(input) {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
//#endregion
|
|
31
|
-
export { constantCase };
|
|
32
|
-
//# sourceMappingURL=constant-case.mjs.map
|
|
31
|
+
export { constantCase };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.2/node_modules/@stryke/string-format/dist/get-words.mjs
|
|
3
3
|
/**
|
|
4
4
|
* Regular expression pattern to split strings into words for various case conversions
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.2/node_modules/@stryke/string-format/dist/get-words.mjs
|
|
2
2
|
/**
|
|
3
3
|
* Regular expression pattern to split strings into words for various case conversions
|
|
4
4
|
*
|
|
@@ -34,5 +34,4 @@ function getWords(str, options = {}) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
|
-
export { getWords };
|
|
38
|
-
//# sourceMappingURL=get-words.mjs.map
|
|
37
|
+
export { getWords };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_get_words = require('./get-words.cjs');
|
|
2
2
|
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.2/node_modules/@stryke/string-format/dist/kebab-case.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Check if the input string is in kebab case.
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getWords } from "./get-words.mjs";
|
|
2
2
|
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.2/node_modules/@stryke/string-format/dist/kebab-case.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Check if the input string is in kebab case.
|
|
6
6
|
*
|
|
@@ -30,5 +30,4 @@ function kebabCase(input) {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
//#endregion
|
|
33
|
-
export { kebabCase };
|
|
34
|
-
//# sourceMappingURL=kebab-case.mjs.map
|
|
33
|
+
export { kebabCase };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.2/node_modules/@stryke/string-format/dist/snake-case.mjs
|
|
3
3
|
/**
|
|
4
4
|
* Check if the input string is in snake case.
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.2/node_modules/@stryke/string-format/dist/snake-case.mjs
|
|
2
2
|
/**
|
|
3
3
|
* Check if the input string is in snake case.
|
|
4
4
|
*
|
|
@@ -13,5 +13,4 @@ function isSnakeCase(input) {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
16
|
-
export { isSnakeCase };
|
|
17
|
-
//# sourceMappingURL=snake-case.mjs.map
|
|
16
|
+
export { isSnakeCase };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-prisma",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Powerlines plugin to generate project code and a Prisma client from a Prisma schema (PSL).",
|
|
6
6
|
"keywords": ["prisma", "powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -370,26 +370,26 @@
|
|
|
370
370
|
"typings": "dist/index.d.mts",
|
|
371
371
|
"files": ["dist/**/*"],
|
|
372
372
|
"dependencies": {
|
|
373
|
-
"@powerlines/plugin-pulumi": "^0.5.
|
|
373
|
+
"@powerlines/plugin-pulumi": "^0.5.13",
|
|
374
374
|
"@prisma/get-platform": "^6.19.2",
|
|
375
375
|
"@prisma/prisma-schema-wasm": "6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773",
|
|
376
|
-
"@stryke/cli": "^0.13.
|
|
377
|
-
"@stryke/fs": "^0.33.
|
|
378
|
-
"@stryke/path": "^0.26.
|
|
379
|
-
"@stryke/type-checks": "^0.5.
|
|
380
|
-
"@stryke/types": "^0.10.
|
|
376
|
+
"@stryke/cli": "^0.13.28",
|
|
377
|
+
"@stryke/fs": "^0.33.56",
|
|
378
|
+
"@stryke/path": "^0.26.18",
|
|
379
|
+
"@stryke/type-checks": "^0.5.37",
|
|
380
|
+
"@stryke/types": "^0.10.51",
|
|
381
381
|
"defu": "^6.1.4",
|
|
382
382
|
"fp-ts": "^2.16.11",
|
|
383
383
|
"jiti": "^2.6.1",
|
|
384
|
-
"powerlines": "^0.40.
|
|
384
|
+
"powerlines": "^0.40.19",
|
|
385
385
|
"prisma-util": "^2.1.1",
|
|
386
386
|
"ts-pattern": "^5.9.0"
|
|
387
387
|
},
|
|
388
388
|
"devDependencies": {
|
|
389
389
|
"@pulumi/pulumi": "^3.225.1",
|
|
390
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
391
|
-
"@types/node": "^25.
|
|
390
|
+
"@powerlines/plugin-plugin": "^0.12.283",
|
|
391
|
+
"@types/node": "^25.4.0"
|
|
392
392
|
},
|
|
393
393
|
"publishConfig": { "access": "public" },
|
|
394
|
-
"gitHead": "
|
|
394
|
+
"gitHead": "7496a546473274494be487ebc33cf267ed5cd1f0"
|
|
395
395
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.gen.d.cts","names":[],"sources":["../../../src/api/client/client.gen.ts"],"sourcesContent":[],"mappings":";;;cA0Ba,wBAAwB,WAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.gen.d.mts","names":[],"sources":["../../../src/api/client/client.gen.ts"],"sourcesContent":[],"mappings":";;;cA0Ba,wBAAwB,WAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.gen.mjs","names":["config","request: Client['request']","requestInit: ReqInit","request","response: Response","error","finalError","emptyData: any","data: any","jsonError: unknown","url"],"sources":["../../../src/api/client/client.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type {\n Client,\n Config,\n RequestOptions,\n ResolvedRequestOptions,\n} from './types.gen';\nimport {\n buildUrl,\n createConfig,\n createInterceptors,\n getParseAs,\n mergeConfigs,\n mergeHeaders,\n setAuthParams,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n body?: any;\n headers: ReturnType<typeof mergeHeaders>;\n};\n\nexport const createClient = (config: Config = {}): Client => {\n let _config = mergeConfigs(createConfig(), config);\n\n const getConfig = (): Config => ({ ..._config });\n\n const setConfig = (config: Config): Config => {\n _config = mergeConfigs(_config, config);\n return getConfig();\n };\n\n const interceptors = createInterceptors<\n Request,\n Response,\n unknown,\n ResolvedRequestOptions\n >();\n\n const beforeRequest = async (options: RequestOptions) => {\n const opts = {\n ..._config,\n ...options,\n fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n headers: mergeHeaders(_config.headers, options.headers),\n serializedBody: undefined,\n };\n\n if (opts.security) {\n await setAuthParams({\n ...opts,\n security: opts.security,\n });\n }\n\n if (opts.requestValidator) {\n await opts.requestValidator(opts);\n }\n\n if (opts.body !== undefined && opts.bodySerializer) {\n opts.serializedBody = opts.bodySerializer(opts.body);\n }\n\n // remove Content-Type header if body is empty to avoid sending invalid requests\n if (opts.body === undefined || opts.serializedBody === '') {\n opts.headers.delete('Content-Type');\n }\n\n const url = buildUrl(opts);\n\n return { opts, url };\n };\n\n const request: Client['request'] = async (options) => {\n // @ts-expect-error\n const { opts, url } = await beforeRequest(options);\n const requestInit: ReqInit = {\n redirect: 'follow',\n ...opts,\n body: getValidRequestBody(opts),\n };\n\n let request = new Request(url, requestInit);\n\n for (const fn of interceptors.request.fns) {\n if (fn) {\n request = await fn(request, opts);\n }\n }\n\n // fetch must be assigned here, otherwise it would throw the error:\n // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n const _fetch = opts.fetch!;\n let response: Response;\n\n try {\n response = await _fetch(request);\n } catch (error) {\n // Handle fetch exceptions (AbortError, network errors, etc.)\n let finalError = error;\n\n for (const fn of interceptors.error.fns) {\n if (fn) {\n finalError = (await fn(\n error,\n undefined as any,\n request,\n opts,\n )) as unknown;\n }\n }\n\n finalError = finalError || ({} as unknown);\n\n if (opts.throwOnError) {\n throw finalError;\n }\n\n // Return error response\n return opts.responseStyle === 'data'\n ? undefined\n : {\n error: finalError,\n request,\n response: undefined as any,\n };\n }\n\n for (const fn of interceptors.response.fns) {\n if (fn) {\n response = await fn(response, request, opts);\n }\n }\n\n const result = {\n request,\n response,\n };\n\n if (response.ok) {\n const parseAs =\n (opts.parseAs === 'auto'\n ? getParseAs(response.headers.get('Content-Type'))\n : opts.parseAs) ?? 'json';\n\n if (\n response.status === 204 ||\n response.headers.get('Content-Length') === '0'\n ) {\n let emptyData: any;\n switch (parseAs) {\n case 'arrayBuffer':\n case 'blob':\n case 'text':\n emptyData = await response[parseAs]();\n break;\n case 'formData':\n emptyData = new FormData();\n break;\n case 'stream':\n emptyData = response.body;\n break;\n case 'json':\n default:\n emptyData = {};\n break;\n }\n return opts.responseStyle === 'data'\n ? emptyData\n : {\n data: emptyData,\n ...result,\n };\n }\n\n let data: any;\n switch (parseAs) {\n case 'arrayBuffer':\n case 'blob':\n case 'formData':\n case 'json':\n case 'text':\n data = await response[parseAs]();\n break;\n case 'stream':\n return opts.responseStyle === 'data'\n ? response.body\n : {\n data: response.body,\n ...result,\n };\n }\n\n if (parseAs === 'json') {\n if (opts.responseValidator) {\n await opts.responseValidator(data);\n }\n\n if (opts.responseTransformer) {\n data = await opts.responseTransformer(data);\n }\n }\n\n return opts.responseStyle === 'data'\n ? data\n : {\n data,\n ...result,\n };\n }\n\n const textError = await response.text();\n let jsonError: unknown;\n\n try {\n jsonError = JSON.parse(textError);\n } catch {\n // noop\n }\n\n const error = jsonError ?? textError;\n let finalError = error;\n\n for (const fn of interceptors.error.fns) {\n if (fn) {\n finalError = (await fn(error, response, request, opts)) as string;\n }\n }\n\n finalError = finalError || ({} as string);\n\n if (opts.throwOnError) {\n throw finalError;\n }\n\n // TODO: we probably want to return error and improve types\n return opts.responseStyle === 'data'\n ? undefined\n : {\n error: finalError,\n ...result,\n };\n };\n\n const makeMethodFn =\n (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n request({ ...options, method });\n\n const makeSseFn =\n (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n const { opts, url } = await beforeRequest(options);\n return createSseClient({\n ...opts,\n body: opts.body as BodyInit | null | undefined,\n headers: opts.headers as unknown as Record<string, string>,\n method,\n onRequest: async (url, init) => {\n let request = new Request(url, init);\n for (const fn of interceptors.request.fns) {\n if (fn) {\n request = await fn(request, opts);\n }\n }\n return request;\n },\n url,\n });\n };\n\n return {\n buildUrl,\n connect: makeMethodFn('CONNECT'),\n delete: makeMethodFn('DELETE'),\n get: makeMethodFn('GET'),\n getConfig,\n head: makeMethodFn('HEAD'),\n interceptors,\n options: makeMethodFn('OPTIONS'),\n patch: makeMethodFn('PATCH'),\n post: makeMethodFn('POST'),\n put: makeMethodFn('PUT'),\n request,\n setConfig,\n sse: {\n connect: makeSseFn('CONNECT'),\n delete: makeSseFn('DELETE'),\n get: makeSseFn('GET'),\n head: makeSseFn('HEAD'),\n options: makeSseFn('OPTIONS'),\n patch: makeSseFn('PATCH'),\n post: makeSseFn('POST'),\n put: makeSseFn('PUT'),\n trace: makeSseFn('TRACE'),\n },\n trace: makeMethodFn('TRACE'),\n } as Client;\n};\n"],"mappings":";;;;;AA0BA,MAAa,gBAAgB,SAAiB,EAAE,KAAa;CAC3D,IAAI,UAAU,aAAa,cAAc,EAAE,OAAO;CAElD,MAAM,mBAA2B,EAAE,GAAG,SAAS;CAE/C,MAAM,aAAa,aAA2B;AAC5C,YAAU,aAAa,SAASA,SAAO;AACvC,SAAO,WAAW;;CAGpB,MAAM,eAAe,oBAKlB;CAEH,MAAM,gBAAgB,OAAO,YAA4B;EACvD,MAAM,OAAO;GACX,GAAG;GACH,GAAG;GACH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C,QAAQ;EAAE,GAAG;EAAS;EAAQ,CAAC;CAEnC,MAAM,aACH,WAAkC,OAAO,YAA4B;EACpE,MAAM,EAAE,MAAM,QAAQ,MAAM,cAAc,QAAQ;AAClD,SAAO,gBAAgB;GACrB,GAAG;GACH,MAAM,KAAK;GACX,SAAS,KAAK;GACd;GACA,WAAW,OAAO,OAAK,SAAS;IAC9B,IAAIA,YAAU,IAAI,QAAQO,OAAK,KAAK;AACpC,SAAK,MAAM,MAAM,aAAa,QAAQ,IACpC,KAAI,GACF,aAAU,MAAM,GAAGP,WAAS,KAAK;AAGrC,WAAOA;;GAET;GACD,CAAC;;AAGN,QAAO;EACL;EACA,SAAS,aAAa,UAAU;EAChC,QAAQ,aAAa,SAAS;EAC9B,KAAK,aAAa,MAAM;EACxB;EACA,MAAM,aAAa,OAAO;EAC1B;EACA,SAAS,aAAa,UAAU;EAChC,OAAO,aAAa,QAAQ;EAC5B,MAAM,aAAa,OAAO;EAC1B,KAAK,aAAa,MAAM;EACxB;EACA;EACA,KAAK;GACH,SAAS,UAAU,UAAU;GAC7B,QAAQ,UAAU,SAAS;GAC3B,KAAK,UAAU,MAAM;GACrB,MAAM,UAAU,OAAO;GACvB,SAAS,UAAU,UAAU;GAC7B,OAAO,UAAU,QAAQ;GACzB,MAAM,UAAU,OAAO;GACvB,KAAK,UAAU,MAAM;GACrB,OAAO,UAAU,QAAQ;GAC1B;EACD,OAAO,aAAa,QAAQ;EAC7B"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Auth } from "../core/auth.gen.cjs";
|
|
2
|
-
import { QuerySerializerOptions, formDataBodySerializer, jsonBodySerializer, urlSearchParamsBodySerializer } from "../core/bodySerializer.gen.cjs";
|
|
3
|
-
import { buildClientParams } from "../core/params.gen.cjs";
|
|
4
|
-
import { serializeQueryKeyValue } from "../core/queryKeySerializer.gen.cjs";
|
|
5
|
-
import { createConfig, mergeHeaders } from "./utils.gen.cjs";
|
|
6
|
-
import { Client, ClientOptions, Config, CreateClientConfig, Options, RequestOptions, RequestResult, ResolvedRequestOptions, ResponseStyle, TDataShape } from "./types.gen.cjs";
|
|
7
|
-
import { createClient } from "./client.gen.cjs";
|
|
8
|
-
export { type Auth, type Client, type ClientOptions, type Config, type CreateClientConfig, type Options, type QuerySerializerOptions, type RequestOptions, type RequestResult, type ResolvedRequestOptions, type ResponseStyle, type TDataShape, buildClientParams, createClient, createConfig, formDataBodySerializer, jsonBodySerializer, mergeHeaders, serializeQueryKeyValue, urlSearchParamsBodySerializer };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Auth } from "../core/auth.gen.mjs";
|
|
2
|
-
import { QuerySerializerOptions, formDataBodySerializer, jsonBodySerializer, urlSearchParamsBodySerializer } from "../core/bodySerializer.gen.mjs";
|
|
3
|
-
import { buildClientParams } from "../core/params.gen.mjs";
|
|
4
|
-
import { serializeQueryKeyValue } from "../core/queryKeySerializer.gen.mjs";
|
|
5
|
-
import { createConfig, mergeHeaders } from "./utils.gen.mjs";
|
|
6
|
-
import { Client, ClientOptions, Config, CreateClientConfig, Options, RequestOptions, RequestResult, ResolvedRequestOptions, ResponseStyle, TDataShape } from "./types.gen.mjs";
|
|
7
|
-
import { createClient } from "./client.gen.mjs";
|
|
8
|
-
export { type Auth, type Client, type ClientOptions, type Config, type CreateClientConfig, type Options, type QuerySerializerOptions, type RequestOptions, type RequestResult, type ResolvedRequestOptions, type ResponseStyle, type TDataShape, buildClientParams, createClient, createConfig, formDataBodySerializer, jsonBodySerializer, mergeHeaders, serializeQueryKeyValue, urlSearchParamsBodySerializer };
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { Auth } from "../core/auth.gen.cjs";
|
|
2
|
-
import { Client as Client$1, Config as Config$1 } from "../core/types.gen.cjs";
|
|
3
|
-
import { ServerSentEventsOptions, ServerSentEventsResult } from "../core/serverSentEvents.gen.cjs";
|
|
4
|
-
import { Middleware } from "./utils.gen.cjs";
|
|
5
|
-
|
|
6
|
-
//#region src/api/client/types.gen.d.ts
|
|
7
|
-
type ResponseStyle = 'data' | 'fields';
|
|
8
|
-
interface Config<T extends ClientOptions = ClientOptions> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
|
|
9
|
-
/**
|
|
10
|
-
* Base URL for all requests made by this client.
|
|
11
|
-
*/
|
|
12
|
-
baseUrl?: T['baseUrl'];
|
|
13
|
-
/**
|
|
14
|
-
* Fetch API implementation. You can use this option to provide a custom
|
|
15
|
-
* fetch instance.
|
|
16
|
-
*
|
|
17
|
-
* @default globalThis.fetch
|
|
18
|
-
*/
|
|
19
|
-
fetch?: typeof fetch;
|
|
20
|
-
/**
|
|
21
|
-
* Please don't use the Fetch client for Next.js applications. The `next`
|
|
22
|
-
* options won't have any effect.
|
|
23
|
-
*
|
|
24
|
-
* Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
|
|
25
|
-
*/
|
|
26
|
-
next?: never;
|
|
27
|
-
/**
|
|
28
|
-
* Return the response data parsed in a specified format. By default, `auto`
|
|
29
|
-
* will infer the appropriate method from the `Content-Type` response header.
|
|
30
|
-
* You can override this behavior with any of the {@link Body} methods.
|
|
31
|
-
* Select `stream` if you don't want to parse response data at all.
|
|
32
|
-
*
|
|
33
|
-
* @default 'auto'
|
|
34
|
-
*/
|
|
35
|
-
parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
|
|
36
|
-
/**
|
|
37
|
-
* Should we return only data or multiple fields (data, error, response, etc.)?
|
|
38
|
-
*
|
|
39
|
-
* @default 'fields'
|
|
40
|
-
*/
|
|
41
|
-
responseStyle?: ResponseStyle;
|
|
42
|
-
/**
|
|
43
|
-
* Throw an error instead of returning it in the response?
|
|
44
|
-
*
|
|
45
|
-
* @default false
|
|
46
|
-
*/
|
|
47
|
-
throwOnError?: T['throwOnError'];
|
|
48
|
-
}
|
|
49
|
-
interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
50
|
-
responseStyle: TResponseStyle;
|
|
51
|
-
throwOnError: ThrowOnError;
|
|
52
|
-
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
53
|
-
/**
|
|
54
|
-
* Any body that you want to add to your request.
|
|
55
|
-
*
|
|
56
|
-
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
|
|
57
|
-
*/
|
|
58
|
-
body?: unknown;
|
|
59
|
-
path?: Record<string, unknown>;
|
|
60
|
-
query?: Record<string, unknown>;
|
|
61
|
-
/**
|
|
62
|
-
* Security mechanism(s) to use for the request.
|
|
63
|
-
*/
|
|
64
|
-
security?: ReadonlyArray<Auth>;
|
|
65
|
-
url: Url;
|
|
66
|
-
}
|
|
67
|
-
interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
|
|
68
|
-
serializedBody?: string;
|
|
69
|
-
}
|
|
70
|
-
type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
|
|
71
|
-
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
72
|
-
request: Request;
|
|
73
|
-
response: Response;
|
|
74
|
-
}> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
|
|
75
|
-
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
76
|
-
error: undefined;
|
|
77
|
-
} | {
|
|
78
|
-
data: undefined;
|
|
79
|
-
error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
|
|
80
|
-
}) & {
|
|
81
|
-
request: Request;
|
|
82
|
-
response: Response;
|
|
83
|
-
}>;
|
|
84
|
-
interface ClientOptions {
|
|
85
|
-
baseUrl?: string;
|
|
86
|
-
responseStyle?: ResponseStyle;
|
|
87
|
-
throwOnError?: boolean;
|
|
88
|
-
}
|
|
89
|
-
type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
90
|
-
type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
|
|
91
|
-
type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
92
|
-
type BuildUrlFn = <TData extends {
|
|
93
|
-
body?: unknown;
|
|
94
|
-
path?: Record<string, unknown>;
|
|
95
|
-
query?: Record<string, unknown>;
|
|
96
|
-
url: string;
|
|
97
|
-
}>(options: TData & Options<TData>) => string;
|
|
98
|
-
type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
|
|
99
|
-
interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
|
|
100
|
-
};
|
|
101
|
-
/**
|
|
102
|
-
* The `createClientConfig()` function will be called on client initialization
|
|
103
|
-
* and the returned object will become the client's initial configuration.
|
|
104
|
-
*
|
|
105
|
-
* You may want to initialize your client this way instead of calling
|
|
106
|
-
* `setConfig()`. This is useful for example if you're using Next.js
|
|
107
|
-
* to ensure your client always has the correct values.
|
|
108
|
-
*/
|
|
109
|
-
type CreateClientConfig<T extends ClientOptions = ClientOptions> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
|
|
110
|
-
interface TDataShape {
|
|
111
|
-
body?: unknown;
|
|
112
|
-
headers?: unknown;
|
|
113
|
-
path?: unknown;
|
|
114
|
-
query?: unknown;
|
|
115
|
-
url: string;
|
|
116
|
-
}
|
|
117
|
-
type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
118
|
-
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
119
|
-
declare type __ΩResponseStyle = any[];
|
|
120
|
-
declare type __ΩConfig = any[];
|
|
121
|
-
declare type __ΩRequestOptions = any[];
|
|
122
|
-
declare type __ΩResolvedRequestOptions = any[];
|
|
123
|
-
declare type __ΩRequestResult = any[];
|
|
124
|
-
declare type __ΩClientOptions = any[];
|
|
125
|
-
declare type __ΩClient = any[];
|
|
126
|
-
declare type __ΩCreateClientConfig = any[];
|
|
127
|
-
declare type __ΩTDataShape = any[];
|
|
128
|
-
declare type __ΩOptions = any[];
|
|
129
|
-
//#endregion
|
|
130
|
-
export { Client, ClientOptions, Config, CreateClientConfig, Options, RequestOptions, RequestResult, ResolvedRequestOptions, ResponseStyle, TDataShape, __ΩClient, __ΩClientOptions, __ΩConfig, __ΩCreateClientConfig, __ΩOptions, __ΩRequestOptions, __ΩRequestResult, __ΩResolvedRequestOptions, __ΩResponseStyle, __ΩTDataShape };
|
|
131
|
-
//# sourceMappingURL=types.gen.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.gen.d.cts","names":[],"sources":["../../../src/api/client/types.gen.ts"],"sourcesContent":[],"mappings":";;;;;;KAaY,aAAA;UAEK,iBAAiB,gB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