@postman-cse/onboarding-bootstrap 2.1.2 → 2.2.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/action.cjs CHANGED
@@ -55569,7 +55569,7 @@ var require_lodash = __commonJS({
55569
55569
  }
55570
55570
  return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
55571
55571
  });
55572
- function join3(array, separator) {
55572
+ function join4(array, separator) {
55573
55573
  return array == null ? "" : nativeJoin.call(array, separator);
55574
55574
  }
55575
55575
  function last(array) {
@@ -57488,7 +57488,7 @@ var require_lodash = __commonJS({
57488
57488
  lodash.isUndefined = isUndefined;
57489
57489
  lodash.isWeakMap = isWeakMap;
57490
57490
  lodash.isWeakSet = isWeakSet;
57491
- lodash.join = join3;
57491
+ lodash.join = join4;
57492
57492
  lodash.kebabCase = kebabCase;
57493
57493
  lodash.last = last;
57494
57494
  lodash.lastIndexOf = lastIndexOf;
@@ -127435,16 +127435,16 @@ var require_printer = __commonJS({
127435
127435
  },
127436
127436
  // Document
127437
127437
  Document: {
127438
- leave: (node) => join3(node.definitions, "\n\n")
127438
+ leave: (node) => join4(node.definitions, "\n\n")
127439
127439
  },
127440
127440
  OperationDefinition: {
127441
127441
  leave(node) {
127442
- const varDefs = hasMultilineItems(node.variableDefinitions) ? wrap("(\n", join3(node.variableDefinitions, "\n"), "\n)") : wrap("(", join3(node.variableDefinitions, ", "), ")");
127443
- const prefix = wrap("", node.description, "\n") + join3(
127442
+ const varDefs = hasMultilineItems(node.variableDefinitions) ? wrap("(\n", join4(node.variableDefinitions, "\n"), "\n)") : wrap("(", join4(node.variableDefinitions, ", "), ")");
127443
+ const prefix = wrap("", node.description, "\n") + join4(
127444
127444
  [
127445
127445
  node.operation,
127446
- join3([node.name, varDefs]),
127447
- join3(node.directives, " ")
127446
+ join4([node.name, varDefs]),
127447
+ join4(node.directives, " ")
127448
127448
  ],
127449
127449
  " "
127450
127450
  );
@@ -127452,7 +127452,7 @@ var require_printer = __commonJS({
127452
127452
  }
127453
127453
  },
127454
127454
  VariableDefinition: {
127455
- leave: ({ variable, type, defaultValue, directives, description }) => wrap("", description, "\n") + variable + ": " + type + wrap(" = ", defaultValue) + wrap(" ", join3(directives, " "))
127455
+ leave: ({ variable, type, defaultValue, directives, description }) => wrap("", description, "\n") + variable + ": " + type + wrap(" = ", defaultValue) + wrap(" ", join4(directives, " "))
127456
127456
  },
127457
127457
  SelectionSet: {
127458
127458
  leave: ({ selections }) => block(selections)
@@ -127460,11 +127460,11 @@ var require_printer = __commonJS({
127460
127460
  Field: {
127461
127461
  leave({ alias, name, arguments: args, directives, selectionSet }) {
127462
127462
  const prefix = wrap("", alias, ": ") + name;
127463
- let argsLine = prefix + wrap("(", join3(args, ", "), ")");
127463
+ let argsLine = prefix + wrap("(", join4(args, ", "), ")");
127464
127464
  if (argsLine.length > MAX_LINE_LENGTH) {
127465
- argsLine = prefix + wrap("(\n", indent2(join3(args, "\n")), "\n)");
127465
+ argsLine = prefix + wrap("(\n", indent2(join4(args, "\n")), "\n)");
127466
127466
  }
127467
- return join3([argsLine, join3(directives, " "), selectionSet], " ");
127467
+ return join4([argsLine, join4(directives, " "), selectionSet], " ");
127468
127468
  }
127469
127469
  },
127470
127470
  Argument: {
@@ -127472,14 +127472,14 @@ var require_printer = __commonJS({
127472
127472
  },
127473
127473
  // Fragments
127474
127474
  FragmentSpread: {
127475
- leave: ({ name, directives }) => "..." + name + wrap(" ", join3(directives, " "))
127475
+ leave: ({ name, directives }) => "..." + name + wrap(" ", join4(directives, " "))
127476
127476
  },
127477
127477
  InlineFragment: {
127478
- leave: ({ typeCondition, directives, selectionSet }) => join3(
127478
+ leave: ({ typeCondition, directives, selectionSet }) => join4(
127479
127479
  [
127480
127480
  "...",
127481
127481
  wrap("on ", typeCondition),
127482
- join3(directives, " "),
127482
+ join4(directives, " "),
127483
127483
  selectionSet
127484
127484
  ],
127485
127485
  " "
@@ -127495,7 +127495,7 @@ var require_printer = __commonJS({
127495
127495
  description
127496
127496
  }) => wrap("", description, "\n") + // Note: fragment variable definitions are experimental and may be changed
127497
127497
  // or removed in the future.
127498
- `fragment ${name}${wrap("(", join3(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap("", join3(directives, " "), " ")}` + selectionSet
127498
+ `fragment ${name}${wrap("(", join4(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap("", join4(directives, " "), " ")}` + selectionSet
127499
127499
  },
127500
127500
  // Value
127501
127501
  IntValue: {
@@ -127517,17 +127517,17 @@ var require_printer = __commonJS({
127517
127517
  leave: ({ value }) => value
127518
127518
  },
127519
127519
  ListValue: {
127520
- leave: ({ values }) => "[" + join3(values, ", ") + "]"
127520
+ leave: ({ values }) => "[" + join4(values, ", ") + "]"
127521
127521
  },
127522
127522
  ObjectValue: {
127523
- leave: ({ fields }) => "{" + join3(fields, ", ") + "}"
127523
+ leave: ({ fields }) => "{" + join4(fields, ", ") + "}"
127524
127524
  },
127525
127525
  ObjectField: {
127526
127526
  leave: ({ name, value }) => name + ": " + value
127527
127527
  },
127528
127528
  // Directive
127529
127529
  Directive: {
127530
- leave: ({ name, arguments: args }) => "@" + name + wrap("(", join3(args, ", "), ")")
127530
+ leave: ({ name, arguments: args }) => "@" + name + wrap("(", join4(args, ", "), ")")
127531
127531
  },
127532
127532
  // Type
127533
127533
  NamedType: {
@@ -127541,61 +127541,61 @@ var require_printer = __commonJS({
127541
127541
  },
127542
127542
  // Type System Definitions
127543
127543
  SchemaDefinition: {
127544
- leave: ({ description, directives, operationTypes }) => wrap("", description, "\n") + join3(["schema", join3(directives, " "), block(operationTypes)], " ")
127544
+ leave: ({ description, directives, operationTypes }) => wrap("", description, "\n") + join4(["schema", join4(directives, " "), block(operationTypes)], " ")
127545
127545
  },
127546
127546
  OperationTypeDefinition: {
127547
127547
  leave: ({ operation, type }) => operation + ": " + type
127548
127548
  },
127549
127549
  ScalarTypeDefinition: {
127550
- leave: ({ description, name, directives }) => wrap("", description, "\n") + join3(["scalar", name, join3(directives, " ")], " ")
127550
+ leave: ({ description, name, directives }) => wrap("", description, "\n") + join4(["scalar", name, join4(directives, " ")], " ")
127551
127551
  },
127552
127552
  ObjectTypeDefinition: {
127553
- leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join3(
127553
+ leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join4(
127554
127554
  [
127555
127555
  "type",
127556
127556
  name,
127557
- wrap("implements ", join3(interfaces, " & ")),
127558
- join3(directives, " "),
127557
+ wrap("implements ", join4(interfaces, " & ")),
127558
+ join4(directives, " "),
127559
127559
  block(fields)
127560
127560
  ],
127561
127561
  " "
127562
127562
  )
127563
127563
  },
127564
127564
  FieldDefinition: {
127565
- leave: ({ description, name, arguments: args, type, directives }) => wrap("", description, "\n") + name + (hasMultilineItems(args) ? wrap("(\n", indent2(join3(args, "\n")), "\n)") : wrap("(", join3(args, ", "), ")")) + ": " + type + wrap(" ", join3(directives, " "))
127565
+ leave: ({ description, name, arguments: args, type, directives }) => wrap("", description, "\n") + name + (hasMultilineItems(args) ? wrap("(\n", indent2(join4(args, "\n")), "\n)") : wrap("(", join4(args, ", "), ")")) + ": " + type + wrap(" ", join4(directives, " "))
127566
127566
  },
127567
127567
  InputValueDefinition: {
127568
- leave: ({ description, name, type, defaultValue, directives }) => wrap("", description, "\n") + join3(
127569
- [name + ": " + type, wrap("= ", defaultValue), join3(directives, " ")],
127568
+ leave: ({ description, name, type, defaultValue, directives }) => wrap("", description, "\n") + join4(
127569
+ [name + ": " + type, wrap("= ", defaultValue), join4(directives, " ")],
127570
127570
  " "
127571
127571
  )
127572
127572
  },
127573
127573
  InterfaceTypeDefinition: {
127574
- leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join3(
127574
+ leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join4(
127575
127575
  [
127576
127576
  "interface",
127577
127577
  name,
127578
- wrap("implements ", join3(interfaces, " & ")),
127579
- join3(directives, " "),
127578
+ wrap("implements ", join4(interfaces, " & ")),
127579
+ join4(directives, " "),
127580
127580
  block(fields)
127581
127581
  ],
127582
127582
  " "
127583
127583
  )
127584
127584
  },
127585
127585
  UnionTypeDefinition: {
127586
- leave: ({ description, name, directives, types: types2 }) => wrap("", description, "\n") + join3(
127587
- ["union", name, join3(directives, " "), wrap("= ", join3(types2, " | "))],
127586
+ leave: ({ description, name, directives, types: types2 }) => wrap("", description, "\n") + join4(
127587
+ ["union", name, join4(directives, " "), wrap("= ", join4(types2, " | "))],
127588
127588
  " "
127589
127589
  )
127590
127590
  },
127591
127591
  EnumTypeDefinition: {
127592
- leave: ({ description, name, directives, values }) => wrap("", description, "\n") + join3(["enum", name, join3(directives, " "), block(values)], " ")
127592
+ leave: ({ description, name, directives, values }) => wrap("", description, "\n") + join4(["enum", name, join4(directives, " "), block(values)], " ")
127593
127593
  },
127594
127594
  EnumValueDefinition: {
127595
- leave: ({ description, name, directives }) => wrap("", description, "\n") + join3([name, join3(directives, " ")], " ")
127595
+ leave: ({ description, name, directives }) => wrap("", description, "\n") + join4([name, join4(directives, " ")], " ")
127596
127596
  },
127597
127597
  InputObjectTypeDefinition: {
127598
- leave: ({ description, name, directives, fields }) => wrap("", description, "\n") + join3(["input", name, join3(directives, " "), block(fields)], " ")
127598
+ leave: ({ description, name, directives, fields }) => wrap("", description, "\n") + join4(["input", name, join4(directives, " "), block(fields)], " ")
127599
127599
  },
127600
127600
  DirectiveDefinition: {
127601
127601
  leave: ({
@@ -127605,84 +127605,84 @@ var require_printer = __commonJS({
127605
127605
  directives,
127606
127606
  repeatable,
127607
127607
  locations
127608
- }) => wrap("", description, "\n") + "directive @" + name + (hasMultilineItems(args) ? wrap("(\n", indent2(join3(args, "\n")), "\n)") : wrap("(", join3(args, ", "), ")")) + wrap(" ", join3(directives, " ")) + (repeatable ? " repeatable" : "") + " on " + join3(locations, " | ")
127608
+ }) => wrap("", description, "\n") + "directive @" + name + (hasMultilineItems(args) ? wrap("(\n", indent2(join4(args, "\n")), "\n)") : wrap("(", join4(args, ", "), ")")) + wrap(" ", join4(directives, " ")) + (repeatable ? " repeatable" : "") + " on " + join4(locations, " | ")
127609
127609
  },
127610
127610
  SchemaExtension: {
127611
- leave: ({ directives, operationTypes }) => join3(
127612
- ["extend schema", join3(directives, " "), block(operationTypes)],
127611
+ leave: ({ directives, operationTypes }) => join4(
127612
+ ["extend schema", join4(directives, " "), block(operationTypes)],
127613
127613
  " "
127614
127614
  )
127615
127615
  },
127616
127616
  ScalarTypeExtension: {
127617
- leave: ({ name, directives }) => join3(["extend scalar", name, join3(directives, " ")], " ")
127617
+ leave: ({ name, directives }) => join4(["extend scalar", name, join4(directives, " ")], " ")
127618
127618
  },
127619
127619
  ObjectTypeExtension: {
127620
- leave: ({ name, interfaces, directives, fields }) => join3(
127620
+ leave: ({ name, interfaces, directives, fields }) => join4(
127621
127621
  [
127622
127622
  "extend type",
127623
127623
  name,
127624
- wrap("implements ", join3(interfaces, " & ")),
127625
- join3(directives, " "),
127624
+ wrap("implements ", join4(interfaces, " & ")),
127625
+ join4(directives, " "),
127626
127626
  block(fields)
127627
127627
  ],
127628
127628
  " "
127629
127629
  )
127630
127630
  },
127631
127631
  InterfaceTypeExtension: {
127632
- leave: ({ name, interfaces, directives, fields }) => join3(
127632
+ leave: ({ name, interfaces, directives, fields }) => join4(
127633
127633
  [
127634
127634
  "extend interface",
127635
127635
  name,
127636
- wrap("implements ", join3(interfaces, " & ")),
127637
- join3(directives, " "),
127636
+ wrap("implements ", join4(interfaces, " & ")),
127637
+ join4(directives, " "),
127638
127638
  block(fields)
127639
127639
  ],
127640
127640
  " "
127641
127641
  )
127642
127642
  },
127643
127643
  UnionTypeExtension: {
127644
- leave: ({ name, directives, types: types2 }) => join3(
127644
+ leave: ({ name, directives, types: types2 }) => join4(
127645
127645
  [
127646
127646
  "extend union",
127647
127647
  name,
127648
- join3(directives, " "),
127649
- wrap("= ", join3(types2, " | "))
127648
+ join4(directives, " "),
127649
+ wrap("= ", join4(types2, " | "))
127650
127650
  ],
127651
127651
  " "
127652
127652
  )
127653
127653
  },
127654
127654
  EnumTypeExtension: {
127655
- leave: ({ name, directives, values }) => join3(["extend enum", name, join3(directives, " "), block(values)], " ")
127655
+ leave: ({ name, directives, values }) => join4(["extend enum", name, join4(directives, " "), block(values)], " ")
127656
127656
  },
127657
127657
  InputObjectTypeExtension: {
127658
- leave: ({ name, directives, fields }) => join3(["extend input", name, join3(directives, " "), block(fields)], " ")
127658
+ leave: ({ name, directives, fields }) => join4(["extend input", name, join4(directives, " "), block(fields)], " ")
127659
127659
  },
127660
127660
  DirectiveExtension: {
127661
- leave: ({ name, directives }) => join3(["extend directive @" + name, join3(directives, " ")], " ")
127661
+ leave: ({ name, directives }) => join4(["extend directive @" + name, join4(directives, " ")], " ")
127662
127662
  },
127663
127663
  // Schema Coordinates
127664
127664
  TypeCoordinate: {
127665
127665
  leave: ({ name }) => name
127666
127666
  },
127667
127667
  MemberCoordinate: {
127668
- leave: ({ name, memberName }) => join3([name, wrap(".", memberName)])
127668
+ leave: ({ name, memberName }) => join4([name, wrap(".", memberName)])
127669
127669
  },
127670
127670
  ArgumentCoordinate: {
127671
- leave: ({ name, fieldName, argumentName }) => join3([name, wrap(".", fieldName), wrap("(", argumentName, ":)")])
127671
+ leave: ({ name, fieldName, argumentName }) => join4([name, wrap(".", fieldName), wrap("(", argumentName, ":)")])
127672
127672
  },
127673
127673
  DirectiveCoordinate: {
127674
- leave: ({ name }) => join3(["@", name])
127674
+ leave: ({ name }) => join4(["@", name])
127675
127675
  },
127676
127676
  DirectiveArgumentCoordinate: {
127677
- leave: ({ name, argumentName }) => join3(["@", name, wrap("(", argumentName, ":)")])
127677
+ leave: ({ name, argumentName }) => join4(["@", name, wrap("(", argumentName, ":)")])
127678
127678
  }
127679
127679
  };
127680
- function join3(maybeArray, separator = "") {
127680
+ function join4(maybeArray, separator = "") {
127681
127681
  var _maybeArray$filter$jo;
127682
127682
  return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter((x) => x).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : "";
127683
127683
  }
127684
127684
  function block(array) {
127685
- return wrap("{\n", indent2(join3(array, "\n")), "\n}");
127685
+ return wrap("{\n", indent2(join4(array, "\n")), "\n}");
127686
127686
  }
127687
127687
  function wrap(start, maybeString, end = "") {
127688
127688
  return maybeString != null && maybeString !== "" ? start + maybeString + end : "";
@@ -152316,7 +152316,7 @@ var require_index_cjs = __commonJS({
152316
152316
  const t = parse10(r);
152317
152317
  return "http" === t.protocol || "https" === t.protocol;
152318
152318
  }
152319
- var join3 = (...r) => {
152319
+ var join4 = (...r) => {
152320
152320
  if (0 === r.length) return ".";
152321
152321
  const t = r.map(parse10), e = Object.assign({}, t[0]);
152322
152322
  for (let n = 1; n < t.length; n++) {
@@ -152340,7 +152340,7 @@ var require_index_cjs = __commonJS({
152340
152340
  function resolve5(...r) {
152341
152341
  if (0 === r.length) return ".";
152342
152342
  const t = normalizeParsed(parse10(r[r.length - 1]));
152343
- return t.absolute ? format3(t) : join3(...r);
152343
+ return t.absolute ? format3(t) : join4(...r);
152344
152344
  }
152345
152345
  var startsWithWindowsDrive = (r) => {
152346
152346
  return null !== parse10(r).drive;
@@ -152354,7 +152354,7 @@ var require_index_cjs = __commonJS({
152354
152354
  function serializeSrn({ shortcode: r, orgSlug: t, projectSlug: e, uri: n = "" }) {
152355
152355
  return [r, t, e, n.replace(/^\//, "")].filter(Boolean).join("/");
152356
152356
  }
152357
- exports2.basename = basename3, exports2.deserializeSrn = deserializeSrn, exports2.dirname = dirname3, exports2.extname = extname2, exports2.format = format3, exports2.isAbsolute = isAbsolute, exports2.isURL = isURL, exports2.join = join3, exports2.normalize = normalize3, exports2.parse = parse10, exports2.relative = relative2, exports2.resolve = resolve5, exports2.sep = "/", exports2.serializeSrn = serializeSrn, exports2.startsWithWindowsDrive = startsWithWindowsDrive, exports2.stripRoot = stripRoot, exports2.toFSPath = normalize3;
152357
+ exports2.basename = basename3, exports2.deserializeSrn = deserializeSrn, exports2.dirname = dirname3, exports2.extname = extname2, exports2.format = format3, exports2.isAbsolute = isAbsolute, exports2.isURL = isURL, exports2.join = join4, exports2.normalize = normalize3, exports2.parse = parse10, exports2.relative = relative2, exports2.resolve = resolve5, exports2.sep = "/", exports2.serializeSrn = serializeSrn, exports2.startsWithWindowsDrive = startsWithWindowsDrive, exports2.stripRoot = stripRoot, exports2.toFSPath = normalize3;
152358
152358
  }
152359
152359
  });
152360
152360
 
@@ -154097,7 +154097,7 @@ var require_stable = __commonJS({
154097
154097
  return result;
154098
154098
  }
154099
154099
  function stringifyFullFn(key, parent, stack, replacer, indent2) {
154100
- var i, res, join3;
154100
+ var i, res, join4;
154101
154101
  const originalIndentation = indentation;
154102
154102
  var value = parent[key];
154103
154103
  if (typeof value === "object" && value !== null && typeof value.toJSON === "function") {
@@ -154123,12 +154123,12 @@ var require_stable = __commonJS({
154123
154123
  indentation += indent2;
154124
154124
  res += `
154125
154125
  ${indentation}`;
154126
- join3 = `,
154126
+ join4 = `,
154127
154127
  ${indentation}`;
154128
154128
  for (i = 0; i < value.length - 1; i++) {
154129
154129
  const tmp2 = stringifyFullFn(i, value, stack, replacer, indent2);
154130
154130
  res += tmp2 !== void 0 ? tmp2 : "null";
154131
- res += join3;
154131
+ res += join4;
154132
154132
  }
154133
154133
  const tmp = stringifyFullFn(i, value, stack, replacer, indent2);
154134
154134
  res += tmp !== void 0 ? tmp : "null";
@@ -154150,7 +154150,7 @@ ${originalIndentation}`;
154150
154150
  indentation += indent2;
154151
154151
  res += `
154152
154152
  ${indentation}`;
154153
- join3 = `,
154153
+ join4 = `,
154154
154154
  ${indentation}`;
154155
154155
  var separator = "";
154156
154156
  for (i = 0; i < keys.length; i++) {
@@ -154158,7 +154158,7 @@ ${indentation}`;
154158
154158
  const tmp = stringifyFullFn(key, value, stack, replacer, indent2);
154159
154159
  if (tmp !== void 0) {
154160
154160
  res += `${separator}"${strEscape(key)}": ${tmp}`;
154161
- separator = join3;
154161
+ separator = join4;
154162
154162
  }
154163
154163
  }
154164
154164
  if (separator !== "") {
@@ -154180,7 +154180,7 @@ ${originalIndentation}`;
154180
154180
  }
154181
154181
  }
154182
154182
  function stringifyFullArr(key, value, stack, replacer, indent2) {
154183
- var i, res, join3;
154183
+ var i, res, join4;
154184
154184
  const originalIndentation = indentation;
154185
154185
  if (typeof value === "object" && value !== null && typeof value.toJSON === "function") {
154186
154186
  value = value.toJSON(key);
@@ -154204,12 +154204,12 @@ ${originalIndentation}`;
154204
154204
  indentation += indent2;
154205
154205
  res += `
154206
154206
  ${indentation}`;
154207
- join3 = `,
154207
+ join4 = `,
154208
154208
  ${indentation}`;
154209
154209
  for (i = 0; i < value.length - 1; i++) {
154210
154210
  const tmp2 = stringifyFullArr(i, value[i], stack, replacer, indent2);
154211
154211
  res += tmp2 !== void 0 ? tmp2 : "null";
154212
- res += join3;
154212
+ res += join4;
154213
154213
  }
154214
154214
  const tmp = stringifyFullArr(i, value[i], stack, replacer, indent2);
154215
154215
  res += tmp !== void 0 ? tmp : "null";
@@ -154230,7 +154230,7 @@ ${originalIndentation}`;
154230
154230
  indentation += indent2;
154231
154231
  res += `
154232
154232
  ${indentation}`;
154233
- join3 = `,
154233
+ join4 = `,
154234
154234
  ${indentation}`;
154235
154235
  var separator = "";
154236
154236
  for (i = 0; i < replacer.length; i++) {
@@ -154239,7 +154239,7 @@ ${indentation}`;
154239
154239
  const tmp = stringifyFullArr(key, value[key], stack, replacer, indent2);
154240
154240
  if (tmp !== void 0) {
154241
154241
  res += `${separator}"${strEscape(key)}": ${tmp}`;
154242
- separator = join3;
154242
+ separator = join4;
154243
154243
  }
154244
154244
  }
154245
154245
  }
@@ -154262,7 +154262,7 @@ ${originalIndentation}`;
154262
154262
  }
154263
154263
  }
154264
154264
  function stringifyIndent(key, value, stack, indent2) {
154265
- var i, res, join3;
154265
+ var i, res, join4;
154266
154266
  const originalIndentation = indentation;
154267
154267
  switch (typeof value) {
154268
154268
  case "object":
@@ -154292,12 +154292,12 @@ ${originalIndentation}`;
154292
154292
  indentation += indent2;
154293
154293
  res += `
154294
154294
  ${indentation}`;
154295
- join3 = `,
154295
+ join4 = `,
154296
154296
  ${indentation}`;
154297
154297
  for (i = 0; i < value.length - 1; i++) {
154298
154298
  const tmp2 = stringifyIndent(i, value[i], stack, indent2);
154299
154299
  res += tmp2 !== void 0 ? tmp2 : "null";
154300
- res += join3;
154300
+ res += join4;
154301
154301
  }
154302
154302
  const tmp = stringifyIndent(i, value[i], stack, indent2);
154303
154303
  res += tmp !== void 0 ? tmp : "null";
@@ -154319,7 +154319,7 @@ ${originalIndentation}`;
154319
154319
  indentation += indent2;
154320
154320
  res += `
154321
154321
  ${indentation}`;
154322
- join3 = `,
154322
+ join4 = `,
154323
154323
  ${indentation}`;
154324
154324
  var separator = "";
154325
154325
  for (i = 0; i < keys.length; i++) {
@@ -154327,7 +154327,7 @@ ${indentation}`;
154327
154327
  const tmp = stringifyIndent(key, value[key], stack, indent2);
154328
154328
  if (tmp !== void 0) {
154329
154329
  res += `${separator}"${strEscape(key)}": ${tmp}`;
154330
- separator = join3;
154330
+ separator = join4;
154331
154331
  }
154332
154332
  }
154333
154333
  if (separator !== "") {
@@ -172660,7 +172660,7 @@ var require_lodash2 = __commonJS({
172660
172660
  }
172661
172661
  return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
172662
172662
  });
172663
- function join3(array, separator) {
172663
+ function join4(array, separator) {
172664
172664
  return array == null ? "" : nativeJoin.call(array, separator);
172665
172665
  }
172666
172666
  function last(array) {
@@ -174584,7 +174584,7 @@ var require_lodash2 = __commonJS({
174584
174584
  lodash.isUndefined = isUndefined;
174585
174585
  lodash.isWeakMap = isWeakMap;
174586
174586
  lodash.isWeakSet = isWeakSet;
174587
- lodash.join = join3;
174587
+ lodash.join = join4;
174588
174588
  lodash.kebabCase = kebabCase;
174589
174589
  lodash.last = last;
174590
174590
  lodash.lastIndexOf = lastIndexOf;
@@ -179718,7 +179718,7 @@ var require_lodash3 = __commonJS({
179718
179718
  }
179719
179719
  return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
179720
179720
  });
179721
- function join3(array, separator) {
179721
+ function join4(array, separator) {
179722
179722
  return array == null ? "" : nativeJoin.call(array, separator);
179723
179723
  }
179724
179724
  function last(array) {
@@ -181642,7 +181642,7 @@ var require_lodash3 = __commonJS({
181642
181642
  lodash.isUndefined = isUndefined;
181643
181643
  lodash.isWeakMap = isWeakMap;
181644
181644
  lodash.isWeakSet = isWeakSet;
181645
- lodash.join = join3;
181645
+ lodash.join = join4;
181646
181646
  lodash.kebabCase = kebabCase;
181647
181647
  lodash.last = last;
181648
181648
  lodash.lastIndexOf = lastIndexOf;
@@ -283137,7 +283137,7 @@ var require_lodash5 = __commonJS({
283137
283137
  }
283138
283138
  return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
283139
283139
  });
283140
- function join3(array, separator) {
283140
+ function join4(array, separator) {
283141
283141
  return array == null ? "" : nativeJoin.call(array, separator);
283142
283142
  }
283143
283143
  function last(array) {
@@ -285061,7 +285061,7 @@ var require_lodash5 = __commonJS({
285061
285061
  lodash.isUndefined = isUndefined;
285062
285062
  lodash.isWeakMap = isWeakMap;
285063
285063
  lodash.isWeakSet = isWeakSet;
285064
- lodash.join = join3;
285064
+ lodash.join = join4;
285065
285065
  lodash.kebabCase = kebabCase;
285066
285066
  lodash.last = last;
285067
285067
  lodash.lastIndexOf = lastIndexOf;
@@ -294670,7 +294670,7 @@ function getIDToken(aud) {
294670
294670
 
294671
294671
  // src/index.ts
294672
294672
  var import_node_crypto4 = require("node:crypto");
294673
- var import_node_fs4 = require("node:fs");
294673
+ var import_node_fs5 = require("node:fs");
294674
294674
  var path9 = __toESM(require("node:path"), 1);
294675
294675
  var import_yaml4 = __toESM(require_dist(), 1);
294676
294676
 
@@ -296224,12 +296224,62 @@ function resolvePostmanEndpointProfile(stack, region = "us") {
296224
296224
 
296225
296225
  // src/lib/postman/credential-identity.ts
296226
296226
  var sessionPath = "/api/sessions/current";
296227
+ var SESSION_MAX_ATTEMPTS = 3;
296228
+ var SESSION_RETRY_BASE_DELAY_MS = 500;
296229
+ var SESSION_RETRY_MAX_DELAY_MS = 8e3;
296227
296230
  var pmakMemo = /* @__PURE__ */ new Map();
296228
296231
  var sessionMemo = /* @__PURE__ */ new Map();
296229
296232
  var memoizedSessionIdentity;
296233
+ var memoizedSessionFailure;
296234
+ function defaultSessionSleep(ms) {
296235
+ return new Promise((resolve5) => setTimeout(resolve5, ms));
296236
+ }
296237
+ function defaultRandom() {
296238
+ return Math.random();
296239
+ }
296240
+ function parseRetryAfterMs(value) {
296241
+ const trimmed = value?.trim();
296242
+ if (!trimmed) {
296243
+ return void 0;
296244
+ }
296245
+ if (/^\d+$/.test(trimmed)) {
296246
+ return Number(trimmed) * 1e3;
296247
+ }
296248
+ const dateMs = Date.parse(trimmed);
296249
+ if (!Number.isNaN(dateMs)) {
296250
+ return Math.max(0, dateMs - Date.now());
296251
+ }
296252
+ return void 0;
296253
+ }
296254
+ function parseRateLimitResetMs(value) {
296255
+ const trimmed = value?.trim();
296256
+ if (!trimmed || !/^\d+$/.test(trimmed)) {
296257
+ return void 0;
296258
+ }
296259
+ const seconds = Number(trimmed);
296260
+ const nowSeconds = Date.now() / 1e3;
296261
+ if (seconds > nowSeconds) {
296262
+ return Math.max(0, (seconds - nowSeconds) * 1e3);
296263
+ }
296264
+ return seconds * 1e3;
296265
+ }
296266
+ function computeSessionRetryDelayMs(response, attempt, random) {
296267
+ const headers = response?.headers;
296268
+ const signal = parseRetryAfterMs(headers?.get("retry-after") ?? null) ?? parseRateLimitResetMs(
296269
+ headers?.get("ratelimit-reset") ?? headers?.get("x-ratelimit-reset") ?? null
296270
+ );
296271
+ if (signal !== void 0) {
296272
+ return Math.min(Math.max(0, signal), SESSION_RETRY_MAX_DELAY_MS);
296273
+ }
296274
+ const ceiling = Math.min(SESSION_RETRY_MAX_DELAY_MS, SESSION_RETRY_BASE_DELAY_MS * 2 ** (attempt - 1));
296275
+ return Math.round(random() * ceiling);
296276
+ }
296230
296277
  function getMemoizedSessionIdentity() {
296231
296278
  return memoizedSessionIdentity;
296232
296279
  }
296280
+ function getSessionResolutionFailure() {
296281
+ return memoizedSessionFailure;
296282
+ }
296233
296283
  function asRecord2(value) {
296234
296284
  if (!value || typeof value !== "object" || Array.isArray(value)) {
296235
296285
  return void 0;
@@ -296298,46 +296348,90 @@ async function resolveSessionIdentity(opts) {
296298
296348
  const memoKey = `${baseUrl}::${accessToken}`;
296299
296349
  let pending = sessionMemo.get(memoKey);
296300
296350
  if (!pending) {
296301
- pending = probeSessionIdentity(baseUrl, accessToken, opts.fetchImpl ?? fetch);
296351
+ pending = probeSessionIdentity(
296352
+ baseUrl,
296353
+ accessToken,
296354
+ opts.fetchImpl ?? fetch,
296355
+ Math.max(1, opts.maxAttempts ?? SESSION_MAX_ATTEMPTS),
296356
+ opts.sleepImpl ?? defaultSessionSleep,
296357
+ opts.randomImpl ?? defaultRandom
296358
+ );
296302
296359
  sessionMemo.set(memoKey, pending);
296303
296360
  }
296304
296361
  return pending;
296305
296362
  }
296306
- async function probeSessionIdentity(baseUrl, accessToken, fetchImpl) {
296363
+ async function parseSessionResponse(response) {
296364
+ let payload;
296307
296365
  try {
296308
- const response = await fetchImpl(`${baseUrl}${sessionPath}`, {
296309
- method: "GET",
296310
- headers: { "x-access-token": accessToken }
296311
- });
296312
- if (!response.ok) {
296313
- return void 0;
296314
- }
296315
- const payload = asRecord2(await response.json());
296316
- if (!payload) {
296317
- return void 0;
296318
- }
296319
- const root = asRecord2(payload.session) ?? payload;
296320
- const identity = asRecord2(root.identity);
296321
- const data = asRecord2(root.data);
296322
- const user = asRecord2(data?.user);
296323
- const roleEntries = Array.isArray(user?.roles) ? user.roles.map((entry) => coerceText(entry) ?? coerceId(entry)).filter((entry) => Boolean(entry)) : [];
296324
- const singleRole = coerceText(user?.role);
296325
- const roles = roleEntries.length > 0 ? roleEntries : singleRole ? [singleRole] : void 0;
296326
- const resolved = {
296327
- source: "iapub/sessions",
296328
- userId: coerceId(identity?.user) ?? coerceId(user?.id),
296329
- fullName: coerceText(user?.fullName) ?? coerceText(user?.name) ?? coerceText(user?.username),
296330
- teamId: coerceId(identity?.team),
296331
- teamName: coerceText(user?.teamName),
296332
- teamDomain: coerceText(identity?.domain),
296333
- ...roles ? { roles } : {},
296334
- consumerType: coerceText(root.consumerType) ?? coerceText(data?.consumerType) ?? coerceText(user?.consumerType)
296335
- };
296336
- memoizedSessionIdentity = resolved;
296337
- return resolved;
296366
+ payload = asRecord2(await response.json());
296338
296367
  } catch {
296339
296368
  return void 0;
296340
296369
  }
296370
+ if (!payload) {
296371
+ return void 0;
296372
+ }
296373
+ const root = asRecord2(payload.session) ?? payload;
296374
+ const identity = asRecord2(root.identity);
296375
+ const data = asRecord2(root.data);
296376
+ const user = asRecord2(data?.user);
296377
+ const roleEntries = Array.isArray(user?.roles) ? user.roles.map((entry) => coerceText(entry) ?? coerceId(entry)).filter((entry) => Boolean(entry)) : [];
296378
+ const singleRole = coerceText(user?.role);
296379
+ const roles = roleEntries.length > 0 ? roleEntries : singleRole ? [singleRole] : void 0;
296380
+ return {
296381
+ source: "iapub/sessions",
296382
+ userId: coerceId(identity?.user) ?? coerceId(user?.id),
296383
+ fullName: coerceText(user?.fullName) ?? coerceText(user?.name) ?? coerceText(user?.username),
296384
+ teamId: coerceId(identity?.team),
296385
+ teamName: coerceText(user?.teamName),
296386
+ teamDomain: coerceText(identity?.domain),
296387
+ ...roles ? { roles } : {},
296388
+ consumerType: coerceText(root.consumerType) ?? coerceText(data?.consumerType) ?? coerceText(user?.consumerType)
296389
+ };
296390
+ }
296391
+ async function probeSessionIdentity(baseUrl, accessToken, fetchImpl, maxAttempts, sleepImpl, random) {
296392
+ let failure = "unavailable";
296393
+ for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
296394
+ let response;
296395
+ try {
296396
+ response = await fetchImpl(`${baseUrl}${sessionPath}`, {
296397
+ method: "GET",
296398
+ headers: { "x-access-token": accessToken }
296399
+ });
296400
+ } catch {
296401
+ failure = "unavailable";
296402
+ if (attempt < maxAttempts) {
296403
+ await sleepImpl(computeSessionRetryDelayMs(void 0, attempt, random));
296404
+ continue;
296405
+ }
296406
+ break;
296407
+ }
296408
+ if (response.ok) {
296409
+ const resolved = await parseSessionResponse(response);
296410
+ if (resolved) {
296411
+ memoizedSessionIdentity = resolved;
296412
+ memoizedSessionFailure = void 0;
296413
+ return resolved;
296414
+ }
296415
+ failure = "unavailable";
296416
+ break;
296417
+ }
296418
+ if (response.status === 401 || response.status === 403) {
296419
+ failure = "auth";
296420
+ break;
296421
+ }
296422
+ if (response.status === 429 || response.status >= 500) {
296423
+ failure = "unavailable";
296424
+ if (attempt < maxAttempts) {
296425
+ await sleepImpl(computeSessionRetryDelayMs(response, attempt, random));
296426
+ continue;
296427
+ }
296428
+ break;
296429
+ }
296430
+ failure = "unavailable";
296431
+ break;
296432
+ }
296433
+ memoizedSessionFailure = failure;
296434
+ return void 0;
296341
296435
  }
296342
296436
  function describeTeam(id) {
296343
296437
  const label = id?.teamName ?? id?.teamDomain;
@@ -296428,7 +296522,9 @@ async function runCredentialPreflight(args) {
296428
296522
  session = await resolveSessionIdentity({
296429
296523
  iapubBaseUrl: args.iapubBaseUrl,
296430
296524
  accessToken,
296431
- fetchImpl: args.fetchImpl
296525
+ fetchImpl: args.fetchImpl,
296526
+ ...args.sleepImpl ? { sleepImpl: args.sleepImpl } : {},
296527
+ ...args.randomImpl ? { randomImpl: args.randomImpl } : {}
296432
296528
  });
296433
296529
  } catch (error2) {
296434
296530
  args.log.warning(
@@ -296448,11 +296544,20 @@ async function runCredentialPreflight(args) {
296448
296544
  );
296449
296545
  }
296450
296546
  } else {
296547
+ const failure = getSessionResolutionFailure();
296548
+ const detail = failure === "auth" ? "the access token was rejected by iapub (401/403), so it is invalid or expired. Re-mint it with postman-resolve-service-token-action (or POST https://api.getpostman.com/service-account-tokens) and re-run." : "iapub was unreachable after retries (network or 5xx). This is usually transient; re-run the job.";
296549
+ const base = "postman: credential preflight could not resolve the access-token session identity from iapub: " + detail;
296550
+ if (args.mode === "enforce") {
296551
+ throw new Error(
296552
+ mask(
296553
+ `${base} (credential-preflight: enforce requires a resolvable session identity; use credential-preflight: warn to continue with reactive error guidance only.)`
296554
+ )
296555
+ );
296556
+ }
296451
296557
  args.log.warning(
296452
- mask(
296453
- "postman: credential preflight could not resolve the access-token session identity from iapub; continuing with reactive error guidance only"
296454
- )
296558
+ mask(`${base} Continuing with reactive error guidance only (credential-preflight: warn).`)
296455
296559
  );
296560
+ return;
296456
296561
  }
296457
296562
  const result = crossCheckIdentities({
296458
296563
  pmak,
@@ -298779,6 +298884,7 @@ function buildContractIndex(root) {
298779
298884
  parameterChecks,
298780
298885
  requestBody: collectRequestBody(root, operation, version2, operationId, opWarnings),
298781
298886
  security: collectSecurityRuntimeChecks(root, operation),
298887
+ pathMethods: Object.keys(pathItem).filter((key) => HTTP_METHODS.has(key)).map((key) => key.toUpperCase()),
298782
298888
  warnings: opWarnings
298783
298889
  });
298784
298890
  }
@@ -298955,7 +299061,7 @@ function buildValidatorAssignments(operation, warnings, skipped) {
298955
299061
  return lines;
298956
299062
  }
298957
299063
  function createContractScript(operation, warnings = []) {
298958
- const contract = { method: operation.method, path: operation.path, responses: operation.responses, security: operation.security, parameters: operation.parameterChecks };
299064
+ const contract = { method: operation.method, path: operation.path, responses: operation.responses, security: operation.security, parameters: operation.parameterChecks, pathMethods: operation.pathMethods };
298959
299065
  const skipped = [];
298960
299066
  const validatorLines = buildValidatorAssignments(operation, warnings, skipped);
298961
299067
  return [
@@ -299066,6 +299172,61 @@ function createContractScript(operation, warnings = []) {
299066
299172
  ' if (!isJsonSubtype(actual.subtype) && media.media.schema && media.media.schema.type !== "string") { return; }',
299067
299173
  ' if (!validate(value)) pm.expect.fail("OpenAPI schema validation failed for " + contract.method + " " + contract.path + " status " + pm.response.code + ": " + JSON.stringify(validate.errors || []));',
299068
299174
  "});",
299175
+ "pm.test('Response satisfies RFC 9110 status-code requirements', function () {",
299176
+ " var code = pm.response.code;",
299177
+ ' function respHeader(name) { return pm.response.headers.get(name) || ""; }',
299178
+ " if (code === 401) {",
299179
+ ' var challenge = respHeader("WWW-Authenticate");',
299180
+ ' if (!challenge) pm.expect.fail("RFC 9110 requires WWW-Authenticate on 401 responses");',
299181
+ ' var wantsBearer = (contract.security || []).some(function (alternative) { return alternative.some(function (check) { return check.prefix && check.prefix.toLowerCase().indexOf("bearer") === 0; }); });',
299182
+ ' if (wantsBearer && challenge && challenge.toLowerCase().indexOf("bearer") === -1) pm.expect.fail("RFC 6750 expects a Bearer challenge on 401 for bearer-secured operations; got: " + challenge);',
299183
+ " }",
299184
+ " if (code === 405) {",
299185
+ ' var allow = respHeader("Allow");',
299186
+ ' if (!allow) pm.expect.fail("RFC 9110 requires Allow on 405 responses");',
299187
+ ' var allowed = allow.split(",").map(function (entry) { return entry.trim().toUpperCase(); });',
299188
+ ' (contract.pathMethods || []).forEach(function (method) { if (allowed.indexOf(method) === -1) pm.expect.fail("Allow on 405 must list every method the OpenAPI path declares (RFC 9110); missing " + method + " in: " + allow); });',
299189
+ " }",
299190
+ ' if (code === 304 && responseText().trim().length > 0) pm.expect.fail("RFC 9110 forbids content in a 304 response");',
299191
+ " if (code === 206) {",
299192
+ ' var range = respHeader("Content-Range");',
299193
+ ' if (!range) pm.expect.fail("RFC 9110 requires Content-Range on a single-part 206 response");',
299194
+ ' if (range && !/^\\S+ (\\d+-\\d+|\\*)\\/(\\d+|\\*)$/.test(range)) pm.expect.fail("Content-Range is not a valid RFC 9110 range: " + range);',
299195
+ " }",
299196
+ ' var retryAfter = respHeader("Retry-After");',
299197
+ " if (retryAfter && (code === 429 || code === 503 || (code >= 300 && code < 400))) {",
299198
+ ' if (!/^\\d+$/.test(retryAfter.trim()) && isNaN(Date.parse(retryAfter))) pm.expect.fail("Retry-After must be delay-seconds or an HTTP-date (RFC 9110): " + retryAfter);',
299199
+ " }",
299200
+ ' var location = respHeader("Location");',
299201
+ " if (location && (code === 201 || (code >= 300 && code < 400))) {",
299202
+ ' if (/\\s/.test(location.trim()) || location.trim().length === 0) pm.expect.fail("Location must be a valid URI-reference (RFC 9110 / RFC 3986): " + location);',
299203
+ " }",
299204
+ "});",
299205
+ "pm.test('Error and encoding conventions match RFC 9457 / RFC 8259 / RFC 8288', function () {",
299206
+ ' var contentTypeRaw = pm.response.headers.get("Content-Type") || "";',
299207
+ " var ct = mediaParts(contentTypeRaw);",
299208
+ ' if (ct.type === "application" && ct.subtype === "problem+json") {',
299209
+ " var problem;",
299210
+ ' try { problem = pm.response.json(); } catch (error) { pm.expect.fail("application/problem+json body is not valid JSON (RFC 9457): " + error); }',
299211
+ ' if (!problem || typeof problem !== "object" || Array.isArray(problem)) pm.expect.fail("problem details must be a JSON object (RFC 9457)");',
299212
+ ' ["type", "title", "detail", "instance"].forEach(function (member) { if (problem[member] !== undefined && typeof problem[member] !== "string") pm.expect.fail("RFC 9457 " + member + " member must be a string; got " + typeof problem[member]); });',
299213
+ " if (problem.status !== undefined) {",
299214
+ ' if (typeof problem.status !== "number") pm.expect.fail("RFC 9457 status member must be a number; got " + typeof problem.status);',
299215
+ ' else if (problem.status !== pm.response.code) pm.expect.fail("RFC 9457 status member (" + problem.status + ") must match the HTTP status code (" + pm.response.code + ")");',
299216
+ " }",
299217
+ " }",
299218
+ " if (isJsonSubtype(ct.subtype)) {",
299219
+ ' var charsetMatch = contentTypeRaw.match(/charset\\s*=\\s*"?([^";\\s]+)"?/i);',
299220
+ ' if (charsetMatch && charsetMatch[1].toLowerCase() !== "utf-8") pm.expect.fail("JSON interchange must be UTF-8 (RFC 8259); got charset=" + charsetMatch[1]);',
299221
+ " }",
299222
+ ' var link = pm.response.headers.get("Link");',
299223
+ " if (link) {",
299224
+ " link.split(/,(?=\\s*<)/).forEach(function (value) {",
299225
+ ' if (!/^\\s*<[^>]*>/.test(value)) pm.expect.fail("RFC 8288 link-value must start with a <URI-Reference>: " + value);',
299226
+ ' if (!/;\\s*rel\\s*=/i.test(value)) pm.expect.fail("RFC 8288 link-value must carry a rel parameter: " + value);',
299227
+ " });",
299228
+ " }",
299229
+ "});",
299069
299230
  ...operation.security ? [
299070
299231
  "pm.test('Request carries credentials required by OpenAPI security', function () {",
299071
299232
  " function satisfied(check) {",
@@ -299495,6 +299656,15 @@ function asRecord7(value) {
299495
299656
  }
299496
299657
  return value;
299497
299658
  }
299659
+ function adviseWorkspaceFlipForbidden(error2) {
299660
+ if (error2 instanceof HttpError && error2.status === 403) {
299661
+ const body = error2.responseBody || "";
299662
+ if (/addWorkspaceLevelTeamRoles/i.test(body) || /You are not authorized to perform this action/i.test(body)) {
299663
+ return new Error(WORKSPACE_PERSONAL_ONLY_ADVICE, { cause: error2 });
299664
+ }
299665
+ }
299666
+ return error2;
299667
+ }
299498
299668
  function extractGitRepoUrl(value) {
299499
299669
  if (!value) return null;
299500
299670
  if (typeof value === "string") {
@@ -299800,7 +299970,7 @@ var PostmanGatewayAssetsClient = class _PostmanGatewayAssetsClient {
299800
299970
  }
299801
299971
  } catch (error2) {
299802
299972
  await this.deleteWorkspace(workspaceId).catch(() => void 0);
299803
- throw error2;
299973
+ throw adviseWorkspaceFlipForbidden(error2);
299804
299974
  }
299805
299975
  return { id: workspaceId };
299806
299976
  }
@@ -301057,7 +301227,7 @@ function resolveActionVersion(explicit) {
301057
301227
  if (explicit) {
301058
301228
  return explicit;
301059
301229
  }
301060
- return "2.1.2" ? "2.1.2" : "unknown";
301230
+ return typeof __ACTION_VERSION__ !== "undefined" && __ACTION_VERSION__ ? __ACTION_VERSION__ : "unknown";
301061
301231
  }
301062
301232
  function telemetryDisabled(env) {
301063
301233
  const flag = String(env.POSTMAN_ACTIONS_TELEMETRY ?? "").trim().toLowerCase();
@@ -301179,11 +301349,23 @@ function createTelemetryContext(options) {
301179
301349
  };
301180
301350
  }
301181
301351
 
301182
- // src/lib/spec/openapi-loader.ts
301352
+ // src/action-version.ts
301183
301353
  var import_node_fs3 = require("node:fs");
301354
+ var import_node_path3 = require("node:path");
301355
+ function resolveActionVersion2() {
301356
+ try {
301357
+ const raw = (0, import_node_fs3.readFileSync)((0, import_node_path3.join)(__dirname, "..", "package.json"), "utf8");
301358
+ return JSON.parse(raw).version ?? "unknown";
301359
+ } catch {
301360
+ return "unknown";
301361
+ }
301362
+ }
301363
+
301364
+ // src/lib/spec/openapi-loader.ts
301365
+ var import_node_fs4 = require("node:fs");
301184
301366
  var import_promises3 = require("node:fs/promises");
301185
301367
  var import_node_url2 = require("node:url");
301186
- var import_node_path3 = __toESM(require("node:path"), 1);
301368
+ var import_node_path4 = __toESM(require("node:path"), 1);
301187
301369
 
301188
301370
  // node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/convert-path-to-posix.js
301189
301371
  var win32Sep = "\\";
@@ -301524,14 +301706,14 @@ function fromFileSystemPath(path10) {
301524
301706
  const hasProjectUri = upperPath.includes(posixUpper);
301525
301707
  const isAbsolutePath = isAbsoluteWin32Path.test(path10) || path10.startsWith("http://") || path10.startsWith("https://") || path10.startsWith("file://");
301526
301708
  if (!(hasProjectDir || hasProjectUri || isAbsolutePath) && !projectDir.startsWith("http")) {
301527
- const join3 = (a, b) => {
301709
+ const join4 = (a, b) => {
301528
301710
  if (a.endsWith("/") || a.endsWith("\\")) {
301529
301711
  return a + b;
301530
301712
  } else {
301531
301713
  return a + "/" + b;
301532
301714
  }
301533
301715
  };
301534
- path10 = join3(projectDir, path10);
301716
+ path10 = join4(projectDir, path10);
301535
301717
  }
301536
301718
  path10 = convertPathToPosix(path10);
301537
301719
  }
@@ -305646,6 +305828,7 @@ function inventory$Ref($refParent, $refKey, path10, scopeBase, dynamicIdScope, p
305646
305828
  const file = stripHash(pointer.path);
305647
305829
  const hash = getHash(pointer.path);
305648
305830
  const external = file !== $refs._root$Ref.path && !$refs._aliases[file];
305831
+ const nestedResource = Boolean($refs._aliases[file]) && pointer.$ref.value !== $refs._root$Ref.value;
305649
305832
  const extended = ref_default.isExtended$Ref($ref);
305650
305833
  indirections += pointer.indirections;
305651
305834
  const existingEntry = findInInventory(inventory, $refParent, $refKey);
@@ -305679,6 +305862,8 @@ function inventory$Ref($refParent, $refKey, path10, scopeBase, dynamicIdScope, p
305679
305862
  // Does this $ref extend its resolved value? (i.e. it has extra properties, in addition to "$ref")
305680
305863
  external,
305681
305864
  // Does this $ref pointer point to a file other than the main JSON Schema file?
305865
+ nestedResource,
305866
+ // Does this $ref resolve to an embedded schema resource with its own $id?
305682
305867
  indirections
305683
305868
  // The number of indirect references that were traversed to resolve the value
305684
305869
  });
@@ -305714,7 +305899,7 @@ function remap(inventory, options, rootId) {
305714
305899
  for (const entry of inventory) {
305715
305900
  const bundleOpts = options.bundle || {};
305716
305901
  if (!entry.external) {
305717
- if (bundleOpts.optimizeInternalRefs !== false) {
305902
+ if (bundleOpts.optimizeInternalRefs !== false && !entry.nestedResource) {
305718
305903
  entry.$ref.$ref = entry.hash;
305719
305904
  }
305720
305905
  } else if (entry.file === file && entry.hash === hash) {
@@ -313518,22 +313703,22 @@ async function loadOpenApiContractSpec(specUrl, options = {}) {
313518
313703
  async function loadOpenApiContractSpecFromPath(specPath, options = {}) {
313519
313704
  if (!specPath) throw new Error("CONTRACT_SPEC_READ_FAILED: spec-path must not be empty");
313520
313705
  const workspaceRoot = (() => {
313521
- const root = import_node_path3.default.resolve(process.env.GITHUB_WORKSPACE ?? process.cwd());
313706
+ const root = import_node_path4.default.resolve(process.env.GITHUB_WORKSPACE ?? process.cwd());
313522
313707
  try {
313523
- return (0, import_node_fs3.realpathSync)(root);
313708
+ return (0, import_node_fs4.realpathSync)(root);
313524
313709
  } catch {
313525
313710
  return root;
313526
313711
  }
313527
313712
  })();
313528
- const resolved = import_node_path3.default.resolve(workspaceRoot, specPath);
313713
+ const resolved = import_node_path4.default.resolve(workspaceRoot, specPath);
313529
313714
  let absolutePath;
313530
313715
  try {
313531
- absolutePath = (0, import_node_fs3.realpathSync)(resolved);
313716
+ absolutePath = (0, import_node_fs4.realpathSync)(resolved);
313532
313717
  } catch (error2) {
313533
313718
  throw new Error(`CONTRACT_SPEC_READ_FAILED: Unable to read spec at ${specPath}`, { cause: error2 });
313534
313719
  }
313535
- const rel = import_node_path3.default.relative(workspaceRoot, absolutePath);
313536
- if (!rel || rel.startsWith("..") || import_node_path3.default.isAbsolute(rel)) {
313720
+ const rel = import_node_path4.default.relative(workspaceRoot, absolutePath);
313721
+ if (!rel || rel.startsWith("..") || import_node_path4.default.isAbsolute(rel)) {
313537
313722
  throw new Error(`CONTRACT_SPEC_READ_FAILED: spec-path must resolve inside ${workspaceRoot}, got: ${specPath}`);
313538
313723
  }
313539
313724
  const maxBytes = options.maxBytesPerResource ?? SAFE_FETCH_LIMITS.maxBytesPerResource;
@@ -313947,6 +314132,17 @@ function buildOperationScript(operation, index, warnings) {
313947
314132
  ' pm.expect(pm.response.code, "GraphQL responses are HTTP 200 even when the data field carries errors").to.be.below(500);',
313948
314133
  "});"
313949
314134
  );
314135
+ lines.push(
314136
+ "pm.test(" + JSON.stringify("[" + label + "] GraphQL-over-HTTP media type and status are consistent") + ", function () {",
314137
+ ' var contentType = ((pm.response.headers && pm.response.headers.get && pm.response.headers.get("Content-Type")) || "").toLowerCase();',
314138
+ ' var mediaType = contentType.split(";")[0].trim();',
314139
+ " if (!mediaType) return;",
314140
+ ' if (mediaType !== "application/graphql-response+json" && mediaType !== "application/json") { pm.expect.fail("GraphQL-over-HTTP responses use application/graphql-response+json or application/json; got: " + (mediaType || "<missing>")); }',
314141
+ " var wellFormed = gqlBody.data !== undefined || Array.isArray(gqlBody.errors);",
314142
+ ' if (mediaType === "application/graphql-response+json" && pm.response.code >= 200 && pm.response.code < 300 && !wellFormed) { pm.expect.fail("application/graphql-response+json forbids a 2xx status when the body is not a well-formed GraphQL response"); }',
314143
+ ' if (mediaType === "application/json" && gqlBody.data !== undefined && gqlBody.data !== null && pm.response.code !== 200) { pm.expect.fail("a GraphQL response carrying data over application/json must be HTTP 200; got " + pm.response.code); }',
314144
+ "});"
314145
+ );
313950
314146
  lines.push(
313951
314147
  `pm.test(${JSON.stringify(`[${label}] GraphQL errors are well-formed and not a total failure`)}, function () {`,
313952
314148
  " var errors = gqlBody.errors;",
@@ -315487,6 +315683,8 @@ function createSoapScript(operation, warnings = []) {
315487
315683
  hasOutput: Boolean(operation.output)
315488
315684
  };
315489
315685
  const responseRegex = operation.expectedResponseElement ? elementPresenceRegex(operation.expectedResponseElement) : "";
315686
+ const mediaType = operation.soapVersion === "1.2" ? "application/soap+xml" : "text/xml";
315687
+ const faultStatusLine = operation.soapVersion === "1.2" ? ' if (faulted && code !== 500 && code !== 400) pm.expect.fail("SOAP 1.2 Faults ride HTTP 500, or 400 for env:Sender faults (SOAP 1.2 Part 2 HTTP binding); got HTTP " + code);' : ' if (faulted && code !== 500) pm.expect.fail("SOAP 1.1 Faults must ride HTTP 500 (WS-I Basic Profile R1126); got HTTP " + code);';
315490
315688
  const lines = [
315491
315689
  `var soap = JSON.parse(${JSON.stringify(JSON.stringify(meta))});`,
315492
315690
  'var bodyText = (pm.response.text && pm.response.text()) || "";',
@@ -315497,9 +315695,11 @@ function createSoapScript(operation, warnings = []) {
315497
315695
  " pm.response.to.have.status(200);",
315498
315696
  "});",
315499
315697
  "",
315500
- "pm.test('SOAP response Content-Type is XML', function () {",
315698
+ // SOAP 1.1 responses bind to text/xml (SOAP 1.1 HTTP binding, WS-I Basic
315699
+ // Profile); SOAP 1.2 responses bind to application/soap+xml (RFC 3902).
315700
+ `pm.test('SOAP response Content-Type matches the SOAP ${operation.soapVersion} binding', function () {`,
315501
315701
  ' var ct = header("Content-Type").toLowerCase();',
315502
- ' pm.expect(ct, "expected an XML SOAP content-type, got: " + ct).to.match(/(?:text\\/xml|application\\/soap\\+xml|application\\/xml|\\+xml)/);',
315702
+ ` pm.expect(ct, "SOAP ${operation.soapVersion} responses use ${mediaType} (got: " + (ct || "<missing>") + ")").to.include("${mediaType}");`,
315503
315703
  "});",
315504
315704
  "",
315505
315705
  "pm.test('SOAP Envelope element is present', function () {",
@@ -315516,6 +315716,13 @@ function createSoapScript(operation, warnings = []) {
315516
315716
  ' var detail = (bodyText.match(/<(?:[A-Za-z_][\\w.-]*:)?(?:faultstring|Reason|Text)[^>]*>([\\s\\S]*?)<\\//) || [])[1] || "";',
315517
315717
  ' pm.expect.fail("SOAP Fault returned for operation " + soap.name + (detail ? (": " + detail.trim()) : ""));',
315518
315718
  " }",
315719
+ "});",
315720
+ "",
315721
+ "pm.test('SOAP Fault and HTTP status are consistent', function () {",
315722
+ ' var faulted = matchTag("Fault").test(bodyText);',
315723
+ " var code = pm.response.code;",
315724
+ faultStatusLine,
315725
+ ' if (!faulted && code === 500) pm.expect.fail("HTTP 500 from a SOAP endpoint must carry a SOAP Fault in the body");',
315519
315726
  "});"
315520
315727
  ];
315521
315728
  if (responseRegex) {
@@ -316767,6 +316974,7 @@ function normalizeSpecDocument(raw, warn) {
316767
316974
  async function runBootstrap(inputs, dependencies) {
316768
316975
  const telemetry = createTelemetryContext({
316769
316976
  action: "postman-bootstrap-action",
316977
+ actionVersion: resolveActionVersion2(),
316770
316978
  logger: dependencies.core
316771
316979
  });
316772
316980
  try {
@@ -317173,7 +317381,7 @@ async function runBootstrapInner(inputs, dependencies, telemetry) {
317173
317381
  async () => {
317174
317382
  if (inputs.specPath) {
317175
317383
  const workspaceRoot = path9.resolve(process.env.GITHUB_WORKSPACE ?? process.cwd());
317176
- return (0, import_node_fs4.readFileSync)(path9.resolve(workspaceRoot, inputs.specPath), "utf8");
317384
+ return (0, import_node_fs5.readFileSync)(path9.resolve(workspaceRoot, inputs.specPath), "utf8");
317177
317385
  }
317178
317386
  if (dependencies.specFetcher === fetch) {
317179
317387
  return safeFetchText(inputs.specUrl, { depth: 0 });