@pulumi/archive 0.0.3-alpha.1702587467 → 0.0.3

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/file.d.ts CHANGED
@@ -21,7 +21,7 @@ export declare class File extends pulumi.CustomResource {
21
21
  */
22
22
  static isInstance(obj: any): obj is File;
23
23
  /**
24
- * Boolean flag indicating whether symbolically linked directories should be excluded during the creation of the archive. Defaults to false.
24
+ * Boolean flag indicating whether symbolically linked directories should be excluded during the creation of the archive. Defaults to `false`.
25
25
  */
26
26
  readonly excludeSymlinkDirectories: pulumi.Output<boolean | undefined>;
27
27
  /**
@@ -102,7 +102,7 @@ export declare class File extends pulumi.CustomResource {
102
102
  */
103
103
  export interface FileState {
104
104
  /**
105
- * Boolean flag indicating whether symbolically linked directories should be excluded during the creation of the archive. Defaults to false.
105
+ * Boolean flag indicating whether symbolically linked directories should be excluded during the creation of the archive. Defaults to `false`.
106
106
  */
107
107
  excludeSymlinkDirectories?: pulumi.Input<boolean>;
108
108
  /**
@@ -175,7 +175,7 @@ export interface FileState {
175
175
  */
176
176
  export interface FileArgs {
177
177
  /**
178
- * Boolean flag indicating whether symbolically linked directories should be excluded during the creation of the archive. Defaults to false.
178
+ * Boolean flag indicating whether symbolically linked directories should be excluded during the creation of the archive. Defaults to `false`.
179
179
  */
180
180
  excludeSymlinkDirectories?: pulumi.Input<boolean>;
181
181
  /**
package/getFile.d.ts CHANGED
@@ -1,13 +1,62 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  import * as inputs from "./types/input";
3
3
  import * as outputs from "./types/output";
4
+ /**
5
+ * Generates an archive from content, a file, or directory of files.
6
+ *
7
+ * ## Example Usage
8
+ *
9
+ * ```typescript
10
+ * import * as pulumi from "@pulumi/pulumi";
11
+ * import * as archive from "@pulumi/archive";
12
+ *
13
+ * const init = archive.getFile({
14
+ * outputPath: `${path.module}/files/init.zip`,
15
+ * sourceFile: `${path.module}/init.tpl`,
16
+ * type: "zip",
17
+ * });
18
+ * ```
19
+ *
20
+ * ```typescript
21
+ * import * as pulumi from "@pulumi/pulumi";
22
+ * import * as archive from "@pulumi/archive";
23
+ *
24
+ * const dotfiles = archive.getFile({
25
+ * type: "zip",
26
+ * outputPath: `${path.module}/files/dotfiles.zip`,
27
+ * excludes: [`${path.module}/unwanted.zip`],
28
+ * sources: [
29
+ * {
30
+ * content: data.template_file.vimrc.rendered,
31
+ * filename: ".vimrc",
32
+ * },
33
+ * {
34
+ * content: data.template_file.ssh_config.rendered,
35
+ * filename: ".ssh/config",
36
+ * },
37
+ * ],
38
+ * });
39
+ * ```
40
+ *
41
+ * ```typescript
42
+ * import * as pulumi from "@pulumi/pulumi";
43
+ * import * as archive from "@pulumi/archive";
44
+ *
45
+ * const lambdaMyFunction = archive.getFile({
46
+ * outputFileMode: "0666",
47
+ * outputPath: `${path.module}/files/lambda-my-function.js.zip`,
48
+ * sourceFile: `${path.module}/../lambda/my-function/index.js`,
49
+ * type: "zip",
50
+ * });
51
+ * ```
52
+ */
4
53
  export declare function getFile(args: GetFileArgs, opts?: pulumi.InvokeOptions): Promise<GetFileResult>;
5
54
  /**
6
55
  * A collection of arguments for invoking getFile.
7
56
  */
8
57
  export interface GetFileArgs {
9
58
  /**
10
- * Boolean flag indicating whether symbolically linked directories should be excluded during the creation of the archive. Defaults to false.
59
+ * Boolean flag indicating whether symbolically linked directories should be excluded during the creation of the archive. Defaults to `false`.
11
60
  */
12
61
  excludeSymlinkDirectories?: boolean;
13
62
  /**
@@ -52,7 +101,7 @@ export interface GetFileArgs {
52
101
  */
53
102
  export interface GetFileResult {
54
103
  /**
55
- * Boolean flag indicating whether symbolically linked directories should be excluded during the creation of the archive. Defaults to false.
104
+ * Boolean flag indicating whether symbolically linked directories should be excluded during the creation of the archive. Defaults to `false`.
56
105
  */
57
106
  readonly excludeSymlinkDirectories?: boolean;
58
107
  /**
@@ -124,13 +173,62 @@ export interface GetFileResult {
124
173
  */
125
174
  readonly type: string;
126
175
  }
176
+ /**
177
+ * Generates an archive from content, a file, or directory of files.
178
+ *
179
+ * ## Example Usage
180
+ *
181
+ * ```typescript
182
+ * import * as pulumi from "@pulumi/pulumi";
183
+ * import * as archive from "@pulumi/archive";
184
+ *
185
+ * const init = archive.getFile({
186
+ * outputPath: `${path.module}/files/init.zip`,
187
+ * sourceFile: `${path.module}/init.tpl`,
188
+ * type: "zip",
189
+ * });
190
+ * ```
191
+ *
192
+ * ```typescript
193
+ * import * as pulumi from "@pulumi/pulumi";
194
+ * import * as archive from "@pulumi/archive";
195
+ *
196
+ * const dotfiles = archive.getFile({
197
+ * type: "zip",
198
+ * outputPath: `${path.module}/files/dotfiles.zip`,
199
+ * excludes: [`${path.module}/unwanted.zip`],
200
+ * sources: [
201
+ * {
202
+ * content: data.template_file.vimrc.rendered,
203
+ * filename: ".vimrc",
204
+ * },
205
+ * {
206
+ * content: data.template_file.ssh_config.rendered,
207
+ * filename: ".ssh/config",
208
+ * },
209
+ * ],
210
+ * });
211
+ * ```
212
+ *
213
+ * ```typescript
214
+ * import * as pulumi from "@pulumi/pulumi";
215
+ * import * as archive from "@pulumi/archive";
216
+ *
217
+ * const lambdaMyFunction = archive.getFile({
218
+ * outputFileMode: "0666",
219
+ * outputPath: `${path.module}/files/lambda-my-function.js.zip`,
220
+ * sourceFile: `${path.module}/../lambda/my-function/index.js`,
221
+ * type: "zip",
222
+ * });
223
+ * ```
224
+ */
127
225
  export declare function getFileOutput(args: GetFileOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetFileResult>;
128
226
  /**
129
227
  * A collection of arguments for invoking getFile.
130
228
  */
131
229
  export interface GetFileOutputArgs {
132
230
  /**
133
- * Boolean flag indicating whether symbolically linked directories should be excluded during the creation of the archive. Defaults to false.
231
+ * Boolean flag indicating whether symbolically linked directories should be excluded during the creation of the archive. Defaults to `false`.
134
232
  */
135
233
  excludeSymlinkDirectories?: pulumi.Input<boolean>;
136
234
  /**
package/getFile.js CHANGED
@@ -5,6 +5,55 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.getFileOutput = exports.getFile = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
+ /**
9
+ * Generates an archive from content, a file, or directory of files.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as archive from "@pulumi/archive";
16
+ *
17
+ * const init = archive.getFile({
18
+ * outputPath: `${path.module}/files/init.zip`,
19
+ * sourceFile: `${path.module}/init.tpl`,
20
+ * type: "zip",
21
+ * });
22
+ * ```
23
+ *
24
+ * ```typescript
25
+ * import * as pulumi from "@pulumi/pulumi";
26
+ * import * as archive from "@pulumi/archive";
27
+ *
28
+ * const dotfiles = archive.getFile({
29
+ * type: "zip",
30
+ * outputPath: `${path.module}/files/dotfiles.zip`,
31
+ * excludes: [`${path.module}/unwanted.zip`],
32
+ * sources: [
33
+ * {
34
+ * content: data.template_file.vimrc.rendered,
35
+ * filename: ".vimrc",
36
+ * },
37
+ * {
38
+ * content: data.template_file.ssh_config.rendered,
39
+ * filename: ".ssh/config",
40
+ * },
41
+ * ],
42
+ * });
43
+ * ```
44
+ *
45
+ * ```typescript
46
+ * import * as pulumi from "@pulumi/pulumi";
47
+ * import * as archive from "@pulumi/archive";
48
+ *
49
+ * const lambdaMyFunction = archive.getFile({
50
+ * outputFileMode: "0666",
51
+ * outputPath: `${path.module}/files/lambda-my-function.js.zip`,
52
+ * sourceFile: `${path.module}/../lambda/my-function/index.js`,
53
+ * type: "zip",
54
+ * });
55
+ * ```
56
+ */
8
57
  function getFile(args, opts) {
9
58
  opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
10
59
  return pulumi.runtime.invoke("archive:index/getFile:getFile", {
@@ -21,6 +70,55 @@ function getFile(args, opts) {
21
70
  }, opts);
22
71
  }
23
72
  exports.getFile = getFile;
73
+ /**
74
+ * Generates an archive from content, a file, or directory of files.
75
+ *
76
+ * ## Example Usage
77
+ *
78
+ * ```typescript
79
+ * import * as pulumi from "@pulumi/pulumi";
80
+ * import * as archive from "@pulumi/archive";
81
+ *
82
+ * const init = archive.getFile({
83
+ * outputPath: `${path.module}/files/init.zip`,
84
+ * sourceFile: `${path.module}/init.tpl`,
85
+ * type: "zip",
86
+ * });
87
+ * ```
88
+ *
89
+ * ```typescript
90
+ * import * as pulumi from "@pulumi/pulumi";
91
+ * import * as archive from "@pulumi/archive";
92
+ *
93
+ * const dotfiles = archive.getFile({
94
+ * type: "zip",
95
+ * outputPath: `${path.module}/files/dotfiles.zip`,
96
+ * excludes: [`${path.module}/unwanted.zip`],
97
+ * sources: [
98
+ * {
99
+ * content: data.template_file.vimrc.rendered,
100
+ * filename: ".vimrc",
101
+ * },
102
+ * {
103
+ * content: data.template_file.ssh_config.rendered,
104
+ * filename: ".ssh/config",
105
+ * },
106
+ * ],
107
+ * });
108
+ * ```
109
+ *
110
+ * ```typescript
111
+ * import * as pulumi from "@pulumi/pulumi";
112
+ * import * as archive from "@pulumi/archive";
113
+ *
114
+ * const lambdaMyFunction = archive.getFile({
115
+ * outputFileMode: "0666",
116
+ * outputPath: `${path.module}/files/lambda-my-function.js.zip`,
117
+ * sourceFile: `${path.module}/../lambda/my-function/index.js`,
118
+ * type: "zip",
119
+ * });
120
+ * ```
121
+ */
24
122
  function getFileOutput(args, opts) {
25
123
  return pulumi.output(args).apply((a) => getFile(a, opts));
26
124
  }
package/getFile.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"getFile.js","sourceRoot":"","sources":["../getFile.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC,SAAgB,OAAO,CAAC,IAAiB,EAAE,IAA2B;IAElE,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CA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AAY,EAAE,IAAI,CAAC,UAAU;QAC7B,eAAe,EAAE,IAAI,CAAC,aAAa;QACnC,uBAAuB,EAAE,IAAI,CAAC,qBAAqB;QACnD,WAAW,EAAE,IAAI,CAAC,SAAS;QAC3B,YAAY,EAAE,IAAI,CAAC,UAAU;QAC7B,SAAS,EAAE,IAAI,CAAC,OAAO;QACvB,MAAM,EAAE,IAAI,CAAC,IAAI;KACpB,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAfD,0BAeC;AA6HD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,SAAgB,aAAa,CAAC,IAAuB,EAAE,IAA2B;IAC9E,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AAClE,CAAC;AAFD,sCAEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulumi/archive",
3
- "version": "v0.0.3-alpha.1702587467+ba45837d",
3
+ "version": "v0.0.3",
4
4
  "description": "A Pulumi package for creating and managing Archive cloud resources.",
5
5
  "keywords": [
6
6
  "pulumi",