@pulumi/pulumi 3.135.2-alpha.xaa9ca8a → 3.135.2-alpha.xcc59acd

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/package.json +1 -1
  2. package/version.js +1 -1
  3. package/npm/testdata/nested/project/index.d.ts +0 -0
  4. package/npm/testdata/nested/project/index.js +0 -16
  5. package/npm/testdata/nested/project/index.js.map +0 -1
  6. package/tests/automation/cmd.spec.d.ts +0 -1
  7. package/tests/automation/cmd.spec.js +0 -186
  8. package/tests/automation/cmd.spec.js.map +0 -1
  9. package/tests/automation/data/correct_project/Pulumi.yaml +0 -3
  10. package/tests/automation/data/import/Pulumi.yaml +0 -2
  11. package/tests/automation/data/import/expected_generated_code.txt +0 -11
  12. package/tests/automation/data/json/Pulumi.dev.json +0 -9
  13. package/tests/automation/data/json/Pulumi.json +0 -5
  14. package/tests/automation/data/nested_config/Pulumi.dev.yaml +0 -11
  15. package/tests/automation/data/nested_config/Pulumi.yaml +0 -3
  16. package/tests/automation/data/tcfg/Pulumi.yaml +0 -4
  17. package/tests/automation/data/tcfg/index.ts +0 -1
  18. package/tests/automation/data/tcfg/package-lock.json +0 -3062
  19. package/tests/automation/data/tcfg/package.json +0 -9
  20. package/tests/automation/data/tcfg/tsconfig.json +0 -16
  21. package/tests/automation/data/testproj/Pulumi.yaml +0 -3
  22. package/tests/automation/data/testproj/go.mod +0 -71
  23. package/tests/automation/data/testproj/go.sum +0 -299
  24. package/tests/automation/data/testproj/main.go +0 -19
  25. package/tests/automation/data/testproj_dotnet/Program.cs +0 -12
  26. package/tests/automation/data/testproj_dotnet/Pulumi.yaml +0 -3
  27. package/tests/automation/data/testproj_dotnet/TestProj.csproj +0 -12
  28. package/tests/automation/data/yaml/Pulumi.dev.yaml +0 -5
  29. package/tests/automation/data/yaml/Pulumi.yaml +0 -3
  30. package/tests/automation/data/yml/Pulumi.dev.yml +0 -5
  31. package/tests/automation/data/yml/Pulumi.yml +0 -3
  32. package/tests/automation/localWorkspace.spec.d.ts +0 -1
  33. package/tests/automation/localWorkspace.spec.js +0 -1325
  34. package/tests/automation/localWorkspace.spec.js.map +0 -1
  35. package/tests/automation/remoteWorkspace.spec.d.ts +0 -1
  36. package/tests/automation/remoteWorkspace.spec.js +0 -460
  37. package/tests/automation/remoteWorkspace.spec.js.map +0 -1
  38. package/tests/automation/util.d.ts +0 -1
  39. package/tests/automation/util.js +0 -31
  40. package/tests/automation/util.js.map +0 -1
  41. package/tests/config.spec.d.ts +0 -1
  42. package/tests/config.spec.js +0 -177
  43. package/tests/config.spec.js.map +0 -1
  44. package/tests/constants.d.ts +0 -1
  45. package/tests/constants.js +0 -18
  46. package/tests/constants.js.map +0 -1
  47. package/tests/init.spec.d.ts +0 -1
  48. package/tests/init.spec.js +0 -18
  49. package/tests/init.spec.js.map +0 -1
  50. package/tests/iterable.spec.d.ts +0 -1
  51. package/tests/iterable.spec.js +0 -60
  52. package/tests/iterable.spec.js.map +0 -1
  53. package/tests/options.spec.d.ts +0 -1
  54. package/tests/options.spec.js +0 -233
  55. package/tests/options.spec.js.map +0 -1
  56. package/tests/output.spec.d.ts +0 -1
  57. package/tests/output.spec.js +0 -809
  58. package/tests/output.spec.js.map +0 -1
  59. package/tests/provider.spec.d.ts +0 -1
  60. package/tests/provider.spec.js +0 -524
  61. package/tests/provider.spec.js.map +0 -1
  62. package/tests/resource.spec.d.ts +0 -1
  63. package/tests/resource.spec.js +0 -275
  64. package/tests/resource.spec.js.map +0 -1
  65. package/tests/runtime/asyncIterableUtil.spec.d.ts +0 -1
  66. package/tests/runtime/asyncIterableUtil.spec.js +0 -115
  67. package/tests/runtime/asyncIterableUtil.spec.js.map +0 -1
  68. package/tests/runtime/closure-integration-tests.d.ts +0 -1
  69. package/tests/runtime/closure-integration-tests.js +0 -120
  70. package/tests/runtime/closure-integration-tests.js.map +0 -1
  71. package/tests/runtime/findWorkspaceRoot.spec.d.ts +0 -1
  72. package/tests/runtime/findWorkspaceRoot.spec.js +0 -62
  73. package/tests/runtime/findWorkspaceRoot.spec.js.map +0 -1
  74. package/tests/runtime/install-package-tests.d.ts +0 -1
  75. package/tests/runtime/install-package-tests.js +0 -230
  76. package/tests/runtime/install-package-tests.js.map +0 -1
  77. package/tests/runtime/langhost/cases/000.empty/index.js +0 -1
  78. package/tests/runtime/langhost/cases/001.one_resource/index.js +0 -11
  79. package/tests/runtime/langhost/cases/002.ten_resources/index.js +0 -13
  80. package/tests/runtime/langhost/cases/003.one_complex_resource/index.js +0 -77
  81. package/tests/runtime/langhost/cases/004.ten_complex_resources/index.js +0 -38
  82. package/tests/runtime/langhost/cases/004.ten_complex_resources/resource.js +0 -30
  83. package/tests/runtime/langhost/cases/005.resource_thens/index.js +0 -72
  84. package/tests/runtime/langhost/cases/006.asset/index.js +0 -13
  85. package/tests/runtime/langhost/cases/006.asset/testdata.txt +0 -4
  86. package/tests/runtime/langhost/cases/007.promises_io/index.js +0 -25
  87. package/tests/runtime/langhost/cases/007.promises_io/testdata.txt +0 -4
  88. package/tests/runtime/langhost/cases/008.ten_depends_on_resources/index.js +0 -46
  89. package/tests/runtime/langhost/cases/009.invoke/index.js +0 -25
  90. package/tests/runtime/langhost/cases/010.runtime_settings/index.js +0 -22
  91. package/tests/runtime/langhost/cases/011.unhandled_error/index.js +0 -1
  92. package/tests/runtime/langhost/cases/012.assets_archive/index.js +0 -25
  93. package/tests/runtime/langhost/cases/013.unhandled_promise_rejection/index.js +0 -3
  94. package/tests/runtime/langhost/cases/014.read_resource/index.js +0 -19
  95. package/tests/runtime/langhost/cases/015.runtime_sxs/index.js +0 -100
  96. package/tests/runtime/langhost/cases/016.promise_leak/index.js +0 -3
  97. package/tests/runtime/langhost/cases/017.parent_defaults/index.js +0 -89
  98. package/tests/runtime/langhost/cases/018.logging/index.js +0 -15
  99. package/tests/runtime/langhost/cases/019.stack_exports/index.js +0 -15
  100. package/tests/runtime/langhost/cases/020.property_dependencies/index.js +0 -39
  101. package/tests/runtime/langhost/cases/021.parent_child_dependencies/index.js +0 -15
  102. package/tests/runtime/langhost/cases/022.parent_child_dependencies_2/index.js +0 -16
  103. package/tests/runtime/langhost/cases/023.parent_child_dependencies_3/index.js +0 -28
  104. package/tests/runtime/langhost/cases/024.parent_child_dependencies_4/index.js +0 -22
  105. package/tests/runtime/langhost/cases/025.parent_child_dependencies_5/index.js +0 -24
  106. package/tests/runtime/langhost/cases/026.parent_child_dependencies_6/index.js +0 -29
  107. package/tests/runtime/langhost/cases/027.parent_child_dependencies_7/index.js +0 -36
  108. package/tests/runtime/langhost/cases/028.parent_child_dependencies_8/index.js +0 -28
  109. package/tests/runtime/langhost/cases/029.parent_child_dependencies_9/index.js +0 -23
  110. package/tests/runtime/langhost/cases/030.import_resource/index.js +0 -11
  111. package/tests/runtime/langhost/cases/040.run_error/index.js +0 -3
  112. package/tests/runtime/langhost/cases/041.component_opt_single_provider/index.js +0 -89
  113. package/tests/runtime/langhost/cases/042.component_opt_providers_array/index.js +0 -89
  114. package/tests/runtime/langhost/cases/043.depends_on_non_resource/index.js +0 -11
  115. package/tests/runtime/langhost/cases/044.versions/index.js +0 -22
  116. package/tests/runtime/langhost/cases/045.ignore_changes/index.js +0 -11
  117. package/tests/runtime/langhost/cases/046.recursive_stack_exports/index.js +0 -19
  118. package/tests/runtime/langhost/cases/047.exported_function/index.js +0 -13
  119. package/tests/runtime/langhost/cases/048.exported_promise_function/index.js +0 -13
  120. package/tests/runtime/langhost/cases/049.exported_async_function/index.js +0 -13
  121. package/tests/runtime/langhost/cases/050.resource_creation_in_function/index.js +0 -11
  122. package/tests/runtime/langhost/cases/051.resource_creation_in_function_with_result/index.js +0 -12
  123. package/tests/runtime/langhost/cases/052.resource_creation_in_async_function_with_result/index.js +0 -12
  124. package/tests/runtime/langhost/cases/060.provider_invokes/index.js +0 -26
  125. package/tests/runtime/langhost/cases/061.provider_in_parent_invokes/index.js +0 -33
  126. package/tests/runtime/langhost/cases/062.providerref_invokes/index.js +0 -33
  127. package/tests/runtime/langhost/cases/063.providerref_in_parent_invokes/index.js +0 -41
  128. package/tests/runtime/langhost/cases/064.async_components/index.js +0 -44
  129. package/tests/runtime/langhost/cases/065.large_resource/index.js +0 -17
  130. package/tests/runtime/langhost/cases/066.replace_on_changes/index.js +0 -11
  131. package/tests/runtime/langhost/cases/067.native_es_module/index.js +0 -11
  132. package/tests/runtime/langhost/cases/067.native_es_module/package.json +0 -1
  133. package/tests/runtime/langhost/cases/068.remote_component_providers/index.js +0 -34
  134. package/tests/runtime/langhost/cases/068.remote_component_providers/package.json +0 -3
  135. package/tests/runtime/langhost/cases/069.ambiguous_entrypoints/index.d.ts +0 -1
  136. package/tests/runtime/langhost/cases/069.ambiguous_entrypoints/index.js +0 -11
  137. package/tests/runtime/langhost/cases/069.ambiguous_entrypoints/index.js.map +0 -1
  138. package/tests/runtime/langhost/cases/069.ambiguous_entrypoints/index.ts +0 -23
  139. package/tests/runtime/langhost/cases/070.unusual_alias_names/index.js +0 -26
  140. package/tests/runtime/langhost/cases/071.large_alias_counts/index.js +0 -22
  141. package/tests/runtime/langhost/cases/072.large_alias_lineage_chains/index.js +0 -55
  142. package/tests/runtime/langhost/cases/073.component_dependencies/index.js +0 -28
  143. package/tests/runtime/langhost/cases/074.source_position/index.js +0 -17
  144. package/tests/runtime/langhost/run.spec.d.ts +0 -1
  145. package/tests/runtime/langhost/run.spec.js +0 -1685
  146. package/tests/runtime/langhost/run.spec.js.map +0 -1
  147. package/tests/runtime/pack.d.ts +0 -1
  148. package/tests/runtime/pack.js +0 -56
  149. package/tests/runtime/pack.js.map +0 -1
  150. package/tests/runtime/props.spec.d.ts +0 -1
  151. package/tests/runtime/props.spec.js +0 -387
  152. package/tests/runtime/props.spec.js.map +0 -1
  153. package/tests/runtime/registrations.spec.d.ts +0 -1
  154. package/tests/runtime/registrations.spec.js +0 -139
  155. package/tests/runtime/registrations.spec.js.map +0 -1
  156. package/tests/runtime/rpc.spec.d.ts +0 -1
  157. package/tests/runtime/rpc.spec.js +0 -79
  158. package/tests/runtime/rpc.spec.js.map +0 -1
  159. package/tests/runtime/settings.spec.d.ts +0 -1
  160. package/tests/runtime/settings.spec.js +0 -57
  161. package/tests/runtime/settings.spec.js.map +0 -1
  162. package/tests/runtime/testdata/nested/project/index.d.ts +0 -0
  163. package/tests/runtime/testdata/nested/project/index.js +0 -16
  164. package/tests/runtime/testdata/nested/project/index.js.map +0 -1
  165. package/tests/stackReference.spec.d.ts +0 -1
  166. package/tests/stackReference.spec.js +0 -86
  167. package/tests/stackReference.spec.js.map +0 -1
  168. package/tests/unwrap.spec.d.ts +0 -1
  169. package/tests/unwrap.spec.js +0 -254
  170. package/tests/unwrap.spec.js.map +0 -1
  171. package/tests/util.d.ts +0 -1
  172. package/tests/util.js +0 -71
  173. package/tests/util.js.map +0 -1
  174. package/tests_with_mocks/mocks.spec.d.ts +0 -1
  175. package/tests_with_mocks/mocks.spec.js +0 -182
  176. package/tests_with_mocks/mocks.spec.js.map +0 -1
