@pulumi/command 0.0.4-alpha.1646714993 → 0.1.0-alpha.1779516124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +101 -16
- package/index.d.ts +4 -1
- package/index.d.ts.map +1 -0
- package/index.js +21 -13
- package/index.js.map +1 -1
- package/local/command.d.ts +346 -18
- package/local/command.d.ts.map +1 -0
- package/local/command.js +148 -40
- package/local/command.js.map +1 -1
- package/local/index.d.ts +8 -1
- package/local/index.d.ts.map +1 -0
- package/local/index.js +24 -8
- package/local/index.js.map +1 -1
- package/local/run.d.ts +392 -0
- package/local/run.d.ts.map +1 -0
- package/local/run.js +69 -0
- package/local/run.js.map +1 -0
- package/package.json +8 -5
- package/package.json.dev +7 -4
- package/provider.d.ts +1 -0
- package/provider.d.ts.map +1 -0
- package/provider.js +39 -18
- package/provider.js.map +1 -1
- package/remote/command.d.ts +156 -16
- package/remote/command.d.ts.map +1 -0
- package/remote/command.js +125 -39
- package/remote/command.js.map +1 -1
- package/remote/copyFile.d.ts +7 -2
- package/remote/copyFile.d.ts.map +1 -0
- package/remote/copyFile.js +65 -37
- package/remote/copyFile.js.map +1 -1
- package/remote/copyToRemote.d.ts +126 -0
- package/remote/copyToRemote.d.ts.map +1 -0
- package/remote/copyToRemote.js +157 -0
- package/remote/copyToRemote.js.map +1 -0
- package/remote/index.d.ts +11 -2
- package/remote/index.d.ts.map +1 -0
- package/remote/index.js +28 -11
- package/remote/index.js.map +1 -1
- package/types/enums/index.d.ts +4 -0
- package/types/enums/index.d.ts.map +1 -0
- package/types/enums/index.js +34 -0
- package/types/enums/index.js.map +1 -0
- package/types/enums/local/index.d.ts +20 -0
- package/types/enums/local/index.d.ts.map +1 -0
- package/types/enums/local/index.js +24 -0
- package/types/enums/local/index.js.map +1 -0
- package/types/enums/remote/index.d.ts +20 -0
- package/types/enums/remote/index.d.ts.map +1 -0
- package/types/enums/remote/index.js +24 -0
- package/types/enums/remote/index.js.map +1 -0
- package/types/index.d.ts +3 -1
- package/types/index.d.ts.map +1 -0
- package/types/index.js +29 -4
- package/types/index.js.map +1 -1
- package/types/input.d.ts +80 -5
- package/types/input.d.ts.map +1 -0
- package/types/input.js +47 -3
- package/types/input.js.map +1 -1
- package/types/output.d.ts +76 -1
- package/types/output.d.ts.map +1 -0
- package/types/output.js +46 -3
- package/types/output.js.map +1 -1
- package/utilities.d.ts +1 -0
- package/utilities.d.ts.map +1 -0
- package/utilities.js +64 -2
- package/utilities.js.map +1 -1
- package/package.json.bak +0 -25
package/local/index.d.ts
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { CommandArgs } from "./command";
|
|
2
|
+
export type Command = import("./command").Command;
|
|
3
|
+
export declare const Command: typeof import("./command").Command;
|
|
4
|
+
export { RunArgs, RunResult, RunOutputArgs } from "./run";
|
|
5
|
+
export declare const run: typeof import("./run").run;
|
|
6
|
+
export declare const runOutput: typeof import("./run").runOutput;
|
|
7
|
+
export * from "../types/enums/local";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../local/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,MAAM,MAAM,OAAO,GAAG,OAAO,WAAW,EAAE,OAAO,CAAC;AAClD,eAAO,MAAM,OAAO,EAAE,cAAc,WAAW,EAAE,OAAqB,CAAC;AAGvE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC1D,eAAO,MAAM,GAAG,EAAE,cAAc,OAAO,EAAE,GAAiB,CAAC;AAC3D,eAAO,MAAM,SAAS,EAAE,cAAc,OAAO,EAAE,SAAuB,CAAC;AAKvE,cAAc,sBAAsB,CAAC"}
|
package/local/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// *** WARNING: this file was generated by
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
3
|
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
5
|
if (k2 === undefined) k2 = k;
|
|
@@ -12,22 +12,38 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
12
12
|
if (k2 === undefined) k2 = k;
|
|
13
13
|
o[k2] = m[k];
|
|
14
14
|
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
15
27
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
28
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
29
|
};
|
|
18
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
exports.runOutput = exports.run = exports.Command = void 0;
|
|
32
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
33
|
+
const utilities = __importStar(require("../utilities"));
|
|
34
|
+
exports.Command = null;
|
|
35
|
+
utilities.lazyLoad(exports, ["Command"], () => require("./command"));
|
|
36
|
+
exports.run = null;
|
|
37
|
+
exports.runOutput = null;
|
|
38
|
+
utilities.lazyLoad(exports, ["run", "runOutput"], () => require("./run"));
|
|
39
|
+
// Export enums:
|
|
40
|
+
__exportStar(require("../types/enums/local"), exports);
|
|
25
41
|
const _module = {
|
|
26
42
|
version: utilities.getVersion(),
|
|
27
43
|
construct: (name, type, urn) => {
|
|
28
44
|
switch (type) {
|
|
29
45
|
case "command:local:Command":
|
|
30
|
-
return new
|
|
46
|
+
return new exports.Command(name, undefined, { urn });
|
|
31
47
|
default:
|
|
32
48
|
throw new Error(`unknown resource type ${type}`);
|
|
33
49
|
}
|
package/local/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../local/index.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../local/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,wDAA0C;AAK7B,QAAA,OAAO,GAAuC,IAAW,CAAC;AACvE,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;AAGxD,QAAA,GAAG,GAA+B,IAAW,CAAC;AAC9C,QAAA,SAAS,GAAqC,IAAW,CAAC;AACvE,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAC,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;AAGzE,gBAAgB;AAChB,uDAAqC;AAErC,MAAM,OAAO,GAAG;IACZ,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE;IAC/B,SAAS,EAAE,CAAC,IAAY,EAAE,IAAY,EAAE,GAAW,EAAmB,EAAE;QACpE,QAAQ,IAAI,EAAE;YACV,KAAK,uBAAuB;gBACxB,OAAO,IAAI,eAAO,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;YACrD;gBACI,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;SACxD;IACL,CAAC;CACJ,CAAC;AACF,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA"}
|
package/local/run.d.ts
ADDED
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as enums from "../types/enums";
|
|
3
|
+
/**
|
|
4
|
+
* A local command to be executed unconditionally.
|
|
5
|
+
* This command will always be run on any preview or deployment. Use `local.Command` to conditionally execute commands as part of the resource lifecycle.
|
|
6
|
+
*/
|
|
7
|
+
export declare function run(args: RunArgs, opts?: pulumi.InvokeOptions): Promise<RunResult>;
|
|
8
|
+
export interface RunArgs {
|
|
9
|
+
/**
|
|
10
|
+
* If the previous command's stdout and stderr (as generated by the prior create/update) is
|
|
11
|
+
* injected into the environment of the next run as PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR.
|
|
12
|
+
* Defaults to true.
|
|
13
|
+
*/
|
|
14
|
+
addPreviousOutputInEnv?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* A list of path globs to return as a single archive asset after the command completes.
|
|
17
|
+
*
|
|
18
|
+
* When specifying glob patterns the following rules apply:
|
|
19
|
+
* - We only include files not directories for assets and archives.
|
|
20
|
+
* - Path separators are `/` on all platforms - including Windows.
|
|
21
|
+
* - Patterns starting with `!` are 'exclude' rules.
|
|
22
|
+
* - Rules are evaluated in order, so exclude rules should be after inclusion rules.
|
|
23
|
+
* - `*` matches anything except `/`
|
|
24
|
+
* - `**` matches anything, _including_ `/`
|
|
25
|
+
* - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`.
|
|
26
|
+
* - For full details of the globbing syntax, see [github.com/gobwas/glob](https://github.com/gobwas/glob)
|
|
27
|
+
*
|
|
28
|
+
* #### Example
|
|
29
|
+
*
|
|
30
|
+
* Given the rules:
|
|
31
|
+
* ```yaml
|
|
32
|
+
* - "assets/**"
|
|
33
|
+
* - "src/**.js"
|
|
34
|
+
* - "!**secret.*"
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* When evaluating against this folder:
|
|
38
|
+
*
|
|
39
|
+
* ```yaml
|
|
40
|
+
* - assets/
|
|
41
|
+
* - logos/
|
|
42
|
+
* - logo.svg
|
|
43
|
+
* - src/
|
|
44
|
+
* - index.js
|
|
45
|
+
* - secret.js
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* The following paths will be returned:
|
|
49
|
+
*
|
|
50
|
+
* ```yaml
|
|
51
|
+
* - assets/logos/logo.svg
|
|
52
|
+
* - src/index.js
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
archivePaths?: string[];
|
|
56
|
+
/**
|
|
57
|
+
* A list of path globs to read after the command completes.
|
|
58
|
+
*
|
|
59
|
+
* When specifying glob patterns the following rules apply:
|
|
60
|
+
* - We only include files not directories for assets and archives.
|
|
61
|
+
* - Path separators are `/` on all platforms - including Windows.
|
|
62
|
+
* - Patterns starting with `!` are 'exclude' rules.
|
|
63
|
+
* - Rules are evaluated in order, so exclude rules should be after inclusion rules.
|
|
64
|
+
* - `*` matches anything except `/`
|
|
65
|
+
* - `**` matches anything, _including_ `/`
|
|
66
|
+
* - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`.
|
|
67
|
+
* - For full details of the globbing syntax, see [github.com/gobwas/glob](https://github.com/gobwas/glob)
|
|
68
|
+
*
|
|
69
|
+
* #### Example
|
|
70
|
+
*
|
|
71
|
+
* Given the rules:
|
|
72
|
+
* ```yaml
|
|
73
|
+
* - "assets/**"
|
|
74
|
+
* - "src/**.js"
|
|
75
|
+
* - "!**secret.*"
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* When evaluating against this folder:
|
|
79
|
+
*
|
|
80
|
+
* ```yaml
|
|
81
|
+
* - assets/
|
|
82
|
+
* - logos/
|
|
83
|
+
* - logo.svg
|
|
84
|
+
* - src/
|
|
85
|
+
* - index.js
|
|
86
|
+
* - secret.js
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* The following paths will be returned:
|
|
90
|
+
*
|
|
91
|
+
* ```yaml
|
|
92
|
+
* - assets/logos/logo.svg
|
|
93
|
+
* - src/index.js
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
assetPaths?: string[];
|
|
97
|
+
/**
|
|
98
|
+
* The command to run.
|
|
99
|
+
*/
|
|
100
|
+
command: string;
|
|
101
|
+
/**
|
|
102
|
+
* The directory from which to run the command from. If `dir` does not exist, then
|
|
103
|
+
* `Command` will fail.
|
|
104
|
+
*/
|
|
105
|
+
dir?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Additional environment variables available to the command's process.
|
|
108
|
+
*/
|
|
109
|
+
environment?: {
|
|
110
|
+
[key: string]: string;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* The program and arguments to run the command.
|
|
114
|
+
* On Linux and macOS, defaults to: `["/bin/sh", "-c"]`. On Windows, defaults to: `["cmd", "/C"]`
|
|
115
|
+
*/
|
|
116
|
+
interpreter?: string[];
|
|
117
|
+
/**
|
|
118
|
+
* If the command's stdout and stderr should be logged. This doesn't affect the capturing of
|
|
119
|
+
* stdout and stderr as outputs. If there might be secrets in the output, you can disable logging here and mark the
|
|
120
|
+
* outputs as secret via 'additionalSecretOutputs'. Defaults to logging both stdout and stderr.
|
|
121
|
+
*/
|
|
122
|
+
logging?: enums.local.Logging;
|
|
123
|
+
/**
|
|
124
|
+
* Pass a string to the command's process as standard in
|
|
125
|
+
*/
|
|
126
|
+
stdin?: string;
|
|
127
|
+
}
|
|
128
|
+
export interface RunResult {
|
|
129
|
+
/**
|
|
130
|
+
* If the previous command's stdout and stderr (as generated by the prior create/update) is
|
|
131
|
+
* injected into the environment of the next run as PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR.
|
|
132
|
+
* Defaults to true.
|
|
133
|
+
*/
|
|
134
|
+
readonly addPreviousOutputInEnv?: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* An archive asset containing files found after running the command.
|
|
137
|
+
*/
|
|
138
|
+
readonly archive?: pulumi.asset.Archive;
|
|
139
|
+
/**
|
|
140
|
+
* A list of path globs to return as a single archive asset after the command completes.
|
|
141
|
+
*
|
|
142
|
+
* When specifying glob patterns the following rules apply:
|
|
143
|
+
* - We only include files not directories for assets and archives.
|
|
144
|
+
* - Path separators are `/` on all platforms - including Windows.
|
|
145
|
+
* - Patterns starting with `!` are 'exclude' rules.
|
|
146
|
+
* - Rules are evaluated in order, so exclude rules should be after inclusion rules.
|
|
147
|
+
* - `*` matches anything except `/`
|
|
148
|
+
* - `**` matches anything, _including_ `/`
|
|
149
|
+
* - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`.
|
|
150
|
+
* - For full details of the globbing syntax, see [github.com/gobwas/glob](https://github.com/gobwas/glob)
|
|
151
|
+
*
|
|
152
|
+
* #### Example
|
|
153
|
+
*
|
|
154
|
+
* Given the rules:
|
|
155
|
+
* ```yaml
|
|
156
|
+
* - "assets/**"
|
|
157
|
+
* - "src/**.js"
|
|
158
|
+
* - "!**secret.*"
|
|
159
|
+
* ```
|
|
160
|
+
*
|
|
161
|
+
* When evaluating against this folder:
|
|
162
|
+
*
|
|
163
|
+
* ```yaml
|
|
164
|
+
* - assets/
|
|
165
|
+
* - logos/
|
|
166
|
+
* - logo.svg
|
|
167
|
+
* - src/
|
|
168
|
+
* - index.js
|
|
169
|
+
* - secret.js
|
|
170
|
+
* ```
|
|
171
|
+
*
|
|
172
|
+
* The following paths will be returned:
|
|
173
|
+
*
|
|
174
|
+
* ```yaml
|
|
175
|
+
* - assets/logos/logo.svg
|
|
176
|
+
* - src/index.js
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
readonly archivePaths?: string[];
|
|
180
|
+
/**
|
|
181
|
+
* A list of path globs to read after the command completes.
|
|
182
|
+
*
|
|
183
|
+
* When specifying glob patterns the following rules apply:
|
|
184
|
+
* - We only include files not directories for assets and archives.
|
|
185
|
+
* - Path separators are `/` on all platforms - including Windows.
|
|
186
|
+
* - Patterns starting with `!` are 'exclude' rules.
|
|
187
|
+
* - Rules are evaluated in order, so exclude rules should be after inclusion rules.
|
|
188
|
+
* - `*` matches anything except `/`
|
|
189
|
+
* - `**` matches anything, _including_ `/`
|
|
190
|
+
* - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`.
|
|
191
|
+
* - For full details of the globbing syntax, see [github.com/gobwas/glob](https://github.com/gobwas/glob)
|
|
192
|
+
*
|
|
193
|
+
* #### Example
|
|
194
|
+
*
|
|
195
|
+
* Given the rules:
|
|
196
|
+
* ```yaml
|
|
197
|
+
* - "assets/**"
|
|
198
|
+
* - "src/**.js"
|
|
199
|
+
* - "!**secret.*"
|
|
200
|
+
* ```
|
|
201
|
+
*
|
|
202
|
+
* When evaluating against this folder:
|
|
203
|
+
*
|
|
204
|
+
* ```yaml
|
|
205
|
+
* - assets/
|
|
206
|
+
* - logos/
|
|
207
|
+
* - logo.svg
|
|
208
|
+
* - src/
|
|
209
|
+
* - index.js
|
|
210
|
+
* - secret.js
|
|
211
|
+
* ```
|
|
212
|
+
*
|
|
213
|
+
* The following paths will be returned:
|
|
214
|
+
*
|
|
215
|
+
* ```yaml
|
|
216
|
+
* - assets/logos/logo.svg
|
|
217
|
+
* - src/index.js
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
readonly assetPaths?: string[];
|
|
221
|
+
/**
|
|
222
|
+
* A map of assets found after running the command.
|
|
223
|
+
* The key is the relative path from the command dir
|
|
224
|
+
*/
|
|
225
|
+
readonly assets?: {
|
|
226
|
+
[key: string]: pulumi.asset.Asset | pulumi.asset.Archive;
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* The command to run.
|
|
230
|
+
*/
|
|
231
|
+
readonly command: string;
|
|
232
|
+
/**
|
|
233
|
+
* The directory from which to run the command from. If `dir` does not exist, then
|
|
234
|
+
* `Command` will fail.
|
|
235
|
+
*/
|
|
236
|
+
readonly dir?: string;
|
|
237
|
+
/**
|
|
238
|
+
* Additional environment variables available to the command's process.
|
|
239
|
+
*/
|
|
240
|
+
readonly environment?: {
|
|
241
|
+
[key: string]: string;
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* The program and arguments to run the command.
|
|
245
|
+
* On Linux and macOS, defaults to: `["/bin/sh", "-c"]`. On Windows, defaults to: `["cmd", "/C"]`
|
|
246
|
+
*/
|
|
247
|
+
readonly interpreter?: string[];
|
|
248
|
+
/**
|
|
249
|
+
* If the command's stdout and stderr should be logged. This doesn't affect the capturing of
|
|
250
|
+
* stdout and stderr as outputs. If there might be secrets in the output, you can disable logging here and mark the
|
|
251
|
+
* outputs as secret via 'additionalSecretOutputs'. Defaults to logging both stdout and stderr.
|
|
252
|
+
*/
|
|
253
|
+
readonly logging?: enums.local.Logging;
|
|
254
|
+
/**
|
|
255
|
+
* The standard error of the command's process
|
|
256
|
+
*/
|
|
257
|
+
readonly stderr: string;
|
|
258
|
+
/**
|
|
259
|
+
* Pass a string to the command's process as standard in
|
|
260
|
+
*/
|
|
261
|
+
readonly stdin?: string;
|
|
262
|
+
/**
|
|
263
|
+
* The standard output of the command's process
|
|
264
|
+
*/
|
|
265
|
+
readonly stdout: string;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* A local command to be executed unconditionally.
|
|
269
|
+
* This command will always be run on any preview or deployment. Use `local.Command` to conditionally execute commands as part of the resource lifecycle.
|
|
270
|
+
*/
|
|
271
|
+
export declare function runOutput(args: RunOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<RunResult>;
|
|
272
|
+
export interface RunOutputArgs {
|
|
273
|
+
/**
|
|
274
|
+
* If the previous command's stdout and stderr (as generated by the prior create/update) is
|
|
275
|
+
* injected into the environment of the next run as PULUMI_COMMAND_STDOUT and PULUMI_COMMAND_STDERR.
|
|
276
|
+
* Defaults to true.
|
|
277
|
+
*/
|
|
278
|
+
addPreviousOutputInEnv?: pulumi.Input<boolean | undefined>;
|
|
279
|
+
/**
|
|
280
|
+
* A list of path globs to return as a single archive asset after the command completes.
|
|
281
|
+
*
|
|
282
|
+
* When specifying glob patterns the following rules apply:
|
|
283
|
+
* - We only include files not directories for assets and archives.
|
|
284
|
+
* - Path separators are `/` on all platforms - including Windows.
|
|
285
|
+
* - Patterns starting with `!` are 'exclude' rules.
|
|
286
|
+
* - Rules are evaluated in order, so exclude rules should be after inclusion rules.
|
|
287
|
+
* - `*` matches anything except `/`
|
|
288
|
+
* - `**` matches anything, _including_ `/`
|
|
289
|
+
* - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`.
|
|
290
|
+
* - For full details of the globbing syntax, see [github.com/gobwas/glob](https://github.com/gobwas/glob)
|
|
291
|
+
*
|
|
292
|
+
* #### Example
|
|
293
|
+
*
|
|
294
|
+
* Given the rules:
|
|
295
|
+
* ```yaml
|
|
296
|
+
* - "assets/**"
|
|
297
|
+
* - "src/**.js"
|
|
298
|
+
* - "!**secret.*"
|
|
299
|
+
* ```
|
|
300
|
+
*
|
|
301
|
+
* When evaluating against this folder:
|
|
302
|
+
*
|
|
303
|
+
* ```yaml
|
|
304
|
+
* - assets/
|
|
305
|
+
* - logos/
|
|
306
|
+
* - logo.svg
|
|
307
|
+
* - src/
|
|
308
|
+
* - index.js
|
|
309
|
+
* - secret.js
|
|
310
|
+
* ```
|
|
311
|
+
*
|
|
312
|
+
* The following paths will be returned:
|
|
313
|
+
*
|
|
314
|
+
* ```yaml
|
|
315
|
+
* - assets/logos/logo.svg
|
|
316
|
+
* - src/index.js
|
|
317
|
+
* ```
|
|
318
|
+
*/
|
|
319
|
+
archivePaths?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
|
320
|
+
/**
|
|
321
|
+
* A list of path globs to read after the command completes.
|
|
322
|
+
*
|
|
323
|
+
* When specifying glob patterns the following rules apply:
|
|
324
|
+
* - We only include files not directories for assets and archives.
|
|
325
|
+
* - Path separators are `/` on all platforms - including Windows.
|
|
326
|
+
* - Patterns starting with `!` are 'exclude' rules.
|
|
327
|
+
* - Rules are evaluated in order, so exclude rules should be after inclusion rules.
|
|
328
|
+
* - `*` matches anything except `/`
|
|
329
|
+
* - `**` matches anything, _including_ `/`
|
|
330
|
+
* - All returned paths are relative to the working directory (without leading `./`) e.g. `file.text` or `subfolder/file.txt`.
|
|
331
|
+
* - For full details of the globbing syntax, see [github.com/gobwas/glob](https://github.com/gobwas/glob)
|
|
332
|
+
*
|
|
333
|
+
* #### Example
|
|
334
|
+
*
|
|
335
|
+
* Given the rules:
|
|
336
|
+
* ```yaml
|
|
337
|
+
* - "assets/**"
|
|
338
|
+
* - "src/**.js"
|
|
339
|
+
* - "!**secret.*"
|
|
340
|
+
* ```
|
|
341
|
+
*
|
|
342
|
+
* When evaluating against this folder:
|
|
343
|
+
*
|
|
344
|
+
* ```yaml
|
|
345
|
+
* - assets/
|
|
346
|
+
* - logos/
|
|
347
|
+
* - logo.svg
|
|
348
|
+
* - src/
|
|
349
|
+
* - index.js
|
|
350
|
+
* - secret.js
|
|
351
|
+
* ```
|
|
352
|
+
*
|
|
353
|
+
* The following paths will be returned:
|
|
354
|
+
*
|
|
355
|
+
* ```yaml
|
|
356
|
+
* - assets/logos/logo.svg
|
|
357
|
+
* - src/index.js
|
|
358
|
+
* ```
|
|
359
|
+
*/
|
|
360
|
+
assetPaths?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
|
361
|
+
/**
|
|
362
|
+
* The command to run.
|
|
363
|
+
*/
|
|
364
|
+
command: pulumi.Input<string>;
|
|
365
|
+
/**
|
|
366
|
+
* The directory from which to run the command from. If `dir` does not exist, then
|
|
367
|
+
* `Command` will fail.
|
|
368
|
+
*/
|
|
369
|
+
dir?: pulumi.Input<string | undefined>;
|
|
370
|
+
/**
|
|
371
|
+
* Additional environment variables available to the command's process.
|
|
372
|
+
*/
|
|
373
|
+
environment?: pulumi.Input<{
|
|
374
|
+
[key: string]: pulumi.Input<string>;
|
|
375
|
+
} | undefined>;
|
|
376
|
+
/**
|
|
377
|
+
* The program and arguments to run the command.
|
|
378
|
+
* On Linux and macOS, defaults to: `["/bin/sh", "-c"]`. On Windows, defaults to: `["cmd", "/C"]`
|
|
379
|
+
*/
|
|
380
|
+
interpreter?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
|
381
|
+
/**
|
|
382
|
+
* If the command's stdout and stderr should be logged. This doesn't affect the capturing of
|
|
383
|
+
* stdout and stderr as outputs. If there might be secrets in the output, you can disable logging here and mark the
|
|
384
|
+
* outputs as secret via 'additionalSecretOutputs'. Defaults to logging both stdout and stderr.
|
|
385
|
+
*/
|
|
386
|
+
logging?: pulumi.Input<enums.local.Logging | undefined>;
|
|
387
|
+
/**
|
|
388
|
+
* Pass a string to the command's process as standard in
|
|
389
|
+
*/
|
|
390
|
+
stdin?: pulumi.Input<string | undefined>;
|
|
391
|
+
}
|
|
392
|
+
//# sourceMappingURL=run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../local/run.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAGxC;;;GAGG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CAalF;AAED,MAAM,WAAW,OAAO;IACpB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;;;;;;;;;;;;;;;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C;IACvC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;KAAC,GAAG,SAAS,CAAC,CAAC;IAC9E;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC;IAC/D;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IACxD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC5C"}
|
package/local/run.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.runOutput = exports.run = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("../utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* A local command to be executed unconditionally.
|
|
33
|
+
* This command will always be run on any preview or deployment. Use `local.Command` to conditionally execute commands as part of the resource lifecycle.
|
|
34
|
+
*/
|
|
35
|
+
function run(args, opts) {
|
|
36
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
37
|
+
return pulumi.runtime.invoke("command:local:run", {
|
|
38
|
+
"addPreviousOutputInEnv": args.addPreviousOutputInEnv,
|
|
39
|
+
"archivePaths": args.archivePaths,
|
|
40
|
+
"assetPaths": args.assetPaths,
|
|
41
|
+
"command": args.command,
|
|
42
|
+
"dir": args.dir,
|
|
43
|
+
"environment": args.environment,
|
|
44
|
+
"interpreter": args.interpreter,
|
|
45
|
+
"logging": args.logging,
|
|
46
|
+
"stdin": args.stdin,
|
|
47
|
+
}, opts);
|
|
48
|
+
}
|
|
49
|
+
exports.run = run;
|
|
50
|
+
/**
|
|
51
|
+
* A local command to be executed unconditionally.
|
|
52
|
+
* This command will always be run on any preview or deployment. Use `local.Command` to conditionally execute commands as part of the resource lifecycle.
|
|
53
|
+
*/
|
|
54
|
+
function runOutput(args, opts) {
|
|
55
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
56
|
+
return pulumi.runtime.invokeOutput("command:local:run", {
|
|
57
|
+
"addPreviousOutputInEnv": args.addPreviousOutputInEnv,
|
|
58
|
+
"archivePaths": args.archivePaths,
|
|
59
|
+
"assetPaths": args.assetPaths,
|
|
60
|
+
"command": args.command,
|
|
61
|
+
"dir": args.dir,
|
|
62
|
+
"environment": args.environment,
|
|
63
|
+
"interpreter": args.interpreter,
|
|
64
|
+
"logging": args.logging,
|
|
65
|
+
"stdin": args.stdin,
|
|
66
|
+
}, opts);
|
|
67
|
+
}
|
|
68
|
+
exports.runOutput = runOutput;
|
|
69
|
+
//# sourceMappingURL=run.js.map
|
package/local/run.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../local/run.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAIzC,wDAA0C;AAE1C;;;GAGG;AACH,SAAgB,GAAG,CAAC,IAAa,EAAE,IAA2B;IAC1D,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,mBAAmB,EAAE;QAC9C,wBAAwB,EAAE,IAAI,CAAC,sBAAsB;QACrD,cAAc,EAAE,IAAI,CAAC,YAAY;QACjC,YAAY,EAAE,IAAI,CAAC,UAAU;QAC7B,SAAS,EAAE,IAAI,CAAC,OAAO;QACvB,KAAK,EAAE,IAAI,CAAC,GAAG;QACf,aAAa,EAAE,IAAI,CAAC,WAAW;QAC/B,aAAa,EAAE,IAAI,CAAC,WAAW;QAC/B,SAAS,EAAE,IAAI,CAAC,OAAO;QACvB,OAAO,EAAE,IAAI,CAAC,KAAK;KACtB,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAbD,kBAaC;AAgQD;;;GAGG;AACH,SAAgB,SAAS,CAAC,IAAmB,EAAE,IAAiC;IAC5E,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,mBAAmB,EAAE;QACpD,wBAAwB,EAAE,IAAI,CAAC,sBAAsB;QACrD,cAAc,EAAE,IAAI,CAAC,YAAY;QACjC,YAAY,EAAE,IAAI,CAAC,UAAU;QAC7B,SAAS,EAAE,IAAI,CAAC,OAAO;QACvB,KAAK,EAAE,IAAI,CAAC,GAAG;QACf,aAAa,EAAE,IAAI,CAAC,WAAW;QAC/B,aAAa,EAAE,IAAI,CAAC,WAAW;QAC/B,SAAS,EAAE,IAAI,CAAC,OAAO;QACvB,OAAO,EAAE,IAAI,CAAC,KAAK;KACtB,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAbD,8BAaC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulumi/command",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "0.1.0-alpha.1779516124",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"pulumi",
|
|
6
6
|
"command",
|
|
@@ -12,15 +12,18 @@
|
|
|
12
12
|
"license": "Apache-2.0",
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "tsc",
|
|
15
|
-
"install": "node scripts/install-pulumi-plugin.js resource command
|
|
15
|
+
"install": "node scripts/install-pulumi-plugin.js resource command 0.1.0-alpha.1779516124"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@pulumi/pulumi": "^3.
|
|
18
|
+
"@pulumi/pulumi": "^3.142.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"
|
|
21
|
+
"@types/node": "^20",
|
|
22
|
+
"typescript": "^4.7.0"
|
|
22
23
|
},
|
|
23
24
|
"pulumi": {
|
|
24
|
-
"resource": true
|
|
25
|
+
"resource": true,
|
|
26
|
+
"name": "command",
|
|
27
|
+
"version": "0.1.0-alpha.1779516124"
|
|
25
28
|
}
|
|
26
29
|
}
|
package/package.json.dev
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulumi/command",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "0.1.0-alpha.1779516124",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"pulumi",
|
|
6
6
|
"command",
|
|
@@ -14,12 +14,15 @@
|
|
|
14
14
|
"build": "tsc"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pulumi/pulumi": "^3.
|
|
17
|
+
"@pulumi/pulumi": "^3.142.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"
|
|
20
|
+
"@types/node": "^20",
|
|
21
|
+
"typescript": "^4.7.0"
|
|
21
22
|
},
|
|
22
23
|
"pulumi": {
|
|
23
|
-
"resource": true
|
|
24
|
+
"resource": true,
|
|
25
|
+
"name": "command",
|
|
26
|
+
"version": "0.1.0-alpha.1779516124"
|
|
24
27
|
}
|
|
25
28
|
}
|
package/provider.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../provider.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC,qBAAa,QAAS,SAAQ,MAAM,CAAC,gBAAgB;IAIjD;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,QAAQ;IAQnD;;;;;;OAMG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,eAAe;CAQ/E;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;CAC5B"}
|