@pulumi/pulumi 3.124.1-alpha.xf6bdf03 → 3.125.0-alpha.x6215d96
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/asset/archive.d.ts +15 -10
- package/asset/archive.js +15 -9
- package/asset/archive.js.map +1 -1
- package/asset/asset.d.ts +14 -11
- package/asset/asset.js +15 -18
- package/asset/asset.js.map +1 -1
- package/automation/stack.d.ts +10 -2
- package/automation/stack.js +10 -2
- package/automation/stack.js.map +1 -1
- package/dynamic/index.d.ts +67 -35
- package/dynamic/index.js +15 -8
- package/dynamic/index.js.map +1 -1
- package/errors.d.ts +16 -12
- package/errors.js +18 -12
- package/errors.js.map +1 -1
- package/invoke.d.ts +50 -2
- package/iterable/index.d.ts +7 -5
- package/iterable/index.js +7 -5
- package/iterable/index.js.map +1 -1
- package/log/index.d.ts +8 -5
- package/log/index.js +8 -5
- package/log/index.js.map +1 -1
- package/metadata.d.ts +3 -3
- package/metadata.js +3 -3
- package/output.d.ts +119 -91
- package/output.js +73 -46
- package/output.js.map +1 -1
- package/package.json +1 -1
- package/provider/internals.js +3 -1
- package/provider/internals.js.map +1 -1
- package/provider/provider.d.ts +75 -39
- package/provider/server.js +13 -7
- package/provider/server.js.map +1 -1
- package/queryable/index.d.ts +5 -3
- package/resource.d.ts +233 -164
- package/resource.js +160 -97
- package/resource.js.map +1 -1
- package/runtime/asyncIterableUtil.js +26 -17
- package/runtime/asyncIterableUtil.js.map +1 -1
- package/runtime/callbacks.d.ts +5 -0
- package/runtime/callbacks.js +92 -2
- package/runtime/callbacks.js.map +1 -1
- package/runtime/closure/codePaths.d.ts +32 -27
- package/runtime/closure/codePaths.js +23 -15
- package/runtime/closure/codePaths.js.map +1 -1
- package/runtime/closure/createClosure.js +38 -30
- package/runtime/closure/createClosure.js.map +1 -1
- package/runtime/closure/parseFunction.js +26 -15
- package/runtime/closure/parseFunction.js.map +1 -1
- package/runtime/closure/rewriteSuper.js +3 -1
- package/runtime/closure/rewriteSuper.js.map +1 -1
- package/runtime/closure/serializeClosure.d.ts +52 -32
- package/runtime/closure/serializeClosure.js +34 -22
- package/runtime/closure/serializeClosure.js.map +1 -1
- package/runtime/closure/utils.js +6 -2
- package/runtime/closure/utils.js.map +1 -1
- package/runtime/closure/v8.js +18 -9
- package/runtime/closure/v8.js.map +1 -1
- package/runtime/closure/v8Hooks.js +8 -4
- package/runtime/closure/v8Hooks.js.map +1 -1
- package/runtime/config.d.ts +4 -4
- package/runtime/config.js +22 -18
- package/runtime/config.js.map +1 -1
- package/runtime/debuggable.js +17 -6
- package/runtime/debuggable.js.map +1 -1
- package/runtime/invoke.d.ts +23 -14
- package/runtime/invoke.js +27 -18
- package/runtime/invoke.js.map +1 -1
- package/runtime/mocks.d.ts +37 -23
- package/runtime/mocks.js +11 -6
- package/runtime/mocks.js.map +1 -1
- package/runtime/resource.d.ts +21 -15
- package/runtime/resource.js +48 -29
- package/runtime/resource.js.map +1 -1
- package/runtime/rpc.d.ts +71 -43
- package/runtime/rpc.js +85 -47
- package/runtime/rpc.js.map +1 -1
- package/runtime/settings.d.ts +70 -21
- package/runtime/settings.js +85 -42
- package/runtime/settings.js.map +1 -1
- package/runtime/stack.d.ts +27 -14
- package/runtime/stack.js +36 -14
- package/runtime/stack.js.map +1 -1
- package/runtime/state.js +22 -8
- package/runtime/state.js.map +1 -1
- package/stackReference.d.ts +49 -32
- package/stackReference.js +40 -25
- package/stackReference.js.map +1 -1
- package/tests/automation/localWorkspace.spec.js +20 -0
- package/tests/automation/localWorkspace.spec.js.map +1 -1
- package/tsutils.js +6 -2
- package/tsutils.js.map +1 -1
- package/utils.js +15 -6
- package/utils.js.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/runtime/stack.js
CHANGED
|
@@ -37,14 +37,15 @@ const resource_1 = require("../resource");
|
|
|
37
37
|
const settings_1 = require("./settings");
|
|
38
38
|
const state_1 = require("./state");
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
41
|
-
* resources allocated by a deployment.
|
|
42
|
-
* `github.com/pulumi/pulumi/sdk/v3/go/common/resource/stack.RootStackType`.
|
|
40
|
+
* The type name that should be used to construct the root component in the tree
|
|
41
|
+
* of Pulumi resources allocated by a deployment. This must be kept up to date
|
|
42
|
+
* with `github.com/pulumi/pulumi/sdk/v3/go/common/resource/stack.RootStackType`.
|
|
43
43
|
*/
|
|
44
44
|
exports.rootPulumiStackTypeName = "pulumi:pulumi:Stack";
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
47
|
-
* returned by the callback will be stored as output properties on
|
|
46
|
+
* Creates a new Pulumi stack resource and executes the callback inside of it.
|
|
47
|
+
* Any outputs returned by the callback will be stored as output properties on
|
|
48
|
+
* this resulting Stack object.
|
|
48
49
|
*/
|
|
49
50
|
function runInPulumiStack(init) {
|
|
50
51
|
if (!settings_1.isQueryMode()) {
|
|
@@ -57,8 +58,9 @@ function runInPulumiStack(init) {
|
|
|
57
58
|
}
|
|
58
59
|
exports.runInPulumiStack = runInPulumiStack;
|
|
59
60
|
/**
|
|
60
|
-
* Stack is the root resource for a Pulumi stack. Before invoking the
|
|
61
|
-
* resource with the Pulumi
|
|
61
|
+
* {@link Stack} is the root resource for a Pulumi stack. Before invoking the
|
|
62
|
+
* `init` callback, it registers itself as the root resource with the Pulumi
|
|
63
|
+
* engine.
|
|
62
64
|
*/
|
|
63
65
|
class Stack extends resource_1.ComponentResource {
|
|
64
66
|
constructor(init) {
|
|
@@ -71,10 +73,12 @@ class Stack extends resource_1.ComponentResource {
|
|
|
71
73
|
this.outputs = output_1.output(data);
|
|
72
74
|
}
|
|
73
75
|
/**
|
|
74
|
-
*
|
|
75
|
-
* used as the stack's output
|
|
76
|
+
* Invokes the given `init` callback with this resource set as the root
|
|
77
|
+
* resource. The return value of init is used as the stack's output
|
|
78
|
+
* properties.
|
|
76
79
|
*
|
|
77
|
-
* @param args.init
|
|
80
|
+
* @param args.init
|
|
81
|
+
* The callback to run in the context of this Pulumi stack
|
|
78
82
|
*/
|
|
79
83
|
initialize(args) {
|
|
80
84
|
const _super = Object.create(null, {
|
|
@@ -214,7 +218,8 @@ function massageComplex(prop, objectStack) {
|
|
|
214
218
|
});
|
|
215
219
|
}
|
|
216
220
|
/**
|
|
217
|
-
* Add a transformation to all future resources constructed in this Pulumi
|
|
221
|
+
* Add a transformation to all future resources constructed in this Pulumi
|
|
222
|
+
* stack.
|
|
218
223
|
*/
|
|
219
224
|
function registerStackTransformation(t) {
|
|
220
225
|
const stackResource = getStackResource();
|
|
@@ -225,7 +230,8 @@ function registerStackTransformation(t) {
|
|
|
225
230
|
}
|
|
226
231
|
exports.registerStackTransformation = registerStackTransformation;
|
|
227
232
|
/**
|
|
228
|
-
* Add a transformation to all future resources constructed in this Pulumi
|
|
233
|
+
* Add a transformation to all future resources constructed in this Pulumi
|
|
234
|
+
* stack.
|
|
229
235
|
*/
|
|
230
236
|
function registerResourceTransform(t) {
|
|
231
237
|
if (!state_1.getStore().supportsTransforms) {
|
|
@@ -239,14 +245,30 @@ function registerResourceTransform(t) {
|
|
|
239
245
|
}
|
|
240
246
|
exports.registerResourceTransform = registerResourceTransform;
|
|
241
247
|
/**
|
|
242
|
-
* Add a transformation to all future resources constructed in this Pulumi
|
|
248
|
+
* Add a transformation to all future resources constructed in this Pulumi
|
|
249
|
+
* stack.
|
|
243
250
|
*
|
|
244
|
-
* @deprecated
|
|
251
|
+
* @deprecated
|
|
252
|
+
* Use `registerResourceTransform` instead.
|
|
245
253
|
*/
|
|
246
254
|
function registerStackTransform(t) {
|
|
247
255
|
registerResourceTransform(t);
|
|
248
256
|
}
|
|
249
257
|
exports.registerStackTransform = registerStackTransform;
|
|
258
|
+
/**
|
|
259
|
+
* Add a transformation to all future invoke calls in this Pulumi stack.
|
|
260
|
+
*/
|
|
261
|
+
function registerInvokeTransform(t) {
|
|
262
|
+
if (!state_1.getStore().supportsInvokeTransforms) {
|
|
263
|
+
throw new Error("The Pulumi CLI does not support transforms. Please update the Pulumi CLI");
|
|
264
|
+
}
|
|
265
|
+
const callbacks = settings_1.getCallbacks();
|
|
266
|
+
if (!callbacks) {
|
|
267
|
+
throw new Error("No callback server registered.");
|
|
268
|
+
}
|
|
269
|
+
callbacks.registerStackInvokeTransform(t);
|
|
270
|
+
}
|
|
271
|
+
exports.registerInvokeTransform = registerInvokeTransform;
|
|
250
272
|
function getStackResource() {
|
|
251
273
|
return state_1.getStackResource();
|
|
252
274
|
}
|
package/runtime/stack.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack.js","sourceRoot":"","sources":["../../runtime/stack.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;;;;;;;;AAEjC,gDAAkC;AAClC,gCAA8B;AAC9B,0CAAmD;AACnD,sCAAmD;AACnD,0CAAqG;
|
|
1
|
+
{"version":3,"file":"stack.js","sourceRoot":"","sources":["../../runtime/stack.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;;;;;;;;AAEjC,gDAAkC;AAClC,gCAA8B;AAC9B,0CAAmD;AACnD,sCAAmD;AACnD,0CAAqG;AAErG,yCAAkF;AAClF,mCAAgG;AAEhG;;;;GAIG;AACU,QAAA,uBAAuB,GAAG,qBAAqB,CAAC;AAE7D;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,IAAwB;IACrD,IAAI,CAAC,sBAAW,EAAE,EAAE;QAChB,MAAM,KAAK,GAAG,IAAI,KA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
|
|
34
|
-
// this value is not set by the CLI and is
|
|
34
|
+
// Unlike the values above, this value is not set by the CLI and is
|
|
35
|
+
// controlled via a user-set environment variable.
|
|
35
36
|
cacheDynamicProviders: "PULUMI_NODEJS_CACHE_DYNAMIC_PROVIDERS",
|
|
36
37
|
organization: "PULUMI_NODEJS_ORGANIZATION",
|
|
37
38
|
};
|
|
38
39
|
const pulumiEnvKeys = {
|
|
39
40
|
legacyApply: "PULUMI_ENABLE_LEGACY_APPLY",
|
|
40
41
|
};
|
|
41
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
42
45
|
exports.asyncLocalStorage = new async_hooks_1.AsyncLocalStorage();
|
|
43
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
44
49
|
class LocalStore {
|
|
45
50
|
constructor() {
|
|
46
51
|
this.settings = {
|
|
@@ -66,7 +71,7 @@ class LocalStore {
|
|
|
66
71
|
};
|
|
67
72
|
this.stackResource = undefined;
|
|
68
73
|
/**
|
|
69
|
-
*
|
|
74
|
+
* Tracks the list of potential leak candidates.
|
|
70
75
|
*/
|
|
71
76
|
this.leakCandidates = new Set();
|
|
72
77
|
this.logErrorCount = 0;
|
|
@@ -76,10 +81,13 @@ class LocalStore {
|
|
|
76
81
|
this.supportsDeletedWith = false;
|
|
77
82
|
this.supportsAliasSpecs = false;
|
|
78
83
|
this.supportsTransforms = false;
|
|
84
|
+
this.supportsInvokeTransforms = false;
|
|
79
85
|
}
|
|
80
86
|
}
|
|
81
87
|
exports.LocalStore = LocalStore;
|
|
82
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Get the root stack resource for the current stack deployment.
|
|
90
|
+
*
|
|
83
91
|
* @internal
|
|
84
92
|
*/
|
|
85
93
|
function getStackResource() {
|
|
@@ -87,14 +95,18 @@ function getStackResource() {
|
|
|
87
95
|
return stackResource;
|
|
88
96
|
}
|
|
89
97
|
exports.getStackResource = getStackResource;
|
|
90
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
91
101
|
function setStackResource(newStackResource) {
|
|
92
102
|
const localStore = exports.getStore();
|
|
93
103
|
globalThis.stackResource = newStackResource;
|
|
94
104
|
localStore.stackResource = newStackResource;
|
|
95
105
|
}
|
|
96
106
|
exports.setStackResource = setStackResource;
|
|
97
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* @internal
|
|
109
|
+
*/
|
|
98
110
|
function getLocalStore() {
|
|
99
111
|
return exports.asyncLocalStorage.getStore();
|
|
100
112
|
}
|
|
@@ -108,7 +120,9 @@ getLocalStore.captureReplacement = () => {
|
|
|
108
120
|
};
|
|
109
121
|
return returnFunc;
|
|
110
122
|
};
|
|
111
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* @internal
|
|
125
|
+
*/
|
|
112
126
|
exports.getStore = () => {
|
|
113
127
|
const localStore = getLocalStore();
|
|
114
128
|
if (localStore === undefined) {
|
package/runtime/state.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../runtime/state.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;AAEjC,6CAAgD;AAEhD,iDAAmC;AAMnC,MAAM,WAAW,GAAG;IAChB,OAAO,EAAE,uBAAuB;IAChC,KAAK,EAAE,qBAAqB;IAC5B,MAAM,EAAE,uBAAuB;IAC/B,SAAS,EAAE,0BAA0B;IACrC,QAAQ,EAAE,wBAAwB;IAClC,WAAW,EAAE,uBAAuB;IACpC,UAAU,EAAE,sBAAsB;IAClC,OAAO,EAAE,oBAAoB;
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","s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Output } from "./output";
|
|
2
2
|
import { CustomResource, CustomResourceOptions } from "./resource";
|
|
3
3
|
/**
|
|
4
|
-
* Manages a reference to a Pulumi stack. The referenced stack's outputs are
|
|
5
|
-
*
|
|
4
|
+
* Manages a reference to a Pulumi stack. The referenced stack's outputs are
|
|
5
|
+
* available via the {@link StackReference.outputs} property or the
|
|
6
|
+
* {@link StackReference.output} method.
|
|
6
7
|
*/
|
|
7
8
|
export declare class StackReference extends CustomResource {
|
|
8
9
|
/**
|
|
@@ -20,60 +21,74 @@ export declare class StackReference extends CustomResource {
|
|
|
20
21
|
*/
|
|
21
22
|
readonly secretOutputNames: Output<string[]>;
|
|
22
23
|
/**
|
|
23
|
-
* Create a StackReference resource with the given unique name,
|
|
24
|
+
* Create a {@link StackReference} resource with the given unique name,
|
|
25
|
+
* arguments, and options.
|
|
24
26
|
*
|
|
25
|
-
* If args is not specified, the name of the referenced stack will be the
|
|
27
|
+
* If args is not specified, the name of the referenced stack will be the
|
|
28
|
+
* name of the {@link StackReference} resource.
|
|
26
29
|
*
|
|
27
|
-
* @param name
|
|
28
|
-
*
|
|
29
|
-
* @param
|
|
30
|
+
* @param name
|
|
31
|
+
* The _unique_ name of the stack reference.
|
|
32
|
+
* @param args
|
|
33
|
+
* The arguments to use to populate this resource's properties.
|
|
34
|
+
* @param opts
|
|
35
|
+
* A bag of options that control this resource's behavior.
|
|
30
36
|
*/
|
|
31
37
|
constructor(name: string, args?: StackReferenceArgs, opts?: CustomResourceOptions);
|
|
32
38
|
/**
|
|
33
|
-
* Fetches the value of the named stack output, or undefined if the stack
|
|
39
|
+
* Fetches the value of the named stack output, or `undefined` if the stack
|
|
40
|
+
* output was not found.
|
|
34
41
|
*
|
|
35
|
-
* @param name
|
|
42
|
+
* @param name
|
|
43
|
+
* The name of the stack output to fetch.
|
|
36
44
|
*/
|
|
37
45
|
getOutput(name: Input<string>): Output<any>;
|
|
38
46
|
/**
|
|
39
|
-
* Fetches the value of the named stack output, or throws an error if the
|
|
47
|
+
* Fetches the value of the named stack output, or throws an error if the
|
|
48
|
+
* output was not found.
|
|
40
49
|
*
|
|
41
|
-
* @param name
|
|
50
|
+
* @param name
|
|
51
|
+
* The name of the stack output to fetch.
|
|
42
52
|
*/
|
|
43
53
|
requireOutput(name: Input<string>): Output<any>;
|
|
44
54
|
/**
|
|
45
|
-
* Fetches the value of the named stack output
|
|
46
|
-
*
|
|
55
|
+
* Fetches the value of the named stack output and builds a
|
|
56
|
+
* {@link StackReferenceOutputDetails} with it.
|
|
47
57
|
*
|
|
48
|
-
* The returned object has its `value` or `secretValue` fields set
|
|
49
|
-
*
|
|
50
|
-
*
|
|
58
|
+
* The returned object has its `value` or `secretValue` fields set depending
|
|
59
|
+
* on wehther the output is a secret. Neither field is set if the output was
|
|
60
|
+
* not found.
|
|
51
61
|
*
|
|
52
|
-
* @param name
|
|
62
|
+
* @param name
|
|
63
|
+
* The name of the stack output to fetch.
|
|
53
64
|
*/
|
|
54
65
|
getOutputDetails(name: string): Promise<StackReferenceOutputDetails>;
|
|
55
66
|
/**
|
|
56
|
-
* Fetches the value promptly of the named stack output. May return
|
|
57
|
-
* not known for some reason.
|
|
67
|
+
* Fetches the value promptly of the named stack output. May return
|
|
68
|
+
* undefined if the value is not known for some reason.
|
|
58
69
|
*
|
|
59
|
-
* This operation is not supported (and will throw) if the named stack
|
|
70
|
+
* This operation is not supported (and will throw) if the named stack
|
|
71
|
+
* output is a secret.
|
|
60
72
|
*
|
|
61
|
-
* @param name
|
|
73
|
+
* @param name
|
|
74
|
+
* The name of the stack output to fetch.
|
|
62
75
|
*/
|
|
63
76
|
getOutputValue(name: string): Promise<any>;
|
|
64
77
|
/**
|
|
65
|
-
* Fetches the value promptly of the named stack output. Throws an error if
|
|
66
|
-
* not found.
|
|
78
|
+
* Fetches the value promptly of the named stack output. Throws an error if
|
|
79
|
+
* the stack output is not found.
|
|
67
80
|
*
|
|
68
|
-
* This operation is not supported (and will throw) if the named stack
|
|
81
|
+
* This operation is not supported (and will throw) if the named stack
|
|
82
|
+
* output is a secret.
|
|
69
83
|
*
|
|
70
|
-
* @param name
|
|
84
|
+
* @param name
|
|
85
|
+
* The name of the stack output to fetch.
|
|
71
86
|
*/
|
|
72
87
|
requireOutputValue(name: string): Promise<any>;
|
|
73
88
|
private readOutputValue;
|
|
74
89
|
}
|
|
75
90
|
/**
|
|
76
|
-
* The set of arguments for constructing a StackReference resource.
|
|
91
|
+
* The set of arguments for constructing a {@link StackReference} resource.
|
|
77
92
|
*/
|
|
78
93
|
export interface StackReferenceArgs {
|
|
79
94
|
/**
|
|
@@ -82,18 +97,20 @@ export interface StackReferenceArgs {
|
|
|
82
97
|
readonly name?: Input<string>;
|
|
83
98
|
}
|
|
84
99
|
/**
|
|
85
|
-
* Records the output of a StackReference.
|
|
86
|
-
*
|
|
100
|
+
* Records the output of a {@link StackReference}. Exactly one of `value` or
|
|
101
|
+
* `secretValue` will be set.
|
|
87
102
|
*/
|
|
88
103
|
export interface StackReferenceOutputDetails {
|
|
89
104
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
105
|
+
* An output value returned by the {@link StackReference}.
|
|
106
|
+
*
|
|
107
|
+
* This is `null` if the value is a secret or it does not exist.
|
|
92
108
|
*/
|
|
93
109
|
readonly value?: any;
|
|
94
110
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
111
|
+
* A secret value returned by the {@link StackReference}.
|
|
112
|
+
*
|
|
113
|
+
* This is `null` if the value is not a secret or it does not exist.
|
|
97
114
|
*/
|
|
98
115
|
readonly secretValue?: any;
|
|
99
116
|
}
|
package/stackReference.js
CHANGED
|
@@ -25,18 +25,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
const output_1 = require("./output");
|
|
26
26
|
const resource_1 = require("./resource");
|
|
27
27
|
/**
|
|
28
|
-
* Manages a reference to a Pulumi stack. The referenced stack's outputs are
|
|
29
|
-
*
|
|
28
|
+
* Manages a reference to a Pulumi stack. The referenced stack's outputs are
|
|
29
|
+
* available via the {@link StackReference.outputs} property or the
|
|
30
|
+
* {@link StackReference.output} method.
|
|
30
31
|
*/
|
|
31
32
|
class StackReference extends resource_1.CustomResource {
|
|
32
33
|
/**
|
|
33
|
-
* Create a StackReference resource with the given unique name,
|
|
34
|
+
* Create a {@link StackReference} resource with the given unique name,
|
|
35
|
+
* arguments, and options.
|
|
34
36
|
*
|
|
35
|
-
* If args is not specified, the name of the referenced stack will be the
|
|
37
|
+
* If args is not specified, the name of the referenced stack will be the
|
|
38
|
+
* name of the {@link StackReference} resource.
|
|
36
39
|
*
|
|
37
|
-
* @param name
|
|
38
|
-
*
|
|
39
|
-
* @param
|
|
40
|
+
* @param name
|
|
41
|
+
* The _unique_ name of the stack reference.
|
|
42
|
+
* @param args
|
|
43
|
+
* The arguments to use to populate this resource's properties.
|
|
44
|
+
* @param opts
|
|
45
|
+
* A bag of options that control this resource's behavior.
|
|
40
46
|
*/
|
|
41
47
|
constructor(name, args, opts) {
|
|
42
48
|
args = args || {};
|
|
@@ -48,9 +54,11 @@ class StackReference extends resource_1.CustomResource {
|
|
|
48
54
|
}, Object.assign(Object.assign({}, opts), { id: stackReferenceName }));
|
|
49
55
|
}
|
|
50
56
|
/**
|
|
51
|
-
* Fetches the value of the named stack output, or undefined if the stack
|
|
57
|
+
* Fetches the value of the named stack output, or `undefined` if the stack
|
|
58
|
+
* output was not found.
|
|
52
59
|
*
|
|
53
|
-
* @param name
|
|
60
|
+
* @param name
|
|
61
|
+
* The name of the stack output to fetch.
|
|
54
62
|
*/
|
|
55
63
|
getOutput(name) {
|
|
56
64
|
// Note that this is subtly different from "apply" here. A default "apply" will set the secret bit if any
|
|
@@ -62,9 +70,11 @@ class StackReference extends resource_1.CustomResource {
|
|
|
62
70
|
return new output_1.Output(value.resources(), value.promise(), value.isKnown, isSecretOutputName(this, output_1.output(name)), value.allResources());
|
|
63
71
|
}
|
|
64
72
|
/**
|
|
65
|
-
* Fetches the value of the named stack output, or throws an error if the
|
|
73
|
+
* Fetches the value of the named stack output, or throws an error if the
|
|
74
|
+
* output was not found.
|
|
66
75
|
*
|
|
67
|
-
* @param name
|
|
76
|
+
* @param name
|
|
77
|
+
* The name of the stack output to fetch.
|
|
68
78
|
*/
|
|
69
79
|
requireOutput(name) {
|
|
70
80
|
const value = output_1.all([output_1.output(this.name), output_1.output(name), this.outputs]).apply(([stackname, n, os]) => {
|
|
@@ -76,14 +86,15 @@ class StackReference extends resource_1.CustomResource {
|
|
|
76
86
|
return new output_1.Output(value.resources(), value.promise(), value.isKnown, isSecretOutputName(this, output_1.output(name)), value.allResources());
|
|
77
87
|
}
|
|
78
88
|
/**
|
|
79
|
-
* Fetches the value of the named stack output
|
|
80
|
-
*
|
|
89
|
+
* Fetches the value of the named stack output and builds a
|
|
90
|
+
* {@link StackReferenceOutputDetails} with it.
|
|
81
91
|
*
|
|
82
|
-
* The returned object has its `value` or `secretValue` fields set
|
|
83
|
-
*
|
|
84
|
-
*
|
|
92
|
+
* The returned object has its `value` or `secretValue` fields set depending
|
|
93
|
+
* on wehther the output is a secret. Neither field is set if the output was
|
|
94
|
+
* not found.
|
|
85
95
|
*
|
|
86
|
-
* @param name
|
|
96
|
+
* @param name
|
|
97
|
+
* The name of the stack output to fetch.
|
|
87
98
|
*/
|
|
88
99
|
getOutputDetails(name) {
|
|
89
100
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -97,12 +108,14 @@ class StackReference extends resource_1.CustomResource {
|
|
|
97
108
|
});
|
|
98
109
|
}
|
|
99
110
|
/**
|
|
100
|
-
* Fetches the value promptly of the named stack output. May return
|
|
101
|
-
* not known for some reason.
|
|
111
|
+
* Fetches the value promptly of the named stack output. May return
|
|
112
|
+
* undefined if the value is not known for some reason.
|
|
102
113
|
*
|
|
103
|
-
* This operation is not supported (and will throw) if the named stack
|
|
114
|
+
* This operation is not supported (and will throw) if the named stack
|
|
115
|
+
* output is a secret.
|
|
104
116
|
*
|
|
105
|
-
* @param name
|
|
117
|
+
* @param name
|
|
118
|
+
* The name of the stack output to fetch.
|
|
106
119
|
*/
|
|
107
120
|
getOutputValue(name) {
|
|
108
121
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -114,12 +127,14 @@ class StackReference extends resource_1.CustomResource {
|
|
|
114
127
|
});
|
|
115
128
|
}
|
|
116
129
|
/**
|
|
117
|
-
* Fetches the value promptly of the named stack output. Throws an error if
|
|
118
|
-
* not found.
|
|
130
|
+
* Fetches the value promptly of the named stack output. Throws an error if
|
|
131
|
+
* the stack output is not found.
|
|
119
132
|
*
|
|
120
|
-
* This operation is not supported (and will throw) if the named stack
|
|
133
|
+
* This operation is not supported (and will throw) if the named stack
|
|
134
|
+
* output is a secret.
|
|
121
135
|
*
|
|
122
|
-
* @param name
|
|
136
|
+
* @param name
|
|
137
|
+
* The name of the stack output to fetch.
|
|
123
138
|
*/
|
|
124
139
|
requireOutputValue(name) {
|
|
125
140
|
return __awaiter(this, void 0, void 0, function* () {
|
package/stackReference.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stackReference.js","sourceRoot":"","sources":["../stackReference.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;AAEjC,qCAAsD;AACtD,yCAAmE;AAEnE
|
|
1
|
+
{"version":3,"file":"stackReference.js","sourceRoot":"","sources":["../stackReference.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;AAEjC,qCAAsD;AACtD,yCAAmE;A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611
611
|
}));
|
|
612
|
+
it("runs through the stack lifecycle with an inline program, testing destroy with --remove", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
613
|
+
// Arrange.
|
|
614
|
+
const program = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
615
|
+
class MyResource extends index_1.ComponentResource {
|
|
616
|
+
constructor(name, opts) {
|
|
617
|
+
super("my:module:MyResource", name, {}, opts);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
new MyResource("res");
|
|
621
|
+
return {};
|
|
622
|
+
});
|
|
623
|
+
const projectName = "inline_node";
|
|
624
|
+
const stackName = automation_1.fullyQualifiedStackName(util_1.getTestOrg(), projectName, `int_test${util_1.getTestSuffix()}`);
|
|
625
|
+
const stack = yield automation_1.LocalWorkspace.createStack({ stackName, projectName, program });
|
|
626
|
+
yield stack.up({ userAgent });
|
|
627
|
+
// Act.
|
|
628
|
+
yield stack.destroy({ userAgent, remove: true });
|
|
629
|
+
// Assert.
|
|
630
|
+
yield assert_1.default.rejects(stack.workspace.selectStack(stackName));
|
|
631
|
+
}));
|
|
612
632
|
it(`refreshes before preview`, () => __awaiter(void 0, void 0, void 0, function* () {
|
|
613
633
|
// We create a simple program, and scan the output for an indication
|
|
614
634
|
// that adding refresh: true will perfrom a refresh operation.
|