Socket
Socket
Sign inDemoInstall

@pulumi/pulumi

Package Overview
Dependencies
Maintainers
2
Versions
4388
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 3.124.0 to 3.124.1-alpha.x26ff819

25

asset/archive.d.ts
import { Asset } from "./asset";
/**
* An Archive represents a collection of named assets.
* An {@link Archive} represents a collection of named assets.
*/
export declare abstract class Archive {
/**
* Returns true if the given object is an instance of an Archive. This is designed to work even when
* multiple copies of the Pulumi SDK have been loaded into the same process.
* Returns true if the given object is an {@link Archive}. This is designed
* to work even when multiple copies of the Pulumi SDK have been loaded into
* the same process.
*/

@@ -13,3 +14,3 @@ static isInstance(obj: any): obj is Archive;

/**
* AssetMap is a map of assets.
* A map of assets.
*/

@@ -20,3 +21,4 @@ export declare type AssetMap = {

/**
* An AssetArchive is an archive created from an in-memory collection of named assets or other archives.
* An {@link AssetArchive} is an archive created from an in-memory collection of
* named assets or other archives.
*/

@@ -31,4 +33,5 @@ export declare class AssetArchive extends Archive {

/**
* A FileArchive is a file-based archive, or a collection of file-based assets. This can be a raw directory or a
* single archive file in one of the supported formats (.tar, .tar.gz, or .zip).
* A {@link FileArchive} is a file-based archive, or a collection of file-based
* assets. This can be a raw directory or a single archive file in one of the
* supported formats (`.tar`, `.tar.gz`, or `.zip`).
*/

@@ -43,5 +46,7 @@ export declare class FileArchive extends Archive {

/**
* A RemoteArchive is a file-based archive fetched from a remote location. The URI's scheme dictates the
* protocol for fetching the archive's contents: `file://` is a local file (just like a FileArchive), `http://` and
* `https://` specify HTTP and HTTPS, respectively, and specific providers may recognize custom schemes.
* A {@link RemoteArchive} is a file-based archive fetched from a remote
* location. The URI's scheme dictates the protocol for fetching the archive's
* contents: `file://` is a local file (just like a {@link FileArchive}),
* `http://` and `https://` specify HTTP and HTTPS, respectively, and specific
* providers may recognize custom schemes.
*/

@@ -48,0 +53,0 @@ export declare class RemoteArchive extends Archive {

24

asset/archive.js

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

/**
* An Archive represents a collection of named assets.
* An {@link Archive} represents a collection of named assets.
*/

@@ -32,2 +32,3 @@ class Archive {

* A private field to help with RTTI that works in SxS scenarios.
*
* @internal

@@ -39,4 +40,5 @@ */

/**
* Returns true if the given object is an instance of an Archive. This is designed to work even when
* multiple copies of the Pulumi SDK have been loaded into the same process.
* Returns true if the given object is an {@link Archive}. This is designed
* to work even when multiple copies of the Pulumi SDK have been loaded into
* the same process.
*/

@@ -49,3 +51,4 @@ static isInstance(obj) {

/**
* An AssetArchive is an archive created from an in-memory collection of named assets or other archives.
* An {@link AssetArchive} is an archive created from an in-memory collection of
* named assets or other archives.
*/

@@ -60,4 +63,5 @@ class AssetArchive extends Archive {

/**
* A FileArchive is a file-based archive, or a collection of file-based assets. This can be a raw directory or a
* single archive file in one of the supported formats (.tar, .tar.gz, or .zip).
* A {@link FileArchive} is a file-based archive, or a collection of file-based
* assets. This can be a raw directory or a single archive file in one of the
* supported formats (`.tar`, `.tar.gz`, or `.zip`).
*/

@@ -72,5 +76,7 @@ class FileArchive extends Archive {

/**
* A RemoteArchive is a file-based archive fetched from a remote location. The URI's scheme dictates the
* protocol for fetching the archive's contents: `file://` is a local file (just like a FileArchive), `http://` and
* `https://` specify HTTP and HTTPS, respectively, and specific providers may recognize custom schemes.
* A {@link RemoteArchive} is a file-based archive fetched from a remote
* location. The URI's scheme dictates the protocol for fetching the archive's
* contents: `file://` is a local file (just like a {@link FileArchive}),
* `http://` and `https://` specify HTTP and HTTPS, respectively, and specific
* providers may recognize custom schemes.
*/

@@ -77,0 +83,0 @@ class RemoteArchive extends Archive {

/**
* Asset represents a single blob of text or data that is managed as a first class entity.
* {@link Asset} represents a single blob of text or data that is managed as a
* first-class entity.
*/
export declare abstract class Asset {
/**
* Returns true if the given object is an instance of an Asset. This is designed to work even when
* multiple copies of the Pulumi SDK have been loaded into the same process.
* Returns true if the given object is an {@link Asset}. This is designed to
* work even when multiple copies of the Pulumi SDK have been loaded into
* the same process.
*/

@@ -12,7 +14,5 @@ static isInstance(obj: any): obj is Asset;

/**
* Blob is a kind of asset produced from an in-memory blob represented as a byte array.
* {@link FileAsset} is a kind of asset produced from a given path to a file on
* the local filesystem.
*/
/**
* FileAsset is a kind of asset produced from a given path to a file on the local filesystem.
*/
export declare class FileAsset extends Asset {

@@ -26,3 +26,4 @@ /**

/**
* StringAsset is a kind of asset produced from an in-memory UTF8-encoded string.
* {@link StringAsset} is a kind of asset produced from an in-memory
* UTF8-encoded string.
*/

@@ -37,5 +38,7 @@ export declare class StringAsset extends Asset {

/**
* RemoteAsset is a kind of asset produced from a given URI string. The URI's scheme dictates the protocol for fetching
* contents: `file://` specifies a local file, `http://` and `https://` specify HTTP and HTTPS, respectively. Note that
* specific providers may recognize alternative schemes; this is merely the base-most set that all providers support.
* {@link RemoteAsset} is a kind of asset produced from a given URI string. The
* URI's scheme dictates the protocol for fetching contents: `file://` specifies
* a local file, `http://` and `https://` specify HTTP and HTTPS, respectively.
* Note that specific providers may recognize alternative schemes; this is
* merely the smallest set that all providers support.
*/

@@ -42,0 +45,0 @@ export declare class RemoteAsset extends Asset {

@@ -25,3 +25,4 @@ "use strict";

/**
* Asset represents a single blob of text or data that is managed as a first class entity.
* {@link Asset} represents a single blob of text or data that is managed as a
* first-class entity.
*/

@@ -32,2 +33,3 @@ class Asset {

* A private field to help with RTTI that works in SxS scenarios.
*
* @internal

@@ -39,4 +41,5 @@ */

/**
* Returns true if the given object is an instance of an Asset. This is designed to work even when
* multiple copies of the Pulumi SDK have been loaded into the same process.
* Returns true if the given object is an {@link Asset}. This is designed to
* work even when multiple copies of the Pulumi SDK have been loaded into
* the same process.
*/

@@ -49,14 +52,5 @@ static isInstance(obj) {

/**
* Blob is a kind of asset produced from an in-memory blob represented as a byte array.
* {@link FileAsset} is a kind of asset produced from a given path to a file on
* the local filesystem.
*/
/* IDEA: enable this once Uint8Array is supported.
export class Blob extends Asset {
constructor(data: Uint8Array) {
super();
}
}
*/
/**
* FileAsset is a kind of asset produced from a given path to a file on the local filesystem.
*/
class FileAsset extends Asset {

@@ -70,3 +64,4 @@ constructor(path) {

/**
* StringAsset is a kind of asset produced from an in-memory UTF8-encoded string.
* {@link StringAsset} is a kind of asset produced from an in-memory
* UTF8-encoded string.
*/

@@ -81,5 +76,7 @@ class StringAsset extends Asset {

/**
* RemoteAsset is a kind of asset produced from a given URI string. The URI's scheme dictates the protocol for fetching
* contents: `file://` specifies a local file, `http://` and `https://` specify HTTP and HTTPS, respectively. Note that
* specific providers may recognize alternative schemes; this is merely the base-most set that all providers support.
* {@link RemoteAsset} is a kind of asset produced from a given URI string. The
* URI's scheme dictates the protocol for fetching contents: `file://` specifies
* a local file, `http://` and `https://` specify HTTP and HTTPS, respectively.
* Note that specific providers may recognize alternative schemes; this is
* merely the smallest set that all providers support.
*/

@@ -86,0 +83,0 @@ class RemoteAsset extends Asset {

import { Inputs } from "../output";
import * as resource from "../resource";
/**
* CheckResult represents the results of a call to `ResourceProvider.check`.
* {@link CheckResult} represents the results of a call to {@link ResourceProvider.check}.
*/

@@ -17,3 +17,4 @@ export interface CheckResult<Inputs = any> {

/**
* CheckFailure represents a single failure in the results of a call to `ResourceProvider.check`
* {@link CheckFailure} represents a single failure in the results of a call to
* {@link ResourceProvider.check}.
*/

@@ -31,3 +32,4 @@ export interface CheckFailure {

/**
* DiffResult represents the results of a call to `ResourceProvider.diff`.
* {@link DiffResult} represents the results of a call to
* {@link ResourceProvider.diff}.
*/

@@ -48,4 +50,5 @@ export interface DiffResult {

/**
* If true, and a replacement occurs, the resource will first be deleted before being recreated. This is to
* void potential side-by-side issues with the default create before delete behavior.
* If true, and a replacement occurs, the resource will first be deleted
* before being recreated. This is to avoid potential side-by-side issues
* with the default create before delete behavior.
*/

@@ -55,3 +58,4 @@ readonly deleteBeforeReplace?: boolean;

/**
* CreateResult represents the results of a call to `ResourceProvider.create`.
* {@link CreateResult} represents the results of a call to
* {@link ResourceProvider.create}.
*/

@@ -68,2 +72,6 @@ export interface CreateResult<Outputs = any> {

}
/**
* {@link ReadResult} represents the results of a call to
* {@link ResourceProvider.read}.
*/
export interface ReadResult<Outputs = any> {

@@ -80,3 +88,4 @@ /**

/**
* UpdateResult represents the results of a call to `ResourceProvider.update`.
* {@link UpdateResult} represents the results of a call to
* {@link ResourceProvider.update}.
*/

@@ -90,45 +99,61 @@ export interface UpdateResult<Outputs = any> {

/**
* ResourceProvider represents an object that provides CRUD operations for a particular type of resource.
* {@link ResourceProvider} represents an object that provides CRUD operations
* for a particular type of resource.
*/
export interface ResourceProvider<Inputs = any, Outputs = any> {
/**
* Check validates that the given property bag is valid for a resource of the given type.
* Validates that the given property bag is valid for a resource of the given type.
*
* @param olds The old input properties to use for validation.
* @param news The new input properties to use for validation.
* @param olds
* The old input properties to use for validation.
* @param news
* The new input properties to use for validation.
*/
check?: (olds: Inputs, news: Inputs) => Promise<CheckResult<Inputs>>;
/**
* Diff checks what impacts a hypothetical update will have on the resource's properties.
* Checks what impacts a hypothetical update will have on the resource's
* properties.
*
* @param id The ID of the resource to diff.
* @param olds The old values of properties to diff.
* @param news The new values of properties to diff.
* @param id
* The ID of the resource to diff.
* @param olds
* The old values of properties to diff.
* @param news
* The new values of properties to diff.
*/
diff?: (id: resource.ID, olds: Outputs, news: Inputs) => Promise<DiffResult>;
/**
* Create allocates a new instance of the provided resource and returns its unique ID afterwards.
* If this call fails, the resource must not have been created (i.e., it is "transactional").
* Allocates a new instance of the provided resource and returns its unique
* ID afterwards. If this call fails, the resource must not have been
* created (i.e., it is "transactional").
*
* @param inputs The properties to set during creation.
* @param inputs
* The properties to set during creation.
*/
create: (inputs: Inputs) => Promise<CreateResult<Outputs>>;
/**
* Reads the current live state associated with a resource. Enough state must be included in the inputs to uniquely
* identify the resource; this is typically just the resource ID, but it may also include some properties.
* Reads the current live state associated with a resource. Enough state
* must be included in the inputs to uniquely identify the resource; this is
* typically just the resource ID, but it may also include some properties.
*/
read?: (id: resource.ID, props?: Outputs) => Promise<ReadResult<Outputs>>;
/**
* Update updates an existing resource with new values.
* Updates an existing resource with new values.
*
* @param id The ID of the resource to update.
* @param olds The old values of properties to update.
* @param news The new values of properties to update.
* @param id
* The ID of the resource to update.
* @param olds
* The old values of properties to update.
* @param news
* The new values of properties to update.
*/
update?: (id: resource.ID, olds: Outputs, news: Inputs) => Promise<UpdateResult<Outputs>>;
/**
* Delete tears down an existing resource with the given ID. If it fails, the resource is assumed to still exist.
* Tears down an existing resource with the given ID. If it fails,
* the resource is assumed to still exist.
*
* @param id The ID of the resource to delete.
* @param props The current properties on the resource.
* @param id
* The ID of the resource to delete.
* @param props
* The current properties on the resource.
*/

@@ -138,3 +163,4 @@ delete?: (id: resource.ID, props: Outputs) => Promise<void>;

/**
* Resource represents a Pulumi Resource that incorporates an inline implementation of the Resource's CRUD operations.
* {@link Resource} represents a Pulumi resource that incorporates an inline
* implementation of the Resource's CRUD operations.
*/

@@ -145,11 +171,17 @@ export declare abstract class Resource extends resource.CustomResource {

*
* @param provider The implementation of the resource's CRUD operations.
* @param name The name of the resource.
* @param props The arguments to use to populate the new resource. Must not define the reserved
* property "__provider".
* @param opts A bag of options that control this resource's behavior.
* @param module The module of the resource.
* @param type The type of the resource.
* @param provider
* The implementation of the resource's CRUD operations.
* @param name
* The name of the resource.
* @param props
* The arguments to use to populate the new resource. Must not define the
* reserved property "__provider".
* @param opts
* A bag of options that control this resource's behavior.
* @param module
* The module of the resource.
* @param type
* The type of the resource.
*/
constructor(provider: ResourceProvider, name: string, props: Inputs, opts?: resource.CustomResourceOptions, module?: string, type?: string);
}

@@ -55,3 +55,4 @@ "use strict";

/**
* Resource represents a Pulumi Resource that incorporates an inline implementation of the Resource's CRUD operations.
* {@link Resource} represents a Pulumi resource that incorporates an inline
* implementation of the Resource's CRUD operations.
*/

@@ -62,9 +63,15 @@ class Resource extends resource.CustomResource {

*
* @param provider The implementation of the resource's CRUD operations.
* @param name The name of the resource.
* @param props The arguments to use to populate the new resource. Must not define the reserved
* property "__provider".
* @param opts A bag of options that control this resource's behavior.
* @param module The module of the resource.
* @param type The type of the resource.
* @param provider
* The implementation of the resource's CRUD operations.
* @param name
* The name of the resource.
* @param props
* The arguments to use to populate the new resource. Must not define the
* reserved property "__provider".
* @param opts
* A bag of options that control this resource's behavior.
* @param module
* The module of the resource.
* @param type
* The type of the resource.
*/

@@ -71,0 +78,0 @@ constructor(provider, name, props, opts, module, type = "Resource") {

import { Resource } from "./resource";
/**
* RunError can be used for terminating a program abruptly, but resulting in a clean exit rather
* than the usual verbose unhandled error logic which emits the source program text and complete
* stack trace. This type should be rarely used. Ideally ResourceError should always be used so
* that as many errors as possible can be associated with a Resource.
* {@link RunError} can be used for terminating a program abruptly, but
* resulting in a clean exit rather than the usual verbose unhandled error logic
* which emits the source program text and complete stack trace. This type
* should be rarely used. Ideally {@link ResourceError} should always be used so
* that as many errors as possible can be associated with a resource.
*/
export declare class RunError extends Error {
/**
* Returns true if the given object is an instance of a RunError. This is designed to work even when
* multiple copies of the Pulumi SDK have been loaded into the same process.
* Returns true if the given object is a {@link RunError}. This is designed
* to work even when multiple copies of the Pulumi SDK have been loaded into
* the same process.
*/

@@ -16,6 +18,7 @@ static isInstance(obj: any): obj is RunError;

/**
* ResourceError can be used for terminating a program abruptly, specifically associating the
* problem with a Resource. Depending on the nature of the problem, clients can choose whether or
* not a call stack should be returned as well. This should be very rare, and would only indicate
* no usefulness of presenting that stack to the user.
* {@link ResourceError} can be used for terminating a program abruptly,
* specifically associating the problem with a {@link Resource}. Depending on
* the nature of the problem, clients can choose whether or not the call stack
* should be hidden as well. This should be very rare, and would only indicate
* that presenting the stack to the user would not be useful/be detrimental.
*/

@@ -26,4 +29,5 @@ export declare class ResourceError extends Error {

/**
* Returns true if the given object is an instance of a ResourceError. This is designed to work even when
* multiple copies of the Pulumi SDK have been loaded into the same process.
* Returns true if the given object is a {@link ResourceError}. This is
* designed to work even when multiple copies of the Pulumi SDK have been
* loaded into the same process.
*/

@@ -30,0 +34,0 @@ static isInstance(obj: any): obj is ResourceError;

@@ -26,6 +26,7 @@ "use strict";

/**
* RunError can be used for terminating a program abruptly, but resulting in a clean exit rather
* than the usual verbose unhandled error logic which emits the source program text and complete
* stack trace. This type should be rarely used. Ideally ResourceError should always be used so
* that as many errors as possible can be associated with a Resource.
* {@link RunError} can be used for terminating a program abruptly, but
* resulting in a clean exit rather than the usual verbose unhandled error logic
* which emits the source program text and complete stack trace. This type
* should be rarely used. Ideally {@link ResourceError} should always be used so
* that as many errors as possible can be associated with a resource.
*/

@@ -37,2 +38,3 @@ class RunError extends Error {

* A private field to help with RTTI that works in SxS scenarios.
*
* @internal

@@ -44,4 +46,5 @@ */

/**
* Returns true if the given object is an instance of a RunError. This is designed to work even when
* multiple copies of the Pulumi SDK have been loaded into the same process.
* Returns true if the given object is a {@link RunError}. This is designed
* to work even when multiple copies of the Pulumi SDK have been loaded into
* the same process.
*/

@@ -54,6 +57,7 @@ static isInstance(obj) {

/**
* ResourceError can be used for terminating a program abruptly, specifically associating the
* problem with a Resource. Depending on the nature of the problem, clients can choose whether or
* not a call stack should be returned as well. This should be very rare, and would only indicate
* no usefulness of presenting that stack to the user.
* {@link ResourceError} can be used for terminating a program abruptly,
* specifically associating the problem with a {@link Resource}. Depending on
* the nature of the problem, clients can choose whether or not the call stack
* should be hidden as well. This should be very rare, and would only indicate
* that presenting the stack to the user would not be useful/be detrimental.
*/

@@ -67,2 +71,3 @@ class ResourceError extends Error {

* A private field to help with RTTI that works in SxS scenarios.
*
* @internal

@@ -74,4 +79,5 @@ */

/**
* Returns true if the given object is an instance of a ResourceError. This is designed to work even when
* multiple copies of the Pulumi SDK have been loaded into the same process.
* Returns true if the given object is a {@link ResourceError}. This is
* designed to work even when multiple copies of the Pulumi SDK have been
* loaded into the same process.
*/

@@ -78,0 +84,0 @@ static isInstance(obj) {

import { ProviderResource, Resource } from "./resource";
/**
* {@link InvokeOptions} is a bag of options that control the behavior of a call
* to `runtime.invoke`.
*/
export interface InvokeOptions {

@@ -13,4 +17,4 @@ /**

/**
* An optional version, corresponding to the version of the provider plugin that should be used when performing this
* invoke.
* An optional version, corresponding to the version of the provider plugin
* that should be used when performing this invoke.
*/

@@ -17,0 +21,0 @@ version?: string;

import { Input, Output } from "../output";
/**
* toObject takes an array of T values, and a selector that produces key/value pairs from those inputs,
* and converts this array into an output object with those keys and values.
* {@link toObject} takes an array of T values, and a selector that produces
* key/value pairs from those inputs, and converts this array into an output
* object with those keys and values.
*

@@ -19,5 +20,6 @@ * For instance, given an array as follows

/**
* groupBy takes an array of T values, and a selector that prduces key/value pairs from those inputs,
* and converts this array into an output object, with those keys, and where each property is an array of values,
* in the case that the same key shows up multiple times in the input.
* {@link groupBy} takes an array of T values, and a selector that prduces
* key/value pairs from those inputs, and converts this array into an output
* object, with those keys, and where each property is an array of values, in
* the case that the same key shows up multiple times in the input.
*

@@ -24,0 +26,0 @@ * For instance, given an array as follows

@@ -18,4 +18,5 @@ "use strict";

/**
* toObject takes an array of T values, and a selector that produces key/value pairs from those inputs,
* and converts this array into an output object with those keys and values.
* {@link toObject} takes an array of T values, and a selector that produces
* key/value pairs from those inputs, and converts this array into an output
* object with those keys and values.
*

@@ -48,5 +49,6 @@ * For instance, given an array as follows

/**
* groupBy takes an array of T values, and a selector that prduces key/value pairs from those inputs,
* and converts this array into an output object, with those keys, and where each property is an array of values,
* in the case that the same key shows up multiple times in the input.
* {@link groupBy} takes an array of T values, and a selector that prduces
* key/value pairs from those inputs, and converts this array into an output
* object, with those keys, and where each property is an array of values, in
* the case that the same key shows up multiple times in the input.
*

@@ -53,0 +55,0 @@ * For instance, given an array as follows

import * as resourceTypes from "../resource";
/**
* hasErrors returns true if any errors have occurred in the program.
* Returns true if any errors have occurred in the program.
*/
export declare function hasErrors(): boolean;
/**
* debug logs a debug-level message that is generally hidden from end-users.
* Logs a debug-level message that is generally hidden from end-users.
*/
export declare function debug(msg: string, resource?: resourceTypes.Resource, streamId?: number, ephemeral?: boolean): Promise<void>;
/**
* info logs an informational message that is generally printed to stdout during resource operations.
* Logs an informational message that is generally printed to standard output
* during resource operations.
*/
export declare function info(msg: string, resource?: resourceTypes.Resource, streamId?: number, ephemeral?: boolean): Promise<void>;
/**
* warn logs a warning to indicate that something went wrong, but not catastrophically so.
* Logs a warning to indicate that something went wrong, but not
* catastrophically so.
*/
export declare function warn(msg: string, resource?: resourceTypes.Resource, streamId?: number, ephemeral?: boolean): Promise<void>;
/**
* error logs a fatal condition. Consider raising an exception after calling error to stop the Pulumi program.
* Logs a fatal condition. Consider raising an exception after calling error to
* stop the Pulumi program.
*/
export declare function error(msg: string, resource?: resourceTypes.Resource, streamId?: number, ephemeral?: boolean): Promise<void>;

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

/**
* hasErrors returns true if any errors have occurred in the program.
* Returns true if any errors have occurred in the program.
*/

@@ -42,3 +42,3 @@ function hasErrors() {

/**
* debug logs a debug-level message that is generally hidden from end-users.
* Logs a debug-level message that is generally hidden from end-users.
*/

@@ -56,3 +56,4 @@ function debug(msg, resource, streamId, ephemeral) {

/**
* info logs an informational message that is generally printed to stdout during resource operations.
* Logs an informational message that is generally printed to standard output
* during resource operations.
*/

@@ -71,3 +72,4 @@ function info(msg, resource, streamId, ephemeral) {

/**
* warn logs a warning to indicate that something went wrong, but not catastrophically so.
* Logs a warning to indicate that something went wrong, but not
* catastrophically so.
*/

@@ -86,3 +88,4 @@ function warn(msg, resource, streamId, ephemeral) {

/**
* error logs a fatal condition. Consider raising an exception after calling error to stop the Pulumi program.
* Logs a fatal condition. Consider raising an exception after calling error to
* stop the Pulumi program.
*/

@@ -89,0 +92,0 @@ function error(msg, resource, streamId, ephemeral) {

/**
* getOrganization returns the current organization name.
* Returns the current organization name.
*/
export declare function getOrganization(): string;
/**
* getProject returns the current project name. It throws an exception if none is registered.
* Returns the current project name. Throws an exception if none is registered.
*/
export declare function getProject(): string;
/**
* getStack returns the current stack name. It throws an exception if none is registered.
* Returns the current stack name. Throws an exception if none is registered.
*/
export declare function getStack(): string;

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

/**
* getOrganization returns the current organization name.
* Returns the current organization name.
*/

@@ -34,3 +34,3 @@ function getOrganization() {

/**
* getProject returns the current project name. It throws an exception if none is registered.
* Returns the current project name. Throws an exception if none is registered.
*/

@@ -42,3 +42,3 @@ function getProject() {

/**
* getStack returns the current stack name. It throws an exception if none is registered.
* Returns the current stack name. Throws an exception if none is registered.
*/

@@ -45,0 +45,0 @@ function getStack() {

import { Resource } from "./resource";
/**
* [output] takes any Input value and converts it into an Output, deeply unwrapping nested Input
* values as necessary.
* @Internal
*/
export declare function getAllResources<T>(op: OutputInstance<T>): Promise<Set<Resource>>;
/**
* {@link output} takes any {@link Input} value and converts it into an
* {@link Output}, deeply unwrapping nested {@link Input} values as necessary.
*

@@ -22,3 +26,4 @@ * The expected way to use this function is like so:

/**
* [secret] behaves the same as [output] except the returned output is marked as containing sensitive data.
* {@link secret} behaves the same as {@link output} except the returned output
* is marked as containing sensitive data.
*/

@@ -28,12 +33,15 @@ export declare function secret<T>(val: Input<T>): Output<Unwrap<T>>;

/**
* [unsecret] behaves the same as [output] except the returned output takes the existing output and unwraps the secret
* {@link unsecret} behaves the same as {@link output} except the returned
* output takes the existing output and unwraps the secret.
*/
export declare function unsecret<T>(val: Output<T>): Output<T>;
/**
* [isSecret] returns `true` if and only if the provided [Output] is a secret.
* {@link isSecret} returns `true` if and only if the provided {@link Output} is
* a secret.
*/
export declare function isSecret<T>(val: Output<T>): Promise<boolean>;
/**
* Allows for multiple Output objects to be combined into a single Output object. The single Output
* will depend on the union of Resources that the individual dependencies depend on.
* Allows for multiple {@link Output} objects to be combined into a single
* {@link Output} object. The single {@link Output} will depend on the union of
* {@link Resources} that the individual dependencies depend on.
*

@@ -49,4 +57,4 @@ * This can be used in the following manner:

*
* In this example, taking a dependency on d3 means a resource will depend on all the resources of
* d1 and d2.
* In this example, taking a dependency on `d3` means a resource will depend on
* all the resources of `d1` and `d2`.
*/

@@ -63,22 +71,25 @@ export declare function all<T>(val: Record<string, Input<T>>): Output<Record<string, Unwrap<T>>>;

/**
* isUnknown returns true if the given value is unknown.
* Returns true if the given value is unknown.
*/
export declare function isUnknown(val: any): boolean;
/**
* containsUnknowns returns true if the given value is or contains unknown values.
* Returns true if the given value is or contains unknown values.
*/
export declare function containsUnknowns(value: any): boolean;
/**
* [Input] is a property input for a resource. It may be a promptly available T, a promise for one,
* or the output from a existing Resource.
* {@link Input} is a property input for a resource. It may be a promptly
* available `T`, a promise for one, or the {@link Output} from a existing
* {@link Resource}.
*/
export declare type Input<T> = T | Promise<T> | OutputInstance<T>;
/**
* [Inputs] is a map of property name to property input, one for each resource property value.
* {@link Inputs} is a map of property name to property input, one for each
* resource property value.
*/
export declare type Inputs = Record<string, Input<any>>;
/**
* The 'Unwrap' type allows us to express the operation of taking a type, with potentially deeply
* nested Promises and Outputs and to then get that same type with all the Promises and Outputs
* replaced with their wrapped type. Note that this Unwrapping is 'deep'. So if you had:
* The {@link Unwrap} type allows us to express the operation of taking a type,
* with potentially deeply nested {@link Promise}s and {@link Output}s and to
* then get that same type with all the promises and outputs replaced with their
* wrapped type. Note that this unwrapping is "deep". So if you had:
*

@@ -91,14 +102,16 @@ * `type X = { A: Promise<{ B: Output<{ c: Input<boolean> }> }> }`

*
* Unwrapping sees through Promises, Outputs, Arrays and Objects.
* Unwrapping sees through promises, outputs, arrays and objects.
*
* Note: due to TypeScript limitations there are some things that cannot be expressed. Specifically,
* if you had a `Promise<Output<T>>` then the Unwrap type would not be able to undo both of those
* wraps. In practice that should be ok. Values in an object graph should not wrap Outputs in
* Promises. Instead, any code that needs to work Outputs and also be async should either create
* the Output with the Promise (which will collapse into just an Output). Or, it should start with
* an Output and call [apply] on it, passing in an async function. This will also collapse and just
* produce an Output.
* Note: due to TypeScript limitations there are some things that cannot be
* expressed. Specifically, if you had a `Promise<Output<T>>` then the {@link
* Unwrap} type would not be able to undo both of those wraps. In practice that
* should be OK. Values in an object graph should not wrap outputs in promises.
* Instead, any code that needs to work Outputs and also be async should either
* create the output with the promise (which will collapse into just an output).
* Or, it should start with an output and call `apply` on it, passing in an
* `async` function. This will also collapse and just produce an output.
*
* In other words, this should not be used as the shape of an object: `{ a: Promise<Output<...>> }`.
* It should always either be `{ a: Promise<NonOutput> }` or just `{ a: Output<...> }`.
* In other words, this should not be used as the shape of an object: `{ a:
* Promise<Output<...>> }`. It should always either be `{ a: Promise<NonOutput>
* }` or just `{ a: Output<...> }`.
*/

@@ -116,14 +129,16 @@ export declare type Unwrap<T> = T extends Promise<infer U1> ? UnwrapSimple<U1> : T extends OutputInstance<infer U2> ? UnwrapSimple<U2> : UnwrapSimple<T>;

/**
* Instance side of the [Output<T>] type. Exposes the deployment-time and run-time mechanisms
* for working with the underlying value of an [Output<T>].
* Instance side of the {@link Output} type. Exposes the deployment-time and
* run-time mechanisms for working with the underlying value of an {@link Output}.
*/
export interface OutputInstance<T> {
/**
* Transforms the data of the output with the provided func. The result remains a
* Output so that dependent resources can be properly tracked.
* Transforms the data of the output with the provided `func`. The result
* remains an {@link Output} so that dependent resources can be properly
* tracked.
*
* 'func' is not allowed to make resources.
* `func` is not allowed to make resources.
*
* 'func' can return other Outputs. This can be handy if you have a Output<SomeVal>
* and you want to get a transitive dependency of it. i.e.
* `func` can return other {@link Output}s. This can be handy if you have an
* `Output<SomeVal>` and you want to get a transitive dependency of it,
* i.e.
*

@@ -135,13 +150,16 @@ * ```ts

*
* In this example, taking a dependency on d2 means a resource will depend on all the resources
* of d1. It will *also* depend on the resources of v.x.y.OtherDep.
* In this example, taking a dependency on `d2` means a resource will depend
* on all the resources of `d1`. It will *also* depend on the resources of
* `v.x.y.OtherDep`.
*
* Importantly, the Resources that d2 feels like it will depend on are the same resources as d1.
* If you need have multiple Outputs and a single Output is needed that combines both
* set of resources, then 'pulumi.all' should be used instead.
* Importantly, the resources that `d2` feels like it will depend on are the
* same resources as `d1`. If you need have multiple outputs and a single
* output is needed that combines both set of resources, then `pulumi.all`
* should be used instead.
*
* This function will be called execution of a 'pulumi up' or 'pulumi preview' request, but it
* will ont run when the values of the output are unknown. It is not
* available for functions that end up executing in the cloud during runtime. To get the value
* of the Output during cloud runtime execution, use `get()`.
* This function will be called during the execution of a `pulumi up` or
* `pulumi preview` operation, but it will not run when the values of the
* output are unknown. It is not available for functions that end up
* executing in the cloud during runtime. To get the value of the Output
* during cloud runtime execution, use `get()`.
*/

@@ -154,7 +172,8 @@ apply<U>(func: (t: T) => Promise<U>): Output<U>;

*
* This function is only callable in code that runs in the cloud post-deployment. At this
* point all Output values will be known and can be safely retrieved. During pulumi deployment
* or preview execution this must not be called (and will throw). This is because doing so
* would allow Output values to flow into Resources while losing the data that would allow
* the dependency graph to be changed.
* This function is only callable in code that runs in the cloud
* post-deployment. At this point all {@link Output} values will be known
* and can be safely retrieved. During Pulumi deployment or preview
* execution this must not be called (and will throw). This is because doing
* so would allow output values to flow into resources while losing the data
* that would allow the dependency graph to be changed.
*/

@@ -164,4 +183,4 @@ get(): T;

/**
* Static side of the [Output<T>] type. Can be used to [create] Outputs as well as test
* arbitrary values to see if they are [Output]s.
* Static side of the {@link Output} type. Can be used to create outputs as well
* as test arbitrary values to see if they are {@link Output}s.
*/

@@ -174,26 +193,30 @@ export interface OutputConstructor {

/**
* [Output] helps encode the relationship between Resources in a Pulumi application. Specifically an
* [Output] holds onto a piece of Data and the Resource it was generated from. An [Output] value can
* then be provided when constructing new Resources, allowing that new Resource to know both the
* value as well as the Resource the value came from. This allows for a precise 'Resource
* dependency graph' to be created, which properly tracks the relationship between resources.
* {@link Output} helps encode the relationship between {@link Resource}s in a
* Pulumi application. Specifically, an {@link Output} holds onto a piece of
* data and the resource it was generated from. An output value can then be
* provided when constructing new resources, allowing that new resource to know
* both the value as well as the resource the value came from. This allows for
* a precise resource dependency graph to be created, which properly tracks the
* relationship between resources.
*
* An [Output] is used in a Pulumi program differently depending on if the application is executing
* at 'deployment time' (i.e. when actually running the 'pulumi' executable), or at 'run time' (i.e.
* a piece of code running in some Cloud).
* An output is used in a Pulumi program differently depending on if the
* application is executing at "deployment time" (i.e. when actually running the
* `pulumi` executable), or at "run time" (i.e. a piece of code running in some
* cloud).
*
* At 'deployment time', the correct way to work with the underlying value is to call
* [Output.apply(func)]. This allows the value to be accessed and manipulated, while still
* resulting in an [Output] that is keeping track of [Resource]s appropriately. At deployment time
* the underlying value may or may not exist (for example, if a preview is being performed). In
* this case, the 'func' callback will not be executed, and calling [.apply] will immediately return
* an [Output] that points to the [undefined] value. During a normal [update] though, the 'func'
* callbacks should always be executed.
* At "deployment time", the correct way to work with the underlying value is to
* call {@link Output.apply}. This allows the value to be accessed and
* manipulated, while still resulting in an output that is keeping track of
* {@link Resource}s appropriately. At deployment time the underlying value may
* or may not exist (for example, if a preview is being performed). In this
* case, the `func` callback will not be executed, and calling `.apply` will
* immediately return an output that points to the `undefined` value. During a
* normal update though, the `func` callbacks should always be executed.
*
* At 'run time', the correct way to work with the underlying value is to simply call [Output.get]
* which will be promptly return the entire value. This will be a simple JavaScript object that can
* be manipulated as necessary.
* At "run time", the correct way to work with the underlying value is to simply
* call {@link Output.get} which will be promptly return the entire value. This
* will be a simple JavaScript object that can be manipulated as necessary.
*
* To ease with using [Output]s at 'deployment time', pulumi will 'lift' simple data properties of
* an underlying value to the [Output] itself. For example:
* To ease with using outputs at deployment time, Pulumi will "lift" simple data
* properties of an underlying value to the output itself. For example:
*

@@ -219,5 +242,6 @@ * ```ts

/**
* The [Lifted] type allows us to express the operation of taking a type, with potentially deeply
* nested objects and arrays and to then get a type with the same properties, except whose property
* types are now [Output]s of the original property type.
* The {@link Lifted} type allows us to express the operation of taking a type,
* with potentially deeply nested objects and arrays and to then get a type with
* the same properties, except whose property types are now {@link Output}s of the
* original property type.
*

@@ -233,8 +257,9 @@ * For example:

*
* [Lifted] is somewhat the opposite of [Unwrap]. It's primary purpose is to allow an instance of
* [Output<SomeType>] to provide simple access to the properties of [SomeType] directly on the instance
* itself (instead of haveing to use [.apply]).
* {@link Lifted} is somewhat the opposite of {@link Unwrap}. Its primary
* purpose is to allow an instance of `Output<SomeType>` to provide simple
* access to the properties of `SomeType` directly on the instance itself
* (instead of haveing to use {@link Output.apply}).
*
* This lifting only happens through simple pojo objects and arrays. Functions, for example, are not
* lifted. So you cannot do:
* This lifting only happens through simple objects and arrays. Functions, for
* example, are not lifted. So you cannot do:
*

@@ -269,5 +294,6 @@ * ```ts

/**
* [concat] takes a sequence of [Inputs], stringifies each, and concatenates all values into one
* final string. Individual inputs can be any sort of [Input] value. i.e. they can be [Promise]s,
* [Output]s, or just plain JavaScript values. This can be used like so:
* {@link concat} takes a sequence of {@link Input}s, stringifies each one, and
* concatenates all values into one final string. Individual inputs can be any
* sort of input value: they can be promises, outputs, or just plain JavaScript
* values. Use this function like so:
*

@@ -282,4 +308,4 @@ * ```ts

/**
* [interpolate] is similar to [concat] but is designed to be used as a tagged template expression.
* i.e.:
* {@link interpolate} is similar to {@link concat} but is designed to be used
* as a tagged template expression, e.g.:
*

@@ -291,14 +317,16 @@ * ```ts

*
* As with [concat] the 'placeholders' between `${}` can be any Inputs. i.e. they can be
* [Promise]s, [Output]s, or just plain JavaScript values.
* As with {@link concat}, the placeholders between `${}` can be any
* {@link Input}s: promises, outputs, or just plain JavaScript values.
*/
export declare function interpolate(literals: TemplateStringsArray, ...placeholders: Input<any>[]): Output<string>;
/**
* [jsonStringify] Uses JSON.stringify to serialize the given Input value into a JSON string.
* {@link jsonStringify} uses {@link JSON.stringify} to serialize the given
* {@link Input} value into a JSON string.
*/
export declare function jsonStringify(obj: Input<any>, replacer?: (this: any, key: string, value: any) => any | (number | string)[], space?: string | number): Output<string>;
/**
* [jsonParse] Uses JSON.parse to deserialize the given Input JSON string into a value.
* {@link jsonParse} Uses {@link JSON.parse} to deserialize the given {@link
* Input} JSON string into a value.
*/
export declare function jsonParse(text: Input<string>, reviver?: (this: any, key: string, value: any) => any): Output<any>;
export {};

@@ -36,10 +36,14 @@ "use strict";

/**
* Output helps encode the relationship between Resources in a Pulumi application. Specifically an
* Output holds onto a piece of Data and the Resource it was generated from. An Output value can
* then be provided when constructing new Resources, allowing that new Resource to know both the
* value as well as the Resource the value came from. This allows for a precise 'Resource
* dependency graph' to be created, which properly tracks the relationship between resources.
* {@link Output} helps encode the relationship between {@link Resource}s in a
* Pulumi application. Specifically, an {@link Output} holds onto a piece of
* data and the resource it was generated from. An output value can then be
* provided when constructing new resources, allowing that new resource to know
* both the value as well as the resource the value came from. This allows for
* a precise resource dependency graph to be created, which properly tracks the
* relationship between resources.
*/
class OutputImpl {
/** @internal */
/**
* @internal
*/
constructor(resources, promise, isKnown, isSecret, allResources) {

@@ -50,2 +54,3 @@ /**

* This is internal instead of being truly private, to support mixins and our serialization model.
*
* @internal

@@ -170,4 +175,5 @@ */

/**
* Returns true if the given object is an instance of Output<T>. This is designed to work even when
* multiple copies of the Pulumi SDK have been loaded into the same process.
* Returns true if the given object is an {@link Output}. This is designed
* to work even when multiple copies of the Pulumi SDK have been loaded into
* the same process.
*/

@@ -177,3 +183,5 @@ static isInstance(obj) {

}
/** @internal */
/**
* @internal
*/
static getPromisedValue(promise, withUnknowns) {

@@ -210,3 +218,5 @@ return __awaiter(this, void 0, void 0, function* () {

}
/** @internal */
/**
* @Internal
*/
function getAllResources(op) {

@@ -278,7 +288,9 @@ return op.allResources instanceof Function ? op.allResources() : Promise.resolve(op.resources());

/**
* Returns a promise denoting if the output is a secret or not. This is not the same as just calling `.isSecret`
* because in cases where the output does not have a `isSecret` property and it is a Proxy, we need to ignore
* the isSecret member that the proxy reports back.
* Returns a promise denoting if the output is a secret or not. This is not the
* same as just calling `.isSecret` because in cases where the output does not
* have a `isSecret` property and it is a Proxy, we need to ignore the `isSecret`
* member that the proxy reports back.
*
* This calls the public implementation so that we only make any calculations in a single place.
* This calls the public implementation so that we only make any calculations in
* a single place.
*

@@ -292,16 +304,20 @@ * @internal

/**
* Helper function for `output`. This function trivially recurses through an object, copying it,
* while also lifting any inner Outputs (with all their respective state) to a top-level Output at
* the end. If there are no inner outputs, this will not affect the data (except by producing a new
* copy of it).
* Helper function for {@link output}. This function trivially recurses through
* an object, copying it, while also lifting any inner {@link Outputs} (with all
* their respective state) to a top-level output at the end. If there are no
* inner outputs, this will not affect the data (except by producing a new copy
* of it).
*
* Importantly:
*
* 1. Resources encountered while recursing are not touched. This helps ensure they stay Resources
* (with an appropriate prototype chain).
* 1. Resources encountered while recursing are not touched. This helps ensure
* they stay Resources (with an appropriate prototype chain).
*
* 2. Primitive values (string, number, etc.) are returned as is.
* 3. Arrays and Record are recursed into. An Array<...> that contains any Outputs wil become an
* Output<Array<Unwrapped>>. A Record<string, ...> that contains any Output values will be an
* Output<Record<string, Unwrap<...>>. In both cases of recursion, the outer Output's
* known/secret/resources will be computed from the nested Outputs.
*
* 3. Arrays and records are recursed into. An `Array<...>` that contains any
* `Outputs` wil become an `Output<Array<Unwrapped>>`. A `Record<string, ...>`
* that contains any output values will be an `Output<Record<string Unwrap<...>>`.
* In both cases of recursion, the outer output's known/secret/resources
* will be computed from the nested Outputs.
*/

@@ -404,3 +420,4 @@ function outputRec(val) {

/**
* [unsecret] behaves the same as [output] except the returned output takes the existing output and unwraps the secret
* {@link unsecret} behaves the same as {@link output} except the returned
* output takes the existing output and unwraps the secret.
*/

@@ -412,3 +429,4 @@ function unsecret(val) {

/**
* [isSecret] returns `true` if and only if the provided [Output] is a secret.
* {@link isSecret} returns `true` if and only if the provided {@link Output} is
* a secret.
*/

@@ -483,8 +501,11 @@ function isSecret(val) {

/**
* Unknown represents a value that is unknown. These values correspond to unknown property values received from the
* Pulumi engine as part of the result of a resource registration (see runtime/rpc.ts). User code is not typically
* exposed to these values: any Output<> that contains an Unknown will itself be unknown, so any user callbacks
* passed to `apply` will not be run. Internal callers of `apply` can request that they are run even with unknown
* values; the output proxy takes advantage of this to allow proxied property accesses to return known values even
* if other properties of the containing object are unknown.
* Unknown represents a value that is unknown. These values correspond to
* unknown property values received from the Pulumi engine as part of the result
* of a resource registration (see `runtime/rpc.ts`). User code is not typically
* exposed to these values: any {@link Output} that contains an {@link Unknown}
* will itself be unknown, so any user callbacks passed to `apply` will not be
* run. Internal callers of `apply` can request that they are run even with
* unknown values; the output proxy takes advantage of this to allow proxied
* property accesses to return known values even if other properties of the
* containing object are unknown.
*/

@@ -497,2 +518,3 @@ class Unknown {

* This is internal instead of being truly private, to support mixins and our serialization model.
*
* @internal

@@ -504,4 +526,5 @@ */

/**
* Returns true if the given object is an instance of Unknown. This is designed to work even when
* multiple copies of the Pulumi SDK have been loaded into the same process.
* Returns true if the given object is an {@link Unknown}. This is designed
* to work even when multiple copies of the Pulumi SDK have been loaded into
* the same process.
*/

@@ -513,3 +536,4 @@ static isInstance(obj) {

/**
* unknown is the singleton unknown value.
* {@link unknown} is the singleton {@link Unknown} value.
*
* @internal

@@ -519,3 +543,3 @@ */

/**
* isUnknown returns true if the given value is unknown.
* Returns true if the given value is unknown.
*/

@@ -527,3 +551,3 @@ function isUnknown(val) {

/**
* containsUnknowns returns true if the given value is or contains unknown values.
* Returns true if the given value is or contains unknown values.
*/

@@ -555,5 +579,6 @@ function containsUnknowns(value) {

/**
* [concat] takes a sequence of [Inputs], stringifies each, and concatenates all values into one
* final string. Individual inputs can be any sort of [Input] value. i.e. they can be [Promise]s,
* [Output]s, or just plain JavaScript values. This can be used like so:
* {@link concat} takes a sequence of {@link Input}s, stringifies each one, and
* concatenates all values into one final string. Individual inputs can be any
* sort of input value: they can be promises, outputs, or just plain JavaScript
* values. Use this function like so:
*

@@ -571,4 +596,4 @@ * ```ts

/**
* [interpolate] is similar to [concat] but is designed to be used as a tagged template expression.
* i.e.:
* {@link interpolate} is similar to {@link concat} but is designed to be used
* as a tagged template expression, e.g.:
*

@@ -580,4 +605,4 @@ * ```ts

*
* As with [concat] the 'placeholders' between `${}` can be any Inputs. i.e. they can be
* [Promise]s, [Output]s, or just plain JavaScript values.
* As with {@link concat}, the placeholders between `${}` can be any
* {@link Input}s: promises, outputs, or just plain JavaScript values.
*/

@@ -599,3 +624,4 @@ function interpolate(literals, ...placeholders) {

/**
* [jsonStringify] Uses JSON.stringify to serialize the given Input value into a JSON string.
* {@link jsonStringify} uses {@link JSON.stringify} to serialize the given
* {@link Input} value into a JSON string.
*/

@@ -609,3 +635,4 @@ function jsonStringify(obj, replacer, space) {

/**
* [jsonParse] Uses JSON.parse to deserialize the given Input JSON string into a value.
* {@link jsonParse} Uses {@link JSON.parse} to deserialize the given {@link
* Input} JSON string into a value.
*/

@@ -612,0 +639,0 @@ function jsonParse(text, reviver) {

{
"name": "@pulumi/pulumi",
"version": "3.124.0",
"version": "3.124.1-alpha.x26ff819",
"description": "Pulumi's Node.js SDK",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -27,3 +27,5 @@ "use strict";

// arguments. We ignore these for the moment.
/** @internal */
/**
* @internal
*/
function parseArgs(args) {

@@ -30,0 +32,0 @@ const cleanArgs = [];

import { Input, Inputs } from "../output";
import * as resource from "../resource";
/**
* CheckResult represents the results of a call to `ResourceProvider.check`.
* {@link CheckResult} represents the results of a call to
* {@link ResourceProvider.check}.
*/

@@ -17,3 +18,4 @@ export interface CheckResult {

/**
* CheckFailure represents a single failure in the results of a call to `ResourceProvider.check`
* {@link CheckFailure} represents a single failure in the results of a call to
* {@link ResourceProvider.check}.
*/

@@ -31,3 +33,4 @@ export interface CheckFailure {

/**
* DiffResult represents the results of a call to `ResourceProvider.diff`.
* {@link DiffResult} represents the results of a call to
* {@link ResourceProvider.diff}.
*/

@@ -48,4 +51,5 @@ export interface DiffResult {

/**
* If true, and a replacement occurs, the resource will first be deleted before being recreated. This is to
* avoid potential side-by-side issues with the default create before delete behavior.
* If true, and a replacement occurs, the resource will first be deleted
* before being recreated. This is to avoid potential side-by-side issues
* with the default create before delete behavior.
*/

@@ -55,3 +59,4 @@ readonly deleteBeforeReplace?: boolean;

/**
* CreateResult represents the results of a call to `ResourceProvider.create`.
* {@link CreateResult} represents the results of a call to
* {@link ResourceProvider.create}.
*/

@@ -68,2 +73,6 @@ export interface CreateResult {

}
/**
* {@link ReadResult} represents the results of a call to
* {@link ResourceProvider.read}.
*/
export interface ReadResult {

@@ -84,3 +93,4 @@ /**

/**
* UpdateResult represents the results of a call to `ResourceProvider.update`.
* {@link UpdateResult} represents the results of a call to
* {@link ResourceProvider.update}.
*/

@@ -94,3 +104,4 @@ export interface UpdateResult {

/**
* ConstructResult represents the results of a call to `ResourceProvider.construct`.
* {@link ConstructResult} represents the results of a call to
* {@link ResourceProvider.construct}.
*/

@@ -108,3 +119,4 @@ export interface ConstructResult {

/**
* InvokeResult represents the results of a call to `ResourceProvider.invoke`.
* {@link InvokeResult} represents the results of a call to
* {@link ResourceProvider.invoke}.
*/

@@ -122,3 +134,4 @@ export interface InvokeResult {

/**
* Provider represents an object that implements the resources and functions for a particular Pulumi package.
* {@link Provider} represents an object that implements the resources and
* functions for a particular Pulumi package.
*/

@@ -135,26 +148,35 @@ export interface Provider {

/**
* Check validates that the given property bag is valid for a resource of the given type.
* Validates that the given property bag is valid for a resource of the
* given type.
*
* @param olds The old input properties to use for validation.
* @param news The new input properties to use for validation.
* @param olds
* The old input properties to use for validation.
* @param news
* The new input properties to use for validation.
*/
check?: (urn: resource.URN, olds: any, news: any) => Promise<CheckResult>;
/**
* Diff checks what impacts a hypothetical update will have on the resource's properties.
* Checks what impacts a hypothetical update will have on the resource's properties.
*
* @param id The ID of the resource to diff.
* @param olds The old values of properties to diff.
* @param news The new values of properties to diff.
* @param id
* The ID of the resource to diff.
* @param olds
* The old values of properties to diff.
* @param news
* The new values of properties to diff.
*/
diff?: (id: resource.ID, urn: resource.URN, olds: any, news: any) => Promise<DiffResult>;
/**
* Create allocates a new instance of the provided resource and returns its unique ID afterwards.
* If this call fails, the resource must not have been created (i.e., it is "transactional").
* Allocates a new instance of the provided resource and returns its unique
* ID afterwards. If this call fails, the resource must not have been
* created (i.e., it is "transactional").
*
* @param inputs The properties to set during creation.
* @param inputs
* The properties to set during creation.
*/
create?: (urn: resource.URN, inputs: any) => Promise<CreateResult>;
/**
* Reads the current live state associated with a resource. Enough state must be included in the inputs to uniquely
* identify the resource; this is typically just the resource ID, but it may also include some properties.
* Reads the current live state associated with a resource. Enough state
* must be included in the inputs to uniquely identify the resource; this is
* typically just the resource ID, but it may also include some properties.
*/

@@ -165,37 +187,51 @@ read?: (id: resource.ID, urn: resource.URN, props?: any) => Promise<ReadResult>;

*
* @param id The ID of the resource to update.
* @param olds The old values of properties to update.
* @param news The new values of properties to update.
* @param id
* The ID of the resource to update.
* @param olds
* The old values of properties to update.
* @param news
* The new values of properties to update.
*/
update?: (id: resource.ID, urn: resource.URN, olds: any, news: any) => Promise<UpdateResult>;
/**
* Delete tears down an existing resource with the given ID. If it fails, the resource is assumed to still exist.
* Tears down an existing resource with the given ID. If it fails, the
* resource is assumed to still exist.
*
* @param id The ID of the resource to delete.
* @param props The current properties on the resource.
* @param id
* The ID of the resource to delete.
* @param props
* The current properties on the resource.
*/
delete?: (id: resource.ID, urn: resource.URN, props: any) => Promise<void>;
/**
* Construct creates a new component resource.
* Creates a new component resource.
*
* @param name The name of the resource to create.
* @param type The type of the resource to create.
* @param inputs The inputs to the resource.
* @param options the options for the resource.
* @param name
* The name of the resource to create.
* @param type
* The type of the resource to create.
* @param inputs
* The inputs to the resource.
* @param options
* The options for the resource.
*/
construct?: (name: string, type: string, inputs: Inputs, options: resource.ComponentResourceOptions) => Promise<ConstructResult>;
/**
* Call calls the indicated method.
* Calls the indicated method.
*
* @param token The token of the method to call.
* @param inputs The inputs to the method.
* @param token
* The token of the method to call.
* @param inputs
* The inputs to the method.
*/
call?: (token: string, inputs: Inputs) => Promise<InvokeResult>;
/**
* Invoke calls the indicated function.
* Calls the indicated function.
*
* @param token The token of the function to call.
* @param inputs The inputs to the function.
* @param token
* The token of the function to call.
* @param inputs
* The inputs to the function.
*/
invoke?: (token: string, inputs: any) => Promise<InvokeResult>;
}

@@ -444,3 +444,4 @@ "use strict";

/**
* deserializeInputs deserializes the inputs struct and applies appropriate dependencies.
* Deserializes the inputs struct and applies appropriate dependencies.
*
* @internal

@@ -485,3 +486,5 @@ */

/**
* Returns true if the deserialized input contains Outputs (deeply), excluding properties of Resources.
* Returns true if the deserialized input contains outputs (deeply), excluding
* properties of resources.
*
* @internal

@@ -516,7 +519,10 @@ */

exports.containsOutputs = containsOutputs;
// grpcResponseFromError creates a gRPC response representing an error from a dynamic provider's
// resource. This is typically either a creation error, in which the API server has (virtually)
// rejected the resource, or an initialization error, where the API server has accepted the
// resource, but it failed to initialize (e.g., the app code is continually crashing and the
// resource has failed to become alive).
/**
* Creates a gRPC response representing an error from a dynamic provider's
* resource. This is typically either a creation error, in which the API server
* has (virtually) rejected the resource, or an initialization error, where the
* API server has accepted the resource, but it failed to initialize (e.g., the
* app code is continually crashing and the resource has failed to become
* alive).
*/
function grpcResponseFromError(e) {

@@ -523,0 +529,0 @@ // Create response object.

import { OutputInstance } from "../index";
import { Resource } from "../resource";
/**
* ResolvedResource is a `Resource` with all fields containing `Output` values fully resolved. This
* is useful primarily when we're querying over resource outputs (e.g., using
* `pulumi.runtime.listResourceOutputs`), and we expect all values to be present and fully-resolved.
* {@link ResolvedResource} is a {@link Resource} with all fields containing
* {@link Output} values fully resolved. This is useful primarily when we're
* querying over resource outputs (e.g., using
* `pulumi.runtime.listResourceOutputs`), and we expect all values to be present
* and fully-resolved.
*/

@@ -8,0 +10,0 @@ export declare type ResolvedResource<T extends Resource> = Omit<Resolved<T>, "urn" | "getProvider">;

@@ -5,24 +5,27 @@ import { Input, Inputs, Output } from "./output";

/**
* createUrn computes a URN from the combination of a resource name, resource type, optional parent,
* optional project and optional stack.
* {@link createUrn} computes a URN from the combination of a resource name,
* resource type, optional parent, optional project and optional stack.
*/
export declare function createUrn(name: Input<string>, type: Input<string>, parent?: Resource | Input<URN>, project?: string, stack?: string): Output<string>;
/**
* allAliases computes the full set of aliases for a child resource given a set of aliases applied to the child and
* parent resources. This includes the child resource's own aliases, as well as aliases inherited from the parent.
* If there are N child aliases, and M parent aliases, there will be (M+1)*(N+1)-1 total aliases,
* or, as calculated in the logic below, N+(M*(1+N)).
* {@link allAliases} computes the full set of aliases for a child resource
* given a set of aliases applied to the child and parent resources. This
* includes the child resource's own aliases, as well as aliases inherited from
* the parent. If there are N child aliases, and M parent aliases, there will be
* (M+1)*(N+1)-1 total aliases, or, as calculated in the logic below,
* N+(M*(1+N)).
*/
export declare function allAliases(childAliases: Input<URN | Alias>[], childName: string, childType: string, parent: Resource, parentName: string): Output<URN>[];
/**
* Resource represents a class whose CRUD operations are implemented by a provider plugin.
* {@link Resource} represents a class whose CRUD operations are implemented by
* a provider plugin.
*/
export declare abstract class Resource {
/**
* A regexp for use with sourcePosition.
* A regexp for use with {@link sourcePosition}.
*/
private static sourcePositionRegExp;
/**
* urn is the stable logical URN used to distinctly address a resource, both before and after
* deployments.
* The stable logical URN used to distinctly address a resource, both before
* and after deployments.
*/

@@ -32,15 +35,19 @@ readonly urn: Output<URN>;

/**
* sourcePosition returns the source position of the user code that instantiated this resource.
* Returns the source position of the user code that instantiated this
* resource.
*
* This is somewhat brittle in that it expects a call stack of the form:
* - Resource class constructor
* - abstract Resource subclass constructor
* - concrete Resource subclass constructor
*
* - {@link Resource} class constructor
* - abstract {@link Resource} subclass constructor
* - concrete {@link Resource} subclass constructor
* - user code
*
* This stack reflects the expected class hierarchy of "cloud resource / component resource < customresource/componentresource < resource".
* This stack reflects the expected class hierarchy of:
*
* For example, consider the AWS S3 Bucket resource. When user code instantiates a Bucket, the stack will look like
* this:
* Resource > Custom/Component resource > Cloud/Component resource
*
* For example, consider the AWS S3 Bucket resource. When user code
* instantiates a Bucket, the stack will look like this:
*
* new Resource (/path/to/resource.ts:123:45)

@@ -51,4 +58,5 @@ * new CustomResource (/path/to/resource.ts:678:90)

*
* Because Node can only give us the stack trace as text, we parse out the source position using a regex that
* matches traces of this form (see stackTraceRegExp above).
* Because Node can only give us the stack trace as text, we parse out the
* source position using a regex that matches traces of this form (see
* the {@link sourcePositionRegExp} above).
*/

@@ -61,14 +69,22 @@ private static sourcePosition;

/**
* Creates and registers a new resource object. [t] is the fully qualified type token and
* [name] is the "name" part to use in creating a stable and globally unique URN for the object.
* dependsOn is an optional list of other resources that this resource depends on, controlling
* the order in which we perform resource operations.
* Creates and registers a new resource object. `t` is the fully qualified
* type token and `name` is the "name" part to use in creating a stable and
* globally unique URN for the object. `dependsOn` is an optional list of
* other resources that this resource depends on, controlling the order in
* which we perform resource operations.
*
* @param t The type of the resource.
* @param name The _unique_ name of the resource.
* @param custom True to indicate that this is a custom resource, managed by a plugin.
* @param props The arguments to use to populate the new resource.
* @param opts A bag of options that control this resource's behavior.
* @param remote True if this is a remote component resource.
* @param dependency True if this is a synthetic resource used internally for dependency tracking.
* @param t
* The type of the resource.
* @param name
* The _unique_ name of the resource.
* @param custom
* True to indicate that this is a custom resource, managed by a plugin.
* @param props
* The arguments to use to populate the new resource.
* @param opts
* A bag of options that control this resource's behavior.
* @param remote
* True if this is a remote component resource.
* @param dependency
* True if this is a synthetic resource used internally for dependency tracking.
*/

@@ -78,23 +94,27 @@ constructor(t: string, name: string, custom: boolean, props?: Inputs, opts?: ResourceOptions, remote?: boolean, dependency?: boolean);

/**
* Constant to represent the 'root stack' resource for a Pulumi application. The purpose of this is
* solely to make it easy to write an [Alias] like so:
* A constant to represent the "root stack" resource for a Pulumi application.
* The purpose of this is solely to make it easy to write an {@link Alias} like
* so:
*
* `aliases: [{ parent: rootStackResource }]`.
*
* This indicates that the prior name for a resource was created based on it being parented directly
* by the stack itself and no other resources. Note: this is equivalent to:
* This indicates that the prior name for a resource was created based on it
* being parented directly by the stack itself and no other resources. Note:
* this is equivalent to:
*
* `aliases: [{ parent: undefined }]`
*
* However, the former form is preferable as it is more self-descriptive, while the latter may look
* a bit confusing and may incorrectly look like something that could be removed without changing
* semantics.
* However, the former form is preferable as it is more self-descriptive, while
* the latter may look a bit confusing and may incorrectly look like something
* that could be removed without changing semantics.
*/
export declare const rootStackResource: Resource;
/**
* Alias is a partial description of prior named used for a resource. It can be processed in the
* context of a resource creation to determine what the full aliased URN would be.
* {@link Alias} is a partial description of prior names used for a resource. It
* can be processed in the context of a resource creation to determine what the
* full aliased URN would be.
*
* Note there is a semantic difference between properties being absent from this type and properties
* having the `undefined` value. Specifically, there is a difference between:
* Note there is a semantic difference between properties being absent from this
* type and properties having the `undefined` value. Specifically, there is a
* difference between:
*

@@ -106,8 +126,9 @@ * ```ts

*
* The presence of a property indicates if its value should be used. If absent, then the value is
* not used. So, in the above while `alias.parent` is `undefined` for both, the first alias means
* "the original urn had no parent" while the second alias means "use the current parent".
* The presence of a property indicates if its value should be used. If absent,
* then the value is not used. So, in the above while `alias.parent` is
* `undefined` for both, the first alias means "the original URN had no parent"
* while the second alias means "use the current parent".
*
* Note: to indicate that a resource was previously parented by the root stack, it is recommended
* that you use:
* Note: to indicate that a resource was previously parented by the root stack,
* it is recommended that you use:
*

@@ -122,14 +143,15 @@ * `aliases: [{ parent: pulumi.rootStackResource }]`

/**
* The previous name of the resource. If not provided, the current name of the resource is
* used.
* The previous name of the resource. If not provided, the current name of
* the resource is used.
*/
name?: Input<string>;
/**
* The previous type of the resource. If not provided, the current type of the resource is used.
* The previous type of the resource. If not provided, the current type of
* the resource is used.
*/
type?: Input<string>;
/**
* The previous parent of the resource. If not provided (i.e. `{ name: "foo" }`), the current
* parent of the resource is used (`opts.parent` if provided, else the implicit stack resource
* parent).
* The previous parent of the resource. If not provided (i.e. `{ name: "foo"
* }`), the current parent of the resource is used (`opts.parent` if
* provided, else the implicit stack resource parent).
*

@@ -140,7 +162,9 @@ * To specify no original parent, use `{ parent: pulumi.rootStackResource }`.

/**
* The previous stack of the resource. If not provided, defaults to `pulumi.getStack()`.
* The previous stack of the resource. If not provided, defaults to
* `pulumi.getStack()`.
*/
stack?: Input<string>;
/**
* The previous project of the resource. If not provided, defaults to `pulumi.getProject()`.
* The previous project of the resource. If not provided, defaults to
* `pulumi.getProject()`.
*/

@@ -150,3 +174,4 @@ project?: Input<string>;

/**
* ResourceOptions is a bag of optional settings that control a resource's behavior.
* {@link ResourceOptions} is a bag of optional settings that control a
* resource's behavior.
*/

@@ -251,41 +276,45 @@ export interface ResourceOptions {

/**
* ResourceTransformation is the callback signature for the `transformations` resource option. A
* transformation is passed the same set of inputs provided to the `Resource` constructor, and can
* optionally return back alternate values for the `props` and/or `opts` prior to the resource
* actually being created. The effect will be as though those props and opts were passed in place
* of the original call to the `Resource` constructor. If the transformation returns undefined,
* this indicates that the resource will not be transformed.
* {@link ResourceTransformation} is the callback signature for the
* `transformations` resource option. A transformation is passed the same set
* of inputs provided to the {@link Resource} constructor, and can optionally
* return back alternate values for the `props` and/or `opts` prior to the
* resource actually being created. The effect will be as though those props
* and opts were passed in place of the original call to the {@link Resource}
* constructor. If the transformation returns `undefined`, this indicates that
* the resource will not be transformed.
*/
export declare type ResourceTransformation = (args: ResourceTransformationArgs) => ResourceTransformationResult | undefined;
/**
* ResourceTransform is the callback signature for the `transforms` resource option. A
* transform is passed the same set of inputs provided to the `Resource` constructor, and can
* optionally return back alternate values for the `props` and/or `opts` prior to the resource
* actually being created. The effect will be as though those props and opts were passed in place
* of the original call to the `Resource` constructor. If the transform returns undefined,
* this indicates that the resource will not be transformed.
* {@link ResourceTransform} is the callback signature for the `transforms`
* resource option. A transform is passed the same set of inputs provided to
* the {@link Resource} constructor, and can optionally return back alternate
* values for the `props` and/or `opts` prior to the resource actually being
* created. The effect will be as though those props and opts were passed in
* place of the original call to the {@link Resource} constructor. If the
* transform returns `undefined`, this indicates that the resource will not be
* transformed.
*/
export declare type ResourceTransform = (args: ResourceTransformArgs) => Promise<ResourceTransformResult | undefined> | ResourceTransformResult | undefined;
/**
* ResourceTransformArgs is the argument bag passed to a resource transform.
* {@link ResourceTransformArgs} is the argument bag passed to a resource transform.
*/
export interface ResourceTransformArgs {
/**
* If the resource is a custom or component resource.
* True if the resource is a custom resource, false if it is a component resource.
*/
custom: boolean;
/**
* The type of the Resource.
* The type of the resource.
*/
type: string;
/**
* The name of the Resource.
* The name of the resource.
*/
name: string;
/**
* The original properties passed to the Resource constructor.
* The original properties passed to the resource constructor.
*/
props: Inputs;
/**
* The original resource options passed to the Resource constructor.
* The original resource options passed to the resource constructor.
*/

@@ -295,5 +324,6 @@ opts: ResourceOptions;

/**
* ResourceTransformResult is the result that must be returned by a resource transformation
* callback. It includes new values to use for the `props` and `opts` of the `Resource` in place of
* the originally provided values.
* {@link ResourceTransformResult} is the result that must be returned by a
* resource transformation callback. It includes new values to use for the
* `props` and `opts` of the {@link Resource} in place of the originally
* provided values.
*/

@@ -311,23 +341,24 @@ export interface ResourceTransformResult {

/**
* ResourceTransformationArgs is the argument bag passed to a resource transformation.
* {@link ResourceTransformationArgs} is the argument bag passed to a resource
* transformation.
*/
export interface ResourceTransformationArgs {
/**
* The Resource instance that is being transformed.
* The {@link Resource} instance that is being transformed.
*/
resource: Resource;
/**
* The type of the Resource.
* The type of the resource.
*/
type: string;
/**
* The name of the Resource.
* The name of the resource.
*/
name: string;
/**
* The original properties passed to the Resource constructor.
* The original properties passed to the resource constructor.
*/
props: Inputs;
/**
* The original resource options passed to the Resource constructor.
* The original resource options passed to the resource constructor.
*/

@@ -337,5 +368,6 @@ opts: ResourceOptions;

/**
* ResourceTransformationResult is the result that must be returned by a resource transformation
* callback. It includes new values to use for the `props` and `opts` of the `Resource` in place of
* the originally provided values.
* {@link ResourceTransformationResult} is the result that must be returned by a
* resource transformation callback. It includes new values to use for the
* `props` and `opts` of the {@link Resource} in place of the originally
* provided values.
*/

@@ -353,21 +385,24 @@ export interface ResourceTransformationResult {

/**
* CustomResourceOptions is a bag of optional settings that control a custom resource's behavior.
* {@link CustomResourceOptions} is a bag of optional settings that control a
* custom resource's behavior.
*/
export interface CustomResourceOptions extends ResourceOptions {
/**
* When set to true, deleteBeforeReplace indicates that this resource should be deleted before its replacement
* is created when replacement is necessary.
* When set to true, indicates that this resource should be deleted before
* its replacement is created when replacement is necessary.
*/
deleteBeforeReplace?: boolean;
/**
* The names of outputs for this resource that should be treated as secrets. This augments the list that
* the resource provider and pulumi engine already determine based on inputs to your resource. It can be used
* to mark certain ouputs as a secrets on a per resource basis.
* The names of outputs for this resource that should be treated as secrets.
* This augments the list that the resource provider and Pulumi engine
* already determine based on inputs to your resource. It can be used to
* mark certain ouputs as a secrets on a per resource basis.
*/
additionalSecretOutputs?: string[];
/**
* When provided with a resource ID, import indicates that this resource's provider should import its state from
* the cloud resource with the given ID. The inputs to the resource's constructor must align with the resource's
* current state. Once a resource has been imported, the import property must be removed from the resource's
* options.
* When provided with a resource ID, indicates that this resource's provider
* should import its state from the cloud resource with the given ID. The
* inputs to the resource's constructor must align with the resource's
* current state. Once a resource has been imported, the import property
* must be removed from the resource's options.
*/

@@ -377,9 +412,10 @@ import?: ID;

/**
* ComponentResourceOptions is a bag of optional settings that control a component resource's behavior.
* {@link ComponentResourceOptions} is a bag of optional settings that control a
* component resource's behavior.
*/
export interface ComponentResourceOptions extends ResourceOptions {
/**
* An optional set of providers to use for child resources. Either keyed by package name (e.g.
* "aws"), or just provided as an array. In the latter case, the package name will be retrieved
* from the provider itself.
* An optional set of providers to use for child resources. Either keyed by
* package name (e.g. "aws"), or just provided as an array. In the latter
* case, the package name will be retrieved from the provider itself.
*

@@ -391,5 +427,6 @@ * Note: only a list should be used. Mapping keys are not respected.

/**
* CustomResource is a resource whose create, read, update, and delete (CRUD) operations are managed
* by performing external operations on some physical entity. The engine understands how to diff
* and perform partial updates of them, and these CRUD operations are implemented in a dynamically
* {@link CustomResource} is a resource whose create, read, update, and delete
* (CRUD) operations are managed by performing external operations on some
* physical entity. The engine understands how to diff and perform partial
* updates of them, and these CRUD operations are implemented in a dynamically
* loaded plugin for the defining package.

@@ -399,24 +436,32 @@ */

/**
* id is the provider-assigned unique ID for this managed resource. It is set during
* deployments and may be missing (undefined) during planning phases.
* The provider-assigned unique ID for this managed resource. It is set
* during deployments and may be missing (undefined) during planning phases.
*/
readonly id: Output<ID>;
/**
* Returns true if the given object is an instance of CustomResource. This is designed to work even when
* multiple copies of the Pulumi SDK have been loaded into the same process.
* Returns true if the given object is a {@link CustomResource}. This is
* designed to work even when multiple copies of the Pulumi SDK have been
* loaded into the same process.
*/
static isInstance(obj: any): obj is CustomResource;
/**
* Creates and registers a new managed resource. t is the fully qualified type token and name
* is the "name" part to use in creating a stable and globally unique URN for the object.
* dependsOn is an optional list of other resources that this resource depends on, controlling
* the order in which we perform resource operations. Creating an instance does not necessarily
* perform a create on the physical entity which it represents, and instead, this is dependent
* upon the diffing of the new goal state compared to the current known resource state.
* Creates and registers a new managed resource. `t` is the fully qualified
* type token and `name` is the "name" part to use in creating a stable and
* globally unique URN for the object. `dependsOn` is an optional list of
* other resources that this resource depends on, controlling the order in
* which we perform resource operations. Creating an instance does not
* necessarily perform a create on the physical entity which it represents.
* Instead, this is dependent upon the diffing of the new goal state
* compared to the current known resource state.
*
* @param t The type of the resource.
* @param name The _unique_ name of the resource.
* @param props The arguments to use to populate the new resource.
* @param opts A bag of options that control this resource's behavior.
* @param dependency True if this is a synthetic resource used internally for dependency tracking.
* @param t
* The type of the resource.
* @param name
* The _unique_ name of the resource.
* @param props
* The arguments to use to populate the new resource.
* @param opts
* A bag of options that control this resource's behavior.
* @param dependency
* True if this is a synthetic resource used internally for dependency tracking.
*/

@@ -426,4 +471,5 @@ constructor(t: string, name: string, props?: Inputs, opts?: CustomResourceOptions, dependency?: boolean);

/**
* ProviderResource is a resource that implements CRUD operations for other custom resources. These resources are
* managed similarly to other resources, including the usual diffing and update semantics.
* {@link ProviderResource} is a resource that implements CRUD operations for
* other custom resources. These resources are managed similarly to other
* resources, including the usual diffing and update semantics.
*/

@@ -435,7 +481,12 @@ export declare abstract class ProviderResource extends CustomResource {

*
* @param pkg The package associated with this provider.
* @param name The _unique_ name of the provider.
* @param props The configuration to use for this provider.
* @param opts A bag of options that control this provider's behavior.
* @param dependency True if this is a synthetic resource used internally for dependency tracking.
* @param pkg
* The package associated with this provider.
* @param name
* The _unique_ name of the provider.
* @param props
* The configuration to use for this provider.
* @param opts
* A bag of options that control this provider's behavior.
* @param dependency
* True if this is a synthetic resource used internally for dependency tracking.
*/

@@ -445,44 +496,55 @@ constructor(pkg: string, name: string, props?: Inputs, opts?: ResourceOptions, dependency?: boolean);

/**
* ComponentResource is a resource that aggregates one or more other child resources into a higher
* level abstraction. The component resource itself is a resource, but does not require custom CRUD
* operations for provisioning.
* {@link ComponentResource} is a resource that aggregates one or more other
* child resources into a higher level abstraction. The component resource
* itself is a resource, but does not require custom CRUD operations for
* provisioning.
*/
export declare class ComponentResource<TData = any> extends Resource {
/**
* Returns true if the given object is an instance of CustomResource. This is designed to work even when
* multiple copies of the Pulumi SDK have been loaded into the same process.
* Returns true if the given object is a {@link CustomResource}. This is
* designed to work even when multiple copies of the Pulumi SDK have been
* loaded into the same process.
*/
static isInstance(obj: any): obj is ComponentResource;
/**
* Creates and registers a new component resource. [type] is the fully qualified type token and
* [name] is the "name" part to use in creating a stable and globally unique URN for the object.
* [opts.parent] is the optional parent for this component, and [opts.dependsOn] is an optional
* list of other resources that this resource depends on, controlling the order in which we
* perform resource operations.
* Creates and registers a new component resource. `type` is the fully
* qualified type token and `name` is the "name" part to use in creating a
* stable and globally unique URN for the object. `opts.parent` is the
* optional parent for this component, and `opts.dependsOn` is an optional
* list of other resources that this resource depends on, controlling the
* order in which we perform resource operations.
*
* @param type The type of the resource.
* @param name The _unique_ name of the resource.
* @param args Information passed to [initialize] method.
* @param opts A bag of options that control this resource's behavior.
* @param remote True if this is a remote component resource.
* @param type
* The type of the resource.
* @param name
* The _unique_ name of the resource.
* @param args
* Information passed to [initialize] method.
* @param opts
* A bag of options that control this resource's behavior.
* @param remote
* True if this is a remote component resource.
*/
constructor(type: string, name: string, args?: Inputs, opts?: ComponentResourceOptions, remote?: boolean);
/**
* Can be overridden by a subclass to asynchronously initialize data for this Component
* automatically when constructed. The data will be available immediately for subclass
* constructors to use. To access the data use `.getData`.
* Can be overridden by a subclass to asynchronously initialize data for this component
* automatically when constructed. The data will be available immediately for subclass
* constructors to use. To access the data use {@link getData}.
*/
protected initialize(args: Inputs): Promise<TData>;
/**
* Retrieves the data produces by [initialize]. The data is immediately available in a
* derived class's constructor after the `super(...)` call to `ComponentResource`.
* Retrieves the data produces by {@link initialize}. The data is
* immediately available in a derived class's constructor after the
* `super(...)` call to `ComponentResource`.
*/
protected getData(): Promise<TData>;
/**
* registerOutputs registers synthetic outputs that a component has initialized, usually by
* allocating other child sub-resources and propagating their resulting property values.
* Registers synthetic outputs that a component has initialized, usually by
* allocating other child sub-resources and propagating their resulting
* property values.
*
* ComponentResources can call this at the end of their constructor to indicate that they are
* done creating child resources. This is not strictly necessary as this will automatically be
* called after the `initialize` method completes.
* Component resources can call this at the end of their constructor to
* indicate that they are done creating child resources. This is not
* strictly necessary as this will automatically be called after the {@link
* initialize} method completes.
*/

@@ -492,15 +554,20 @@ protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): void;

/**
* [mergeOptions] takes two ResourceOptions values and produces a new ResourceOptions with the
* respective properties of `opts2` merged over the same properties in `opts1`. The original
* options objects will be unchanged.
* {@link mergeOptions} takes two {@link ResourceOptions} values and produces a new
* {@link ResourceOptions} with the respective properties of `opts2` merged over the
* same properties in `opts1`. The original options objects will be unchanged.
*
* Conceptually property merging follows these basic rules:
* 1. if the property is a collection, the final value will be a collection containing the values
* from each options object.
* 2. Simple scaler values from `opts2` (i.e. strings, numbers, bools) will replace the values of
* `opts1`.
* 3. `opts2` can have properties explicitly provided with `null` or `undefined` as the value. If
* explicitly provided, then that will be the final value in the result.
* 4. For the purposes of merging `dependsOn`, `provider` and `providers` are always treated as
* collections, even if only a single value was provided.
*
* 1. if the property is a collection, the final value will be a collection
* containing the values from each options object.
*
* 2. Simple scaler values from `opts2` (i.e. strings, numbers, bools) will
* replace the values of `opts1`.
*
* 3. `opts2` can have properties explicitly provided with `null` or
* `undefined` as the value. If explicitly provided, then that will be the
* final value in the result.
*
* 4. For the purposes of merging `dependsOn`, `provider` and `providers` are
* always treated as collections, even if only a single value was provided.
*/

@@ -511,4 +578,5 @@ export declare function mergeOptions(opts1: CustomResourceOptions | undefined, opts2: CustomResourceOptions | undefined): CustomResourceOptions;

/**
* A DependencyResource is a resource that is used to indicate that an Output has a dependency on a particular
* resource. These resources are only created when dealing with remote component resources.
* A {@link DependencyResource} is a resource that is used to indicate that an
* {@link Output} has a dependency on a particular resource. These resources are
* only created when dealing with remote component resources.
*/

@@ -519,4 +587,5 @@ export declare class DependencyResource extends CustomResource {

/**
* A DependencyProviderResource is a resource that is used by the provider SDK as a stand-in for a provider that
* is only used for its reference. Its only valid properties are its URN and ID.
* A {@link DependencyProviderResource} is a resource that is used by the
* provider SDK as a stand-in for a provider that is only used for its
* reference. Its only valid properties are its URN and ID.
*/

@@ -523,0 +592,0 @@ export declare class DependencyProviderResource extends ProviderResource {

@@ -42,4 +42,4 @@ "use strict";

/**
* createUrn computes a URN from the combination of a resource name, resource type, optional parent,
* optional project and optional stack.
* {@link createUrn} computes a URN from the combination of a resource name,
* resource type, optional parent, optional project and optional stack.
*/

@@ -72,5 +72,6 @@ function createUrn(name, type, parent, project, stack) {

/**
* inheritedChildAlias computes the alias that should be applied to a child based on an alias applied to it's parent.
* This may involve changing the name of the resource in cases where the resource has a named derived from the name of
* the parent, and the parent name changed.
* {@link inheritedChildAlias} computes the alias that should be applied to a
* child based on an alias applied to its parent. This may involve changing the
* name of the resource in cases where the resource has a named derived from the
* name of the parent, and the parent name changed.
*/

@@ -111,6 +112,8 @@ function inheritedChildAlias(childName, parentName, parentAlias, childType) {

/**
* allAliases computes the full set of aliases for a child resource given a set of aliases applied to the child and
* parent resources. This includes the child resource's own aliases, as well as aliases inherited from the parent.
* If there are N child aliases, and M parent aliases, there will be (M+1)*(N+1)-1 total aliases,
* or, as calculated in the logic below, N+(M*(1+N)).
* {@link allAliases} computes the full set of aliases for a child resource
* given a set of aliases applied to the child and parent resources. This
* includes the child resource's own aliases, as well as aliases inherited from
* the parent. If there are N child aliases, and M parent aliases, there will be
* (M+1)*(N+1)-1 total aliases, or, as calculated in the logic below,
* N+(M*(1+N)).
*/

@@ -138,18 +141,27 @@ function allAliases(childAliases, childName, childType, parent, parentName) {

/**
* Resource represents a class whose CRUD operations are implemented by a provider plugin.
* {@link Resource} represents a class whose CRUD operations are implemented by
* a provider plugin.
*/
class Resource {
/**
* Creates and registers a new resource object. [t] is the fully qualified type token and
* [name] is the "name" part to use in creating a stable and globally unique URN for the object.
* dependsOn is an optional list of other resources that this resource depends on, controlling
* the order in which we perform resource operations.
* Creates and registers a new resource object. `t` is the fully qualified
* type token and `name` is the "name" part to use in creating a stable and
* globally unique URN for the object. `dependsOn` is an optional list of
* other resources that this resource depends on, controlling the order in
* which we perform resource operations.
*
* @param t The type of the resource.
* @param name The _unique_ name of the resource.
* @param custom True to indicate that this is a custom resource, managed by a plugin.
* @param props The arguments to use to populate the new resource.
* @param opts A bag of options that control this resource's behavior.
* @param remote True if this is a remote component resource.
* @param dependency True if this is a synthetic resource used internally for dependency tracking.
* @param t
* The type of the resource.
* @param name
* The _unique_ name of the resource.
* @param custom
* True to indicate that this is a custom resource, managed by a plugin.
* @param props
* The arguments to use to populate the new resource.
* @param opts
* A bag of options that control this resource's behavior.
* @param remote
* True if this is a remote component resource.
* @param dependency
* True if this is a synthetic resource used internally for dependency tracking.
*/

@@ -159,2 +171,3 @@ constructor(t, name, custom, props = {}, opts = {}, remote = false, dependency = false) {

* A private field to help with RTTI that works in SxS scenarios.
*
* @internal

@@ -281,15 +294,19 @@ */

/**
* sourcePosition returns the source position of the user code that instantiated this resource.
* Returns the source position of the user code that instantiated this
* resource.
*
* This is somewhat brittle in that it expects a call stack of the form:
* - Resource class constructor
* - abstract Resource subclass constructor
* - concrete Resource subclass constructor
*
* - {@link Resource} class constructor
* - abstract {@link Resource} subclass constructor
* - concrete {@link Resource} subclass constructor
* - user code
*
* This stack reflects the expected class hierarchy of "cloud resource / component resource < customresource/componentresource < resource".
* This stack reflects the expected class hierarchy of:
*
* For example, consider the AWS S3 Bucket resource. When user code instantiates a Bucket, the stack will look like
* this:
* Resource > Custom/Component resource > Cloud/Component resource
*
* For example, consider the AWS S3 Bucket resource. When user code
* instantiates a Bucket, the stack will look like this:
*
* new Resource (/path/to/resource.ts:123:45)

@@ -300,4 +317,5 @@ * new CustomResource (/path/to/resource.ts:678:90)

*
* Because Node can only give us the stack trace as text, we parse out the source position using a regex that
* matches traces of this form (see stackTraceRegExp above).
* Because Node can only give us the stack trace as text, we parse out the
* source position using a regex that matches traces of this form (see
* the {@link sourcePositionRegExp} above).
*/

@@ -340,3 +358,3 @@ static sourcePosition() {

/**
* A regexp for use with sourcePosition.
* A regexp for use with {@link sourcePosition}.
*/

@@ -359,15 +377,17 @@ Resource.sourcePositionRegExp = /Error:\s*\n\s*at new Resource \(.*\)\n\s*at new \S*Resource \(.*\)\n(\s*at new \S* \(.*\)\n)?[^(]*\((?<file>.*):(?<line>[0-9]+):(?<col>[0-9]+)\)\n/;

/**
* Constant to represent the 'root stack' resource for a Pulumi application. The purpose of this is
* solely to make it easy to write an [Alias] like so:
* A constant to represent the "root stack" resource for a Pulumi application.
* The purpose of this is solely to make it easy to write an {@link Alias} like
* so:
*
* `aliases: [{ parent: rootStackResource }]`.
*
* This indicates that the prior name for a resource was created based on it being parented directly
* by the stack itself and no other resources. Note: this is equivalent to:
* This indicates that the prior name for a resource was created based on it
* being parented directly by the stack itself and no other resources. Note:
* this is equivalent to:
*
* `aliases: [{ parent: undefined }]`
*
* However, the former form is preferable as it is more self-descriptive, while the latter may look
* a bit confusing and may incorrectly look like something that could be removed without changing
* semantics.
* However, the former form is preferable as it is more self-descriptive, while
* the latter may look a bit confusing and may incorrectly look like something
* that could be removed without changing semantics.
*/

@@ -399,5 +419,6 @@ exports.rootStackResource = undefined;

/**
* CustomResource is a resource whose create, read, update, and delete (CRUD) operations are managed
* by performing external operations on some physical entity. The engine understands how to diff
* and perform partial updates of them, and these CRUD operations are implemented in a dynamically
* {@link CustomResource} is a resource whose create, read, update, and delete
* (CRUD) operations are managed by performing external operations on some
* physical entity. The engine understands how to diff and perform partial
* updates of them, and these CRUD operations are implemented in a dynamically
* loaded plugin for the defining package.

@@ -407,14 +428,21 @@ */

/**
* Creates and registers a new managed resource. t is the fully qualified type token and name
* is the "name" part to use in creating a stable and globally unique URN for the object.
* dependsOn is an optional list of other resources that this resource depends on, controlling
* the order in which we perform resource operations. Creating an instance does not necessarily
* perform a create on the physical entity which it represents, and instead, this is dependent
* upon the diffing of the new goal state compared to the current known resource state.
* Creates and registers a new managed resource. `t` is the fully qualified
* type token and `name` is the "name" part to use in creating a stable and
* globally unique URN for the object. `dependsOn` is an optional list of
* other resources that this resource depends on, controlling the order in
* which we perform resource operations. Creating an instance does not
* necessarily perform a create on the physical entity which it represents.
* Instead, this is dependent upon the diffing of the new goal state
* compared to the current known resource state.
*
* @param t The type of the resource.
* @param name The _unique_ name of the resource.
* @param props The arguments to use to populate the new resource.
* @param opts A bag of options that control this resource's behavior.
* @param dependency True if this is a synthetic resource used internally for dependency tracking.
* @param t
* The type of the resource.
* @param name
* The _unique_ name of the resource.
* @param props
* The arguments to use to populate the new resource.
* @param opts
* A bag of options that control this resource's behavior.
* @param dependency
* True if this is a synthetic resource used internally for dependency tracking.
*/

@@ -429,4 +457,5 @@ constructor(t, name, props, opts = {}, dependency = false) {

/**
* Returns true if the given object is an instance of CustomResource. This is designed to work even when
* multiple copies of the Pulumi SDK have been loaded into the same process.
* Returns true if the given object is a {@link CustomResource}. This is
* designed to work even when multiple copies of the Pulumi SDK have been
* loaded into the same process.
*/

@@ -440,4 +469,5 @@ static isInstance(obj) {

/**
* ProviderResource is a resource that implements CRUD operations for other custom resources. These resources are
* managed similarly to other resources, including the usual diffing and update semantics.
* {@link ProviderResource} is a resource that implements CRUD operations for
* other custom resources. These resources are managed similarly to other
* resources, including the usual diffing and update semantics.
*/

@@ -448,7 +478,12 @@ class ProviderResource extends CustomResource {

*
* @param pkg The package associated with this provider.
* @param name The _unique_ name of the provider.
* @param props The configuration to use for this provider.
* @param opts A bag of options that control this provider's behavior.
* @param dependency True if this is a synthetic resource used internally for dependency tracking.
* @param pkg
* The package associated with this provider.
* @param name
* The _unique_ name of the provider.
* @param props
* The configuration to use for this provider.
* @param opts
* A bag of options that control this provider's behavior.
* @param dependency
* True if this is a synthetic resource used internally for dependency tracking.
*/

@@ -472,3 +507,5 @@ constructor(pkg, name, props, opts = {}, dependency = false) {

}
/** @internal */
/**
* @internal
*/
getPackage() {

@@ -480,19 +517,26 @@ return this.pkg;

/**
* ComponentResource is a resource that aggregates one or more other child resources into a higher
* level abstraction. The component resource itself is a resource, but does not require custom CRUD
* operations for provisioning.
* {@link ComponentResource} is a resource that aggregates one or more other
* child resources into a higher level abstraction. The component resource
* itself is a resource, but does not require custom CRUD operations for
* provisioning.
*/
class ComponentResource extends Resource {
/**
* Creates and registers a new component resource. [type] is the fully qualified type token and
* [name] is the "name" part to use in creating a stable and globally unique URN for the object.
* [opts.parent] is the optional parent for this component, and [opts.dependsOn] is an optional
* list of other resources that this resource depends on, controlling the order in which we
* perform resource operations.
* Creates and registers a new component resource. `type` is the fully
* qualified type token and `name` is the "name" part to use in creating a
* stable and globally unique URN for the object. `opts.parent` is the
* optional parent for this component, and `opts.dependsOn` is an optional
* list of other resources that this resource depends on, controlling the
* order in which we perform resource operations.
*
* @param type The type of the resource.
* @param name The _unique_ name of the resource.
* @param args Information passed to [initialize] method.
* @param opts A bag of options that control this resource's behavior.
* @param remote True if this is a remote component resource.
* @param type
* The type of the resource.
* @param name
* The _unique_ name of the resource.
* @param args
* Information passed to [initialize] method.
* @param opts
* A bag of options that control this resource's behavior.
* @param remote
* True if this is a remote component resource.
*/

@@ -511,2 +555,3 @@ constructor(type, name, args = {}, opts = {}, remote = false) {

* A private field to help with RTTI that works in SxS scenarios.
*
* @internal

@@ -516,3 +561,5 @@ */

this.__pulumiComponentResource = true;
/** @internal */
/**
* @internal
*/
// eslint-disable-next-line @typescript-eslint/naming-convention,no-underscore-dangle,id-blacklist,id-match

@@ -525,4 +572,5 @@ this.__registered = false;

/**
* Returns true if the given object is an instance of CustomResource. This is designed to work even when
* multiple copies of the Pulumi SDK have been loaded into the same process.
* Returns true if the given object is a {@link CustomResource}. This is
* designed to work even when multiple copies of the Pulumi SDK have been
* loaded into the same process.
*/

@@ -532,3 +580,5 @@ static isInstance(obj) {

}
/** @internal */
/**
* @internal
*/
initializeAndRegisterOutputs(args) {

@@ -542,5 +592,5 @@ return __awaiter(this, void 0, void 0, function* () {

/**
* Can be overridden by a subclass to asynchronously initialize data for this Component
* automatically when constructed. The data will be available immediately for subclass
* constructors to use. To access the data use `.getData`.
* Can be overridden by a subclass to asynchronously initialize data for this component
* automatically when constructed. The data will be available immediately for subclass
* constructors to use. To access the data use {@link getData}.
*/

@@ -553,4 +603,5 @@ initialize(args) {

/**
* Retrieves the data produces by [initialize]. The data is immediately available in a
* derived class's constructor after the `super(...)` call to `ComponentResource`.
* Retrieves the data produces by {@link initialize}. The data is
* immediately available in a derived class's constructor after the
* `super(...)` call to `ComponentResource`.
*/

@@ -561,8 +612,10 @@ getData() {

/**
* registerOutputs registers synthetic outputs that a component has initialized, usually by
* allocating other child sub-resources and propagating their resulting property values.
* Registers synthetic outputs that a component has initialized, usually by
* allocating other child sub-resources and propagating their resulting
* property values.
*
* ComponentResources can call this at the end of their constructor to indicate that they are
* done creating child resources. This is not strictly necessary as this will automatically be
* called after the `initialize` method completes.
* Component resources can call this at the end of their constructor to
* indicate that they are done creating child resources. This is not
* strictly necessary as this will automatically be called after the {@link
* initialize} method completes.
*/

@@ -582,3 +635,5 @@ registerOutputs(outputs) {

ComponentResource.prototype.initializeAndRegisterOutputs.doNotCapture = true;
/** @internal */
/**
* @internal
*/
exports.testingOptions = {

@@ -616,3 +671,5 @@ isDryRun: false,

}
/** @internal */
/**
* @internal
*/
function expandProviders(options) {

@@ -649,3 +706,6 @@ // Convert 'providers' map to array form.

}
/** @internal for testing purposes. */
/**
* @internal
* This is exported for testing purposes.
*/
function merge(dest, source, alwaysCreateArray) {

@@ -679,4 +739,5 @@ // unwind any top level promise/outputs.

/**
* A DependencyResource is a resource that is used to indicate that an Output has a dependency on a particular
* resource. These resources are only created when dealing with remote component resources.
* A {@link DependencyResource} is a resource that is used to indicate that an
* {@link Output} has a dependency on a particular resource. These resources are
* only created when dealing with remote component resources.
*/

@@ -691,4 +752,5 @@ class DependencyResource extends CustomResource {

/**
* A DependencyProviderResource is a resource that is used by the provider SDK as a stand-in for a provider that
* is only used for its reference. Its only valid properties are its URN and ID.
* A {@link DependencyProviderResource} is a resource that is used by the
* provider SDK as a stand-in for a provider that is only used for its
* reference. Its only valid properties are its URN and ID.
*/

@@ -711,3 +773,4 @@ class DependencyProviderResource extends ProviderResource {

/**
* parseResourceReference parses the URN and ID out of the provider reference.
* Parses the URN and ID out of the provider reference.
*
* @internal

@@ -714,0 +777,0 @@ */

@@ -26,19 +26,28 @@ "use strict";

const closeValue = "7473659d-924c-414d-84e5-b1640b2a6296";
// PushableAsyncIterable is an `AsyncIterable` that data can be pushed to. It is useful for turning
// push-based callback APIs into pull-based `AsyncIterable` APIs. For example, a user can write:
//
// const queue = new PushableAsyncIterable();
// call.on("data", (thing: any) => queue.push(live));
//
// And then later consume `queue` as any other `AsyncIterable`:
//
// for await (const l of list) {
// console.log(l.metadata.name);
// }
//
// Note that this class implements `AsyncIterable<T | undefined>`. This is for a fundamental reason:
// the user can call `complete` at any time. `AsyncIteratable` would normally know when an element
// is the last, but in this case it can't. Or, another way to look at it is, the last element is
// guaranteed to be `undefined`.
/** @internal */
/**
* {@link PushableAsyncIterable} is an {@link AsyncIterable} that data can be
* pushed to. It is useful for turning push-based callback APIs into pull-based
* {@link AsyncIterable} APIs. For example, a user can write:
*
* ```typescript
* const queue = new PushableAsyncIterable();
* call.on("data", (thing: any) => queue.push(live));
* ```
*
* And then later consume `queue` as any other {@link AsyncIterable}:
*
* ```typescript
* for await (const l of list) {
* console.log(l.metadata.name);
* }
* ```
*
* Note that this class implements `AsyncIterable<T | undefined>`. This is for a
* fundamental reason: the user can call `complete` at any time. `AsyncIterable`
* would normally know when an element is the last, but in this case it can't.
* Or, another way to look at it is, the last element is guaranteed to be
* `undefined`.
*
* @internal
*/
class PushableAsyncIterable {

@@ -45,0 +54,0 @@ constructor() {

@@ -43,4 +43,7 @@ "use strict";

const rpc_1 = require("./rpc");
// maxRPCMessageSize raises the gRPC Max Message size from `4194304` (4mb) to `419430400` (400mb)
/** @internal */
/**
* Raises the gRPC Max Message size from `4194304` (4mb) to `419430400` (400mb)
*
* @internal
*/
const maxRPCMessageSize = 1024 * 1024 * 400;

@@ -47,0 +50,0 @@ class CallbackServer {

import * as asset from "../../asset";
import { Resource } from "../../resource";
/**
* Options for controlling what gets returned by [computeCodePaths].
* Options for controlling what gets returned by {@link computeCodePaths}.
*/
export interface CodePathOptions {
/**
* Local file/directory paths that we always want to include when producing the Assets to be
* included for a serialized closure.
* Local file/directory paths that we always want to include when producing
* the assets to be included for a serialized closure.
*/
extraIncludePaths?: string[];
/**
* Extra packages to include when producing the Assets for a serialized closure. This can be
* useful if the packages are acquired in a way that the serialization code does not understand.
* For example, if there was some sort of module that was pulled in based off of a computed
* string.
* Extra packages to include when producing the assets for a serialized
* closure. This can be useful if the packages are acquired in a way that
* the serialization code does not understand. For example, if there was
* some sort of module that was pulled in based off of a computed string.
*/
extraIncludePackages?: string[];
/**
* Packages to explicitly exclude from the Assets for a serialized closure. This can be used
* when clients want to trim down the size of a closure, and they know that some package won't
* ever actually be needed at runtime, but is still a dependency of some package that is being
* used at runtime.
* Packages to explicitly exclude from the assets for a serialized closure.
* This can be used when clients want to trim down the size of a closure,
* and they know that some package won't ever actually be needed at runtime,
* but is still a dependency of some package that is being used at runtime.
*/

@@ -32,25 +32,30 @@ extraExcludePackages?: string[];

/**
* computeCodePaths computes the local node_module paths to include in an uploaded cloud 'Lambda'.
* Specifically, it will examine the package.json for the caller's code, and will transitively walk
* it's 'dependencies' section to determine what packages should be included.
* Computes the local `node_module` paths to include in an uploaded cloud
* "lambda". Specifically, it will examine the `package.json` for the caller's
* code and transitively walk its `dependencies` section to determine what
* packages should be included.
*
* During this walk, if a package is encountered that contains a `"pulumi": { ... }` section then
* the normal `"dependencies": { ... }` section of that package will not be included. These are
* "pulumi" packages, and those dependencies are only intended for use at deployment time. However,
* a "pulumi" package can also specify package that should be available at cloud-runtime. These
* packages are found in a `"runtimeDependencies": { ... }` section in the package.json file with
* the same format as the normal "dependencies" section.
* During this walk, if a package is encountered that contains a `"pulumi": {
* ... }` section then the normal `"dependencies": { ... }` section of that
* package will not be included. These are "pulumi" packages, and those
* dependencies are only intended for use at deployment time. However, a
* "pulumi" package can also specify package that should be available at
* cloud-runtime. These packages are found in a `"runtimeDependencies": { ...
* }` section in the `package.json` file with the same format as the normal
* `dependencies` section.
*
* See [CodePathOptions] for information on ways to control and configure the final set of paths
* included in the resultant asset/archive map.
* See {@link CodePathOptions} for information on ways to control and configure
* the final set of paths included in the resultant asset/archive map.
*
* Note: this functionality is specifically intended for use by downstream library code that is
* determining what is needed for a cloud-lambda. i.e. the aws.serverless.Function or
* azure.serverless.FunctionApp libraries. In general, other clients should not need to use this
* helper.
* Note: this functionality is specifically intended for use by downstream
* library code that is determining what is needed for a cloud-lambda. i.e. the
* `aws.serverless.Function` or `azure.serverless.FunctionApp` libraries. In
* general, other clients should not need to use this helper.
*/
export declare function computeCodePaths(options?: CodePathOptions): Promise<Map<string, asset.Asset | asset.Archive>>;
/**
* @deprecated Use the [computeCodePaths] overload that takes a [CodePathOptions] instead.
* @deprecated
* Use the {@link computeCodePaths} overload that takes a
* {@link CodePathOptions} instead.
*/
export declare function computeCodePaths(extraIncludePaths?: string[], extraIncludePackages?: string[], extraExcludePackages?: string[]): Promise<Map<string, asset.Asset | asset.Archive>>;

@@ -106,6 +106,6 @@ "use strict";

/**
* searchUp searches for and returns the first directory path
* starting from a given directory that contains the given file to find.
* Recursively searches up the directory tree until it finds the file or returns null
* when it can't find anything.
* Searches for and returns the first directory path starting from a given
* directory that contains the given file to find. Recursively searches up the
* directory tree until it finds the file or returns `null` when it can't find
* anything.
* */

@@ -123,6 +123,6 @@ function searchUp(currentDir, fileToFind) {

/**
* Detects if we are in a Yarn/NPM workspace setup, and returns the root of the
* workspace. If we are not in a workspace setup, it returns `null`.
*
* @internal
* findWorkspaceRoot detects if we are in a yarn/npm workspace setup, and
* returns the root of the workspace. If we are not in a workspace setup, it
* returns null.
*/

@@ -176,4 +176,6 @@ function findWorkspaceRoot(startingPath) {

}
// allFolders computes the set of package folders that are transitively required by the root
// 'dependencies' node in the client's project.json file.
/**
* Computes the set of package folders that are transitively required by the root
* `dependencies` node in the client's `package.json` file.
*/
function allFoldersForPackages(includedPackages, excludedPackages, logResource) {

@@ -259,4 +261,7 @@ return __awaiter(this, void 0, void 0, function* () {

}
// addPackageAndDependenciesToSet adds all required dependencies for the requested pkg name from the given root package
// into the set. It will recurse into all dependencies of the package.
/**
* Adds all required dependencies for the requested package name from the given
* root package into the set. It will recurse into all dependencies of the
* package.
*/
function addPackageAndDependenciesToSet(root, pkg, seenPaths, normalizedPackagePaths, excludedPackages) {

@@ -315,6 +320,9 @@ // Don't process this packages if it was in the set the user wants to exclude.

}
// findDependency searches the package tree starting at a root node (possibly a child) for a match
// for the given name. It is assumed that the tree was correctly constructed such that dependencies
// are resolved to compatible versions in the closest available match starting at the provided root
// and walking up to the head of the tree.
/**
* Searches the package tree starting at a root node (possibly a child) for a
* match for the given name. It is assumed that the tree was correctly
* constructed such that dependencies are resolved to compatible versions in the
* closest available match starting at the provided root and walking up to the
* head of the tree.
*/
function findDependency(root, name) {

@@ -321,0 +329,0 @@ while (root) {

@@ -26,19 +26,27 @@ "use strict";

const ts = require("../../typescript-shim");
// These are the special globals we've marked as ones we do not want to capture by value.
// These values have a dual meaning. They mean one thing at deployment time and one thing
// at cloud-execution time. By **not** capturing-by-value we take the view that the user
// wants the cloud-execution time view of things.
/**
* These are the special globals we've marked as ones we do not want to capture
* by value. These values have a dual meaning. They mean one thing at
* deployment time and one thing at cloud-execution time. By **not**
* capturing-by-value we take the view that the user wants the cloud-execution
* time view of things.
*/
const nodeModuleGlobals = {
__dirname: true,
__filename: true,
// We definitely should not try to capture/serialize 'require'. Not only will it bottom
// out as a native function, but it is definitely something the user intends to run
// against the right module environment at cloud-execution time and not deployment time.
// We definitely should not try to capture/serialize `require`. Not only
// will it bottom out as a native function, but it is definitely something
// the user intends to run against the right module environment at
// cloud-execution time and not deployment time.
require: true,
};
// Gets the text of the provided function (using .toString()) and massages it so that it is a legal
// function declaration. Note: this ties us heavily to V8 and its representation for functions. In
// particular, it has expectations around how functions/lambdas/methods/generators/constructors etc.
// are represented. If these change, this will likely break us.
/** @internal */
/**
* Gets the text of the provided function (using `.toString()`) and massages it
* so that it is a legal function declaration. Note: this ties us heavily to V8
* and its representation for functions. In particular, it has expectations
* around how functions/lambdas/methods/generators/constructors etc. are
* represented. If these change, this will likely break us.
*
* @internal
*/
function parseFunction(funcString) {

@@ -72,3 +80,5 @@ const [error, functionCode] = parseFunctionCode(funcString);

exports.parseFunction = parseFunction;
/** @internal */
/**
* @internal
*/
function isNativeFunction(funcString) {

@@ -307,4 +317,5 @@ // Split this constant out so that if this function *itself* is closure serialized,

/**
* computeCapturedVariableNames computes the set of free variables in a given function string. Note that this string is
* expected to be the usual V8-serialized function expression text.
* Computes the set of free variables in a given function string. Note that
* this string is expected to be the usual V8-serialized function expression
* text.
*/

@@ -311,0 +322,0 @@ function computeCapturedVariableNames(file) {

@@ -63,3 +63,5 @@ "use strict";

}
/** @internal */
/**
* @internal
*/
function rewriteSuperReferences(code, isStatic) {

@@ -66,0 +68,0 @@ const ts = require("../../typescript-shim");

import { Resource } from "../../resource";
/**
* SerializeFunctionArgs are arguments used to serialize a JavaScript function
* {@link SerializeFunctionArgs} are arguments used to serialize a JavaScript
* function.
*/
export interface SerializeFunctionArgs {
/**
* The name to export from the module defined by the generated module text. Defaults to 'handler'.
* The name to export from the module defined by the generated module text.
* Defaults to `handler`.
*/
exportName?: string;
/**
* A function to prevent serialization of certain objects captured during the serialization. Primarily used to
* prevent potential cycles.
* A function to prevent serialization of certain objects captured during
* the serialization. Primarily used to prevent potential cycles.
*/
serialize?: (o: any) => boolean;
/**
* If this is a function which, when invoked, will produce the actual entrypoint function.
* Useful for when serializing a function that has high startup cost that only wants to be
* run once. The signature of this function should be: () => (provider_handler_args...) => provider_result
* True if this is a function which, when invoked, will produce the actual
* entrypoint function. Useful for when serializing a function that has high
* startup cost that we'd ideally only run once. The signature of this
* function should be `() => (provider_handler_args...) => provider_result`.
*
* This will then be emitted as: `exports.[exportName] = serialized_func_name();`
* This will then be emitted as `exports.[exportName] =
* serialized_func_name();`
*
* In other words, the function will be invoked (once) and the resulting inner function will
* be what is exported.
* In other words, the function will be invoked (once) and the resulting
* inner function will be what is exported.
*/

@@ -31,6 +35,9 @@ isFactoryFunction?: boolean;

/**
* If true, allow secrets to be serialized into the function. This should only be set to true if the calling
* code will handle this and propoerly wrap the resulting text in a Secret before passing it into any Resources
* or serializing it to any other output format. If set, the `containsSecrets` property on the returned
* SerializedFunction object will indicate whether secrets were serialized into the function text.
* If true, allow secrets to be serialized into the function. This should
* only be set to true if the calling code will handle this and propoerly
* wrap the resulting text in a secret before passing it into any resources
* or serializing it to any other output format. If set, the
* `containsSecrets` property on the returned {@link SerializedFunction}
* object will indicate whether secrets were serialized into the function
* text.
*/

@@ -40,9 +47,11 @@ allowSecrets?: boolean;

/**
* SerializeFunction is a representation of a serialized JavaScript function.
* {@link SerializedFunction} is a representation of a serialized JavaScript
* function.
*/
export interface SerializedFunction {
/**
* The text of a JavaScript module which exports a single name bound to an appropriate value.
* In the case of a normal function, this value will just be serialized function. In the case
* of a factory function this value will be the result of invoking the factory function.
* The text of a JavaScript module which exports a single name bound to an
* appropriate value. In the case of a normal function, this value will just
* be serialized function. In the case of a factory function this value
* will be the result of invoking the factory function.
*/

@@ -55,3 +64,3 @@ text: string;

/**
* True if the serialized function text includes serialization of secret
* True if the serialized function text includes serialized secrets.
*/

@@ -61,22 +70,33 @@ containsSecrets: boolean;

/**
* serializeFunction serializes a JavaScript function into a text form that can be loaded in another execution context,
* for example as part of a function callback associated with an AWS Lambda. The function serialization captures any
* variables captured by the function body and serializes those values into the generated text along with the function
* body. This process is recursive, so that functions referenced by the body of the serialized function will themselves
* be serialized as well. This process also deeply serializes captured object values, including prototype chains and
* property descriptors, such that the semantics of the function when deserialized should match the original function.
* Serializes a JavaScript function into a text form that can be loaded in
* another execution context, for example as part of a function callback
* associated with an AWS Lambda. The function serialization captures any
* variables captured by the function body and serializes those values into the
* generated text along with the function body. This process is recursive, so
* that functions referenced by the body of the serialized function will
* themselves be serialized as well. This process also deeply serializes
* captured object values, including prototype chains and property descriptors,
* such that the semantics of the function when deserialized should match the
* original function.
*
* There are several known limitations:
* - If a native function is captured either directly or indirectly, closure serialization will return an error.
* - Captured values will be serialized based on their values at the time that `serializeFunction` is called. Mutations
* to these values after that (but before the deserialized function is used) will not be observed by the deserialized
* function.
*
* @param func The JavaScript function to serialize.
* @param args Arguments to use to control the serialization of the JavaScript function.
* - If a native function is captured either directly or indirectly, closure
* serialization will return an error.
*
* - Captured values will be serialized based on their values at the time that
* `serializeFunction` is called. Mutations to these values after that (but
* before the deserialized function is used) will not be observed by the
* deserialized function.
*
* @param func
* The JavaScript function to serialize.
* @param args
* Arguments to use to control the serialization of the JavaScript function.
*/
export declare function serializeFunction(func: Function, args?: SerializeFunctionArgs): Promise<SerializedFunction>;
/**
* @deprecated Please use 'serializeFunction' instead.
* @deprecated
* Please use {@link serializeFunction} instead.
*/
export declare function serializeFunctionAsync(func: Function, serialize?: (o: any) => boolean): Promise<string>;

@@ -36,17 +36,27 @@ "use strict";

/**
* serializeFunction serializes a JavaScript function into a text form that can be loaded in another execution context,
* for example as part of a function callback associated with an AWS Lambda. The function serialization captures any
* variables captured by the function body and serializes those values into the generated text along with the function
* body. This process is recursive, so that functions referenced by the body of the serialized function will themselves
* be serialized as well. This process also deeply serializes captured object values, including prototype chains and
* property descriptors, such that the semantics of the function when deserialized should match the original function.
* Serializes a JavaScript function into a text form that can be loaded in
* another execution context, for example as part of a function callback
* associated with an AWS Lambda. The function serialization captures any
* variables captured by the function body and serializes those values into the
* generated text along with the function body. This process is recursive, so
* that functions referenced by the body of the serialized function will
* themselves be serialized as well. This process also deeply serializes
* captured object values, including prototype chains and property descriptors,
* such that the semantics of the function when deserialized should match the
* original function.
*
* There are several known limitations:
* - If a native function is captured either directly or indirectly, closure serialization will return an error.
* - Captured values will be serialized based on their values at the time that `serializeFunction` is called. Mutations
* to these values after that (but before the deserialized function is used) will not be observed by the deserialized
* function.
*
* @param func The JavaScript function to serialize.
* @param args Arguments to use to control the serialization of the JavaScript function.
* - If a native function is captured either directly or indirectly, closure
* serialization will return an error.
*
* - Captured values will be serialized based on their values at the time that
* `serializeFunction` is called. Mutations to these values after that (but
* before the deserialized function is used) will not be observed by the
* deserialized function.
*
* @param func
* The JavaScript function to serialize.
* @param args
* Arguments to use to control the serialization of the JavaScript function.
*/

@@ -67,3 +77,4 @@ function serializeFunction(func, args = {}) {

/**
* @deprecated Please use 'serializeFunction' instead.
* @deprecated
* Please use {@link serializeFunction} instead.
*/

@@ -83,6 +94,5 @@ function serializeFunctionAsync(func, serialize) {

/**
* serializeJavaScriptText converts a FunctionInfo object into a string representation of a Node.js module body which
* exposes a single function `exports.handler` representing the serialized function.
*
* @param c The FunctionInfo to be serialized into a module string.
* Converts a {@link FunctionInfo} object into a string representation of a
* NodeJS module body which exposes a single function `exports.handler`
* representing the serialized function.
*/

@@ -476,8 +486,10 @@ function serializeJavaScriptText(outerClosure, exportName, isFactoryFunction) {

/**
* Converts an environment object into a string which can be embedded into a serialized function
* body. Note that this is not JSON serialization, as we may have property values which are
* variable references to other global functions. In other words, there can be free variables in the
* resulting object literal.
* Converts an environment object into a string which can be embedded into a
* serialized function body. Note that this is not JSON serialization, as we
* may have property values which are variable references to other global
* functions. In other words, there can be free variables in the resulting
* object literal.
*
* @param envObj The environment object to convert to a string.
* @param envObj
* The environment object to convert to a string.
*/

@@ -484,0 +496,0 @@ function envObjToString(envObj) {

@@ -17,3 +17,5 @@ "use strict";

const legalNameRegex = /^[a-zA-Z_][0-9a-zA-Z_]*$/;
/** @internal */
/**
* @internal
*/
function isLegalMemberName(n) {

@@ -23,3 +25,5 @@ return legalNameRegex.test(n);

exports.isLegalMemberName = isLegalMemberName;
/** @internal */
/**
* @internal
*/
function isLegalFunctionName(n) {

@@ -26,0 +30,0 @@ if (!isLegalMemberName(n)) {

@@ -45,4 +45,6 @@ "use strict";

/**
* Given a function, returns the file, line and column number in the file where this function was
* defined. Returns { "", 0, 0 } if the location cannot be found or if the given function has no Script.
* Given a function, returns the file, line and column number in the file where
* this function was defined. Returns `{ "", 0, 0 }` if the location cannot be
* found or if the given function has no script.
*
* @internal

@@ -72,10 +74,17 @@ */

/**
* Given a function and a free variable name, lookupCapturedVariableValue looks up the value of that free variable
* in the scope chain of the provided function. If the free variable is not found, `throwOnFailure` indicates
* whether or not this function should throw or return `undefined.
* Given a function and a free variable name, looks up the value of that free
* variable in the scope chain of the provided function. If the free variable is
* not found, `throwOnFailure` indicates whether or not this function should
* throw or return `undefined`.
*
* @param func The function whose scope chain is to be analyzed
* @param freeVariable The name of the free variable to inspect
* @param throwOnFailure If true, throws if the free variable can't be found.
* @returns The value of the free variable. If `throwOnFailure` is false, returns `undefined` if not found.
* @param func
* The function whose scope chain is to be analyzed
* @param freeVariable
* The name of the free variable to inspect
* @param throwOnFailure
* If true, throws if the free variable can't be found.
* @returns
* The value of the free variable. If `throwOnFailure` is false, returns
* `undefined` if not found.
*
* @internal

@@ -82,0 +91,0 @@ */

@@ -67,4 +67,6 @@ "use strict";

/**
* Returns the inspector session that can be used to query the state of this running Node instance.
* Must only be called on Node11 and above. On Node10 and below, this will throw.
* Returns the inspector session that can be used to query the state of this
* running Node instance. Must only be called on Node11 and above. On Node10 and
* below, this will throw.
*
* @internal

@@ -79,4 +81,5 @@ */

/**
* Returns a promise that can be used to determine when the v8hooks have been injected properly and
* code that depends on them can continue executing.
* Returns a promise that can be used to determine when the v8hooks have been
* injected properly and code that depends on them can continue executing.
*
* @internal

@@ -92,2 +95,3 @@ */

* Maps from a script-id to the local file url it corresponds to.
*
* @internal

@@ -94,0 +98,0 @@ */

/**
* allConfig returns a copy of the full config map.
* Returns a copy of the full configuration map.
*/

@@ -8,3 +8,3 @@ export declare function allConfig(): {

/**
* setAllConfig overwrites the config map.
* Overwrites the configuration map.
*/

@@ -15,8 +15,8 @@ export declare function setAllConfig(c: {

/**
* setConfig sets a configuration variable.
* Sets a configuration variable.
*/
export declare function setConfig(k: string, v: string): void;
/**
* getConfig returns a configuration variable's value or undefined if it is unset.
* Returns a configuration variable's value, or `undefined` if it is unset.
*/
export declare function getConfig(k: string): string | undefined;

@@ -18,3 +18,4 @@ "use strict";

/**
* configEnvKey is the environment variable key that the language plugin uses to set configuration values.
* The environment variable key that the language plugin uses to set
* configuration values.
*

@@ -25,4 +26,4 @@ * @internal

/**
* configSecretKeysEnvKey is the environment variable key that the language plugin uses to set configuration keys that
* contain secrets.
* The environment variable key that the language plugin uses to set
* configuration keys that contain secrets.
*

@@ -33,3 +34,3 @@ * @internal

/**
* allConfig returns a copy of the full config map.
* Returns a copy of the full configuration map.
*/

@@ -42,3 +43,3 @@ function allConfig() {

/**
* setAllConfig overwrites the config map.
* Overwrites the configuration map.
*/

@@ -54,3 +55,3 @@ function setAllConfig(c, secretKeys) {

/**
* setConfig sets a configuration variable.
* Sets a configuration variable.
*/

@@ -64,3 +65,3 @@ function setConfig(k, v) {

/**
* getConfig returns a configuration variable's value or undefined if it is unset.
* Returns a configuration variable's value, or `undefined` if it is unset.
*/

@@ -73,3 +74,4 @@ function getConfig(k) {

/**
* isConfigSecret returns true if the key contains a secret value.
* Returns true if the key contains a secret value.
*
* @internal

@@ -90,5 +92,5 @@ */

/**
* parseConfig reads config from the source of truth, the environment.
* config must always be read this way because automation api introduces
* new program lifetime semantics where program lifetime != module lifetime.
* Reads configuration from the source of truth, the environment. Configuration
* must always be read this way because the Automation API introduces new
* program lifetime semantics where program lifetime != module lifetime.
*/

@@ -108,4 +110,4 @@ function parseConfig() {

/**
* persistConfig writes config to the environment.
* config changes must always be persisted to the environment because automation api introduces
* Writes configuration to the environment. Configuration changes must always be
* persisted to the environment this way because the Automation API introduces
* new program lifetime semantics where program lifetime != module lifetime.

@@ -121,7 +123,9 @@ */

/**
* cleanKey takes a configuration key, and if it is of the form "<string>:config:<string>" removes
* the ":config:" portion. Previously, our keys always had the string ":config:" in them, and we'd
* like to remove it. However, the language host needs to continue to set it so we can be compatible
* with older versions of our packages. Once we stop supporting older packages, we can change the
* language host to not add this :config: thing and remove this function.
* Takes a configuration key and, if it is of the form
* "<string>:config:<string>" removes the ":config:" portion. Previously, our
* keys always had the string ":config:" in them, and we'd like to remove it.
* However, the language host needs to continue to set it so we can be
* compatible with older versions of our packages. Once we stop supporting older
* packages, we can change the language host to not add this :config: thing and
* remove this function.
*/

@@ -128,0 +132,0 @@ function cleanKey(key) {

@@ -25,11 +25,16 @@ "use strict";

const state = __importStar(require("./state"));
/** @internal
/**
* debugPromiseLeaks can be set to enable promises leaks debugging.
*
* @internal
*/
exports.debugPromiseLeaks = !!process.env.PULUMI_DEBUG_PROMISE_LEAKS;
/**
* leakDetectorScheduled is true when the promise leak detector is scheduled for process exit.
* leakDetectorScheduled is true when the promise leak detector is scheduled for
* process exit.
*/
let leakDetectorScheduled = false;
/** @internal */
/**
* @internal
*/
function leakedPromises() {

@@ -62,3 +67,5 @@ const localStore = state.getStore();

exports.leakedPromises = leakedPromises;
/** @internal */
/**
* @internal
*/
function promiseDebugString(p) {

@@ -70,3 +77,5 @@ return `CONTEXT(${p._debugId}): ${p._debugCtx}\n` + `STACK_TRACE:\n` + `${p._debugStackTrace}`;

/**
* debuggablePromise optionally wraps a promise with some goo to make it easier to debug common problems.
* Optionally wraps a promise with some goo to make it easier to debug common
* problems.
*
* @internal

@@ -119,3 +128,5 @@ */

/**
* errorString produces a string from an error, conditionally including additional diagnostics.
* Produces a string from an error, conditionally including additional
* diagnostics.
*
* @internal

@@ -122,0 +133,0 @@ */

@@ -6,22 +6,25 @@ import { AsyncIterable } from "@pulumi/query/interfaces";

/**
* `invoke` dynamically invokes the function, `tok`, which is offered by a provider plugin. `invoke`
* behaves differently in the case that options contains `{async:true}` or not.
* Dynamically invokes the function `tok`, which is offered by a provider
* plugin. `invoke` behaves differently in the case that options contains
* `{async:true}` or not.
*
* In the case where `{async:true}` is present in the options bag:
*
* 1. the result of `invoke` will be a Promise resolved to the result value of the provider plugin.
* 2. the `props` inputs can be a bag of computed values (including, `T`s, `Promise<T>`s,
* `Output<T>`s etc.).
* 1. the result of `invoke` will be a Promise resolved to the result value of
* the provider plugin.
*
* 2. the `props` inputs can be a bag of computed values (including, `T`s,
* `Promise<T>`s, `Output<T>`s etc.).
*
* In the case where `{async:true}` is not present in the options bag:
* In the case where `{ async:true }` is not present in the options bag:
*
* 1. the result of `invoke` will be a Promise resolved to the result value of the provider call.
* However, that Promise will *also* have the respective values of the Provider result exposed
* directly on it as properties.
* 1. the result of `invoke` will be a Promise resolved to the result value of
* the provider call. However, that Promise will *also* have the respective
* values of the Provider result exposed directly on it as properties.
*
* 2. The inputs must be a bag of simple values, and the result is the result that the Provider
* produced.
* 2. The inputs must be a bag of simple values, and the result is the result
* that the Provider produced.
*
* Simple values are:
*
* 1. `undefined`, `null`, string, number or boolean values.

@@ -32,2 +35,3 @@ * 2. arrays of simple values.

* Importantly, simple values do *not* include:
*
* 1. `Promise`s

@@ -38,4 +42,4 @@ * 2. `Output`s

*
* All of these contain async values that would prevent `invoke from being able to operate
* synchronously.
* All of these contain async values that would prevent `invoke from being able
* to operate synchronously.
*/

@@ -45,2 +49,7 @@ export declare function invoke(tok: string, props: Inputs, opts?: InvokeOptions): Promise<any>;

export declare function streamInvoke(tok: string, props: Inputs, opts?: InvokeOptions): Promise<StreamInvokeResponse<any>>;
/**
* {@link StreamInvokeResponse} represents a (potentially infinite) streaming
* response to `streamInvoke`, with facilities to gracefully cancel and clean up
* the stream.
*/
export declare class StreamInvokeResponse<T> implements AsyncIterable<T> {

@@ -54,4 +63,4 @@ private source;

/**
* `call` dynamically calls the function, `tok`, which is offered by a provider plugin.
* Dynamically calls the function `tok`, which is offered by a provider plugin.
*/
export declare function call<T>(tok: string, props: Inputs, res?: Resource): Output<T>;

@@ -44,22 +44,25 @@ "use strict";

/**
* `invoke` dynamically invokes the function, `tok`, which is offered by a provider plugin. `invoke`
* behaves differently in the case that options contains `{async:true}` or not.
* Dynamically invokes the function `tok`, which is offered by a provider
* plugin. `invoke` behaves differently in the case that options contains
* `{async:true}` or not.
*
* In the case where `{async:true}` is present in the options bag:
*
* 1. the result of `invoke` will be a Promise resolved to the result value of the provider plugin.
* 2. the `props` inputs can be a bag of computed values (including, `T`s, `Promise<T>`s,
* `Output<T>`s etc.).
* 1. the result of `invoke` will be a Promise resolved to the result value of
* the provider plugin.
*
* 2. the `props` inputs can be a bag of computed values (including, `T`s,
* `Promise<T>`s, `Output<T>`s etc.).
*
* In the case where `{async:true}` is not present in the options bag:
* In the case where `{ async:true }` is not present in the options bag:
*
* 1. the result of `invoke` will be a Promise resolved to the result value of the provider call.
* However, that Promise will *also* have the respective values of the Provider result exposed
* directly on it as properties.
* 1. the result of `invoke` will be a Promise resolved to the result value of
* the provider call. However, that Promise will *also* have the respective
* values of the Provider result exposed directly on it as properties.
*
* 2. The inputs must be a bag of simple values, and the result is the result that the Provider
* produced.
* 2. The inputs must be a bag of simple values, and the result is the result
* that the Provider produced.
*
* Simple values are:
*
* 1. `undefined`, `null`, string, number or boolean values.

@@ -70,2 +73,3 @@ * 2. arrays of simple values.

* Importantly, simple values do *not* include:
*
* 1. `Promise`s

@@ -76,4 +80,4 @@ * 2. `Output`s

*
* All of these contain async values that would prevent `invoke from being able to operate
* synchronously.
* All of these contain async values that would prevent `invoke from being able
* to operate synchronously.
*/

@@ -85,4 +89,5 @@ function invoke(tok, props, opts = {}) {

/*
* `invokeSingle` dynamically invokes the function, `tok`, which is offered by a provider plugin.
* Similar to `invoke`, but returns a single value instead of an object with a single key.
* Dynamically invokes the function `tok`, which is offered by a
* provider plugin. Similar to `invoke`, but returns a single value instead of
* an object with a single key.
*/

@@ -176,4 +181,7 @@ function invokeSingle(tok, props, opts = {}) {

}
// StreamInvokeResponse represents a (potentially infinite) streaming response to `streamInvoke`,
// with facilities to gracefully cancel and clean up the stream.
/**
* {@link StreamInvokeResponse} represents a (potentially infinite) streaming
* response to `streamInvoke`, with facilities to gracefully cancel and clean up
* the stream.
*/
class StreamInvokeResponse {

@@ -225,3 +233,3 @@ constructor(source, cancelSource) {

/**
* `call` dynamically calls the function, `tok`, which is offered by a provider plugin.
* Dynamically calls the function `tok`, which is offered by a provider plugin.
*/

@@ -228,0 +236,0 @@ function call(tok, props, res) {

/**
* MockResourceArgs is used to construct a newResource Mock.
* {@link MockResourceArgs} is used to construct a new resource mock.
*/
export interface MockResourceArgs {
/**
* The token that indicates which resource type is being constructed. This token is of the form "package:module:type".
* The token that indicates which resource type is being constructed. This
* token is of the form "package:module:type".
*/

@@ -18,11 +19,14 @@ type: string;

/**
* If provided, the identifier of the provider instance being used to manage this resource.
* If provided, the identifier of the provider instance being used to manage
* this resource.
*/
provider?: string;
/**
* Specifies whether or not the resource is Custom (i.e. managed by a resource provider).
* Specifies whether or not the resource is Custom (i.e. managed by a
* resource provider).
*/
custom?: boolean;
/**
* If provided, the physical identifier of an existing resource to read or import.
* If provided, the physical identifier of an existing resource to read or
* import.
*/

@@ -32,4 +36,5 @@ id?: string;

/**
* MockResourceResult is the result of a newResource Mock, returning a physical identifier and the output properties
* for the resource being constructed.
* {@link MockResourceResult} is the result of a new resource mock, returning a
* physical identifier and the output properties for the resource being
* constructed.
*/

@@ -41,7 +46,8 @@ export declare type MockResourceResult = {

/**
* MockResourceArgs is used to construct call Mock.
* {@link MockResourceArgs} is used to construct call mocks.
*/
export interface MockCallArgs {
/**
* The token that indicates which function is being called. This token is of the form "package:module:function".
* The token that indicates which function is being called. This token is of
* the form "package:module:function".
*/

@@ -54,3 +60,4 @@ token: string;

/**
* If provided, the identifier of the provider instance being used to make the call.
* If provided, the identifier of the provider instance being used to make
* the call.
*/

@@ -60,13 +67,14 @@ provider?: string;

/**
* MockCallResult is the result of a call Mock.
* {@link MockCallResult} is the result of a call mock.
*/
export declare type MockCallResult = Record<string, any>;
/**
* Mocks allows implementations to replace operations normally implemented by the Pulumi engine with
* their own implementations. This can be used during testing to ensure that calls to provider functions and resource constructors
* return predictable values.
* {@link Mocks} allows implementations to replace operations normally
* implemented by the Pulumi engine with their own implementations. This can be
* used during testing to ensure that calls to provider functions and resource
* constructors return predictable values.
*/
export interface Mocks {
/**
* Mocks provider-implemented function calls (e.g. aws.get_availability_zones).
* Mocks provider-implemented function calls (e.g. `aws.get_availability_zones`).
*

@@ -77,4 +85,5 @@ * @param args MockCallArgs

/**
* Mocks resource construction calls. This function should return the physical identifier and the output properties
* for the resource being constructed.
* Mocks resource construction calls. This function should return the
* physical identifier and the output properties for the resource being
* constructed.
*

@@ -101,10 +110,15 @@ * @param args MockResourceArgs

/**
* setMocks configures the Pulumi runtime to use the given mocks for testing.
* Configures the Pulumi runtime to use the given mocks for testing.
*
* @param mocks The mocks to use for calls to provider functions and resource construction.
* @param project If provided, the name of the Pulumi project. Defaults to "project".
* @param stack If provided, the name of the Pulumi stack. Defaults to "stack".
* @param preview If provided, indicates whether or not the program is running a preview. Defaults to false.
* @param organization If provided, the name of the Pulumi organization. Defaults to nothing.
* @param mocks
* The mocks to use for calls to provider functions and resource construction.
* @param project
* If provided, the name of the Pulumi project. Defaults to "project".
* @param stack
* If provided, the name of the Pulumi stack. Defaults to "stack".
* @param preview
* If provided, indicates whether or not the program is running a preview. Defaults to false.
* @param organization
* If provided, the name of the Pulumi organization. Defaults to nothing.
*/
export declare function setMocks(mocks: Mocks, project?: string, stack?: string, preview?: boolean, organization?: string): Promise<void>;

@@ -156,9 +156,14 @@ "use strict";

/**
* setMocks configures the Pulumi runtime to use the given mocks for testing.
* Configures the Pulumi runtime to use the given mocks for testing.
*
* @param mocks The mocks to use for calls to provider functions and resource construction.
* @param project If provided, the name of the Pulumi project. Defaults to "project".
* @param stack If provided, the name of the Pulumi stack. Defaults to "stack".
* @param preview If provided, indicates whether or not the program is running a preview. Defaults to false.
* @param organization If provided, the name of the Pulumi organization. Defaults to nothing.
* @param mocks
* The mocks to use for calls to provider functions and resource construction.
* @param project
* If provided, the name of the Pulumi project. Defaults to "project".
* @param stack
* If provided, the name of the Pulumi stack. Defaults to "stack".
* @param preview
* If provided, indicates whether or not the program is running a preview. Defaults to false.
* @param organization
* If provided, the name of the Pulumi organization. Defaults to nothing.
*/

@@ -165,0 +170,0 @@ function setMocks(mocks, project, stack, preview, organization) {

@@ -16,4 +16,5 @@ import * as query from "@pulumi/query";

/**
* Reads an existing custom resource's state from the resource monitor. Note that resources read in this way
* will not be part of the resulting stack's state, as they are presumed to belong to another.
* Reads an existing custom resource's state from the resource monitor. Note
* that resources read in this way will not be part of the resulting stack's
* state, as they are presumed to belong to another.
*/

@@ -23,24 +24,29 @@ export declare function readResource(res: Resource, parent: Resource | undefined, t: string, name: string, props: Inputs, opts: ResourceOptions, sourcePosition?: SourcePosition): void;

/**
* registerResource registers a new resource object with a given type t and name. It returns the auto-generated
* URN and the ID that will resolve after the deployment has completed. All properties will be initialized to property
* objects that the registration operation will resolve at the right time (or remain unresolved for deployments).
* registerResource registers a new resource object with a given type `t` and
* `name`. It returns the auto-generated URN and the ID that will resolve after
* the deployment has completed. All properties will be initialized to property
* objects that the registration operation will resolve at the right time (or
* remain unresolved for deployments).
*/
export declare function registerResource(res: Resource, parent: Resource | undefined, t: string, name: string, custom: boolean, remote: boolean, newDependency: (urn: URN) => Resource, props: Inputs, opts: ResourceOptions, sourcePosition?: SourcePosition): void;
/**
* registerResourceOutputs completes the resource registration, attaching an optional set of computed outputs.
* Completes a resource registration, attaching an optional set of computed
* outputs.
*/
export declare function registerResourceOutputs(res: Resource, outputs: Inputs | Promise<Inputs> | Output<Inputs>): void;
/**
* listResourceOutputs returns the resource outputs (if any) for a stack, or an error if the stack
* cannot be found. Resources are retrieved from the latest stack snapshot, which may include
* ongoing updates.
* Returns the resource outputs (if any) for a stack, or an error if the stack
* cannot be found. Resources are retrieved from the latest stack snapshot,
* which may include ongoing updates. For example:
*
* @param stackName Name of stack to retrieve resource outputs for. Defaults to the current stack.
* @param typeFilter A [type
* guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards)
* that specifies which resource types to list outputs of.
* ```typescript
* const buckets = pulumi.runtime.listResourceOutput(aws.s3.Bucket.isInstance);
* ```
*
* @example
* const buckets = pulumi.runtime.listResourceOutput(aws.s3.Bucket.isInstance);
* @param stackName
* Name of stack to retrieve resource outputs for. Defaults to the current stack.
* @param typeFilter
* A [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards)
* that specifies which resource types to list outputs of.
*/
export declare function listResourceOutputs<U extends Resource>(typeFilter?: (o: any) => o is U, stackName?: string): query.AsyncQueryable<ResolvedResource<U>>;

@@ -149,4 +149,5 @@ "use strict";

/**
* Reads an existing custom resource's state from the resource monitor. Note that resources read in this way
* will not be part of the resulting stack's state, as they are presumed to belong to another.
* Reads an existing custom resource's state from the resource monitor. Note
* that resources read in this way will not be part of the resulting stack's
* state, as they are presumed to belong to another.
*/

@@ -289,5 +290,7 @@ function readResource(res, parent, t, name, props, opts, sourcePosition) {

/**
* registerResource registers a new resource object with a given type t and name. It returns the auto-generated
* URN and the ID that will resolve after the deployment has completed. All properties will be initialized to property
* objects that the registration operation will resolve at the right time (or remain unresolved for deployments).
* registerResource registers a new resource object with a given type `t` and
* `name`. It returns the auto-generated URN and the ID that will resolve after
* the deployment has completed. All properties will be initialized to property
* objects that the registration operation will resolve at the right time (or
* remain unresolved for deployments).
*/

@@ -459,5 +462,7 @@ function registerResource(res, parent, t, name, custom, remote, newDependency, props, opts, sourcePosition) {

exports.registerResource = registerResource;
/** @internal
* Prepares for an RPC that will manufacture a resource, and hence deals with input and output
* properties.
/**
* Prepares for an RPC that will manufacture a resource, and hence deals with
* input and output properties.
*
* @internal
*/

@@ -656,3 +661,5 @@ function prepareResource(label, res, parent, custom, remote, props, opts, type, name) {

}
/** @internal */
/**
* @internal
*/
function getAllTransitivelyReferencedResourceURNs(resources, exclude) {

@@ -697,4 +704,5 @@ return __awaiter(this, void 0, void 0, function* () {

/**
* Recursively walk the resources passed in, returning them and all resources reachable from
* [Resource.__childResources] through any **Component** resources we encounter.
* Recursively walk the resources passed in, returning them and all resources
* reachable from {@link Resource.__childResources} through any **component**
* resources we encounter.
*/

@@ -734,3 +742,4 @@ function getTransitivelyReferencedChildResourcesOfComponentResources(resources, exclude) {

/**
* Gathers explicit dependent Resources from a list of Resources (possibly Promises and/or Outputs).
* Gathers explicit dependent Resources from a list of Resources (possibly
* Promises and/or Outputs).
*/

@@ -769,3 +778,4 @@ function gatherExplicitDependencies(dependsOn) {

/**
* Finishes a resource creation RPC operation by resolving its outputs to the resulting RPC payload.
* Finishes a resource creation RPC operation by resolving its outputs to the
* resulting RPC payload.
*/

@@ -799,3 +809,4 @@ function resolveOutputs(res, t, name, props, outputs, deps, resolvers, err, keepUnknowns) {

/**
* registerResourceOutputs completes the resource registration, attaching an optional set of computed outputs.
* Completes a resource registration, attaching an optional set of computed
* outputs.
*/

@@ -851,13 +862,15 @@ function registerResourceOutputs(res, outputs) {

/**
* listResourceOutputs returns the resource outputs (if any) for a stack, or an error if the stack
* cannot be found. Resources are retrieved from the latest stack snapshot, which may include
* ongoing updates.
* Returns the resource outputs (if any) for a stack, or an error if the stack
* cannot be found. Resources are retrieved from the latest stack snapshot,
* which may include ongoing updates. For example:
*
* @param stackName Name of stack to retrieve resource outputs for. Defaults to the current stack.
* @param typeFilter A [type
* guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards)
* that specifies which resource types to list outputs of.
* ```typescript
* const buckets = pulumi.runtime.listResourceOutput(aws.s3.Bucket.isInstance);
* ```
*
* @example
* const buckets = pulumi.runtime.listResourceOutput(aws.s3.Bucket.isInstance);
* @param stackName
* Name of stack to retrieve resource outputs for. Defaults to the current stack.
* @param typeFilter
* A [type guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards)
* that specifies which resource types to list outputs of.
*/

@@ -879,10 +892,15 @@ function listResourceOutputs(typeFilter, stackName) {

/**
* resourceChain is used to serialize all resource requests. If we don't do this, all resource operations will be
* entirely asynchronous, meaning the dataflow graph that results will determine ordering of operations. This
* causes problems with some resource providers, so for now we will serialize all of them. The issue
* pulumi/pulumi#335 tracks coming up with a long-term solution here.
* resourceChain is used to serialize all resource requests. If we don't do
* this, all resource operations will be entirely asynchronous, meaning the
* dataflow graph that results will determine ordering of operations. This
* causes problems with some resource providers, so for now we will serialize
* all of them. The issue pulumi/pulumi#335 tracks coming up with a long-term
* solution here.
*/
let resourceChain = Promise.resolve();
let resourceChainLabel = undefined;
// runAsyncResourceOp runs an asynchronous resource operation, possibly serializing it as necessary.
/**
* Runs an asynchronous resource operation, possibly serializing it as
* necessary.
*/
function runAsyncResourceOp(label, callback, serial) {

@@ -913,3 +931,4 @@ // Serialize the invocation if necessary.

/**
* Extract the pkg from the type token of the form "pkg:module:member".
* Extracts the package from the type token of the form "pkg:module:member".
*
* @internal

@@ -916,0 +935,0 @@ */

@@ -6,12 +6,14 @@ import { Input, Inputs } from "../output";

/**
* transferProperties mutates the 'onto' resource so that it has Promise-valued properties for all
* the 'props' input/output props. *Importantly* all these promises are completely unresolved. This
* is because we don't want anyone to observe the values of these properties until the rpc call to
* registerResource actually returns. This is because the registerResource call may actually
* override input values, and we only want people to see the final value.
* Mutates the `onto` resource so that it has Promise-valued properties for all
* the `props` input/output props. *Importantly* all these promises are
* completely unresolved. This is because we don't want anyone to observe the
* values of these properties until the rpc call to registerResource actually
* returns. This is because the registerResource call may actually override
* input values, and we only want people to see the final value.
*
* The result of this call (beyond the stateful changes to 'onto') is the set of Promise resolvers
* that will be called post-RPC call. When the registerResource RPC call comes back, the values
* that the engine actualy produced will be used to resolve all the unresolved promised placed on
* 'onto'.
* The result of this call (beyond the stateful changes to `onto`) is the set of
* {@link Promise} resolvers that will be called post-RPC call. When the
* {@link registerResource} RPC call comes back, the values that the engine
* actualy produced will be used to resolve all the unresolved promised placed
* on `onto`.
*/

@@ -24,4 +26,4 @@ export declare function transferProperties(onto: Resource, label: string, props: Inputs): OutputResolvers;

/**
* true if we are keeping output values.
* If the monitor does not support output values, they will not be kept, even when this is set to true.
* True if we are keeping output values. If the monitor does not support
* output values, they will not be kept, even when this is set to true.
*/

@@ -31,22 +33,25 @@ keepOutputValues?: boolean;

/**
* serializeResourceProperties walks the props object passed in, awaiting all interior promises besides those for `id`
* and `urn`, creating a reasonable POJO object that can be remoted over to registerResource.
* Walks the props object passed in, awaiting all interior promises besides
* those for `id` and `urn`, creating a reasonable POJO object that can be
* remoted over to {@link registerResource}.
*/
export declare function serializeResourceProperties(label: string, props: Inputs, opts?: SerializationOptions): Promise<[Record<string, any>, Map<string, Set<Resource>>]>;
/**
* serializeProperties walks the props object passed in, awaiting all interior promises, creating a reasonable
* POJO object that can be remoted over to registerResource.
* Walks the props object passed in, awaiting all interior promises, creating a
* reasonable POJO object that can be remoted over to {@link registerResource}.
*/
export declare function serializeProperties(label: string, props: Inputs, opts?: SerializationOptions): Promise<Record<string, any>>;
/**
* deserializeProperties fetches the raw outputs and deserializes them from a gRPC call result.
* Fetches the raw outputs and deserializes them from a gRPC call result.
*/
export declare function deserializeProperties(outputsStruct: gstruct.Struct, keepUnknowns?: boolean): Inputs;
/**
* resolveProperties takes as input a gRPC serialized proto.google.protobuf.Struct and resolves all
* of the resource's matching properties to the values inside.
* Takes as input a gRPC serialized `proto.google.protobuf.Struct` and resolves
* all of the resource's matching properties to the values inside.
*
* NOTE: it is imperative that the properties in `allProps` were produced by `deserializeProperties` in order for
* output properties to work correctly w.r.t. knowns/unknowns: this function assumes that any undefined value in
* `allProps`represents an unknown value that was returned by an engine operation.
* NOTE: it is imperative that the properties in `allProps` were produced by
* `deserializeProperties` in order for output properties to work correctly
* w.r.t. knowns/unknowns: this function assumes that any undefined value in
* `allProps`represents an unknown value that was returned by an engine
* operation.
*/

@@ -59,52 +64,72 @@ export declare function resolveProperties(res: Resource, resolvers: Record<string, (v: any, isKnown: boolean, isSecret: boolean, deps?: Resource[], err?: Error) => void>, t: string, name: string, allProps: any, deps: Record<string, Resource[]>, err?: Error, keepUnknowns?: boolean): void;

/**
* specialSigKey is sometimes used to encode type identity inside of a map. See sdk/go/common/resource/properties.go.
* {@link specialSigKey} is sometimes used to encode type identity inside of a
* map.
*
* @see sdk/go/common/resource/properties.go.
*/
export declare const specialSigKey = "4dabf18193072939515e22adb298388d";
/**
* specialAssetSig is a randomly assigned hash used to identify assets in maps. See sdk/go/common/resource/asset.go.
* {@link specialAssetSig} is a randomly assigned hash used to identify assets
* in maps.
*
* @see sdk/go/common/resource/asset.go.
*/
export declare const specialAssetSig = "c44067f5952c0a294b673a41bacd8c17";
/**
* specialArchiveSig is a randomly assigned hash used to identify archives in maps. See sdk/go/common/resource/asset.go.
* {@link specialArchiveSig} is a randomly assigned hash used to identify
* archives in maps.
*
* @see sdk/go/common/resource/asset.go.
*/
export declare const specialArchiveSig = "0def7320c3a5731c473e5ecbe6d01bc7";
/**
* specialSecretSig is a randomly assigned hash used to identify secrets in maps.
* See sdk/go/common/resource/properties.go.
* {@link specialSecretSig} is a randomly assigned hash used to identify secrets
* in maps.
*
* @see sdk/go/common/resource/properties.go.
*/
export declare const specialSecretSig = "1b47061264138c4ac30d75fd1eb44270";
/**
* specialResourceSig is a randomly assigned hash used to identify resources in maps.
* See sdk/go/common/resource/properties.go.
* {@link specialResourceSig} is a randomly assigned hash used to identify
* resources in maps.
*
* @see sdk/go/common/resource/properties.go.
*/
export declare const specialResourceSig = "5cf8f73096256a8f31e491e813e4eb8e";
/**
* specialOutputValueSig is a randomly assigned hash used to identify outputs in maps.
* See sdk/go/common/resource/properties.go.
* {@link specialOutputValueSig} is a randomly assigned hash used to identify
* outputs in maps.
*
* @see sdk/go/common/resource/properties.go.
*/
export declare const specialOutputValueSig = "d0e6a833031e9bbcd3f4e8bde6ca49a4";
/**
* serializeProperty serializes properties deeply. This understands how to wait on any unresolved promises, as
* appropriate, in addition to translating certain "special" values so that they are ready to go on the wire.
* Serializes properties deeply. This understands how to wait on any unresolved
* promises, as appropriate, in addition to translating certain "special" values
* so that they are ready to go on the wire.
*/
export declare function serializeProperty(ctx: string, prop: Input<any>, dependentResources: Set<Resource>, opts?: SerializationOptions): Promise<any>;
/**
* isRpcSecret returns true if obj is a wrapped secret value (i.e. it's an object with the special key set).
* Returns true if the given object is a wrapped secret value (i.e. it's an
* object with the special key set).
*/
export declare function isRpcSecret(obj: any): boolean;
/**
* unwrapRpcSecret returns the underlying value for a secret, or the value itself if it was not a secret.
* Returns the underlying value for a secret, or the value itself if it was not
* a secret.
*/
export declare function unwrapRpcSecret(obj: any): any;
/**
* deserializeProperty unpacks some special types, reversing the above process.
* Unpacks some special types, reversing the process undertaken by
* {@link serializeProperty}.
*/
export declare function deserializeProperty(prop: any, keepUnknowns?: boolean): any;
/**
* suppressUnhandledGrpcRejections silences any unhandled promise rejections that occur due to gRPC errors. The input
* promise may still be rejected.
* Silences any unhandled promise rejections that occur due to gRPC errors. The
* input promise may still be rejected.
*/
export declare function suppressUnhandledGrpcRejections<T>(p: Promise<T>): Promise<T>;
/**
* A ResourcePackage is a type that understands how to construct resource providers given a name, type, args, and URN.
* A {@link ResourcePackage} is a type that understands how to construct
* resource providers given a name, type, args, and URN.
*/

@@ -116,4 +141,5 @@ export interface ResourcePackage {

/**
* registerResourcePackage registers a resource package that will be used to construct providers for any URNs matching
* the package name and version that are deserialized by the current instance of the Pulumi JavaScript SDK.
* Registers a resource package that will be used to construct providers for any
* URNs matching the package name and version that are deserialized by the
* current instance of the Pulumi JavaScript SDK.
*/

@@ -123,3 +149,4 @@ export declare function registerResourcePackage(pkg: string, resourcePackage: ResourcePackage): void;

/**
* A ResourceModule is a type that understands how to construct resources given a name, type, args, and URN.
* A {@link ResourceModule} is a type that understands how to construct
* resources given a name, type, args, and URN.
*/

@@ -131,6 +158,7 @@ export interface ResourceModule {

/**
* registerResourceModule registers a resource module that will be used to construct resources for any URNs matching
* the module name and version that are deserialized by the current instance of the Pulumi JavaScript SDK.
* Registers a resource module that will be used to construct resources for any
* URNs matching the module name and version that are deserialized by the
* current instance of the Pulumi JavaScript SDK.
*/
export declare function registerResourceModule(pkg: string, mod: string, module: ResourceModule): void;
export declare function getResourceModule(pkg: string, mod: string, version: string | undefined): ResourceModule | undefined;

@@ -43,12 +43,14 @@ "use strict";

/**
* transferProperties mutates the 'onto' resource so that it has Promise-valued properties for all
* the 'props' input/output props. *Importantly* all these promises are completely unresolved. This
* is because we don't want anyone to observe the values of these properties until the rpc call to
* registerResource actually returns. This is because the registerResource call may actually
* override input values, and we only want people to see the final value.
* Mutates the `onto` resource so that it has Promise-valued properties for all
* the `props` input/output props. *Importantly* all these promises are
* completely unresolved. This is because we don't want anyone to observe the
* values of these properties until the rpc call to registerResource actually
* returns. This is because the registerResource call may actually override
* input values, and we only want people to see the final value.
*
* The result of this call (beyond the stateful changes to 'onto') is the set of Promise resolvers
* that will be called post-RPC call. When the registerResource RPC call comes back, the values
* that the engine actualy produced will be used to resolve all the unresolved promised placed on
* 'onto'.
* The result of this call (beyond the stateful changes to `onto`) is the set of
* {@link Promise} resolvers that will be called post-RPC call. When the
* {@link registerResource} RPC call comes back, the values that the engine
* actualy produced will be used to resolve all the unresolved promised placed
* on `onto`.
*/

@@ -113,5 +115,5 @@ function transferProperties(onto, label, props) {

/**
* serializeFilteredProperties walks the props object passed in, awaiting all interior promises for
* properties with keys that match the provided filter, creating a reasonable POJO object that can
* be remoted over to registerResource.
* Walks the props object passed in, awaiting all interior promises for
* properties with keys that match the provided filter, creating a reasonable
* POJO object that can be remoted over to {@link registerResource}.
*/

@@ -137,4 +139,5 @@ function serializeFilteredProperties(label, props, acceptKey, opts) {

/**
* serializeResourceProperties walks the props object passed in, awaiting all interior promises besides those for `id`
* and `urn`, creating a reasonable POJO object that can be remoted over to registerResource.
* Walks the props object passed in, awaiting all interior promises besides
* those for `id` and `urn`, creating a reasonable POJO object that can be
* remoted over to {@link registerResource}.
*/

@@ -148,4 +151,4 @@ function serializeResourceProperties(label, props, opts) {

/**
* serializeProperties walks the props object passed in, awaiting all interior promises, creating a reasonable
* POJO object that can be remoted over to registerResource.
* Walks the props object passed in, awaiting all interior promises, creating a
* reasonable POJO object that can be remoted over to {@link registerResource}.
*/

@@ -159,3 +162,5 @@ function serializeProperties(label, props, opts) {

exports.serializeProperties = serializeProperties;
/** @internal */
/**
* @internal
*/
function serializePropertiesReturnDeps(label, props, opts) {

@@ -168,3 +173,3 @@ return __awaiter(this, void 0, void 0, function* () {

/**
* deserializeProperties fetches the raw outputs and deserializes them from a gRPC call result.
* Fetches the raw outputs and deserializes them from a gRPC call result.
*/

@@ -184,8 +189,10 @@ function deserializeProperties(outputsStruct, keepUnknowns) {

/**
* resolveProperties takes as input a gRPC serialized proto.google.protobuf.Struct and resolves all
* of the resource's matching properties to the values inside.
* Takes as input a gRPC serialized `proto.google.protobuf.Struct` and resolves
* all of the resource's matching properties to the values inside.
*
* NOTE: it is imperative that the properties in `allProps` were produced by `deserializeProperties` in order for
* output properties to work correctly w.r.t. knowns/unknowns: this function assumes that any undefined value in
* `allProps`represents an unknown value that was returned by an engine operation.
* NOTE: it is imperative that the properties in `allProps` were produced by
* `deserializeProperties` in order for output properties to work correctly
* w.r.t. knowns/unknowns: this function assumes that any undefined value in
* `allProps`represents an unknown value that was returned by an engine
* operation.
*/

@@ -261,31 +268,47 @@ function resolveProperties(res, resolvers, t, name, allProps, deps, err, keepUnknowns) {

/**
* specialSigKey is sometimes used to encode type identity inside of a map. See sdk/go/common/resource/properties.go.
* {@link specialSigKey} is sometimes used to encode type identity inside of a
* map.
*
* @see sdk/go/common/resource/properties.go.
*/
exports.specialSigKey = "4dabf18193072939515e22adb298388d";
/**
* specialAssetSig is a randomly assigned hash used to identify assets in maps. See sdk/go/common/resource/asset.go.
* {@link specialAssetSig} is a randomly assigned hash used to identify assets
* in maps.
*
* @see sdk/go/common/resource/asset.go.
*/
exports.specialAssetSig = "c44067f5952c0a294b673a41bacd8c17";
/**
* specialArchiveSig is a randomly assigned hash used to identify archives in maps. See sdk/go/common/resource/asset.go.
* {@link specialArchiveSig} is a randomly assigned hash used to identify
* archives in maps.
*
* @see sdk/go/common/resource/asset.go.
*/
exports.specialArchiveSig = "0def7320c3a5731c473e5ecbe6d01bc7";
/**
* specialSecretSig is a randomly assigned hash used to identify secrets in maps.
* See sdk/go/common/resource/properties.go.
* {@link specialSecretSig} is a randomly assigned hash used to identify secrets
* in maps.
*
* @see sdk/go/common/resource/properties.go.
*/
exports.specialSecretSig = "1b47061264138c4ac30d75fd1eb44270";
/**
* specialResourceSig is a randomly assigned hash used to identify resources in maps.
* See sdk/go/common/resource/properties.go.
* {@link specialResourceSig} is a randomly assigned hash used to identify
* resources in maps.
*
* @see sdk/go/common/resource/properties.go.
*/
exports.specialResourceSig = "5cf8f73096256a8f31e491e813e4eb8e";
/**
* specialOutputValueSig is a randomly assigned hash used to identify outputs in maps.
* See sdk/go/common/resource/properties.go.
* {@link specialOutputValueSig} is a randomly assigned hash used to identify
* outputs in maps.
*
* @see sdk/go/common/resource/properties.go.
*/
exports.specialOutputValueSig = "d0e6a833031e9bbcd3f4e8bde6ca49a4";
/**
* serializeProperty serializes properties deeply. This understands how to wait on any unresolved promises, as
* appropriate, in addition to translating certain "special" values so that they are ready to go on the wire.
* Serializes properties deeply. This understands how to wait on any unresolved
* promises, as appropriate, in addition to translating certain "special" values
* so that they are ready to go on the wire.
*/

@@ -480,3 +503,4 @@ function serializeProperty(ctx, prop, dependentResources, opts) {

/**
* isRpcSecret returns true if obj is a wrapped secret value (i.e. it's an object with the special key set).
* Returns true if the given object is a wrapped secret value (i.e. it's an
* object with the special key set).
*/

@@ -488,3 +512,4 @@ function isRpcSecret(obj) {

/**
* unwrapRpcSecret returns the underlying value for a secret, or the value itself if it was not a secret.
* Returns the underlying value for a secret, or the value itself if it was not
* a secret.
*/

@@ -499,3 +524,4 @@ function unwrapRpcSecret(obj) {

/**
* deserializeProperty unpacks some special types, reversing the above process.
* Unpacks some special types, reversing the process undertaken by
* {@link serializeProperty}.
*/

@@ -643,4 +669,4 @@ function deserializeProperty(prop, keepUnknowns) {

/**
* suppressUnhandledGrpcRejections silences any unhandled promise rejections that occur due to gRPC errors. The input
* promise may still be rejected.
* Silences any unhandled promise rejections that occur due to gRPC errors. The
* input promise may still be rejected.
*/

@@ -666,3 +692,5 @@ function suppressUnhandledGrpcRejections(p) {

}
/** @internal */
/**
* @internal
*/
function register(source, registrationType, key, item) {

@@ -695,3 +723,5 @@ let items = source.get(key);

exports.register = register;
/** @internal */
/**
* @internal
*/
function getRegistration(source, key, version) {

@@ -716,3 +746,6 @@ var _a;

const resourcePackages = new Map();
/** @internal Used only for testing purposes. */
/**
* @internal
* Used only for testing purposes.
*/
function _resetResourcePackages() {

@@ -723,4 +756,5 @@ resourcePackages.clear();

/**
* registerResourcePackage registers a resource package that will be used to construct providers for any URNs matching
* the package name and version that are deserialized by the current instance of the Pulumi JavaScript SDK.
* Registers a resource package that will be used to construct providers for any
* URNs matching the package name and version that are deserialized by the
* current instance of the Pulumi JavaScript SDK.
*/

@@ -739,3 +773,6 @@ function registerResourcePackage(pkg, resourcePackage) {

}
/** @internal Used only for testing purposes. */
/**
* @internal
* Used only for testing purposes.
*/
function _resetResourceModules() {

@@ -746,4 +783,5 @@ resourceModules.clear();

/**
* registerResourceModule registers a resource module that will be used to construct resources for any URNs matching
* the module name and version that are deserialized by the current instance of the Pulumi JavaScript SDK.
* Registers a resource module that will be used to construct resources for any
* URNs matching the module name and version that are deserialized by the
* current instance of the Pulumi JavaScript SDK.
*/

@@ -750,0 +788,0 @@ function registerResourceModule(pkg, mod, module) {

@@ -6,31 +6,72 @@ import { ComponentResource } from "../resource";

/**
* excessiveDebugOutput enables, well, pretty excessive debug output pertaining to resources and properties.
* excessiveDebugOutput enables, well, pretty excessive debug output pertaining
* to resources and properties.
*/
export declare const excessiveDebugOutput: boolean;
/**
* Options is a bag of settings that controls the behavior of previews and deployments
* {@link Options} is a bag of settings that controls the behavior of previews
* and deployments.
*/
export interface Options {
/**
* The name of the current project.
*/
readonly project?: string;
/**
* The name of the current stack being deployed into.
*/
readonly stack?: string;
/**
* The degree of parallelism for resource operations (default is serial).
*/
readonly parallel?: number;
/**
* A connection string to the engine's RPC, in case we need to reestablish.
*/
readonly engineAddr?: string;
/**
* A connection string to the monitor's RPC, in case we need to reestablish.
*/
readonly monitorAddr?: string;
/**
* Whether we are performing a preview (true) or a real deployment (false).
*/
readonly dryRun?: boolean;
/**
* True if we're in testing mode (allows execution without the CLI).
*/
readonly testModeEnabled?: boolean;
/**
* True if we're in query mode (does not allow resource registration).
*/
readonly queryMode?: boolean;
/**
* True if we will resolve missing outputs to inputs during preview.
*/
readonly legacyApply?: boolean;
/**
* True if we will cache serialized dynamic providers on the program side.
*/
readonly cacheDynamicProviders?: boolean;
/**
* The name of the current organization.
*/
readonly organization?: string;
/**
* Directory containing the send/receive files for making synchronous invokes to the engine.
* A directory containing the send/receive files for making synchronous
* invokes to the engine.
*/
readonly syncDir?: string;
}
/**
* Resets NodeJS runtime global state (such as RPC clients), and sets NodeJS
* runtime option environment variables to the specified values.
*/
export declare function resetOptions(project: string, stack: string, parallel: number, engineAddr: string, monitorAddr: string, preview: boolean, organization: string): void;
export declare function setMockOptions(mockMonitor: any, project?: string, stack?: string, preview?: boolean, organization?: string): void;
/**
* Returns whether or not we are currently doing a preview.
* Returns true if we are currently doing a preview.
*
* When writing unit tests, you can set this flag via either `setMocks` or `_setIsDryRun`.
* When writing unit tests, you can set this flag via either `setMocks` or
* `_setIsDryRun`.
*/

@@ -43,7 +84,9 @@ export declare function isDryRun(): boolean;

/**
* Returns true if we will resolve missing outputs to inputs during preview (PULUMI_ENABLE_LEGACY_APPLY).
* Returns true if we will resolve missing outputs to inputs during preview
* (`PULUMI_ENABLE_LEGACY_APPLY`).
*/
export declare function isLegacyApplyEnabled(): boolean;
/**
* Returns true (default) if we will cache serialized dynamic providers on the program side
* Returns true if we will cache serialized dynamic providers on the program
* side (the default is true).
*/

@@ -64,7 +107,8 @@ export declare function cacheDynamicProviders(): boolean;

/**
* hasMonitor returns true if we are currently connected to a resource monitoring service.
* Returns true if we are currently connected to a resource monitoring service.
*/
export declare function hasMonitor(): boolean;
/**
* getMonitor returns the current resource monitoring service client for RPC communications.
* Returns the current resource monitoring service client for RPC
* communications.
*/

@@ -77,11 +121,12 @@ export declare function getMonitor(): resrpc.IResourceMonitorClient | undefined;

/**
* getCallbacks returns the current callbacks for RPC communications.
* Returns the current callbacks for RPC communications.
*/
export declare function getCallbacks(): ICallbackServer | undefined;
/**
* hasEngine returns true if we are currently connected to an engine.
* Returns true if we are currently connected to an engine.
*/
export declare function hasEngine(): boolean;
/**
* getEngine returns the current engine, if any, for RPC communications back to the resource engine.
* Returns the current engine, if any, for RPC communications back to the
* resource engine.
*/

@@ -91,27 +136,31 @@ export declare function getEngine(): engrpc.IEngineClient | undefined;

/**
* serialize returns true if resource operations should be serialized.
* Returns true if resource operations should be serialized.
*/
export declare function serialize(): boolean;
/**
* disconnect permanently disconnects from the server, closing the connections. It waits for the existing RPC
* queue to drain. If any RPCs come in afterwards, however, they will crash the process.
* Permanently disconnects from the server, closing the connections. It waits
* for the existing RPC queue to drain. If any RPCs come in afterwards,
* however, they will crash the process.
*/
export declare function disconnect(): Promise<void>;
/**
* getMaximumListeners returns the configured number of process listeners available
* Returns the configured number of process listeners available.
*/
export declare function getMaximumListeners(): number;
/**
* disconnectSync permanently disconnects from the server, closing the connections. Unlike `disconnect`. it does not
* wait for the existing RPC queue to drain. Any RPCs that come in after this call will crash the process.
* Permanently disconnects from the server, closing the connections. Unlike
* `disconnect`. it does not wait for the existing RPC queue to drain. Any RPCs
* that come in after this call will crash the process.
*/
export declare function disconnectSync(): void;
/**
* rpcKeepAlive registers a pending call to ensure that we don't prematurely disconnect from the server. It returns
* a function that, when invoked, signals that the RPC has completed.
* Registers a pending call to ensure that we don't prematurely disconnect from
* the server. It returns a function that, when invoked, signals that the RPC
* has completed.
*/
export declare function rpcKeepAlive(): () => void;
/**
* setRootResource registers a resource that will become the default parent for all resources without explicit parents.
* Registers a resource that will become the default parent for all resources
* without explicit parents.
*/
export declare function setRootResource(res: ComponentResource): Promise<void>;

@@ -42,8 +42,12 @@ "use strict";

const resproto = __importStar(require("../proto/resource_pb"));
// maxRPCMessageSize raises the gRPC Max Message size from `4194304` (4mb) to `419430400` (400mb)
/** @internal */
/**
* Raises the gRPC Max Message size from `4194304` (4mb) to `419430400` (400mb).
*
* @internal
*/
exports.maxRPCMessageSize = 1024 * 1024 * 400;
const grpcChannelOptions = { "grpc.max_receive_message_length": exports.maxRPCMessageSize };
/**
* excessiveDebugOutput enables, well, pretty excessive debug output pertaining to resources and properties.
* excessiveDebugOutput enables, well, pretty excessive debug output pertaining
* to resources and properties.
*/

@@ -53,4 +57,6 @@ exports.excessiveDebugOutput = false;

let engine;
// reset options resets nodejs runtime global state (such as rpc clients),
// and sets nodejs runtime option env vars to the specified values.
/**
* Resets NodeJS runtime global state (such as RPC clients), and sets NodeJS
* runtime option environment variables to the specified values.
*/
function resetOptions(project, stack, parallel, engineAddr, monitorAddr, preview, organization) {

@@ -91,3 +97,6 @@ const store = state_1.getStore();

exports.setMockOptions = setMockOptions;
/** @internal Used only for testing purposes. */
/**
* @internal
* Used only for testing purposes.
*/
function _setIsDryRun(val) {

@@ -99,5 +108,6 @@ const { settings } = state_1.getStore();

/**
* Returns whether or not we are currently doing a preview.
* Returns true if we are currently doing a preview.
*
* When writing unit tests, you can set this flag via either `setMocks` or `_setIsDryRun`.
* When writing unit tests, you can set this flag via either `setMocks` or
* `_setIsDryRun`.
*/

@@ -109,4 +119,4 @@ function isDryRun() {

/**
* monitorSupportsFeature returns a promise that when resolved tells you if the resource monitor we are connected
* to is able to support a particular feature.
* Returns a promise that when resolved tells you if the resource monitor we are
* connected to is able to support a particular feature.
*

@@ -139,3 +149,4 @@ * @internal

/**
* Queries the resource monitor for its capabilities and sets the appropriate flags in the store.
* Queries the resource monitor for its capabilities and sets the appropriate
* flags in the store.
*

@@ -159,3 +170,6 @@ * @internal

exports.awaitFeatureSupport = awaitFeatureSupport;
/** @internal Used only for testing purposes. */
/**
* @internal
* Used only for testing purposes.
*/
function _setQueryMode(val) {

@@ -166,3 +180,6 @@ const { settings } = state_1.getStore();

exports._setQueryMode = _setQueryMode;
/** @internal Used only for testing purposes */
/**
* @internal
* Used only for testing purposes.
*/
function _reset() {

@@ -180,3 +197,4 @@ resetOptions("", "", -1, "", "", false, "");

/**
* Returns true if we will resolve missing outputs to inputs during preview (PULUMI_ENABLE_LEGACY_APPLY).
* Returns true if we will resolve missing outputs to inputs during preview
* (`PULUMI_ENABLE_LEGACY_APPLY`).
*/

@@ -188,3 +206,4 @@ function isLegacyApplyEnabled() {

/**
* Returns true (default) if we will cache serialized dynamic providers on the program side
* Returns true if we will cache serialized dynamic providers on the program
* side (the default is true).
*/

@@ -208,3 +227,6 @@ function cacheDynamicProviders() {

exports.getOrganization = getOrganization;
/** @internal Used only for testing purposes. */
/**
* @internal
* Used only for testing purposes.
*/
function _setOrganization(val) {

@@ -224,3 +246,6 @@ const { settings } = state_1.getStore();

exports.getProject = getProject;
/** @internal Used only for testing purposes. */
/**
* @internal
* Used only for testing purposes.
*/
function _setProject(val) {

@@ -240,3 +265,6 @@ const { settings } = state_1.getStore();

exports.getStack = getStack;
/** @internal Used only for testing purposes. */
/**
* @internal
* Used only for testing purposes.
*/
function _setStack(val) {

@@ -249,3 +277,3 @@ const { settings } = state_1.getStore();

/**
* hasMonitor returns true if we are currently connected to a resource monitoring service.
* Returns true if we are currently connected to a resource monitoring service.
*/

@@ -257,3 +285,4 @@ function hasMonitor() {

/**
* getMonitor returns the current resource monitoring service client for RPC communications.
* Returns the current resource monitoring service client for RPC
* communications.
*/

@@ -300,3 +329,3 @@ function getMonitor() {

/**
* getCallbacks returns the current callbacks for RPC communications.
* Returns the current callbacks for RPC communications.
*/

@@ -319,3 +348,5 @@ function getCallbacks() {

let syncInvokes;
/** @internal */
/**
* @internal
*/
function tryGetSyncInvokes() {

@@ -332,3 +363,3 @@ const syncDir = options().syncDir;

/**
* hasEngine returns true if we are currently connected to an engine.
* Returns true if we are currently connected to an engine.
*/

@@ -340,3 +371,4 @@ function hasEngine() {

/**
* getEngine returns the current engine, if any, for RPC communications back to the resource engine.
* Returns the current engine, if any, for RPC communications back to the
* resource engine.
*/

@@ -372,3 +404,3 @@ function getEngine() {

/**
* serialize returns true if resource operations should be serialized.
* Returns true if resource operations should be serialized.
*/

@@ -380,11 +412,14 @@ function serialize() {

/**
* options returns the options from the environment, which is the source of truth. Options are global per process.
* For CLI driven programs, pulumi-language-nodejs sets environment variables prior to the user program loading,
* meaning that options could be loaded up front and cached.
* Automation API and multi-language components introduced more complex lifecycles for runtime options().
* These language hosts manage the lifecycle of options manually throughout the lifetime of the nodejs process.
* In addition, node module resolution can lead to duplicate copies of @pulumi/pulumi and thus duplicate options
* objects that may not be synced if options are cached upfront. Mutating options must write to the environment
* Returns the options from the environment, which is the source of truth.
* Options are global per process.
*
* For CLI driven programs, `pulumi-language-nodejs` sets environment variables
* prior to the user program loading, meaning that options could be loaded up
* front and cached. Automation API and multi-language components introduced
* more complex lifecycles for runtime `options()`. These language hosts manage
* the lifecycle of options manually throughout the lifetime of the NodeJS
* process. In addition, NodeJS module resolution can lead to duplicate copies
* of `@pulumi/pulumi` and thus duplicate options objects that may not be synced
* if options are cached upfront. Mutating options must write to the environment
* and reading options must always read directly from the environment.
*/

@@ -396,4 +431,5 @@ function options() {

/**
* disconnect permanently disconnects from the server, closing the connections. It waits for the existing RPC
* queue to drain. If any RPCs come in afterwards, however, they will crash the process.
* Permanently disconnects from the server, closing the connections. It waits
* for the existing RPC queue to drain. If any RPCs come in afterwards,
* however, they will crash the process.
*/

@@ -404,3 +440,5 @@ function disconnect() {

exports.disconnect = disconnect;
/** @internal */
/**
* @internal
*/
function waitForRPCs(disconnectFromServers = false) {

@@ -424,3 +462,3 @@ const localStore = state_1.getStore();

/**
* getMaximumListeners returns the configured number of process listeners available
* Returns the configured number of process listeners available.
*/

@@ -433,4 +471,5 @@ function getMaximumListeners() {

/**
* disconnectSync permanently disconnects from the server, closing the connections. Unlike `disconnect`. it does not
* wait for the existing RPC queue to drain. Any RPCs that come in after this call will crash the process.
* Permanently disconnects from the server, closing the connections. Unlike
* `disconnect`. it does not wait for the existing RPC queue to drain. Any RPCs
* that come in after this call will crash the process.
*/

@@ -465,4 +504,5 @@ function disconnectSync() {

/**
* rpcKeepAlive registers a pending call to ensure that we don't prematurely disconnect from the server. It returns
* a function that, when invoked, signals that the RPC has completed.
* Registers a pending call to ensure that we don't prematurely disconnect from
* the server. It returns a function that, when invoked, signals that the RPC
* has completed.
*/

@@ -481,3 +521,4 @@ function rpcKeepAlive() {

/**
* setRootResource registers a resource that will become the default parent for all resources without explicit parents.
* Registers a resource that will become the default parent for all resources
* without explicit parents.
*/

@@ -484,0 +525,0 @@ function setRootResource(res) {

import { Inputs, Output } from "../output";
import { ComponentResource, ResourceTransform, ResourceTransformation } from "../resource";
/**
* rootPulumiStackTypeName is the type name that should be used to construct the root component in the tree of Pulumi
* resources allocated by a deployment. This must be kept up to date with
* `github.com/pulumi/pulumi/sdk/v3/go/common/resource/stack.RootStackType`.
* The type name that should be used to construct the root component in the tree
* of Pulumi resources allocated by a deployment. This must be kept up to date
* with `github.com/pulumi/pulumi/sdk/v3/go/common/resource/stack.RootStackType`.
*/
export declare const rootPulumiStackTypeName = "pulumi:pulumi:Stack";
/**
* runInPulumiStack creates a new Pulumi stack resource and executes the callback inside of it. Any outputs
* returned by the callback will be stored as output properties on this resulting Stack object.
* Creates a new Pulumi stack resource and executes the callback inside of it.
* Any outputs returned by the callback will be stored as output properties on
* this resulting Stack object.
*/
export declare function runInPulumiStack(init: () => Promise<any>): Promise<Inputs | undefined>;
/**
* Stack is the root resource for a Pulumi stack. Before invoking the `init` callback, it registers itself as the root
* resource with the Pulumi engine.
* {@link Stack} is the root resource for a Pulumi stack. Before invoking the
* `init` callback, it registers itself as the root resource with the Pulumi
* engine.
*/

@@ -25,6 +27,8 @@ export declare class Stack extends ComponentResource<Inputs> {

/**
* runInit invokes the given init callback with this resource set as the root resource. The return value of init is
* used as the stack's output properties.
* Invokes the given `init` callback with this resource set as the root
* resource. The return value of init is used as the stack's output
* properties.
*
* @param args.init The callback to run in the context of this Pulumi stack
* @param args.init
* The callback to run in the context of this Pulumi stack
*/

@@ -36,15 +40,19 @@ initialize(args: {

/**
* Add a transformation to all future resources constructed in this Pulumi stack.
* Add a transformation to all future resources constructed in this Pulumi
* stack.
*/
export declare function registerStackTransformation(t: ResourceTransformation): void;
/**
* Add a transformation to all future resources constructed in this Pulumi stack.
* Add a transformation to all future resources constructed in this Pulumi
* stack.
*/
export declare function registerResourceTransform(t: ResourceTransform): void;
/**
* Add a transformation to all future resources constructed in this Pulumi stack.
* Add a transformation to all future resources constructed in this Pulumi
* stack.
*
* @deprecated Use `registerResourceTransform` instead.
* @deprecated
* Use `registerResourceTransform` instead.
*/
export declare function registerStackTransform(t: ResourceTransform): void;
export declare function getStackResource(): Stack | undefined;

@@ -40,10 +40,11 @@ "use strict";

/**
* rootPulumiStackTypeName is the type name that should be used to construct the root component in the tree of Pulumi
* resources allocated by a deployment. This must be kept up to date with
* `github.com/pulumi/pulumi/sdk/v3/go/common/resource/stack.RootStackType`.
* The type name that should be used to construct the root component in the tree
* of Pulumi resources allocated by a deployment. This must be kept up to date
* with `github.com/pulumi/pulumi/sdk/v3/go/common/resource/stack.RootStackType`.
*/
exports.rootPulumiStackTypeName = "pulumi:pulumi:Stack";
/**
* runInPulumiStack creates a new Pulumi stack resource and executes the callback inside of it. Any outputs
* returned by the callback will be stored as output properties on this resulting Stack object.
* Creates a new Pulumi stack resource and executes the callback inside of it.
* Any outputs returned by the callback will be stored as output properties on
* this resulting Stack object.
*/

@@ -61,4 +62,5 @@ function runInPulumiStack(init) {

/**
* Stack is the root resource for a Pulumi stack. Before invoking the `init` callback, it registers itself as the root
* resource with the Pulumi engine.
* {@link Stack} is the root resource for a Pulumi stack. Before invoking the
* `init` callback, it registers itself as the root resource with the Pulumi
* engine.
*/

@@ -76,6 +78,8 @@ class Stack extends resource_1.ComponentResource {

/**
* runInit invokes the given init callback with this resource set as the root resource. The return value of init is
* used as the stack's output properties.
* Invokes the given `init` callback with this resource set as the root
* resource. The return value of init is used as the stack's output
* properties.
*
* @param args.init The callback to run in the context of this Pulumi stack
* @param args.init
* The callback to run in the context of this Pulumi stack
*/

@@ -220,3 +224,4 @@ initialize(args) {

/**
* Add a transformation to all future resources constructed in this Pulumi stack.
* Add a transformation to all future resources constructed in this Pulumi
* stack.
*/

@@ -232,3 +237,4 @@ function registerStackTransformation(t) {

/**
* Add a transformation to all future resources constructed in this Pulumi stack.
* Add a transformation to all future resources constructed in this Pulumi
* stack.
*/

@@ -247,5 +253,7 @@ function registerResourceTransform(t) {

/**
* Add a transformation to all future resources constructed in this Pulumi stack.
* Add a transformation to all future resources constructed in this Pulumi
* stack.
*
* @deprecated Use `registerResourceTransform` instead.
* @deprecated
* Use `registerResourceTransform` instead.
*/

@@ -252,0 +260,0 @@ function registerStackTransform(t) {

@@ -34,3 +34,4 @@ "use strict";

syncDir: "PULUMI_NODEJS_SYNC",
// this value is not set by the CLI and is controlled via a user set env var unlike the values above
// Unlike the values above, this value is not set by the CLI and is
// controlled via a user-set environment variable.
cacheDynamicProviders: "PULUMI_NODEJS_CACHE_DYNAMIC_PROVIDERS",

@@ -42,5 +43,9 @@ organization: "PULUMI_NODEJS_ORGANIZATION",

};
/** @internal */
/**
* @internal
*/
exports.asyncLocalStorage = new async_hooks_1.AsyncLocalStorage();
/** @internal */
/**
* @internal
*/
class LocalStore {

@@ -71,3 +76,3 @@ constructor() {

/**
* leakCandidates tracks the list of potential leak candidates.
* Tracks the list of potential leak candidates.
*/

@@ -85,3 +90,5 @@ this.leakCandidates = new Set();

exports.LocalStore = LocalStore;
/** Get the root stack resource for the current stack deployment
/**
* Get the root stack resource for the current stack deployment.
*
* @internal

@@ -94,3 +101,5 @@ */

exports.getStackResource = getStackResource;
/** @internal */
/**
* @internal
*/
function setStackResource(newStackResource) {

@@ -102,3 +111,5 @@ const localStore = exports.getStore();

exports.setStackResource = setStackResource;
/** @internal */
/**
* @internal
*/
function getLocalStore() {

@@ -117,3 +128,5 @@ return exports.asyncLocalStorage.getStore();

};
/** @internal */
/**
* @internal
*/
exports.getStore = () => {

@@ -120,0 +133,0 @@ const localStore = getLocalStore();

import { Input, Output } from "./output";
import { CustomResource, CustomResourceOptions } from "./resource";
/**
* Manages a reference to a Pulumi stack. The referenced stack's outputs are available via the
* `outputs` property or the `output` method.
* Manages a reference to a Pulumi stack. The referenced stack's outputs are
* available via the {@link StackReference.outputs} property or the
* {@link StackReference.output} method.
*/

@@ -23,50 +24,64 @@ export declare class StackReference extends CustomResource {

/**
* Create a StackReference resource with the given unique name, arguments, and options.
* Create a {@link StackReference} resource with the given unique name,
* arguments, and options.
*
* If args is not specified, the name of the referenced stack will be the name of the StackReference resource.
* If args is not specified, the name of the referenced stack will be the
* name of the {@link StackReference} resource.
*
* @param name The _unique_ name of the stack reference.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
* @param name
* The _unique_ name of the stack reference.
* @param args
* The arguments to use to populate this resource's properties.
* @param opts
* A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: StackReferenceArgs, opts?: CustomResourceOptions);
/**
* Fetches the value of the named stack output, or undefined if the stack output was not found.
* Fetches the value of the named stack output, or `undefined` if the stack
* output was not found.
*
* @param name The name of the stack output to fetch.
* @param name
* The name of the stack output to fetch.
*/
getOutput(name: Input<string>): Output<any>;
/**
* Fetches the value of the named stack output, or throws an error if the output was not found.
* Fetches the value of the named stack output, or throws an error if the
* output was not found.
*
* @param name The name of the stack output to fetch.
* @param name
* The name of the stack output to fetch.
*/
requireOutput(name: Input<string>): Output<any>;
/**
* Fetches the value of the named stack output
* and builds a StackReferenceOutputDetails with it.
* Fetches the value of the named stack output and builds a
* {@link StackReferenceOutputDetails} with it.
*
* The returned object has its `value` or `secretValue` fields set
* depending on wehther the output is a secret.
* Neither field is set if the output was not found.
* The returned object has its `value` or `secretValue` fields set depending
* on wehther the output is a secret. Neither field is set if the output was
* not found.
*
* @param name The name of the stack output to fetch.
* @param name
* The name of the stack output to fetch.
*/
getOutputDetails(name: string): Promise<StackReferenceOutputDetails>;
/**
* Fetches the value promptly of the named stack output. May return undefined if the value is
* not known for some reason.
* Fetches the value promptly of the named stack output. May return
* undefined if the value is not known for some reason.
*
* This operation is not supported (and will throw) if the named stack output is a secret.
* This operation is not supported (and will throw) if the named stack
* output is a secret.
*
* @param name The name of the stack output to fetch.
* @param name
* The name of the stack output to fetch.
*/
getOutputValue(name: string): Promise<any>;
/**
* Fetches the value promptly of the named stack output. Throws an error if the stack output is
* not found.
* Fetches the value promptly of the named stack output. Throws an error if
* the stack output is not found.
*
* This operation is not supported (and will throw) if the named stack output is a secret.
* This operation is not supported (and will throw) if the named stack
* output is a secret.
*
* @param name The name of the stack output to fetch.
* @param name
* The name of the stack output to fetch.
*/

@@ -77,3 +92,3 @@ requireOutputValue(name: string): Promise<any>;

/**
* The set of arguments for constructing a StackReference resource.
* The set of arguments for constructing a {@link StackReference} resource.
*/

@@ -87,16 +102,18 @@ export interface StackReferenceArgs {

/**
* Records the output of a StackReference.
* At most one of th evalue and secretValue fields will be set.
* Records the output of a {@link StackReference}. Exactly one of `value` or
* `secretValue` will be set.
*/
export interface StackReferenceOutputDetails {
/**
* Output value returned by the StackReference.
* This is null if the value is a secret or it does not exist.
* An output value returned by the {@link StackReference}.
*
* This is `null` if the value is a secret or it does not exist.
*/
readonly value?: any;
/**
* Secret value returned by the StackReference.
* This is null if the value is not a secret or it does not exist.
* A secret value returned by the {@link StackReference}.
*
* This is `null` if the value is not a secret or it does not exist.
*/
readonly secretValue?: any;
}

@@ -28,14 +28,20 @@ "use strict";

/**
* Manages a reference to a Pulumi stack. The referenced stack's outputs are available via the
* `outputs` property or the `output` method.
* Manages a reference to a Pulumi stack. The referenced stack's outputs are
* available via the {@link StackReference.outputs} property or the
* {@link StackReference.output} method.
*/
class StackReference extends resource_1.CustomResource {
/**
* Create a StackReference resource with the given unique name, arguments, and options.
* Create a {@link StackReference} resource with the given unique name,
* arguments, and options.
*
* If args is not specified, the name of the referenced stack will be the name of the StackReference resource.
* If args is not specified, the name of the referenced stack will be the
* name of the {@link StackReference} resource.
*
* @param name The _unique_ name of the stack reference.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
* @param name
* The _unique_ name of the stack reference.
* @param args
* The arguments to use to populate this resource's properties.
* @param opts
* A bag of options that control this resource's behavior.
*/

@@ -52,5 +58,7 @@ constructor(name, args, opts) {

/**
* Fetches the value of the named stack output, or undefined if the stack output was not found.
* Fetches the value of the named stack output, or `undefined` if the stack
* output was not found.
*
* @param name The name of the stack output to fetch.
* @param name
* The name of the stack output to fetch.
*/

@@ -67,5 +75,7 @@ getOutput(name) {

/**
* Fetches the value of the named stack output, or throws an error if the output was not found.
* Fetches the value of the named stack output, or throws an error if the
* output was not found.
*
* @param name The name of the stack output to fetch.
* @param name
* The name of the stack output to fetch.
*/

@@ -82,10 +92,11 @@ requireOutput(name) {

/**
* Fetches the value of the named stack output
* and builds a StackReferenceOutputDetails with it.
* Fetches the value of the named stack output and builds a
* {@link StackReferenceOutputDetails} with it.
*
* The returned object has its `value` or `secretValue` fields set
* depending on wehther the output is a secret.
* Neither field is set if the output was not found.
* The returned object has its `value` or `secretValue` fields set depending
* on wehther the output is a secret. Neither field is set if the output was
* not found.
*
* @param name The name of the stack output to fetch.
* @param name
* The name of the stack output to fetch.
*/

@@ -104,8 +115,10 @@ getOutputDetails(name) {

/**
* Fetches the value promptly of the named stack output. May return undefined if the value is
* not known for some reason.
* Fetches the value promptly of the named stack output. May return
* undefined if the value is not known for some reason.
*
* This operation is not supported (and will throw) if the named stack output is a secret.
* This operation is not supported (and will throw) if the named stack
* output is a secret.
*
* @param name The name of the stack output to fetch.
* @param name
* The name of the stack output to fetch.
*/

@@ -122,8 +135,10 @@ getOutputValue(name) {

/**
* Fetches the value promptly of the named stack output. Throws an error if the stack output is
* not found.
* Fetches the value promptly of the named stack output. Throws an error if
* the stack output is not found.
*
* This operation is not supported (and will throw) if the named stack output is a secret.
* This operation is not supported (and will throw) if the named stack
* output is a secret.
*
* @param name The name of the stack output to fetch.
* @param name
* The name of the stack output to fetch.
*/

@@ -130,0 +145,0 @@ requireOutputValue(name) {

@@ -26,3 +26,5 @@ "use strict";

const log = __importStar(require("./log"));
/** @internal */
/**
* @internal
*/
function loadTypeScriptCompilerOptions(tsConfigPath) {

@@ -45,3 +47,5 @@ var _a;

/**
* @internal Determine the strings used for requiring typescript and ts-node.
* Determine the strings used for requiring `typescript` and `ts-node`.
*
* @internal
*/

@@ -48,0 +52,0 @@ function typeScriptRequireStrings() {

@@ -32,3 +32,5 @@ "use strict";

exports.isInstance = isInstance;
/** @internal */
/**
* @internal
*/
function hasTrueBooleanMember(obj, memberName) {

@@ -45,3 +47,5 @@ if (obj === undefined || obj === null) {

exports.hasTrueBooleanMember = hasTrueBooleanMember;
/** @internal */
/**
* @internal
*/
function hasFunctionMember(obj, memberName) {

@@ -58,3 +62,2 @@ if (obj === undefined || obj === null) {

exports.hasFunctionMember = hasFunctionMember;
// Workaround errors we sometimes get on some machines saying that Object.values is not available.
/**

@@ -73,3 +76,5 @@ * A polyfill for Object.values

exports.values = values;
/** @internal */
/**
* @internal
*/
function union(set1, set2) {

@@ -79,7 +84,11 @@ return new Set([...set1, ...set2]);

exports.union = union;
/** @internal */
/**
* @internal
*/
exports.disableResourceReferences = process.env.PULUMI_DISABLE_RESOURCE_REFERENCES === "1" ||
((_a = process.env.PULUMI_DISABLE_RESOURCE_REFERENCES) !== null && _a !== void 0 ? _a : "").toUpperCase() === "TRUE";
/** @internal */
/**
* @internal
*/
exports.errorOutputString = process.env.PULUMI_ERROR_OUTPUT_STRING === "1" || ((_b = process.env.PULUMI_ERROR_OUTPUT_STRING) === null || _b === void 0 ? void 0 : _b.toUpperCase()) === "TRUE";
//# sourceMappingURL=utils.js.map

@@ -1,1 +0,1 @@

export declare const version = "3.124.0";
export declare const version = "3.124.1";

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "3.124.0";
exports.version = "3.124.1-alpha.x26ff819";
//# sourceMappingURL=version.js.map

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

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

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

Sorry, the diff of this file is not supported yet

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

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

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

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

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