@ptfm/chainguard 0.1.28

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.
Files changed (72) hide show
  1. package/README.md +3 -0
  2. package/bin/accountAssociations.d.ts +110 -0
  3. package/bin/accountAssociations.js +62 -0
  4. package/bin/accountAssociations.js.map +1 -0
  5. package/bin/apkoBuild.d.ts +80 -0
  6. package/bin/apkoBuild.js +61 -0
  7. package/bin/apkoBuild.js.map +1 -0
  8. package/bin/config/index.d.ts +1 -0
  9. package/bin/config/index.js +21 -0
  10. package/bin/config/index.js.map +1 -0
  11. package/bin/config/vars.d.ts +17 -0
  12. package/bin/config/vars.js +25 -0
  13. package/bin/config/vars.js.map +1 -0
  14. package/bin/getGroup.d.ts +28 -0
  15. package/bin/getGroup.js +28 -0
  16. package/bin/getGroup.js.map +1 -0
  17. package/bin/getIdentity.d.ts +25 -0
  18. package/bin/getIdentity.js +24 -0
  19. package/bin/getIdentity.js.map +1 -0
  20. package/bin/getRole.d.ts +29 -0
  21. package/bin/getRole.js +28 -0
  22. package/bin/getRole.js.map +1 -0
  23. package/bin/getVersions.d.ts +34 -0
  24. package/bin/getVersions.js +24 -0
  25. package/bin/getVersions.js.map +1 -0
  26. package/bin/group.d.ts +87 -0
  27. package/bin/group.js +57 -0
  28. package/bin/group.js.map +1 -0
  29. package/bin/groupInvite.d.ts +92 -0
  30. package/bin/groupInvite.js +68 -0
  31. package/bin/groupInvite.js.map +1 -0
  32. package/bin/identity.d.ts +122 -0
  33. package/bin/identity.js +64 -0
  34. package/bin/identity.js.map +1 -0
  35. package/bin/identityProvider.d.ts +98 -0
  36. package/bin/identityProvider.js +63 -0
  37. package/bin/identityProvider.js.map +1 -0
  38. package/bin/imageRepo.d.ts +122 -0
  39. package/bin/imageRepo.js +64 -0
  40. package/bin/imageRepo.js.map +1 -0
  41. package/bin/imageTag.d.ts +72 -0
  42. package/bin/imageTag.js +56 -0
  43. package/bin/imageTag.js.map +1 -0
  44. package/bin/index.d.ts +51 -0
  45. package/bin/index.js +100 -0
  46. package/bin/index.js.map +1 -0
  47. package/bin/package.json +34 -0
  48. package/bin/provider.d.ts +48 -0
  49. package/bin/provider.js +47 -0
  50. package/bin/provider.js.map +1 -0
  51. package/bin/role.d.ts +84 -0
  52. package/bin/role.js +61 -0
  53. package/bin/role.js.map +1 -0
  54. package/bin/rolebinding.d.ts +72 -0
  55. package/bin/rolebinding.js +62 -0
  56. package/bin/rolebinding.js.map +1 -0
  57. package/bin/subscription.d.ts +60 -0
  58. package/bin/subscription.js +57 -0
  59. package/bin/subscription.js.map +1 -0
  60. package/bin/types/index.d.ts +3 -0
  61. package/bin/types/index.js +11 -0
  62. package/bin/types/index.js.map +1 -0
  63. package/bin/types/input.d.ts +187 -0
  64. package/bin/types/input.js +5 -0
  65. package/bin/types/input.js.map +1 -0
  66. package/bin/types/output.d.ts +309 -0
  67. package/bin/types/output.js +5 -0
  68. package/bin/types/output.js.map +1 -0
  69. package/bin/utilities.d.ts +9 -0
  70. package/bin/utilities.js +141 -0
  71. package/bin/utilities.js.map +1 -0
  72. package/package.json +34 -0
