@postman/sdk-config 0.5.0 → 0.5.1
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 +25 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -1
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +23 -1
- package/dist/sdk-config/index.cjs.map +1 -1
- package/dist/sdk-config/index.js +23 -1
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +23 -1
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +3362 -3330
- package/dist/sdk-config/v1/index.d.ts +3362 -3330
- package/dist/sdk-config/v1/index.js +23 -1
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +2 -0
- package/dist/sdk-config-ir/index.cjs.map +1 -1
- package/dist/sdk-config-ir/index.js +2 -0
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +2 -0
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +3 -0
- package/dist/sdk-config-ir/v1/index.d.ts +3 -0
- package/dist/sdk-config-ir/v1/index.js +2 -0
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/package.json +1 -1
- package/src/sdk-config/v1/README.md +5 -3
package/dist/index.cjs
CHANGED
|
@@ -1246,10 +1246,16 @@ function finishOutputMapping(mapping, outputMode, sourcePath, state, index) {
|
|
|
1246
1246
|
for (const path of collectLeafPaths(outputMode, sourcePath)) {
|
|
1247
1247
|
if (path[path.length - 1] === "_visit") consume(state, path);
|
|
1248
1248
|
}
|
|
1249
|
+
const legacyGenerateFullProject = isObject(outputMode) ? outputMode.generateFullProject : void 0;
|
|
1250
|
+
const generationShape = typeof legacyGenerateFullProject === "boolean" ? { generation: { ...mapping.generation, generateFullProject: legacyGenerateFullProject } } : {};
|
|
1251
|
+
if (typeof legacyGenerateFullProject === "boolean") {
|
|
1252
|
+
consume(state, [...sourcePath, "generateFullProject"]);
|
|
1253
|
+
}
|
|
1249
1254
|
const unsupported = collectUnsupported(outputMode, sourcePath, state);
|
|
1250
1255
|
const hasCredentials = unsupported.some((diagnostic) => isCredentialPath(diagnostic.path));
|
|
1251
1256
|
return {
|
|
1252
1257
|
...mapping,
|
|
1258
|
+
...generationShape,
|
|
1253
1259
|
unsupportedFields: [
|
|
1254
1260
|
...state.credentialDiagnostics ?? [],
|
|
1255
1261
|
...hasCredentials ? [
|
|
@@ -1431,6 +1437,8 @@ var generationConfigOverrideShape = {
|
|
|
1431
1437
|
inferServiceNames: zod.z.boolean().optional(),
|
|
1432
1438
|
includeDeprecatedOperations: zod.z.boolean().optional(),
|
|
1433
1439
|
multipleResponses: zod.z.boolean().optional(),
|
|
1440
|
+
/** Generate the entire SDK project, including package manifests and publishable artifacts. */
|
|
1441
|
+
generateFullProject: zod.z.boolean().optional(),
|
|
1434
1442
|
devContainer: zod.z.boolean().optional(),
|
|
1435
1443
|
allowMockClient: zod.z.boolean().optional(),
|
|
1436
1444
|
ignoreFiles: zod.z.array(nonEmptyStringSchema).optional(),
|
|
@@ -1459,6 +1467,7 @@ var sdkConfigV1GenerationConfigSchema = zod.z.strictObject({
|
|
|
1459
1467
|
inferServiceNames: zod.z.boolean().default(false),
|
|
1460
1468
|
includeDeprecatedOperations: zod.z.boolean().default(true),
|
|
1461
1469
|
multipleResponses: zod.z.boolean().default(false),
|
|
1470
|
+
generateFullProject: zod.z.boolean().default(false),
|
|
1462
1471
|
devContainer: zod.z.boolean().default(false),
|
|
1463
1472
|
allowMockClient: zod.z.boolean().default(false)
|
|
1464
1473
|
});
|
|
@@ -2063,7 +2072,14 @@ function mapFernConfigToSdkConfigV1(input) {
|
|
|
2063
2072
|
api.audiences = [...input.group.audiences.audiences];
|
|
2064
2073
|
}
|
|
2065
2074
|
const targets = mapped.map(
|
|
2066
|
-
({
|
|
2075
|
+
({
|
|
2076
|
+
generator,
|
|
2077
|
+
invocation,
|
|
2078
|
+
language,
|
|
2079
|
+
output,
|
|
2080
|
+
package: outputPackage,
|
|
2081
|
+
generation: outputGeneration
|
|
2082
|
+
}, index) => {
|
|
2067
2083
|
const target = {
|
|
2068
2084
|
language,
|
|
2069
2085
|
output,
|
|
@@ -2077,6 +2093,7 @@ function mapFernConfigToSdkConfigV1(input) {
|
|
|
2077
2093
|
}
|
|
2078
2094
|
const targetGeneration = {
|
|
2079
2095
|
...generations.targetOverrides[index],
|
|
2096
|
+
...outputGeneration,
|
|
2080
2097
|
...invocation.targetGeneration
|
|
2081
2098
|
};
|
|
2082
2099
|
if (Object.keys(targetGeneration).length > 0) {
|
|
@@ -2254,6 +2271,9 @@ function mapInvocation(generator, language, activeLanguages, index) {
|
|
|
2254
2271
|
if (generator.keywords?.length) {
|
|
2255
2272
|
generation.reservedKeywords = [...generator.keywords];
|
|
2256
2273
|
}
|
|
2274
|
+
if (generator.generateFullProject !== void 0) {
|
|
2275
|
+
generation.generateFullProject = generator.generateFullProject;
|
|
2276
|
+
}
|
|
2257
2277
|
const settings = isObject(generator.settings) ? generator.settings : void 0;
|
|
2258
2278
|
if (settings) {
|
|
2259
2279
|
const inlinePathParameters = takeBoolean(settings, ["inlinePathParameters"], state, [
|
|
@@ -2396,6 +2416,8 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
|
|
|
2396
2416
|
basePath
|
|
2397
2417
|
);
|
|
2398
2418
|
if (webSockets !== void 0) generation.webSockets = webSockets;
|
|
2419
|
+
const generateFullProject = takeBoolean(config, ["generateFullProject"], state, basePath);
|
|
2420
|
+
if (generateFullProject !== void 0) generation.generateFullProject = generateFullProject;
|
|
2399
2421
|
const inlineTypes = takeBoolean(config, ["enableInlineTypes"], state, basePath);
|
|
2400
2422
|
const omitUndefined = takeBoolean(config, ["omitUndefined"], state, basePath);
|
|
2401
2423
|
const forwardEnums = takeBoolean(config, ["enableForwardCompatibleEnums"], state, basePath);
|
|
@@ -3000,6 +3022,8 @@ var generationConfigSchema = zod.z.strictObject({
|
|
|
3000
3022
|
inferServiceNames: zod.z.boolean().default(false),
|
|
3001
3023
|
includeDeprecatedOperations: zod.z.boolean().default(true),
|
|
3002
3024
|
multipleResponses: zod.z.boolean().default(false),
|
|
3025
|
+
/** Generate the entire SDK project, including package manifests and publishable artifacts. */
|
|
3026
|
+
generateFullProject: zod.z.boolean().default(false),
|
|
3003
3027
|
devContainer: zod.z.boolean().default(false),
|
|
3004
3028
|
allowMockClient: zod.z.boolean().default(false),
|
|
3005
3029
|
ignoreFiles: zod.z.array(nonEmptyStringSchema).optional(),
|