Socket
Socket
Sign inDemoInstall

@pulumi/pulumi

Package Overview
Dependencies
Maintainers
13
Versions
4387
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pulumi/pulumi - npm Package Compare versions

Comparing version 0.11.0-dev-8-ga3608e0c to 0.11.0-dev-89-gcc5ce42d

LICENSE

2

package.json
{
"name": "@pulumi/pulumi",
"version": "v0.11.0-dev-8-ga3608e0c",
"version": "0.11.0-dev-89-gcc5ce42d",
"description": "Pulumi's Node.js SDK",

@@ -5,0 +5,0 @@ "repository": "https://github.com/pulumi/pulumi/sdk/nodejs",

@@ -172,3 +172,3 @@ /**

proto.pulumirpc.AnalyzeRequest.prototype.setType = function(value) {
jspb.Message.setField(this, 1, value);
jspb.Message.setProto3StringField(this, 1, value);
};

@@ -525,3 +525,3 @@

proto.pulumirpc.AnalyzeFailure.prototype.setProperty = function(value) {
jspb.Message.setField(this, 1, value);
jspb.Message.setProto3StringField(this, 1, value);
};

@@ -541,3 +541,3 @@

proto.pulumirpc.AnalyzeFailure.prototype.setReason = function(value) {
jspb.Message.setField(this, 2, value);
jspb.Message.setProto3StringField(this, 2, value);
};

@@ -544,0 +544,0 @@

@@ -167,3 +167,3 @@ /**

proto.pulumirpc.LogRequest.prototype.setSeverity = function(value) {
jspb.Message.setField(this, 1, value);
jspb.Message.setProto3EnumField(this, 1, value);
};

@@ -183,3 +183,3 @@

proto.pulumirpc.LogRequest.prototype.setMessage = function(value) {
jspb.Message.setField(this, 2, value);
jspb.Message.setProto3StringField(this, 2, value);
};

@@ -186,0 +186,0 @@

@@ -23,2 +23,24 @@ // GENERATED CODE -- DO NOT EDIT!

function serialize_pulumirpc_GetRequiredPluginsRequest(arg) {
if (!(arg instanceof language_pb.GetRequiredPluginsRequest)) {
throw new Error('Expected argument of type pulumirpc.GetRequiredPluginsRequest');
}
return new Buffer(arg.serializeBinary());
}
function deserialize_pulumirpc_GetRequiredPluginsRequest(buffer_arg) {
return language_pb.GetRequiredPluginsRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_pulumirpc_GetRequiredPluginsResponse(arg) {
if (!(arg instanceof language_pb.GetRequiredPluginsResponse)) {
throw new Error('Expected argument of type pulumirpc.GetRequiredPluginsResponse');
}
return new Buffer(arg.serializeBinary());
}
function deserialize_pulumirpc_GetRequiredPluginsResponse(buffer_arg) {
return language_pb.GetRequiredPluginsResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_pulumirpc_PluginInfo(arg) {

@@ -61,2 +83,15 @@ if (!(arg instanceof plugin_pb.PluginInfo)) {

var LanguageRuntimeService = exports.LanguageRuntimeService = {
// GetRequiredPlugins computes the complete set of anticipated plugins required by a program.
getRequiredPlugins: {
path: '/pulumirpc.LanguageRuntime/GetRequiredPlugins',
requestStream: false,
responseStream: false,
requestType: language_pb.GetRequiredPluginsRequest,
responseType: language_pb.GetRequiredPluginsResponse,
requestSerialize: serialize_pulumirpc_GetRequiredPluginsRequest,
requestDeserialize: deserialize_pulumirpc_GetRequiredPluginsRequest,
responseSerialize: serialize_pulumirpc_GetRequiredPluginsResponse,
responseDeserialize: deserialize_pulumirpc_GetRequiredPluginsResponse,
},
// Run executes a program and returns its result.
run: {

@@ -63,0 +98,0 @@ path: '/pulumirpc.LanguageRuntime/Run',

@@ -16,2 +16,4 @@ /**

var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
goog.exportSymbol('proto.pulumirpc.GetRequiredPluginsRequest', null, global);
goog.exportSymbol('proto.pulumirpc.GetRequiredPluginsResponse', null, global);
goog.exportSymbol('proto.pulumirpc.RunRequest', null, global);

@@ -30,2 +32,366 @@ goog.exportSymbol('proto.pulumirpc.RunResponse', null, global);

*/
proto.pulumirpc.GetRequiredPluginsRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.pulumirpc.GetRequiredPluginsRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.pulumirpc.GetRequiredPluginsRequest.displayName = 'proto.pulumirpc.GetRequiredPluginsRequest';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.pulumirpc.GetRequiredPluginsRequest.prototype.toObject = function(opt_includeInstance) {
return proto.pulumirpc.GetRequiredPluginsRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.pulumirpc.GetRequiredPluginsRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pulumirpc.GetRequiredPluginsRequest.toObject = function(includeInstance, msg) {
var f, obj = {
project: jspb.Message.getFieldWithDefault(msg, 1, ""),
pwd: jspb.Message.getFieldWithDefault(msg, 2, ""),
program: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.pulumirpc.GetRequiredPluginsRequest}
*/
proto.pulumirpc.GetRequiredPluginsRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.pulumirpc.GetRequiredPluginsRequest;
return proto.pulumirpc.GetRequiredPluginsRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.pulumirpc.GetRequiredPluginsRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.pulumirpc.GetRequiredPluginsRequest}
*/
proto.pulumirpc.GetRequiredPluginsRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setProject(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setPwd(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setProgram(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.pulumirpc.GetRequiredPluginsRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.pulumirpc.GetRequiredPluginsRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.pulumirpc.GetRequiredPluginsRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pulumirpc.GetRequiredPluginsRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getProject();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getPwd();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getProgram();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional string project = 1;
* @return {string}
*/
proto.pulumirpc.GetRequiredPluginsRequest.prototype.getProject = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.pulumirpc.GetRequiredPluginsRequest.prototype.setProject = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string pwd = 2;
* @return {string}
*/
proto.pulumirpc.GetRequiredPluginsRequest.prototype.getPwd = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.pulumirpc.GetRequiredPluginsRequest.prototype.setPwd = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string program = 3;
* @return {string}
*/
proto.pulumirpc.GetRequiredPluginsRequest.prototype.getProgram = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
proto.pulumirpc.GetRequiredPluginsRequest.prototype.setProgram = function(value) {
jspb.Message.setProto3StringField(this, 3, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.pulumirpc.GetRequiredPluginsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.pulumirpc.GetRequiredPluginsResponse.repeatedFields_, null);
};
goog.inherits(proto.pulumirpc.GetRequiredPluginsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.pulumirpc.GetRequiredPluginsResponse.displayName = 'proto.pulumirpc.GetRequiredPluginsResponse';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.pulumirpc.GetRequiredPluginsResponse.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.pulumirpc.GetRequiredPluginsResponse.prototype.toObject = function(opt_includeInstance) {
return proto.pulumirpc.GetRequiredPluginsResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.pulumirpc.GetRequiredPluginsResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pulumirpc.GetRequiredPluginsResponse.toObject = function(includeInstance, msg) {
var f, obj = {
pluginsList: jspb.Message.toObjectList(msg.getPluginsList(),
plugin_pb.PluginDependency.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.pulumirpc.GetRequiredPluginsResponse}
*/
proto.pulumirpc.GetRequiredPluginsResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.pulumirpc.GetRequiredPluginsResponse;
return proto.pulumirpc.GetRequiredPluginsResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.pulumirpc.GetRequiredPluginsResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.pulumirpc.GetRequiredPluginsResponse}
*/
proto.pulumirpc.GetRequiredPluginsResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new plugin_pb.PluginDependency;
reader.readMessage(value,plugin_pb.PluginDependency.deserializeBinaryFromReader);
msg.addPlugins(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.pulumirpc.GetRequiredPluginsResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.pulumirpc.GetRequiredPluginsResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.pulumirpc.GetRequiredPluginsResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pulumirpc.GetRequiredPluginsResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPluginsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
plugin_pb.PluginDependency.serializeBinaryToWriter
);
}
};
/**
* repeated PluginDependency plugins = 1;
* @return {!Array.<!proto.pulumirpc.PluginDependency>}
*/
proto.pulumirpc.GetRequiredPluginsResponse.prototype.getPluginsList = function() {
return /** @type{!Array.<!proto.pulumirpc.PluginDependency>} */ (
jspb.Message.getRepeatedWrapperField(this, plugin_pb.PluginDependency, 1));
};
/** @param {!Array.<!proto.pulumirpc.PluginDependency>} value */
proto.pulumirpc.GetRequiredPluginsResponse.prototype.setPluginsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.pulumirpc.PluginDependency=} opt_value
* @param {number=} opt_index
* @return {!proto.pulumirpc.PluginDependency}
*/
proto.pulumirpc.GetRequiredPluginsResponse.prototype.addPlugins = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pulumirpc.PluginDependency, opt_index);
};
proto.pulumirpc.GetRequiredPluginsResponse.prototype.clearPluginsList = function() {
this.setPluginsList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.pulumirpc.RunRequest = function(opt_data) {

@@ -81,3 +447,4 @@ jspb.Message.initialize(this, opt_data, 0, -1, proto.pulumirpc.RunRequest.repeatedFields_, null);

dryrun: jspb.Message.getFieldWithDefault(msg, 7, false),
parallel: jspb.Message.getFieldWithDefault(msg, 8, 0)
parallel: jspb.Message.getFieldWithDefault(msg, 8, 0),
monitorAddress: jspb.Message.getFieldWithDefault(msg, 9, "")
};

@@ -153,2 +520,6 @@

break;
case 9:
var value = /** @type {string} */ (reader.readString());
msg.setMonitorAddress(value);
break;
default:

@@ -236,2 +607,9 @@ reader.skipField();

}
f = message.getMonitorAddress();
if (f.length > 0) {
writer.writeString(
9,
f
);
}
};

@@ -251,3 +629,3 @@

proto.pulumirpc.RunRequest.prototype.setProject = function(value) {
jspb.Message.setField(this, 1, value);
jspb.Message.setProto3StringField(this, 1, value);
};

@@ -267,3 +645,3 @@

proto.pulumirpc.RunRequest.prototype.setStack = function(value) {
jspb.Message.setField(this, 2, value);
jspb.Message.setProto3StringField(this, 2, value);
};

@@ -283,3 +661,3 @@

proto.pulumirpc.RunRequest.prototype.setPwd = function(value) {
jspb.Message.setField(this, 3, value);
jspb.Message.setProto3StringField(this, 3, value);
};

@@ -299,3 +677,3 @@

proto.pulumirpc.RunRequest.prototype.setProgram = function(value) {
jspb.Message.setField(this, 4, value);
jspb.Message.setProto3StringField(this, 4, value);
};

@@ -364,3 +742,3 @@

proto.pulumirpc.RunRequest.prototype.setDryrun = function(value) {
jspb.Message.setField(this, 7, value);
jspb.Message.setProto3BooleanField(this, 7, value);
};

@@ -380,7 +758,22 @@

proto.pulumirpc.RunRequest.prototype.setParallel = function(value) {
jspb.Message.setField(this, 8, value);
jspb.Message.setProto3IntField(this, 8, value);
};
/**
* optional string monitor_address = 9;
* @return {string}
*/
proto.pulumirpc.RunRequest.prototype.getMonitorAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};
/** @param {string} value */
proto.pulumirpc.RunRequest.prototype.setMonitorAddress = function(value) {
jspb.Message.setProto3StringField(this, 9, value);
};
/**

@@ -523,3 +916,3 @@ * Generated by JsPbCodeGenerator.

proto.pulumirpc.RunResponse.prototype.setError = function(value) {
jspb.Message.setField(this, 1, value);
jspb.Message.setProto3StringField(this, 1, value);
};

@@ -526,0 +919,0 @@

@@ -14,2 +14,3 @@ /**

goog.exportSymbol('proto.pulumirpc.PluginDependency', null, global);
goog.exportSymbol('proto.pulumirpc.PluginInfo', null, global);

@@ -154,6 +155,202 @@

proto.pulumirpc.PluginInfo.prototype.setVersion = function(value) {
jspb.Message.setField(this, 1, value);
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.pulumirpc.PluginDependency = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.pulumirpc.PluginDependency, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.pulumirpc.PluginDependency.displayName = 'proto.pulumirpc.PluginDependency';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.pulumirpc.PluginDependency.prototype.toObject = function(opt_includeInstance) {
return proto.pulumirpc.PluginDependency.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.pulumirpc.PluginDependency} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pulumirpc.PluginDependency.toObject = function(includeInstance, msg) {
var f, obj = {
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
kind: jspb.Message.getFieldWithDefault(msg, 2, ""),
version: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.pulumirpc.PluginDependency}
*/
proto.pulumirpc.PluginDependency.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.pulumirpc.PluginDependency;
return proto.pulumirpc.PluginDependency.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.pulumirpc.PluginDependency} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.pulumirpc.PluginDependency}
*/
proto.pulumirpc.PluginDependency.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setKind(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setVersion(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.pulumirpc.PluginDependency.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.pulumirpc.PluginDependency.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.pulumirpc.PluginDependency} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pulumirpc.PluginDependency.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getKind();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getVersion();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional string name = 1;
* @return {string}
*/
proto.pulumirpc.PluginDependency.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.pulumirpc.PluginDependency.prototype.setName = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string kind = 2;
* @return {string}
*/
proto.pulumirpc.PluginDependency.prototype.getKind = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.pulumirpc.PluginDependency.prototype.setKind = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string version = 3;
* @return {string}
*/
proto.pulumirpc.PluginDependency.prototype.getVersion = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
proto.pulumirpc.PluginDependency.prototype.setVersion = function(value) {
jspb.Message.setProto3StringField(this, 3, value);
};
goog.object.extend(exports, proto.pulumirpc);

@@ -32,3 +32,3 @@ /**

proto.pulumirpc.RegisterResourceRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
jspb.Message.initialize(this, opt_data, 0, -1, proto.pulumirpc.RegisterResourceRequest.repeatedFields_, null);
};

@@ -39,4 +39,11 @@ goog.inherits(proto.pulumirpc.RegisterResourceRequest, jspb.Message);

}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.pulumirpc.RegisterResourceRequest.repeatedFields_ = [7];
if (jspb.Message.GENERATE_TO_OBJECT) {

@@ -74,3 +81,4 @@ /**

object: (f = msg.getObject()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
protect: jspb.Message.getFieldWithDefault(msg, 6, false)
protect: jspb.Message.getFieldWithDefault(msg, 6, false),
dependenciesList: jspb.Message.getRepeatedField(msg, 7)
};

@@ -137,2 +145,6 @@

break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.addDependencies(value);
break;
default:

@@ -210,2 +222,9 @@ reader.skipField();

}
f = message.getDependenciesList();
if (f.length > 0) {
writer.writeRepeatedString(
7,
f
);
}
};

@@ -225,3 +244,3 @@

proto.pulumirpc.RegisterResourceRequest.prototype.setType = function(value) {
jspb.Message.setField(this, 1, value);
jspb.Message.setProto3StringField(this, 1, value);
};

@@ -241,3 +260,3 @@

proto.pulumirpc.RegisterResourceRequest.prototype.setName = function(value) {
jspb.Message.setField(this, 2, value);
jspb.Message.setProto3StringField(this, 2, value);
};

@@ -257,3 +276,3 @@

proto.pulumirpc.RegisterResourceRequest.prototype.setParent = function(value) {
jspb.Message.setField(this, 3, value);
jspb.Message.setProto3StringField(this, 3, value);
};

@@ -275,3 +294,3 @@

proto.pulumirpc.RegisterResourceRequest.prototype.setCustom = function(value) {
jspb.Message.setField(this, 4, value);
jspb.Message.setProto3BooleanField(this, 4, value);
};

@@ -323,8 +342,37 @@

proto.pulumirpc.RegisterResourceRequest.prototype.setProtect = function(value) {
jspb.Message.setField(this, 6, value);
jspb.Message.setProto3BooleanField(this, 6, value);
};
/**
* repeated string dependencies = 7;
* @return {!Array.<string>}
*/
proto.pulumirpc.RegisterResourceRequest.prototype.getDependenciesList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getRepeatedField(this, 7));
};
/** @param {!Array.<string>} value */
proto.pulumirpc.RegisterResourceRequest.prototype.setDependenciesList = function(value) {
jspb.Message.setField(this, 7, value || []);
};
/**
* @param {!string} value
* @param {number=} opt_index
*/
proto.pulumirpc.RegisterResourceRequest.prototype.addDependencies = function(value, opt_index) {
jspb.Message.addToRepeatedField(this, 7, value, opt_index);
};
proto.pulumirpc.RegisterResourceRequest.prototype.clearDependenciesList = function() {
this.setDependenciesList([]);
};
/**
* Generated by JsPbCodeGenerator.

@@ -523,3 +571,3 @@ * @param {Array=} opt_data Optional initial data array, typically from a

proto.pulumirpc.RegisterResourceResponse.prototype.setUrn = function(value) {
jspb.Message.setField(this, 1, value);
jspb.Message.setProto3StringField(this, 1, value);
};

@@ -539,3 +587,3 @@

proto.pulumirpc.RegisterResourceResponse.prototype.setId = function(value) {
jspb.Message.setField(this, 2, value);
jspb.Message.setProto3StringField(this, 2, value);
};

@@ -587,3 +635,3 @@

proto.pulumirpc.RegisterResourceResponse.prototype.setStable = function(value) {
jspb.Message.setField(this, 4, value);
jspb.Message.setProto3BooleanField(this, 4, value);
};

@@ -773,3 +821,3 @@

proto.pulumirpc.RegisterResourceOutputsRequest.prototype.setUrn = function(value) {
jspb.Message.setField(this, 1, value);
jspb.Message.setProto3StringField(this, 1, value);
};

@@ -776,0 +824,0 @@

@@ -15,5 +15,33 @@ "use strict";

const ts = require("typescript");
const errors_1 = require("../errors");
const log = require("../log");
const resource = require("../resource");
const nativeruntime = require("./native/build/Release/nativeruntime.node");
// Our closure serialization code links against v8 internals. On Windows,
// we can't dynamically link against v8 internals because their symbols are
// unexported. In order to address this problem, Pulumi programs run on a
// custom build of Node.
//
// On Linux and OSX, we can dynamically link against v8 internals, so we can run
// on stock Node. However, we only build nativeruntime.node against specific versions
// of Node, users running Pulumi programs must explicitly use a supported version
// of Node.
const supportedNodeVersions = ["v6.10.2"];
let nativeruntime;
try {
nativeruntime = require("nativeruntime.node");
}
catch (err) {
// There are two reasons why this can happen:
// 1. We messed up when packaging Pulumi and failed to include nativeruntime.node,
// 2. A user is running their Pulumi program with a version of Node that we do not explicitly support.
const thisNodeVersion = process.version;
if (supportedNodeVersions.indexOf(thisNodeVersion) > -1) {
// This node version is explicitly supported, but the load still failed.
// This means that Pulumi messed up when installing itself.
throw new errors_1.RunError(`Failed to locate custom Pulumi SDK Node.js extension. This is a bug! (${err.message})`);
}
throw new errors_1.RunError(`Failed to load custom Pulumi SDK Node.js extension; The version of Node.js that you are
using (${thisNodeVersion}) is not explicitly supported, you must use one of these
supported versions of Node.js: ${supportedNodeVersions}`);
}
/**

@@ -20,0 +48,0 @@ * serializeClosure serializes a function and its closure environment into a form that is amenable to persistence

@@ -41,8 +41,6 @@ "use strict";

const resolvers = rpc_1.transferProperties(res, label, inputProps);
// Now run the operation, serializing the invocation if necessary.
const opLabel = `monitor.registerResource(${label})`;
runAsyncResourceOp(opLabel, () => __awaiter(this, void 0, void 0, function* () {
// Before we can proceed, all our dependencies must be finished.
const dependsOn = opts.dependsOn || [];
yield debuggable_1.debuggablePromise(Promise.all(dependsOn.map(d => d.urn.promise())), `dependsOn(${label})`);
// Before we can proceed, all our dependencies must be finished.
const dependsOn = opts.dependsOn || [];
const dependsOnResolved = debuggable_1.debuggablePromise(Promise.all(dependsOn.map(d => d.urn.promise())), `dependsOn(${label})`);
debuggable_1.debuggablePromise(dependsOnResolved.then((explicitURNDeps) => __awaiter(this, void 0, void 0, function* () {
// Serialize out all our props to their final values. In doing so, we'll also collect all

@@ -61,2 +59,6 @@ // the Resources pointed to by any Dependency objects we encounter, adding them to

}
const implicitDeps = new Set(explicitURNDeps);
for (const implicitDep of implicitResourceDependencies) {
implicitDeps.add(yield implicitDep.urn.promise());
}
const req = new resproto.RegisterResourceRequest();

@@ -69,57 +71,62 @@ req.setType(t);

req.setProtect(opts.protect);
const resp = yield debuggable_1.debuggablePromise(new Promise((resolve, reject) => monitor.registerResource(req, (err, innerResponse) => {
log.debug(`RegisterResource RPC finished: t=${t}, name=${name}; ` +
`err: ${err}, resp: ${innerResponse}`);
if (err) {
log.error(`Failed to register new resource '${name}' [${t}]: ${err.stack}`);
reject(err);
}
else {
resolve(innerResponse);
}
})), opLabel);
const urn = resp.getUrn();
const id = resp.getId();
const outputProps = resp.getObject();
const stable = resp.getStable();
const stablesList = resp.getStablesList();
const stables = new Set(stablesList);
// Always make sure to resolve the URN property, even if it is undefined due to a
// missing monitor.
resolveURN(urn);
// If an ID is present, then it's safe to say it's final, because the resource planner
// wouldn't hand it back to us otherwise (e.g., if the resource was being replaced, it
// would be missing). If it isn't available, ensure the ID gets resolved, just resolve
// it to undefined (indicating it isn't known).
//
// Note: 'id || undefined' is intentional. We intentionally collapse falsy values to
// undefined so that later parts of our system don't have to deal with values like 'null'.
if (resolveID) {
resolveID(id || undefined);
}
// Produce a combined set of property states, starting with inputs and then applying
// outputs. If the same property exists in the inputs and outputs states, the output wins.
const allProps = {};
if (outputProps) {
Object.assign(allProps, rpc_1.deserializeProperties(outputProps));
}
for (const key of Object.keys(inputProps)) {
if (!allProps.hasOwnProperty(key)) {
// input prop the engine didn't give us a final value for. Just use the
// value passed into the resource. Note: unwrap dependencies so that we
// can reparent the value against ourself. i.e. if resource B is passed
// resources A.depProp as an input, and the engine doesn't produce an
// output for it, we want resource B to expose depProp as a DependencyProp
// pointing to B and not A.
const inputProp = inputProps[key];
if (inputProp instanceof resource_1.Output) {
allProps[key] = yield inputProp.promise();
req.setDependenciesList(Array.from(implicitDeps));
// Now run the operation, serializing the invocation if necessary.
const opLabel = `monitor.registerResource(${label})`;
runAsyncResourceOp(opLabel, () => __awaiter(this, void 0, void 0, function* () {
const resp = yield debuggable_1.debuggablePromise(new Promise((resolve, reject) => monitor.registerResource(req, (err, innerResponse) => {
log.debug(`RegisterResource RPC finished: t=${t}, name=${name}; ` +
`err: ${err}, resp: ${innerResponse}`);
if (err) {
log.error(`Failed to register new resource '${name}' [${t}]: ${err.stack}`);
reject(err);
}
else {
allProps[key] = inputProp;
resolve(innerResponse);
}
})), opLabel);
const urn = resp.getUrn();
const id = resp.getId();
const outputProps = resp.getObject();
const stable = resp.getStable();
const stablesList = resp.getStablesList();
const stables = new Set(stablesList);
// Always make sure to resolve the URN property, even if it is undefined due to a
// missing monitor.
resolveURN(urn);
// If an ID is present, then it's safe to say it's final, because the resource planner
// wouldn't hand it back to us otherwise (e.g., if the resource was being replaced, it
// would be missing). If it isn't available, ensure the ID gets resolved, just resolve
// it to undefined (indicating it isn't known).
//
// Note: 'id || undefined' is intentional. We intentionally collapse falsy values to
// undefined so that later parts of our system don't have to deal with values like 'null'.
if (resolveID) {
resolveID(id || undefined);
}
}
rpc_1.resolveProperties(res, resolvers, t, name, allProps, stable, stables);
}));
// Produce a combined set of property states, starting with inputs and then applying
// outputs. If the same property exists in the inputs and outputs states, the output wins.
const allProps = {};
if (outputProps) {
Object.assign(allProps, rpc_1.deserializeProperties(outputProps));
}
for (const key of Object.keys(inputProps)) {
if (!allProps.hasOwnProperty(key)) {
// input prop the engine didn't give us a final value for. Just use the
// value passed into the resource. Note: unwrap dependencies so that we
// can reparent the value against ourself. i.e. if resource B is passed
// resources A.depProp as an input, and the engine doesn't produce an
// output for it, we want resource B to expose depProp as a DependencyProp
// pointing to B and not A.
const inputProp = inputProps[key];
if (inputProp instanceof resource_1.Output) {
allProps[key] = yield inputProp.promise();
}
else {
allProps[key] = inputProp;
}
}
}
rpc_1.resolveProperties(res, resolvers, t, name, allProps, stable, stables);
}));
})));
}

@@ -126,0 +133,0 @@ exports.registerResource = registerResource;

"use strict";
// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
Object.defineProperty(exports, "__esModule", { value: true });
const errors_1 = require("../errors");
const debuggable_1 = require("./debuggable");

@@ -17,6 +18,2 @@ /**

/**
* configured is set to true once configuration has been set.
*/
let configured;
/**
* hasMonitor returns true if we are currently connected to a resource monitoring service.

@@ -32,5 +29,5 @@ */

