@postman-cse/onboarding-bootstrap 2.1.1 → 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/README.md +4 -0
- package/dist/action.cjs +393 -175
- package/dist/cli.cjs +411 -193
- package/dist/index.cjs +393 -175
- package/package.json +6 -5
package/dist/index.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
|
|
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 =
|
|
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) =>
|
|
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",
|
|
127443
|
-
const prefix = wrap("", node.description, "\n") +
|
|
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
|
-
|
|
127447
|
-
|
|
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(" ",
|
|
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("(",
|
|
127463
|
+
let argsLine = prefix + wrap("(", join4(args, ", "), ")");
|
|
127464
127464
|
if (argsLine.length > MAX_LINE_LENGTH) {
|
|
127465
|
-
argsLine = prefix + wrap("(\n", indent2(
|
|
127465
|
+
argsLine = prefix + wrap("(\n", indent2(join4(args, "\n")), "\n)");
|
|
127466
127466
|
}
|
|
127467
|
-
return
|
|
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(" ",
|
|
127475
|
+
leave: ({ name, directives }) => "..." + name + wrap(" ", join4(directives, " "))
|
|
127476
127476
|
},
|
|
127477
127477
|
InlineFragment: {
|
|
127478
|
-
leave: ({ typeCondition, directives, selectionSet }) =>
|
|
127478
|
+
leave: ({ typeCondition, directives, selectionSet }) => join4(
|
|
127479
127479
|
[
|
|
127480
127480
|
"...",
|
|
127481
127481
|
wrap("on ", typeCondition),
|
|
127482
|
-
|
|
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("(",
|
|
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 }) => "[" +
|
|
127520
|
+
leave: ({ values }) => "[" + join4(values, ", ") + "]"
|
|
127521
127521
|
},
|
|
127522
127522
|
ObjectValue: {
|
|
127523
|
-
leave: ({ 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("(",
|
|
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") +
|
|
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") +
|
|
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") +
|
|
127553
|
+
leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join4(
|
|
127554
127554
|
[
|
|
127555
127555
|
"type",
|
|
127556
127556
|
name,
|
|
127557
|
-
wrap("implements ",
|
|
127558
|
-
|
|
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(
|
|
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") +
|
|
127569
|
-
[name + ": " + type, wrap("= ", defaultValue),
|
|
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") +
|
|
127574
|
+
leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join4(
|
|
127575
127575
|
[
|
|
127576
127576
|
"interface",
|
|
127577
127577
|
name,
|
|
127578
|
-
wrap("implements ",
|
|
127579
|
-
|
|
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") +
|
|
127587
|
-
["union", name,
|
|
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") +
|
|
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") +
|
|
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") +
|
|
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(
|
|
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 }) =>
|
|
127612
|
-
["extend schema",
|
|
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 }) =>
|
|
127617
|
+
leave: ({ name, directives }) => join4(["extend scalar", name, join4(directives, " ")], " ")
|
|
127618
127618
|
},
|
|
127619
127619
|
ObjectTypeExtension: {
|
|
127620
|
-
leave: ({ name, interfaces, directives, fields }) =>
|
|
127620
|
+
leave: ({ name, interfaces, directives, fields }) => join4(
|
|
127621
127621
|
[
|
|
127622
127622
|
"extend type",
|
|
127623
127623
|
name,
|
|
127624
|
-
wrap("implements ",
|
|
127625
|
-
|
|
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 }) =>
|
|
127632
|
+
leave: ({ name, interfaces, directives, fields }) => join4(
|
|
127633
127633
|
[
|
|
127634
127634
|
"extend interface",
|
|
127635
127635
|
name,
|
|
127636
|
-
wrap("implements ",
|
|
127637
|
-
|
|
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 }) =>
|
|
127644
|
+
leave: ({ name, directives, types: types2 }) => join4(
|
|
127645
127645
|
[
|
|
127646
127646
|
"extend union",
|
|
127647
127647
|
name,
|
|
127648
|
-
|
|
127649
|
-
wrap("= ",
|
|
127648
|
+
join4(directives, " "),
|
|
127649
|
+
wrap("= ", join4(types2, " | "))
|
|
127650
127650
|
],
|
|
127651
127651
|
" "
|
|
127652
127652
|
)
|
|
127653
127653
|
},
|
|
127654
127654
|
EnumTypeExtension: {
|
|
127655
|
-
leave: ({ name, directives, values }) =>
|
|
127655
|
+
leave: ({ name, directives, values }) => join4(["extend enum", name, join4(directives, " "), block(values)], " ")
|
|
127656
127656
|
},
|
|
127657
127657
|
InputObjectTypeExtension: {
|
|
127658
|
-
leave: ({ name, directives, fields }) =>
|
|
127658
|
+
leave: ({ name, directives, fields }) => join4(["extend input", name, join4(directives, " "), block(fields)], " ")
|
|
127659
127659
|
},
|
|
127660
127660
|
DirectiveExtension: {
|
|
127661
|
-
leave: ({ name, 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 }) =>
|
|
127668
|
+
leave: ({ name, memberName }) => join4([name, wrap(".", memberName)])
|
|
127669
127669
|
},
|
|
127670
127670
|
ArgumentCoordinate: {
|
|
127671
|
-
leave: ({ name, fieldName, argumentName }) =>
|
|
127671
|
+
leave: ({ name, fieldName, argumentName }) => join4([name, wrap(".", fieldName), wrap("(", argumentName, ":)")])
|
|
127672
127672
|
},
|
|
127673
127673
|
DirectiveCoordinate: {
|
|
127674
|
-
leave: ({ name }) =>
|
|
127674
|
+
leave: ({ name }) => join4(["@", name])
|
|
127675
127675
|
},
|
|
127676
127676
|
DirectiveArgumentCoordinate: {
|
|
127677
|
-
leave: ({ name, argumentName }) =>
|
|
127677
|
+
leave: ({ name, argumentName }) => join4(["@", name, wrap("(", argumentName, ":)")])
|
|
127678
127678
|
}
|
|
127679
127679
|
};
|
|
127680
|
-
function
|
|
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(
|
|
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
|
|
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) :
|
|
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 =
|
|
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,
|
|
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
|
-
|
|
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 +=
|
|
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
|
-
|
|
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 =
|
|
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,
|
|
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
|
-
|
|
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 +=
|
|
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
|
-
|
|
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 =
|
|
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,
|
|
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
|
-
|
|
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 +=
|
|
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
|
-
|
|
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 =
|
|
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
|
|
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 =
|
|
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
|
|
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 =
|
|
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
|
|
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 =
|
|
285064
|
+
lodash.join = join4;
|
|
285065
285065
|
lodash.kebabCase = kebabCase;
|
|
285066
285066
|
lodash.last = last;
|
|
285067
285067
|
lodash.lastIndexOf = lastIndexOf;
|
|
@@ -294687,7 +294687,7 @@ function getIDToken(aud) {
|
|
|
294687
294687
|
|
|
294688
294688
|
// src/index.ts
|
|
294689
294689
|
var import_node_crypto4 = require("node:crypto");
|
|
294690
|
-
var
|
|
294690
|
+
var import_node_fs5 = require("node:fs");
|
|
294691
294691
|
var path9 = __toESM(require("node:path"), 1);
|
|
294692
294692
|
var import_yaml4 = __toESM(require_dist(), 1);
|
|
294693
294693
|
|
|
@@ -296241,12 +296241,62 @@ function resolvePostmanEndpointProfile(stack, region = "us") {
|
|
|
296241
296241
|
|
|
296242
296242
|
// src/lib/postman/credential-identity.ts
|
|
296243
296243
|
var sessionPath = "/api/sessions/current";
|
|
296244
|
+
var SESSION_MAX_ATTEMPTS = 3;
|
|
296245
|
+
var SESSION_RETRY_BASE_DELAY_MS = 500;
|
|
296246
|
+
var SESSION_RETRY_MAX_DELAY_MS = 8e3;
|
|
296244
296247
|
var pmakMemo = /* @__PURE__ */ new Map();
|
|
296245
296248
|
var sessionMemo = /* @__PURE__ */ new Map();
|
|
296246
296249
|
var memoizedSessionIdentity;
|
|
296250
|
+
var memoizedSessionFailure;
|
|
296251
|
+
function defaultSessionSleep(ms) {
|
|
296252
|
+
return new Promise((resolve5) => setTimeout(resolve5, ms));
|
|
296253
|
+
}
|
|
296254
|
+
function defaultRandom() {
|
|
296255
|
+
return Math.random();
|
|
296256
|
+
}
|
|
296257
|
+
function parseRetryAfterMs(value) {
|
|
296258
|
+
const trimmed = value?.trim();
|
|
296259
|
+
if (!trimmed) {
|
|
296260
|
+
return void 0;
|
|
296261
|
+
}
|
|
296262
|
+
if (/^\d+$/.test(trimmed)) {
|
|
296263
|
+
return Number(trimmed) * 1e3;
|
|
296264
|
+
}
|
|
296265
|
+
const dateMs = Date.parse(trimmed);
|
|
296266
|
+
if (!Number.isNaN(dateMs)) {
|
|
296267
|
+
return Math.max(0, dateMs - Date.now());
|
|
296268
|
+
}
|
|
296269
|
+
return void 0;
|
|
296270
|
+
}
|
|
296271
|
+
function parseRateLimitResetMs(value) {
|
|
296272
|
+
const trimmed = value?.trim();
|
|
296273
|
+
if (!trimmed || !/^\d+$/.test(trimmed)) {
|
|
296274
|
+
return void 0;
|
|
296275
|
+
}
|
|
296276
|
+
const seconds = Number(trimmed);
|
|
296277
|
+
const nowSeconds = Date.now() / 1e3;
|
|
296278
|
+
if (seconds > nowSeconds) {
|
|
296279
|
+
return Math.max(0, (seconds - nowSeconds) * 1e3);
|
|
296280
|
+
}
|
|
296281
|
+
return seconds * 1e3;
|
|
296282
|
+
}
|
|
296283
|
+
function computeSessionRetryDelayMs(response, attempt, random) {
|
|
296284
|
+
const headers = response?.headers;
|
|
296285
|
+
const signal = parseRetryAfterMs(headers?.get("retry-after") ?? null) ?? parseRateLimitResetMs(
|
|
296286
|
+
headers?.get("ratelimit-reset") ?? headers?.get("x-ratelimit-reset") ?? null
|
|
296287
|
+
);
|
|
296288
|
+
if (signal !== void 0) {
|
|
296289
|
+
return Math.min(Math.max(0, signal), SESSION_RETRY_MAX_DELAY_MS);
|
|
296290
|
+
}
|
|
296291
|
+
const ceiling = Math.min(SESSION_RETRY_MAX_DELAY_MS, SESSION_RETRY_BASE_DELAY_MS * 2 ** (attempt - 1));
|
|
296292
|
+
return Math.round(random() * ceiling);
|
|
296293
|
+
}
|
|
296247
296294
|
function getMemoizedSessionIdentity() {
|
|
296248
296295
|
return memoizedSessionIdentity;
|
|
296249
296296
|
}
|
|
296297
|
+
function getSessionResolutionFailure() {
|
|
296298
|
+
return memoizedSessionFailure;
|
|
296299
|
+
}
|
|
296250
296300
|
function asRecord2(value) {
|
|
296251
296301
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
296252
296302
|
return void 0;
|
|
@@ -296315,46 +296365,90 @@ async function resolveSessionIdentity(opts) {
|
|
|
296315
296365
|
const memoKey = `${baseUrl}::${accessToken}`;
|
|
296316
296366
|
let pending = sessionMemo.get(memoKey);
|
|
296317
296367
|
if (!pending) {
|
|
296318
|
-
pending = probeSessionIdentity(
|
|
296368
|
+
pending = probeSessionIdentity(
|
|
296369
|
+
baseUrl,
|
|
296370
|
+
accessToken,
|
|
296371
|
+
opts.fetchImpl ?? fetch,
|
|
296372
|
+
Math.max(1, opts.maxAttempts ?? SESSION_MAX_ATTEMPTS),
|
|
296373
|
+
opts.sleepImpl ?? defaultSessionSleep,
|
|
296374
|
+
opts.randomImpl ?? defaultRandom
|
|
296375
|
+
);
|
|
296319
296376
|
sessionMemo.set(memoKey, pending);
|
|
296320
296377
|
}
|
|
296321
296378
|
return pending;
|
|
296322
296379
|
}
|
|
296323
|
-
async function
|
|
296380
|
+
async function parseSessionResponse(response) {
|
|
296381
|
+
let payload;
|
|
296324
296382
|
try {
|
|
296325
|
-
|
|
296326
|
-
method: "GET",
|
|
296327
|
-
headers: { "x-access-token": accessToken }
|
|
296328
|
-
});
|
|
296329
|
-
if (!response.ok) {
|
|
296330
|
-
return void 0;
|
|
296331
|
-
}
|
|
296332
|
-
const payload = asRecord2(await response.json());
|
|
296333
|
-
if (!payload) {
|
|
296334
|
-
return void 0;
|
|
296335
|
-
}
|
|
296336
|
-
const root = asRecord2(payload.session) ?? payload;
|
|
296337
|
-
const identity = asRecord2(root.identity);
|
|
296338
|
-
const data = asRecord2(root.data);
|
|
296339
|
-
const user = asRecord2(data?.user);
|
|
296340
|
-
const roleEntries = Array.isArray(user?.roles) ? user.roles.map((entry) => coerceText(entry) ?? coerceId(entry)).filter((entry) => Boolean(entry)) : [];
|
|
296341
|
-
const singleRole = coerceText(user?.role);
|
|
296342
|
-
const roles = roleEntries.length > 0 ? roleEntries : singleRole ? [singleRole] : void 0;
|
|
296343
|
-
const resolved = {
|
|
296344
|
-
source: "iapub/sessions",
|
|
296345
|
-
userId: coerceId(identity?.user) ?? coerceId(user?.id),
|
|
296346
|
-
fullName: coerceText(user?.fullName) ?? coerceText(user?.name) ?? coerceText(user?.username),
|
|
296347
|
-
teamId: coerceId(identity?.team),
|
|
296348
|
-
teamName: coerceText(user?.teamName),
|
|
296349
|
-
teamDomain: coerceText(identity?.domain),
|
|
296350
|
-
...roles ? { roles } : {},
|
|
296351
|
-
consumerType: coerceText(root.consumerType) ?? coerceText(data?.consumerType) ?? coerceText(user?.consumerType)
|
|
296352
|
-
};
|
|
296353
|
-
memoizedSessionIdentity = resolved;
|
|
296354
|
-
return resolved;
|
|
296383
|
+
payload = asRecord2(await response.json());
|
|
296355
296384
|
} catch {
|
|
296356
296385
|
return void 0;
|
|
296357
296386
|
}
|
|
296387
|
+
if (!payload) {
|
|
296388
|
+
return void 0;
|
|
296389
|
+
}
|
|
296390
|
+
const root = asRecord2(payload.session) ?? payload;
|
|
296391
|
+
const identity = asRecord2(root.identity);
|
|
296392
|
+
const data = asRecord2(root.data);
|
|
296393
|
+
const user = asRecord2(data?.user);
|
|
296394
|
+
const roleEntries = Array.isArray(user?.roles) ? user.roles.map((entry) => coerceText(entry) ?? coerceId(entry)).filter((entry) => Boolean(entry)) : [];
|
|
296395
|
+
const singleRole = coerceText(user?.role);
|
|
296396
|
+
const roles = roleEntries.length > 0 ? roleEntries : singleRole ? [singleRole] : void 0;
|
|
296397
|
+
return {
|
|
296398
|
+
source: "iapub/sessions",
|
|
296399
|
+
userId: coerceId(identity?.user) ?? coerceId(user?.id),
|
|
296400
|
+
fullName: coerceText(user?.fullName) ?? coerceText(user?.name) ?? coerceText(user?.username),
|
|
296401
|
+
teamId: coerceId(identity?.team),
|
|
296402
|
+
teamName: coerceText(user?.teamName),
|
|
296403
|
+
teamDomain: coerceText(identity?.domain),
|
|
296404
|
+
...roles ? { roles } : {},
|
|
296405
|
+
consumerType: coerceText(root.consumerType) ?? coerceText(data?.consumerType) ?? coerceText(user?.consumerType)
|
|
296406
|
+
};
|
|
296407
|
+
}
|
|
296408
|
+
async function probeSessionIdentity(baseUrl, accessToken, fetchImpl, maxAttempts, sleepImpl, random) {
|
|
296409
|
+
let failure = "unavailable";
|
|
296410
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
|
|
296411
|
+
let response;
|
|
296412
|
+
try {
|
|
296413
|
+
response = await fetchImpl(`${baseUrl}${sessionPath}`, {
|
|
296414
|
+
method: "GET",
|
|
296415
|
+
headers: { "x-access-token": accessToken }
|
|
296416
|
+
});
|
|
296417
|
+
} catch {
|
|
296418
|
+
failure = "unavailable";
|
|
296419
|
+
if (attempt < maxAttempts) {
|
|
296420
|
+
await sleepImpl(computeSessionRetryDelayMs(void 0, attempt, random));
|
|
296421
|
+
continue;
|
|
296422
|
+
}
|
|
296423
|
+
break;
|
|
296424
|
+
}
|
|
296425
|
+
if (response.ok) {
|
|
296426
|
+
const resolved = await parseSessionResponse(response);
|
|
296427
|
+
if (resolved) {
|
|
296428
|
+
memoizedSessionIdentity = resolved;
|
|
296429
|
+
memoizedSessionFailure = void 0;
|
|
296430
|
+
return resolved;
|
|
296431
|
+
}
|
|
296432
|
+
failure = "unavailable";
|
|
296433
|
+
break;
|
|
296434
|
+
}
|
|
296435
|
+
if (response.status === 401 || response.status === 403) {
|
|
296436
|
+
failure = "auth";
|
|
296437
|
+
break;
|
|
296438
|
+
}
|
|
296439
|
+
if (response.status === 429 || response.status >= 500) {
|
|
296440
|
+
failure = "unavailable";
|
|
296441
|
+
if (attempt < maxAttempts) {
|
|
296442
|
+
await sleepImpl(computeSessionRetryDelayMs(response, attempt, random));
|
|
296443
|
+
continue;
|
|
296444
|
+
}
|
|
296445
|
+
break;
|
|
296446
|
+
}
|
|
296447
|
+
failure = "unavailable";
|
|
296448
|
+
break;
|
|
296449
|
+
}
|
|
296450
|
+
memoizedSessionFailure = failure;
|
|
296451
|
+
return void 0;
|
|
296358
296452
|
}
|
|
296359
296453
|
function describeTeam(id) {
|
|
296360
296454
|
const label = id?.teamName ?? id?.teamDomain;
|
|
@@ -296445,7 +296539,9 @@ async function runCredentialPreflight(args) {
|
|
|
296445
296539
|
session = await resolveSessionIdentity({
|
|
296446
296540
|
iapubBaseUrl: args.iapubBaseUrl,
|
|
296447
296541
|
accessToken,
|
|
296448
|
-
fetchImpl: args.fetchImpl
|
|
296542
|
+
fetchImpl: args.fetchImpl,
|
|
296543
|
+
...args.sleepImpl ? { sleepImpl: args.sleepImpl } : {},
|
|
296544
|
+
...args.randomImpl ? { randomImpl: args.randomImpl } : {}
|
|
296449
296545
|
});
|
|
296450
296546
|
} catch (error2) {
|
|
296451
296547
|
args.log.warning(
|
|
@@ -296465,11 +296561,20 @@ async function runCredentialPreflight(args) {
|
|
|
296465
296561
|
);
|
|
296466
296562
|
}
|
|
296467
296563
|
} else {
|
|
296564
|
+
const failure = getSessionResolutionFailure();
|
|
296565
|
+
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.";
|
|
296566
|
+
const base = "postman: credential preflight could not resolve the access-token session identity from iapub: " + detail;
|
|
296567
|
+
if (args.mode === "enforce") {
|
|
296568
|
+
throw new Error(
|
|
296569
|
+
mask(
|
|
296570
|
+
`${base} (credential-preflight: enforce requires a resolvable session identity; use credential-preflight: warn to continue with reactive error guidance only.)`
|
|
296571
|
+
)
|
|
296572
|
+
);
|
|
296573
|
+
}
|
|
296468
296574
|
args.log.warning(
|
|
296469
|
-
mask(
|
|
296470
|
-
"postman: credential preflight could not resolve the access-token session identity from iapub; continuing with reactive error guidance only"
|
|
296471
|
-
)
|
|
296575
|
+
mask(`${base} Continuing with reactive error guidance only (credential-preflight: warn).`)
|
|
296472
296576
|
);
|
|
296577
|
+
return;
|
|
296473
296578
|
}
|
|
296474
296579
|
const result = crossCheckIdentities({
|
|
296475
296580
|
pmak,
|
|
@@ -298796,6 +298901,7 @@ function buildContractIndex(root) {
|
|
|
298796
298901
|
parameterChecks,
|
|
298797
298902
|
requestBody: collectRequestBody(root, operation, version2, operationId, opWarnings),
|
|
298798
298903
|
security: collectSecurityRuntimeChecks(root, operation),
|
|
298904
|
+
pathMethods: Object.keys(pathItem).filter((key) => HTTP_METHODS.has(key)).map((key) => key.toUpperCase()),
|
|
298799
298905
|
warnings: opWarnings
|
|
298800
298906
|
});
|
|
298801
298907
|
}
|
|
@@ -298972,7 +299078,7 @@ function buildValidatorAssignments(operation, warnings, skipped) {
|
|
|
298972
299078
|
return lines;
|
|
298973
299079
|
}
|
|
298974
299080
|
function createContractScript(operation, warnings = []) {
|
|
298975
|
-
const contract = { method: operation.method, path: operation.path, responses: operation.responses, security: operation.security, parameters: operation.parameterChecks };
|
|
299081
|
+
const contract = { method: operation.method, path: operation.path, responses: operation.responses, security: operation.security, parameters: operation.parameterChecks, pathMethods: operation.pathMethods };
|
|
298976
299082
|
const skipped = [];
|
|
298977
299083
|
const validatorLines = buildValidatorAssignments(operation, warnings, skipped);
|
|
298978
299084
|
return [
|
|
@@ -299083,6 +299189,61 @@ function createContractScript(operation, warnings = []) {
|
|
|
299083
299189
|
' if (!isJsonSubtype(actual.subtype) && media.media.schema && media.media.schema.type !== "string") { return; }',
|
|
299084
299190
|
' if (!validate(value)) pm.expect.fail("OpenAPI schema validation failed for " + contract.method + " " + contract.path + " status " + pm.response.code + ": " + JSON.stringify(validate.errors || []));',
|
|
299085
299191
|
"});",
|
|
299192
|
+
"pm.test('Response satisfies RFC 9110 status-code requirements', function () {",
|
|
299193
|
+
" var code = pm.response.code;",
|
|
299194
|
+
' function respHeader(name) { return pm.response.headers.get(name) || ""; }',
|
|
299195
|
+
" if (code === 401) {",
|
|
299196
|
+
' var challenge = respHeader("WWW-Authenticate");',
|
|
299197
|
+
' if (!challenge) pm.expect.fail("RFC 9110 requires WWW-Authenticate on 401 responses");',
|
|
299198
|
+
' var wantsBearer = (contract.security || []).some(function (alternative) { return alternative.some(function (check) { return check.prefix && check.prefix.toLowerCase().indexOf("bearer") === 0; }); });',
|
|
299199
|
+
' 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);',
|
|
299200
|
+
" }",
|
|
299201
|
+
" if (code === 405) {",
|
|
299202
|
+
' var allow = respHeader("Allow");',
|
|
299203
|
+
' if (!allow) pm.expect.fail("RFC 9110 requires Allow on 405 responses");',
|
|
299204
|
+
' var allowed = allow.split(",").map(function (entry) { return entry.trim().toUpperCase(); });',
|
|
299205
|
+
' (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); });',
|
|
299206
|
+
" }",
|
|
299207
|
+
' if (code === 304 && responseText().trim().length > 0) pm.expect.fail("RFC 9110 forbids content in a 304 response");',
|
|
299208
|
+
" if (code === 206) {",
|
|
299209
|
+
' var range = respHeader("Content-Range");',
|
|
299210
|
+
' if (!range) pm.expect.fail("RFC 9110 requires Content-Range on a single-part 206 response");',
|
|
299211
|
+
' if (range && !/^\\S+ (\\d+-\\d+|\\*)\\/(\\d+|\\*)$/.test(range)) pm.expect.fail("Content-Range is not a valid RFC 9110 range: " + range);',
|
|
299212
|
+
" }",
|
|
299213
|
+
' var retryAfter = respHeader("Retry-After");',
|
|
299214
|
+
" if (retryAfter && (code === 429 || code === 503 || (code >= 300 && code < 400))) {",
|
|
299215
|
+
' 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);',
|
|
299216
|
+
" }",
|
|
299217
|
+
' var location = respHeader("Location");',
|
|
299218
|
+
" if (location && (code === 201 || (code >= 300 && code < 400))) {",
|
|
299219
|
+
' if (/\\s/.test(location.trim()) || location.trim().length === 0) pm.expect.fail("Location must be a valid URI-reference (RFC 9110 / RFC 3986): " + location);',
|
|
299220
|
+
" }",
|
|
299221
|
+
"});",
|
|
299222
|
+
"pm.test('Error and encoding conventions match RFC 9457 / RFC 8259 / RFC 8288', function () {",
|
|
299223
|
+
' var contentTypeRaw = pm.response.headers.get("Content-Type") || "";',
|
|
299224
|
+
" var ct = mediaParts(contentTypeRaw);",
|
|
299225
|
+
' if (ct.type === "application" && ct.subtype === "problem+json") {',
|
|
299226
|
+
" var problem;",
|
|
299227
|
+
' try { problem = pm.response.json(); } catch (error) { pm.expect.fail("application/problem+json body is not valid JSON (RFC 9457): " + error); }',
|
|
299228
|
+
' if (!problem || typeof problem !== "object" || Array.isArray(problem)) pm.expect.fail("problem details must be a JSON object (RFC 9457)");',
|
|
299229
|
+
' ["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]); });',
|
|
299230
|
+
" if (problem.status !== undefined) {",
|
|
299231
|
+
' if (typeof problem.status !== "number") pm.expect.fail("RFC 9457 status member must be a number; got " + typeof problem.status);',
|
|
299232
|
+
' 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 + ")");',
|
|
299233
|
+
" }",
|
|
299234
|
+
" }",
|
|
299235
|
+
" if (isJsonSubtype(ct.subtype)) {",
|
|
299236
|
+
' var charsetMatch = contentTypeRaw.match(/charset\\s*=\\s*"?([^";\\s]+)"?/i);',
|
|
299237
|
+
' if (charsetMatch && charsetMatch[1].toLowerCase() !== "utf-8") pm.expect.fail("JSON interchange must be UTF-8 (RFC 8259); got charset=" + charsetMatch[1]);',
|
|
299238
|
+
" }",
|
|
299239
|
+
' var link = pm.response.headers.get("Link");',
|
|
299240
|
+
" if (link) {",
|
|
299241
|
+
" link.split(/,(?=\\s*<)/).forEach(function (value) {",
|
|
299242
|
+
' if (!/^\\s*<[^>]*>/.test(value)) pm.expect.fail("RFC 8288 link-value must start with a <URI-Reference>: " + value);',
|
|
299243
|
+
' if (!/;\\s*rel\\s*=/i.test(value)) pm.expect.fail("RFC 8288 link-value must carry a rel parameter: " + value);',
|
|
299244
|
+
" });",
|
|
299245
|
+
" }",
|
|
299246
|
+
"});",
|
|
299086
299247
|
...operation.security ? [
|
|
299087
299248
|
"pm.test('Request carries credentials required by OpenAPI security', function () {",
|
|
299088
299249
|
" function satisfied(check) {",
|
|
@@ -299512,6 +299673,15 @@ function asRecord7(value) {
|
|
|
299512
299673
|
}
|
|
299513
299674
|
return value;
|
|
299514
299675
|
}
|
|
299676
|
+
function adviseWorkspaceFlipForbidden(error2) {
|
|
299677
|
+
if (error2 instanceof HttpError && error2.status === 403) {
|
|
299678
|
+
const body = error2.responseBody || "";
|
|
299679
|
+
if (/addWorkspaceLevelTeamRoles/i.test(body) || /You are not authorized to perform this action/i.test(body)) {
|
|
299680
|
+
return new Error(WORKSPACE_PERSONAL_ONLY_ADVICE, { cause: error2 });
|
|
299681
|
+
}
|
|
299682
|
+
}
|
|
299683
|
+
return error2;
|
|
299684
|
+
}
|
|
299515
299685
|
function extractGitRepoUrl(value) {
|
|
299516
299686
|
if (!value) return null;
|
|
299517
299687
|
if (typeof value === "string") {
|
|
@@ -299539,7 +299709,7 @@ function extractGitRepoUrl(value) {
|
|
|
299539
299709
|
}
|
|
299540
299710
|
var PostmanGatewayAssetsClient = class _PostmanGatewayAssetsClient {
|
|
299541
299711
|
static GENERATION_LOCKED_MAX_RETRIES = 5;
|
|
299542
|
-
static GENERATION_POLL_ATTEMPTS =
|
|
299712
|
+
static GENERATION_POLL_ATTEMPTS = 90;
|
|
299543
299713
|
static GENERATION_POLL_DELAY_MS = 2e3;
|
|
299544
299714
|
gateway;
|
|
299545
299715
|
sleep;
|
|
@@ -299817,7 +299987,7 @@ var PostmanGatewayAssetsClient = class _PostmanGatewayAssetsClient {
|
|
|
299817
299987
|
}
|
|
299818
299988
|
} catch (error2) {
|
|
299819
299989
|
await this.deleteWorkspace(workspaceId).catch(() => void 0);
|
|
299820
|
-
throw error2;
|
|
299990
|
+
throw adviseWorkspaceFlipForbidden(error2);
|
|
299821
299991
|
}
|
|
299822
299992
|
return { id: workspaceId };
|
|
299823
299993
|
}
|
|
@@ -299914,6 +300084,40 @@ var PostmanGatewayAssetsClient = class _PostmanGatewayAssetsClient {
|
|
|
299914
300084
|
const u = String(uid ?? "").trim();
|
|
299915
300085
|
return u.includes("-") ? u.slice(u.indexOf("-") + 1) : u;
|
|
299916
300086
|
}
|
|
300087
|
+
/**
|
|
300088
|
+
* PATCH a freshly-created item's `/scripts`, tolerating the two transient
|
|
300089
|
+
* failures this immediate-after-create write is prone to on the shared gateway:
|
|
300090
|
+
* - `404 RESOURCE_NOT_FOUND` — the create write returns the assigned id, but
|
|
300091
|
+
* an immediate PATCH can hit a replica that has not yet observed the create
|
|
300092
|
+
* (read-after-write lag, live-observed on org-mode teams).
|
|
300093
|
+
* - a downstream `5xx` (e.g. `500 ESOCKETTIMEDOUT`) — a Bifrost/gateway read
|
|
300094
|
+
* timeout, not a durable rejection.
|
|
300095
|
+
* `op:add /scripts` is idempotent (overwrites), so retrying either is safe.
|
|
300096
|
+
* This is a deeper, longer-backoff budget than the gateway client's inner
|
|
300097
|
+
* transient retry, to wait out a longer platform hiccup on this fragile write.
|
|
300098
|
+
* Non-transient errors (e.g. 4xx schema rejections) surface immediately.
|
|
300099
|
+
*/
|
|
300100
|
+
async patchNewItemScripts(cid, itemId, scripts) {
|
|
300101
|
+
const maxAttempts = 6;
|
|
300102
|
+
for (let attempt = 0; attempt < maxAttempts; attempt += 1) {
|
|
300103
|
+
try {
|
|
300104
|
+
await this.gateway.requestJson({
|
|
300105
|
+
service: "collection",
|
|
300106
|
+
method: "patch",
|
|
300107
|
+
path: `/v3/collections/${cid}/items/${itemId}`,
|
|
300108
|
+
headers: { "X-Entity-Type": "http-request" },
|
|
300109
|
+
body: [{ op: "add", path: "/scripts", value: scripts }]
|
|
300110
|
+
});
|
|
300111
|
+
return;
|
|
300112
|
+
} catch (error2) {
|
|
300113
|
+
const retriable = error2 instanceof HttpError && (error2.status === 404 || error2.status >= 500);
|
|
300114
|
+
if (!retriable || attempt === maxAttempts - 1) {
|
|
300115
|
+
throw error2;
|
|
300116
|
+
}
|
|
300117
|
+
await this.sleep(Math.min(2e3, 300 * 2 ** attempt));
|
|
300118
|
+
}
|
|
300119
|
+
}
|
|
300120
|
+
}
|
|
299917
300121
|
/**
|
|
299918
300122
|
* Apply tag slugs via the dedicated `tagging` service:
|
|
299919
300123
|
* `PUT /v1/tags/collections/:uid` (full uid), body `{ tags:[{ slug }] }` — the
|
|
@@ -300031,26 +300235,14 @@ var PostmanGatewayAssetsClient = class _PostmanGatewayAssetsClient {
|
|
|
300031
300235
|
});
|
|
300032
300236
|
const newItemId = String(asRecord7(created?.data)?.id ?? "").trim();
|
|
300033
300237
|
if (!newItemId) return;
|
|
300034
|
-
await this.
|
|
300035
|
-
|
|
300036
|
-
|
|
300037
|
-
|
|
300038
|
-
|
|
300039
|
-
|
|
300040
|
-
|
|
300041
|
-
|
|
300042
|
-
path: "/scripts",
|
|
300043
|
-
value: toV3Scripts([
|
|
300044
|
-
'if (pm.environment.get("CI") === "true") { return; }',
|
|
300045
|
-
"const body = pm.response.json();",
|
|
300046
|
-
"if (body.SecretString) {",
|
|
300047
|
-
" const secrets = JSON.parse(body.SecretString);",
|
|
300048
|
-
" Object.entries(secrets).forEach(([k, v]) => pm.collectionVariables.set(k, v));",
|
|
300049
|
-
"}"
|
|
300050
|
-
])
|
|
300051
|
-
}
|
|
300052
|
-
]
|
|
300053
|
-
});
|
|
300238
|
+
await this.patchNewItemScripts(cid, newItemId, toV3Scripts([
|
|
300239
|
+
'if (pm.environment.get("CI") === "true") { return; }',
|
|
300240
|
+
"const body = pm.response.json();",
|
|
300241
|
+
"if (body.SecretString) {",
|
|
300242
|
+
" const secrets = JSON.parse(body.SecretString);",
|
|
300243
|
+
" Object.entries(secrets).forEach(([k, v]) => pm.collectionVariables.set(k, v));",
|
|
300244
|
+
"}"
|
|
300245
|
+
]));
|
|
300054
300246
|
}
|
|
300055
300247
|
// --- workspace roles + member resolution (live-proven 2026-06-30) ---
|
|
300056
300248
|
//
|
|
@@ -300209,26 +300401,14 @@ var PostmanGatewayAssetsClient = class _PostmanGatewayAssetsClient {
|
|
|
300209
300401
|
});
|
|
300210
300402
|
const newItemId = String(asRecord7(created?.data)?.id ?? "").trim();
|
|
300211
300403
|
if (newItemId) {
|
|
300212
|
-
await this.
|
|
300213
|
-
|
|
300214
|
-
|
|
300215
|
-
|
|
300216
|
-
|
|
300217
|
-
|
|
300218
|
-
|
|
300219
|
-
|
|
300220
|
-
path: "/scripts",
|
|
300221
|
-
value: toV3Scripts([
|
|
300222
|
-
'if (pm.environment.get("CI") === "true") { return; }',
|
|
300223
|
-
"const body = pm.response.json();",
|
|
300224
|
-
"if (body.SecretString) {",
|
|
300225
|
-
" const secrets = JSON.parse(body.SecretString);",
|
|
300226
|
-
" Object.entries(secrets).forEach(([k, v]) => pm.collectionVariables.set(k, v));",
|
|
300227
|
-
"}"
|
|
300228
|
-
])
|
|
300229
|
-
}
|
|
300230
|
-
]
|
|
300231
|
-
});
|
|
300404
|
+
await this.patchNewItemScripts(cid, newItemId, toV3Scripts([
|
|
300405
|
+
'if (pm.environment.get("CI") === "true") { return; }',
|
|
300406
|
+
"const body = pm.response.json();",
|
|
300407
|
+
"if (body.SecretString) {",
|
|
300408
|
+
" const secrets = JSON.parse(body.SecretString);",
|
|
300409
|
+
" Object.entries(secrets).forEach(([k, v]) => pm.collectionVariables.set(k, v));",
|
|
300410
|
+
"}"
|
|
300411
|
+
]));
|
|
300232
300412
|
}
|
|
300233
300413
|
}
|
|
300234
300414
|
return plan.warnings;
|
|
@@ -301064,7 +301244,7 @@ function resolveActionVersion(explicit) {
|
|
|
301064
301244
|
if (explicit) {
|
|
301065
301245
|
return explicit;
|
|
301066
301246
|
}
|
|
301067
|
-
return "
|
|
301247
|
+
return typeof __ACTION_VERSION__ !== "undefined" && __ACTION_VERSION__ ? __ACTION_VERSION__ : "unknown";
|
|
301068
301248
|
}
|
|
301069
301249
|
function telemetryDisabled(env) {
|
|
301070
301250
|
const flag = String(env.POSTMAN_ACTIONS_TELEMETRY ?? "").trim().toLowerCase();
|
|
@@ -301186,11 +301366,23 @@ function createTelemetryContext(options) {
|
|
|
301186
301366
|
};
|
|
301187
301367
|
}
|
|
301188
301368
|
|
|
301189
|
-
// src/
|
|
301369
|
+
// src/action-version.ts
|
|
301190
301370
|
var import_node_fs3 = require("node:fs");
|
|
301371
|
+
var import_node_path3 = require("node:path");
|
|
301372
|
+
function resolveActionVersion2() {
|
|
301373
|
+
try {
|
|
301374
|
+
const raw = (0, import_node_fs3.readFileSync)((0, import_node_path3.join)(__dirname, "..", "package.json"), "utf8");
|
|
301375
|
+
return JSON.parse(raw).version ?? "unknown";
|
|
301376
|
+
} catch {
|
|
301377
|
+
return "unknown";
|
|
301378
|
+
}
|
|
301379
|
+
}
|
|
301380
|
+
|
|
301381
|
+
// src/lib/spec/openapi-loader.ts
|
|
301382
|
+
var import_node_fs4 = require("node:fs");
|
|
301191
301383
|
var import_promises3 = require("node:fs/promises");
|
|
301192
301384
|
var import_node_url2 = require("node:url");
|
|
301193
|
-
var
|
|
301385
|
+
var import_node_path4 = __toESM(require("node:path"), 1);
|
|
301194
301386
|
|
|
301195
301387
|
// node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/convert-path-to-posix.js
|
|
301196
301388
|
var win32Sep = "\\";
|
|
@@ -301531,14 +301723,14 @@ function fromFileSystemPath(path10) {
|
|
|
301531
301723
|
const hasProjectUri = upperPath.includes(posixUpper);
|
|
301532
301724
|
const isAbsolutePath = isAbsoluteWin32Path.test(path10) || path10.startsWith("http://") || path10.startsWith("https://") || path10.startsWith("file://");
|
|
301533
301725
|
if (!(hasProjectDir || hasProjectUri || isAbsolutePath) && !projectDir.startsWith("http")) {
|
|
301534
|
-
const
|
|
301726
|
+
const join4 = (a, b) => {
|
|
301535
301727
|
if (a.endsWith("/") || a.endsWith("\\")) {
|
|
301536
301728
|
return a + b;
|
|
301537
301729
|
} else {
|
|
301538
301730
|
return a + "/" + b;
|
|
301539
301731
|
}
|
|
301540
301732
|
};
|
|
301541
|
-
path10 =
|
|
301733
|
+
path10 = join4(projectDir, path10);
|
|
301542
301734
|
}
|
|
301543
301735
|
path10 = convertPathToPosix(path10);
|
|
301544
301736
|
}
|
|
@@ -305653,6 +305845,7 @@ function inventory$Ref($refParent, $refKey, path10, scopeBase, dynamicIdScope, p
|
|
|
305653
305845
|
const file = stripHash(pointer.path);
|
|
305654
305846
|
const hash = getHash(pointer.path);
|
|
305655
305847
|
const external = file !== $refs._root$Ref.path && !$refs._aliases[file];
|
|
305848
|
+
const nestedResource = Boolean($refs._aliases[file]) && pointer.$ref.value !== $refs._root$Ref.value;
|
|
305656
305849
|
const extended = ref_default.isExtended$Ref($ref);
|
|
305657
305850
|
indirections += pointer.indirections;
|
|
305658
305851
|
const existingEntry = findInInventory(inventory, $refParent, $refKey);
|
|
@@ -305686,6 +305879,8 @@ function inventory$Ref($refParent, $refKey, path10, scopeBase, dynamicIdScope, p
|
|
|
305686
305879
|
// Does this $ref extend its resolved value? (i.e. it has extra properties, in addition to "$ref")
|
|
305687
305880
|
external,
|
|
305688
305881
|
// Does this $ref pointer point to a file other than the main JSON Schema file?
|
|
305882
|
+
nestedResource,
|
|
305883
|
+
// Does this $ref resolve to an embedded schema resource with its own $id?
|
|
305689
305884
|
indirections
|
|
305690
305885
|
// The number of indirect references that were traversed to resolve the value
|
|
305691
305886
|
});
|
|
@@ -305721,7 +305916,7 @@ function remap(inventory, options, rootId) {
|
|
|
305721
305916
|
for (const entry of inventory) {
|
|
305722
305917
|
const bundleOpts = options.bundle || {};
|
|
305723
305918
|
if (!entry.external) {
|
|
305724
|
-
if (bundleOpts.optimizeInternalRefs !== false) {
|
|
305919
|
+
if (bundleOpts.optimizeInternalRefs !== false && !entry.nestedResource) {
|
|
305725
305920
|
entry.$ref.$ref = entry.hash;
|
|
305726
305921
|
}
|
|
305727
305922
|
} else if (entry.file === file && entry.hash === hash) {
|
|
@@ -313525,22 +313720,22 @@ async function loadOpenApiContractSpec(specUrl, options = {}) {
|
|
|
313525
313720
|
async function loadOpenApiContractSpecFromPath(specPath, options = {}) {
|
|
313526
313721
|
if (!specPath) throw new Error("CONTRACT_SPEC_READ_FAILED: spec-path must not be empty");
|
|
313527
313722
|
const workspaceRoot = (() => {
|
|
313528
|
-
const root =
|
|
313723
|
+
const root = import_node_path4.default.resolve(process.env.GITHUB_WORKSPACE ?? process.cwd());
|
|
313529
313724
|
try {
|
|
313530
|
-
return (0,
|
|
313725
|
+
return (0, import_node_fs4.realpathSync)(root);
|
|
313531
313726
|
} catch {
|
|
313532
313727
|
return root;
|
|
313533
313728
|
}
|
|
313534
313729
|
})();
|
|
313535
|
-
const resolved =
|
|
313730
|
+
const resolved = import_node_path4.default.resolve(workspaceRoot, specPath);
|
|
313536
313731
|
let absolutePath;
|
|
313537
313732
|
try {
|
|
313538
|
-
absolutePath = (0,
|
|
313733
|
+
absolutePath = (0, import_node_fs4.realpathSync)(resolved);
|
|
313539
313734
|
} catch (error2) {
|
|
313540
313735
|
throw new Error(`CONTRACT_SPEC_READ_FAILED: Unable to read spec at ${specPath}`, { cause: error2 });
|
|
313541
313736
|
}
|
|
313542
|
-
const rel =
|
|
313543
|
-
if (!rel || rel.startsWith("..") ||
|
|
313737
|
+
const rel = import_node_path4.default.relative(workspaceRoot, absolutePath);
|
|
313738
|
+
if (!rel || rel.startsWith("..") || import_node_path4.default.isAbsolute(rel)) {
|
|
313544
313739
|
throw new Error(`CONTRACT_SPEC_READ_FAILED: spec-path must resolve inside ${workspaceRoot}, got: ${specPath}`);
|
|
313545
313740
|
}
|
|
313546
313741
|
const maxBytes = options.maxBytesPerResource ?? SAFE_FETCH_LIMITS.maxBytesPerResource;
|
|
@@ -313954,6 +314149,17 @@ function buildOperationScript(operation, index, warnings) {
|
|
|
313954
314149
|
' pm.expect(pm.response.code, "GraphQL responses are HTTP 200 even when the data field carries errors").to.be.below(500);',
|
|
313955
314150
|
"});"
|
|
313956
314151
|
);
|
|
314152
|
+
lines.push(
|
|
314153
|
+
"pm.test(" + JSON.stringify("[" + label + "] GraphQL-over-HTTP media type and status are consistent") + ", function () {",
|
|
314154
|
+
' var contentType = ((pm.response.headers && pm.response.headers.get && pm.response.headers.get("Content-Type")) || "").toLowerCase();',
|
|
314155
|
+
' var mediaType = contentType.split(";")[0].trim();',
|
|
314156
|
+
" if (!mediaType) return;",
|
|
314157
|
+
' 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>")); }',
|
|
314158
|
+
" var wellFormed = gqlBody.data !== undefined || Array.isArray(gqlBody.errors);",
|
|
314159
|
+
' 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"); }',
|
|
314160
|
+
' 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); }',
|
|
314161
|
+
"});"
|
|
314162
|
+
);
|
|
313957
314163
|
lines.push(
|
|
313958
314164
|
`pm.test(${JSON.stringify(`[${label}] GraphQL errors are well-formed and not a total failure`)}, function () {`,
|
|
313959
314165
|
" var errors = gqlBody.errors;",
|
|
@@ -315494,6 +315700,8 @@ function createSoapScript(operation, warnings = []) {
|
|
|
315494
315700
|
hasOutput: Boolean(operation.output)
|
|
315495
315701
|
};
|
|
315496
315702
|
const responseRegex = operation.expectedResponseElement ? elementPresenceRegex(operation.expectedResponseElement) : "";
|
|
315703
|
+
const mediaType = operation.soapVersion === "1.2" ? "application/soap+xml" : "text/xml";
|
|
315704
|
+
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);';
|
|
315497
315705
|
const lines = [
|
|
315498
315706
|
`var soap = JSON.parse(${JSON.stringify(JSON.stringify(meta))});`,
|
|
315499
315707
|
'var bodyText = (pm.response.text && pm.response.text()) || "";',
|
|
@@ -315504,9 +315712,11 @@ function createSoapScript(operation, warnings = []) {
|
|
|
315504
315712
|
" pm.response.to.have.status(200);",
|
|
315505
315713
|
"});",
|
|
315506
315714
|
"",
|
|
315507
|
-
|
|
315715
|
+
// SOAP 1.1 responses bind to text/xml (SOAP 1.1 HTTP binding, WS-I Basic
|
|
315716
|
+
// Profile); SOAP 1.2 responses bind to application/soap+xml (RFC 3902).
|
|
315717
|
+
`pm.test('SOAP response Content-Type matches the SOAP ${operation.soapVersion} binding', function () {`,
|
|
315508
315718
|
' var ct = header("Content-Type").toLowerCase();',
|
|
315509
|
-
|
|
315719
|
+
` pm.expect(ct, "SOAP ${operation.soapVersion} responses use ${mediaType} (got: " + (ct || "<missing>") + ")").to.include("${mediaType}");`,
|
|
315510
315720
|
"});",
|
|
315511
315721
|
"",
|
|
315512
315722
|
"pm.test('SOAP Envelope element is present', function () {",
|
|
@@ -315523,6 +315733,13 @@ function createSoapScript(operation, warnings = []) {
|
|
|
315523
315733
|
' var detail = (bodyText.match(/<(?:[A-Za-z_][\\w.-]*:)?(?:faultstring|Reason|Text)[^>]*>([\\s\\S]*?)<\\//) || [])[1] || "";',
|
|
315524
315734
|
' pm.expect.fail("SOAP Fault returned for operation " + soap.name + (detail ? (": " + detail.trim()) : ""));',
|
|
315525
315735
|
" }",
|
|
315736
|
+
"});",
|
|
315737
|
+
"",
|
|
315738
|
+
"pm.test('SOAP Fault and HTTP status are consistent', function () {",
|
|
315739
|
+
' var faulted = matchTag("Fault").test(bodyText);',
|
|
315740
|
+
" var code = pm.response.code;",
|
|
315741
|
+
faultStatusLine,
|
|
315742
|
+
' if (!faulted && code === 500) pm.expect.fail("HTTP 500 from a SOAP endpoint must carry a SOAP Fault in the body");',
|
|
315526
315743
|
"});"
|
|
315527
315744
|
];
|
|
315528
315745
|
if (responseRegex) {
|
|
@@ -316774,6 +316991,7 @@ function normalizeSpecDocument(raw, warn) {
|
|
|
316774
316991
|
async function runBootstrap(inputs, dependencies) {
|
|
316775
316992
|
const telemetry = createTelemetryContext({
|
|
316776
316993
|
action: "postman-bootstrap-action",
|
|
316994
|
+
actionVersion: resolveActionVersion2(),
|
|
316777
316995
|
logger: dependencies.core
|
|
316778
316996
|
});
|
|
316779
316997
|
try {
|
|
@@ -317180,7 +317398,7 @@ async function runBootstrapInner(inputs, dependencies, telemetry) {
|
|
|
317180
317398
|
async () => {
|
|
317181
317399
|
if (inputs.specPath) {
|
|
317182
317400
|
const workspaceRoot = path9.resolve(process.env.GITHUB_WORKSPACE ?? process.cwd());
|
|
317183
|
-
return (0,
|
|
317401
|
+
return (0, import_node_fs5.readFileSync)(path9.resolve(workspaceRoot, inputs.specPath), "utf8");
|
|
317184
317402
|
}
|
|
317185
317403
|
if (dependencies.specFetcher === fetch) {
|
|
317186
317404
|
return safeFetchText(inputs.specUrl, { depth: 0 });
|