@postman/sdk-config 0.23.0 → 0.24.0
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.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +25 -1
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +25 -1
- 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 +25 -1
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +25 -1
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +8 -2
- package/dist/sdk-config/v1/index.d.ts +8 -2
- package/dist/sdk-config/v1/index.js +25 -1
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +8 -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 +8 -0
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +8 -0
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +11 -2
- package/dist/sdk-config-ir/v1/index.d.ts +11 -2
- package/dist/sdk-config-ir/v1/index.js +8 -0
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/{typescript-ZRqfOhMd.d.cts → typescript-BcBGIPrg.d.cts} +8 -1
- package/dist/{typescript-ZRqfOhMd.d.ts → typescript-BcBGIPrg.d.ts} +8 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as JsonObject, S as SdkConfigDiagnostic } from '../../typescript-
|
|
2
|
-
export { C as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, a as SdkConfigV1CliDistributionConfig, b as SdkConfigV1CliDistributionGithubAppConfig, c as SdkConfigV1CliDistributionHomebrewConfig, d as SdkConfigV1CliDistributionScoopConfig,
|
|
1
|
+
import { j as JsonObject, S as SdkConfigDiagnostic } from '../../typescript-BcBGIPrg.cjs';
|
|
2
|
+
export { C as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, a as SdkConfigV1CliDistributionConfig, b as SdkConfigV1CliDistributionGithubAppConfig, c as SdkConfigV1CliDistributionHomebrewConfig, d as SdkConfigV1CliDistributionScoopConfig, x as sdkConfigV1CliDistributionConfigSchema, y as sdkConfigV1CliDistributionGithubAppSchema, z as sdkConfigV1CliDistributionHomebrewSchema, A as sdkConfigV1CliDistributionScoopSchema, B as sdkConfigV1CliGenerationConfigSchema, E as sdkConfigV1ComposerPackageNameSchema, F as sdkConfigV1CsharpGenerationConfigSchema, I as sdkConfigV1ExactSemverSchema, L as sdkConfigV1GithubActionsSecretNameSchema, N as sdkConfigV1GoGenerationConfigSchema, O as sdkConfigV1GoModulePathSchema, Q as sdkConfigV1JavaGenerationConfigSchema, W as sdkConfigV1KotlinGenerationConfigSchema, Y as sdkConfigV1McpGenerationConfigSchema, Z as sdkConfigV1NonEmptyStringSchema, a0 as sdkConfigV1ParentRelativePathSchema, a1 as sdkConfigV1PhpGenerationConfigSchema, a2 as sdkConfigV1PythonGenerationConfigSchema, a3 as sdkConfigV1RelativePathSchema, a4 as sdkConfigV1RubyGenerationConfigSchema, a5 as sdkConfigV1RustGenerationConfigSchema, a6 as sdkConfigV1SwiftGenerationConfigSchema, a7 as sdkConfigV1TerraformGenerationConfigSchema, a8 as sdkConfigV1TypescriptGenerationConfigSchema } from '../../typescript-BcBGIPrg.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare const sdkConfigV1AuthSchemeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -10823,6 +10823,9 @@ declare const sdkConfigV1Schema: z.ZodObject<{
|
|
|
10823
10823
|
customTools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
10824
10824
|
path: z.ZodString;
|
|
10825
10825
|
}, z.core.$strict>>>;
|
|
10826
|
+
hooks: z.ZodOptional<z.ZodObject<{
|
|
10827
|
+
path: z.ZodString;
|
|
10828
|
+
}, z.core.$strict>>;
|
|
10826
10829
|
}, z.core.$strict>>;
|
|
10827
10830
|
}, z.core.$strict>, z.ZodObject<{
|
|
10828
10831
|
generatorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -22776,6 +22779,9 @@ declare const sdkConfigV1TargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
22776
22779
|
customTools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
22777
22780
|
path: z.ZodString;
|
|
22778
22781
|
}, z.core.$strict>>>;
|
|
22782
|
+
hooks: z.ZodOptional<z.ZodObject<{
|
|
22783
|
+
path: z.ZodString;
|
|
22784
|
+
}, z.core.$strict>>;
|
|
22779
22785
|
}, z.core.$strict>>;
|
|
22780
22786
|
}, z.core.$strict>, z.ZodObject<{
|
|
22781
22787
|
generatorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as JsonObject, S as SdkConfigDiagnostic } from '../../typescript-
|
|
2
|
-
export { C as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, a as SdkConfigV1CliDistributionConfig, b as SdkConfigV1CliDistributionGithubAppConfig, c as SdkConfigV1CliDistributionHomebrewConfig, d as SdkConfigV1CliDistributionScoopConfig,
|
|
1
|
+
import { j as JsonObject, S as SdkConfigDiagnostic } from '../../typescript-BcBGIPrg.js';
|
|
2
|
+
export { C as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, a as SdkConfigV1CliDistributionConfig, b as SdkConfigV1CliDistributionGithubAppConfig, c as SdkConfigV1CliDistributionHomebrewConfig, d as SdkConfigV1CliDistributionScoopConfig, x as sdkConfigV1CliDistributionConfigSchema, y as sdkConfigV1CliDistributionGithubAppSchema, z as sdkConfigV1CliDistributionHomebrewSchema, A as sdkConfigV1CliDistributionScoopSchema, B as sdkConfigV1CliGenerationConfigSchema, E as sdkConfigV1ComposerPackageNameSchema, F as sdkConfigV1CsharpGenerationConfigSchema, I as sdkConfigV1ExactSemverSchema, L as sdkConfigV1GithubActionsSecretNameSchema, N as sdkConfigV1GoGenerationConfigSchema, O as sdkConfigV1GoModulePathSchema, Q as sdkConfigV1JavaGenerationConfigSchema, W as sdkConfigV1KotlinGenerationConfigSchema, Y as sdkConfigV1McpGenerationConfigSchema, Z as sdkConfigV1NonEmptyStringSchema, a0 as sdkConfigV1ParentRelativePathSchema, a1 as sdkConfigV1PhpGenerationConfigSchema, a2 as sdkConfigV1PythonGenerationConfigSchema, a3 as sdkConfigV1RelativePathSchema, a4 as sdkConfigV1RubyGenerationConfigSchema, a5 as sdkConfigV1RustGenerationConfigSchema, a6 as sdkConfigV1SwiftGenerationConfigSchema, a7 as sdkConfigV1TerraformGenerationConfigSchema, a8 as sdkConfigV1TypescriptGenerationConfigSchema } from '../../typescript-BcBGIPrg.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare const sdkConfigV1AuthSchemeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -10823,6 +10823,9 @@ declare const sdkConfigV1Schema: z.ZodObject<{
|
|
|
10823
10823
|
customTools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
10824
10824
|
path: z.ZodString;
|
|
10825
10825
|
}, z.core.$strict>>>;
|
|
10826
|
+
hooks: z.ZodOptional<z.ZodObject<{
|
|
10827
|
+
path: z.ZodString;
|
|
10828
|
+
}, z.core.$strict>>;
|
|
10826
10829
|
}, z.core.$strict>>;
|
|
10827
10830
|
}, z.core.$strict>, z.ZodObject<{
|
|
10828
10831
|
generatorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -22776,6 +22779,9 @@ declare const sdkConfigV1TargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
22776
22779
|
customTools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
22777
22780
|
path: z.ZodString;
|
|
22778
22781
|
}, z.core.$strict>>>;
|
|
22782
|
+
hooks: z.ZodOptional<z.ZodObject<{
|
|
22783
|
+
path: z.ZodString;
|
|
22784
|
+
}, z.core.$strict>>;
|
|
22779
22785
|
}, z.core.$strict>>;
|
|
22780
22786
|
}, z.core.$strict>, z.ZodObject<{
|
|
22781
22787
|
generatorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -796,6 +796,11 @@ var mcpCustomToolSchema = z.strictObject({
|
|
|
796
796
|
"Path to a TypeScript module that exports the tool `definition` and `handler`."
|
|
797
797
|
)
|
|
798
798
|
});
|
|
799
|
+
var mcpHooksSchema = z.strictObject({
|
|
800
|
+
path: relativePathSchema.describe(
|
|
801
|
+
"Path to a TypeScript module exporting the MCP request/response hooks (`beforeRequest`, `afterResponse`, `onError`, `transformResult`)."
|
|
802
|
+
)
|
|
803
|
+
});
|
|
799
804
|
var mcpGenerationConfigSchema = typescriptGenerationConfigSchema.extend({
|
|
800
805
|
serverName: nonEmptyStringSchema.optional().describe("The name advertised by the generated MCP server."),
|
|
801
806
|
serverDescription: nonEmptyStringSchema.optional().describe("The description advertised by the generated MCP server."),
|
|
@@ -807,6 +812,9 @@ var mcpGenerationConfigSchema = typescriptGenerationConfigSchema.extend({
|
|
|
807
812
|
),
|
|
808
813
|
customTools: z.record(mcpToolNameSchema, mcpCustomToolSchema).optional().describe(
|
|
809
814
|
"Hand-written tools, keyed by tool name, each pointing at a TypeScript module that exports its `definition` and `handler`. Emitted alongside the operation-derived tools."
|
|
815
|
+
),
|
|
816
|
+
hooks: mcpHooksSchema.optional().describe(
|
|
817
|
+
"Customer-authored request/response hooks, emitted into the generated server as `src/hooks.ts` (replacing the no-op stub)."
|
|
810
818
|
)
|
|
811
819
|
});
|
|
812
820
|
|
|
@@ -4149,7 +4157,8 @@ function mapMcp(config, state, basePath) {
|
|
|
4149
4157
|
tools: takeToolFilter(config, ["tools"], state, basePath),
|
|
4150
4158
|
toolsets: takeToolsets(config, ["toolsets"], state, basePath),
|
|
4151
4159
|
mergedTools: takeMergedTools(config, ["mergedTools"], state, basePath),
|
|
4152
|
-
customTools: takeCustomTools(config, ["customTools"], state, basePath)
|
|
4160
|
+
customTools: takeCustomTools(config, ["customTools"], state, basePath),
|
|
4161
|
+
hooks: takeHooks(config, ["hooks"], state, basePath)
|
|
4153
4162
|
});
|
|
4154
4163
|
}
|
|
4155
4164
|
function mapReadme(value, language, activeLanguages, state, basePath) {
|
|
@@ -4531,6 +4540,21 @@ function takeCustomTools(value, aliases, state, basePath) {
|
|
|
4531
4540
|
consume(state, located.path);
|
|
4532
4541
|
return Object.fromEntries(entries.filter((entry) => entry !== void 0));
|
|
4533
4542
|
}
|
|
4543
|
+
function takeHooks(value, aliases, state, basePath) {
|
|
4544
|
+
const located = takeObject(value, aliases, state, basePath);
|
|
4545
|
+
if (!located) return void 0;
|
|
4546
|
+
if (typeof located.value.path !== "string") {
|
|
4547
|
+
fail(
|
|
4548
|
+
"FERN_MCP_HOOKS_SPEC_INVALID",
|
|
4549
|
+
located.path,
|
|
4550
|
+
'MCP hooks must be an object with a string "path"',
|
|
4551
|
+
'Give "hooks" a "path" pointing at the TypeScript module exporting the request/response hooks.',
|
|
4552
|
+
["targets", basePath[2], "generation", "hooks"]
|
|
4553
|
+
);
|
|
4554
|
+
}
|
|
4555
|
+
consume(state, located.path);
|
|
4556
|
+
return { path: located.value.path };
|
|
4557
|
+
}
|
|
4534
4558
|
function takeMergedTools(value, aliases, state, basePath) {
|
|
4535
4559
|
const located = takeObject(value, aliases, state, basePath);
|
|
4536
4560
|
if (!located) return void 0;
|