@pulumiverse/vercel 0.15.0
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/LICENSE +202 -0
- package/README.md +55 -0
- package/alias.d.ts +77 -0
- package/alias.js +64 -0
- package/alias.js.map +1 -0
- package/config/index.d.ts +1 -0
- package/config/index.js +21 -0
- package/config/index.js.map +1 -0
- package/config/vars.d.ts +10 -0
- package/config/vars.js +19 -0
- package/config/vars.js.map +1 -0
- package/deployment.d.ts +177 -0
- package/deployment.js +72 -0
- package/deployment.js.map +1 -0
- package/dnsRecord.d.ts +240 -0
- package/dnsRecord.js +154 -0
- package/dnsRecord.js.map +1 -0
- package/getAlias.d.ts +60 -0
- package/getAlias.js +30 -0
- package/getAlias.js.map +1 -0
- package/getFile.d.ts +79 -0
- package/getFile.js +67 -0
- package/getFile.js.map +1 -0
- package/getPrebuiltProject.d.ts +31 -0
- package/getPrebuiltProject.js +19 -0
- package/getPrebuiltProject.js.map +1 -0
- package/getProject.d.ts +146 -0
- package/getProject.js +59 -0
- package/getProject.js.map +1 -0
- package/getProjectDirectory.d.ts +31 -0
- package/getProjectDirectory.js +19 -0
- package/getProjectDirectory.js.map +1 -0
- package/index.d.ts +42 -0
- package/index.js +83 -0
- package/index.js.map +1 -0
- package/package.json +28 -0
- package/package.json.bak +28 -0
- package/project.d.ts +275 -0
- package/project.js +118 -0
- package/project.js.map +1 -0
- package/projectDomain.d.ts +152 -0
- package/projectDomain.js +109 -0
- package/projectDomain.js.map +1 -0
- package/projectEnvironmentVariable.d.ts +152 -0
- package/projectEnvironmentVariable.js +117 -0
- package/projectEnvironmentVariable.js.map +1 -0
- package/provider.d.ts +47 -0
- package/provider.js +48 -0
- package/provider.js.map +1 -0
- package/scripts/install-pulumi-plugin.js +26 -0
- package/sharedEnvironmentVariable.d.ts +131 -0
- package/sharedEnvironmentVariable.js +106 -0
- package/sharedEnvironmentVariable.js.map +1 -0
- package/types/index.d.ts +3 -0
- package/types/index.js +11 -0
- package/types/index.js.map +1 -0
- package/types/input.d.ts +105 -0
- package/types/input.js +5 -0
- package/types/input.js.map +1 -0
- package/types/output.d.ts +140 -0
- package/types/output.js +5 -0
- package/types/output.js.map +1 -0
- package/utilities.d.ts +4 -0
- package/utilities.js +69 -0
- package/utilities.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectDomain.js","sourceRoot":"","sources":["../projectDomain.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAa,aAAc,SAAQ,MAAM,CAAC,cAAc;IACpD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA0B,EAAE,IAAmC;QACxH,OAAO,IAAI,aAAa,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACpE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,aAAa,CAAC,YAAY,CAAC;IAC9D,CAAC;IAmCD,YAAY,IAAY,EAAE,WAAoD,EAAE,IAAmC;QAC/G,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA6C,CAAC;YAC5D,cAAc,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;YAC5D,cAAc,CAAC,WAAW,CAAC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E,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,cAAc,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC;YAClF,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;SAC7D;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAClE,CAAC;;AAzFL,sCA0FC;AA5EG,gBAAgB;AACO,0BAAY,GAAG,0CAA0C,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* ## Example Usage
|
|
4
|
+
*
|
|
5
|
+
* ```typescript
|
|
6
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
7
|
+
* import * as vercel from "@pulumiverse/vercel";
|
|
8
|
+
*
|
|
9
|
+
* const exampleProject = new vercel.Project("exampleProject", {gitRepository: {
|
|
10
|
+
* type: "github",
|
|
11
|
+
* repo: "vercel/some-repo",
|
|
12
|
+
* }});
|
|
13
|
+
* // An environment variable that will be created
|
|
14
|
+
* // for this project for the "production" environment.
|
|
15
|
+
* const exampleProjectEnvironmentVariable = new vercel.ProjectEnvironmentVariable("exampleProjectEnvironmentVariable", {
|
|
16
|
+
* projectId: exampleProject.id,
|
|
17
|
+
* key: "foo",
|
|
18
|
+
* value: "bar",
|
|
19
|
+
* targets: ["production"],
|
|
20
|
+
* });
|
|
21
|
+
* // An environment variable that will be created
|
|
22
|
+
* // for this project for the "preview" environment when the branch is "staging".
|
|
23
|
+
* const exampleGitBranch = new vercel.ProjectEnvironmentVariable("exampleGitBranch", {
|
|
24
|
+
* projectId: exampleProject.id,
|
|
25
|
+
* key: "foo",
|
|
26
|
+
* value: "bar-staging",
|
|
27
|
+
* targets: ["preview"],
|
|
28
|
+
* gitBranch: "staging",
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* ## Import
|
|
33
|
+
*
|
|
34
|
+
* If importing into a personal account, or with a team configured on the provider, simply use the project_id and environment variable id. - project_id can be found in the project `settings` tab in the Vercel UI. - environment variable id can be taken from the network tab on the project page.
|
|
35
|
+
*
|
|
36
|
+
* ```sh
|
|
37
|
+
* $ pulumi import vercel:index/projectEnvironmentVariable:ProjectEnvironmentVariable example prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/FdT2e1E5Of6Cihmt
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* Alternatively, you can import via the team_id, project_id and environment variable id. - team_id can be found in the team `settings` tab in the Vercel UI. - project_id can be found in the project `settings` tab in the Vercel UI. - environment variable id can be taken from the network tab on the project page.
|
|
41
|
+
*
|
|
42
|
+
* ```sh
|
|
43
|
+
* $ pulumi import vercel:index/projectEnvironmentVariable:ProjectEnvironmentVariable example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/FdT2e1E5Of6Cihmt
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare class ProjectEnvironmentVariable extends pulumi.CustomResource {
|
|
47
|
+
/**
|
|
48
|
+
* Get an existing ProjectEnvironmentVariable resource's state with the given name, ID, and optional extra
|
|
49
|
+
* properties used to qualify the lookup.
|
|
50
|
+
*
|
|
51
|
+
* @param name The _unique_ name of the resulting resource.
|
|
52
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
53
|
+
* @param state Any extra arguments used during the lookup.
|
|
54
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
55
|
+
*/
|
|
56
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProjectEnvironmentVariableState, opts?: pulumi.CustomResourceOptions): ProjectEnvironmentVariable;
|
|
57
|
+
/**
|
|
58
|
+
* Returns true if the given object is an instance of ProjectEnvironmentVariable. This is designed to work even
|
|
59
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
60
|
+
*/
|
|
61
|
+
static isInstance(obj: any): obj is ProjectEnvironmentVariable;
|
|
62
|
+
/**
|
|
63
|
+
* The git branch of the Environment Variable.
|
|
64
|
+
*/
|
|
65
|
+
readonly gitBranch: pulumi.Output<string | undefined>;
|
|
66
|
+
/**
|
|
67
|
+
* The name of the Environment Variable.
|
|
68
|
+
*/
|
|
69
|
+
readonly key: pulumi.Output<string>;
|
|
70
|
+
/**
|
|
71
|
+
* The ID of the Vercel project.
|
|
72
|
+
*/
|
|
73
|
+
readonly projectId: pulumi.Output<string>;
|
|
74
|
+
/**
|
|
75
|
+
* The environments that the Environment Variable should be present on. Valid targets are either `production`, `preview`, or `development`.
|
|
76
|
+
*/
|
|
77
|
+
readonly targets: pulumi.Output<string[]>;
|
|
78
|
+
/**
|
|
79
|
+
* The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
|
|
80
|
+
*/
|
|
81
|
+
readonly teamId: pulumi.Output<string>;
|
|
82
|
+
/**
|
|
83
|
+
* The value of the Environment Variable.
|
|
84
|
+
*/
|
|
85
|
+
readonly value: pulumi.Output<string>;
|
|
86
|
+
/**
|
|
87
|
+
* Create a ProjectEnvironmentVariable resource with the given unique name, arguments, and options.
|
|
88
|
+
*
|
|
89
|
+
* @param name The _unique_ name of the resource.
|
|
90
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
91
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
92
|
+
*/
|
|
93
|
+
constructor(name: string, args: ProjectEnvironmentVariableArgs, opts?: pulumi.CustomResourceOptions);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Input properties used for looking up and filtering ProjectEnvironmentVariable resources.
|
|
97
|
+
*/
|
|
98
|
+
export interface ProjectEnvironmentVariableState {
|
|
99
|
+
/**
|
|
100
|
+
* The git branch of the Environment Variable.
|
|
101
|
+
*/
|
|
102
|
+
gitBranch?: pulumi.Input<string>;
|
|
103
|
+
/**
|
|
104
|
+
* The name of the Environment Variable.
|
|
105
|
+
*/
|
|
106
|
+
key?: pulumi.Input<string>;
|
|
107
|
+
/**
|
|
108
|
+
* The ID of the Vercel project.
|
|
109
|
+
*/
|
|
110
|
+
projectId?: pulumi.Input<string>;
|
|
111
|
+
/**
|
|
112
|
+
* The environments that the Environment Variable should be present on. Valid targets are either `production`, `preview`, or `development`.
|
|
113
|
+
*/
|
|
114
|
+
targets?: pulumi.Input<pulumi.Input<string>[]>;
|
|
115
|
+
/**
|
|
116
|
+
* The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
|
|
117
|
+
*/
|
|
118
|
+
teamId?: pulumi.Input<string>;
|
|
119
|
+
/**
|
|
120
|
+
* The value of the Environment Variable.
|
|
121
|
+
*/
|
|
122
|
+
value?: pulumi.Input<string>;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* The set of arguments for constructing a ProjectEnvironmentVariable resource.
|
|
126
|
+
*/
|
|
127
|
+
export interface ProjectEnvironmentVariableArgs {
|
|
128
|
+
/**
|
|
129
|
+
* The git branch of the Environment Variable.
|
|
130
|
+
*/
|
|
131
|
+
gitBranch?: pulumi.Input<string>;
|
|
132
|
+
/**
|
|
133
|
+
* The name of the Environment Variable.
|
|
134
|
+
*/
|
|
135
|
+
key: pulumi.Input<string>;
|
|
136
|
+
/**
|
|
137
|
+
* The ID of the Vercel project.
|
|
138
|
+
*/
|
|
139
|
+
projectId: pulumi.Input<string>;
|
|
140
|
+
/**
|
|
141
|
+
* The environments that the Environment Variable should be present on. Valid targets are either `production`, `preview`, or `development`.
|
|
142
|
+
*/
|
|
143
|
+
targets: pulumi.Input<pulumi.Input<string>[]>;
|
|
144
|
+
/**
|
|
145
|
+
* The ID of the Vercel team.Required when configuring a team resource if a default team has not been set in the provider.
|
|
146
|
+
*/
|
|
147
|
+
teamId?: pulumi.Input<string>;
|
|
148
|
+
/**
|
|
149
|
+
* The value of the Environment Variable.
|
|
150
|
+
*/
|
|
151
|
+
value: pulumi.Input<string>;
|
|
152
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.ProjectEnvironmentVariable = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* ## Example Usage
|
|
10
|
+
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
13
|
+
* import * as vercel from "@pulumiverse/vercel";
|
|
14
|
+
*
|
|
15
|
+
* const exampleProject = new vercel.Project("exampleProject", {gitRepository: {
|
|
16
|
+
* type: "github",
|
|
17
|
+
* repo: "vercel/some-repo",
|
|
18
|
+
* }});
|
|
19
|
+
* // An environment variable that will be created
|
|
20
|
+
* // for this project for the "production" environment.
|
|
21
|
+
* const exampleProjectEnvironmentVariable = new vercel.ProjectEnvironmentVariable("exampleProjectEnvironmentVariable", {
|
|
22
|
+
* projectId: exampleProject.id,
|
|
23
|
+
* key: "foo",
|
|
24
|
+
* value: "bar",
|
|
25
|
+
* targets: ["production"],
|
|
26
|
+
* });
|
|
27
|
+
* // An environment variable that will be created
|
|
28
|
+
* // for this project for the "preview" environment when the branch is "staging".
|
|
29
|
+
* const exampleGitBranch = new vercel.ProjectEnvironmentVariable("exampleGitBranch", {
|
|
30
|
+
* projectId: exampleProject.id,
|
|
31
|
+
* key: "foo",
|
|
32
|
+
* value: "bar-staging",
|
|
33
|
+
* targets: ["preview"],
|
|
34
|
+
* gitBranch: "staging",
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* ## Import
|
|
39
|
+
*
|
|
40
|
+
* If importing into a personal account, or with a team configured on the provider, simply use the project_id and environment variable id. - project_id can be found in the project `settings` tab in the Vercel UI. - environment variable id can be taken from the network tab on the project page.
|
|
41
|
+
*
|
|
42
|
+
* ```sh
|
|
43
|
+
* $ pulumi import vercel:index/projectEnvironmentVariable:ProjectEnvironmentVariable example prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/FdT2e1E5Of6Cihmt
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* Alternatively, you can import via the team_id, project_id and environment variable id. - team_id can be found in the team `settings` tab in the Vercel UI. - project_id can be found in the project `settings` tab in the Vercel UI. - environment variable id can be taken from the network tab on the project page.
|
|
47
|
+
*
|
|
48
|
+
* ```sh
|
|
49
|
+
* $ pulumi import vercel:index/projectEnvironmentVariable:ProjectEnvironmentVariable example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/FdT2e1E5Of6Cihmt
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
class ProjectEnvironmentVariable extends pulumi.CustomResource {
|
|
53
|
+
/**
|
|
54
|
+
* Get an existing ProjectEnvironmentVariable resource's state with the given name, ID, and optional extra
|
|
55
|
+
* properties used to qualify the lookup.
|
|
56
|
+
*
|
|
57
|
+
* @param name The _unique_ name of the resulting resource.
|
|
58
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
59
|
+
* @param state Any extra arguments used during the lookup.
|
|
60
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
61
|
+
*/
|
|
62
|
+
static get(name, id, state, opts) {
|
|
63
|
+
return new ProjectEnvironmentVariable(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Returns true if the given object is an instance of ProjectEnvironmentVariable. This is designed to work even
|
|
67
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
68
|
+
*/
|
|
69
|
+
static isInstance(obj) {
|
|
70
|
+
if (obj === undefined || obj === null) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
return obj['__pulumiType'] === ProjectEnvironmentVariable.__pulumiType;
|
|
74
|
+
}
|
|
75
|
+
constructor(name, argsOrState, opts) {
|
|
76
|
+
let resourceInputs = {};
|
|
77
|
+
opts = opts || {};
|
|
78
|
+
if (opts.id) {
|
|
79
|
+
const state = argsOrState;
|
|
80
|
+
resourceInputs["gitBranch"] = state ? state.gitBranch : undefined;
|
|
81
|
+
resourceInputs["key"] = state ? state.key : undefined;
|
|
82
|
+
resourceInputs["projectId"] = state ? state.projectId : undefined;
|
|
83
|
+
resourceInputs["targets"] = state ? state.targets : undefined;
|
|
84
|
+
resourceInputs["teamId"] = state ? state.teamId : undefined;
|
|
85
|
+
resourceInputs["value"] = state ? state.value : undefined;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
const args = argsOrState;
|
|
89
|
+
if ((!args || args.key === undefined) && !opts.urn) {
|
|
90
|
+
throw new Error("Missing required property 'key'");
|
|
91
|
+
}
|
|
92
|
+
if ((!args || args.projectId === undefined) && !opts.urn) {
|
|
93
|
+
throw new Error("Missing required property 'projectId'");
|
|
94
|
+
}
|
|
95
|
+
if ((!args || args.targets === undefined) && !opts.urn) {
|
|
96
|
+
throw new Error("Missing required property 'targets'");
|
|
97
|
+
}
|
|
98
|
+
if ((!args || args.value === undefined) && !opts.urn) {
|
|
99
|
+
throw new Error("Missing required property 'value'");
|
|
100
|
+
}
|
|
101
|
+
resourceInputs["gitBranch"] = args ? args.gitBranch : undefined;
|
|
102
|
+
resourceInputs["key"] = args ? args.key : undefined;
|
|
103
|
+
resourceInputs["projectId"] = args ? args.projectId : undefined;
|
|
104
|
+
resourceInputs["targets"] = args ? args.targets : undefined;
|
|
105
|
+
resourceInputs["teamId"] = args ? args.teamId : undefined;
|
|
106
|
+
resourceInputs["value"] = (args === null || args === void 0 ? void 0 : args.value) ? pulumi.secret(args.value) : undefined;
|
|
107
|
+
}
|
|
108
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
109
|
+
const secretOpts = { additionalSecretOutputs: ["value"] };
|
|
110
|
+
opts = pulumi.mergeOptions(opts, secretOpts);
|
|
111
|
+
super(ProjectEnvironmentVariable.__pulumiType, name, resourceInputs, opts);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
exports.ProjectEnvironmentVariable = ProjectEnvironmentVariable;
|
|
115
|
+
/** @internal */
|
|
116
|
+
ProjectEnvironmentVariable.__pulumiType = 'vercel:index/projectEnvironmentVariable:ProjectEnvironmentVariable';
|
|
117
|
+
//# sourceMappingURL=projectEnvironmentVariable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectEnvironmentVariable.js","sourceRoot":"","sources":["../projectEnvironmentVariable.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAa,0BAA2B,SAAQ,MAAM,CAAC,cAAc;IACjE;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAuC,EAAE,IAAmC;QACrI,OAAO,IAAI,0BAA0B,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACjF,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,O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AE,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,EAAE,uBAAuB,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1D,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,0BAA0B,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC/E,CAAC;;AAjGL,gEAkGC;AApFG,gBAAgB;AACO,uCAAY,GAAG,oEAAoE,CAAC"}
|
package/provider.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* The provider type for the vercel package. By default, resources use package-wide configuration
|
|
4
|
+
* settings, however an explicit `Provider` instance may be created and passed during resource
|
|
5
|
+
* construction to achieve fine-grained programmatic control over provider settings. See the
|
|
6
|
+
* [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Provider extends pulumi.ProviderResource {
|
|
9
|
+
/**
|
|
10
|
+
* Returns true if the given object is an instance of Provider. This is designed to work even
|
|
11
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
12
|
+
*/
|
|
13
|
+
static isInstance(obj: any): obj is Provider;
|
|
14
|
+
/**
|
|
15
|
+
* The Vercel API Token to use. This can also be specified with the `VERCEL_API_TOKEN` shell environment variable. Tokens
|
|
16
|
+
* can be created from your [Vercel settings](https://vercel.com/account/tokens).
|
|
17
|
+
*/
|
|
18
|
+
readonly apiToken: pulumi.Output<string | undefined>;
|
|
19
|
+
/**
|
|
20
|
+
* The default Vercel Team to use when creating resources. This can be provided as either a team slug, or team ID. The slug
|
|
21
|
+
* and ID are both available from the Team Settings page in the Vercel dashboard.
|
|
22
|
+
*/
|
|
23
|
+
readonly team: pulumi.Output<string | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* Create a Provider resource with the given unique name, arguments, and options.
|
|
26
|
+
*
|
|
27
|
+
* @param name The _unique_ name of the resource.
|
|
28
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
29
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
30
|
+
*/
|
|
31
|
+
constructor(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The set of arguments for constructing a Provider resource.
|
|
35
|
+
*/
|
|
36
|
+
export interface ProviderArgs {
|
|
37
|
+
/**
|
|
38
|
+
* The Vercel API Token to use. This can also be specified with the `VERCEL_API_TOKEN` shell environment variable. Tokens
|
|
39
|
+
* can be created from your [Vercel settings](https://vercel.com/account/tokens).
|
|
40
|
+
*/
|
|
41
|
+
apiToken?: pulumi.Input<string>;
|
|
42
|
+
/**
|
|
43
|
+
* The default Vercel Team to use when creating resources. This can be provided as either a team slug, or team ID. The slug
|
|
44
|
+
* and ID are both available from the Team Settings page in the Vercel dashboard.
|
|
45
|
+
*/
|
|
46
|
+
team?: pulumi.Input<string>;
|
|
47
|
+
}
|
package/provider.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.Provider = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* The provider type for the vercel package. By default, resources use package-wide configuration
|
|
10
|
+
* settings, however an explicit `Provider` instance may be created and passed during resource
|
|
11
|
+
* construction to achieve fine-grained programmatic control over provider settings. See the
|
|
12
|
+
* [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
|
|
13
|
+
*/
|
|
14
|
+
class Provider extends pulumi.ProviderResource {
|
|
15
|
+
/**
|
|
16
|
+
* Returns true if the given object is an instance of Provider. This is designed to work even
|
|
17
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
18
|
+
*/
|
|
19
|
+
static isInstance(obj) {
|
|
20
|
+
if (obj === undefined || obj === null) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Create a Provider resource with the given unique name, arguments, and options.
|
|
27
|
+
*
|
|
28
|
+
* @param name The _unique_ name of the resource.
|
|
29
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
30
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
31
|
+
*/
|
|
32
|
+
constructor(name, args, opts) {
|
|
33
|
+
let resourceInputs = {};
|
|
34
|
+
opts = opts || {};
|
|
35
|
+
{
|
|
36
|
+
resourceInputs["apiToken"] = (args === null || args === void 0 ? void 0 : args.apiToken) ? pulumi.secret(args.apiToken) : undefined;
|
|
37
|
+
resourceInputs["team"] = args ? args.team : undefined;
|
|
38
|
+
}
|
|
39
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
40
|
+
const secretOpts = { additionalSecretOutputs: ["apiToken"] };
|
|
41
|
+
opts = pulumi.mergeOptions(opts, secretOpts);
|
|
42
|
+
super(Provider.__pulumiType, name, resourceInputs, opts);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.Provider = Provider;
|
|
46
|
+
/** @internal */
|
|
47
|
+
Provider.__pulumiType = 'vercel';
|
|
48
|
+
//# sourceMappingURL=provider.js.map
|
package/provider.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../provider.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;GAKG;AACH,MAAa,QA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);
|
|
5
|
+
|
|
6
|
+
if (args.indexOf("${VERSION}") !== -1) {
|
|
7
|
+
process.exit(0);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
var res = childProcess.spawnSync("pulumi", ["plugin", "install", "--server", "github://api.github.com/pulumiverse"].concat(args), {
|
|
11
|
+
stdio: ["ignore", "inherit", "inherit"]
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
if (res.error && res.error.code === "ENOENT") {
|
|
15
|
+
console.error("\nThere was an error installing the resource provider plugin. " +
|
|
16
|
+
"It looks like `pulumi` is not installed on your system. " +
|
|
17
|
+
"Please visit https://pulumi.com/ to install the Pulumi CLI.\n" +
|
|
18
|
+
"You may try manually installing the plugin by running " +
|
|
19
|
+
"`pulumi plugin install " + args.join(" ") + "`");
|
|
20
|
+
} else if (res.error || res.status !== 0) {
|
|
21
|
+
console.error("\nThere was an error installing the resource provider plugin. " +
|
|
22
|
+
"You may try to manually installing the plugin by running " +
|
|
23
|
+
"`pulumi plugin install " + args.join(" ") + "`");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
process.exit(0);
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* Provides a Shared Environment Variable resource.
|
|
4
|
+
*
|
|
5
|
+
* A Shared Environment Variable resource defines an Environment Variable that can be shared between multiple Vercel Projects.
|
|
6
|
+
*
|
|
7
|
+
* For more detailed information, please see the [Vercel documentation](https://vercel.com/docs/concepts/projects/environment-variables/shared-environment-variables).
|
|
8
|
+
*
|
|
9
|
+
* ## Example Usage
|
|
10
|
+
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
13
|
+
* import * as vercel from "@pulumiverse/vercel";
|
|
14
|
+
*
|
|
15
|
+
* const exampleProject = new vercel.Project("exampleProject", {gitRepository: {
|
|
16
|
+
* type: "github",
|
|
17
|
+
* repo: "vercel/some-repo",
|
|
18
|
+
* }});
|
|
19
|
+
* // A shared environment variable that will be created
|
|
20
|
+
* // and associated with the "example" project.
|
|
21
|
+
* const exampleSharedEnvironmentVariable = new vercel.SharedEnvironmentVariable("exampleSharedEnvironmentVariable", {
|
|
22
|
+
* key: "EXAMPLE",
|
|
23
|
+
* value: "some_value",
|
|
24
|
+
* targets: ["production"],
|
|
25
|
+
* projectIds: [exampleProject.id],
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* ## Import
|
|
30
|
+
*
|
|
31
|
+
* You can import via the team_id and environment variable id. - team_id can be found in the team `settings` tab in the Vercel UI. - environment variable id can be taken from the network tab on the shared environment variable page.
|
|
32
|
+
*
|
|
33
|
+
* ```sh
|
|
34
|
+
* $ pulumi import vercel:index/sharedEnvironmentVariable:SharedEnvironmentVariable example team_xxxxxxxxxxxxxxxxxxxxxxxx/env_yyyyyyyyyyyyy
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare class SharedEnvironmentVariable extends pulumi.CustomResource {
|
|
38
|
+
/**
|
|
39
|
+
* Get an existing SharedEnvironmentVariable resource's state with the given name, ID, and optional extra
|
|
40
|
+
* properties used to qualify the lookup.
|
|
41
|
+
*
|
|
42
|
+
* @param name The _unique_ name of the resulting resource.
|
|
43
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
44
|
+
* @param state Any extra arguments used during the lookup.
|
|
45
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
46
|
+
*/
|
|
47
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SharedEnvironmentVariableState, opts?: pulumi.CustomResourceOptions): SharedEnvironmentVariable;
|
|
48
|
+
/**
|
|
49
|
+
* Returns true if the given object is an instance of SharedEnvironmentVariable. This is designed to work even
|
|
50
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
51
|
+
*/
|
|
52
|
+
static isInstance(obj: any): obj is SharedEnvironmentVariable;
|
|
53
|
+
/**
|
|
54
|
+
* The name of the Environment Variable.
|
|
55
|
+
*/
|
|
56
|
+
readonly key: pulumi.Output<string>;
|
|
57
|
+
/**
|
|
58
|
+
* The ID of the Vercel project.
|
|
59
|
+
*/
|
|
60
|
+
readonly projectIds: pulumi.Output<string[]>;
|
|
61
|
+
/**
|
|
62
|
+
* The environments that the Environment Variable should be present on. Valid targets are either `production`, `preview`, or `development`.
|
|
63
|
+
*/
|
|
64
|
+
readonly targets: pulumi.Output<string[]>;
|
|
65
|
+
/**
|
|
66
|
+
* The ID of the Vercel team. Shared environment variables require a team.
|
|
67
|
+
*/
|
|
68
|
+
readonly teamId: pulumi.Output<string>;
|
|
69
|
+
/**
|
|
70
|
+
* The value of the Environment Variable.
|
|
71
|
+
*/
|
|
72
|
+
readonly value: pulumi.Output<string>;
|
|
73
|
+
/**
|
|
74
|
+
* Create a SharedEnvironmentVariable resource with the given unique name, arguments, and options.
|
|
75
|
+
*
|
|
76
|
+
* @param name The _unique_ name of the resource.
|
|
77
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
78
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
79
|
+
*/
|
|
80
|
+
constructor(name: string, args: SharedEnvironmentVariableArgs, opts?: pulumi.CustomResourceOptions);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Input properties used for looking up and filtering SharedEnvironmentVariable resources.
|
|
84
|
+
*/
|
|
85
|
+
export interface SharedEnvironmentVariableState {
|
|
86
|
+
/**
|
|
87
|
+
* The name of the Environment Variable.
|
|
88
|
+
*/
|
|
89
|
+
key?: pulumi.Input<string>;
|
|
90
|
+
/**
|
|
91
|
+
* The ID of the Vercel project.
|
|
92
|
+
*/
|
|
93
|
+
projectIds?: pulumi.Input<pulumi.Input<string>[]>;
|
|
94
|
+
/**
|
|
95
|
+
* The environments that the Environment Variable should be present on. Valid targets are either `production`, `preview`, or `development`.
|
|
96
|
+
*/
|
|
97
|
+
targets?: pulumi.Input<pulumi.Input<string>[]>;
|
|
98
|
+
/**
|
|
99
|
+
* The ID of the Vercel team. Shared environment variables require a team.
|
|
100
|
+
*/
|
|
101
|
+
teamId?: pulumi.Input<string>;
|
|
102
|
+
/**
|
|
103
|
+
* The value of the Environment Variable.
|
|
104
|
+
*/
|
|
105
|
+
value?: pulumi.Input<string>;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* The set of arguments for constructing a SharedEnvironmentVariable resource.
|
|
109
|
+
*/
|
|
110
|
+
export interface SharedEnvironmentVariableArgs {
|
|
111
|
+
/**
|
|
112
|
+
* The name of the Environment Variable.
|
|
113
|
+
*/
|
|
114
|
+
key: pulumi.Input<string>;
|
|
115
|
+
/**
|
|
116
|
+
* The ID of the Vercel project.
|
|
117
|
+
*/
|
|
118
|
+
projectIds: pulumi.Input<pulumi.Input<string>[]>;
|
|
119
|
+
/**
|
|
120
|
+
* The environments that the Environment Variable should be present on. Valid targets are either `production`, `preview`, or `development`.
|
|
121
|
+
*/
|
|
122
|
+
targets: pulumi.Input<pulumi.Input<string>[]>;
|
|
123
|
+
/**
|
|
124
|
+
* The ID of the Vercel team. Shared environment variables require a team.
|
|
125
|
+
*/
|
|
126
|
+
teamId?: pulumi.Input<string>;
|
|
127
|
+
/**
|
|
128
|
+
* The value of the Environment Variable.
|
|
129
|
+
*/
|
|
130
|
+
value: pulumi.Input<string>;
|
|
131
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.SharedEnvironmentVariable = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Provides a Shared Environment Variable resource.
|
|
10
|
+
*
|
|
11
|
+
* A Shared Environment Variable resource defines an Environment Variable that can be shared between multiple Vercel Projects.
|
|
12
|
+
*
|
|
13
|
+
* For more detailed information, please see the [Vercel documentation](https://vercel.com/docs/concepts/projects/environment-variables/shared-environment-variables).
|
|
14
|
+
*
|
|
15
|
+
* ## Example Usage
|
|
16
|
+
*
|
|
17
|
+
* ```typescript
|
|
18
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
19
|
+
* import * as vercel from "@pulumiverse/vercel";
|
|
20
|
+
*
|
|
21
|
+
* const exampleProject = new vercel.Project("exampleProject", {gitRepository: {
|
|
22
|
+
* type: "github",
|
|
23
|
+
* repo: "vercel/some-repo",
|
|
24
|
+
* }});
|
|
25
|
+
* // A shared environment variable that will be created
|
|
26
|
+
* // and associated with the "example" project.
|
|
27
|
+
* const exampleSharedEnvironmentVariable = new vercel.SharedEnvironmentVariable("exampleSharedEnvironmentVariable", {
|
|
28
|
+
* key: "EXAMPLE",
|
|
29
|
+
* value: "some_value",
|
|
30
|
+
* targets: ["production"],
|
|
31
|
+
* projectIds: [exampleProject.id],
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* ## Import
|
|
36
|
+
*
|
|
37
|
+
* You can import via the team_id and environment variable id. - team_id can be found in the team `settings` tab in the Vercel UI. - environment variable id can be taken from the network tab on the shared environment variable page.
|
|
38
|
+
*
|
|
39
|
+
* ```sh
|
|
40
|
+
* $ pulumi import vercel:index/sharedEnvironmentVariable:SharedEnvironmentVariable example team_xxxxxxxxxxxxxxxxxxxxxxxx/env_yyyyyyyyyyyyy
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
class SharedEnvironmentVariable extends pulumi.CustomResource {
|
|
44
|
+
/**
|
|
45
|
+
* Get an existing SharedEnvironmentVariable resource's state with the given name, ID, and optional extra
|
|
46
|
+
* properties used to qualify the lookup.
|
|
47
|
+
*
|
|
48
|
+
* @param name The _unique_ name of the resulting resource.
|
|
49
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
50
|
+
* @param state Any extra arguments used during the lookup.
|
|
51
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
52
|
+
*/
|
|
53
|
+
static get(name, id, state, opts) {
|
|
54
|
+
return new SharedEnvironmentVariable(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Returns true if the given object is an instance of SharedEnvironmentVariable. This is designed to work even
|
|
58
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
59
|
+
*/
|
|
60
|
+
static isInstance(obj) {
|
|
61
|
+
if (obj === undefined || obj === null) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
return obj['__pulumiType'] === SharedEnvironmentVariable.__pulumiType;
|
|
65
|
+
}
|
|
66
|
+
constructor(name, argsOrState, opts) {
|
|
67
|
+
let resourceInputs = {};
|
|
68
|
+
opts = opts || {};
|
|
69
|
+
if (opts.id) {
|
|
70
|
+
const state = argsOrState;
|
|
71
|
+
resourceInputs["key"] = state ? state.key : undefined;
|
|
72
|
+
resourceInputs["projectIds"] = state ? state.projectIds : undefined;
|
|
73
|
+
resourceInputs["targets"] = state ? state.targets : undefined;
|
|
74
|
+
resourceInputs["teamId"] = state ? state.teamId : undefined;
|
|
75
|
+
resourceInputs["value"] = state ? state.value : undefined;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
const args = argsOrState;
|
|
79
|
+
if ((!args || args.key === undefined) && !opts.urn) {
|
|
80
|
+
throw new Error("Missing required property 'key'");
|
|
81
|
+
}
|
|
82
|
+
if ((!args || args.projectIds === undefined) && !opts.urn) {
|
|
83
|
+
throw new Error("Missing required property 'projectIds'");
|
|
84
|
+
}
|
|
85
|
+
if ((!args || args.targets === undefined) && !opts.urn) {
|
|
86
|
+
throw new Error("Missing required property 'targets'");
|
|
87
|
+
}
|
|
88
|
+
if ((!args || args.value === undefined) && !opts.urn) {
|
|
89
|
+
throw new Error("Missing required property 'value'");
|
|
90
|
+
}
|
|
91
|
+
resourceInputs["key"] = args ? args.key : undefined;
|
|
92
|
+
resourceInputs["projectIds"] = args ? args.projectIds : undefined;
|
|
93
|
+
resourceInputs["targets"] = args ? args.targets : undefined;
|
|
94
|
+
resourceInputs["teamId"] = args ? args.teamId : undefined;
|
|
95
|
+
resourceInputs["value"] = (args === null || args === void 0 ? void 0 : args.value) ? pulumi.secret(args.value) : undefined;
|
|
96
|
+
}
|
|
97
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
98
|
+
const secretOpts = { additionalSecretOutputs: ["value"] };
|
|
99
|
+
opts = pulumi.mergeOptions(opts, secretOpts);
|
|
100
|
+
super(SharedEnvironmentVariable.__pulumiType, name, resourceInputs, opts);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.SharedEnvironmentVariable = SharedEnvironmentVariable;
|
|
104
|
+
/** @internal */
|
|
105
|
+
SharedEnvironmentVariable.__pulumiType = 'vercel:index/sharedEnvironmentVariable:SharedEnvironmentVariable';
|
|
106
|
+
//# sourceMappingURL=sharedEnvironmentVariable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharedEnvironmentVariable.js","sourceRoot":"","sources":["../sharedEnvironmentVariable.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAa,yBAA0B,SAAQ,MAAM,CAAC,cAAc;IAChE;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAsC,EAAE,IAAmC;QACpI,OAAO,IAAI,yBAAyB,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAChF,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B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