postman-runtime 7.52.0-beta.2 → 7.52.0-beta.3
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 +11 -0
- package/dist/index.js +1 -1
- package/lib/runner/extensions/event.command.js +47 -2
- package/lib/runner/extensions/item.command.js +18 -11
- package/lib/runner/extensions/request.command.js +5 -7
- package/lib/runner/index.js +12 -9
- package/lib/runner/resolve-secrets.js +51 -239
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -54,6 +54,17 @@ runner.run(collection, {
|
|
|
54
54
|
// Local variables (a "VariableScope" from the SDK)
|
|
55
55
|
localVariables: new sdk.VariableScope(),
|
|
56
56
|
|
|
57
|
+
// Function to resolve secret variables (variables with secret: true) before request execution.
|
|
58
|
+
// Receives { secrets, payload }; callback(err, result).
|
|
59
|
+
// On fatal error: callback(err) — execution stops. On success: callback(null, result) where result
|
|
60
|
+
// is Array<{ resolvedValue?, error?, safe? }>; result[i] maps to secrets[i].
|
|
61
|
+
// safe: true exposes value to scripts; false/undefined masks it from pm.environment/pm.variables.
|
|
62
|
+
secretResolver: function ({ secrets, payload }, callback) {
|
|
63
|
+
callback(null, secrets.map(function (s) {
|
|
64
|
+
return { resolvedValue: 'resolved-string', error: undefined, safe: true };
|
|
65
|
+
}));
|
|
66
|
+
},
|
|
67
|
+
|
|
57
68
|
// Execute a folder/request using id/name or path
|
|
58
69
|
entrypoint: {
|
|
59
70
|
// execute a folder/request using id or name
|