@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/cli.cjs
CHANGED
|
@@ -55570,7 +55570,7 @@ var require_lodash = __commonJS({
|
|
|
55570
55570
|
}
|
|
55571
55571
|
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
|
|
55572
55572
|
});
|
|
55573
|
-
function
|
|
55573
|
+
function join4(array, separator) {
|
|
55574
55574
|
return array == null ? "" : nativeJoin.call(array, separator);
|
|
55575
55575
|
}
|
|
55576
55576
|
function last(array) {
|
|
@@ -57489,7 +57489,7 @@ var require_lodash = __commonJS({
|
|
|
57489
57489
|
lodash.isUndefined = isUndefined;
|
|
57490
57490
|
lodash.isWeakMap = isWeakMap;
|
|
57491
57491
|
lodash.isWeakSet = isWeakSet;
|
|
57492
|
-
lodash.join =
|
|
57492
|
+
lodash.join = join4;
|
|
57493
57493
|
lodash.kebabCase = kebabCase;
|
|
57494
57494
|
lodash.last = last;
|
|
57495
57495
|
lodash.lastIndexOf = lastIndexOf;
|
|
@@ -127436,16 +127436,16 @@ var require_printer = __commonJS({
|
|
|
127436
127436
|
},
|
|
127437
127437
|
// Document
|
|
127438
127438
|
Document: {
|
|
127439
|
-
leave: (node) =>
|
|
127439
|
+
leave: (node) => join4(node.definitions, "\n\n")
|
|
127440
127440
|
},
|
|
127441
127441
|
OperationDefinition: {
|
|
127442
127442
|
leave(node) {
|
|
127443
|
-
const varDefs = hasMultilineItems(node.variableDefinitions) ? wrap("(\n",
|
|
127444
|
-
const prefix = wrap("", node.description, "\n") +
|
|
127443
|
+
const varDefs = hasMultilineItems(node.variableDefinitions) ? wrap("(\n", join4(node.variableDefinitions, "\n"), "\n)") : wrap("(", join4(node.variableDefinitions, ", "), ")");
|
|
127444
|
+
const prefix = wrap("", node.description, "\n") + join4(
|
|
127445
127445
|
[
|
|
127446
127446
|
node.operation,
|
|
127447
|
-
|
|
127448
|
-
|
|
127447
|
+
join4([node.name, varDefs]),
|
|
127448
|
+
join4(node.directives, " ")
|
|
127449
127449
|
],
|
|
127450
127450
|
" "
|
|
127451
127451
|
);
|
|
@@ -127453,7 +127453,7 @@ var require_printer = __commonJS({
|
|
|
127453
127453
|
}
|
|
127454
127454
|
},
|
|
127455
127455
|
VariableDefinition: {
|
|
127456
|
-
leave: ({ variable, type, defaultValue, directives, description }) => wrap("", description, "\n") + variable + ": " + type + wrap(" = ", defaultValue) + wrap(" ",
|
|
127456
|
+
leave: ({ variable, type, defaultValue, directives, description }) => wrap("", description, "\n") + variable + ": " + type + wrap(" = ", defaultValue) + wrap(" ", join4(directives, " "))
|
|
127457
127457
|
},
|
|
127458
127458
|
SelectionSet: {
|
|
127459
127459
|
leave: ({ selections }) => block(selections)
|
|
@@ -127461,11 +127461,11 @@ var require_printer = __commonJS({
|
|
|
127461
127461
|
Field: {
|
|
127462
127462
|
leave({ alias, name, arguments: args, directives, selectionSet }) {
|
|
127463
127463
|
const prefix = wrap("", alias, ": ") + name;
|
|
127464
|
-
let argsLine = prefix + wrap("(",
|
|
127464
|
+
let argsLine = prefix + wrap("(", join4(args, ", "), ")");
|
|
127465
127465
|
if (argsLine.length > MAX_LINE_LENGTH) {
|
|
127466
|
-
argsLine = prefix + wrap("(\n", indent2(
|
|
127466
|
+
argsLine = prefix + wrap("(\n", indent2(join4(args, "\n")), "\n)");
|
|
127467
127467
|
}
|
|
127468
|
-
return
|
|
127468
|
+
return join4([argsLine, join4(directives, " "), selectionSet], " ");
|
|
127469
127469
|
}
|
|
127470
127470
|
},
|
|
127471
127471
|
Argument: {
|
|
@@ -127473,14 +127473,14 @@ var require_printer = __commonJS({
|
|
|
127473
127473
|
},
|
|
127474
127474
|
// Fragments
|
|
127475
127475
|
FragmentSpread: {
|
|
127476
|
-
leave: ({ name, directives }) => "..." + name + wrap(" ",
|
|
127476
|
+
leave: ({ name, directives }) => "..." + name + wrap(" ", join4(directives, " "))
|
|
127477
127477
|
},
|
|
127478
127478
|
InlineFragment: {
|
|
127479
|
-
leave: ({ typeCondition, directives, selectionSet }) =>
|
|
127479
|
+
leave: ({ typeCondition, directives, selectionSet }) => join4(
|
|
127480
127480
|
[
|
|
127481
127481
|
"...",
|
|
127482
127482
|
wrap("on ", typeCondition),
|
|
127483
|
-
|
|
127483
|
+
join4(directives, " "),
|
|
127484
127484
|
selectionSet
|
|
127485
127485
|
],
|
|
127486
127486
|
" "
|
|
@@ -127496,7 +127496,7 @@ var require_printer = __commonJS({
|
|
|
127496
127496
|
description
|
|
127497
127497
|
}) => wrap("", description, "\n") + // Note: fragment variable definitions are experimental and may be changed
|
|
127498
127498
|
// or removed in the future.
|
|
127499
|
-
`fragment ${name}${wrap("(",
|
|
127499
|
+
`fragment ${name}${wrap("(", join4(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap("", join4(directives, " "), " ")}` + selectionSet
|
|
127500
127500
|
},
|
|
127501
127501
|
// Value
|
|
127502
127502
|
IntValue: {
|
|
@@ -127518,17 +127518,17 @@ var require_printer = __commonJS({
|
|
|
127518
127518
|
leave: ({ value }) => value
|
|
127519
127519
|
},
|
|
127520
127520
|
ListValue: {
|
|
127521
|
-
leave: ({ values }) => "[" +
|
|
127521
|
+
leave: ({ values }) => "[" + join4(values, ", ") + "]"
|
|
127522
127522
|
},
|
|
127523
127523
|
ObjectValue: {
|
|
127524
|
-
leave: ({ fields }) => "{" +
|
|
127524
|
+
leave: ({ fields }) => "{" + join4(fields, ", ") + "}"
|
|
127525
127525
|
},
|
|
127526
127526
|
ObjectField: {
|
|
127527
127527
|
leave: ({ name, value }) => name + ": " + value
|
|
127528
127528
|
},
|
|
127529
127529
|
// Directive
|
|
127530
127530
|
Directive: {
|
|
127531
|
-
leave: ({ name, arguments: args }) => "@" + name + wrap("(",
|
|
127531
|
+
leave: ({ name, arguments: args }) => "@" + name + wrap("(", join4(args, ", "), ")")
|
|
127532
127532
|
},
|
|
127533
127533
|
// Type
|
|
127534
127534
|
NamedType: {
|
|
@@ -127542,61 +127542,61 @@ var require_printer = __commonJS({
|
|
|
127542
127542
|
},
|
|
127543
127543
|
// Type System Definitions
|
|
127544
127544
|
SchemaDefinition: {
|
|
127545
|
-
leave: ({ description, directives, operationTypes }) => wrap("", description, "\n") +
|
|
127545
|
+
leave: ({ description, directives, operationTypes }) => wrap("", description, "\n") + join4(["schema", join4(directives, " "), block(operationTypes)], " ")
|
|
127546
127546
|
},
|
|
127547
127547
|
OperationTypeDefinition: {
|
|
127548
127548
|
leave: ({ operation, type }) => operation + ": " + type
|
|
127549
127549
|
},
|
|
127550
127550
|
ScalarTypeDefinition: {
|
|
127551
|
-
leave: ({ description, name, directives }) => wrap("", description, "\n") +
|
|
127551
|
+
leave: ({ description, name, directives }) => wrap("", description, "\n") + join4(["scalar", name, join4(directives, " ")], " ")
|
|
127552
127552
|
},
|
|
127553
127553
|
ObjectTypeDefinition: {
|
|
127554
|
-
leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") +
|
|
127554
|
+
leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join4(
|
|
127555
127555
|
[
|
|
127556
127556
|
"type",
|
|
127557
127557
|
name,
|
|
127558
|
-
wrap("implements ",
|
|
127559
|
-
|
|
127558
|
+
wrap("implements ", join4(interfaces, " & ")),
|
|
127559
|
+
join4(directives, " "),
|
|
127560
127560
|
block(fields)
|
|
127561
127561
|
],
|
|
127562
127562
|
" "
|
|
127563
127563
|
)
|
|
127564
127564
|
},
|
|
127565
127565
|
FieldDefinition: {
|
|
127566
|
-
leave: ({ description, name, arguments: args, type, directives }) => wrap("", description, "\n") + name + (hasMultilineItems(args) ? wrap("(\n", indent2(
|
|
127566
|
+
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, " "))
|
|
127567
127567
|
},
|
|
127568
127568
|
InputValueDefinition: {
|
|
127569
|
-
leave: ({ description, name, type, defaultValue, directives }) => wrap("", description, "\n") +
|
|
127570
|
-
[name + ": " + type, wrap("= ", defaultValue),
|
|
127569
|
+
leave: ({ description, name, type, defaultValue, directives }) => wrap("", description, "\n") + join4(
|
|
127570
|
+
[name + ": " + type, wrap("= ", defaultValue), join4(directives, " ")],
|
|
127571
127571
|
" "
|
|
127572
127572
|
)
|
|
127573
127573
|
},
|
|
127574
127574
|
InterfaceTypeDefinition: {
|
|
127575
|
-
leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") +
|
|
127575
|
+
leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join4(
|
|
127576
127576
|
[
|
|
127577
127577
|
"interface",
|
|
127578
127578
|
name,
|
|
127579
|
-
wrap("implements ",
|
|
127580
|
-
|
|
127579
|
+
wrap("implements ", join4(interfaces, " & ")),
|
|
127580
|
+
join4(directives, " "),
|
|
127581
127581
|
block(fields)
|
|
127582
127582
|
],
|
|
127583
127583
|
" "
|
|
127584
127584
|
)
|
|
127585
127585
|
},
|
|
127586
127586
|
UnionTypeDefinition: {
|
|
127587
|
-
leave: ({ description, name, directives, types: types2 }) => wrap("", description, "\n") +
|
|
127588
|
-
["union", name,
|
|
127587
|
+
leave: ({ description, name, directives, types: types2 }) => wrap("", description, "\n") + join4(
|
|
127588
|
+
["union", name, join4(directives, " "), wrap("= ", join4(types2, " | "))],
|
|
127589
127589
|
" "
|
|
127590
127590
|
)
|
|
127591
127591
|
},
|
|
127592
127592
|
EnumTypeDefinition: {
|
|
127593
|
-
leave: ({ description, name, directives, values }) => wrap("", description, "\n") +
|
|
127593
|
+
leave: ({ description, name, directives, values }) => wrap("", description, "\n") + join4(["enum", name, join4(directives, " "), block(values)], " ")
|
|
127594
127594
|
},
|
|
127595
127595
|
EnumValueDefinition: {
|
|
127596
|
-
leave: ({ description, name, directives }) => wrap("", description, "\n") +
|
|
127596
|
+
leave: ({ description, name, directives }) => wrap("", description, "\n") + join4([name, join4(directives, " ")], " ")
|
|
127597
127597
|
},
|
|
127598
127598
|
InputObjectTypeDefinition: {
|
|
127599
|
-
leave: ({ description, name, directives, fields }) => wrap("", description, "\n") +
|
|
127599
|
+
leave: ({ description, name, directives, fields }) => wrap("", description, "\n") + join4(["input", name, join4(directives, " "), block(fields)], " ")
|
|
127600
127600
|
},
|
|
127601
127601
|
DirectiveDefinition: {
|
|
127602
127602
|
leave: ({
|
|
@@ -127606,84 +127606,84 @@ var require_printer = __commonJS({
|
|
|
127606
127606
|
directives,
|
|
127607
127607
|
repeatable,
|
|
127608
127608
|
locations
|
|
127609
|
-
}) => wrap("", description, "\n") + "directive @" + name + (hasMultilineItems(args) ? wrap("(\n", indent2(
|
|
127609
|
+
}) => 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, " | ")
|
|
127610
127610
|
},
|
|
127611
127611
|
SchemaExtension: {
|
|
127612
|
-
leave: ({ directives, operationTypes }) =>
|
|
127613
|
-
["extend schema",
|
|
127612
|
+
leave: ({ directives, operationTypes }) => join4(
|
|
127613
|
+
["extend schema", join4(directives, " "), block(operationTypes)],
|
|
127614
127614
|
" "
|
|
127615
127615
|
)
|
|
127616
127616
|
},
|
|
127617
127617
|
ScalarTypeExtension: {
|
|
127618
|
-
leave: ({ name, directives }) =>
|
|
127618
|
+
leave: ({ name, directives }) => join4(["extend scalar", name, join4(directives, " ")], " ")
|
|
127619
127619
|
},
|
|
127620
127620
|
ObjectTypeExtension: {
|
|
127621
|
-
leave: ({ name, interfaces, directives, fields }) =>
|
|
127621
|
+
leave: ({ name, interfaces, directives, fields }) => join4(
|
|
127622
127622
|
[
|
|
127623
127623
|
"extend type",
|
|
127624
127624
|
name,
|
|
127625
|
-
wrap("implements ",
|
|
127626
|
-
|
|
127625
|
+
wrap("implements ", join4(interfaces, " & ")),
|
|
127626
|
+
join4(directives, " "),
|
|
127627
127627
|
block(fields)
|
|
127628
127628
|
],
|
|
127629
127629
|
" "
|
|
127630
127630
|
)
|
|
127631
127631
|
},
|
|
127632
127632
|
InterfaceTypeExtension: {
|
|
127633
|
-
leave: ({ name, interfaces, directives, fields }) =>
|
|
127633
|
+
leave: ({ name, interfaces, directives, fields }) => join4(
|
|
127634
127634
|
[
|
|
127635
127635
|
"extend interface",
|
|
127636
127636
|
name,
|
|
127637
|
-
wrap("implements ",
|
|
127638
|
-
|
|
127637
|
+
wrap("implements ", join4(interfaces, " & ")),
|
|
127638
|
+
join4(directives, " "),
|
|
127639
127639
|
block(fields)
|
|
127640
127640
|
],
|
|
127641
127641
|
" "
|
|
127642
127642
|
)
|
|
127643
127643
|
},
|
|
127644
127644
|
UnionTypeExtension: {
|
|
127645
|
-
leave: ({ name, directives, types: types2 }) =>
|
|
127645
|
+
leave: ({ name, directives, types: types2 }) => join4(
|
|
127646
127646
|
[
|
|
127647
127647
|
"extend union",
|
|
127648
127648
|
name,
|
|
127649
|
-
|
|
127650
|
-
wrap("= ",
|
|
127649
|
+
join4(directives, " "),
|
|
127650
|
+
wrap("= ", join4(types2, " | "))
|
|
127651
127651
|
],
|
|
127652
127652
|
" "
|
|
127653
127653
|
)
|
|
127654
127654
|
},
|
|
127655
127655
|
EnumTypeExtension: {
|
|
127656
|
-
leave: ({ name, directives, values }) =>
|
|
127656
|
+
leave: ({ name, directives, values }) => join4(["extend enum", name, join4(directives, " "), block(values)], " ")
|
|
127657
127657
|
},
|
|
127658
127658
|
InputObjectTypeExtension: {
|
|
127659
|
-
leave: ({ name, directives, fields }) =>
|
|
127659
|
+
leave: ({ name, directives, fields }) => join4(["extend input", name, join4(directives, " "), block(fields)], " ")
|
|
127660
127660
|
},
|
|
127661
127661
|
DirectiveExtension: {
|
|
127662
|
-
leave: ({ name, directives }) =>
|
|
127662
|
+
leave: ({ name, directives }) => join4(["extend directive @" + name, join4(directives, " ")], " ")
|
|
127663
127663
|
},
|
|
127664
127664
|
// Schema Coordinates
|
|
127665
127665
|
TypeCoordinate: {
|
|
127666
127666
|
leave: ({ name }) => name
|
|
127667
127667
|
},
|
|
127668
127668
|
MemberCoordinate: {
|
|
127669
|
-
leave: ({ name, memberName }) =>
|
|
127669
|
+
leave: ({ name, memberName }) => join4([name, wrap(".", memberName)])
|
|
127670
127670
|
},
|
|
127671
127671
|
ArgumentCoordinate: {
|
|
127672
|
-
leave: ({ name, fieldName, argumentName }) =>
|
|
127672
|
+
leave: ({ name, fieldName, argumentName }) => join4([name, wrap(".", fieldName), wrap("(", argumentName, ":)")])
|
|
127673
127673
|
},
|
|
127674
127674
|
DirectiveCoordinate: {
|
|
127675
|
-
leave: ({ name }) =>
|
|
127675
|
+
leave: ({ name }) => join4(["@", name])
|
|
127676
127676
|
},
|
|
127677
127677
|
DirectiveArgumentCoordinate: {
|
|
127678
|
-
leave: ({ name, argumentName }) =>
|
|
127678
|
+
leave: ({ name, argumentName }) => join4(["@", name, wrap("(", argumentName, ":)")])
|
|
127679
127679
|
}
|
|
127680
127680
|
};
|
|
127681
|
-
function
|
|
127681
|
+
function join4(maybeArray, separator = "") {
|
|
127682
127682
|
var _maybeArray$filter$jo;
|
|
127683
127683
|
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 : "";
|
|
127684
127684
|
}
|
|
127685
127685
|
function block(array) {
|
|
127686
|
-
return wrap("{\n", indent2(
|
|
127686
|
+
return wrap("{\n", indent2(join4(array, "\n")), "\n}");
|
|
127687
127687
|
}
|
|
127688
127688
|
function wrap(start, maybeString, end = "") {
|
|
127689
127689
|
return maybeString != null && maybeString !== "" ? start + maybeString + end : "";
|
|
@@ -152317,7 +152317,7 @@ var require_index_cjs = __commonJS({
|
|
|
152317
152317
|
const t = parse10(r);
|
|
152318
152318
|
return "http" === t.protocol || "https" === t.protocol;
|
|
152319
152319
|
}
|
|
152320
|
-
var
|
|
152320
|
+
var join4 = (...r) => {
|
|
152321
152321
|
if (0 === r.length) return ".";
|
|
152322
152322
|
const t = r.map(parse10), e = Object.assign({}, t[0]);
|
|
152323
152323
|
for (let n = 1; n < t.length; n++) {
|
|
@@ -152341,7 +152341,7 @@ var require_index_cjs = __commonJS({
|
|
|
152341
152341
|
function resolve4(...r) {
|
|
152342
152342
|
if (0 === r.length) return ".";
|
|
152343
152343
|
const t = normalizeParsed(parse10(r[r.length - 1]));
|
|
152344
|
-
return t.absolute ? format3(t) :
|
|
152344
|
+
return t.absolute ? format3(t) : join4(...r);
|
|
152345
152345
|
}
|
|
152346
152346
|
var startsWithWindowsDrive = (r) => {
|
|
152347
152347
|
return null !== parse10(r).drive;
|
|
@@ -152355,7 +152355,7 @@ var require_index_cjs = __commonJS({
|
|
|
152355
152355
|
function serializeSrn({ shortcode: r, orgSlug: t, projectSlug: e, uri: n = "" }) {
|
|
152356
152356
|
return [r, t, e, n.replace(/^\//, "")].filter(Boolean).join("/");
|
|
152357
152357
|
}
|
|
152358
|
-
exports2.basename = basename3, exports2.deserializeSrn = deserializeSrn, exports2.dirname = dirname3, exports2.extname = extname2, exports2.format = format3, exports2.isAbsolute = isAbsolute, exports2.isURL = isURL, exports2.join =
|
|
152358
|
+
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 = resolve4, exports2.sep = "/", exports2.serializeSrn = serializeSrn, exports2.startsWithWindowsDrive = startsWithWindowsDrive, exports2.stripRoot = stripRoot, exports2.toFSPath = normalize3;
|
|
152359
152359
|
}
|
|
152360
152360
|
});
|
|
152361
152361
|
|
|
@@ -154098,7 +154098,7 @@ var require_stable = __commonJS({
|
|
|
154098
154098
|
return result;
|
|
154099
154099
|
}
|
|
154100
154100
|
function stringifyFullFn(key, parent, stack, replacer, indent2) {
|
|
154101
|
-
var i, res,
|
|
154101
|
+
var i, res, join4;
|
|
154102
154102
|
const originalIndentation = indentation;
|
|
154103
154103
|
var value = parent[key];
|
|
154104
154104
|
if (typeof value === "object" && value !== null && typeof value.toJSON === "function") {
|
|
@@ -154124,12 +154124,12 @@ var require_stable = __commonJS({
|
|
|
154124
154124
|
indentation += indent2;
|
|
154125
154125
|
res += `
|
|
154126
154126
|
${indentation}`;
|
|
154127
|
-
|
|
154127
|
+
join4 = `,
|
|
154128
154128
|
${indentation}`;
|
|
154129
154129
|
for (i = 0; i < value.length - 1; i++) {
|
|
154130
154130
|
const tmp2 = stringifyFullFn(i, value, stack, replacer, indent2);
|
|
154131
154131
|
res += tmp2 !== void 0 ? tmp2 : "null";
|
|
154132
|
-
res +=
|
|
154132
|
+
res += join4;
|
|
154133
154133
|
}
|
|
154134
154134
|
const tmp = stringifyFullFn(i, value, stack, replacer, indent2);
|
|
154135
154135
|
res += tmp !== void 0 ? tmp : "null";
|
|
@@ -154151,7 +154151,7 @@ ${originalIndentation}`;
|
|
|
154151
154151
|
indentation += indent2;
|
|
154152
154152
|
res += `
|
|
154153
154153
|
${indentation}`;
|
|
154154
|
-
|
|
154154
|
+
join4 = `,
|
|
154155
154155
|
${indentation}`;
|
|
154156
154156
|
var separator = "";
|
|
154157
154157
|
for (i = 0; i < keys.length; i++) {
|
|
@@ -154159,7 +154159,7 @@ ${indentation}`;
|
|
|
154159
154159
|
const tmp = stringifyFullFn(key, value, stack, replacer, indent2);
|
|
154160
154160
|
if (tmp !== void 0) {
|
|
154161
154161
|
res += `${separator}"${strEscape(key)}": ${tmp}`;
|
|
154162
|
-
separator =
|
|
154162
|
+
separator = join4;
|
|
154163
154163
|
}
|
|
154164
154164
|
}
|
|
154165
154165
|
if (separator !== "") {
|
|
@@ -154181,7 +154181,7 @@ ${originalIndentation}`;
|
|
|
154181
154181
|
}
|
|
154182
154182
|
}
|
|
154183
154183
|
function stringifyFullArr(key, value, stack, replacer, indent2) {
|
|
154184
|
-
var i, res,
|
|
154184
|
+
var i, res, join4;
|
|
154185
154185
|
const originalIndentation = indentation;
|
|
154186
154186
|
if (typeof value === "object" && value !== null && typeof value.toJSON === "function") {
|
|
154187
154187
|
value = value.toJSON(key);
|
|
@@ -154205,12 +154205,12 @@ ${originalIndentation}`;
|
|
|
154205
154205
|
indentation += indent2;
|
|
154206
154206
|
res += `
|
|
154207
154207
|
${indentation}`;
|
|
154208
|
-
|
|
154208
|
+
join4 = `,
|
|
154209
154209
|
${indentation}`;
|
|
154210
154210
|
for (i = 0; i < value.length - 1; i++) {
|
|
154211
154211
|
const tmp2 = stringifyFullArr(i, value[i], stack, replacer, indent2);
|
|
154212
154212
|
res += tmp2 !== void 0 ? tmp2 : "null";
|
|
154213
|
-
res +=
|
|
154213
|
+
res += join4;
|
|
154214
154214
|
}
|
|
154215
154215
|
const tmp = stringifyFullArr(i, value[i], stack, replacer, indent2);
|
|
154216
154216
|
res += tmp !== void 0 ? tmp : "null";
|
|
@@ -154231,7 +154231,7 @@ ${originalIndentation}`;
|
|
|
154231
154231
|
indentation += indent2;
|
|
154232
154232
|
res += `
|
|
154233
154233
|
${indentation}`;
|
|
154234
|
-
|
|
154234
|
+
join4 = `,
|
|
154235
154235
|
${indentation}`;
|
|
154236
154236
|
var separator = "";
|
|
154237
154237
|
for (i = 0; i < replacer.length; i++) {
|
|
@@ -154240,7 +154240,7 @@ ${indentation}`;
|
|
|
154240
154240
|
const tmp = stringifyFullArr(key, value[key], stack, replacer, indent2);
|
|
154241
154241
|
if (tmp !== void 0) {
|
|
154242
154242
|
res += `${separator}"${strEscape(key)}": ${tmp}`;
|
|
154243
|
-
separator =
|
|
154243
|
+
separator = join4;
|
|
154244
154244
|
}
|
|
154245
154245
|
}
|
|
154246
154246
|
}
|
|
@@ -154263,7 +154263,7 @@ ${originalIndentation}`;
|
|
|
154263
154263
|
}
|
|
154264
154264
|
}
|
|
154265
154265
|
function stringifyIndent(key, value, stack, indent2) {
|
|
154266
|
-
var i, res,
|
|
154266
|
+
var i, res, join4;
|
|
154267
154267
|
const originalIndentation = indentation;
|
|
154268
154268
|
switch (typeof value) {
|
|
154269
154269
|
case "object":
|
|
@@ -154293,12 +154293,12 @@ ${originalIndentation}`;
|
|
|
154293
154293
|
indentation += indent2;
|
|
154294
154294
|
res += `
|
|
154295
154295
|
${indentation}`;
|
|
154296
|
-
|
|
154296
|
+
join4 = `,
|
|
154297
154297
|
${indentation}`;
|
|
154298
154298
|
for (i = 0; i < value.length - 1; i++) {
|
|
154299
154299
|
const tmp2 = stringifyIndent(i, value[i], stack, indent2);
|
|
154300
154300
|
res += tmp2 !== void 0 ? tmp2 : "null";
|
|
154301
|
-
res +=
|
|
154301
|
+
res += join4;
|
|
154302
154302
|
}
|
|
154303
154303
|
const tmp = stringifyIndent(i, value[i], stack, indent2);
|
|
154304
154304
|
res += tmp !== void 0 ? tmp : "null";
|
|
@@ -154320,7 +154320,7 @@ ${originalIndentation}`;
|
|
|
154320
154320
|
indentation += indent2;
|
|
154321
154321
|
res += `
|
|
154322
154322
|
${indentation}`;
|
|
154323
|
-
|
|
154323
|
+
join4 = `,
|
|
154324
154324
|
${indentation}`;
|
|
154325
154325
|
var separator = "";
|
|
154326
154326
|
for (i = 0; i < keys.length; i++) {
|
|
@@ -154328,7 +154328,7 @@ ${indentation}`;
|
|
|
154328
154328
|
const tmp = stringifyIndent(key, value[key], stack, indent2);
|
|
154329
154329
|
if (tmp !== void 0) {
|
|
154330
154330
|
res += `${separator}"${strEscape(key)}": ${tmp}`;
|
|
154331
|
-
separator =
|
|
154331
|
+
separator = join4;
|
|
154332
154332
|
}
|
|
154333
154333
|
}
|
|
154334
154334
|
if (separator !== "") {
|
|
@@ -172661,7 +172661,7 @@ var require_lodash2 = __commonJS({
|
|
|
172661
172661
|
}
|
|
172662
172662
|
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
|
|
172663
172663
|
});
|
|
172664
|
-
function
|
|
172664
|
+
function join4(array, separator) {
|
|
172665
172665
|
return array == null ? "" : nativeJoin.call(array, separator);
|
|
172666
172666
|
}
|
|
172667
172667
|
function last(array) {
|
|
@@ -174585,7 +174585,7 @@ var require_lodash2 = __commonJS({
|
|
|
174585
174585
|
lodash.isUndefined = isUndefined;
|
|
174586
174586
|
lodash.isWeakMap = isWeakMap;
|
|
174587
174587
|
lodash.isWeakSet = isWeakSet;
|
|
174588
|
-
lodash.join =
|
|
174588
|
+
lodash.join = join4;
|
|
174589
174589
|
lodash.kebabCase = kebabCase;
|
|
174590
174590
|
lodash.last = last;
|
|
174591
174591
|
lodash.lastIndexOf = lastIndexOf;
|
|
@@ -179719,7 +179719,7 @@ var require_lodash3 = __commonJS({
|
|
|
179719
179719
|
}
|
|
179720
179720
|
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
|
|
179721
179721
|
});
|
|
179722
|
-
function
|
|
179722
|
+
function join4(array, separator) {
|
|
179723
179723
|
return array == null ? "" : nativeJoin.call(array, separator);
|
|
179724
179724
|
}
|
|
179725
179725
|
function last(array) {
|
|
@@ -181643,7 +181643,7 @@ var require_lodash3 = __commonJS({
|
|
|
181643
181643
|
lodash.isUndefined = isUndefined;
|
|
181644
181644
|
lodash.isWeakMap = isWeakMap;
|
|
181645
181645
|
lodash.isWeakSet = isWeakSet;
|
|
181646
|
-
lodash.join =
|
|
181646
|
+
lodash.join = join4;
|
|
181647
181647
|
lodash.kebabCase = kebabCase;
|
|
181648
181648
|
lodash.last = last;
|
|
181649
181649
|
lodash.lastIndexOf = lastIndexOf;
|
|
@@ -283138,7 +283138,7 @@ var require_lodash5 = __commonJS({
|
|
|
283138
283138
|
}
|
|
283139
283139
|
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
|
|
283140
283140
|
});
|
|
283141
|
-
function
|
|
283141
|
+
function join4(array, separator) {
|
|
283142
283142
|
return array == null ? "" : nativeJoin.call(array, separator);
|
|
283143
283143
|
}
|
|
283144
283144
|
function last(array) {
|
|
@@ -285062,7 +285062,7 @@ var require_lodash5 = __commonJS({
|
|
|
285062
285062
|
lodash.isUndefined = isUndefined;
|
|
285063
285063
|
lodash.isWeakMap = isWeakMap;
|
|
285064
285064
|
lodash.isWeakSet = isWeakSet;
|
|
285065
|
-
lodash.join =
|
|
285065
|
+
lodash.join = join4;
|
|
285066
285066
|
lodash.kebabCase = kebabCase;
|
|
285067
285067
|
lodash.last = last;
|
|
285068
285068
|
lodash.lastIndexOf = lastIndexOf;
|
|
@@ -292261,10 +292261,10 @@ __export(cli_exports, {
|
|
|
292261
292261
|
toDotenv: () => toDotenv
|
|
292262
292262
|
});
|
|
292263
292263
|
module.exports = __toCommonJS(cli_exports);
|
|
292264
|
-
var
|
|
292264
|
+
var import_node_fs6 = require("node:fs");
|
|
292265
292265
|
var import_promises4 = require("node:fs/promises");
|
|
292266
292266
|
var import_node_child_process = require("node:child_process");
|
|
292267
|
-
var
|
|
292267
|
+
var import_node_path5 = __toESM(require("node:path"), 1);
|
|
292268
292268
|
var import_node_util = require("node:util");
|
|
292269
292269
|
|
|
292270
292270
|
// node_modules/@actions/io/lib/io.js
|
|
@@ -292988,7 +292988,7 @@ var ExitCode;
|
|
|
292988
292988
|
|
|
292989
292989
|
// src/index.ts
|
|
292990
292990
|
var import_node_crypto4 = require("node:crypto");
|
|
292991
|
-
var
|
|
292991
|
+
var import_node_fs5 = require("node:fs");
|
|
292992
292992
|
var path6 = __toESM(require("node:path"), 1);
|
|
292993
292993
|
var import_yaml4 = __toESM(require_dist(), 1);
|
|
292994
292994
|
|
|
@@ -294542,12 +294542,62 @@ function resolvePostmanEndpointProfile(stack, region = "us") {
|
|
|
294542
294542
|
|
|
294543
294543
|
// src/lib/postman/credential-identity.ts
|
|
294544
294544
|
var sessionPath = "/api/sessions/current";
|
|
294545
|
+
var SESSION_MAX_ATTEMPTS = 3;
|
|
294546
|
+
var SESSION_RETRY_BASE_DELAY_MS = 500;
|
|
294547
|
+
var SESSION_RETRY_MAX_DELAY_MS = 8e3;
|
|
294545
294548
|
var pmakMemo = /* @__PURE__ */ new Map();
|
|
294546
294549
|
var sessionMemo = /* @__PURE__ */ new Map();
|
|
294547
294550
|
var memoizedSessionIdentity;
|
|
294551
|
+
var memoizedSessionFailure;
|
|
294552
|
+
function defaultSessionSleep(ms) {
|
|
294553
|
+
return new Promise((resolve4) => setTimeout(resolve4, ms));
|
|
294554
|
+
}
|
|
294555
|
+
function defaultRandom() {
|
|
294556
|
+
return Math.random();
|
|
294557
|
+
}
|
|
294558
|
+
function parseRetryAfterMs(value) {
|
|
294559
|
+
const trimmed = value?.trim();
|
|
294560
|
+
if (!trimmed) {
|
|
294561
|
+
return void 0;
|
|
294562
|
+
}
|
|
294563
|
+
if (/^\d+$/.test(trimmed)) {
|
|
294564
|
+
return Number(trimmed) * 1e3;
|
|
294565
|
+
}
|
|
294566
|
+
const dateMs = Date.parse(trimmed);
|
|
294567
|
+
if (!Number.isNaN(dateMs)) {
|
|
294568
|
+
return Math.max(0, dateMs - Date.now());
|
|
294569
|
+
}
|
|
294570
|
+
return void 0;
|
|
294571
|
+
}
|
|
294572
|
+
function parseRateLimitResetMs(value) {
|
|
294573
|
+
const trimmed = value?.trim();
|
|
294574
|
+
if (!trimmed || !/^\d+$/.test(trimmed)) {
|
|
294575
|
+
return void 0;
|
|
294576
|
+
}
|
|
294577
|
+
const seconds = Number(trimmed);
|
|
294578
|
+
const nowSeconds = Date.now() / 1e3;
|
|
294579
|
+
if (seconds > nowSeconds) {
|
|
294580
|
+
return Math.max(0, (seconds - nowSeconds) * 1e3);
|
|
294581
|
+
}
|
|
294582
|
+
return seconds * 1e3;
|
|
294583
|
+
}
|
|
294584
|
+
function computeSessionRetryDelayMs(response, attempt, random) {
|
|
294585
|
+
const headers = response?.headers;
|
|
294586
|
+
const signal = parseRetryAfterMs(headers?.get("retry-after") ?? null) ?? parseRateLimitResetMs(
|
|
294587
|
+
headers?.get("ratelimit-reset") ?? headers?.get("x-ratelimit-reset") ?? null
|
|
294588
|
+
);
|
|
294589
|
+
if (signal !== void 0) {
|
|
294590
|
+
return Math.min(Math.max(0, signal), SESSION_RETRY_MAX_DELAY_MS);
|
|
294591
|
+
}
|
|
294592
|
+
const ceiling = Math.min(SESSION_RETRY_MAX_DELAY_MS, SESSION_RETRY_BASE_DELAY_MS * 2 ** (attempt - 1));
|
|
294593
|
+
return Math.round(random() * ceiling);
|
|
294594
|
+
}
|
|
294548
294595
|
function getMemoizedSessionIdentity() {
|
|
294549
294596
|
return memoizedSessionIdentity;
|
|
294550
294597
|
}
|
|
294598
|
+
function getSessionResolutionFailure() {
|
|
294599
|
+
return memoizedSessionFailure;
|
|
294600
|
+
}
|
|
294551
294601
|
function asRecord2(value) {
|
|
294552
294602
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
294553
294603
|
return void 0;
|
|
@@ -294616,46 +294666,90 @@ async function resolveSessionIdentity(opts) {
|
|
|
294616
294666
|
const memoKey = `${baseUrl}::${accessToken}`;
|
|
294617
294667
|
let pending = sessionMemo.get(memoKey);
|
|
294618
294668
|
if (!pending) {
|
|
294619
|
-
pending = probeSessionIdentity(
|
|
294669
|
+
pending = probeSessionIdentity(
|
|
294670
|
+
baseUrl,
|
|
294671
|
+
accessToken,
|
|
294672
|
+
opts.fetchImpl ?? fetch,
|
|
294673
|
+
Math.max(1, opts.maxAttempts ?? SESSION_MAX_ATTEMPTS),
|
|
294674
|
+
opts.sleepImpl ?? defaultSessionSleep,
|
|
294675
|
+
opts.randomImpl ?? defaultRandom
|
|
294676
|
+
);
|
|
294620
294677
|
sessionMemo.set(memoKey, pending);
|
|
294621
294678
|
}
|
|
294622
294679
|
return pending;
|
|
294623
294680
|
}
|
|
294624
|
-
async function
|
|
294681
|
+
async function parseSessionResponse(response) {
|
|
294682
|
+
let payload;
|
|
294625
294683
|
try {
|
|
294626
|
-
|
|
294627
|
-
method: "GET",
|
|
294628
|
-
headers: { "x-access-token": accessToken }
|
|
294629
|
-
});
|
|
294630
|
-
if (!response.ok) {
|
|
294631
|
-
return void 0;
|
|
294632
|
-
}
|
|
294633
|
-
const payload = asRecord2(await response.json());
|
|
294634
|
-
if (!payload) {
|
|
294635
|
-
return void 0;
|
|
294636
|
-
}
|
|
294637
|
-
const root = asRecord2(payload.session) ?? payload;
|
|
294638
|
-
const identity = asRecord2(root.identity);
|
|
294639
|
-
const data = asRecord2(root.data);
|
|
294640
|
-
const user = asRecord2(data?.user);
|
|
294641
|
-
const roleEntries = Array.isArray(user?.roles) ? user.roles.map((entry) => coerceText(entry) ?? coerceId(entry)).filter((entry) => Boolean(entry)) : [];
|
|
294642
|
-
const singleRole = coerceText(user?.role);
|
|
294643
|
-
const roles = roleEntries.length > 0 ? roleEntries : singleRole ? [singleRole] : void 0;
|
|
294644
|
-
const resolved = {
|
|
294645
|
-
source: "iapub/sessions",
|
|
294646
|
-
userId: coerceId(identity?.user) ?? coerceId(user?.id),
|
|
294647
|
-
fullName: coerceText(user?.fullName) ?? coerceText(user?.name) ?? coerceText(user?.username),
|
|
294648
|
-
teamId: coerceId(identity?.team),
|
|
294649
|
-
teamName: coerceText(user?.teamName),
|
|
294650
|
-
teamDomain: coerceText(identity?.domain),
|
|
294651
|
-
...roles ? { roles } : {},
|
|
294652
|
-
consumerType: coerceText(root.consumerType) ?? coerceText(data?.consumerType) ?? coerceText(user?.consumerType)
|
|
294653
|
-
};
|
|
294654
|
-
memoizedSessionIdentity = resolved;
|
|
294655
|
-
return resolved;
|
|
294684
|
+
payload = asRecord2(await response.json());
|
|
294656
294685
|
} catch {
|
|
294657
294686
|
return void 0;
|
|
294658
294687
|
}
|
|
294688
|
+
if (!payload) {
|
|
294689
|
+
return void 0;
|
|
294690
|
+
}
|
|
294691
|
+
const root = asRecord2(payload.session) ?? payload;
|
|
294692
|
+
const identity = asRecord2(root.identity);
|
|
294693
|
+
const data = asRecord2(root.data);
|
|
294694
|
+
const user = asRecord2(data?.user);
|
|
294695
|
+
const roleEntries = Array.isArray(user?.roles) ? user.roles.map((entry) => coerceText(entry) ?? coerceId(entry)).filter((entry) => Boolean(entry)) : [];
|
|
294696
|
+
const singleRole = coerceText(user?.role);
|
|
294697
|
+
const roles = roleEntries.length > 0 ? roleEntries : singleRole ? [singleRole] : void 0;
|
|
294698
|
+
return {
|
|
294699
|
+
source: "iapub/sessions",
|
|
294700
|
+
userId: coerceId(identity?.user) ?? coerceId(user?.id),
|
|
294701
|
+
fullName: coerceText(user?.fullName) ?? coerceText(user?.name) ?? coerceText(user?.username),
|
|
294702
|
+
teamId: coerceId(identity?.team),
|
|
294703
|
+
teamName: coerceText(user?.teamName),
|
|
294704
|
+
teamDomain: coerceText(identity?.domain),
|
|
294705
|
+
...roles ? { roles } : {},
|
|
294706
|
+
consumerType: coerceText(root.consumerType) ?? coerceText(data?.consumerType) ?? coerceText(user?.consumerType)
|
|
294707
|
+
};
|
|
294708
|
+
}
|
|
294709
|
+
async function probeSessionIdentity(baseUrl, accessToken, fetchImpl, maxAttempts, sleepImpl, random) {
|
|
294710
|
+
let failure = "unavailable";
|
|
294711
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
|
|
294712
|
+
let response;
|
|
294713
|
+
try {
|
|
294714
|
+
response = await fetchImpl(`${baseUrl}${sessionPath}`, {
|
|
294715
|
+
method: "GET",
|
|
294716
|
+
headers: { "x-access-token": accessToken }
|
|
294717
|
+
});
|
|
294718
|
+
} catch {
|
|
294719
|
+
failure = "unavailable";
|
|
294720
|
+
if (attempt < maxAttempts) {
|
|
294721
|
+
await sleepImpl(computeSessionRetryDelayMs(void 0, attempt, random));
|
|
294722
|
+
continue;
|
|
294723
|
+
}
|
|
294724
|
+
break;
|
|
294725
|
+
}
|
|
294726
|
+
if (response.ok) {
|
|
294727
|
+
const resolved = await parseSessionResponse(response);
|
|
294728
|
+
if (resolved) {
|
|
294729
|
+
memoizedSessionIdentity = resolved;
|
|
294730
|
+
memoizedSessionFailure = void 0;
|
|
294731
|
+
return resolved;
|
|
294732
|
+
}
|
|
294733
|
+
failure = "unavailable";
|
|
294734
|
+
break;
|
|
294735
|
+
}
|
|
294736
|
+
if (response.status === 401 || response.status === 403) {
|
|
294737
|
+
failure = "auth";
|
|
294738
|
+
break;
|
|
294739
|
+
}
|
|
294740
|
+
if (response.status === 429 || response.status >= 500) {
|
|
294741
|
+
failure = "unavailable";
|
|
294742
|
+
if (attempt < maxAttempts) {
|
|
294743
|
+
await sleepImpl(computeSessionRetryDelayMs(response, attempt, random));
|
|
294744
|
+
continue;
|
|
294745
|
+
}
|
|
294746
|
+
break;
|
|
294747
|
+
}
|
|
294748
|
+
failure = "unavailable";
|
|
294749
|
+
break;
|
|
294750
|
+
}
|
|
294751
|
+
memoizedSessionFailure = failure;
|
|
294752
|
+
return void 0;
|
|
294659
294753
|
}
|
|
294660
294754
|
function describeTeam(id) {
|
|
294661
294755
|
const label = id?.teamName ?? id?.teamDomain;
|
|
@@ -294746,7 +294840,9 @@ async function runCredentialPreflight(args) {
|
|
|
294746
294840
|
session = await resolveSessionIdentity({
|
|
294747
294841
|
iapubBaseUrl: args.iapubBaseUrl,
|
|
294748
294842
|
accessToken,
|
|
294749
|
-
fetchImpl: args.fetchImpl
|
|
294843
|
+
fetchImpl: args.fetchImpl,
|
|
294844
|
+
...args.sleepImpl ? { sleepImpl: args.sleepImpl } : {},
|
|
294845
|
+
...args.randomImpl ? { randomImpl: args.randomImpl } : {}
|
|
294750
294846
|
});
|
|
294751
294847
|
} catch (error) {
|
|
294752
294848
|
args.log.warning(
|
|
@@ -294766,11 +294862,20 @@ async function runCredentialPreflight(args) {
|
|
|
294766
294862
|
);
|
|
294767
294863
|
}
|
|
294768
294864
|
} else {
|
|
294865
|
+
const failure = getSessionResolutionFailure();
|
|
294866
|
+
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.";
|
|
294867
|
+
const base = "postman: credential preflight could not resolve the access-token session identity from iapub: " + detail;
|
|
294868
|
+
if (args.mode === "enforce") {
|
|
294869
|
+
throw new Error(
|
|
294870
|
+
mask(
|
|
294871
|
+
`${base} (credential-preflight: enforce requires a resolvable session identity; use credential-preflight: warn to continue with reactive error guidance only.)`
|
|
294872
|
+
)
|
|
294873
|
+
);
|
|
294874
|
+
}
|
|
294769
294875
|
args.log.warning(
|
|
294770
|
-
mask(
|
|
294771
|
-
"postman: credential preflight could not resolve the access-token session identity from iapub; continuing with reactive error guidance only"
|
|
294772
|
-
)
|
|
294876
|
+
mask(`${base} Continuing with reactive error guidance only (credential-preflight: warn).`)
|
|
294773
294877
|
);
|
|
294878
|
+
return;
|
|
294774
294879
|
}
|
|
294775
294880
|
const result = crossCheckIdentities({
|
|
294776
294881
|
pmak,
|
|
@@ -297097,6 +297202,7 @@ function buildContractIndex(root) {
|
|
|
297097
297202
|
parameterChecks,
|
|
297098
297203
|
requestBody: collectRequestBody(root, operation, version2, operationId, opWarnings),
|
|
297099
297204
|
security: collectSecurityRuntimeChecks(root, operation),
|
|
297205
|
+
pathMethods: Object.keys(pathItem).filter((key) => HTTP_METHODS.has(key)).map((key) => key.toUpperCase()),
|
|
297100
297206
|
warnings: opWarnings
|
|
297101
297207
|
});
|
|
297102
297208
|
}
|
|
@@ -297273,7 +297379,7 @@ function buildValidatorAssignments(operation, warnings, skipped) {
|
|
|
297273
297379
|
return lines;
|
|
297274
297380
|
}
|
|
297275
297381
|
function createContractScript(operation, warnings = []) {
|
|
297276
|
-
const contract = { method: operation.method, path: operation.path, responses: operation.responses, security: operation.security, parameters: operation.parameterChecks };
|
|
297382
|
+
const contract = { method: operation.method, path: operation.path, responses: operation.responses, security: operation.security, parameters: operation.parameterChecks, pathMethods: operation.pathMethods };
|
|
297277
297383
|
const skipped = [];
|
|
297278
297384
|
const validatorLines = buildValidatorAssignments(operation, warnings, skipped);
|
|
297279
297385
|
return [
|
|
@@ -297384,6 +297490,61 @@ function createContractScript(operation, warnings = []) {
|
|
|
297384
297490
|
' if (!isJsonSubtype(actual.subtype) && media.media.schema && media.media.schema.type !== "string") { return; }',
|
|
297385
297491
|
' if (!validate(value)) pm.expect.fail("OpenAPI schema validation failed for " + contract.method + " " + contract.path + " status " + pm.response.code + ": " + JSON.stringify(validate.errors || []));',
|
|
297386
297492
|
"});",
|
|
297493
|
+
"pm.test('Response satisfies RFC 9110 status-code requirements', function () {",
|
|
297494
|
+
" var code = pm.response.code;",
|
|
297495
|
+
' function respHeader(name) { return pm.response.headers.get(name) || ""; }',
|
|
297496
|
+
" if (code === 401) {",
|
|
297497
|
+
' var challenge = respHeader("WWW-Authenticate");',
|
|
297498
|
+
' if (!challenge) pm.expect.fail("RFC 9110 requires WWW-Authenticate on 401 responses");',
|
|
297499
|
+
' var wantsBearer = (contract.security || []).some(function (alternative) { return alternative.some(function (check) { return check.prefix && check.prefix.toLowerCase().indexOf("bearer") === 0; }); });',
|
|
297500
|
+
' 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);',
|
|
297501
|
+
" }",
|
|
297502
|
+
" if (code === 405) {",
|
|
297503
|
+
' var allow = respHeader("Allow");',
|
|
297504
|
+
' if (!allow) pm.expect.fail("RFC 9110 requires Allow on 405 responses");',
|
|
297505
|
+
' var allowed = allow.split(",").map(function (entry) { return entry.trim().toUpperCase(); });',
|
|
297506
|
+
' (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); });',
|
|
297507
|
+
" }",
|
|
297508
|
+
' if (code === 304 && responseText().trim().length > 0) pm.expect.fail("RFC 9110 forbids content in a 304 response");',
|
|
297509
|
+
" if (code === 206) {",
|
|
297510
|
+
' var range = respHeader("Content-Range");',
|
|
297511
|
+
' if (!range) pm.expect.fail("RFC 9110 requires Content-Range on a single-part 206 response");',
|
|
297512
|
+
' if (range && !/^\\S+ (\\d+-\\d+|\\*)\\/(\\d+|\\*)$/.test(range)) pm.expect.fail("Content-Range is not a valid RFC 9110 range: " + range);',
|
|
297513
|
+
" }",
|
|
297514
|
+
' var retryAfter = respHeader("Retry-After");',
|
|
297515
|
+
" if (retryAfter && (code === 429 || code === 503 || (code >= 300 && code < 400))) {",
|
|
297516
|
+
' 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);',
|
|
297517
|
+
" }",
|
|
297518
|
+
' var location = respHeader("Location");',
|
|
297519
|
+
" if (location && (code === 201 || (code >= 300 && code < 400))) {",
|
|
297520
|
+
' if (/\\s/.test(location.trim()) || location.trim().length === 0) pm.expect.fail("Location must be a valid URI-reference (RFC 9110 / RFC 3986): " + location);',
|
|
297521
|
+
" }",
|
|
297522
|
+
"});",
|
|
297523
|
+
"pm.test('Error and encoding conventions match RFC 9457 / RFC 8259 / RFC 8288', function () {",
|
|
297524
|
+
' var contentTypeRaw = pm.response.headers.get("Content-Type") || "";',
|
|
297525
|
+
" var ct = mediaParts(contentTypeRaw);",
|
|
297526
|
+
' if (ct.type === "application" && ct.subtype === "problem+json") {',
|
|
297527
|
+
" var problem;",
|
|
297528
|
+
' try { problem = pm.response.json(); } catch (error) { pm.expect.fail("application/problem+json body is not valid JSON (RFC 9457): " + error); }',
|
|
297529
|
+
' if (!problem || typeof problem !== "object" || Array.isArray(problem)) pm.expect.fail("problem details must be a JSON object (RFC 9457)");',
|
|
297530
|
+
' ["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]); });',
|
|
297531
|
+
" if (problem.status !== undefined) {",
|
|
297532
|
+
' if (typeof problem.status !== "number") pm.expect.fail("RFC 9457 status member must be a number; got " + typeof problem.status);',
|
|
297533
|
+
' 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 + ")");',
|
|
297534
|
+
" }",
|
|
297535
|
+
" }",
|
|
297536
|
+
" if (isJsonSubtype(ct.subtype)) {",
|
|
297537
|
+
' var charsetMatch = contentTypeRaw.match(/charset\\s*=\\s*"?([^";\\s]+)"?/i);',
|
|
297538
|
+
' if (charsetMatch && charsetMatch[1].toLowerCase() !== "utf-8") pm.expect.fail("JSON interchange must be UTF-8 (RFC 8259); got charset=" + charsetMatch[1]);',
|
|
297539
|
+
" }",
|
|
297540
|
+
' var link = pm.response.headers.get("Link");',
|
|
297541
|
+
" if (link) {",
|
|
297542
|
+
" link.split(/,(?=\\s*<)/).forEach(function (value) {",
|
|
297543
|
+
' if (!/^\\s*<[^>]*>/.test(value)) pm.expect.fail("RFC 8288 link-value must start with a <URI-Reference>: " + value);',
|
|
297544
|
+
' if (!/;\\s*rel\\s*=/i.test(value)) pm.expect.fail("RFC 8288 link-value must carry a rel parameter: " + value);',
|
|
297545
|
+
" });",
|
|
297546
|
+
" }",
|
|
297547
|
+
"});",
|
|
297387
297548
|
...operation.security ? [
|
|
297388
297549
|
"pm.test('Request carries credentials required by OpenAPI security', function () {",
|
|
297389
297550
|
" function satisfied(check) {",
|
|
@@ -297813,6 +297974,15 @@ function asRecord7(value) {
|
|
|
297813
297974
|
}
|
|
297814
297975
|
return value;
|
|
297815
297976
|
}
|
|
297977
|
+
function adviseWorkspaceFlipForbidden(error) {
|
|
297978
|
+
if (error instanceof HttpError && error.status === 403) {
|
|
297979
|
+
const body = error.responseBody || "";
|
|
297980
|
+
if (/addWorkspaceLevelTeamRoles/i.test(body) || /You are not authorized to perform this action/i.test(body)) {
|
|
297981
|
+
return new Error(WORKSPACE_PERSONAL_ONLY_ADVICE, { cause: error });
|
|
297982
|
+
}
|
|
297983
|
+
}
|
|
297984
|
+
return error;
|
|
297985
|
+
}
|
|
297816
297986
|
function extractGitRepoUrl(value) {
|
|
297817
297987
|
if (!value) return null;
|
|
297818
297988
|
if (typeof value === "string") {
|
|
@@ -297840,7 +298010,7 @@ function extractGitRepoUrl(value) {
|
|
|
297840
298010
|
}
|
|
297841
298011
|
var PostmanGatewayAssetsClient = class _PostmanGatewayAssetsClient {
|
|
297842
298012
|
static GENERATION_LOCKED_MAX_RETRIES = 5;
|
|
297843
|
-
static GENERATION_POLL_ATTEMPTS =
|
|
298013
|
+
static GENERATION_POLL_ATTEMPTS = 90;
|
|
297844
298014
|
static GENERATION_POLL_DELAY_MS = 2e3;
|
|
297845
298015
|
gateway;
|
|
297846
298016
|
sleep;
|
|
@@ -298118,7 +298288,7 @@ var PostmanGatewayAssetsClient = class _PostmanGatewayAssetsClient {
|
|
|
298118
298288
|
}
|
|
298119
298289
|
} catch (error) {
|
|
298120
298290
|
await this.deleteWorkspace(workspaceId).catch(() => void 0);
|
|
298121
|
-
throw error;
|
|
298291
|
+
throw adviseWorkspaceFlipForbidden(error);
|
|
298122
298292
|
}
|
|
298123
298293
|
return { id: workspaceId };
|
|
298124
298294
|
}
|
|
@@ -298215,6 +298385,40 @@ var PostmanGatewayAssetsClient = class _PostmanGatewayAssetsClient {
|
|
|
298215
298385
|
const u = String(uid ?? "").trim();
|
|
298216
298386
|
return u.includes("-") ? u.slice(u.indexOf("-") + 1) : u;
|
|
298217
298387
|
}
|
|
298388
|
+
/**
|
|
298389
|
+
* PATCH a freshly-created item's `/scripts`, tolerating the two transient
|
|
298390
|
+
* failures this immediate-after-create write is prone to on the shared gateway:
|
|
298391
|
+
* - `404 RESOURCE_NOT_FOUND` — the create write returns the assigned id, but
|
|
298392
|
+
* an immediate PATCH can hit a replica that has not yet observed the create
|
|
298393
|
+
* (read-after-write lag, live-observed on org-mode teams).
|
|
298394
|
+
* - a downstream `5xx` (e.g. `500 ESOCKETTIMEDOUT`) — a Bifrost/gateway read
|
|
298395
|
+
* timeout, not a durable rejection.
|
|
298396
|
+
* `op:add /scripts` is idempotent (overwrites), so retrying either is safe.
|
|
298397
|
+
* This is a deeper, longer-backoff budget than the gateway client's inner
|
|
298398
|
+
* transient retry, to wait out a longer platform hiccup on this fragile write.
|
|
298399
|
+
* Non-transient errors (e.g. 4xx schema rejections) surface immediately.
|
|
298400
|
+
*/
|
|
298401
|
+
async patchNewItemScripts(cid, itemId, scripts) {
|
|
298402
|
+
const maxAttempts = 6;
|
|
298403
|
+
for (let attempt = 0; attempt < maxAttempts; attempt += 1) {
|
|
298404
|
+
try {
|
|
298405
|
+
await this.gateway.requestJson({
|
|
298406
|
+
service: "collection",
|
|
298407
|
+
method: "patch",
|
|
298408
|
+
path: `/v3/collections/${cid}/items/${itemId}`,
|
|
298409
|
+
headers: { "X-Entity-Type": "http-request" },
|
|
298410
|
+
body: [{ op: "add", path: "/scripts", value: scripts }]
|
|
298411
|
+
});
|
|
298412
|
+
return;
|
|
298413
|
+
} catch (error) {
|
|
298414
|
+
const retriable = error instanceof HttpError && (error.status === 404 || error.status >= 500);
|
|
298415
|
+
if (!retriable || attempt === maxAttempts - 1) {
|
|
298416
|
+
throw error;
|
|
298417
|
+
}
|
|
298418
|
+
await this.sleep(Math.min(2e3, 300 * 2 ** attempt));
|
|
298419
|
+
}
|
|
298420
|
+
}
|
|
298421
|
+
}
|
|
298218
298422
|
/**
|
|
298219
298423
|
* Apply tag slugs via the dedicated `tagging` service:
|
|
298220
298424
|
* `PUT /v1/tags/collections/:uid` (full uid), body `{ tags:[{ slug }] }` — the
|
|
@@ -298332,26 +298536,14 @@ var PostmanGatewayAssetsClient = class _PostmanGatewayAssetsClient {
|
|
|
298332
298536
|
});
|
|
298333
298537
|
const newItemId = String(asRecord7(created?.data)?.id ?? "").trim();
|
|
298334
298538
|
if (!newItemId) return;
|
|
298335
|
-
await this.
|
|
298336
|
-
|
|
298337
|
-
|
|
298338
|
-
|
|
298339
|
-
|
|
298340
|
-
|
|
298341
|
-
|
|
298342
|
-
|
|
298343
|
-
path: "/scripts",
|
|
298344
|
-
value: toV3Scripts([
|
|
298345
|
-
'if (pm.environment.get("CI") === "true") { return; }',
|
|
298346
|
-
"const body = pm.response.json();",
|
|
298347
|
-
"if (body.SecretString) {",
|
|
298348
|
-
" const secrets = JSON.parse(body.SecretString);",
|
|
298349
|
-
" Object.entries(secrets).forEach(([k, v]) => pm.collectionVariables.set(k, v));",
|
|
298350
|
-
"}"
|
|
298351
|
-
])
|
|
298352
|
-
}
|
|
298353
|
-
]
|
|
298354
|
-
});
|
|
298539
|
+
await this.patchNewItemScripts(cid, newItemId, toV3Scripts([
|
|
298540
|
+
'if (pm.environment.get("CI") === "true") { return; }',
|
|
298541
|
+
"const body = pm.response.json();",
|
|
298542
|
+
"if (body.SecretString) {",
|
|
298543
|
+
" const secrets = JSON.parse(body.SecretString);",
|
|
298544
|
+
" Object.entries(secrets).forEach(([k, v]) => pm.collectionVariables.set(k, v));",
|
|
298545
|
+
"}"
|
|
298546
|
+
]));
|
|
298355
298547
|
}
|
|
298356
298548
|
// --- workspace roles + member resolution (live-proven 2026-06-30) ---
|
|
298357
298549
|
//
|
|
@@ -298510,26 +298702,14 @@ var PostmanGatewayAssetsClient = class _PostmanGatewayAssetsClient {
|
|
|
298510
298702
|
});
|
|
298511
298703
|
const newItemId = String(asRecord7(created?.data)?.id ?? "").trim();
|
|
298512
298704
|
if (newItemId) {
|
|
298513
|
-
await this.
|
|
298514
|
-
|
|
298515
|
-
|
|
298516
|
-
|
|
298517
|
-
|
|
298518
|
-
|
|
298519
|
-
|
|
298520
|
-
|
|
298521
|
-
path: "/scripts",
|
|
298522
|
-
value: toV3Scripts([
|
|
298523
|
-
'if (pm.environment.get("CI") === "true") { return; }',
|
|
298524
|
-
"const body = pm.response.json();",
|
|
298525
|
-
"if (body.SecretString) {",
|
|
298526
|
-
" const secrets = JSON.parse(body.SecretString);",
|
|
298527
|
-
" Object.entries(secrets).forEach(([k, v]) => pm.collectionVariables.set(k, v));",
|
|
298528
|
-
"}"
|
|
298529
|
-
])
|
|
298530
|
-
}
|
|
298531
|
-
]
|
|
298532
|
-
});
|
|
298705
|
+
await this.patchNewItemScripts(cid, newItemId, toV3Scripts([
|
|
298706
|
+
'if (pm.environment.get("CI") === "true") { return; }',
|
|
298707
|
+
"const body = pm.response.json();",
|
|
298708
|
+
"if (body.SecretString) {",
|
|
298709
|
+
" const secrets = JSON.parse(body.SecretString);",
|
|
298710
|
+
" Object.entries(secrets).forEach(([k, v]) => pm.collectionVariables.set(k, v));",
|
|
298711
|
+
"}"
|
|
298712
|
+
]));
|
|
298533
298713
|
}
|
|
298534
298714
|
}
|
|
298535
298715
|
return plan.warnings;
|
|
@@ -299365,7 +299545,7 @@ function resolveActionVersion(explicit) {
|
|
|
299365
299545
|
if (explicit) {
|
|
299366
299546
|
return explicit;
|
|
299367
299547
|
}
|
|
299368
|
-
return "
|
|
299548
|
+
return typeof __ACTION_VERSION__ !== "undefined" && __ACTION_VERSION__ ? __ACTION_VERSION__ : "unknown";
|
|
299369
299549
|
}
|
|
299370
299550
|
function telemetryDisabled(env) {
|
|
299371
299551
|
const flag = String(env.POSTMAN_ACTIONS_TELEMETRY ?? "").trim().toLowerCase();
|
|
@@ -299487,11 +299667,23 @@ function createTelemetryContext(options) {
|
|
|
299487
299667
|
};
|
|
299488
299668
|
}
|
|
299489
299669
|
|
|
299490
|
-
// src/
|
|
299670
|
+
// src/action-version.ts
|
|
299491
299671
|
var import_node_fs3 = require("node:fs");
|
|
299672
|
+
var import_node_path3 = require("node:path");
|
|
299673
|
+
function resolveActionVersion2() {
|
|
299674
|
+
try {
|
|
299675
|
+
const raw = (0, import_node_fs3.readFileSync)((0, import_node_path3.join)(__dirname, "..", "package.json"), "utf8");
|
|
299676
|
+
return JSON.parse(raw).version ?? "unknown";
|
|
299677
|
+
} catch {
|
|
299678
|
+
return "unknown";
|
|
299679
|
+
}
|
|
299680
|
+
}
|
|
299681
|
+
|
|
299682
|
+
// src/lib/spec/openapi-loader.ts
|
|
299683
|
+
var import_node_fs4 = require("node:fs");
|
|
299492
299684
|
var import_promises3 = require("node:fs/promises");
|
|
299493
299685
|
var import_node_url2 = require("node:url");
|
|
299494
|
-
var
|
|
299686
|
+
var import_node_path4 = __toESM(require("node:path"), 1);
|
|
299495
299687
|
|
|
299496
299688
|
// node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/convert-path-to-posix.js
|
|
299497
299689
|
var win32Sep = "\\";
|
|
@@ -299832,14 +300024,14 @@ function fromFileSystemPath(path8) {
|
|
|
299832
300024
|
const hasProjectUri = upperPath.includes(posixUpper);
|
|
299833
300025
|
const isAbsolutePath = isAbsoluteWin32Path.test(path8) || path8.startsWith("http://") || path8.startsWith("https://") || path8.startsWith("file://");
|
|
299834
300026
|
if (!(hasProjectDir || hasProjectUri || isAbsolutePath) && !projectDir.startsWith("http")) {
|
|
299835
|
-
const
|
|
300027
|
+
const join4 = (a, b) => {
|
|
299836
300028
|
if (a.endsWith("/") || a.endsWith("\\")) {
|
|
299837
300029
|
return a + b;
|
|
299838
300030
|
} else {
|
|
299839
300031
|
return a + "/" + b;
|
|
299840
300032
|
}
|
|
299841
300033
|
};
|
|
299842
|
-
path8 =
|
|
300034
|
+
path8 = join4(projectDir, path8);
|
|
299843
300035
|
}
|
|
299844
300036
|
path8 = convertPathToPosix(path8);
|
|
299845
300037
|
}
|
|
@@ -303954,6 +304146,7 @@ function inventory$Ref($refParent, $refKey, path8, scopeBase, dynamicIdScope, pa
|
|
|
303954
304146
|
const file = stripHash(pointer.path);
|
|
303955
304147
|
const hash = getHash(pointer.path);
|
|
303956
304148
|
const external = file !== $refs._root$Ref.path && !$refs._aliases[file];
|
|
304149
|
+
const nestedResource = Boolean($refs._aliases[file]) && pointer.$ref.value !== $refs._root$Ref.value;
|
|
303957
304150
|
const extended = ref_default.isExtended$Ref($ref);
|
|
303958
304151
|
indirections += pointer.indirections;
|
|
303959
304152
|
const existingEntry = findInInventory(inventory, $refParent, $refKey);
|
|
@@ -303987,6 +304180,8 @@ function inventory$Ref($refParent, $refKey, path8, scopeBase, dynamicIdScope, pa
|
|
|
303987
304180
|
// Does this $ref extend its resolved value? (i.e. it has extra properties, in addition to "$ref")
|
|
303988
304181
|
external,
|
|
303989
304182
|
// Does this $ref pointer point to a file other than the main JSON Schema file?
|
|
304183
|
+
nestedResource,
|
|
304184
|
+
// Does this $ref resolve to an embedded schema resource with its own $id?
|
|
303990
304185
|
indirections
|
|
303991
304186
|
// The number of indirect references that were traversed to resolve the value
|
|
303992
304187
|
});
|
|
@@ -304022,7 +304217,7 @@ function remap(inventory, options, rootId) {
|
|
|
304022
304217
|
for (const entry of inventory) {
|
|
304023
304218
|
const bundleOpts = options.bundle || {};
|
|
304024
304219
|
if (!entry.external) {
|
|
304025
|
-
if (bundleOpts.optimizeInternalRefs !== false) {
|
|
304220
|
+
if (bundleOpts.optimizeInternalRefs !== false && !entry.nestedResource) {
|
|
304026
304221
|
entry.$ref.$ref = entry.hash;
|
|
304027
304222
|
}
|
|
304028
304223
|
} else if (entry.file === file && entry.hash === hash) {
|
|
@@ -311826,22 +312021,22 @@ async function loadOpenApiContractSpec(specUrl, options = {}) {
|
|
|
311826
312021
|
async function loadOpenApiContractSpecFromPath(specPath, options = {}) {
|
|
311827
312022
|
if (!specPath) throw new Error("CONTRACT_SPEC_READ_FAILED: spec-path must not be empty");
|
|
311828
312023
|
const workspaceRoot = (() => {
|
|
311829
|
-
const root =
|
|
312024
|
+
const root = import_node_path4.default.resolve(process.env.GITHUB_WORKSPACE ?? process.cwd());
|
|
311830
312025
|
try {
|
|
311831
|
-
return (0,
|
|
312026
|
+
return (0, import_node_fs4.realpathSync)(root);
|
|
311832
312027
|
} catch {
|
|
311833
312028
|
return root;
|
|
311834
312029
|
}
|
|
311835
312030
|
})();
|
|
311836
|
-
const resolved =
|
|
312031
|
+
const resolved = import_node_path4.default.resolve(workspaceRoot, specPath);
|
|
311837
312032
|
let absolutePath;
|
|
311838
312033
|
try {
|
|
311839
|
-
absolutePath = (0,
|
|
312034
|
+
absolutePath = (0, import_node_fs4.realpathSync)(resolved);
|
|
311840
312035
|
} catch (error) {
|
|
311841
312036
|
throw new Error(`CONTRACT_SPEC_READ_FAILED: Unable to read spec at ${specPath}`, { cause: error });
|
|
311842
312037
|
}
|
|
311843
|
-
const rel =
|
|
311844
|
-
if (!rel || rel.startsWith("..") ||
|
|
312038
|
+
const rel = import_node_path4.default.relative(workspaceRoot, absolutePath);
|
|
312039
|
+
if (!rel || rel.startsWith("..") || import_node_path4.default.isAbsolute(rel)) {
|
|
311845
312040
|
throw new Error(`CONTRACT_SPEC_READ_FAILED: spec-path must resolve inside ${workspaceRoot}, got: ${specPath}`);
|
|
311846
312041
|
}
|
|
311847
312042
|
const maxBytes = options.maxBytesPerResource ?? SAFE_FETCH_LIMITS.maxBytesPerResource;
|
|
@@ -312255,6 +312450,17 @@ function buildOperationScript(operation, index, warnings) {
|
|
|
312255
312450
|
' pm.expect(pm.response.code, "GraphQL responses are HTTP 200 even when the data field carries errors").to.be.below(500);',
|
|
312256
312451
|
"});"
|
|
312257
312452
|
);
|
|
312453
|
+
lines.push(
|
|
312454
|
+
"pm.test(" + JSON.stringify("[" + label + "] GraphQL-over-HTTP media type and status are consistent") + ", function () {",
|
|
312455
|
+
' var contentType = ((pm.response.headers && pm.response.headers.get && pm.response.headers.get("Content-Type")) || "").toLowerCase();',
|
|
312456
|
+
' var mediaType = contentType.split(";")[0].trim();',
|
|
312457
|
+
" if (!mediaType) return;",
|
|
312458
|
+
' 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>")); }',
|
|
312459
|
+
" var wellFormed = gqlBody.data !== undefined || Array.isArray(gqlBody.errors);",
|
|
312460
|
+
' 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"); }',
|
|
312461
|
+
' 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); }',
|
|
312462
|
+
"});"
|
|
312463
|
+
);
|
|
312258
312464
|
lines.push(
|
|
312259
312465
|
`pm.test(${JSON.stringify(`[${label}] GraphQL errors are well-formed and not a total failure`)}, function () {`,
|
|
312260
312466
|
" var errors = gqlBody.errors;",
|
|
@@ -313795,6 +314001,8 @@ function createSoapScript(operation, warnings = []) {
|
|
|
313795
314001
|
hasOutput: Boolean(operation.output)
|
|
313796
314002
|
};
|
|
313797
314003
|
const responseRegex = operation.expectedResponseElement ? elementPresenceRegex(operation.expectedResponseElement) : "";
|
|
314004
|
+
const mediaType = operation.soapVersion === "1.2" ? "application/soap+xml" : "text/xml";
|
|
314005
|
+
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);';
|
|
313798
314006
|
const lines = [
|
|
313799
314007
|
`var soap = JSON.parse(${JSON.stringify(JSON.stringify(meta))});`,
|
|
313800
314008
|
'var bodyText = (pm.response.text && pm.response.text()) || "";',
|
|
@@ -313805,9 +314013,11 @@ function createSoapScript(operation, warnings = []) {
|
|
|
313805
314013
|
" pm.response.to.have.status(200);",
|
|
313806
314014
|
"});",
|
|
313807
314015
|
"",
|
|
313808
|
-
|
|
314016
|
+
// SOAP 1.1 responses bind to text/xml (SOAP 1.1 HTTP binding, WS-I Basic
|
|
314017
|
+
// Profile); SOAP 1.2 responses bind to application/soap+xml (RFC 3902).
|
|
314018
|
+
`pm.test('SOAP response Content-Type matches the SOAP ${operation.soapVersion} binding', function () {`,
|
|
313809
314019
|
' var ct = header("Content-Type").toLowerCase();',
|
|
313810
|
-
|
|
314020
|
+
` pm.expect(ct, "SOAP ${operation.soapVersion} responses use ${mediaType} (got: " + (ct || "<missing>") + ")").to.include("${mediaType}");`,
|
|
313811
314021
|
"});",
|
|
313812
314022
|
"",
|
|
313813
314023
|
"pm.test('SOAP Envelope element is present', function () {",
|
|
@@ -313824,6 +314034,13 @@ function createSoapScript(operation, warnings = []) {
|
|
|
313824
314034
|
' var detail = (bodyText.match(/<(?:[A-Za-z_][\\w.-]*:)?(?:faultstring|Reason|Text)[^>]*>([\\s\\S]*?)<\\//) || [])[1] || "";',
|
|
313825
314035
|
' pm.expect.fail("SOAP Fault returned for operation " + soap.name + (detail ? (": " + detail.trim()) : ""));',
|
|
313826
314036
|
" }",
|
|
314037
|
+
"});",
|
|
314038
|
+
"",
|
|
314039
|
+
"pm.test('SOAP Fault and HTTP status are consistent', function () {",
|
|
314040
|
+
' var faulted = matchTag("Fault").test(bodyText);',
|
|
314041
|
+
" var code = pm.response.code;",
|
|
314042
|
+
faultStatusLine,
|
|
314043
|
+
' if (!faulted && code === 500) pm.expect.fail("HTTP 500 from a SOAP endpoint must carry a SOAP Fault in the body");',
|
|
313827
314044
|
"});"
|
|
313828
314045
|
];
|
|
313829
314046
|
if (responseRegex) {
|
|
@@ -314981,6 +315198,7 @@ function normalizeSpecDocument(raw, warn) {
|
|
|
314981
315198
|
async function runBootstrap(inputs, dependencies) {
|
|
314982
315199
|
const telemetry = createTelemetryContext({
|
|
314983
315200
|
action: "postman-bootstrap-action",
|
|
315201
|
+
actionVersion: resolveActionVersion2(),
|
|
314984
315202
|
logger: dependencies.core
|
|
314985
315203
|
});
|
|
314986
315204
|
try {
|
|
@@ -315387,7 +315605,7 @@ async function runBootstrapInner(inputs, dependencies, telemetry) {
|
|
|
315387
315605
|
async () => {
|
|
315388
315606
|
if (inputs.specPath) {
|
|
315389
315607
|
const workspaceRoot = path6.resolve(process.env.GITHUB_WORKSPACE ?? process.cwd());
|
|
315390
|
-
return (0,
|
|
315608
|
+
return (0, import_node_fs5.readFileSync)(path6.resolve(workspaceRoot, inputs.specPath), "utf8");
|
|
315391
315609
|
}
|
|
315392
315610
|
if (dependencies.specFetcher === fetch) {
|
|
315393
315611
|
return safeFetchText(inputs.specUrl, { depth: 0 });
|
|
@@ -316198,15 +316416,15 @@ function shellQuote(value) {
|
|
|
316198
316416
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
316199
316417
|
}
|
|
316200
316418
|
function ensureInsideWorkspace(workspaceRoot, candidate) {
|
|
316201
|
-
const relative2 =
|
|
316202
|
-
if (relative2.startsWith("..") ||
|
|
316419
|
+
const relative2 = import_node_path5.default.relative(workspaceRoot, candidate);
|
|
316420
|
+
if (relative2.startsWith("..") || import_node_path5.default.isAbsolute(relative2)) {
|
|
316203
316421
|
throw new Error("Output path must stay within workspace");
|
|
316204
316422
|
}
|
|
316205
316423
|
}
|
|
316206
316424
|
function nearestExistingPath2(candidate) {
|
|
316207
316425
|
let current = candidate;
|
|
316208
316426
|
while (!pathExists(current)) {
|
|
316209
|
-
const parent =
|
|
316427
|
+
const parent = import_node_path5.default.dirname(current);
|
|
316210
316428
|
if (parent === current) {
|
|
316211
316429
|
return current;
|
|
316212
316430
|
}
|
|
@@ -316215,11 +316433,11 @@ function nearestExistingPath2(candidate) {
|
|
|
316215
316433
|
return current;
|
|
316216
316434
|
}
|
|
316217
316435
|
function pathExists(candidate) {
|
|
316218
|
-
if ((0,
|
|
316436
|
+
if ((0, import_node_fs6.existsSync)(candidate)) {
|
|
316219
316437
|
return true;
|
|
316220
316438
|
}
|
|
316221
316439
|
try {
|
|
316222
|
-
(0,
|
|
316440
|
+
(0, import_node_fs6.lstatSync)(candidate);
|
|
316223
316441
|
return true;
|
|
316224
316442
|
} catch {
|
|
316225
316443
|
return false;
|
|
@@ -316227,11 +316445,11 @@ function pathExists(candidate) {
|
|
|
316227
316445
|
}
|
|
316228
316446
|
function checkedRealPath(existingPath, workspaceRealPath) {
|
|
316229
316447
|
try {
|
|
316230
|
-
return (0,
|
|
316448
|
+
return (0, import_node_fs6.realpathSync)(existingPath);
|
|
316231
316449
|
} catch (error) {
|
|
316232
|
-
if ((0,
|
|
316233
|
-
const linkTarget = (0,
|
|
316234
|
-
const resolvedTarget =
|
|
316450
|
+
if ((0, import_node_fs6.lstatSync)(existingPath).isSymbolicLink()) {
|
|
316451
|
+
const linkTarget = (0, import_node_fs6.readlinkSync)(existingPath);
|
|
316452
|
+
const resolvedTarget = import_node_path5.default.resolve(import_node_path5.default.dirname(existingPath), linkTarget);
|
|
316235
316453
|
ensureInsideWorkspace(workspaceRealPath, resolvedTarget);
|
|
316236
316454
|
}
|
|
316237
316455
|
throw error;
|
|
@@ -316241,9 +316459,9 @@ function assertOutputFileAllowed2(filePath) {
|
|
|
316241
316459
|
if (!filePath) {
|
|
316242
316460
|
return void 0;
|
|
316243
316461
|
}
|
|
316244
|
-
const workspaceRoot =
|
|
316245
|
-
const workspaceRealPath = (0,
|
|
316246
|
-
const resolved =
|
|
316462
|
+
const workspaceRoot = import_node_path5.default.resolve(process.cwd());
|
|
316463
|
+
const workspaceRealPath = (0, import_node_fs6.realpathSync)(workspaceRoot);
|
|
316464
|
+
const resolved = import_node_path5.default.isAbsolute(filePath) ? import_node_path5.default.resolve(filePath) : import_node_path5.default.resolve(workspaceRoot, filePath);
|
|
316247
316465
|
const existingPath = nearestExistingPath2(resolved);
|
|
316248
316466
|
ensureInsideWorkspace(workspaceRealPath, checkedRealPath(existingPath, workspaceRealPath));
|
|
316249
316467
|
return resolved;
|
|
@@ -316253,8 +316471,8 @@ async function writeOptionalFile(filePath, content) {
|
|
|
316253
316471
|
if (!resolved) {
|
|
316254
316472
|
return;
|
|
316255
316473
|
}
|
|
316256
|
-
await (0, import_promises4.mkdir)(
|
|
316257
|
-
ensureInsideWorkspace((0,
|
|
316474
|
+
await (0, import_promises4.mkdir)(import_node_path5.default.dirname(resolved), { recursive: true });
|
|
316475
|
+
ensureInsideWorkspace((0, import_node_fs6.realpathSync)(import_node_path5.default.resolve(process.cwd())), (0, import_node_fs6.realpathSync)(import_node_path5.default.dirname(resolved)));
|
|
316258
316476
|
await (0, import_promises4.writeFile)(resolved, content, "utf8");
|
|
316259
316477
|
}
|
|
316260
316478
|
function requireCliInput(name, value) {
|
|
@@ -316312,9 +316530,9 @@ function isEntrypoint(currentPath, entrypointPath) {
|
|
|
316312
316530
|
return false;
|
|
316313
316531
|
}
|
|
316314
316532
|
try {
|
|
316315
|
-
return (0,
|
|
316533
|
+
return (0, import_node_fs6.realpathSync)(currentPath) === (0, import_node_fs6.realpathSync)(entrypointPath);
|
|
316316
316534
|
} catch {
|
|
316317
|
-
return
|
|
316535
|
+
return import_node_path5.default.resolve(currentPath) === import_node_path5.default.resolve(entrypointPath);
|
|
316318
316536
|
}
|
|
316319
316537
|
}
|
|
316320
316538
|
if (isEntrypoint(currentModulePath, entrypoint)) {
|