@postman/sdk-config 0.3.4 → 0.3.5
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 +46 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +46 -9
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +46 -9
- package/dist/sdk-config/index.cjs.map +1 -1
- package/dist/sdk-config/index.d.cts +1 -1
- package/dist/sdk-config/index.d.ts +1 -1
- package/dist/sdk-config/index.js +46 -9
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +46 -9
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +85 -5
- package/dist/sdk-config/v1/index.d.ts +85 -5
- package/dist/sdk-config/v1/index.js +46 -9
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +14 -0
- package/dist/sdk-config-ir/index.cjs.map +1 -1
- package/dist/sdk-config-ir/index.d.cts +1 -1
- package/dist/sdk-config-ir/index.d.ts +1 -1
- package/dist/sdk-config-ir/index.js +14 -0
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +14 -0
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +74 -8
- package/dist/sdk-config-ir/v1/index.d.ts +74 -8
- package/dist/sdk-config-ir/v1/index.js +14 -0
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/{typescript-CKRe_6MB.d.cts → typescript-BruxA5zG.d.cts} +10 -2
- package/dist/{typescript-CKRe_6MB.d.ts → typescript-BruxA5zG.d.ts} +10 -2
- package/package.json +1 -1
- package/src/sdk-config-ir/v1/README.md +61 -36
package/dist/index.cjs
CHANGED
|
@@ -478,9 +478,9 @@ function takeBoolean(value, aliases, state, basePath) {
|
|
|
478
478
|
consume(state, located.path);
|
|
479
479
|
return located.value;
|
|
480
480
|
}
|
|
481
|
-
function takeNumber(value, aliases, state, basePath) {
|
|
481
|
+
function takeNumber(value, aliases, state, basePath, minimum = 0) {
|
|
482
482
|
const located = locate(value, aliases, basePath);
|
|
483
|
-
if (!located || !isNonNegativeNumber(located.value) || !Number.isInteger(located.value))
|
|
483
|
+
if (!located || !isNonNegativeNumber(located.value) || !Number.isInteger(located.value) || located.value < minimum)
|
|
484
484
|
return void 0;
|
|
485
485
|
consume(state, located.path);
|
|
486
486
|
return located.value;
|
|
@@ -1262,6 +1262,12 @@ var apiImportSettingsSchema = zod.z.strictObject({
|
|
|
1262
1262
|
groupMultiApiEnvironments: zod.z.boolean().optional(),
|
|
1263
1263
|
ignoreTags: zod.z.boolean().optional(),
|
|
1264
1264
|
disambiguateRequestNames: zod.z.boolean().optional(),
|
|
1265
|
+
respectReadonlySchemas: zod.z.boolean().optional(),
|
|
1266
|
+
discriminatedUnionV2: zod.z.boolean().optional(),
|
|
1267
|
+
undiscriminatedUnionsWithLiterals: zod.z.boolean().optional(),
|
|
1268
|
+
inlineAllOfSchemas: zod.z.boolean().optional(),
|
|
1269
|
+
resolveSchemaCollisions: zod.z.boolean().optional(),
|
|
1270
|
+
asyncApiMessageNaming: zod.z.enum(["v1", "v2"]).optional(),
|
|
1265
1271
|
defaultIntegerFormat: zod.z.enum(["int32", "int64", "uint32", "uint64"]).optional()
|
|
1266
1272
|
});
|
|
1267
1273
|
var sourceSpecTypeSchema = zod.z.enum([
|
|
@@ -1429,6 +1435,14 @@ var pythonGenerationConfigSchema = zod.z.strictObject({
|
|
|
1429
1435
|
pydanticVersion: nonEmptyStringSchema.optional(),
|
|
1430
1436
|
pydantic: pydanticConfigSchema.optional(),
|
|
1431
1437
|
client: pythonClientSchema.optional(),
|
|
1438
|
+
/** Default followed by generated sync and async HTTP clients when the caller does not override it. */
|
|
1439
|
+
followRedirectsByDefault: zod.z.boolean().optional(),
|
|
1440
|
+
/** Chunk size passed to Python byte-stream iterators. */
|
|
1441
|
+
defaultBytesStreamChunkSize: zod.z.number().int().positive().optional(),
|
|
1442
|
+
/** Python interpreter recursion limit installed by the generated package at import time. */
|
|
1443
|
+
recursionLimit: zod.z.number().int().gt(1e3).optional(),
|
|
1444
|
+
/** Published Python extras, keyed by extra name with package dependency names as values. */
|
|
1445
|
+
extras: zod.z.record(nonEmptyStringSchema, zod.z.array(nonEmptyStringSchema)).optional(),
|
|
1432
1446
|
alwaysInitializeOptionals: zod.z.boolean().optional(),
|
|
1433
1447
|
useTypedDictRequests: zod.z.boolean().optional(),
|
|
1434
1448
|
additionalInitExports: zod.z.array(additionalInitExportSchema).optional()
|
|
@@ -2023,6 +2037,16 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
|
|
|
2023
2037
|
...optional("statusCodeProfile", statusCodeProfile)
|
|
2024
2038
|
};
|
|
2025
2039
|
}
|
|
2040
|
+
const pythonClient = language === "python" ? takeObject(config, ["client"], state, basePath) : void 0;
|
|
2041
|
+
const directClientName = takeString(config, ["clientName", "clientClassName"], state, basePath);
|
|
2042
|
+
const nestedClientName = pythonClient ? takeString(pythonClient.value, ["className"], state, pythonClient.path) : void 0;
|
|
2043
|
+
const directExportedClientName = takeString(
|
|
2044
|
+
config,
|
|
2045
|
+
["exportedClientName", "exportedClientClassName"],
|
|
2046
|
+
state,
|
|
2047
|
+
basePath
|
|
2048
|
+
);
|
|
2049
|
+
const nestedExportedClientName = pythonClient ? takeString(pythonClient.value, ["exportedClassName"], state, pythonClient.path) : void 0;
|
|
2026
2050
|
const naming = compact({
|
|
2027
2051
|
pagerName: takeString(
|
|
2028
2052
|
config,
|
|
@@ -2030,13 +2054,8 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
|
|
|
2030
2054
|
state,
|
|
2031
2055
|
basePath
|
|
2032
2056
|
),
|
|
2033
|
-
clientName:
|
|
2034
|
-
exportedClientName:
|
|
2035
|
-
config,
|
|
2036
|
-
["exportedClientName", "exportedClientClassName"],
|
|
2037
|
-
state,
|
|
2038
|
-
basePath
|
|
2039
|
-
),
|
|
2057
|
+
clientName: directClientName ?? nestedClientName,
|
|
2058
|
+
exportedClientName: directExportedClientName ?? nestedExportedClientName,
|
|
2040
2059
|
environmentTypeName: takeString(
|
|
2041
2060
|
config,
|
|
2042
2061
|
["environmentClassName", "environmentEnumName"],
|
|
@@ -2134,9 +2153,27 @@ function mapPython(config, state, packageConfig, basePath) {
|
|
|
2134
2153
|
const packageName = takeString(config, ["pypiPackageName"], state, basePath);
|
|
2135
2154
|
if (moduleName !== void 0) packageConfig.moduleName = moduleName;
|
|
2136
2155
|
if (packageName !== void 0) packageConfig.packageName = packageName;
|
|
2156
|
+
const client = takeObject(config, ["client"], state, basePath);
|
|
2157
|
+
const directFileName = takeString(config, ["clientFilename"], state, basePath);
|
|
2158
|
+
const nestedFileName = client ? takeString(client.value, ["filename"], state, client.path) : void 0;
|
|
2159
|
+
const exportedFileName = client ? takeString(client.value, ["exportedFilename"], state, client.path) : void 0;
|
|
2137
2160
|
return compact({
|
|
2138
2161
|
pythonVersion: takeString(config, ["pythonVersion", "pyprojectPythonVersion"], state, basePath),
|
|
2139
2162
|
pydanticVersion: takeString(config, ["pydanticVersion"], state, basePath),
|
|
2163
|
+
...optionalObject(
|
|
2164
|
+
"client",
|
|
2165
|
+
compact({ fileName: directFileName ?? nestedFileName, exportedFileName })
|
|
2166
|
+
),
|
|
2167
|
+
followRedirectsByDefault: takeBoolean(config, ["followRedirectsByDefault"], state, basePath),
|
|
2168
|
+
defaultBytesStreamChunkSize: takeNumber(
|
|
2169
|
+
config,
|
|
2170
|
+
["defaultBytesStreamChunkSize"],
|
|
2171
|
+
state,
|
|
2172
|
+
basePath,
|
|
2173
|
+
1
|
|
2174
|
+
),
|
|
2175
|
+
recursionLimit: takeNumber(config, ["recursionLimit"], state, basePath, 1001),
|
|
2176
|
+
extras: takeStringArrayRecord(config, ["extras"], state, basePath),
|
|
2140
2177
|
alwaysInitializeOptionals: takeBoolean(config, ["alwaysInitializeOptionals"], state, basePath),
|
|
2141
2178
|
useTypedDictRequests: takeBoolean(config, ["useTypedDictRequests"], state, basePath),
|
|
2142
2179
|
additionalInitExports: takePythonAdditionalInitExports(config, state, basePath)
|