pulumi-namecheap 2.2.6 → 2.2.7
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/bin/config/index.d.ts +1 -8
- package/bin/config/index.js +21 -9
- package/bin/config/index.js.map +1 -0
- package/bin/config/vars.d.ts +5 -8
- package/bin/config/vars.js +37 -42
- package/bin/config/vars.js.map +1 -0
- package/bin/domainRecords.d.ts +73 -79
- package/bin/domainRecords.js +62 -81
- package/bin/domainRecords.js.map +1 -0
- package/bin/index.d.ts +9 -14
- package/bin/index.js +33 -28
- package/bin/index.js.map +1 -0
- package/bin/package.json +2 -5
- package/bin/provider.d.ts +51 -58
- package/bin/provider.js +58 -64
- package/bin/provider.js.map +1 -0
- package/bin/types/index.d.ts +3 -9
- package/bin/types/index.js +11 -13
- package/bin/types/index.js.map +1 -0
- package/bin/types/input.d.ts +21 -28
- package/bin/types/input.js +5 -5
- package/bin/types/input.js.map +1 -0
- package/bin/types/output.d.ts +21 -26
- package/bin/types/output.js +5 -5
- package/bin/types/output.js.map +1 -0
- package/bin/utilities.d.ts +5 -0
- package/bin/utilities.js +134 -54
- package/bin/utilities.js.map +1 -0
- package/package.json +2 -5
- package/bin/_virtual/rolldown_runtime.js +0 -37
- package/bin/package.js +0 -64
package/bin/provider.d.ts
CHANGED
|
@@ -1,70 +1,63 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
-
|
|
3
|
-
//#region provider.d.ts
|
|
4
|
-
|
|
5
2
|
/**
|
|
6
3
|
* The provider type for the namecheap package. By default, resources use package-wide configuration
|
|
7
4
|
* settings, however an explicit `Provider` instance may be created and passed during resource
|
|
8
5
|
* construction to achieve fine-grained programmatic control over provider settings. See the
|
|
9
6
|
* [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
|
|
10
7
|
*/
|
|
11
|
-
declare class Provider extends pulumi.ProviderResource {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
*/
|
|
42
|
-
constructor(name: string, args: ProviderArgs, opts?: pulumi.ResourceOptions);
|
|
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 namecheap API key
|
|
16
|
+
*/
|
|
17
|
+
readonly apiKey: pulumi.Output<string>;
|
|
18
|
+
/**
|
|
19
|
+
* A registered api user for namecheap
|
|
20
|
+
*/
|
|
21
|
+
readonly apiUser: pulumi.Output<string>;
|
|
22
|
+
/**
|
|
23
|
+
* Client IP address
|
|
24
|
+
*/
|
|
25
|
+
readonly clientIp: pulumi.Output<string | undefined>;
|
|
26
|
+
/**
|
|
27
|
+
* A registered user name for namecheap
|
|
28
|
+
*/
|
|
29
|
+
readonly userName: pulumi.Output<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Create a Provider resource with the given unique name, arguments, and options.
|
|
32
|
+
*
|
|
33
|
+
* @param name The _unique_ name of the resource.
|
|
34
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
35
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
36
|
+
*/
|
|
37
|
+
constructor(name: string, args: ProviderArgs, opts?: pulumi.ResourceOptions);
|
|
43
38
|
}
|
|
44
39
|
/**
|
|
45
40
|
* The set of arguments for constructing a Provider resource.
|
|
46
41
|
*/
|
|
47
|
-
interface ProviderArgs {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
42
|
+
export interface ProviderArgs {
|
|
43
|
+
/**
|
|
44
|
+
* The namecheap API key
|
|
45
|
+
*/
|
|
46
|
+
apiKey: pulumi.Input<string>;
|
|
47
|
+
/**
|
|
48
|
+
* A registered api user for namecheap
|
|
49
|
+
*/
|
|
50
|
+
apiUser: pulumi.Input<string>;
|
|
51
|
+
/**
|
|
52
|
+
* Client IP address
|
|
53
|
+
*/
|
|
54
|
+
clientIp?: pulumi.Input<string>;
|
|
55
|
+
/**
|
|
56
|
+
* Use sandbox API endpoints
|
|
57
|
+
*/
|
|
58
|
+
useSandbox?: pulumi.Input<boolean>;
|
|
59
|
+
/**
|
|
60
|
+
* A registered user name for namecheap
|
|
61
|
+
*/
|
|
62
|
+
userName: pulumi.Input<string>;
|
|
68
63
|
}
|
|
69
|
-
//#endregion
|
|
70
|
-
export { Provider, ProviderArgs };
|
package/bin/provider.js
CHANGED
|
@@ -1,64 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
};
|
|
60
|
-
}) });
|
|
61
|
-
|
|
62
|
-
//#endregion
|
|
63
|
-
init_provider();
|
|
64
|
-
export { init_provider, provider_exports };
|
|
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
|
+
exports.Provider = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* The provider type for the namecheap 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
|
+
if ((!args || args.apiKey === undefined) && !opts.urn) {
|
|
37
|
+
throw new Error("Missing required property 'apiKey'");
|
|
38
|
+
}
|
|
39
|
+
if ((!args || args.apiUser === undefined) && !opts.urn) {
|
|
40
|
+
throw new Error("Missing required property 'apiUser'");
|
|
41
|
+
}
|
|
42
|
+
if ((!args || args.userName === undefined) && !opts.urn) {
|
|
43
|
+
throw new Error("Missing required property 'userName'");
|
|
44
|
+
}
|
|
45
|
+
resourceInputs["apiKey"] = args ? args.apiKey : undefined;
|
|
46
|
+
resourceInputs["apiUser"] = args ? args.apiUser : undefined;
|
|
47
|
+
resourceInputs["clientIp"] = args ? args.clientIp : undefined;
|
|
48
|
+
resourceInputs["useSandbox"] = pulumi.output(args ? args.useSandbox : undefined).apply(JSON.stringify);
|
|
49
|
+
resourceInputs["userName"] = args ? args.userName : undefined;
|
|
50
|
+
}
|
|
51
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
52
|
+
super(Provider.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage());
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.Provider = Provider;
|
|
56
|
+
/** @internal */
|
|
57
|
+
Provider.__pulumiType = 'namecheap';
|
|
58
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../provider.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;GAKG;AACH,MAAa,QAAS,SAAQ,MAAM,CAAC,gBAAgB;IAIjD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;YACpC,OAAO,KAAK,CAAC;QACjB,CAAC;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,mBAAmB,GAAG,QAAQ,CAAC,YAAY,CAAC;IAC/E,CAAC;IAmBD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAkB,EAAE,IAA6B;QACvE,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,CAAC;YACG,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;gBACpD,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;YAC1D,CAAC;YACD,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;gBACrD,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;YAC3D,CAAC;YACD,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;gBACtD,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;YAC5D,CAAC;YACD,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1D,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;YAC5D,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,cAAc,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACvG,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;QAClE,CAAC;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,KAAK,CAAC,cAAc,EAAE,SAAS,CAAC,UAAU,EAAE,CAAC,CAAC;IAC3G,CAAC;;AA5DL,4BA6DC;AA5DG,gBAAgB;AACO,qBAAY,GAAG,WAAW,CAAC"}
|
package/bin/types/index.d.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
//#region types/index.d.ts
|
|
5
|
-
declare namespace index_d_exports {
|
|
6
|
-
export { input_d_exports as input, output_d_exports as output };
|
|
7
|
-
}
|
|
8
|
-
//#endregion
|
|
9
|
-
export { index_d_exports };
|
|
1
|
+
import * as input from "./input";
|
|
2
|
+
import * as output from "./output";
|
|
3
|
+
export { input, output, };
|
package/bin/types/index.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
export { types_exports };
|
|
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
|
+
exports.output = exports.input = void 0;
|
|
6
|
+
// Export sub-modules:
|
|
7
|
+
const input = require("./input");
|
|
8
|
+
exports.input = input;
|
|
9
|
+
const output = require("./output");
|
|
10
|
+
exports.output = output;
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAIjF,sBAAsB;AACtB,iCAAiC;AAI7B,sBAAK;AAHT,mCAAmC;AAI/B,wBAAM"}
|
package/bin/types/input.d.ts
CHANGED
|
@@ -1,30 +1,23 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export interface DomainRecordsRecord {
|
|
3
|
+
/**
|
|
4
|
+
* Possible values are URL or IP address. The value for this parameter is based on record type
|
|
5
|
+
*/
|
|
6
|
+
address: pulumi.Input<string>;
|
|
7
|
+
/**
|
|
8
|
+
* Sub-domain/hostname to create the record for
|
|
9
|
+
*/
|
|
10
|
+
hostname: pulumi.Input<string>;
|
|
11
|
+
/**
|
|
12
|
+
* MX preference for host. Applicable for MX records only
|
|
13
|
+
*/
|
|
14
|
+
mxPref?: pulumi.Input<number>;
|
|
15
|
+
/**
|
|
16
|
+
* Time to live for all record types. Possible values: any value between 60 to 60000
|
|
17
|
+
*/
|
|
18
|
+
ttl?: pulumi.Input<number>;
|
|
19
|
+
/**
|
|
20
|
+
* Possible values: A, AAAA, ALIAS, CAA, CNAME, MX, MXE, NS, TXT, URL, URL301, FRAME
|
|
21
|
+
*/
|
|
22
|
+
type: pulumi.Input<string>;
|
|
6
23
|
}
|
|
7
|
-
interface DomainRecordsRecord {
|
|
8
|
-
/**
|
|
9
|
-
* Possible values are URL or IP address. The value for this parameter is based on record type
|
|
10
|
-
*/
|
|
11
|
-
address: pulumi.Input<string>;
|
|
12
|
-
/**
|
|
13
|
-
* Sub-domain/hostname to create the record for
|
|
14
|
-
*/
|
|
15
|
-
hostname: pulumi.Input<string>;
|
|
16
|
-
/**
|
|
17
|
-
* MX preference for host. Applicable for MX records only
|
|
18
|
-
*/
|
|
19
|
-
mxPref?: pulumi.Input<number>;
|
|
20
|
-
/**
|
|
21
|
-
* Time to live for all record types. Possible values: any value between 60 to 60000
|
|
22
|
-
*/
|
|
23
|
-
ttl?: pulumi.Input<number>;
|
|
24
|
-
/**
|
|
25
|
-
* Possible values: A, AAAA, ALIAS, CAA, CNAME, MX, MXE, NS, TXT, URL, URL301, FRAME
|
|
26
|
-
*/
|
|
27
|
-
type: pulumi.Input<string>;
|
|
28
|
-
}
|
|
29
|
-
//#endregion
|
|
30
|
-
export { DomainRecordsRecord, input_d_exports };
|
package/bin/types/input.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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"}
|
package/bin/types/output.d.ts
CHANGED
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export interface DomainRecordsRecord {
|
|
2
|
+
/**
|
|
3
|
+
* Possible values are URL or IP address. The value for this parameter is based on record type
|
|
4
|
+
*/
|
|
5
|
+
address: string;
|
|
6
|
+
/**
|
|
7
|
+
* Sub-domain/hostname to create the record for
|
|
8
|
+
*/
|
|
9
|
+
hostname: string;
|
|
10
|
+
/**
|
|
11
|
+
* MX preference for host. Applicable for MX records only
|
|
12
|
+
*/
|
|
13
|
+
mxPref?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Time to live for all record types. Possible values: any value between 60 to 60000
|
|
16
|
+
*/
|
|
17
|
+
ttl?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Possible values: A, AAAA, ALIAS, CAA, CNAME, MX, MXE, NS, TXT, URL, URL301, FRAME
|
|
20
|
+
*/
|
|
21
|
+
type: string;
|
|
3
22
|
}
|
|
4
|
-
interface DomainRecordsRecord {
|
|
5
|
-
/**
|
|
6
|
-
* Possible values are URL or IP address. The value for this parameter is based on record type
|
|
7
|
-
*/
|
|
8
|
-
address: string;
|
|
9
|
-
/**
|
|
10
|
-
* Sub-domain/hostname to create the record for
|
|
11
|
-
*/
|
|
12
|
-
hostname: string;
|
|
13
|
-
/**
|
|
14
|
-
* MX preference for host. Applicable for MX records only
|
|
15
|
-
*/
|
|
16
|
-
mxPref?: number;
|
|
17
|
-
/**
|
|
18
|
-
* Time to live for all record types. Possible values: any value between 60 to 60000
|
|
19
|
-
*/
|
|
20
|
-
ttl?: number;
|
|
21
|
-
/**
|
|
22
|
-
* Possible values: A, AAAA, ALIAS, CAA, CNAME, MX, MXE, NS, TXT, URL, URL301, FRAME
|
|
23
|
-
*/
|
|
24
|
-
type: string;
|
|
25
|
-
}
|
|
26
|
-
//#endregion
|
|
27
|
-
export { DomainRecordsRecord, output_d_exports };
|
package/bin/types/output.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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,5 @@
|
|
|
1
|
+
export declare function getEnv(...vars: string[]): string | undefined;
|
|
2
|
+
export declare function getEnvBoolean(...vars: string[]): boolean | undefined;
|
|
3
|
+
export declare function getEnvNumber(...vars: string[]): number | undefined;
|
|
4
|
+
export declare function getVersion(): string;
|
|
5
|
+
export declare function getPackage(): Promise<string | undefined>;
|
package/bin/utilities.js
CHANGED
|
@@ -1,61 +1,141 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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.getEnv = getEnv;
|
|
15
|
+
exports.getEnvBoolean = getEnvBoolean;
|
|
16
|
+
exports.getEnvNumber = getEnvNumber;
|
|
17
|
+
exports.getVersion = getVersion;
|
|
18
|
+
exports.resourceOptsDefaults = resourceOptsDefaults;
|
|
19
|
+
exports.lazyLoad = lazyLoad;
|
|
20
|
+
exports.callAsync = callAsync;
|
|
21
|
+
exports.getPackage = getPackage;
|
|
22
|
+
const resproto = require("@pulumi/pulumi/proto/resource_pb");
|
|
23
|
+
const mutex = require("async-mutex");
|
|
24
|
+
const runtime = require("@pulumi/pulumi/runtime");
|
|
25
|
+
function getEnv(...vars) {
|
|
26
|
+
for (const v of vars) {
|
|
27
|
+
const value = process.env[v];
|
|
28
|
+
if (value) {
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
function getEnvBoolean(...vars) {
|
|
35
|
+
const s = getEnv(...vars);
|
|
36
|
+
if (s !== undefined) {
|
|
37
|
+
// NOTE: these values are taken from https://golang.org/src/strconv/atob.go?s=351:391#L1, which is what
|
|
38
|
+
// Terraform uses internally when parsing boolean values.
|
|
39
|
+
if (["1", "t", "T", "true", "TRUE", "True"].find(v => v === s) !== undefined) {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
if (["0", "f", "F", "false", "FALSE", "False"].find(v => v === s) !== undefined) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
function getEnvNumber(...vars) {
|
|
49
|
+
const s = getEnv(...vars);
|
|
50
|
+
if (s !== undefined) {
|
|
51
|
+
const f = parseFloat(s);
|
|
52
|
+
if (!isNaN(f)) {
|
|
53
|
+
return f;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
8
58
|
function getVersion() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
59
|
+
let version = require('./package.json').version;
|
|
60
|
+
// Node allows for the version to be prefixed by a "v", while semver doesn't.
|
|
61
|
+
// If there is a v, strip it off.
|
|
62
|
+
if (version.indexOf('v') === 0) {
|
|
63
|
+
version = version.slice(1);
|
|
64
|
+
}
|
|
65
|
+
return version;
|
|
12
66
|
}
|
|
13
67
|
/** @internal */
|
|
14
68
|
function resourceOptsDefaults() {
|
|
15
|
-
|
|
69
|
+
return { version: getVersion() };
|
|
16
70
|
}
|
|
17
71
|
/** @internal */
|
|
18
72
|
function lazyLoad(exports, props, loadModule) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
73
|
+
for (let property of props) {
|
|
74
|
+
Object.defineProperty(exports, property, {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function () {
|
|
77
|
+
return loadModule()[property];
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/** @internal */
|
|
83
|
+
function callAsync(tok, props, res, opts) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
const o = runtime.call(tok, props, res);
|
|
86
|
+
const value = yield o.promise(true /*withUnknowns*/);
|
|
87
|
+
const isKnown = yield o.isKnown;
|
|
88
|
+
const isSecret = yield o.isSecret;
|
|
89
|
+
const problem = !isKnown ? "an unknown value"
|
|
90
|
+
: isSecret ? "a secret value"
|
|
91
|
+
: undefined;
|
|
92
|
+
// Ingoring o.resources silently. They are typically non-empty, r.f() calls include r as a dependency.
|
|
93
|
+
if (problem) {
|
|
94
|
+
throw new Error(`Plain resource method "${tok}" incorrectly returned ${problem}. ` +
|
|
95
|
+
"This is an error in the provider, please report this to the provider developer.");
|
|
96
|
+
}
|
|
97
|
+
// Extract a single property if requested.
|
|
98
|
+
if (opts && opts.property) {
|
|
99
|
+
return value[opts.property];
|
|
100
|
+
}
|
|
101
|
+
return value;
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
const _packageLock = new mutex.Mutex();
|
|
105
|
+
var _packageRef = undefined;
|
|
106
|
+
function getPackage() {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
if (_packageRef === undefined) {
|
|
109
|
+
if (!runtime.supportsParameterization()) {
|
|
110
|
+
throw new Error("The Pulumi CLI does not support parameterization. Please update the Pulumi CLI");
|
|
111
|
+
}
|
|
112
|
+
yield _packageLock.acquire();
|
|
113
|
+
if (_packageRef === undefined) {
|
|
114
|
+
const monitor = runtime.getMonitor();
|
|
115
|
+
const params = new resproto.Parameterization();
|
|
116
|
+
params.setName("namecheap");
|
|
117
|
+
params.setVersion("2.2.0");
|
|
118
|
+
params.setValue(Uint8Array.from(atob("eyJyZW1vdGUiOnsidXJsIjoicmVnaXN0cnkub3BlbnRvZnUub3JnL25hbWVjaGVhcC9uYW1lY2hlYXAiLCJ2ZXJzaW9uIjoiMi4yLjAifX0="), c => c.charCodeAt(0)));
|
|
119
|
+
const req = new resproto.RegisterPackageRequest();
|
|
120
|
+
req.setName("terraform-provider");
|
|
121
|
+
req.setVersion("0.8.0");
|
|
122
|
+
req.setDownloadUrl("");
|
|
123
|
+
req.setParameterization(params);
|
|
124
|
+
const resp = yield new Promise((resolve, reject) => {
|
|
125
|
+
monitor.registerPackage(req, (err, resp) => {
|
|
126
|
+
if (err) {
|
|
127
|
+
reject(err);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
resolve(resp);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
_packageRef = resp.getRef();
|
|
135
|
+
}
|
|
136
|
+
_packageLock.release();
|
|
137
|
+
}
|
|
138
|
+
return _packageRef;
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=utilities.js.map
|