@pulumi/command 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -189,7 +189,7 @@ export const output = rand.stdout;
189
189
 
190
190
  ### Using `local.Command `with CURL to manage external REST API
191
191
 
192
- This example uses `local.Command` to create a simple resource provider for managing GitHub labels, by invoking `curl` commands on `create` and `delete` commands against the GitHub REST API. A similar approach could be applied to build other simple providers against any REST API directly from within Pulumi programs in any language. This approach is somewhat limited by the fact that `local.Command` does not yet support `diff`/`update`/`read`. Support for those may be [added in the future](https://github.com/pulumi/pulumi-command/issues/20).
192
+ This example uses `local.Command` to create a simple resource provider for managing GitHub labels, by invoking `curl` commands on `create` and `delete` commands against the GitHub REST API. A similar approach could be applied to build other simple providers against any REST API directly from within Pulumi programs in any language. This approach is somewhat limited by the fact that `local.Command` does not yet support `diff`/`read`. Support for [Read](https://github.com/pulumi/pulumi-command/issues/432) and [Diff](https://github.com/pulumi/pulumi-command/issues/433) may be added in the future.
193
193
 
194
194
  This example also shows how `local.Command` can be used as an implementation detail inside a nicer abstraction, like the `GitHubLabel` component defined below.
195
195
 
package/local/run.d.ts CHANGED
@@ -268,7 +268,7 @@ export interface RunResult {
268
268
  * A local command to be executed.
269
269
  * This command will always be run on any preview or deployment. Use `local.Command` to avoid duplicating executions.
270
270
  */
271
- export declare function runOutput(args: RunOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<RunResult>;
271
+ export declare function runOutput(args: RunOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<RunResult>;
272
272
  export interface RunOutputArgs {
273
273
  /**
274
274
  * If the previous command's stdout and stderr (as generated by the prior create/update) is
package/local/run.js CHANGED
@@ -29,7 +29,18 @@ exports.run = run;
29
29
  * This command will always be run on any preview or deployment. Use `local.Command` to avoid duplicating executions.
30
30
  */
31
31
  function runOutput(args, opts) {
32
- return pulumi.output(args).apply((a) => run(a, opts));
32
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
33
+ return pulumi.runtime.invokeOutput("command:local:run", {
34
+ "addPreviousOutputInEnv": args.addPreviousOutputInEnv,
35
+ "archivePaths": args.archivePaths,
36
+ "assetPaths": args.assetPaths,
37
+ "command": args.command,
38
+ "dir": args.dir,
39
+ "environment": args.environment,
40
+ "interpreter": args.interpreter,
41
+ "logging": args.logging,
42
+ "stdin": args.stdin,
43
+ }, opts);
33
44
  }
34
45
  exports.runOutput = runOutput;
35
46
  //# sourceMappingURL=run.js.map
package/local/run.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"run.js","sourceRoot":"","sources":["../../local/run.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAIzC,0CAA0C;AAE1C;;;GAGG;AACH,SAAgB,GAAG,CAAC,IAAa,EAAE,IAA2B;IAE1D,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;AAdD,kBAcC;AAgQD;;;GAGG;AACH,SAAgB,SAAS,CAAC,IAAmB,EAAE,IAA2B;IACtE,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAA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O;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": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "keywords": [
5
5
  "pulumi",
6
6
  "command",
@@ -12,10 +12,10 @@
12
12
  "license": "Apache-2.0",
13
13
  "scripts": {
14
14
  "build": "tsc",
15
- "install": "node scripts/install-pulumi-plugin.js resource command 1.0.0"
15
+ "install": "node scripts/install-pulumi-plugin.js resource command 1.0.2"
16
16
  },
17
17
  "dependencies": {
18
- "@pulumi/pulumi": "^3.0.0"
18
+ "@pulumi/pulumi": "^3.142.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/node": "^14",
@@ -24,6 +24,6 @@
24
24
  "pulumi": {
25
25
  "resource": true,
26
26
  "name": "command",
27
- "version": "1.0.0"
27
+ "version": "1.0.2"
28
28
  }
29
29
  }
package/package.json.dev CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulumi/command",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "keywords": [
5
5
  "pulumi",
6
6
  "command",
@@ -14,7 +14,7 @@
14
14
  "build": "tsc"
15
15
  },
16
16
  "dependencies": {
17
- "@pulumi/pulumi": "^3.0.0"
17
+ "@pulumi/pulumi": "^3.142.0"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/node": "^14",
@@ -23,6 +23,6 @@
23
23
  "pulumi": {
24
24
  "resource": true,
25
25
  "name": "command",
26
- "version": "1.0.0"
26
+ "version": "1.0.2"
27
27
  }
28
28
  }