function getMonitor() {
if (!configured) {
configured = true;
console.warn("warning: Pulumi Fabric monitor is missing; no resources will be created");
if (!exports.options.monitor) {
throw new errors_1.RunError("Pulumi program not connected to the engine -- are you running with the `pulumi` CLI?\n" +
"This can also happen if you've loaded the Pulumi SDK module multiple times into the same proces");
}

@@ -55,2 +52,6 @@ return exports.options.monitor;

/**
* configured is set to true once configuration has been set.
*/
let configured;
/**
* configure initializes the current resource monitor and engine RPC connections, and whether we are performing a "dry

@@ -57,0 +58,0 @@ * run" (preview), versus a real deployment, and so on. It may only be called once.

@@ -158,3 +158,3 @@ "use strict";

expectResourceCount: 2,
registerResource: (ctx, dryrun, t, name, res) => {
registerResource: (ctx, dryrun, t, name, res, dependencies) => {
let id;

@@ -174,2 +174,3 @@ let props;

assert.strictEqual(name, "resourceB");
assert.deepEqual(dependencies, ["test:index:ResourceA::resourceA"]);
if (dryrun) {

@@ -336,3 +337,4 @@ // If this is a dry-run, we won't have the real values:

const res = req.getObject().toJavaScript();
const { urn, id, props } = opts.registerResource(ctx, dryrun, t, name, res);
const deps = req.getDependenciesList();
const { urn, id, props } = opts.registerResource(ctx, dryrun, t, name, res, deps);
resp.setUrn(urn);

@@ -363,3 +365,3 @@ resp.setId(id);

// Next, go ahead and spawn a new language host that connects to said monitor.
const langHost = serveLanguageHostProcess(monitor.addr);
const langHost = serveLanguageHostProcess();
const langHostAddr = yield langHost.addr;

@@ -370,3 +372,3 @@ // Fake up a client RPC connection to the language host so that we can invoke run.

// throw an error if anything doesn't look right, which gets reflected back in the run results.
const runError = yield mockRun(langHostClient, opts, dryrun);
const runError = yield mockRun(langHostClient, monitor.addr, opts, dryrun);
// Validate that everything looks right.

@@ -402,5 +404,6 @@ let expectError = opts.expectError;

});
function mockRun(langHostClient, opts, dryrun) {
function mockRun(langHostClient, monitor, opts, dryrun) {
return new Promise((resolve, reject) => {
const runReq = new langproto.RunRequest();
runReq.setMonitorAddress(monitor);
if (opts.project) {

@@ -449,7 +452,7 @@ runReq.setProject(opts.project);

}
function serveLanguageHostProcess(monitorAddr) {
function serveLanguageHostProcess() {
// A quick note about this:
//
// Normally, pulumi-langhost-nodejs probes the path in order to
// find the nodejs executor, pulumi-langhost-nodejs-exec. This works
// Normally, pulumi-language-nodejs probes the path in order to
// find the nodejs executor, pulumi-language-nodejs-exec. This works
// great in all scenarios other than testing within this file. If the executor

@@ -475,6 +478,5 @@ // that it founds resides in the Pulumi install dir (which it will, if these tests

// the source directory and not the install directory.
const proc = childProcess.spawn("pulumi-langhost-nodejs", [
const proc = childProcess.spawn("pulumi-language-nodejs", [
"--use-executor",
path.join(__filename, "..", "..", "..", "..", "..", "pulumi-langhost-nodejs-exec-test"),
monitorAddr,
path.join(__filename, "..", "..", "..", "..", "pulumi-language-nodejs-exec-test"),
]);

@@ -481,0 +483,0 @@ // Hook the first line so we can parse the address. Then we hook the rest to print for debugging purposes, and

"use strict";
// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "v0.11.0-dev-8-ga3608e0c";
exports.version = "0.11.0-dev-89-gcc5ce42d";
//# sourceMappingURL=version.js.map

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc