@postman/sdk-config 0.2.0 → 0.3.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.js CHANGED
@@ -2538,19 +2538,74 @@ var commonPublishShape2 = {
2538
2538
  * SDK Config IR; the external publisher or orchestrator resolves this reference before use.
2539
2539
  */
2540
2540
  credentialsRef: nonEmptyStringSchema.optional(),
2541
+ /**
2542
+ * Registry-specific package version override. If omitted, the external publisher/orchestrator may
2543
+ * fall back to target.sdkVersion.
2544
+ */
2545
+ version: nonEmptyStringSchema.optional(),
2541
2546
  releaseBranch: nonEmptyStringSchema.optional(),
2542
- tolerateRepublish: z.boolean().optional()
2547
+ tolerateRepublish: z.boolean().optional(),
2548
+ /** Generate registry publishing workflow files when publishing through GitHub delivery. */
2549
+ shouldGeneratePublishWorkflow: z.boolean().optional()
2543
2550
  };
2551
+ var trustedPublishingShape = {
2552
+ /** Use registry trusted publishing / OIDC instead of a static token secret. */
2553
+ trustedPublishing: z.boolean().optional()
2554
+ };
2555
+ var mavenCoordinateSchema = nonEmptyStringSchema.regex(
2556
+ /^[A-Za-z0-9_.-]+:[A-Za-z0-9_.-]+$/,
2557
+ "Maven coordinate must be in groupId:artifactId form"
2558
+ );
2559
+ var mavenSignatureEnvironmentSchema = z.strictObject({
2560
+ keyIdEnvironmentVariable: nonEmptyStringSchema.optional(),
2561
+ passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
2562
+ secretKeyEnvironmentVariable: nonEmptyStringSchema.optional()
2563
+ });
2544
2564
  var publishConfigSchema = z.discriminatedUnion("registry", [
2545
- z.strictObject({ registry: z.literal("npm"), ...commonPublishShape2 }),
2546
- z.strictObject({ registry: z.literal("pypi"), ...commonPublishShape2 }),
2547
- z.strictObject({ registry: z.literal("nuget"), ...commonPublishShape2 }),
2548
- z.strictObject({ registry: z.literal("rubygems"), ...commonPublishShape2 }),
2549
- z.strictObject({ registry: z.literal("crates"), ...commonPublishShape2 }),
2565
+ z.strictObject({
2566
+ registry: z.literal("npm"),
2567
+ /** Environment variable name containing the npm registry token. */
2568
+ tokenEnvironmentVariable: nonEmptyStringSchema.optional(),
2569
+ /** Write npm package metadata as private when the publisher creates/updates package.json. */
2570
+ isPackagePrivate: z.boolean().optional(),
2571
+ /** Also publish the TypeScript package to JSR from the npm publishing path. */
2572
+ publishToJsr: z.boolean().optional(),
2573
+ ...trustedPublishingShape,
2574
+ ...commonPublishShape2
2575
+ }),
2576
+ z.strictObject({
2577
+ registry: z.literal("pypi"),
2578
+ usernameEnvironmentVariable: nonEmptyStringSchema.optional(),
2579
+ passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
2580
+ ...trustedPublishingShape,
2581
+ ...commonPublishShape2
2582
+ }),
2583
+ z.strictObject({
2584
+ registry: z.literal("nuget"),
2585
+ apiKeyEnvironmentVariable: nonEmptyStringSchema.optional(),
2586
+ ...trustedPublishingShape,
2587
+ ...commonPublishShape2
2588
+ }),
2589
+ z.strictObject({
2590
+ registry: z.literal("rubygems"),
2591
+ apiKeyEnvironmentVariable: nonEmptyStringSchema.optional(),
2592
+ ...commonPublishShape2
2593
+ }),
2594
+ z.strictObject({
2595
+ registry: z.literal("crates"),
2596
+ tokenEnvironmentVariable: nonEmptyStringSchema.optional(),
2597
+ ...commonPublishShape2
2598
+ }),
2550
2599
  z.strictObject({ registry: z.literal("go"), ...commonPublishShape2 }),
2551
2600
  z.strictObject({ registry: z.literal("composer"), ...commonPublishShape2 }),
2552
2601
  z.strictObject({
2553
2602
  registry: z.literal("maven"),
2603
+ /** Maven coordinate in groupId:artifactId form when consumers need the combined value. */
2604
+ coordinate: mavenCoordinateSchema.optional(),
2605
+ usernameEnvironmentVariable: nonEmptyStringSchema.optional(),
2606
+ passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
2607
+ mavenUrlEnvironmentVariable: nonEmptyStringSchema.optional(),
2608
+ signatureEnvironmentVariables: mavenSignatureEnvironmentSchema.optional(),
2554
2609
  /**
2555
2610
  * Reference to Maven signing credentials. Raw signing keys are intentionally not part of SDK
2556
2611
  * Config IR; the external publisher or orchestrator resolves this reference before use.
@@ -2790,6 +2845,13 @@ var sdkConfigIrV1Schema = z.strictObject({
2790
2845
  }
2791
2846
  if (output.publish) {
2792
2847
  validatePublishingIdentity2(packageConfig, output.publish.registry, context);
2848
+ if (output.delivery !== "github" && output.publish.shouldGeneratePublishWorkflow === true) {
2849
+ context.addIssue({
2850
+ code: "custom",
2851
+ message: "output.publish.shouldGeneratePublishWorkflow requires GitHub delivery",
2852
+ path: ["output", "publish", "shouldGeneratePublishWorkflow"]
2853
+ });
2854
+ }
2793
2855
  }
2794
2856
  if (compatibility?.legacyInput) {
2795
2857
  const expectedKind = target.sourceOrigin === "postman" ? "postman-build-parameters" : "fern-generator-invocation";