@@ -1,139 +0,0 @@
1
- "use strict";
2
- // Copyright 2016-2020, Pulumi Corporation.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
- return new (P || (P = Promise))(function (resolve, reject) {
18
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
- step((generator = generator.apply(thisArg, _arguments || [])).next());
22
- });
23
- };
24
- var __importStar = (this && this.__importStar) || function (mod) {
25
- if (mod && mod.__esModule) return mod;
26
- var result = {};
27
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
28
- result["default"] = mod;
29
- return result;
30
- };
31
- Object.defineProperty(exports, "__esModule", { value: true });
32
- const assert = __importStar(require("assert"));
33
- const index_1 = require("../../index");
34
- const errors_1 = require("../../errors");
35
- const grpc = __importStar(require("@grpc/grpc-js"));
36
- const rt = "registrationType";
37
- function construct(name, type, urn) {
38
- throw new Error("unimplemented");
39
- }
40
- describe("runtime", () => {
41
- describe("registrations", () => {
42
- describe("register", () => {
43
- const tests = [
44
- { name: "wildcard version", version: undefined },
45
- { name: "version", version: "1.2.3" },
46
- { name: "alpha version", version: "1.0.0-alpha1" },
47
- ];
48
- for (const { name, version } of tests) {
49
- it(`ignores registration on same ${name}`, () => {
50
- const source = new Map();
51
- assert.strictEqual(index_1.runtime.register(source, rt, "test", { version, construct }), true);
52
- assert.strictEqual(index_1.runtime.register(source, rt, "test", { version, construct }), false);
53
- });
54
- }
55
- });
56
- describe("getRegistration", () => {
57
- const source = new Map();
58
- index_1.runtime.register(source, rt, "test", { version: "1.0.1-alpha1", construct });
59
- index_1.runtime.register(source, rt, "test", { version: "1.0.2", construct });
60
- index_1.runtime.register(source, rt, "test", { version: "2.2.0", construct });
61
- index_1.runtime.register(source, rt, "unrelated", { version: "1.0.3", construct });
62
- index_1.runtime.register(source, rt, "wild", { version: undefined, construct });
63
- index_1.runtime.register(source, rt, "unreleased", { version: "1.0.0-alpha1", construct });
64
- index_1.runtime.register(source, rt, "unreleased", { version: "1.0.0-beta1", construct });
65
- it("throws on invalid version", () => {
66
- assert.throws(() => index_1.runtime.getRegistration(source, "test", "invalid"));
67
- });
68
- it("unknown not found", () => {
69
- assert.strictEqual(index_1.runtime.getRegistration(source, "unknown", ""), undefined);
70
- assert.strictEqual(index_1.runtime.getRegistration(source, "unknown", "0.0.1"), undefined);
71
- });
72
- it("different major version not found", () => {
73
- assert.strictEqual(index_1.runtime.getRegistration(source, "test", "0.0.1"), undefined);
74
- assert.strictEqual(index_1.runtime.getRegistration(source, "test", "3.0.0"), undefined);
75
- });
76
- const tests = [
77
- { name: "blank returns highest version", key: "test", version: "", expected: "2.2.0" },
78
- { name: "major version respected 1.0.0", key: "test", version: "1.0.0", expected: "1.0.2" },
79
- { name: "major version respected 2.0.0", key: "test", version: "2.0.0", expected: "2.2.0" },
80
- { name: "blank returns wild", key: "wild", version: "", expected: undefined },
81
- { name: "any returns wild", key: "wild", version: "1.2.3", expected: undefined },
82
- { name: "unreleased returns beta", key: "unreleased", version: "1.0.0", expected: "1.0.0-beta1" },
83
- ];
84
- for (const { name, key, version, expected } of tests) {
85
- it(name, () => {
86
- const module = index_1.runtime.getRegistration(source, key, version);
87
- assert.notStrictEqual(module, undefined);
88
- assert.strictEqual(module.version, expected);
89
- });
90
- }
91
- });
92
- });
93
- describe("resource", () => {
94
- describe("transferProperties", () => {
95
- before(() => {
96
- process.on("unhandledRejection", (reason, p) => {
97
- assert.fail(`Unhandled Rejection at: ${p}, reason: ${reason}`);
98
- });
99
- });
100
- after(() => {
101
- process.removeAllListeners("unhandledRejection");
102
- });
103
- it("transferProperties does not throw", () => {
104
- const resolver = index_1.runtime.transferProperties({}, "wew", {
105
- foo: "a",
106
- baz: "b",
107
- });
108
- const err = new Error();
109
- err.code = grpc.status.CANCELLED;
110
- assert.strictEqual(errors_1.isGrpcError(err), true);
111
- resolver["foo"]("", true, false, [], err);
112
- resolver["baz"]("", true, false, [], err);
113
- });
114
- });
115
- describe("prepareResource", () => {
116
- before(() => {
117
- process.on("unhandledRejection", (reason, p) => {
118
- assert.fail(`Unhandled Rejection at: ${p}, reason: ${reason}`);
119
- });
120
- });
121
- after(() => {
122
- process.removeAllListeners("unhandledRejection");
123
- });
124
- it("prepareResource does not throw", () => __awaiter(void 0, void 0, void 0, function* () {
125
- const resolver = yield index_1.runtime.prepareResource("", {}, undefined, true, false, {}, {}, undefined, undefined);
126
- const err = new Error();
127
- err.code = grpc.status.CANCELLED;
128
- if (resolver.resolveID) {
129
- resolver.resolveID("", true, err);
130
- }
131
- else {
132
- assert.fail("resolver.resolveID is undefined");
133
- }
134
- resolver.resolveURN("", err);
135
- }));
136
- });
137
- });
138
- });
139
- //# sourceMappingURL=registrations.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registrations.spec.js","sourceRoot":"","sources":["../../../tests/runtime/registrations.spec.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,+CAAiC;AAGjC,uCAAsC;AACtC,yCAA2C;AAC3C,oDAAsC;AAEtC,MAAM,EAAE,GAAG,kBAAkB,CAAC;AAE9B,SAAS,SAAS,CAAC,IAAY,EAAE,IAAY,EAAE,GAAW;IACtD,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;AACrC,CAAC;AAED,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACrB,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC3B,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;YACtB,MAAM,KAAK,GAAG;gBACV,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,SAAS,EAAE;gBAChD,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE;gBACrC,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE;aACrD,CAAC;YACF,KAAK,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,KAAK,EAAE;gBACnC,EAAE,CAAC,gC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EACd,SAAS,EACT,IAAI,EACJ,KAAK,EACL,EAAE,EACF,EAAE,EACF,SAAS,EACT,SAAS,CACZ,CAAC;gBAEF,MAAM,GAAG,GAAQ,IAAI,KAAK,EAAE,CAAC;gBACvB,GAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;gBAExC,IAAI,QAAQ,CAAC,SAAS,EAAE;oBACpB,QAAQ,CAAC,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;iBACrC;qBAAM;oBACH,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;iBAClD;gBAED,QAAQ,CAAC,UAAU,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;YACjC,CAAC,CAAA,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,79 +0,0 @@
1
- "use strict";
2
- // Copyright 2016-2024, Pulumi Corporation.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- var __importStar = (this && this.__importStar) || function (mod) {
16
- if (mod && mod.__esModule) return mod;
17
- var result = {};
18
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
19
- result["default"] = mod;
20
- return result;
21
- };
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- const assert = __importStar(require("assert"));
24
- const rpc = __importStar(require("../../runtime/rpc"));
25
- const secretUnwrappingTestData = [
26
- // primitive value wrapped in a secret
27
- {
28
- original: rpc.serializeSecretValue("secret"),
29
- unwrapped: "secret",
30
- },
31
- // object with a secret value,
32
- {
33
- original: {
34
- first: "first",
35
- second: rpc.serializeSecretValue("second"),
36
- nested: {
37
- first: "first",
38
- second: rpc.serializeSecretValue("secret"),
39
- },
40
- },
41
- unwrapped: {
42
- first: "first",
43
- second: "second",
44
- nested: {
45
- first: "first",
46
- second: "secret",
47
- },
48
- },
49
- },
50
- // inside an array
51
- {
52
- original: ["first", rpc.serializeSecretValue("second")],
53
- unwrapped: ["first", "second"],
54
- },
55
- // inside an array inside an object
56
- {
57
- original: {
58
- first: "first",
59
- second: [{ nested: [rpc.serializeSecretValue("nested")] }],
60
- },
61
- unwrapped: {
62
- first: "first",
63
- second: [{ nested: ["nested"] }],
64
- },
65
- },
66
- ];
67
- describe("rpc tests", () => {
68
- it("unwrapSecretValues works", () => {
69
- for (const { original, unwrapped } of secretUnwrappingTestData) {
70
- const [result, containsSecret] = rpc.unwrapSecretValues(original);
71
- assert.strictEqual(containsSecret, true);
72
- assert.deepStrictEqual(result, unwrapped);
73
- const [unwrappedResult, containsSecretAgain] = rpc.unwrapSecretValues(result);
74
- assert.strictEqual(containsSecretAgain, false);
75
- assert.deepStrictEqual(unwrappedResult, result);
76
- }
77
- });
78
- });
79
- //# sourceMappingURL=rpc.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rpc.spec.js","sourceRoot":"","sources":["../../../tests/runtime/rpc.spec.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,+CAAiC;AACjC,uDAAyC;AAEzC,MAAM,wBAAwB,GAAwC;IAClE,sCAAsC;IACtC;QACI,QAAQ,EAAE,GAAG,CAAC,oBAAoB,CAAC,QAAQ,CAAC;QAC5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AAS,CAAC,CAAC;YAC1C,MAAM,CAAC,eAAe,EAAE,mBAAmB,CAAC,GAAG,GAAG,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;YAC9E,MAAM,CAAC,WAAW,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;YAC/C,MAAM,CAAC,eAAe,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;SACnD;IACL,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,57 +0,0 @@
1
- "use strict";
2
- // Copyright 2016-2018, Pulumi Corporation.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- var __importStar = (this && this.__importStar) || function (mod) {
16
- if (mod && mod.__esModule) return mod;
17
- var result = {};
18
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
19
- result["default"] = mod;
20
- return result;
21
- };
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- const assert = __importStar(require("assert"));
24
- const runtime = __importStar(require("../../runtime"));
25
- describe("settings", () => {
26
- beforeEach(() => {
27
- runtime._reset();
28
- runtime.setAllConfig({});
29
- });
30
- after(() => {
31
- runtime._reset();
32
- runtime.setAllConfig({});
33
- });
34
- it("runtime options and config are read from and updated via a state object", () => {
35
- const testOrganization = "TestOrg";
36
- runtime._setOrganization(testOrganization);
37
- const testProject = "TestProject";
38
- runtime._setProject(testProject);
39
- const testStack = "TestStack";
40
- runtime._setStack(testStack);
41
- const isDryRun = true;
42
- runtime._setIsDryRun(isDryRun);
43
- const isQueryMode = true;
44
- runtime._setQueryMode(isQueryMode);
45
- const key = "k";
46
- const val = "v";
47
- runtime.setConfig(key, val);
48
- assert.strictEqual(runtime.getOrganization(), testOrganization);
49
- assert.strictEqual(runtime.getProject(), testProject);
50
- assert.strictEqual(runtime.getStack(), testStack);
51
- assert.strictEqual(runtime.isDryRun(), isDryRun);
52
- assert.strictEqual(runtime.isQueryMode(), isQueryMode);
53
- assert.strictEqual(runtime.getConfig(key), val);
54
- assert.strictEqual(runtime.cacheDynamicProviders(), true);
55
- });
56
- });
57
- //# sourceMappingURL=settings.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.spec.js","sourceRoot":"","sources":["../../../tests/runtime/settings.spec.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,+CAAiC;AACjC,uDAAyC;AAEzC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACtB,UAAU,CAAC,GAAG,EAAE;QACZ,OAAO,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IACH,KAAK,CAAC,GAAG,EAAE;QACP,OAAO,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,yEAAyE,EAAE,GAAG,EAAE;QAC/E,MAAM,gBAAgB,GAAG,SAAS,CAAC;QACnC,OAAO,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;QAC3C,MAAM,WAAW,GAAG,aAAa,CAAC;QAClC,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QACjC,MAAM,SAAS,GAAG,WAAW,CAAC;QAC9B,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC;QACtB,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC/B,MAAM,WAAW,GAAG,IAAI,CAAC;QACzB,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;QACnC,MAAM,GAAG,GAAG,GAAG,CAAC;QAChB,MAAM,GAAG,GAAG,GAAG,CAAC;QAChB,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAE5B,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,gBAAgB,CAAC,CAAC;QAChE,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,WAAW,CAAC,CAAC;QACtD,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,SAAS,CAAC,CAAC;QAClD,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,QAAQ,CAAC,CAAC;QACjD,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,WAAW,CAAC,CAAC;QACvD,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;QAChD,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,qBAAqB,EAAE,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
File without changes
@@ -1,16 +0,0 @@
1
- "use strict";
2
- // Copyright 2016-2024, Pulumi Corporation.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- // This is where the pulumi program lives.
16
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../tests/runtime/testdata/nested/project/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,0CAA0C"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,86 +0,0 @@
1
- "use strict";
2
- // Copyright 2016-2023, Pulumi Corporation.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
- return new (P || (P = Promise))(function (resolve, reject) {
18
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
- step((generator = generator.apply(thisArg, _arguments || [])).next());
22
- });
23
- };
24
- var __importStar = (this && this.__importStar) || function (mod) {
25
- if (mod && mod.__esModule) return mod;
26
- var result = {};
27
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
28
- result["default"] = mod;
29
- return result;
30
- };
31
- Object.defineProperty(exports, "__esModule", { value: true });
32
- const assert = __importStar(require("assert"));
33
- const pulumi = __importStar(require(".."));
34
- class TestMocks {
35
- constructor(outputs) {
36
- this.outputs = outputs;
37
- }
38
- call(args) {
39
- throw new Error(`unknown function ${args.token}`);
40
- }
41
- newResource(args) {
42
- switch (args.type) {
43
- case "pulumi:pulumi:StackReference":
44
- return {
45
- id: `${args.name}_id`,
46
- state: {
47
- outputs: this.outputs,
48
- },
49
- };
50
- default:
51
- throw new Error(`unknown type ${args.type}`);
52
- }
53
- }
54
- }
55
- describe("StackReference.getOutputDetails", () => {
56
- // The two tests don't share a mock because in the JS SDK,
57
- // if a map item is a secret, the entire map gets promoted to secret.
58
- it("supports plain text", () => __awaiter(void 0, void 0, void 0, function* () {
59
- pulumi.runtime.setMocks(new TestMocks({
60
- bucket: "mybucket-1234",
61
- }));
62
- const ref = new pulumi.StackReference("foo");
63
- assert.deepStrictEqual(yield ref.getOutputDetails("bucket"), {
64
- value: "mybucket-1234",
65
- });
66
- }));
67
- it("supports secrets", () => __awaiter(void 0, void 0, void 0, function* () {
68
- pulumi.runtime.setMocks(new TestMocks({
69
- password: pulumi.secret("supersecretpassword"),
70
- }));
71
- const ref = new pulumi.StackReference("foo");
72
- assert.deepStrictEqual(yield ref.getOutputDetails("password"), {
73
- secretValue: "supersecretpassword",
74
- });
75
- }));
76
- it("types applies correctly", () => __awaiter(void 0, void 0, void 0, function* () {
77
- const passwordValue = "supersecretpassword";
78
- pulumi.runtime.setMocks(new TestMocks({
79
- password: pulumi.secret(passwordValue),
80
- }));
81
- const ref = new pulumi.StackReference("foo");
82
- const password = ref.outputs["password"].apply((x) => x.length);
83
- assert.deepStrictEqual(yield password.promise(), passwordValue.length);
84
- }));
85
- });
86
- //# sourceMappingURL=stackReference.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stackReference.spec.js","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