@pulumi/pulumi
Advanced tools
Comparing version 3.120.1-alpha.xbefb249 to 3.120.1-alpha.xd79644f
@@ -198,3 +198,3 @@ import { PulumiCommand } from "./cmd"; | ||
*/ | ||
removeStack(stackName: string): Promise<void>; | ||
removeStack(stackName: string, opts?: RemoveOptions): Promise<void>; | ||
/** | ||
@@ -466,1 +466,11 @@ * Adds environments to the end of a stack's import list. Imported environments are merged in order | ||
} | ||
export interface RemoveOptions { | ||
/** | ||
* Forces deletion of the stack, leaving behind any resources managed by the stack | ||
*/ | ||
force?: boolean; | ||
/** | ||
* Do not delete the corresponding Pulumi.<stack-name>.yaml configuration file for the stack | ||
*/ | ||
preserveConfig?: boolean; | ||
} |
@@ -360,5 +360,13 @@ "use strict"; | ||
*/ | ||
removeStack(stackName) { | ||
removeStack(stackName, opts) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
yield this.runPulumiCmd(["stack", "rm", "--yes", stackName]); | ||
const args = ["stack", "rm", "--yes"]; | ||
if (opts === null || opts === void 0 ? void 0 : opts.force) { | ||
args.push("--force"); | ||
} | ||
if (opts === null || opts === void 0 ? void 0 : opts.preserveConfig) { | ||
args.push("--preserve-config"); | ||
} | ||
args.push(stackName); | ||
yield this.runPulumiCmd(args); | ||
}); | ||
@@ -365,0 +373,0 @@ } |
import { PulumiCommand } from "./cmd"; | ||
import { ConfigMap, ConfigValue } from "./config"; | ||
import { ListOptions } from "./localWorkspace"; | ||
import { ListOptions, RemoveOptions } from "./localWorkspace"; | ||
import { ProjectSettings } from "./projectSettings"; | ||
@@ -217,3 +217,3 @@ import { OutputMap } from "./stack"; | ||
*/ | ||
removeStack(stackName: string): Promise<void>; | ||
removeStack(stackName: string, opts?: RemoveOptions): Promise<void>; | ||
/** | ||
@@ -220,0 +220,0 @@ * Returns all Stacks from the underlying backend based on the provided options. |
{ | ||
"name": "@pulumi/pulumi", | ||
"version": "3.120.1-alpha.xbefb249", | ||
"version": "3.120.1-alpha.xd79644f", | ||
"description": "Pulumi's Node.js SDK", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -19,2 +19,3 @@ // package: pulumirpc | ||
installDependencies: ILanguageRuntimeService_IInstallDependencies; | ||
runtimeOptionsPrompts: ILanguageRuntimeService_IRuntimeOptionsPrompts; | ||
about: ILanguageRuntimeService_IAbout; | ||
@@ -65,2 +66,11 @@ getProgramDependencies: ILanguageRuntimeService_IGetProgramDependencies; | ||
} | ||
interface ILanguageRuntimeService_IRuntimeOptionsPrompts extends grpc.MethodDefinition<pulumi_language_pb.RuntimeOptionsRequest, pulumi_language_pb.RuntimeOptionsResponse> { | ||
path: "/pulumirpc.LanguageRuntime/RuntimeOptionsPrompts"; | ||
requestStream: false; | ||
responseStream: false; | ||
requestSerialize: grpc.serialize<pulumi_language_pb.RuntimeOptionsRequest>; | ||
requestDeserialize: grpc.deserialize<pulumi_language_pb.RuntimeOptionsRequest>; | ||
responseSerialize: grpc.serialize<pulumi_language_pb.RuntimeOptionsResponse>; | ||
responseDeserialize: grpc.deserialize<pulumi_language_pb.RuntimeOptionsResponse>; | ||
} | ||
interface ILanguageRuntimeService_IAbout extends grpc.MethodDefinition<pulumi_language_pb.AboutRequest, pulumi_language_pb.AboutResponse> { | ||
@@ -137,2 +147,3 @@ path: "/pulumirpc.LanguageRuntime/About"; | ||
installDependencies: grpc.handleServerStreamingCall<pulumi_language_pb.InstallDependenciesRequest, pulumi_language_pb.InstallDependenciesResponse>; | ||
runtimeOptionsPrompts: grpc.handleUnaryCall<pulumi_language_pb.RuntimeOptionsRequest, pulumi_language_pb.RuntimeOptionsResponse>; | ||
about: grpc.handleUnaryCall<pulumi_language_pb.AboutRequest, pulumi_language_pb.AboutResponse>; | ||
@@ -159,2 +170,5 @@ getProgramDependencies: grpc.handleUnaryCall<pulumi_language_pb.GetProgramDependenciesRequest, pulumi_language_pb.GetProgramDependenciesResponse>; | ||
installDependencies(request: pulumi_language_pb.InstallDependenciesRequest, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<pulumi_language_pb.InstallDependenciesResponse>; | ||
runtimeOptionsPrompts(request: pulumi_language_pb.RuntimeOptionsRequest, callback: (error: grpc.ServiceError | null, response: pulumi_language_pb.RuntimeOptionsResponse) => void): grpc.ClientUnaryCall; | ||
runtimeOptionsPrompts(request: pulumi_language_pb.RuntimeOptionsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: pulumi_language_pb.RuntimeOptionsResponse) => void): grpc.ClientUnaryCall; | ||
runtimeOptionsPrompts(request: pulumi_language_pb.RuntimeOptionsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: pulumi_language_pb.RuntimeOptionsResponse) => void): grpc.ClientUnaryCall; | ||
about(request: pulumi_language_pb.AboutRequest, callback: (error: grpc.ServiceError | null, response: pulumi_language_pb.AboutResponse) => void): grpc.ClientUnaryCall; | ||
@@ -195,2 +209,5 @@ about(request: pulumi_language_pb.AboutRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: pulumi_language_pb.AboutResponse) => void): grpc.ClientUnaryCall; | ||
public installDependencies(request: pulumi_language_pb.InstallDependenciesRequest, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<pulumi_language_pb.InstallDependenciesResponse>; | ||
public runtimeOptionsPrompts(request: pulumi_language_pb.RuntimeOptionsRequest, callback: (error: grpc.ServiceError | null, response: pulumi_language_pb.RuntimeOptionsResponse) => void): grpc.ClientUnaryCall; | ||
public runtimeOptionsPrompts(request: pulumi_language_pb.RuntimeOptionsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: pulumi_language_pb.RuntimeOptionsResponse) => void): grpc.ClientUnaryCall; | ||
public runtimeOptionsPrompts(request: pulumi_language_pb.RuntimeOptionsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: pulumi_language_pb.RuntimeOptionsResponse) => void): grpc.ClientUnaryCall; | ||
public about(request: pulumi_language_pb.AboutRequest, callback: (error: grpc.ServiceError | null, response: pulumi_language_pb.AboutResponse) => void): grpc.ClientUnaryCall; | ||
@@ -197,0 +214,0 @@ public about(request: pulumi_language_pb.AboutRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: pulumi_language_pb.AboutResponse) => void): grpc.ClientUnaryCall; |
@@ -268,3 +268,25 @@ // GENERATED CODE -- DO NOT EDIT! | ||
function serialize_pulumirpc_RuntimeOptionsRequest(arg) { | ||
if (!(arg instanceof pulumi_language_pb.RuntimeOptionsRequest)) { | ||
throw new Error('Expected argument of type pulumirpc.RuntimeOptionsRequest'); | ||
} | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
function deserialize_pulumirpc_RuntimeOptionsRequest(buffer_arg) { | ||
return pulumi_language_pb.RuntimeOptionsRequest.deserializeBinary(new Uint8Array(buffer_arg)); | ||
} | ||
function serialize_pulumirpc_RuntimeOptionsResponse(arg) { | ||
if (!(arg instanceof pulumi_language_pb.RuntimeOptionsResponse)) { | ||
throw new Error('Expected argument of type pulumirpc.RuntimeOptionsResponse'); | ||
} | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
function deserialize_pulumirpc_RuntimeOptionsResponse(buffer_arg) { | ||
return pulumi_language_pb.RuntimeOptionsResponse.deserializeBinary(new Uint8Array(buffer_arg)); | ||
} | ||
// LanguageRuntime is the interface that the planning monitor uses to drive execution of an interpreter responsible | ||
@@ -321,2 +343,14 @@ // for confguring and creating resource objects. | ||
}, | ||
// RuntimeOptionsPrompts returns a list of additional prompts to ask during `pulumi new`. | ||
runtimeOptionsPrompts: { | ||
path: '/pulumirpc.LanguageRuntime/RuntimeOptionsPrompts', | ||
requestStream: false, | ||
responseStream: false, | ||
requestType: pulumi_language_pb.RuntimeOptionsRequest, | ||
responseType: pulumi_language_pb.RuntimeOptionsResponse, | ||
requestSerialize: serialize_pulumirpc_RuntimeOptionsRequest, | ||
requestDeserialize: deserialize_pulumirpc_RuntimeOptionsRequest, | ||
responseSerialize: serialize_pulumirpc_RuntimeOptionsResponse, | ||
responseDeserialize: deserialize_pulumirpc_RuntimeOptionsResponse, | ||
}, | ||
// About returns information about the runtime for this language. | ||
@@ -323,0 +357,0 @@ about: { |
@@ -380,2 +380,118 @@ // package: pulumirpc | ||
export class RuntimeOptionsRequest extends jspb.Message { | ||
hasInfo(): boolean; | ||
clearInfo(): void; | ||
getInfo(): ProgramInfo | undefined; | ||
setInfo(value?: ProgramInfo): RuntimeOptionsRequest; | ||
serializeBinary(): Uint8Array; | ||
toObject(includeInstance?: boolean): RuntimeOptionsRequest.AsObject; | ||
static toObject(includeInstance: boolean, msg: RuntimeOptionsRequest): RuntimeOptionsRequest.AsObject; | ||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
static serializeBinaryToWriter(message: RuntimeOptionsRequest, writer: jspb.BinaryWriter): void; | ||
static deserializeBinary(bytes: Uint8Array): RuntimeOptionsRequest; | ||
static deserializeBinaryFromReader(message: RuntimeOptionsRequest, reader: jspb.BinaryReader): RuntimeOptionsRequest; | ||
} | ||
export namespace RuntimeOptionsRequest { | ||
export type AsObject = { | ||
info?: ProgramInfo.AsObject, | ||
} | ||
} | ||
export class RuntimeOptionPrompt extends jspb.Message { | ||
getKey(): string; | ||
setKey(value: string): RuntimeOptionPrompt; | ||
getDescription(): string; | ||
setDescription(value: string): RuntimeOptionPrompt; | ||
getPrompttype(): RuntimeOptionPrompt.RuntimeOptionType; | ||
setPrompttype(value: RuntimeOptionPrompt.RuntimeOptionType): RuntimeOptionPrompt; | ||
clearChoicesList(): void; | ||
getChoicesList(): Array<RuntimeOptionPrompt.RuntimeOptionValue>; | ||
setChoicesList(value: Array<RuntimeOptionPrompt.RuntimeOptionValue>): RuntimeOptionPrompt; | ||
addChoices(value?: RuntimeOptionPrompt.RuntimeOptionValue, index?: number): RuntimeOptionPrompt.RuntimeOptionValue; | ||
hasDefault(): boolean; | ||
clearDefault(): void; | ||
getDefault(): RuntimeOptionPrompt.RuntimeOptionValue | undefined; | ||
setDefault(value?: RuntimeOptionPrompt.RuntimeOptionValue): RuntimeOptionPrompt; | ||
serializeBinary(): Uint8Array; | ||
toObject(includeInstance?: boolean): RuntimeOptionPrompt.AsObject; | ||
static toObject(includeInstance: boolean, msg: RuntimeOptionPrompt): RuntimeOptionPrompt.AsObject; | ||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
static serializeBinaryToWriter(message: RuntimeOptionPrompt, writer: jspb.BinaryWriter): void; | ||
static deserializeBinary(bytes: Uint8Array): RuntimeOptionPrompt; | ||
static deserializeBinaryFromReader(message: RuntimeOptionPrompt, reader: jspb.BinaryReader): RuntimeOptionPrompt; | ||
} | ||
export namespace RuntimeOptionPrompt { | ||
export type AsObject = { | ||
key: string, | ||
description: string, | ||
prompttype: RuntimeOptionPrompt.RuntimeOptionType, | ||
choicesList: Array<RuntimeOptionPrompt.RuntimeOptionValue.AsObject>, | ||
pb_default?: RuntimeOptionPrompt.RuntimeOptionValue.AsObject, | ||
} | ||
export class RuntimeOptionValue extends jspb.Message { | ||
getPrompttype(): RuntimeOptionPrompt.RuntimeOptionType; | ||
setPrompttype(value: RuntimeOptionPrompt.RuntimeOptionType): RuntimeOptionValue; | ||
getStringvalue(): string; | ||
setStringvalue(value: string): RuntimeOptionValue; | ||
getInt32value(): number; | ||
setInt32value(value: number): RuntimeOptionValue; | ||
serializeBinary(): Uint8Array; | ||
toObject(includeInstance?: boolean): RuntimeOptionValue.AsObject; | ||
static toObject(includeInstance: boolean, msg: RuntimeOptionValue): RuntimeOptionValue.AsObject; | ||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
static serializeBinaryToWriter(message: RuntimeOptionValue, writer: jspb.BinaryWriter): void; | ||
static deserializeBinary(bytes: Uint8Array): RuntimeOptionValue; | ||
static deserializeBinaryFromReader(message: RuntimeOptionValue, reader: jspb.BinaryReader): RuntimeOptionValue; | ||
} | ||
export namespace RuntimeOptionValue { | ||
export type AsObject = { | ||
prompttype: RuntimeOptionPrompt.RuntimeOptionType, | ||
stringvalue: string, | ||
int32value: number, | ||
} | ||
} | ||
export enum RuntimeOptionType { | ||
STRING = 0, | ||
INT32 = 1, | ||
} | ||
} | ||
export class RuntimeOptionsResponse extends jspb.Message { | ||
clearPromptsList(): void; | ||
getPromptsList(): Array<RuntimeOptionPrompt>; | ||
setPromptsList(value: Array<RuntimeOptionPrompt>): RuntimeOptionsResponse; | ||
addPrompts(value?: RuntimeOptionPrompt, index?: number): RuntimeOptionPrompt; | ||
serializeBinary(): Uint8Array; | ||
toObject(includeInstance?: boolean): RuntimeOptionsResponse.AsObject; | ||
static toObject(includeInstance: boolean, msg: RuntimeOptionsResponse): RuntimeOptionsResponse.AsObject; | ||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
static serializeBinaryToWriter(message: RuntimeOptionsResponse, writer: jspb.BinaryWriter): void; | ||
static deserializeBinary(bytes: Uint8Array): RuntimeOptionsResponse; | ||
static deserializeBinaryFromReader(message: RuntimeOptionsResponse, reader: jspb.BinaryReader): RuntimeOptionsResponse; | ||
} | ||
export namespace RuntimeOptionsResponse { | ||
export type AsObject = { | ||
promptsList: Array<RuntimeOptionPrompt.AsObject>, | ||
} | ||
} | ||
export class RunPluginRequest extends jspb.Message { | ||
@@ -382,0 +498,0 @@ getPwd(): string; |
@@ -590,2 +590,24 @@ "use strict"; | ||
})); | ||
it(`runs through the stack lifecycle with an inline program, testing removing without destroying`, () => __awaiter(void 0, void 0, void 0, function* () { | ||
const program = () => __awaiter(void 0, void 0, void 0, function* () { | ||
class MyResource extends index_1.ComponentResource { | ||
constructor(name, opts) { | ||
super("my:module:MyResource", name, {}, opts); | ||
} | ||
} | ||
new MyResource("res"); | ||
return {}; | ||
}); | ||
const projectName = "inline_node"; | ||
const stackName = automation_1.fullyQualifiedStackName(util_1.getTestOrg(), projectName, `int_test${util_1.getTestSuffix()}`); | ||
const stack = yield automation_1.LocalWorkspace.createStack({ stackName, projectName, program }); | ||
yield stack.up({ userAgent }); | ||
// we shouldn't be able to remove the stack without force | ||
// since the stack has an active resource | ||
assert_1.default.rejects(stack.workspace.removeStack(stackName)); | ||
yield stack.workspace.removeStack(stackName, { force: true }); | ||
// we shouldn't be able to select the stack after it's been removed | ||
// we expect this error | ||
assert_1.default.rejects(stack.workspace.selectStack(stackName)); | ||
})); | ||
it(`refreshes before preview`, () => __awaiter(void 0, void 0, void 0, function* () { | ||
@@ -592,0 +614,0 @@ // We create a simple program, and scan the output for an indication |
@@ -16,3 +16,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = "3.120.1-alpha.xbefb249"; | ||
exports.version = "3.120.1-alpha.xd79644f"; | ||
//# sourceMappingURL=version.js.map |
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 too big to display
Sorry, the diff of this file is not supported yet
14577472
129510