@pulumi/pulumi 3.135.2-alpha.xaa9ca8a → 3.136.0-alpha.xbd76b17
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/package.json +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/npm/testdata/nested/project/index.d.ts +0 -0
- package/npm/testdata/nested/project/index.js +0 -16
- package/npm/testdata/nested/project/index.js.map +0 -1
- package/tests/automation/cmd.spec.d.ts +0 -1
- package/tests/automation/cmd.spec.js +0 -186
- package/tests/automation/cmd.spec.js.map +0 -1
- package/tests/automation/data/correct_project/Pulumi.yaml +0 -3
- package/tests/automation/data/import/Pulumi.yaml +0 -2
- package/tests/automation/data/import/expected_generated_code.txt +0 -11
- package/tests/automation/data/json/Pulumi.dev.json +0 -9
- package/tests/automation/data/json/Pulumi.json +0 -5
- package/tests/automation/data/nested_config/Pulumi.dev.yaml +0 -11
- package/tests/automation/data/nested_config/Pulumi.yaml +0 -3
- package/tests/automation/data/tcfg/Pulumi.yaml +0 -4
- package/tests/automation/data/tcfg/index.ts +0 -1
- package/tests/automation/data/tcfg/package-lock.json +0 -3062
- package/tests/automation/data/tcfg/package.json +0 -9
- package/tests/automation/data/tcfg/tsconfig.json +0 -16
- package/tests/automation/data/testproj/Pulumi.yaml +0 -3
- package/tests/automation/data/testproj/go.mod +0 -71
- package/tests/automation/data/testproj/go.sum +0 -299
- package/tests/automation/data/testproj/main.go +0 -19
- package/tests/automation/data/testproj_dotnet/Program.cs +0 -12
- package/tests/automation/data/testproj_dotnet/Pulumi.yaml +0 -3
- package/tests/automation/data/testproj_dotnet/TestProj.csproj +0 -12
- package/tests/automation/data/yaml/Pulumi.dev.yaml +0 -5
- package/tests/automation/data/yaml/Pulumi.yaml +0 -3
- package/tests/automation/data/yml/Pulumi.dev.yml +0 -5
- package/tests/automation/data/yml/Pulumi.yml +0 -3
- package/tests/automation/localWorkspace.spec.d.ts +0 -1
- package/tests/automation/localWorkspace.spec.js +0 -1325
- package/tests/automation/localWorkspace.spec.js.map +0 -1
- package/tests/automation/remoteWorkspace.spec.d.ts +0 -1
- package/tests/automation/remoteWorkspace.spec.js +0 -460
- package/tests/automation/remoteWorkspace.spec.js.map +0 -1
- package/tests/automation/util.d.ts +0 -1
- package/tests/automation/util.js +0 -31
- package/tests/automation/util.js.map +0 -1
- package/tests/config.spec.d.ts +0 -1
- package/tests/config.spec.js +0 -177
- package/tests/config.spec.js.map +0 -1
- package/tests/constants.d.ts +0 -1
- package/tests/constants.js +0 -18
- package/tests/constants.js.map +0 -1
- package/tests/init.spec.d.ts +0 -1
- package/tests/init.spec.js +0 -18
- package/tests/init.spec.js.map +0 -1
- package/tests/iterable.spec.d.ts +0 -1
- package/tests/iterable.spec.js +0 -60
- package/tests/iterable.spec.js.map +0 -1
- package/tests/options.spec.d.ts +0 -1
- package/tests/options.spec.js +0 -233
- package/tests/options.spec.js.map +0 -1
- package/tests/output.spec.d.ts +0 -1
- package/tests/output.spec.js +0 -809
- package/tests/output.spec.js.map +0 -1
- package/tests/provider.spec.d.ts +0 -1
- package/tests/provider.spec.js +0 -524
- package/tests/provider.spec.js.map +0 -1
- package/tests/resource.spec.d.ts +0 -1
- package/tests/resource.spec.js +0 -275
- package/tests/resource.spec.js.map +0 -1
- package/tests/runtime/asyncIterableUtil.spec.d.ts +0 -1
- package/tests/runtime/asyncIterableUtil.spec.js +0 -115
- package/tests/runtime/asyncIterableUtil.spec.js.map +0 -1
- package/tests/runtime/closure-integration-tests.d.ts +0 -1
- package/tests/runtime/closure-integration-tests.js +0 -120
- package/tests/runtime/closure-integration-tests.js.map +0 -1
- package/tests/runtime/findWorkspaceRoot.spec.d.ts +0 -1
- package/tests/runtime/findWorkspaceRoot.spec.js +0 -62
- package/tests/runtime/findWorkspaceRoot.spec.js.map +0 -1
- package/tests/runtime/install-package-tests.d.ts +0 -1
- package/tests/runtime/install-package-tests.js +0 -230
- package/tests/runtime/install-package-tests.js.map +0 -1
- package/tests/runtime/langhost/cases/000.empty/index.js +0 -1
- package/tests/runtime/langhost/cases/001.one_resource/index.js +0 -11
- package/tests/runtime/langhost/cases/002.ten_resources/index.js +0 -13
- package/tests/runtime/langhost/cases/003.one_complex_resource/index.js +0 -77
- package/tests/runtime/langhost/cases/004.ten_complex_resources/index.js +0 -38
- package/tests/runtime/langhost/cases/004.ten_complex_resources/resource.js +0 -30
- package/tests/runtime/langhost/cases/005.resource_thens/index.js +0 -72
- package/tests/runtime/langhost/cases/006.asset/index.js +0 -13
- package/tests/runtime/langhost/cases/006.asset/testdata.txt +0 -4
- package/tests/runtime/langhost/cases/007.promises_io/index.js +0 -25
- package/tests/runtime/langhost/cases/007.promises_io/testdata.txt +0 -4
- package/tests/runtime/langhost/cases/008.ten_depends_on_resources/index.js +0 -46
- package/tests/runtime/langhost/cases/009.invoke/index.js +0 -25
- package/tests/runtime/langhost/cases/010.runtime_settings/index.js +0 -22
- package/tests/runtime/langhost/cases/011.unhandled_error/index.js +0 -1
- package/tests/runtime/langhost/cases/012.assets_archive/index.js +0 -25
- package/tests/runtime/langhost/cases/013.unhandled_promise_rejection/index.js +0 -3
- package/tests/runtime/langhost/cases/014.read_resource/index.js +0 -19
- package/tests/runtime/langhost/cases/015.runtime_sxs/index.js +0 -100
- package/tests/runtime/langhost/cases/016.promise_leak/index.js +0 -3
- package/tests/runtime/langhost/cases/017.parent_defaults/index.js +0 -89
- package/tests/runtime/langhost/cases/018.logging/index.js +0 -15
- package/tests/runtime/langhost/cases/019.stack_exports/index.js +0 -15
- package/tests/runtime/langhost/cases/020.property_dependencies/index.js +0 -39
- package/tests/runtime/langhost/cases/021.parent_child_dependencies/index.js +0 -15
- package/tests/runtime/langhost/cases/022.parent_child_dependencies_2/index.js +0 -16
- package/tests/runtime/langhost/cases/023.parent_child_dependencies_3/index.js +0 -28
- package/tests/runtime/langhost/cases/024.parent_child_dependencies_4/index.js +0 -22
- package/tests/runtime/langhost/cases/025.parent_child_dependencies_5/index.js +0 -24
- package/tests/runtime/langhost/cases/026.parent_child_dependencies_6/index.js +0 -29
- package/tests/runtime/langhost/cases/027.parent_child_dependencies_7/index.js +0 -36
- package/tests/runtime/langhost/cases/028.parent_child_dependencies_8/index.js +0 -28
- package/tests/runtime/langhost/cases/029.parent_child_dependencies_9/index.js +0 -23
- package/tests/runtime/langhost/cases/030.import_resource/index.js +0 -11
- package/tests/runtime/langhost/cases/040.run_error/index.js +0 -3
- package/tests/runtime/langhost/cases/041.component_opt_single_provider/index.js +0 -89
- package/tests/runtime/langhost/cases/042.component_opt_providers_array/index.js +0 -89
- package/tests/runtime/langhost/cases/043.depends_on_non_resource/index.js +0 -11
- package/tests/runtime/langhost/cases/044.versions/index.js +0 -22
- package/tests/runtime/langhost/cases/045.ignore_changes/index.js +0 -11
- package/tests/runtime/langhost/cases/046.recursive_stack_exports/index.js +0 -19
- package/tests/runtime/langhost/cases/047.exported_function/index.js +0 -13
- package/tests/runtime/langhost/cases/048.exported_promise_function/index.js +0 -13
- package/tests/runtime/langhost/cases/049.exported_async_function/index.js +0 -13
- package/tests/runtime/langhost/cases/050.resource_creation_in_function/index.js +0 -11
- package/tests/runtime/langhost/cases/051.resource_creation_in_function_with_result/index.js +0 -12
- package/tests/runtime/langhost/cases/052.resource_creation_in_async_function_with_result/index.js +0 -12
- package/tests/runtime/langhost/cases/060.provider_invokes/index.js +0 -26
- package/tests/runtime/langhost/cases/061.provider_in_parent_invokes/index.js +0 -33
- package/tests/runtime/langhost/cases/062.providerref_invokes/index.js +0 -33
- package/tests/runtime/langhost/cases/063.providerref_in_parent_invokes/index.js +0 -41
- package/tests/runtime/langhost/cases/064.async_components/index.js +0 -44
- package/tests/runtime/langhost/cases/065.large_resource/index.js +0 -17
- package/tests/runtime/langhost/cases/066.replace_on_changes/index.js +0 -11
- package/tests/runtime/langhost/cases/067.native_es_module/index.js +0 -11
- package/tests/runtime/langhost/cases/067.native_es_module/package.json +0 -1
- package/tests/runtime/langhost/cases/068.remote_component_providers/index.js +0 -34
- package/tests/runtime/langhost/cases/068.remote_component_providers/package.json +0 -3
- package/tests/runtime/langhost/cases/069.ambiguous_entrypoints/index.d.ts +0 -1
- package/tests/runtime/langhost/cases/069.ambiguous_entrypoints/index.js +0 -11
- package/tests/runtime/langhost/cases/069.ambiguous_entrypoints/index.js.map +0 -1
- package/tests/runtime/langhost/cases/069.ambiguous_entrypoints/index.ts +0 -23
- package/tests/runtime/langhost/cases/070.unusual_alias_names/index.js +0 -26
- package/tests/runtime/langhost/cases/071.large_alias_counts/index.js +0 -22
- package/tests/runtime/langhost/cases/072.large_alias_lineage_chains/index.js +0 -55
- package/tests/runtime/langhost/cases/073.component_dependencies/index.js +0 -28
- package/tests/runtime/langhost/cases/074.source_position/index.js +0 -17
- package/tests/runtime/langhost/run.spec.d.ts +0 -1
- package/tests/runtime/langhost/run.spec.js +0 -1685
- package/tests/runtime/langhost/run.spec.js.map +0 -1
- package/tests/runtime/pack.d.ts +0 -1
- package/tests/runtime/pack.js +0 -56
- package/tests/runtime/pack.js.map +0 -1
- package/tests/runtime/props.spec.d.ts +0 -1
- package/tests/runtime/props.spec.js +0 -387
- package/tests/runtime/props.spec.js.map +0 -1
- package/tests/runtime/registrations.spec.d.ts +0 -1
- package/tests/runtime/registrations.spec.js +0 -139
- package/tests/runtime/registrations.spec.js.map +0 -1
- package/tests/runtime/rpc.spec.d.ts +0 -1
- package/tests/runtime/rpc.spec.js +0 -79
- package/tests/runtime/rpc.spec.js.map +0 -1
- package/tests/runtime/settings.spec.d.ts +0 -1
- package/tests/runtime/settings.spec.js +0 -57
- package/tests/runtime/settings.spec.js.map +0 -1
- package/tests/runtime/testdata/nested/project/index.d.ts +0 -0
- package/tests/runtime/testdata/nested/project/index.js +0 -16
- package/tests/runtime/testdata/nested/project/index.js.map +0 -1
- package/tests/stackReference.spec.d.ts +0 -1
- package/tests/stackReference.spec.js +0 -86
- package/tests/stackReference.spec.js.map +0 -1
- package/tests/unwrap.spec.d.ts +0 -1
- package/tests/unwrap.spec.js +0 -254
- package/tests/unwrap.spec.js.map +0 -1
- package/tests/util.d.ts +0 -1
- package/tests/util.js +0 -71
- package/tests/util.js.map +0 -1
- package/tests_with_mocks/mocks.spec.d.ts +0 -1
- package/tests_with_mocks/mocks.spec.js +0 -182
- package/tests_with_mocks/mocks.spec.js.map +0 -1
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
// This tests the creation of ten resources that contains "simple" input and output propeprties.
|
|
2
|
-
// In particular, there aren't any fancy dataflow linked properties.
|
|
3
|
-
|
|
4
|
-
let assert = require("assert");
|
|
5
|
-
|
|
6
|
-
let pulumi = require("../../../../../");
|
|
7
|
-
|
|
8
|
-
class Provider extends pulumi.ProviderResource {
|
|
9
|
-
constructor(name, opts) {
|
|
10
|
-
super("test", name, {}, opts);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
class Resource extends pulumi.CustomResource {
|
|
15
|
-
constructor(name, createChildren, opts) {
|
|
16
|
-
super("test:index:Resource", name, {}, opts);
|
|
17
|
-
|
|
18
|
-
if (createChildren) {
|
|
19
|
-
createChildren(name, this);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
class Component extends pulumi.ComponentResource {
|
|
25
|
-
constructor(name, createChildren, opts) {
|
|
26
|
-
super("test:index:Component", name, {}, opts);
|
|
27
|
-
|
|
28
|
-
createChildren(name, this);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function createResources(name, createChildren, parent) {
|
|
33
|
-
// Use all parent defaults
|
|
34
|
-
new Resource(`${name}/r0`, createChildren, { parent: parent });
|
|
35
|
-
|
|
36
|
-
// Override protect
|
|
37
|
-
new Resource(`${name}/r1`, createChildren, { parent: parent, protect: false });
|
|
38
|
-
new Resource(`${name}/r2`, createChildren, { parent: parent, protect: true });
|
|
39
|
-
|
|
40
|
-
// Override provider
|
|
41
|
-
const provider = new Provider(`${name}-p`, { parent });
|
|
42
|
-
const r3 = new Resource(`${name}/r3`, createChildren, { parent, provider });
|
|
43
|
-
assert.strictEqual(r3.getProvider("test:index:Resource"), provider);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function createComponents(name, createChildren, parent) {
|
|
47
|
-
// Use all parent defaults
|
|
48
|
-
new Component(`${name}/c0`, createChildren, { parent: parent });
|
|
49
|
-
|
|
50
|
-
// Override protect.
|
|
51
|
-
new Component(`${name}/c1`, createChildren, { parent: parent, protect: false });
|
|
52
|
-
new Component(`${name}/c2`, createChildren, { parent: parent, protect: true });
|
|
53
|
-
|
|
54
|
-
// Override providers.
|
|
55
|
-
new Component(`${name}/c3`, createChildren, {
|
|
56
|
-
parent: parent,
|
|
57
|
-
provider: new Provider(`${name}-p`, { parent: parent }),
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Create default (unparented) resources
|
|
62
|
-
createResources("unparented");
|
|
63
|
-
|
|
64
|
-
// Create singly-nested resources
|
|
65
|
-
createComponents("single-nest", (name, parent) => {
|
|
66
|
-
createResources(name, undefined, parent);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
// Create doubly-nested resources
|
|
70
|
-
createComponents("double-nest", (name, parent) => {
|
|
71
|
-
createComponents(
|
|
72
|
-
name,
|
|
73
|
-
(name, parent) => {
|
|
74
|
-
createResources(name, undefined, parent);
|
|
75
|
-
},
|
|
76
|
-
parent,
|
|
77
|
-
);
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
// Create doubly-nested resources parented to other resources
|
|
81
|
-
createComponents("double-nest-2", (name, parent) => {
|
|
82
|
-
createResources(
|
|
83
|
-
name,
|
|
84
|
-
(name, parent) => {
|
|
85
|
-
createResources(name, undefined, parent);
|
|
86
|
-
},
|
|
87
|
-
parent,
|
|
88
|
-
);
|
|
89
|
-
});
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
// This tests the creation of ten resources that contains "simple" input and output propeprties.
|
|
2
|
-
// In particular, there aren't any fancy dataflow linked properties.
|
|
3
|
-
|
|
4
|
-
let assert = require("assert");
|
|
5
|
-
|
|
6
|
-
let pulumi = require("../../../../../");
|
|
7
|
-
|
|
8
|
-
class Provider extends pulumi.ProviderResource {
|
|
9
|
-
constructor(name, opts) {
|
|
10
|
-
super("test", name, {}, opts);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
class Resource extends pulumi.CustomResource {
|
|
15
|
-
constructor(name, createChildren, opts) {
|
|
16
|
-
super("test:index:Resource", name, {}, opts);
|
|
17
|
-
|
|
18
|
-
if (createChildren) {
|
|
19
|
-
createChildren(name, this);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
class Component extends pulumi.ComponentResource {
|
|
25
|
-
constructor(name, createChildren, opts) {
|
|
26
|
-
super("test:index:Component", name, {}, opts);
|
|
27
|
-
|
|
28
|
-
createChildren(name, this);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function createResources(name, createChildren, parent) {
|
|
33
|
-
// Use all parent defaults
|
|
34
|
-
new Resource(`${name}/r0`, createChildren, { parent: parent });
|
|
35
|
-
|
|
36
|
-
// Override protect
|
|
37
|
-
new Resource(`${name}/r1`, createChildren, { parent: parent, protect: false });
|
|
38
|
-
new Resource(`${name}/r2`, createChildren, { parent: parent, protect: true });
|
|
39
|
-
|
|
40
|
-
// Override provider
|
|
41
|
-
const provider = new Provider(`${name}-p`, { parent });
|
|
42
|
-
const r3 = new Resource(`${name}/r3`, createChildren, { parent, provider });
|
|
43
|
-
assert.strictEqual(r3.getProvider("test:index:Resource"), provider);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function createComponents(name, createChildren, parent) {
|
|
47
|
-
// Use all parent defaults
|
|
48
|
-
new Component(`${name}/c0`, createChildren, { parent: parent });
|
|
49
|
-
|
|
50
|
-
// Override protect.
|
|
51
|
-
new Component(`${name}/c1`, createChildren, { parent: parent, protect: false });
|
|
52
|
-
new Component(`${name}/c2`, createChildren, { parent: parent, protect: true });
|
|
53
|
-
|
|
54
|
-
// Override providers.
|
|
55
|
-
new Component(`${name}/c3`, createChildren, {
|
|
56
|
-
parent: parent,
|
|
57
|
-
providers: [new Provider(`${name}-p`, { parent: parent })],
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Create default (unparented) resources
|
|
62
|
-
createResources("unparented");
|
|
63
|
-
|
|
64
|
-
// Create singly-nested resources
|
|
65
|
-
createComponents("single-nest", (name, parent) => {
|
|
66
|
-
createResources(name, undefined, parent);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
// Create doubly-nested resources
|
|
70
|
-
createComponents("double-nest", (name, parent) => {
|
|
71
|
-
createComponents(
|
|
72
|
-
name,
|
|
73
|
-
(name, parent) => {
|
|
74
|
-
createResources(name, undefined, parent);
|
|
75
|
-
},
|
|
76
|
-
parent,
|
|
77
|
-
);
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
// Create doubly-nested resources parented to other resources
|
|
81
|
-
createComponents("double-nest-2", (name, parent) => {
|
|
82
|
-
createResources(
|
|
83
|
-
name,
|
|
84
|
-
(name, parent) => {
|
|
85
|
-
createResources(name, undefined, parent);
|
|
86
|
-
},
|
|
87
|
-
parent,
|
|
88
|
-
);
|
|
89
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This tests that resources cannot depend on things which are not resources.
|
|
2
|
-
|
|
3
|
-
let pulumi = require("../../../../../");
|
|
4
|
-
|
|
5
|
-
class MyResource extends pulumi.CustomResource {
|
|
6
|
-
constructor(name, deps) {
|
|
7
|
-
super("test:index:MyResource", name, {}, deps);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
new MyResource("testResource", { dependsOn: pulumi.output(Promise.resolve([Promise.resolve(1)])) });
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
let pulumi = require("../../../../../");
|
|
2
|
-
|
|
3
|
-
class MyResource extends pulumi.CustomResource {
|
|
4
|
-
constructor(name, version) {
|
|
5
|
-
super("test:index:MyResource", name, {}, { version: version });
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
new MyResource("testResource", "0.19.1");
|
|
10
|
-
new MyResource("testResource2", "0.19.2");
|
|
11
|
-
new MyResource("testResource3");
|
|
12
|
-
|
|
13
|
-
pulumi.runtime.invoke("invoke:index:doit", {}, { version: "0.19.1", async: false });
|
|
14
|
-
pulumi.runtime.invoke("invoke:index:doit_v2", {}, { version: "0.19.2", async: false });
|
|
15
|
-
pulumi.runtime.invoke("invoke:index:doit_noversion", { async: false });
|
|
16
|
-
|
|
17
|
-
pulumi.runtime.invoke("invoke:index:doit", {}, { version: "0.19.1" });
|
|
18
|
-
pulumi.runtime.invoke("invoke:index:doit_v2", {}, { version: "0.19.2" });
|
|
19
|
-
pulumi.runtime.invoke("invoke:index:doit_noversion", {});
|
|
20
|
-
|
|
21
|
-
new pulumi.CustomResource("test:index:ReadResource", "foo", {}, { id: "readme", version: "0.20.0" });
|
|
22
|
-
new pulumi.CustomResource("test:index:ReadResource", "foo_noversion", {}, { id: "readme" });
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This tests the creation of ten propertyless resources.
|
|
2
|
-
|
|
3
|
-
let pulumi = require("../../../../../");
|
|
4
|
-
|
|
5
|
-
class MyResource extends pulumi.CustomResource {
|
|
6
|
-
constructor(name, opts) {
|
|
7
|
-
super("test:index:MyResource", name, {}, opts);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
new MyResource("testResource", { ignoreChanges: ["ignoredProperty"] });
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
function main() {
|
|
2
|
-
var obj = { a: { b: 1 } };
|
|
3
|
-
var obj2 = { x: { y: 1 } };
|
|
4
|
-
obj2.obj2 = obj2;
|
|
5
|
-
obj2.x.x = obj2.x;
|
|
6
|
-
obj2.x.y.x = obj2.x;
|
|
7
|
-
|
|
8
|
-
return {
|
|
9
|
-
m: obj,
|
|
10
|
-
n: obj,
|
|
11
|
-
o: obj.a,
|
|
12
|
-
p: obj.a.b,
|
|
13
|
-
obj2: obj2,
|
|
14
|
-
obj2_x: obj2.x,
|
|
15
|
-
obj2_x_y: obj2.x.y,
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
module.exports = main();
|
package/tests/runtime/langhost/cases/052.resource_creation_in_async_function_with_result/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
module.exports = async () => {
|
|
2
|
-
let pulumi = require("../../../../../");
|
|
3
|
-
|
|
4
|
-
class MyResource extends pulumi.CustomResource {
|
|
5
|
-
constructor(name) {
|
|
6
|
-
super("test:index:MyResource", name);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
new MyResource("testResource1");
|
|
11
|
-
return { a: 1 };
|
|
12
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Test the ability to invoke provider functions via RPC.
|
|
2
|
-
|
|
3
|
-
let assert = require("assert");
|
|
4
|
-
let pulumi = require("../../../../../");
|
|
5
|
-
let semver = require("semver");
|
|
6
|
-
|
|
7
|
-
class Provider extends pulumi.ProviderResource {
|
|
8
|
-
constructor(name, opts) {
|
|
9
|
-
super("test", name, {}, opts);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const provider = new Provider("p");
|
|
14
|
-
|
|
15
|
-
let args = {
|
|
16
|
-
a: "hello",
|
|
17
|
-
b: true,
|
|
18
|
-
c: [0.99, 42, { z: "x" }],
|
|
19
|
-
id: "some-id",
|
|
20
|
-
urn: "some-urn",
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
let result2 = pulumi.runtime.invoke("test:index:echo", args, { provider });
|
|
24
|
-
result2.then((v) => {
|
|
25
|
-
assert.deepStrictEqual(v, args);
|
|
26
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// Test the ability to invoke provider functions via RPC.
|
|
2
|
-
|
|
3
|
-
let assert = require("assert");
|
|
4
|
-
let pulumi = require("../../../../../");
|
|
5
|
-
let semver = require("semver");
|
|
6
|
-
|
|
7
|
-
class Provider extends pulumi.ProviderResource {
|
|
8
|
-
constructor(name, opts) {
|
|
9
|
-
super("test", name, {}, opts);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
class Resource extends pulumi.CustomResource {
|
|
14
|
-
constructor(name, opts) {
|
|
15
|
-
super("test:index:Resource", name, {}, opts);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const provider = new Provider("p");
|
|
20
|
-
const parent = new Resource("r", { provider });
|
|
21
|
-
|
|
22
|
-
let args = {
|
|
23
|
-
a: "hello",
|
|
24
|
-
b: true,
|
|
25
|
-
c: [0.99, 42, { z: "x" }],
|
|
26
|
-
id: "some-id",
|
|
27
|
-
urn: "some-urn",
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
let result2 = pulumi.runtime.invoke("test:index:echo", args, { parent });
|
|
31
|
-
result2.then((v) => {
|
|
32
|
-
assert.deepStrictEqual(v, args);
|
|
33
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// Test the ability to invoke provider functions via RPC.
|
|
2
|
-
|
|
3
|
-
let assert = require("assert");
|
|
4
|
-
let pulumi = require("../../../../../");
|
|
5
|
-
|
|
6
|
-
(async () => {
|
|
7
|
-
class Provider extends pulumi.ProviderResource {
|
|
8
|
-
constructor(name, opts) {
|
|
9
|
-
super("test", name, {}, opts);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const provider = new Provider("p");
|
|
14
|
-
await pulumi.ProviderResource.register(provider);
|
|
15
|
-
|
|
16
|
-
let args = {
|
|
17
|
-
a: "hello",
|
|
18
|
-
b: true,
|
|
19
|
-
c: [0.99, 42, { z: "x" }],
|
|
20
|
-
id: "some-id",
|
|
21
|
-
urn: "some-urn",
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
let result1 = await pulumi.runtime.invoke("test:index:echo", args, { provider });
|
|
25
|
-
for (const key in args) {
|
|
26
|
-
assert.deepStrictEqual(result1[key], args[key]);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
let result2 = pulumi.runtime.invoke("test:index:echo", args, { provider, async: false });
|
|
30
|
-
result2.then((v) => {
|
|
31
|
-
assert.deepStrictEqual(v, args);
|
|
32
|
-
});
|
|
33
|
-
})();
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// Test the ability to invoke provider functions via RPC.
|
|
2
|
-
|
|
3
|
-
let assert = require("assert");
|
|
4
|
-
let pulumi = require("../../../../../");
|
|
5
|
-
|
|
6
|
-
(async () => {
|
|
7
|
-
class Provider extends pulumi.ProviderResource {
|
|
8
|
-
constructor(name, opts) {
|
|
9
|
-
super("test", name, {}, opts);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
class Resource extends pulumi.CustomResource {
|
|
14
|
-
constructor(name, opts) {
|
|
15
|
-
super("test:index:Resource", name, {}, opts);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const provider = new Provider("p");
|
|
20
|
-
await pulumi.ProviderResource.register(provider);
|
|
21
|
-
|
|
22
|
-
const parent = new Resource("r", { provider });
|
|
23
|
-
|
|
24
|
-
let args = {
|
|
25
|
-
a: "hello",
|
|
26
|
-
b: true,
|
|
27
|
-
c: [0.99, 42, { z: "x" }],
|
|
28
|
-
id: "some-id",
|
|
29
|
-
urn: "some-urn",
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
let result1 = await pulumi.runtime.invoke("test:index:echo", args, { parent });
|
|
33
|
-
for (const key in args) {
|
|
34
|
-
assert.deepStrictEqual(result1[key], args[key]);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
let result2 = pulumi.runtime.invoke("test:index:echo", args, { parent, async: false });
|
|
38
|
-
result2.then((v) => {
|
|
39
|
-
assert.deepStrictEqual(v, args);
|
|
40
|
-
});
|
|
41
|
-
})();
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// Test the ability to invoke provider functions via RPC.
|
|
2
|
-
|
|
3
|
-
let assert = require("assert");
|
|
4
|
-
let pulumi = require("../../../../../");
|
|
5
|
-
|
|
6
|
-
class CustResource extends pulumi.CustomResource {
|
|
7
|
-
constructor(name, opts) {
|
|
8
|
-
super("test:index:CustResource", name, {}, opts);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
class CompResource extends pulumi.ComponentResource {
|
|
13
|
-
constructor(name, opts) {
|
|
14
|
-
super("test:index:CompResource", name, {}, opts);
|
|
15
|
-
const data = this.getData();
|
|
16
|
-
this.a = pulumi.output(data.then((d) => d.a));
|
|
17
|
-
this.b = pulumi.output(data.then((d) => d.b));
|
|
18
|
-
this.cust1 = pulumi.output(data.then((d) => d.cust1));
|
|
19
|
-
this.cust2 = pulumi.output(data.then((d) => d.cust2));
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** @override */
|
|
23
|
-
async initialize() {
|
|
24
|
-
const cust1 = new CustResource("a", { parent: this });
|
|
25
|
-
const cust2 = new CustResource("b", { parent: this });
|
|
26
|
-
return { a: 1, b: 2, cust1, cust2 };
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const comp = new CompResource("comp", {});
|
|
31
|
-
comp.a.apply((v) => {
|
|
32
|
-
assert.strictEqual(v, 1);
|
|
33
|
-
});
|
|
34
|
-
comp.b.apply((v) => {
|
|
35
|
-
assert.strictEqual(v, 2);
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
// Have a custom resource depend on the async component. We should still pick up 'a' and 'b' as
|
|
39
|
-
// dependencies.
|
|
40
|
-
const c = new CustResource("c", { dependsOn: comp });
|
|
41
|
-
|
|
42
|
-
// Have another depend on the child resources that are exposed through Output wrappers of async
|
|
43
|
-
// computation. We should still pick up 'a' and 'b' as dependencies.
|
|
44
|
-
const d = new CustResource("d", { dependsOn: [comp.cust1, comp.cust2] });
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// This tests the creation of a resource that contains a very large string.
|
|
2
|
-
// In particular we are testing sending large message sizes (>4mb) over an RPC call.
|
|
3
|
-
|
|
4
|
-
let pulumi = require("../../../../../");
|
|
5
|
-
|
|
6
|
-
// Read the file contents to create a very large string (5mb)
|
|
7
|
-
const longString = "a".repeat(1024 * 1024 * 5);
|
|
8
|
-
|
|
9
|
-
class MyResource extends pulumi.CustomResource {
|
|
10
|
-
constructor(name) {
|
|
11
|
-
super("test:index:MyLargeStringResource", name, {
|
|
12
|
-
largeStringProp: longString,
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
new MyResource("testResource1");
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This tests the replaceOnChanges ResourceOption.
|
|
2
|
-
|
|
3
|
-
let pulumi = require("../../../../../");
|
|
4
|
-
|
|
5
|
-
class MyResource extends pulumi.CustomResource {
|
|
6
|
-
constructor(name, opts) {
|
|
7
|
-
super("test:index:MyResource", name, {}, opts);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
new MyResource("testResource", { replaceOnChanges: ["foo"] });
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This tests the basic creation of a single propertyless resource using a native ES module
|
|
2
|
-
|
|
3
|
-
import pulumi from "../../../../../index.js";
|
|
4
|
-
|
|
5
|
-
class MyResource extends pulumi.CustomResource {
|
|
6
|
-
constructor(name) {
|
|
7
|
-
super("test:index:MyResource", name);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
new MyResource("testResource1");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{ "type": "module" }
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// This tests that providers is passed to RegisterResource for remote components, whether specified via
|
|
2
|
-
// `provider` or `providers`.
|
|
3
|
-
|
|
4
|
-
import pulumi from "../../../../../index.js";
|
|
5
|
-
|
|
6
|
-
class Provider extends pulumi.ProviderResource {
|
|
7
|
-
constructor(name, opts) {
|
|
8
|
-
super("test", name, {}, opts);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
class FooProvider extends pulumi.ProviderResource {
|
|
13
|
-
constructor(name, opts) {
|
|
14
|
-
super("foo", name, {}, opts);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
class RemoteComponent extends pulumi.ComponentResource {
|
|
19
|
-
constructor(name, opts) {
|
|
20
|
-
super("test:index:Component", name, {}, opts, true /*remote*/);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const myprovider = new Provider("myprovider");
|
|
25
|
-
|
|
26
|
-
new RemoteComponent("singular", { provider: myprovider });
|
|
27
|
-
new RemoteComponent("map", { providers: { test: myprovider } });
|
|
28
|
-
new RemoteComponent("array", { providers: [myprovider] });
|
|
29
|
-
|
|
30
|
-
const fooprovider = new FooProvider("fooprovider");
|
|
31
|
-
|
|
32
|
-
new RemoteComponent("foo-singular", { provider: fooprovider });
|
|
33
|
-
new RemoteComponent("foo-map", { providers: { foo: fooprovider } });
|
|
34
|
-
new RemoteComponent("foo-array", { providers: [fooprovider] });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This tests the basic creation of a single propertyless resource.
|
|
2
|
-
|
|
3
|
-
let pulumi = require("../../../../../");
|
|
4
|
-
|
|
5
|
-
class MyResource extends pulumi.CustomResource {
|
|
6
|
-
constructor(name) {
|
|
7
|
-
super("test:index:MyResource", name);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
new MyResource("testResource1");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../tests/runtime/langhost/cases/069.ambiguous_entrypoints/index.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;AAEjC,wDAA0C;AAE1C,MAAM,UAAW,SAAQ,MAAM,CAAC,cAAc;IAC1C,YAAY,IAAY;QACpB,KAAK,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;CACJ;AAED,IAAI,UAAU,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// Copyright 2016-2018, Pulumi Corporation.
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
import * as pulumi from "../../../../../";
|
|
16
|
-
|
|
17
|
-
class MyResource extends pulumi.CustomResource {
|
|
18
|
-
constructor(name: string) {
|
|
19
|
-
super("test:index:MyResource", name);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
new MyResource("testResource1");
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// This test checks for unusually named pulumi resources with aliases
|
|
2
|
-
|
|
3
|
-
let pulumi = require("../../../../..");
|
|
4
|
-
let assert = require("assert");
|
|
5
|
-
|
|
6
|
-
class MyResource extends pulumi.CustomResource {
|
|
7
|
-
constructor(name, aliases) {
|
|
8
|
-
super(
|
|
9
|
-
"test:index:MyResource",
|
|
10
|
-
name,
|
|
11
|
-
{},
|
|
12
|
-
{
|
|
13
|
-
aliases: aliases,
|
|
14
|
-
},
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const resource1 = new MyResource("testResource1", []);
|
|
20
|
-
assert.equal(resource1.__aliases[0], undefined);
|
|
21
|
-
const resource2 = new MyResource("some-random-resource-name", ["test-alias-name"]);
|
|
22
|
-
resource2.__aliases[0].apply((alias) => assert.equal(alias, ["test-alias-name"]));
|
|
23
|
-
const resource3 = new MyResource("other:random:resource:name", ["other:test:alias:name"]);
|
|
24
|
-
resource3.__aliases[0].apply((alias) => assert.equal(alias, ["other:test:alias:name"]));
|
|
25
|
-
const resource4 = new MyResource("-other@random:resource!name", ["other!test@alias+name"]);
|
|
26
|
-
resource4.__aliases[0].apply((alias) => assert.equal(alias, ["other!test@alias+name"]));
|