@pulumi/pulumi 3.68.0 → 3.70.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 CHANGED
@@ -17,7 +17,7 @@ $ yarn add @pulumi/pulumi
17
17
  ```
18
18
 
19
19
  This SDK is meant for use with the Pulumi CLI. Visit
20
- [Pulumi's Download & Install](https://www.pulumi.com/docs/get-started/install/) to install the CLI.
20
+ [Pulumi's Download & Install](https://www.pulumi.com/docs/install/) to install the CLI.
21
21
 
22
22
  ## Building and Testing
23
23
 
@@ -14,7 +14,7 @@ export declare class RemoteStack {
14
14
  get name(): string;
15
15
  /**
16
16
  * Creates or updates the resources in a stack by executing the program in the Workspace.
17
- * https://www.pulumi.com/docs/reference/cli/pulumi_up/
17
+ * https://www.pulumi.com/docs/cli/commands/pulumi_up/
18
18
  * This operation runs remotely.
19
19
  *
20
20
  * @param opts Options to customize the behavior of the update.
@@ -22,7 +22,7 @@ export declare class RemoteStack {
22
22
  up(opts?: RemoteUpOptions): Promise<UpResult>;
23
23
  /**
24
24
  * Performs a dry-run update to a stack, returning pending changes.
25
- * https://www.pulumi.com/docs/reference/cli/pulumi_preview/
25
+ * https://www.pulumi.com/docs/cli/commands/pulumi_preview/
26
26
  * This operation runs remotely.
27
27
  *
28
28
  * @param opts Options to customize the behavior of the preview.
@@ -38,7 +38,7 @@ class RemoteStack {
38
38
  }
39
39
  /**
40
40
  * Creates or updates the resources in a stack by executing the program in the Workspace.
41
- * https://www.pulumi.com/docs/reference/cli/pulumi_up/
41
+ * https://www.pulumi.com/docs/cli/commands/pulumi_up/
42
42
  * This operation runs remotely.
43
43
  *
44
44
  * @param opts Options to customize the behavior of the update.
@@ -48,7 +48,7 @@ class RemoteStack {
48
48
  }
49
49
  /**
50
50
  * Performs a dry-run update to a stack, returning pending changes.
51
- * https://www.pulumi.com/docs/reference/cli/pulumi_preview/
51
+ * https://www.pulumi.com/docs/cli/commands/pulumi_preview/
52
52
  * This operation runs remotely.
53
53
  *
54
54
  * @param opts Options to customize the behavior of the preview.
@@ -50,14 +50,14 @@ export declare class Stack {
50
50
  private readLines;
51
51
  /**
52
52
  * Creates or updates the resources in a stack by executing the program in the Workspace.
53
- * https://www.pulumi.com/docs/reference/cli/pulumi_up/
53
+ * https://www.pulumi.com/docs/cli/commands/pulumi_up/
54
54
  *
55
55
  * @param opts Options to customize the behavior of the update.
56
56
  */
57
57
  up(opts?: UpOptions): Promise<UpResult>;
58
58
  /**
59
59
  * Performs a dry-run update to a stack, returning pending changes.
60
- * https://www.pulumi.com/docs/reference/cli/pulumi_preview/
60
+ * https://www.pulumi.com/docs/cli/commands/pulumi_preview/
61
61
  *
62
62
  * @param opts Options to customize the behavior of the preview.
63
63
  */
@@ -149,7 +149,7 @@ Event: ${line}\n${e.toString()}`);
149
149
  }
150
150
  /**
151
151
  * Creates or updates the resources in a stack by executing the program in the Workspace.
152
- * https://www.pulumi.com/docs/reference/cli/pulumi_up/
152
+ * https://www.pulumi.com/docs/cli/commands/pulumi_up/
153
153
  *
154
154
  * @param opts Options to customize the behavior of the update.
155
155
  */