@@ -0,0 +1,187 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ export interface AccountAssociationsAmazon {
3
+ /**
4
+ * AWS account ID
5
+ */
6
+ account?: pulumi.Input<string>;
7
+ }
8
+ export interface AccountAssociationsChainguard {
9
+ /**
10
+ * A map of service bindings where the key is the service name and the value is the Id of the service principal identity.
11
+ */
12
+ serviceBindings?: pulumi.Input<{
13
+ [key: string]: pulumi.Input<string>;
14
+ }>;
15
+ }
16
+ export interface AccountAssociationsGoogle {
17
+ /**
18
+ * GCP project id
19
+ */
20
+ projectId?: pulumi.Input<string>;
21
+ /**
22
+ * GCP project number
23
+ */
24
+ projectNumber?: pulumi.Input<string>;
25
+ }
26
+ export interface IdentityAwsIdentity {
27
+ /**
28
+ * AWS Account ID of AWS user
29
+ */
30
+ awsAccount?: pulumi.Input<string>;
31
+ /**
32
+ * The exact Arn that must appear in GetCallerIdentity to assume this identity.
33
+ */
34
+ awsArn?: pulumi.Input<string>;
35
+ /**
36
+ * A pattern for matching acceptable Arn that must appear in GetCallerIdentity response to assume this identity.
37
+ */
38
+ awsArnPattern?: pulumi.Input<string>;
39
+ /**
40
+ * The exact UserId that must appear in GetCallerIdentity to assume this identity.
41
+ */
42
+ awsUserId?: pulumi.Input<string>;
43
+ /**
44
+ * A pattern for matching acceptable UserID that must appear in GetCallerIdentity response to assume this identity.
45
+ */
46
+ awsUserIdPattern?: pulumi.Input<string>;
47
+ }
48
+ export interface IdentityClaimMatch {
49
+ /**
50
+ * The exact audience that must appear in tokens to assume this identity.
51
+ */
52
+ audience?: pulumi.Input<string>;
53
+ /**
54
+ * A pattern for matching acceptable audiences that appear in tokens to assume this identity.
55
+ */
56
+ audiencePattern?: pulumi.Input<string>;
57
+ /**
58
+ * The custom claim patterns for matching acceptable custom claims that appear in tokens to assume this identity.
59
+ */
60
+ claimPatterns?: pulumi.Input<{
61
+ [key: string]: pulumi.Input<string>;
62
+ }>;
63
+ /**
64
+ * The exact custom claims that appear in tokens to assume this identity.
65
+ */
66
+ claims?: pulumi.Input<{
67
+ [key: string]: pulumi.Input<string>;
68
+ }>;
69
+ /**
70
+ * The exact issuer that must appear in tokens to assume this identity.
71
+ */
72
+ issuer?: pulumi.Input<string>;
73
+ /**
74
+ * A pattern for matching acceptable issuers that appear in tokens to assume this identity.
75
+ */
76
+ issuerPattern?: pulumi.Input<string>;
77
+ /**
78
+ * The exact subject that must appear in tokens to assume this identity.
79
+ */
80
+ subject?: pulumi.Input<string>;
81
+ /**
82
+ * A pattern for matching acceptable subjects that appear in tokens to assume this identity.
83
+ */
84
+ subjectPattern?: pulumi.Input<string>;
85
+ }
86
+ export interface IdentityProviderOidc {
87
+ /**
88
+ * List of scopes to request
89
+ */
90
+ additionalScopes?: pulumi.Input<pulumi.Input<string>[]>;
91
+ /**
92
+ * Client ID for OIDC identity provider
93
+ */
94
+ clientId?: pulumi.Input<string>;
95
+ /**
96
+ * Client secret for OIDC identity provider
97
+ */
98
+ clientSecret?: pulumi.Input<string>;
99
+ /**
100
+ * Issuer URL
101
+ */
102
+ issuer?: pulumi.Input<string>;
103
+ }
104
+ export interface IdentityStatic {
105
+ /**
106
+ * The RFC3339 encoded date and time at which this identity will no longer be valid.
107
+ */
108
+ expiration?: pulumi.Input<string>;
109
+ /**
110
+ * The exact issuer that must appear in tokens to assume this identity.
111
+ */
112
+ issuer?: pulumi.Input<string>;
113
+ /**
114
+ * The JSON web key set (JWKS) of the OIDC issuer that should be used to verify tokens.
115
+ */
116
+ issuerKeys?: pulumi.Input<string>;
117
+ /**
118
+ * The exact subject that must appear in tokens to assume this identity.
119
+ */
120
+ subject?: pulumi.Input<string>;
121
+ }
122
+ export interface ImageRepoSyncConfig {
123
+ /**
124
+ * The Amazon repository under which to create a new repository with the same name as the source repository.
125
+ */
126
+ amazon?: pulumi.Input<string>;
127
+ /**
128
+ * A json-encoded APKO configuration to overlay on rebuilds of images being synced.
129
+ */
130
+ apkoOverlay?: pulumi.Input<string>;
131
+ /**
132
+ * The RFC3339 encoded date and time at which this entitlement will expire.
133
+ */
134
+ expiration?: pulumi.Input<string>;
135
+ /**
136
+ * The Google repository under which to create a new repository with the same name as the source repository.
137
+ */
138
+ google?: pulumi.Input<string>;
139
+ /**
140
+ * Controls whether the image grace period functionality is enabled or not.
141
+ */
142
+ gracePeriod?: pulumi.Input<boolean>;
143
+ /**
144
+ * The UIDP of the repository to sync images from.
145
+ */
146
+ source?: pulumi.Input<string>;
147
+ /**
148
+ * Whether the APKs for each image should also be synchronized.
149
+ */
150
+ syncApks?: pulumi.Input<boolean>;
151
+ /**
152
+ * Whether each synchronized tag should be suffixed with the image timestamp.
153
+ */
154
+ uniqueTags?: pulumi.Input<boolean>;
155
+ }
156
+ export interface ProviderLoginOptions {
157
+ /**
158
+ * Auth0 social connection to use by default for OIDC token. Must be one of: google-oauth2, gitlab, github
159
+ */
160
+ auth0Connection?: pulumi.Input<string>;
161
+ /**
162
+ * Disable automatic login when Chainguard token is expired.
163
+ */
164
+ disabled?: pulumi.Input<boolean>;
165
+ /**
166
+ * Enable to use of refresh tokens when authenticating with an IdP (not compatible with identity_token authentication).
167
+ */
168
+ enableRefreshTokens?: pulumi.Input<boolean>;
169
+ /**
170
+ * UIDP of the identity to assume when exchanging OIDC token for Chainguard token.
171
+ */
172
+ identityId?: pulumi.Input<string>;
173
+ /**
174
+ * UIDP of the identity provider authenticate with for OIDC token.
175
+ */
176
+ identityProviderId?: pulumi.Input<string>;
177
+ /**
178
+ * A path to an OIDC identity token, or explicit identity token.
179
+ */
180
+ identityToken?: pulumi.Input<string>;
181
+ /**
182
+ * Verified organization name for determining identity provider to obtain OIDC token.
183
+ */
184
+ organizationName?: pulumi.Input<string>;
185
+ }
186
+ export declare namespace config {
187
+ }
@@ -0,0 +1,5 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../../types/input.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF"}
@@ -0,0 +1,309 @@
1
+ import * as outputs from "../types/output";
2
+ export interface AccountAssociationsAmazon {
3
+ /**
4
+ * AWS account ID
5
+ */
6
+ account?: string;
7
+ }
8
+ export interface AccountAssociationsChainguard {
9
+ /**
10
+ * A map of service bindings where the key is the service name and the value is the Id of the service principal identity.
11
+ */
12
+ serviceBindings?: {
13
+ [key: string]: string;
14
+ };
15
+ }
16
+ export interface AccountAssociationsGoogle {
17
+ /**
18
+ * GCP project id
19
+ */
20
+ projectId?: string;
21
+ /**
22
+ * GCP project number
23
+ */
24
+ projectNumber?: string;
25
+ }
26
+ export interface GetRoleItem {
27
+ /**
28
+ * The capabilities granted to this role.
29
+ */
30
+ capabilities: string[];
31
+ /**
32
+ * The description of this role.
33
+ */
34
+ description: string;
35
+ /**
36
+ * The UIDP of this role.
37
+ */
38
+ id: string;
39
+ /**
40
+ * The name of this role.
41
+ */
42
+ name: string;
43
+ }
44
+ export interface GetVersionsVersionMap {
45
+ /**
46
+ * Whether the version is eol.
47
+ */
48
+ eol: boolean;
49
+ /**
50
+ * The eol date.
51
+ */
52
+ eolDate: string;
53
+ /**
54
+ * Whether the version exists.
55
+ */
56
+ exists: boolean;
57
+ /**
58
+ * Whether the version is fips.
59
+ */
60
+ fips: boolean;
61
+ /**
62
+ * Whether the version is the latest.
63
+ */
64
+ isLatest: boolean;
65
+ /**
66
+ * The lts version.
67
+ */
68
+ lts: string;
69
+ /**
70
+ * The main version.
71
+ */
72
+ main: string;
73
+ /**
74
+ * The release date.
75
+ */
76
+ releaseDate: string;
77
+ /**
78
+ * The version.
79
+ */
80
+ version: string;
81
+ }
82
+ export interface GetVersionsVersions {
83
+ /**
84
+ * The eol versions.
85
+ */
86
+ eolVersions: outputs.GetVersionsVersionsEolVersion[];
87
+ /**
88
+ * The grace period in months.
89
+ */
90
+ gracePeriodMonths: number;
91
+ /**
92
+ * The last updated timestamp.
93
+ */
94
+ lastUpdatedTimestamp: string;
95
+ /**
96
+ * The latest version.
97
+ */
98
+ latestVersion: string;
99
+ /**
100
+ * The versions.
101
+ */
102
+ versions: outputs.GetVersionsVersionsVersion[];
103
+ }
104
+ export interface GetVersionsVersionsEolVersion {
105
+ /**
106
+ * Whether the EOL version is broken.
107
+ */
108
+ eolBroken: boolean;
109
+ /**
110
+ * The eol date.
111
+ */
112
+ eolDate: string;
113
+ /**
114
+ * Whether the version exists.
115
+ */
116
+ exists: boolean;
117
+ /**
118
+ * Whether the FIPS version exists.
119
+ */
120
+ fips: boolean;
121
+ /**
122
+ * The release date.
123
+ */
124
+ releaseDate: string;
125
+ /**
126
+ * The version.
127
+ */
128
+ version: string;
129
+ }
130
+ export interface GetVersionsVersionsVersion {
131
+ /**
132
+ * Whether the version exists.
133
+ */
134
+ exists: boolean;
135
+ /**
136
+ * Whether the FIPS version exists.
137
+ */
138
+ fips: boolean;
139
+ /**
140
+ * The release date.
141
+ */
142
+ releaseDate: string;
143
+ /**
144
+ * The version.
145
+ */
146
+ version: string;
147
+ }
148
+ export interface IdentityAwsIdentity {
149
+ /**
150
+ * AWS Account ID of AWS user
151
+ */
152
+ awsAccount?: string;
153
+ /**
154
+ * The exact Arn that must appear in GetCallerIdentity to assume this identity.
155
+ */
156
+ awsArn?: string;
157
+ /**
158
+ * A pattern for matching acceptable Arn that must appear in GetCallerIdentity response to assume this identity.
159
+ */
160
+ awsArnPattern?: string;
161
+ /**
162
+ * The exact UserId that must appear in GetCallerIdentity to assume this identity.
163
+ */
164
+ awsUserId?: string;
165
+ /**
166
+ * A pattern for matching acceptable UserID that must appear in GetCallerIdentity response to assume this identity.
167
+ */
168
+ awsUserIdPattern?: string;
169
+ }
170
+ export interface IdentityClaimMatch {
171
+ /**
172
+ * The exact audience that must appear in tokens to assume this identity.
173
+ */
174
+ audience?: string;
175
+ /**
176
+ * A pattern for matching acceptable audiences that appear in tokens to assume this identity.
177
+ */
178
+ audiencePattern?: string;
179
+ /**
180
+ * The custom claim patterns for matching acceptable custom claims that appear in tokens to assume this identity.
181
+ */
182
+ claimPatterns?: {
183
+ [key: string]: string;
184
+ };
185
+ /**
186
+ * The exact custom claims that appear in tokens to assume this identity.
187
+ */
188
+ claims?: {
189
+ [key: string]: string;
190
+ };
191
+ /**
192
+ * The exact issuer that must appear in tokens to assume this identity.
193
+ */
194
+ issuer?: string;
195
+ /**
196
+ * A pattern for matching acceptable issuers that appear in tokens to assume this identity.
197
+ */
198
+ issuerPattern?: string;
199
+ /**
200
+ * The exact subject that must appear in tokens to assume this identity.
201
+ */
202
+ subject?: string;
203
+ /**
204
+ * A pattern for matching acceptable subjects that appear in tokens to assume this identity.
205
+ */
206
+ subjectPattern?: string;
207
+ }
208
+ export interface IdentityProviderOidc {
209
+ /**
210
+ * List of scopes to request
211
+ */
212
+ additionalScopes?: string[];
213
+ /**
214
+ * Client ID for OIDC identity provider
215
+ */
216
+ clientId?: string;
217
+ /**
218
+ * Client secret for OIDC identity provider
219
+ */
220
+ clientSecret?: string;
221
+ /**
222
+ * Issuer URL
223
+ */
224
+ issuer?: string;
225
+ }
226
+ export interface IdentityStatic {
227
+ /**
228
+ * The RFC3339 encoded date and time at which this identity will no longer be valid.
229
+ */
230
+ expiration?: string;
231
+ /**
232
+ * The exact issuer that must appear in tokens to assume this identity.
233
+ */
234
+ issuer?: string;
235
+ /**
236
+ * The JSON web key set (JWKS) of the OIDC issuer that should be used to verify tokens.
237
+ */
238
+ issuerKeys?: string;
239
+ /**
240
+ * The exact subject that must appear in tokens to assume this identity.
241
+ */
242
+ subject?: string;
243
+ }
244
+ export interface ImageRepoSyncConfig {
245
+ /**
246
+ * The Amazon repository under which to create a new repository with the same name as the source repository.
247
+ */
248
+ amazon?: string;
249
+ /**
250
+ * A json-encoded APKO configuration to overlay on rebuilds of images being synced.
251
+ */
252
+ apkoOverlay?: string;
253
+ /**
254
+ * The RFC3339 encoded date and time at which this entitlement will expire.
255
+ */
256
+ expiration?: string;
257
+ /**
258
+ * The Google repository under which to create a new repository with the same name as the source repository.
259
+ */
260
+ google?: string;
261
+ /**
262
+ * Controls whether the image grace period functionality is enabled or not.
263
+ */
264
+ gracePeriod?: boolean;
265
+ /**
266
+ * The UIDP of the repository to sync images from.
267
+ */
268
+ source?: string;
269
+ /**
270
+ * Whether the APKs for each image should also be synchronized.
271
+ */
272
+ syncApks?: boolean;
273
+ /**
274
+ * Whether each synchronized tag should be suffixed with the image timestamp.
275
+ */
276
+ uniqueTags?: boolean;
277
+ }
278
+ export declare namespace config {
279
+ interface LoginOptions {
280
+ /**
281
+ * Auth0 social connection to use by default for OIDC token. Must be one of: google-oauth2, gitlab, github
282
+ */
283
+ auth0Connection?: string;
284
+ /**
285
+ * Disable automatic login when Chainguard token is expired.
286
+ */
287
+ disabled?: boolean;
288
+ /**
289
+ * Enable to use of refresh tokens when authenticating with an IdP (not compatible with identity_token authentication).
290
+ */
291
+ enableRefreshTokens?: boolean;
292
+ /**
293
+ * UIDP of the identity to assume when exchanging OIDC token for Chainguard token.
294
+ */
295
+ identityId?: string;
296
+ /**
297
+ * UIDP of the identity provider authenticate with for OIDC token.
298
+ */
299
+ identityProviderId?: string;
300
+ /**
301
+ * A path to an OIDC identity token, or explicit identity token.
302
+ */
303
+ identityToken?: string;
304
+ /**
305
+ * Verified organization name for determining identity provider to obtain OIDC token.
306
+ */
307
+ organizationName?: string;
308
+ }
309
+ }
@@ -0,0 +1,5 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.js","sourceRoot":"","sources":["../../types/output.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF"}
@@ -0,0 +1,9 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ export declare function getEnv(...vars: string[]): string | undefined;
3
+ export declare function getEnvBoolean(...vars: string[]): boolean | undefined;
4
+ export declare function getEnvNumber(...vars: string[]): number | undefined;
5
+ export declare function getVersion(): string;
6
+ export declare function callAsync<T>(tok: string, props: pulumi.Inputs, res?: pulumi.Resource, opts?: {
7
+ property?: string;
8
+ }): Promise<T>;
9
+ export declare function getPackage(): Promise<string | undefined>;
@@ -0,0 +1,141 @@
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
+ return new (P || (P = Promise))(function (resolve, reject) {
7
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
11
+ });
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.getPackage = exports.callAsync = exports.lazyLoad = exports.resourceOptsDefaults = exports.getVersion = exports.getEnvNumber = exports.getEnvBoolean = exports.getEnv = void 0;
15
+ const resproto = require("@pulumi/pulumi/proto/resource_pb");
16
+ const mutex = require("async-mutex");
17
+ const runtime = require("@pulumi/pulumi/runtime");
18
+ function getEnv(...vars) {
19
+ for (const v of vars) {
20
+ const value = process.env[v];
21
+ if (value) {
22
+ return value;
23
+ }
24
+ }
25
+ return undefined;
26
+ }
27
+ exports.getEnv = getEnv;
28
+ function getEnvBoolean(...vars) {
29
+ const s = getEnv(...vars);
30
+ if (s !== undefined) {
31
+ // NOTE: these values are taken from https://golang.org/src/strconv/atob.go?s=351:391#L1, which is what
32
+ // Terraform uses internally when parsing boolean values.
33
+ if (["1", "t", "T", "true", "TRUE", "True"].find(v => v === s) !== undefined) {
34
+ return true;
35
+ }
36
+ if (["0", "f", "F", "false", "FALSE", "False"].find(v => v === s) !== undefined) {
37
+ return false;
38
+ }
39
+ }
40
+ return undefined;
41
+ }
42
+ exports.getEnvBoolean = getEnvBoolean;
43
+ function getEnvNumber(...vars) {
44
+ const s = getEnv(...vars);
45
+ if (s !== undefined) {
46
+ const f = parseFloat(s);
47
+ if (!isNaN(f)) {
48
+ return f;
49
+ }
50
+ }
51
+ return undefined;
52
+ }
53
+ exports.getEnvNumber = getEnvNumber;
54
+ function getVersion() {
55
+ let version = require('./package.json').version;
56
+ // Node allows for the version to be prefixed by a "v", while semver doesn't.
57
+ // If there is a v, strip it off.
58
+ if (version.indexOf('v') === 0) {
59
+ version = version.slice(1);
60
+ }
61
+ return version;
62
+ }
63
+ exports.getVersion = getVersion;
64
+ /** @internal */
65
+ function resourceOptsDefaults() {
66
+ return { version: getVersion() };
67
+ }
68
+ exports.resourceOptsDefaults = resourceOptsDefaults;
69
+ /** @internal */
70
+ function lazyLoad(exports, props, loadModule) {
71
+ for (let property of props) {
72
+ Object.defineProperty(exports, property, {
73
+ enumerable: true,
74
+ get: function () {
75
+ return loadModule()[property];
76
+ },
77
+ });
78
+ }
79
+ }
80
+ exports.lazyLoad = lazyLoad;
81
+ function callAsync(tok, props, res, opts) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ const o = runtime.call(tok, props, res);
84
+ const value = yield o.promise(true /*withUnknowns*/);
85
+ const isKnown = yield o.isKnown;
86
+ const isSecret = yield o.isSecret;
87
+ const problem = !isKnown ? "an unknown value"
88
+ : isSecret ? "a secret value"
89
+ : undefined;
90
+ // Ingoring o.resources silently. They are typically non-empty, r.f() calls include r as a dependency.
91
+ if (problem) {
92
+ throw new Error(`Plain resource method "${tok}" incorrectly returned ${problem}. ` +
93
+ "This is an error in the provider, please report this to the provider developer.");
94
+ }
95
+ // Extract a single property if requested.
96
+ if (opts && opts.property) {
97
+ return value[opts.property];
98
+ }
99
+ return value;
100
+ });
101
+ }
102
+ exports.callAsync = callAsync;
103
+ const _packageLock = new mutex.Mutex();
104
+ var _packageRef = undefined;
105
+ function getPackage() {
106
+ return __awaiter(this, void 0, void 0, function* () {
107
+ if (_packageRef === undefined) {
108
+ if (!runtime.supportsParameterization()) {
109
+ throw new Error("The Pulumi CLI does not support parameterization. Please update the Pulumi CLI");
110
+ }
111
+ yield _packageLock.acquire();
112
+ if (_packageRef === undefined) {
113
+ const monitor = runtime.getMonitor();
114
+ const params = new resproto.Parameterization();
115
+ params.setName("chainguard");
116
+ params.setVersion("0.1.28");
117
+ params.setValue(Uint8Array.from(atob("eyJyZW1vdGUiOnsidXJsIjoicmVnaXN0cnkudGVycmFmb3JtLmlvL2NoYWluZ3VhcmQtZGV2L2NoYWluZ3VhcmQiLCJ2ZXJzaW9uIjoiMC4xLjI4In19"), c => c.charCodeAt(0)));
118
+ const req = new resproto.RegisterPackageRequest();
119
+ req.setName("terraform-provider");
120
+ req.setVersion("0.8.1");
121
+ req.setDownloadUrl("");
122
+ req.setParameterization(params);
123
+ const resp = yield new Promise((resolve, reject) => {
124
+ monitor.registerPackage(req, (err, resp) => {
125
+ if (err) {
126
+ reject(err);
127
+ }
128
+ else {
129
+ resolve(resp);
130
+ }
131
+ });
132
+ });
133
+ _packageRef = resp.getRef();
134
+ }
135
+ _packageLock.release();
136
+ }
137
+ return _packageRef;
138
+ });
139
+ }
140
+ exports.getPackage = getPackage;
141
+ //# sourceMappingURL=utilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utilities.js","sourceRoot":"","sources":["../utilities.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;AAEjF,6DAA6D;AAC7D,qCAAqC;AAErC,kDAAkD;AAGlD,SAAgB,MAAM,CAAC,GAAG,IAAc;IACpC,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE;QAClB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,KAAK,EAAE;YACP,OAAO,KAAK,CAAC;SAChB;KACJ;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AARD,wBAQC;AAED,SAAgB,aAAa,CAAC,GAAG,IAAc;IAC3C,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;IAC1B,IAAI,CAAC,KAAK,SAAS,EAAE;QACjB,uGAAuG;QACvG,yDAAyD;QACzD,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,SAAS,EAAE;YAC1E,OAAO,IAAI,CAAC;SACf;QACD,IAAI,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