@@ -273,7 +273,7 @@ Event: ${line}\n${e.toString()}`);
273
273
  }
274
274
  /**
275
275
  * Performs a dry-run update to a stack, returning pending changes.
276
- * https://www.pulumi.com/docs/reference/cli/pulumi_preview/
276
+ * https://www.pulumi.com/docs/cli/commands/pulumi_preview/
277
277
  *
278
278
  * @param opts Options to customize the behavior of the preview.
279
279
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulumi/pulumi",
3
- "version": "3.68.0",
3
+ "version": "3.70.0",
4
4
  "description": "Pulumi's Node.js SDK",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -95,7 +95,8 @@ proto.codegen.GetMappingRequest.prototype.toObject = function(opt_includeInstanc
95
95
  */
96
96
  proto.codegen.GetMappingRequest.toObject = function(includeInstance, msg) {
97
97
  var f, obj = {
98
- provider: jspb.Message.getFieldWithDefault(msg, 1, "")
98
+ provider: jspb.Message.getFieldWithDefault(msg, 1, ""),
99
+ pulumiProvider: jspb.Message.getFieldWithDefault(msg, 2, "")
99
100
  };
100
101
 
101
102
  if (includeInstance) {
@@ -136,6 +137,10 @@ proto.codegen.GetMappingRequest.deserializeBinaryFromReader = function(msg, read
136
137
  var value = /** @type {string} */ (reader.readString());
137
138
  msg.setProvider(value);
138
139
  break;
140
+ case 2:
141
+ var value = /** @type {string} */ (reader.readString());
142
+ msg.setPulumiProvider(value);
143
+ break;
139
144
  default:
140
145
  reader.skipField();
141
146
  break;
@@ -172,6 +177,13 @@ proto.codegen.GetMappingRequest.serializeBinaryToWriter = function(message, writ
172
177
  f
173
178
  );
174
179
  }
180
+ f = message.getPulumiProvider();
181
+ if (f.length > 0) {
182
+ writer.writeString(
183
+ 2,
184
+ f
185
+ );
186
+ }
175
187
  };
176
188
 
177
189
 
@@ -193,6 +205,24 @@ proto.codegen.GetMappingRequest.prototype.setProvider = function(value) {
193
205
  };
194
206
 
195
207
 
208
+ /**
209
+ * optional string pulumi_provider = 2;
210
+ * @return {string}
211
+ */
212
+ proto.codegen.GetMappingRequest.prototype.getPulumiProvider = function() {
213
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
214
+ };
215
+
216
+
217
+ /**
218
+ * @param {string} value
219
+ * @return {!proto.codegen.GetMappingRequest} returns this
220
+ */
221
+ proto.codegen.GetMappingRequest.prototype.setPulumiProvider = function(value) {
222
+ return jspb.Message.setProto3StringField(this, 2, value);
223
+ };
224
+
225
+
196
226
 
197
227
 
198
228
 
@@ -18,6 +18,7 @@
18
18
  'use strict';
19
19
  var grpc = require('@grpc/grpc-js');
20
20
  var pulumi_converter_pb = require('./converter_pb.js');
21
+ var pulumi_codegen_hcl_pb = require('./codegen/hcl_pb.js');
21
22
  var pulumi_plugin_pb = require('./plugin_pb.js');
22
23
  var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
23
24
  var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
@@ -15,6 +15,8 @@ var jspb = require('google-protobuf');
15
15
  var goog = jspb;
16
16
  var proto = { pulumirpc: {} }, global = proto;
17
17
 
18
+ var pulumi_codegen_hcl_pb = require('./codegen/hcl_pb.js');
19
+ goog.object.extend(proto, pulumi_codegen_hcl_pb);
18
20
  var pulumi_plugin_pb = require('./plugin_pb.js');
19
21
  goog.object.extend(proto, pulumi_plugin_pb);
20
22
  var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
@@ -121,7 +123,7 @@ if (goog.DEBUG && !COMPILED) {
121
123
  * @constructor
122
124
  */
123
125
  proto.pulumirpc.ConvertProgramResponse = function(opt_data) {
124
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
126
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.pulumirpc.ConvertProgramResponse.repeatedFields_, null);
125
127
  };
126
128
  goog.inherits(proto.pulumirpc.ConvertProgramResponse, jspb.Message);
127
129
  if (goog.DEBUG && !COMPILED) {
@@ -862,6 +864,13 @@ proto.pulumirpc.ConvertProgramRequest.prototype.setMapperTarget = function(value
862
864
 
863
865
 
864
866
 
867
+ /**
868
+ * List of repeated fields within this message type.
869
+ * @private {!Array<number>}
870
+ * @const
871
+ */
872
+ proto.pulumirpc.ConvertProgramResponse.repeatedFields_ = [1];
873
+
865
874
 
866
875
 
867
876
  if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -893,7 +902,8 @@ proto.pulumirpc.ConvertProgramResponse.prototype.toObject = function(opt_include
893
902
  */
894
903
  proto.pulumirpc.ConvertProgramResponse.toObject = function(includeInstance, msg) {
895
904
  var f, obj = {
896
-
905
+ diagnosticsList: jspb.Message.toObjectList(msg.getDiagnosticsList(),
906
+ pulumi_codegen_hcl_pb.Diagnostic.toObject, includeInstance)
897
907
  };
898
908
 
899
909
  if (includeInstance) {
@@ -930,6 +940,11 @@ proto.pulumirpc.ConvertProgramResponse.deserializeBinaryFromReader = function(ms
930
940
  }
931
941
  var field = reader.getFieldNumber();
932
942
  switch (field) {
943
+ case 1:
944
+ var value = new pulumi_codegen_hcl_pb.Diagnostic;
945
+ reader.readMessage(value,pulumi_codegen_hcl_pb.Diagnostic.deserializeBinaryFromReader);
946
+ msg.addDiagnostics(value);
947
+ break;
933
948
  default:
934
949
  reader.skipField();
935
950
  break;
@@ -959,6 +974,52 @@ proto.pulumirpc.ConvertProgramResponse.prototype.serializeBinary = function() {
959
974
  */
960
975
  proto.pulumirpc.ConvertProgramResponse.serializeBinaryToWriter = function(message, writer) {
961
976
  var f = undefined;
977
+ f = message.getDiagnosticsList();
978
+ if (f.length > 0) {
979
+ writer.writeRepeatedMessage(
980
+ 1,
981
+ f,
982
+ pulumi_codegen_hcl_pb.Diagnostic.serializeBinaryToWriter
983
+ );
984
+ }
985
+ };
986
+
987
+
988
+ /**
989
+ * repeated codegen.Diagnostic diagnostics = 1;
990
+ * @return {!Array<!proto.pulumirpc.codegen.Diagnostic>}
991
+ */
992
+ proto.pulumirpc.ConvertProgramResponse.prototype.getDiagnosticsList = function() {
993
+ return /** @type{!Array<!proto.pulumirpc.codegen.Diagnostic>} */ (
994
+ jspb.Message.getRepeatedWrapperField(this, pulumi_codegen_hcl_pb.Diagnostic, 1));
995
+ };
996
+
997
+
998
+ /**
999
+ * @param {!Array<!proto.pulumirpc.codegen.Diagnostic>} value
1000
+ * @return {!proto.pulumirpc.ConvertProgramResponse} returns this
1001
+ */
1002
+ proto.pulumirpc.ConvertProgramResponse.prototype.setDiagnosticsList = function(value) {
1003
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1004
+ };
1005
+
1006
+
1007
+ /**
1008
+ * @param {!proto.pulumirpc.codegen.Diagnostic=} opt_value
1009
+ * @param {number=} opt_index
1010
+ * @return {!proto.pulumirpc.codegen.Diagnostic}
1011
+ */
1012
+ proto.pulumirpc.ConvertProgramResponse.prototype.addDiagnostics = function(opt_value, opt_index) {
1013
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pulumirpc.codegen.Diagnostic, opt_index);
1014
+ };
1015
+
1016
+
1017
+ /**
1018
+ * Clears the list making it empty but non-null.
1019
+ * @return {!proto.pulumirpc.ConvertProgramResponse} returns this
1020
+ */
1021
+ proto.pulumirpc.ConvertProgramResponse.prototype.clearDiagnosticsList = function() {
1022
+ return this.setDiagnosticsList([]);
962
1023
  };
963
1024
 
964
1025
 
@@ -366,7 +366,7 @@ if (goog.DEBUG && !COMPILED) {
366
366
  * @constructor
367
367
  */
368
368
  proto.pulumirpc.GenerateProjectResponse = function(opt_data) {
369
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
369
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.pulumirpc.GenerateProjectResponse.repeatedFields_, null);
370
370
  };
371
371
  goog.inherits(proto.pulumirpc.GenerateProjectResponse, jspb.Message);
372
372
  if (goog.DEBUG && !COMPILED) {
@@ -3479,9 +3479,10 @@ proto.pulumirpc.GenerateProjectRequest.prototype.toObject = function(opt_include
3479
3479
  */
3480
3480
  proto.pulumirpc.GenerateProjectRequest.toObject = function(includeInstance, msg) {
3481
3481
  var f, obj = {
3482
- directory: jspb.Message.getFieldWithDefault(msg, 1, ""),
3483
- project: jspb.Message.getFieldWithDefault(msg, 2, ""),
3484
- sourceMap: (f = msg.getSourceMap()) ? f.toObject(includeInstance, undefined) : []
3482
+ sourceDirectory: jspb.Message.getFieldWithDefault(msg, 1, ""),
3483
+ targetDirectory: jspb.Message.getFieldWithDefault(msg, 2, ""),
3484
+ project: jspb.Message.getFieldWithDefault(msg, 3, ""),
3485
+ strict: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
3485
3486
  };
3486
3487
 
3487
3488
  if (includeInstance) {
@@ -3520,17 +3521,19 @@ proto.pulumirpc.GenerateProjectRequest.deserializeBinaryFromReader = function(ms
3520
3521
  switch (field) {
3521
3522
  case 1:
3522
3523
  var value = /** @type {string} */ (reader.readString());
3523
- msg.setDirectory(value);
3524
+ msg.setSourceDirectory(value);
3524
3525
  break;
3525
3526
  case 2:
3526
3527
  var value = /** @type {string} */ (reader.readString());
3527
- msg.setProject(value);
3528
+ msg.setTargetDirectory(value);
3528
3529
  break;
3529
3530
  case 3:
3530
- var value = msg.getSourceMap();
3531
- reader.readMessage(value, function(message, reader) {
3532
- jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
3533
- });
3531
+ var value = /** @type {string} */ (reader.readString());
3532
+ msg.setProject(value);
3533
+ break;
3534
+ case 4:
3535
+ var value = /** @type {boolean} */ (reader.readBool());
3536
+ msg.setStrict(value);
3534
3537
  break;
3535
3538
  default:
3536
3539
  reader.skipField();
@@ -3561,32 +3564,42 @@ proto.pulumirpc.GenerateProjectRequest.prototype.serializeBinary = function() {
3561
3564
  */
3562
3565
  proto.pulumirpc.GenerateProjectRequest.serializeBinaryToWriter = function(message, writer) {
3563
3566
  var f = undefined;
3564
- f = message.getDirectory();
3567
+ f = message.getSourceDirectory();
3565
3568
  if (f.length > 0) {
3566
3569
  writer.writeString(
3567
3570
  1,
3568
3571
  f
3569
3572
  );
3570
3573
  }
3571
- f = message.getProject();
3574
+ f = message.getTargetDirectory();
3572
3575
  if (f.length > 0) {
3573
3576
  writer.writeString(
3574
3577
  2,
3575
3578
  f
3576
3579
  );
3577
3580
  }
3578
- f = message.getSourceMap(true);
3579
- if (f && f.getLength() > 0) {
3580
- f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
3581
+ f = message.getProject();
3582
+ if (f.length > 0) {
3583
+ writer.writeString(
3584
+ 3,
3585
+ f
3586
+ );
3587
+ }
3588
+ f = message.getStrict();
3589
+ if (f) {
3590
+ writer.writeBool(
3591
+ 4,
3592
+ f
3593
+ );
3581
3594
  }
3582
3595
  };
3583
3596
 
3584
3597
 
3585
3598
  /**
3586
- * optional string directory = 1;
3599
+ * optional string source_directory = 1;
3587
3600
  * @return {string}
3588
3601
  */
3589
- proto.pulumirpc.GenerateProjectRequest.prototype.getDirectory = function() {
3602
+ proto.pulumirpc.GenerateProjectRequest.prototype.getSourceDirectory = function() {
3590
3603
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3591
3604
  };
3592
3605
 
@@ -3595,16 +3608,16 @@ proto.pulumirpc.GenerateProjectRequest.prototype.getDirectory = function() {
3595
3608
  * @param {string} value
3596
3609
  * @return {!proto.pulumirpc.GenerateProjectRequest} returns this
3597
3610
  */
3598
- proto.pulumirpc.GenerateProjectRequest.prototype.setDirectory = function(value) {
3611
+ proto.pulumirpc.GenerateProjectRequest.prototype.setSourceDirectory = function(value) {
3599
3612
  return jspb.Message.setProto3StringField(this, 1, value);
3600
3613
  };
3601
3614
 
3602
3615
 
3603
3616
  /**
3604
- * optional string project = 2;
3617
+ * optional string target_directory = 2;
3605
3618
  * @return {string}
3606
3619
  */
3607
- proto.pulumirpc.GenerateProjectRequest.prototype.getProject = function() {
3620
+ proto.pulumirpc.GenerateProjectRequest.prototype.getTargetDirectory = function() {
3608
3621
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3609
3622
  };
3610
3623
 
@@ -3613,34 +3626,55 @@ proto.pulumirpc.GenerateProjectRequest.prototype.getProject = function() {
3613
3626
  * @param {string} value
3614
3627
  * @return {!proto.pulumirpc.GenerateProjectRequest} returns this
3615
3628
  */
3616
- proto.pulumirpc.GenerateProjectRequest.prototype.setProject = function(value) {
3629
+ proto.pulumirpc.GenerateProjectRequest.prototype.setTargetDirectory = function(value) {
3617
3630
  return jspb.Message.setProto3StringField(this, 2, value);
3618
3631
  };
3619
3632
 
3620
3633
 
3621
3634
  /**
3622
- * map<string, string> source = 3;
3623
- * @param {boolean=} opt_noLazyCreate Do not create the map if
3624
- * empty, instead returning `undefined`
3625
- * @return {!jspb.Map<string,string>}
3635
+ * optional string project = 3;
3636
+ * @return {string}
3626
3637
  */
3627
- proto.pulumirpc.GenerateProjectRequest.prototype.getSourceMap = function(opt_noLazyCreate) {
3628
- return /** @type {!jspb.Map<string,string>} */ (
3629
- jspb.Message.getMapField(this, 3, opt_noLazyCreate,
3630
- null));
3638
+ proto.pulumirpc.GenerateProjectRequest.prototype.getProject = function() {
3639
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
3631
3640
  };
3632
3641
 
3633
3642
 
3634
3643
  /**
3635
- * Clears values from the map. The map will be non-null.
3644
+ * @param {string} value
3636
3645
  * @return {!proto.pulumirpc.GenerateProjectRequest} returns this
3637
3646
  */
3638
- proto.pulumirpc.GenerateProjectRequest.prototype.clearSourceMap = function() {
3639
- this.getSourceMap().clear();
3640
- return this;};
3647
+ proto.pulumirpc.GenerateProjectRequest.prototype.setProject = function(value) {
3648
+ return jspb.Message.setProto3StringField(this, 3, value);
3649
+ };
3650
+
3651
+
3652
+ /**
3653
+ * optional bool strict = 4;
3654
+ * @return {boolean}
3655
+ */
3656
+ proto.pulumirpc.GenerateProjectRequest.prototype.getStrict = function() {
3657
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
3658
+ };
3659
+
3660
+
3661
+ /**
3662
+ * @param {boolean} value
3663
+ * @return {!proto.pulumirpc.GenerateProjectRequest} returns this
3664
+ */
3665
+ proto.pulumirpc.GenerateProjectRequest.prototype.setStrict = function(value) {
3666
+ return jspb.Message.setProto3BooleanField(this, 4, value);
3667
+ };
3641
3668
 
3642
3669
 
3643
3670
 
3671
+ /**
3672
+ * List of repeated fields within this message type.
3673
+ * @private {!Array<number>}
3674
+ * @const
3675
+ */
3676
+ proto.pulumirpc.GenerateProjectResponse.repeatedFields_ = [1];
3677
+
3644
3678
 
3645
3679
 
3646
3680
  if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -3672,7 +3706,8 @@ proto.pulumirpc.GenerateProjectResponse.prototype.toObject = function(opt_includ
3672
3706
  */
3673
3707
  proto.pulumirpc.GenerateProjectResponse.toObject = function(includeInstance, msg) {
3674
3708
  var f, obj = {
3675
-
3709
+ diagnosticsList: jspb.Message.toObjectList(msg.getDiagnosticsList(),
3710
+ pulumi_codegen_hcl_pb.Diagnostic.toObject, includeInstance)
3676
3711
  };
3677
3712
 
3678
3713
  if (includeInstance) {
@@ -3709,6 +3744,11 @@ proto.pulumirpc.GenerateProjectResponse.deserializeBinaryFromReader = function(m
3709
3744
  }
3710
3745
  var field = reader.getFieldNumber();
3711
3746
  switch (field) {
3747
+ case 1:
3748
+ var value = new pulumi_codegen_hcl_pb.Diagnostic;
3749
+ reader.readMessage(value,pulumi_codegen_hcl_pb.Diagnostic.deserializeBinaryFromReader);
3750
+ msg.addDiagnostics(value);
3751
+ break;
3712
3752
  default:
3713
3753
  reader.skipField();
3714
3754
  break;
@@ -3738,6 +3778,52 @@ proto.pulumirpc.GenerateProjectResponse.prototype.serializeBinary = function() {
3738
3778
  */
3739
3779
  proto.pulumirpc.GenerateProjectResponse.serializeBinaryToWriter = function(message, writer) {
3740
3780
  var f = undefined;
3781
+ f = message.getDiagnosticsList();
3782
+ if (f.length > 0) {
3783
+ writer.writeRepeatedMessage(
3784
+ 1,
3785
+ f,
3786
+ pulumi_codegen_hcl_pb.Diagnostic.serializeBinaryToWriter
3787
+ );
3788
+ }
3789
+ };
3790
+
3791
+
3792
+ /**
3793
+ * repeated codegen.Diagnostic diagnostics = 1;
3794
+ * @return {!Array<!proto.pulumirpc.codegen.Diagnostic>}
3795
+ */
3796
+ proto.pulumirpc.GenerateProjectResponse.prototype.getDiagnosticsList = function() {
3797
+ return /** @type{!Array<!proto.pulumirpc.codegen.Diagnostic>} */ (
3798
+ jspb.Message.getRepeatedWrapperField(this, pulumi_codegen_hcl_pb.Diagnostic, 1));
3799
+ };
3800
+
3801
+
3802
+ /**
3803
+ * @param {!Array<!proto.pulumirpc.codegen.Diagnostic>} value
3804
+ * @return {!proto.pulumirpc.GenerateProjectResponse} returns this
3805
+ */
3806
+ proto.pulumirpc.GenerateProjectResponse.prototype.setDiagnosticsList = function(value) {
3807
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
3808
+ };
3809
+
3810
+
3811
+ /**
3812
+ * @param {!proto.pulumirpc.codegen.Diagnostic=} opt_value
3813
+ * @param {number=} opt_index
3814
+ * @return {!proto.pulumirpc.codegen.Diagnostic}
3815
+ */
3816
+ proto.pulumirpc.GenerateProjectResponse.prototype.addDiagnostics = function(opt_value, opt_index) {
3817
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pulumirpc.codegen.Diagnostic, opt_index);
3818
+ };
3819
+
3820
+
3821
+ /**
3822
+ * Clears the list making it empty but non-null.
3823
+ * @return {!proto.pulumirpc.GenerateProjectResponse} returns this
3824
+ */
3825
+ proto.pulumirpc.GenerateProjectResponse.prototype.clearDiagnosticsList = function() {
3826
+ return this.setDiagnosticsList([]);
3741
3827
  };
3742
3828
 
3743
3829
 
@@ -3775,7 +3861,7 @@ proto.pulumirpc.GeneratePackageRequest.toObject = function(includeInstance, msg)
3775
3861
  var f, obj = {
3776
3862
  directory: jspb.Message.getFieldWithDefault(msg, 1, ""),
3777
3863
  schema: jspb.Message.getFieldWithDefault(msg, 2, ""),
3778
- extrafilesMap: (f = msg.getExtrafilesMap()) ? f.toObject(includeInstance, undefined) : []
3864
+ extraFilesMap: (f = msg.getExtraFilesMap()) ? f.toObject(includeInstance, undefined) : []
3779
3865
  };
3780
3866
 
3781
3867
  if (includeInstance) {
@@ -3821,7 +3907,7 @@ proto.pulumirpc.GeneratePackageRequest.deserializeBinaryFromReader = function(ms
3821
3907
  msg.setSchema(value);
3822
3908
  break;
3823
3909
  case 3:
3824
- var value = msg.getExtrafilesMap();
3910
+ var value = msg.getExtraFilesMap();
3825
3911
  reader.readMessage(value, function(message, reader) {
3826
3912
  jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBytes, null, "", "");
3827
3913
  });
@@ -3869,7 +3955,7 @@ proto.pulumirpc.GeneratePackageRequest.serializeBinaryToWriter = function(messag
3869
3955
  f
3870
3956
  );
3871
3957
  }
3872
- f = message.getExtrafilesMap(true);
3958
+ f = message.getExtraFilesMap(true);
3873
3959
  if (f && f.getLength() > 0) {
3874
3960
  f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBytes);
3875
3961
  }
@@ -3913,12 +3999,12 @@ proto.pulumirpc.GeneratePackageRequest.prototype.setSchema = function(value) {
3913
3999
 
3914
4000
 
3915
4001
  /**
3916
- * map<string, bytes> extraFiles = 3;
4002
+ * map<string, bytes> extra_files = 3;
3917
4003
  * @param {boolean=} opt_noLazyCreate Do not create the map if
3918
4004
  * empty, instead returning `undefined`
3919
4005
  * @return {!jspb.Map<string,!(string|Uint8Array)>}
3920
4006
  */
3921
- proto.pulumirpc.GeneratePackageRequest.prototype.getExtrafilesMap = function(opt_noLazyCreate) {
4007
+ proto.pulumirpc.GeneratePackageRequest.prototype.getExtraFilesMap = function(opt_noLazyCreate) {
3922
4008
  return /** @type {!jspb.Map<string,!(string|Uint8Array)>} */ (
3923
4009
  jspb.Message.getMapField(this, 3, opt_noLazyCreate,
3924
4010
  null));
@@ -3929,8 +4015,8 @@ proto.pulumirpc.GeneratePackageRequest.prototype.getExtrafilesMap = function(opt
3929
4015
  * Clears values from the map. The map will be non-null.
3930
4016
  * @return {!proto.pulumirpc.GeneratePackageRequest} returns this
3931
4017
  */
3932
- proto.pulumirpc.GeneratePackageRequest.prototype.clearExtrafilesMap = function() {
3933
- this.getExtrafilesMap().clear();
4018
+ proto.pulumirpc.GeneratePackageRequest.prototype.clearExtraFilesMap = function() {
4019
+ this.getExtraFilesMap().clear();
3934
4020
  return this;};
3935
4021
 
3936
4022
 
@@ -1,6 +1,6 @@
1
1
  export { serializeFunctionAsync, serializeFunction, SerializedFunction, SerializeFunctionArgs, } from "./closure/serializeClosure";
2
2
  export { CodePathOptions, computeCodePaths } from "./closure/codePaths";
3
- export { Mocks, setMocks, MockResourceArgs, MockCallArgs } from "./mocks";
3
+ export { Mocks, setMocks, MockResourceArgs, MockResourceResult, MockCallArgs, MockCallResult } from "./mocks";
4
4
  export * from "./config";
5
5
  export * from "./invoke";
6
6
  export * from "./resource";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../runtime/index.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,+DAKoC;AAJhC,oDAAA,sBAAsB,CAAA;AACtB,+CAAA,iBAAiB,CAAA;AAKrB,iDAAwE;AAA9C,uCAAA,gBAAgB,CAAA;AAC1C,iCAA0E;AAA1D,2BAAA,QAAQ,CAAA;AAExB,8BAAyB;AACzB,8BAAyB;AACzB,gCAA2B;AAC3B,2BAAsB;AACtB,gCAA2B;AAC3B,6BAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../runtime/index.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,+DAKoC;AAJhC,oDAAA,sBAAsB,CAAA;AACtB,+CAAA,iBAAiB,CAAA;AAKrB,iDAAwE;AAA9C,uCAAA,gBAAgB,CAAA;AAC1C,iCAA8G;AAA9F,2BAAA,QAAQ,CAAA;AAExB,8BAAyB;AACzB,8BAAyB;AACzB,gCAA2B;AAC3B,2BAAsB;AACtB,gCAA2B;AAC3B,6BAAwB"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * MockResourceArgs is a used to construct a newResource Mock
2
+ * MockResourceArgs is used to construct a newResource Mock.
3
3
  */
4
4
  export interface MockResourceArgs {
5
5
  /**
@@ -28,7 +28,15 @@ export interface MockResourceArgs {
28
28
  id?: string;
29
29
  }
30
30
  /**
31
- * MockResourceArgs is used to construct call Mock
31
+ * MockResourceResult is the result of a newResource Mock, returning a physical identifier and the output properties
32
+ * for the resource being constructed.
33
+ */
34
+ export declare type MockResourceResult = {
35
+ id: string | undefined;
36
+ state: Record<string, any>;
37
+ };
38
+ /**
39
+ * MockResourceArgs is used to construct call Mock.
32
40
  */
33
41
  export interface MockCallArgs {
34
42
  /**
@@ -45,7 +53,11 @@ export interface MockCallArgs {
45
53
  provider?: string;
46
54
  }
47
55
  /**
48
- * Mocks is an abstract class that allows subclasses to replace operations normally implemented by the Pulumi engine with
56
+ * MockCallResult is the result of a call Mock.
57
+ */
58
+ export declare type MockCallResult = Record<string, any>;
59
+ /**
60
+ * Mocks allows implementations to replace operations normally implemented by the Pulumi engine with
49
61
  * their own implementations. This can be used during testing to ensure that calls to provider functions and resource constructors
50
62
  * return predictable values.
51
63
  */
@@ -55,17 +67,14 @@ export interface Mocks {
55
67
  *
56
68
  * @param args: MockCallArgs
57
69
  */
58
- call(args: MockCallArgs): Record<string, any>;
70
+ call(args: MockCallArgs): MockCallResult | Promise<MockCallResult>;
59
71
  /**
60
72
  * Mocks resource construction calls. This function should return the physical identifier and the output properties
61
73
  * for the resource being constructed.
62
-
74
+ *
63
75
  * @param args: MockResourceArgs
64
76
  */
65
- newResource(args: MockResourceArgs): {
66
- id: string | undefined;
67
- state: Record<string, any>;
68
- };
77
+ newResource(args: MockResourceArgs): MockResourceResult | Promise<MockResourceResult>;
69
78
  }
70
79
  export declare class MockMonitor {
71
80
  readonly mocks: Mocks;
@@ -85,7 +94,7 @@ export declare class MockMonitor {
85
94
  /**
86
95
  * setMocks configures the Pulumi runtime to use the given mocks for testing.
87
96
  *
88
- * @param mocks: The mocks to use for calls to provider functions and resource consrtuction.
97
+ * @param mocks: The mocks to use for calls to provider functions and resource construction.
89
98
  * @param project: If provided, the name of the Pulumi project. Defaults to "project".
90
99
  * @param stack: If provided, the name of the Pulumi stack. Defaults to "stack".
91
100
  * @param preview: If provided, indicates whether or not the program is running a preview. Defaults to false.
package/runtime/mocks.js CHANGED
@@ -55,7 +55,7 @@ class MockMonitor {
55
55
  callback(null, resp);
56
56
  return;
57
57
  }
58
- const result = this.mocks.call({
58
+ const result = yield this.mocks.call({
59
59
  token: tok,
60
60
  inputs: inputs,
61
61
  provider: req.getProvider(),
@@ -76,7 +76,7 @@ class MockMonitor {
76
76
  if (typeof req.getCustom === "function") {
77
77
  custom = req.getCustom();
78
78
  }
79
- const result = this.mocks.newResource({
79
+ const result = yield this.mocks.newResource({
80
80
  type: req.getType(),
81
81
  name: req.getName(),
82
82
  inputs: rpc_1.deserializeProperties(req.getProperties()),
@@ -100,7 +100,7 @@ class MockMonitor {
100
100
  registerResource(req, callback) {
101
101
  return __awaiter(this, void 0, void 0, function* () {
102
102
  try {
103
- const result = this.mocks.newResource({
103
+ const result = yield this.mocks.newResource({
104
104
  type: req.getType(),
105
105
  name: req.getName(),
106
106
  inputs: rpc_1.deserializeProperties(req.getObject()),
@@ -149,7 +149,7 @@ exports.MockMonitor = MockMonitor;
149
149
  /**
150
150
  * setMocks configures the Pulumi runtime to use the given mocks for testing.
151
151
  *
152
- * @param mocks: The mocks to use for calls to provider functions and resource consrtuction.
152
+ * @param mocks: The mocks to use for calls to provider functions and resource construction.
153
153
  * @param project: If provided, the name of the Pulumi project. Defaults to "project".
154
154
  * @param stack: If provided, the name of the Pulumi stack. Defaults to "stack".
155
155
  * @param preview: If provided, indicates whether or not the program is running a preview. Defaults to false.
@@ -1 +1 @@
1
- {"version":3,"file":"mocks.js","sourceRoot":"","sources":["../../runtime/mocks.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEA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GAAG,EAAE,CAAC,UAAU;SAClC,CAAC,CAAC;IACP,CAAC;CACJ;AA5HD,kCA4HC;AAED;;;;;;;;GAQG;AACH,SAAgB,QAAQ,CAAC,KAAY,EAAE,OAAgB,EAAE,KAAc,EAAE,OAAiB,EAAE,YAAqB;IAC7G,yBAAc,CAAC,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;AAClF,CAAC;AAFD,4BAEC"}
@@ -31,42 +31,42 @@ var __importStar = (this && this.__importStar) || function (mod) {
31
31
  Object.defineProperty(exports, "__esModule", { value: true });
32
32
  const assert = __importStar(require("assert"));
33
33
  const pulumi = __importStar(require("../index"));
34
- pulumi.runtime.setMocks({
35
- call: (args) => {
36
- switch (args.token) {
37
- case "test:index:MyFunction":
38
- return { out_value: 59 };
39
- default:
40
- return {};
41
- }
42
- },
43
- newResource: (args) => {
44
- switch (args.type) {
45
- case "aws:ec2/instance:Instance":
46
- assert.strictEqual(args.custom, true);
47
- const state = {
48
- arn: "arn:aws:ec2:us-west-2:123456789012:instance/i-1234567890abcdef0",
49
- instanceState: "running",
50
- primaryNetworkInterfaceId: "eni-12345678",
51
- privateDns: "ip-10-0-1-17.ec2.internal",
52
- publicDns: "ec2-203-0-113-12.compute-1.amazonaws.com",
53
- publicIP: "203.0.113.12",
54
- };
55
- return { id: "i-1234567890abcdef0", state: Object.assign(Object.assign({}, args.inputs), state) };
56
- case "pkg:index:MyCustom":
57
- assert.strictEqual(args.custom, true);
58
- return { id: args.name + "_id", state: args.inputs };
59
- case "pkg:index:MyRemoteComponent":
60
- return {
61
- id: `${args.name}_id`,
62
- state: Object.assign(Object.assign({}, args.inputs), { outprop: `output: ${args.inputs["inprop"]}` }),
63
- };
64
- default:
65
- assert.strictEqual(args.custom, false);
66
- return { id: "", state: {} };
67
- }
68
- },
69
- });
34
+ const callMock = (args) => {
35
+ switch (args.token) {
36
+ case "test:index:MyFunction":
37
+ return { out_value: 59 };
38
+ default:
39
+ return {};
40
+ }
41
+ };
42
+ const asyncCallMock = (args) => Promise.resolve(callMock(args));
43
+ const newResourceMock = (args) => {
44
+ switch (args.type) {
45
+ case "aws:ec2/instance:Instance":
46
+ assert.strictEqual(args.custom, true);
47
+ const state = {
48
+ arn: "arn:aws:ec2:us-west-2:123456789012:instance/i-1234567890abcdef0",
49
+ instanceState: "running",
50
+ primaryNetworkInterfaceId: "eni-12345678",
51
+ privateDns: "ip-10-0-1-17.ec2.internal",
52
+ publicDns: "ec2-203-0-113-12.compute-1.amazonaws.com",
53
+ publicIP: "203.0.113.12",
54
+ };
55
+ return { id: "i-1234567890abcdef0", state: Object.assign(Object.assign({}, args.inputs), state) };
56
+ case "pkg:index:MyCustom":
57
+ assert.strictEqual(args.custom, true);
58
+ return { id: args.name + "_id", state: args.inputs };
59
+ case "pkg:index:MyRemoteComponent":
60
+ return {
61
+ id: `${args.name}_id`,
62
+ state: Object.assign(Object.assign({}, args.inputs), { outprop: `output: ${args.inputs["inprop"]}` }),
63
+ };
64
+ default:
65
+ assert.strictEqual(args.custom, false);
66
+ return { id: "", state: {} };
67
+ }
68
+ };
69
+ const asyncNewResourceMock = (args) => Promise.resolve(newResourceMock(args));
70
70
  class MyComponent extends pulumi.ComponentResource {
71
71
  constructor(name, inprop, opts) {
72
72
  super("pkg:index:MyComponent", name, {}, opts);
@@ -84,16 +84,6 @@ class Instance extends pulumi.CustomResource {
84
84
  super("aws:ec2/instance:Instance", name, props, opts);
85
85
  }
86
86
  }
87
- pulumi.runtime.registerResourceModule("aws", "ec2/instance", {
88
- construct: (name, type, urn) => {
89
- switch (type) {
90
- case "aws:ec2/instance:Instance":
91
- return new Instance(name, { urn });
92
- default:
93
- throw new Error(`unknown resource type ${type}`);
94
- }
95
- },
96
- });
97
87
  class MyCustom extends pulumi.CustomResource {
98
88
  constructor(name, props, opts) {
99
89
  super("pkg:index:MyCustom", name, props, opts);
@@ -105,46 +95,75 @@ function invoke() {
105
95
  return value["out_value"];
106
96
  });
107
97
  }
108
- const mycomponent = new MyComponent("mycomponent", "hello");
109
- const myinstance = new Instance("instance");
110
- const mycustom = new MyCustom("mycustom", { instance: myinstance });
111
- const invokeResult = invoke();
112
- const myremotecomponent = new MyRemoteComponent("myremotecomponent", pulumi.interpolate `hello: ${myinstance.id}`);
113
- describe("mocks", function () {
114
- describe("component", function () {
115
- it("has expected output value", (done) => {
116
- mycomponent.outprop.apply((outprop) => {
117
- assert.strictEqual(outprop, "output: hello");
118
- done();
98
+ const setups = [
99
+ ["mocks: newResource sync, call sync", false, false],
100
+ ["mocks: newResource sync, call async", false, true],
101
+ ["mocks: newResource async, call sync", true, false],
102
+ ["mocks: newResource async, call async", true, true],
103
+ ];
104
+ setups.forEach(([test, isAsyncNewResource, isAsyncCall]) => {
105
+ describe(test, function () {
106
+ let component;
107
+ let instance;
108
+ let custom;
109
+ let invokeResult;
110
+ let remoteComponent;
111
+ before(() => {
112
+ pulumi.runtime.setMocks({
113
+ call: isAsyncCall ? asyncCallMock : callMock,
114
+ newResource: isAsyncNewResource ? asyncNewResourceMock : newResourceMock,
119
115
  });
116
+ pulumi.runtime.registerResourceModule("aws", "ec2/instance", {
117
+ construct: (name, type, urn) => {
118
+ switch (type) {
119
+ case "aws:ec2/instance:Instance":
120
+ return new Instance(name, { urn });
121
+ default:
122
+ throw new Error(`unknown resource type ${type}`);
123
+ }
124
+ },
125
+ });
126
+ component = new MyComponent("mycomponent", "hello");
127
+ instance = new Instance("instance");
128
+ custom = new MyCustom("mycustom", { instance: instance });
129
+ invokeResult = invoke();
130
+ remoteComponent = new MyRemoteComponent("myremotecomponent", pulumi.interpolate `hello: ${instance.id}`);
120
131
  });
121
- });
122
- describe("remote component", function () {
123
- it("has expected output value", (done) => {
124
- myremotecomponent.outprop.apply((outprop) => {
125
- assert.strictEqual(outprop.startsWith("output: hello: "), true);
126
- done();
132
+ describe("component", function () {
133
+ it("has expected output value", (done) => {
134
+ component.outprop.apply((outprop) => {
135
+ assert.strictEqual(outprop, "output: hello");
136
+ done();
137
+ });
127
138
  });
128
139
  });
129
- });
130
- describe("custom", function () {
131
- it("instance has expected output value", (done) => {
132
- myinstance.publicIP.apply((ip) => {
133
- assert.strictEqual(ip, "203.0.113.12");
134
- done();
140
+ describe("remote component", function () {
141
+ it("has expected output value", (done) => {
142
+ remoteComponent.outprop.apply((outprop) => {
143
+ assert.strictEqual(outprop.startsWith("output: hello: "), true);
144
+ done();
145
+ });
135
146
  });
136
147
  });
137
- it("mycustom has expected output value", (done) => {
138
- mycustom.instance.apply((instance) => {
139
- done();
148
+ describe("custom", function () {
149
+ it("instance has expected output value", (done) => {
150
+ instance.publicIP.apply((ip) => {
151
+ assert.strictEqual(ip, "203.0.113.12");
152
+ done();
153
+ });
154
+ });
155
+ it("mycustom has expected output value", (done) => {
156
+ custom.instance.apply((_) => {
157
+ done();
158
+ });
140
159
  });
141
160
  });
142
- });
143
- describe("invoke", function () {
144
- it("has expected result", (done) => {
145
- invokeResult.then((value) => {
146
- assert.strictEqual(value, 59);
147
- done();
161
+ describe("invoke", function () {
162
+ it("has expected result", (done) => {
163
+ invokeResult.then((value) => {
164
+ assert.strictEqual(value, 59);
165
+ done();
166
+ });
148
167
  });
149
168
  });
150
169
  });
@@ -1 +1 @@
1
- {"version":3,"file":"mocks.spec.js","sourceRoot":"","sources":["../../tests_with_mocks/mocks.spec.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,+CAAiC;AACjC,iDAAmC;AAInC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;IACpB,IAAI,EAAE,CAAC,IAAkB,EAAE,EAAE;QACzB,QAAQ,IAAI,CAAC,KAAK,EAAE;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,EAAE,CAAC,oCAAoC,EAAE,CAAC,IAAI,EAAE,EAAE;gBAC9C,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,EAAE;oBAC3B,MAAM,CAAC,WAAW,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;oBACvC,IAAI,EAAE,CAAC;gBACX,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,oCAAoC,EAAE,CAAC,IAAI,EAAE,EAAE;gBAC9C,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;oBACxB,IAAI,EAAE,CAAC;gBACX,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,QAAQ,CAAC,QAAQ,EAAE;YACf,EAAE,CAAC,qBAAqB,EAAE,CAAC,IAAI,EAAE,EAAE;gBAC/B,YAAY,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;oBACxB,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;oBAC9B,IAAI,EAAE,CAAC;gBACX,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
package/version.js CHANGED
@@ -13,5 +13,5 @@
13
13
  // See the License for the specific language governing permissions and
14
14
  // limitations under the License.
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.version = "3.68.0";
16
+ exports.version = "3.70.0";
17
17
  //# sourceMappingURL=version.js.map