@pulumi/pulumi 3.65.1 → 3.66.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/automation/errors.js +9 -5
- package/automation/errors.js.map +1 -1
- package/automation/events.js.map +1 -1
- package/automation/localWorkspace.js +21 -5
- package/automation/localWorkspace.js.map +1 -1
- package/automation/remoteStack.js.map +1 -1
- package/automation/remoteWorkspace.js.map +1 -1
- package/automation/server.js +1 -1
- package/automation/server.js.map +1 -1
- package/automation/stack.js +14 -7
- package/automation/stack.js.map +1 -1
- package/cmd/dynamic-provider/index.js +1 -1
- package/cmd/dynamic-provider/index.js.map +1 -1
- package/cmd/run/index.js +5 -3
- package/cmd/run/index.js.map +1 -1
- package/cmd/run/run.js +3 -7
- package/cmd/run/run.js.map +1 -1
- package/cmd/run/tracing.js.map +1 -1
- package/cmd/run-policy-pack/index.js +1 -1
- package/cmd/run-policy-pack/index.js.map +1 -1
- package/cmd/run-policy-pack/run.js +3 -6
- package/cmd/run-policy-pack/run.js.map +1 -1
- package/config.js +2 -3
- package/config.js.map +1 -1
- package/dynamic/index.js +2 -2
- package/dynamic/index.js.map +1 -1
- package/iterable/index.js +4 -4
- package/iterable/index.js.map +1 -1
- package/log/index.js +1 -3
- package/log/index.js.map +1 -1
- package/output.d.ts +4 -4
- package/output.js +35 -29
- package/output.js.map +1 -1
- package/package.json +2 -1
- package/provider/internals.js.map +1 -1
- package/provider/server.js +7 -8
- package/provider/server.js.map +1 -1
- package/resource.js +8 -8
- package/resource.js.map +1 -1
- package/runtime/asyncIterableUtil.js +1 -1
- package/runtime/asyncIterableUtil.js.map +1 -1
- package/runtime/closure/codePaths.js +1 -2
- package/runtime/closure/codePaths.js.map +1 -1
- package/runtime/closure/createClosure.js +56 -38
- package/runtime/closure/createClosure.js.map +1 -1
- package/runtime/closure/package.js +8 -5
- package/runtime/closure/package.js.map +1 -1
- package/runtime/closure/parseFunction.js +33 -17
- package/runtime/closure/parseFunction.js.map +1 -1
- package/runtime/closure/rewriteSuper.js +3 -6
- package/runtime/closure/rewriteSuper.js.map +1 -1
- package/runtime/closure/serializeClosure.js +34 -26
- package/runtime/closure/serializeClosure.js.map +1 -1
- package/runtime/closure/utils.js +1 -2
- package/runtime/closure/utils.js.map +1 -1
- package/runtime/closure/v8.js +9 -10
- package/runtime/closure/v8.js.map +1 -1
- package/runtime/closure/v8Hooks.js +2 -2
- package/runtime/closure/v8Hooks.js.map +1 -1
- package/runtime/config.js.map +1 -1
- package/runtime/debuggable.js +10 -9
- package/runtime/debuggable.js.map +1 -1
- package/runtime/index.js.map +1 -1
- package/runtime/invoke.js +4 -9
- package/runtime/invoke.js.map +1 -1
- package/runtime/mocks.js.map +1 -1
- package/runtime/resource.js +17 -12
- package/runtime/resource.js.map +1 -1
- package/runtime/rpc.js +6 -6
- package/runtime/rpc.js.map +1 -1
- package/runtime/settings.js +1 -1
- package/runtime/settings.js.map +1 -1
- package/runtime/stack.js +3 -3
- package/runtime/stack.js.map +1 -1
- package/runtime/state.js +1 -3
- package/runtime/state.js.map +1 -1
- package/stackReference.js.map +1 -1
- package/tests/automation/localWorkspace.spec.js +63 -57
- package/tests/automation/localWorkspace.spec.js.map +1 -1
- package/tests/automation/remoteWorkspace.spec.js +9 -6
- package/tests/automation/remoteWorkspace.spec.js.map +1 -1
- package/tests/config.spec.js +76 -28
- package/tests/config.spec.js.map +1 -1
- package/tests/iterable.spec.js +2 -2
- package/tests/iterable.spec.js.map +1 -1
- package/tests/options.spec.js +9 -3
- package/tests/options.spec.js.map +1 -1
- package/tests/output.spec.js +61 -67
- package/tests/output.spec.js.map +1 -1
- package/tests/provider.spec.js +7 -1
- package/tests/provider.spec.js.map +1 -1
- package/tests/resource.spec.js.map +1 -1
- package/tests/runtime/asyncIterableUtil.spec.js.map +1 -1
- package/tests/runtime/closureLoader.spec.js +1 -1
- package/tests/runtime/closureLoader.spec.js.map +1 -1
- package/tests/runtime/deploymentOnlyModule/runtimeConfig.js.map +1 -1
- package/tests/runtime/langhost/cases/000.empty/index.js +0 -1
- package/tests/runtime/langhost/cases/001.one_resource/index.js +0 -1
- package/tests/runtime/langhost/cases/002.ten_resources/index.js +0 -1
- package/tests/runtime/langhost/cases/003.one_complex_resource/index.js +20 -20
- package/tests/runtime/langhost/cases/004.ten_complex_resources/index.js +5 -6
- package/tests/runtime/langhost/cases/004.ten_complex_resources/resource.js +11 -12
- package/tests/runtime/langhost/cases/005.resource_thens/index.js +12 -13
- package/tests/runtime/langhost/cases/006.asset/index.js +1 -2
- package/tests/runtime/langhost/cases/007.promises_io/index.js +2 -3
- package/tests/runtime/langhost/cases/008.ten_depends_on_resources/index.js +19 -11
- package/tests/runtime/langhost/cases/009.invoke/index.js +1 -1
- package/tests/runtime/langhost/cases/012.assets_archive/index.js +10 -8
- package/tests/runtime/langhost/cases/013.unhandled_promise_rejection/index.js +1 -1
- package/tests/runtime/langhost/cases/014.read_resource/index.js +7 -7
- package/tests/runtime/langhost/cases/015.runtime_sxs/index.js +35 -19
- package/tests/runtime/langhost/cases/017.parent_defaults/index.js +49 -41
- package/tests/runtime/langhost/cases/020.property_dependencies/index.js +27 -18
- package/tests/runtime/langhost/cases/021.parent_child_dependencies/index.js +3 -3
- package/tests/runtime/langhost/cases/022.parent_child_dependencies_2/index.js +3 -3
- package/tests/runtime/langhost/cases/023.parent_child_dependencies_3/index.js +6 -6
- package/tests/runtime/langhost/cases/024.parent_child_dependencies_4/index.js +8 -8
- package/tests/runtime/langhost/cases/025.parent_child_dependencies_5/index.js +9 -9
- package/tests/runtime/langhost/cases/026.parent_child_dependencies_6/index.js +11 -11
- package/tests/runtime/langhost/cases/027.parent_child_dependencies_7/index.js +14 -14
- package/tests/runtime/langhost/cases/028.parent_child_dependencies_8/index.js +10 -10
- package/tests/runtime/langhost/cases/029.parent_child_dependencies_9/index.js +8 -8
- package/tests/runtime/langhost/cases/030.import_resource/index.js +0 -1
- package/tests/runtime/langhost/cases/041.component_opt_single_provider/index.js +49 -41
- package/tests/runtime/langhost/cases/042.component_opt_providers_array/index.js +49 -41
- package/tests/runtime/langhost/cases/060.provider_invokes/index.js +4 -4
- package/tests/runtime/langhost/cases/061.provider_in_parent_invokes/index.js +8 -8
- package/tests/runtime/langhost/cases/063.providerref_in_parent_invokes/index.js +2 -2
- package/tests/runtime/langhost/cases/064.async_components/index.js +9 -9
- package/tests/runtime/langhost/cases/065.large_resource/index.js +2 -2
- package/tests/runtime/langhost/cases/067.native_es_module/index.js +0 -1
- package/tests/runtime/langhost/cases/068.remote_component_providers/index.js +6 -6
- package/tests/runtime/langhost/cases/069.ambiguous_entrypoints/index.js +0 -1
- package/tests/runtime/langhost/cases/070.unusual_alias_names/index.js +5 -6
- package/tests/runtime/langhost/cases/071.large_alias_counts/index.js +4 -5
- package/tests/runtime/langhost/cases/072.large_alias_lineage_chains/index.js +13 -14
- package/tests/runtime/langhost/cases/073.component_dependencies/index.js +10 -10
- package/tests/runtime/langhost/run.spec.js +140 -116
- package/tests/runtime/langhost/run.spec.js.map +1 -1
- package/tests/runtime/package.spec.js +23 -23
- package/tests/runtime/package.spec.js.map +1 -1
- package/tests/runtime/props.spec.js +53 -51
- package/tests/runtime/props.spec.js.map +1 -1
- package/tests/runtime/settings.spec.js.map +1 -1
- package/tests/runtime/tsClosureCases.js +3 -1
- package/tests/runtime/tsClosureCases.js.map +1 -1
- package/tests/stackReference.spec.js.map +1 -1
- package/tests/unwrap.spec.js +27 -7
- package/tests/unwrap.spec.js.map +1 -1
- package/tests/util.js.map +1 -1
- package/tests_with_mocks/mocks.spec.js +11 -11
- package/tests_with_mocks/mocks.spec.js.map +1 -1
- package/version.js +1 -1
|
@@ -54,7 +54,7 @@ const cleanup = (callback) => {
|
|
|
54
54
|
const runCleanup = () => {
|
|
55
55
|
for (const d of cleanupFns) {
|
|
56
56
|
// Keep running the test regardless of failure.
|
|
57
|
-
d().catch(err => console.log("???? Error thrown in defer, ignoring."));
|
|
57
|
+
d().catch((err) => console.log("???? Error thrown in defer, ignoring."));
|
|
58
58
|
}
|
|
59
59
|
cleanupFns = [];
|
|
60
60
|
};
|
|
@@ -71,7 +71,7 @@ describe("rpc", () => {
|
|
|
71
71
|
const base = path.join(path.dirname(__filename), "cases");
|
|
72
72
|
const cases = {
|
|
73
73
|
// An empty program.
|
|
74
|
-
|
|
74
|
+
empty: {
|
|
75
75
|
program: path.join(base, "000.empty"),
|
|
76
76
|
expectResourceCount: 0,
|
|
77
77
|
},
|
|
@@ -88,7 +88,7 @@ describe("rpc", () => {
|
|
|
88
88
|
expectResourceCount: 0,
|
|
89
89
|
},
|
|
90
90
|
// A program that allocates a single resource.
|
|
91
|
-
|
|
91
|
+
one_resource: {
|
|
92
92
|
program: path.join(base, "001.one_resource"),
|
|
93
93
|
expectResourceCount: 1,
|
|
94
94
|
registerResource: (ctx, dryrun, t, name, res) => {
|
|
@@ -98,7 +98,7 @@ describe("rpc", () => {
|
|
|
98
98
|
},
|
|
99
99
|
},
|
|
100
100
|
// A program that allocates ten simple resources.
|
|
101
|
-
|
|
101
|
+
ten_resources: {
|
|
102
102
|
program: path.join(base, "002.ten_resources"),
|
|
103
103
|
expectResourceCount: 10,
|
|
104
104
|
registerResource: (ctx, dryrun, t, name, res) => {
|
|
@@ -118,7 +118,7 @@ describe("rpc", () => {
|
|
|
118
118
|
},
|
|
119
119
|
},
|
|
120
120
|
// A program that allocates a complex resource with lots of input and output properties.
|
|
121
|
-
|
|
121
|
+
one_complex_resource: {
|
|
122
122
|
program: path.join(base, "003.one_complex_resource"),
|
|
123
123
|
expectResourceCount: 1,
|
|
124
124
|
registerResource: (ctx, dryrun, t, name, res) => {
|
|
@@ -150,7 +150,7 @@ describe("rpc", () => {
|
|
|
150
150
|
},
|
|
151
151
|
},
|
|
152
152
|
// A program that allocates 10 complex resources with lots of input and output properties.
|
|
153
|
-
|
|
153
|
+
ten_complex_resources: {
|
|
154
154
|
program: path.join(base, "004.ten_complex_resources"),
|
|
155
155
|
expectResourceCount: 10,
|
|
156
156
|
registerResource: (ctx, dryrun, t, name, res) => {
|
|
@@ -194,7 +194,7 @@ describe("rpc", () => {
|
|
|
194
194
|
},
|
|
195
195
|
},
|
|
196
196
|
// A program that allocates a single resource.
|
|
197
|
-
|
|
197
|
+
resource_thens: {
|
|
198
198
|
program: path.join(base, "005.resource_thens"),
|
|
199
199
|
expectResourceCount: 2,
|
|
200
200
|
registerResource: (ctx, dryrun, t, name, res, dependencies) => {
|
|
@@ -243,7 +243,7 @@ describe("rpc", () => {
|
|
|
243
243
|
};
|
|
244
244
|
},
|
|
245
245
|
},
|
|
246
|
-
|
|
246
|
+
input_output: {
|
|
247
247
|
pwd: path.join(base, "006.asset"),
|
|
248
248
|
expectResourceCount: 1,
|
|
249
249
|
registerResource: (ctx, dryrun, t, name, res) => {
|
|
@@ -259,7 +259,7 @@ describe("rpc", () => {
|
|
|
259
259
|
return { urn: makeUrn(t, name), id: undefined, props: undefined };
|
|
260
260
|
},
|
|
261
261
|
},
|
|
262
|
-
|
|
262
|
+
promises_io: {
|
|
263
263
|
pwd: path.join(base, "007.promises_io"),
|
|
264
264
|
expectResourceCount: 1,
|
|
265
265
|
registerResource: (ctx, dryrun, t, name, res) => {
|
|
@@ -271,7 +271,7 @@ describe("rpc", () => {
|
|
|
271
271
|
},
|
|
272
272
|
},
|
|
273
273
|
// A program that allocates ten simple resources that use dependsOn to depend on one another, 10 different ways.
|
|
274
|
-
|
|
274
|
+
ten_depends_on_resources: {
|
|
275
275
|
program: path.join(base, "008.ten_depends_on_resources"),
|
|
276
276
|
expectResourceCount: 100,
|
|
277
277
|
registerResource: (ctx, dryrun, t, name, res) => {
|
|
@@ -291,7 +291,7 @@ describe("rpc", () => {
|
|
|
291
291
|
},
|
|
292
292
|
},
|
|
293
293
|
// A simple test of the invocation RPC pathways.
|
|
294
|
-
|
|
294
|
+
invoke: {
|
|
295
295
|
program: path.join(base, "009.invoke"),
|
|
296
296
|
expectResourceCount: 0,
|
|
297
297
|
invoke: (ctx, tok, args, version, provider) => {
|
|
@@ -313,7 +313,7 @@ describe("rpc", () => {
|
|
|
313
313
|
},
|
|
314
314
|
},
|
|
315
315
|
// Simply test that certain runtime properties are available.
|
|
316
|
-
|
|
316
|
+
runtimeSettings: {
|
|
317
317
|
project: "runtimeSettingsProject",
|
|
318
318
|
stack: "runtimeSettingsStack",
|
|
319
319
|
config: {
|
|
@@ -324,7 +324,7 @@ describe("rpc", () => {
|
|
|
324
324
|
expectResourceCount: 0,
|
|
325
325
|
},
|
|
326
326
|
// A program that throws an ordinary unhandled error.
|
|
327
|
-
|
|
327
|
+
unhandled_error: {
|
|
328
328
|
program: path.join(base, "011.unhandled_error"),
|
|
329
329
|
expectResourceCount: 0,
|
|
330
330
|
expectError: "",
|
|
@@ -343,49 +343,49 @@ describe("rpc", () => {
|
|
|
343
343
|
},
|
|
344
344
|
},
|
|
345
345
|
// A program that creates one resource that contains an assets archive.
|
|
346
|
-
|
|
346
|
+
assets_archive: {
|
|
347
347
|
program: path.join(base, "012.assets_archive"),
|
|
348
348
|
expectResourceCount: 1,
|
|
349
349
|
registerResource: (ctx, dryrun, t, name, res) => {
|
|
350
350
|
assert_1.default.deepStrictEqual(res, {
|
|
351
|
-
|
|
351
|
+
archive: {
|
|
352
352
|
"4dabf18193072939515e22adb298388d": "0def7320c3a5731c473e5ecbe6d01bc7",
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
353
|
+
__pulumiArchive: true,
|
|
354
|
+
assets: {
|
|
355
|
+
archive: {
|
|
356
356
|
"4dabf18193072939515e22adb298388d": "0def7320c3a5731c473e5ecbe6d01bc7",
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
__pulumiArchive: true,
|
|
358
|
+
assets: {},
|
|
359
359
|
},
|
|
360
|
-
|
|
360
|
+
asset: {
|
|
361
361
|
"4dabf18193072939515e22adb298388d": "c44067f5952c0a294b673a41bacd8c17",
|
|
362
|
-
|
|
363
|
-
|
|
362
|
+
__pulumiAsset: true,
|
|
363
|
+
text: "foo",
|
|
364
364
|
},
|
|
365
365
|
},
|
|
366
366
|
},
|
|
367
|
-
|
|
367
|
+
archiveP: {
|
|
368
368
|
"4dabf18193072939515e22adb298388d": "0def7320c3a5731c473e5ecbe6d01bc7",
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
369
|
+
__pulumiArchive: true,
|
|
370
|
+
assets: {
|
|
371
|
+
foo: {
|
|
372
372
|
"4dabf18193072939515e22adb298388d": "c44067f5952c0a294b673a41bacd8c17",
|
|
373
|
-
|
|
374
|
-
|
|
373
|
+
__pulumiAsset: true,
|
|
374
|
+
text: "bar",
|
|
375
375
|
},
|
|
376
376
|
},
|
|
377
377
|
},
|
|
378
|
-
|
|
378
|
+
assetP: {
|
|
379
379
|
"4dabf18193072939515e22adb298388d": "c44067f5952c0a294b673a41bacd8c17",
|
|
380
|
-
|
|
381
|
-
|
|
380
|
+
__pulumiAsset: true,
|
|
381
|
+
text: "baz",
|
|
382
382
|
},
|
|
383
383
|
});
|
|
384
384
|
return { urn: makeUrn(t, name), id: undefined, props: res };
|
|
385
385
|
},
|
|
386
386
|
},
|
|
387
387
|
// A program that contains an unhandled promise rejection.
|
|
388
|
-
|
|
388
|
+
unhandled_promise_rejection: {
|
|
389
389
|
program: path.join(base, "013.unhandled_promise_rejection"),
|
|
390
390
|
expectResourceCount: 0,
|
|
391
391
|
expectError: "",
|
|
@@ -404,7 +404,7 @@ describe("rpc", () => {
|
|
|
404
404
|
},
|
|
405
405
|
},
|
|
406
406
|
// A simple test of the read resource behavior.
|
|
407
|
-
|
|
407
|
+
read_resource: {
|
|
408
408
|
program: path.join(base, "014.read_resource"),
|
|
409
409
|
expectResourceCount: 0,
|
|
410
410
|
readResource: (ctx, t, name, id, par, state) => {
|
|
@@ -426,7 +426,7 @@ describe("rpc", () => {
|
|
|
426
426
|
},
|
|
427
427
|
},
|
|
428
428
|
// Test that the runtime can be loaded twice.
|
|
429
|
-
|
|
429
|
+
runtime_sxs: {
|
|
430
430
|
program: path.join(base, "015.runtime_sxs"),
|
|
431
431
|
config: {
|
|
432
432
|
"sxs:message": "SxS config works!",
|
|
@@ -445,17 +445,17 @@ describe("rpc", () => {
|
|
|
445
445
|
},
|
|
446
446
|
},
|
|
447
447
|
// Test that leaked debuggable promises fail the deployment.
|
|
448
|
-
|
|
448
|
+
promise_leak: {
|
|
449
449
|
program: path.join(base, "016.promise_leak"),
|
|
450
450
|
expectError: "Program exited with non-zero exit code: 1",
|
|
451
451
|
},
|
|
452
452
|
// A test of parent default behaviors.
|
|
453
|
-
|
|
453
|
+
parent_defaults: {
|
|
454
454
|
program: path.join(base, "017.parent_defaults"),
|
|
455
455
|
expectResourceCount: 240,
|
|
456
456
|
registerResource: parentDefaultsRegisterResource,
|
|
457
457
|
},
|
|
458
|
-
|
|
458
|
+
logging: {
|
|
459
459
|
program: path.join(base, "018.logging"),
|
|
460
460
|
expectResourceCount: 1,
|
|
461
461
|
expectedLogs: {
|
|
@@ -497,7 +497,7 @@ describe("rpc", () => {
|
|
|
497
497
|
},
|
|
498
498
|
},
|
|
499
499
|
// Test stack outputs via exports.
|
|
500
|
-
|
|
500
|
+
stack_exports: {
|
|
501
501
|
program: path.join(base, "019.stack_exports"),
|
|
502
502
|
expectResourceCount: 1,
|
|
503
503
|
showRootResourceRegistration: true,
|
|
@@ -523,7 +523,7 @@ describe("rpc", () => {
|
|
|
523
523
|
});
|
|
524
524
|
},
|
|
525
525
|
},
|
|
526
|
-
|
|
526
|
+
root_resource: {
|
|
527
527
|
program: path.join(base, "001.one_resource"),
|
|
528
528
|
expectResourceCount: 2,
|
|
529
529
|
showRootResourceRegistration: true,
|
|
@@ -538,7 +538,7 @@ describe("rpc", () => {
|
|
|
538
538
|
return { urn: makeUrn(t, name), id: undefined, props: undefined };
|
|
539
539
|
},
|
|
540
540
|
},
|
|
541
|
-
|
|
541
|
+
backcompat_root_resource: {
|
|
542
542
|
program: path.join(base, "001.one_resource"),
|
|
543
543
|
expectResourceCount: 2,
|
|
544
544
|
skipRootResourceEndpoints: true,
|
|
@@ -554,7 +554,7 @@ describe("rpc", () => {
|
|
|
554
554
|
return { urn: makeUrn(t, name), id: undefined, props: undefined };
|
|
555
555
|
},
|
|
556
556
|
},
|
|
557
|
-
|
|
557
|
+
property_dependencies: {
|
|
558
558
|
program: path.join(base, "020.property_dependencies"),
|
|
559
559
|
expectResourceCount: 5,
|
|
560
560
|
registerResource: (ctx, dryrun, t, name, res, deps, custom, protect, parent, provider, propertyDeps) => {
|
|
@@ -571,34 +571,34 @@ describe("rpc", () => {
|
|
|
571
571
|
case "resC":
|
|
572
572
|
assert_1.default.deepStrictEqual(deps, ["resA", "resB"]);
|
|
573
573
|
assert_1.default.deepStrictEqual(propertyDeps, {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
574
|
+
propA: ["resA"],
|
|
575
|
+
propB: ["resB"],
|
|
576
|
+
propC: [],
|
|
577
577
|
});
|
|
578
578
|
break;
|
|
579
579
|
case "resD":
|
|
580
580
|
assert_1.default.deepStrictEqual(deps, ["resA", "resB", "resC"]);
|
|
581
581
|
assert_1.default.deepStrictEqual(propertyDeps, {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
582
|
+
propA: ["resA", "resB"],
|
|
583
|
+
propB: ["resC"],
|
|
584
|
+
propC: [],
|
|
585
585
|
});
|
|
586
586
|
break;
|
|
587
587
|
case "resE":
|
|
588
588
|
assert_1.default.deepStrictEqual(deps, ["resA", "resB", "resC", "resD"]);
|
|
589
589
|
assert_1.default.deepStrictEqual(propertyDeps, {
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
590
|
+
propA: ["resC"],
|
|
591
|
+
propB: ["resA", "resB"],
|
|
592
|
+
propC: [],
|
|
593
593
|
});
|
|
594
594
|
break;
|
|
595
595
|
default:
|
|
596
596
|
break;
|
|
597
597
|
}
|
|
598
|
-
return { urn: name, id: undefined, props: {
|
|
598
|
+
return { urn: name, id: undefined, props: { outprop: "qux" } };
|
|
599
599
|
},
|
|
600
600
|
},
|
|
601
|
-
|
|
601
|
+
parent_child_dependencies: {
|
|
602
602
|
pwd: path.join(base, "021.parent_child_dependencies"),
|
|
603
603
|
program: "./index.js",
|
|
604
604
|
expectResourceCount: 2,
|
|
@@ -610,12 +610,13 @@ describe("rpc", () => {
|
|
|
610
610
|
case "cust2":
|
|
611
611
|
assert_1.default.deepStrictEqual(deps, ["test:index:MyResource::cust1"]);
|
|
612
612
|
break;
|
|
613
|
-
default:
|
|
613
|
+
default:
|
|
614
|
+
throw new Error("Didn't check: " + name);
|
|
614
615
|
}
|
|
615
616
|
return { urn: makeUrn(t, name), id: undefined, props: undefined };
|
|
616
617
|
},
|
|
617
618
|
},
|
|
618
|
-
|
|
619
|
+
parent_child_dependencies_2: {
|
|
619
620
|
pwd: path.join(base, "022.parent_child_dependencies_2"),
|
|
620
621
|
program: "./index.js",
|
|
621
622
|
expectResourceCount: 3,
|
|
@@ -630,18 +631,19 @@ describe("rpc", () => {
|
|
|
630
631
|
case "cust3":
|
|
631
632
|
assert_1.default.deepStrictEqual(deps, ["test:index:MyResource::cust1"]);
|
|
632
633
|
break;
|
|
633
|
-
default:
|
|
634
|
+
default:
|
|
635
|
+
throw new Error("Didn't check: " + name);
|
|
634
636
|
}
|
|
635
637
|
return { urn: makeUrn(t, name), id: undefined, props: undefined };
|
|
636
638
|
},
|
|
637
639
|
},
|
|
638
|
-
|
|
640
|
+
parent_child_dependencies_3: {
|
|
639
641
|
pwd: path.join(base, "023.parent_child_dependencies_3"),
|
|
640
642
|
program: "./index.js",
|
|
641
643
|
expectResourceCount: 1,
|
|
642
644
|
expectError: "Program exited with non-zero exit code: 1",
|
|
643
645
|
},
|
|
644
|
-
|
|
646
|
+
parent_child_dependencies_4: {
|
|
645
647
|
pwd: path.join(base, "024.parent_child_dependencies_4"),
|
|
646
648
|
program: "./index.js",
|
|
647
649
|
expectResourceCount: 3,
|
|
@@ -656,12 +658,13 @@ describe("rpc", () => {
|
|
|
656
658
|
case "comp1":
|
|
657
659
|
assert_1.default.deepStrictEqual(deps, []);
|
|
658
660
|
break;
|
|
659
|
-
default:
|
|
661
|
+
default:
|
|
662
|
+
throw new Error("Didn't check: " + name);
|
|
660
663
|
}
|
|
661
664
|
return { urn: makeUrn(t, name), id: undefined, props: undefined };
|
|
662
665
|
},
|
|
663
666
|
},
|
|
664
|
-
|
|
667
|
+
parent_child_dependencies_5: {
|
|
665
668
|
pwd: path.join(base, "025.parent_child_dependencies_5"),
|
|
666
669
|
program: "./index.js",
|
|
667
670
|
expectResourceCount: 4,
|
|
@@ -677,14 +680,18 @@ describe("rpc", () => {
|
|
|
677
680
|
assert_1.default.deepStrictEqual(deps, []);
|
|
678
681
|
break;
|
|
679
682
|
case "res1":
|
|
680
|
-
assert_1.default.deepStrictEqual(deps, [
|
|
683
|
+
assert_1.default.deepStrictEqual(deps, [
|
|
684
|
+
"test:index:MyCustomResource::cust1",
|
|
685
|
+
"test:index:MyCustomResource::cust2",
|
|
686
|
+
]);
|
|
681
687
|
break;
|
|
682
|
-
default:
|
|
688
|
+
default:
|
|
689
|
+
throw new Error("Didn't check: " + name);
|
|
683
690
|
}
|
|
684
691
|
return { urn: makeUrn(t, name), id: undefined, props: undefined };
|
|
685
692
|
},
|
|
686
693
|
},
|
|
687
|
-
|
|
694
|
+
parent_child_dependencies_6: {
|
|
688
695
|
pwd: path.join(base, "026.parent_child_dependencies_6"),
|
|
689
696
|
program: "./index.js",
|
|
690
697
|
expectResourceCount: 6,
|
|
@@ -706,14 +713,19 @@ describe("rpc", () => {
|
|
|
706
713
|
assert_1.default.deepStrictEqual(deps, []);
|
|
707
714
|
break;
|
|
708
715
|
case "res1":
|
|
709
|
-
assert_1.default.deepStrictEqual(deps, [
|
|
716
|
+
assert_1.default.deepStrictEqual(deps, [
|
|
717
|
+
"test:index:MyCustomResource::cust1",
|
|
718
|
+
"test:index:MyCustomResource::cust2",
|
|
719
|
+
"test:index:MyCustomResource::cust3",
|
|
720
|
+
]);
|
|
710
721
|
break;
|
|
711
|
-
default:
|
|
722
|
+
default:
|
|
723
|
+
throw new Error("Didn't check: " + name);
|
|
712
724
|
}
|
|
713
725
|
return { urn: makeUrn(t, name), id: undefined, props: undefined };
|
|
714
726
|
},
|
|
715
727
|
},
|
|
716
|
-
|
|
728
|
+
parent_child_dependencies_7: {
|
|
717
729
|
pwd: path.join(base, "027.parent_child_dependencies_7"),
|
|
718
730
|
program: "./index.js",
|
|
719
731
|
expectResourceCount: 10,
|
|
@@ -738,10 +750,17 @@ describe("rpc", () => {
|
|
|
738
750
|
assert_1.default.deepStrictEqual(deps, ["test:index:MyCustomResource::cust2"]);
|
|
739
751
|
break;
|
|
740
752
|
case "res1":
|
|
741
|
-
assert_1.default.deepStrictEqual(deps, [
|
|
753
|
+
assert_1.default.deepStrictEqual(deps, [
|
|
754
|
+
"test:index:MyCustomResource::cust1",
|
|
755
|
+
"test:index:MyCustomResource::cust2",
|
|
756
|
+
"test:index:MyCustomResource::cust3",
|
|
757
|
+
]);
|
|
742
758
|
break;
|
|
743
759
|
case "res2":
|
|
744
|
-
assert_1.default.deepStrictEqual(deps, [
|
|
760
|
+
assert_1.default.deepStrictEqual(deps, [
|
|
761
|
+
"test:index:MyCustomResource::cust2",
|
|
762
|
+
"test:index:MyCustomResource::cust3",
|
|
763
|
+
]);
|
|
745
764
|
break;
|
|
746
765
|
case "res3":
|
|
747
766
|
assert_1.default.deepStrictEqual(deps, ["test:index:MyCustomResource::cust2"]);
|
|
@@ -749,12 +768,13 @@ describe("rpc", () => {
|
|
|
749
768
|
case "res4":
|
|
750
769
|
assert_1.default.deepStrictEqual(deps, ["test:index:MyCustomResource::cust4"]);
|
|
751
770
|
break;
|
|
752
|
-
default:
|
|
771
|
+
default:
|
|
772
|
+
throw new Error("Didn't check: " + name);
|
|
753
773
|
}
|
|
754
774
|
return { urn: makeUrn(t, name), id: undefined, props: undefined };
|
|
755
775
|
},
|
|
756
776
|
},
|
|
757
|
-
|
|
777
|
+
parent_child_dependencies_8: {
|
|
758
778
|
pwd: path.join(base, "028.parent_child_dependencies_8"),
|
|
759
779
|
program: "./index.js",
|
|
760
780
|
expectResourceCount: 6,
|
|
@@ -778,12 +798,13 @@ describe("rpc", () => {
|
|
|
778
798
|
case "res3":
|
|
779
799
|
assert_1.default.deepStrictEqual(deps, ["test:index:MyCustomResource::cust2"]);
|
|
780
800
|
break;
|
|
781
|
-
default:
|
|
801
|
+
default:
|
|
802
|
+
throw new Error("Didn't check: " + name);
|
|
782
803
|
}
|
|
783
804
|
return { urn: makeUrn(t, name), id: undefined, props: undefined };
|
|
784
805
|
},
|
|
785
806
|
},
|
|
786
|
-
|
|
807
|
+
parent_child_dependencies_9: {
|
|
787
808
|
pwd: path.join(base, "029.parent_child_dependencies_9"),
|
|
788
809
|
program: "./index.js",
|
|
789
810
|
expectResourceCount: 3,
|
|
@@ -798,29 +819,30 @@ describe("rpc", () => {
|
|
|
798
819
|
case "res1":
|
|
799
820
|
assert_1.default.deepStrictEqual(deps, ["test:index:MyCustomResource::cust1"]);
|
|
800
821
|
break;
|
|
801
|
-
default:
|
|
822
|
+
default:
|
|
823
|
+
throw new Error("Didn't check: " + name);
|
|
802
824
|
}
|
|
803
825
|
return { urn: makeUrn(t, name), id: undefined, props: undefined };
|
|
804
826
|
},
|
|
805
827
|
},
|
|
806
|
-
|
|
828
|
+
run_error: {
|
|
807
829
|
program: path.join(base, "040.run_error"),
|
|
808
830
|
expectResourceCount: 0,
|
|
809
831
|
// We should get the error message saying that a message was reported and the
|
|
810
832
|
// host should bail.
|
|
811
833
|
expectBail: true,
|
|
812
834
|
},
|
|
813
|
-
|
|
835
|
+
component_opt_single_provider: {
|
|
814
836
|
program: path.join(base, "041.component_opt_single_provider"),
|
|
815
837
|
expectResourceCount: 240,
|
|
816
838
|
registerResource: parentDefaultsRegisterResource,
|
|
817
839
|
},
|
|
818
|
-
|
|
840
|
+
component_opt_providers_array: {
|
|
819
841
|
program: path.join(base, "042.component_opt_providers_array"),
|
|
820
842
|
expectResourceCount: 240,
|
|
821
843
|
registerResource: parentDefaultsRegisterResource,
|
|
822
844
|
},
|
|
823
|
-
|
|
845
|
+
depends_on_non_resource: {
|
|
824
846
|
program: path.join(base, "043.depends_on_non_resource"),
|
|
825
847
|
expectResourceCount: 0,
|
|
826
848
|
// We should get the error message saying that a message was reported and the
|
|
@@ -838,7 +860,7 @@ describe("rpc", () => {
|
|
|
838
860
|
}
|
|
839
861
|
},
|
|
840
862
|
},
|
|
841
|
-
|
|
863
|
+
ignore_changes: {
|
|
842
864
|
program: path.join(base, "045.ignore_changes"),
|
|
843
865
|
expectResourceCount: 1,
|
|
844
866
|
registerResource: (ctx, dryrun, t, name, res, dependencies, custom, protect, parent, provider, propertyDeps, ignoreChanges) => {
|
|
@@ -852,7 +874,7 @@ describe("rpc", () => {
|
|
|
852
874
|
};
|
|
853
875
|
},
|
|
854
876
|
},
|
|
855
|
-
|
|
877
|
+
versions: {
|
|
856
878
|
program: path.join(base, "044.versions"),
|
|
857
879
|
expectResourceCount: 3,
|
|
858
880
|
registerResource: (ctx, dryrun, t, name, res, dependencies, custom, protect, parent, provider, propertyDeps, ignoreChanges, version, importID, replaceOnChanges) => {
|
|
@@ -912,7 +934,7 @@ describe("rpc", () => {
|
|
|
912
934
|
},
|
|
913
935
|
},
|
|
914
936
|
// A program that imports a single resource.
|
|
915
|
-
|
|
937
|
+
import_resource: {
|
|
916
938
|
program: path.join(base, "030.import_resource"),
|
|
917
939
|
expectResourceCount: 1,
|
|
918
940
|
registerResource: (ctx, dryrun, t, name, res, deps, custom, protect, parent, provider, propertyDeps, ignoreChanges, version, importID) => {
|
|
@@ -923,7 +945,7 @@ describe("rpc", () => {
|
|
|
923
945
|
},
|
|
924
946
|
},
|
|
925
947
|
// Test stack outputs via exports.
|
|
926
|
-
|
|
948
|
+
recursive_stack_exports: {
|
|
927
949
|
program: path.join(base, "046.recursive_stack_exports"),
|
|
928
950
|
expectResourceCount: 1,
|
|
929
951
|
showRootResourceRegistration: true,
|
|
@@ -937,17 +959,17 @@ describe("rpc", () => {
|
|
|
937
959
|
registerResourceOutputs: (ctx, dryrun, urn, t, name, res, outputs) => {
|
|
938
960
|
assert_1.default.strictEqual(t, "pulumi:pulumi:Stack");
|
|
939
961
|
assert_1.default.deepStrictEqual(outputs, {
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
962
|
+
m: { a: { b: 1 } },
|
|
963
|
+
n: { a: { b: 1 } },
|
|
964
|
+
o: { b: 1 },
|
|
965
|
+
obj2: { x: { y: 1 } },
|
|
966
|
+
obj2_x: { y: 1 },
|
|
967
|
+
obj2_x_y: 1,
|
|
968
|
+
p: 1,
|
|
947
969
|
});
|
|
948
970
|
},
|
|
949
971
|
},
|
|
950
|
-
|
|
972
|
+
exported_function: {
|
|
951
973
|
program: path.join(base, "047.exported_function"),
|
|
952
974
|
expectResourceCount: 1,
|
|
953
975
|
showRootResourceRegistration: true,
|
|
@@ -973,7 +995,7 @@ describe("rpc", () => {
|
|
|
973
995
|
});
|
|
974
996
|
},
|
|
975
997
|
},
|
|
976
|
-
|
|
998
|
+
exported_promise_function: {
|
|
977
999
|
program: path.join(base, "048.exported_promise_function"),
|
|
978
1000
|
expectResourceCount: 1,
|
|
979
1001
|
showRootResourceRegistration: true,
|
|
@@ -999,7 +1021,7 @@ describe("rpc", () => {
|
|
|
999
1021
|
});
|
|
1000
1022
|
},
|
|
1001
1023
|
},
|
|
1002
|
-
|
|
1024
|
+
exported_async_function: {
|
|
1003
1025
|
program: path.join(base, "049.exported_async_function"),
|
|
1004
1026
|
expectResourceCount: 1,
|
|
1005
1027
|
showRootResourceRegistration: true,
|
|
@@ -1025,7 +1047,7 @@ describe("rpc", () => {
|
|
|
1025
1047
|
});
|
|
1026
1048
|
},
|
|
1027
1049
|
},
|
|
1028
|
-
|
|
1050
|
+
resource_creation_in_function: {
|
|
1029
1051
|
program: path.join(base, "050.resource_creation_in_function"),
|
|
1030
1052
|
expectResourceCount: 2,
|
|
1031
1053
|
showRootResourceRegistration: true,
|
|
@@ -1043,7 +1065,7 @@ describe("rpc", () => {
|
|
|
1043
1065
|
assert_1.default.deepStrictEqual(outputs, {});
|
|
1044
1066
|
},
|
|
1045
1067
|
},
|
|
1046
|
-
|
|
1068
|
+
resource_creation_in_function_with_result: {
|
|
1047
1069
|
program: path.join(base, "051.resource_creation_in_function_with_result"),
|
|
1048
1070
|
expectResourceCount: 2,
|
|
1049
1071
|
showRootResourceRegistration: true,
|
|
@@ -1061,7 +1083,7 @@ describe("rpc", () => {
|
|
|
1061
1083
|
assert_1.default.deepStrictEqual(outputs, { a: 1 });
|
|
1062
1084
|
},
|
|
1063
1085
|
},
|
|
1064
|
-
|
|
1086
|
+
resource_creation_in_async_function_with_result: {
|
|
1065
1087
|
program: path.join(base, "052.resource_creation_in_async_function_with_result"),
|
|
1066
1088
|
expectResourceCount: 2,
|
|
1067
1089
|
showRootResourceRegistration: true,
|
|
@@ -1079,7 +1101,7 @@ describe("rpc", () => {
|
|
|
1079
1101
|
assert_1.default.deepStrictEqual(outputs, { a: 1 });
|
|
1080
1102
|
},
|
|
1081
1103
|
},
|
|
1082
|
-
|
|
1104
|
+
provider_invokes: {
|
|
1083
1105
|
program: path.join(base, "060.provider_invokes"),
|
|
1084
1106
|
expectResourceCount: 1,
|
|
1085
1107
|
registerResource: (ctx, dryrun, t, name, res) => {
|
|
@@ -1098,7 +1120,7 @@ describe("rpc", () => {
|
|
|
1098
1120
|
return { failures: undefined, ret: args };
|
|
1099
1121
|
},
|
|
1100
1122
|
},
|
|
1101
|
-
|
|
1123
|
+
provider_in_parent_invokes: {
|
|
1102
1124
|
program: path.join(base, "061.provider_in_parent_invokes"),
|
|
1103
1125
|
expectResourceCount: 2,
|
|
1104
1126
|
registerResource: (ctx, dryrun, t, name, res, dependencies, custom, protect, parent, provider) => {
|
|
@@ -1117,7 +1139,7 @@ describe("rpc", () => {
|
|
|
1117
1139
|
return { failures: undefined, ret: args };
|
|
1118
1140
|
},
|
|
1119
1141
|
},
|
|
1120
|
-
|
|
1142
|
+
providerref_invokes: {
|
|
1121
1143
|
program: path.join(base, "062.providerref_invokes"),
|
|
1122
1144
|
expectResourceCount: 1,
|
|
1123
1145
|
registerResource: (ctx, dryrun, t, name, res) => {
|
|
@@ -1136,7 +1158,7 @@ describe("rpc", () => {
|
|
|
1136
1158
|
return { failures: undefined, ret: args };
|
|
1137
1159
|
},
|
|
1138
1160
|
},
|
|
1139
|
-
|
|
1161
|
+
providerref_in_parent_invokes: {
|
|
1140
1162
|
program: path.join(base, "063.providerref_in_parent_invokes"),
|
|
1141
1163
|
expectResourceCount: 2,
|
|
1142
1164
|
registerResource: (ctx, dryrun, t, name, res, dependencies, custom, protect, parent, provider) => {
|
|
@@ -1158,7 +1180,7 @@ describe("rpc", () => {
|
|
|
1158
1180
|
return { failures: undefined, ret: args };
|
|
1159
1181
|
},
|
|
1160
1182
|
},
|
|
1161
|
-
|
|
1183
|
+
async_components: {
|
|
1162
1184
|
program: path.join(base, "064.async_components"),
|
|
1163
1185
|
expectResourceCount: 5,
|
|
1164
1186
|
registerResource: (ctx, dryrun, t, name, res, dependencies, custom, protect, parent, provider) => {
|
|
@@ -1173,24 +1195,24 @@ describe("rpc", () => {
|
|
|
1173
1195
|
},
|
|
1174
1196
|
},
|
|
1175
1197
|
// Create a resource with a large string to test grpcMaxMessageSize increase.
|
|
1176
|
-
|
|
1198
|
+
large_resource: {
|
|
1177
1199
|
program: path.join(base, "065.large_resource"),
|
|
1178
1200
|
expectResourceCount: 1,
|
|
1179
1201
|
registerResource: (ctx, dryrun, t, name, res) => {
|
|
1180
1202
|
const longString = "a".repeat(1024 * 1024 * 5);
|
|
1181
1203
|
assert_1.default.strictEqual(t, "test:index:MyLargeStringResource");
|
|
1182
1204
|
assert_1.default.strictEqual(name, "testResource1");
|
|
1183
|
-
assert_1.default.deepStrictEqual(res, {
|
|
1205
|
+
assert_1.default.deepStrictEqual(res, { largeStringProp: longString });
|
|
1184
1206
|
return {
|
|
1185
1207
|
urn: makeUrn(t, name),
|
|
1186
1208
|
id: name,
|
|
1187
1209
|
props: {
|
|
1188
|
-
|
|
1210
|
+
largeStringProp: "a".repeat(1024 * 1024 * 5),
|
|
1189
1211
|
},
|
|
1190
1212
|
};
|
|
1191
1213
|
},
|
|
1192
1214
|
},
|
|
1193
|
-
|
|
1215
|
+
replace_on_changes: {
|
|
1194
1216
|
program: path.join(base, "066.replace_on_changes"),
|
|
1195
1217
|
expectResourceCount: 1,
|
|
1196
1218
|
registerResource: (ctx, dryrun, t, name, res, dependencies, custom, protect, parent, provider, propertyDeps, ignoreChanges, version, importID, replaceOnChanges) => {
|
|
@@ -1205,7 +1227,7 @@ describe("rpc", () => {
|
|
|
1205
1227
|
},
|
|
1206
1228
|
},
|
|
1207
1229
|
// A program that allocates a single resource using a native ES module
|
|
1208
|
-
|
|
1230
|
+
native_es_module: {
|
|
1209
1231
|
// Dynamic import won't automatically resolve to /index.js on a directory, specifying explicitly
|
|
1210
1232
|
program: path.join(base, "067.native_es_module/index.js"),
|
|
1211
1233
|
expectResourceCount: 1,
|
|
@@ -1215,7 +1237,7 @@ describe("rpc", () => {
|
|
|
1215
1237
|
return { urn: makeUrn(t, name), id: undefined, props: undefined };
|
|
1216
1238
|
},
|
|
1217
1239
|
},
|
|
1218
|
-
|
|
1240
|
+
remote_component_providers: {
|
|
1219
1241
|
program: path.join(base, "068.remote_component_providers"),
|
|
1220
1242
|
expectResourceCount: 4,
|
|
1221
1243
|
registerResource: (ctx, dryrun, t, name, res, dependencies, custom, protect, parent, provider, propertyDeps, ignoreChanges, version, importID, replaceOnChanges, providers) => {
|
|
@@ -1226,7 +1248,7 @@ describe("rpc", () => {
|
|
|
1226
1248
|
return { urn: makeUrn(t, name), id: undefined, props: undefined };
|
|
1227
1249
|
},
|
|
1228
1250
|
},
|
|
1229
|
-
|
|
1251
|
+
ambiguous_entrypoints: {
|
|
1230
1252
|
program: path.join(base, "069.ambiguous_entrypoints"),
|
|
1231
1253
|
expectResourceCount: 1,
|
|
1232
1254
|
expectedLogs: {
|
|
@@ -1238,28 +1260,28 @@ describe("rpc", () => {
|
|
|
1238
1260
|
" in Pulumi.yaml - Pulumi will use index.js");
|
|
1239
1261
|
},
|
|
1240
1262
|
},
|
|
1241
|
-
|
|
1263
|
+
unusual_alias_names: {
|
|
1242
1264
|
program: path.join(base, "070.unusual_alias_names"),
|
|
1243
1265
|
expectResourceCount: 4,
|
|
1244
1266
|
registerResource: (ctx, dryrun, t, name, res, ...args) => {
|
|
1245
1267
|
return { urn: makeUrn(t, name), id: undefined, props: undefined };
|
|
1246
1268
|
},
|
|
1247
1269
|
},
|
|
1248
|
-
|
|
1270
|
+
large_alias_counts: {
|
|
1249
1271
|
program: path.join(base, "071.large_alias_counts"),
|
|
1250
1272
|
expectResourceCount: 1,
|
|
1251
1273
|
registerResource: (ctx, dryrun, t, name, res, ...args) => {
|
|
1252
1274
|
return { urn: makeUrn(t, name), id: undefined, props: undefined };
|
|
1253
1275
|
},
|
|
1254
1276
|
},
|
|
1255
|
-
|
|
1277
|
+
large_alias_lineage_chains: {
|
|
1256
1278
|
program: path.join(base, "072.large_alias_lineage_chains"),
|
|
1257
1279
|
expectResourceCount: 3,
|
|
1258
1280
|
registerResource: (ctx, dryrun, t, name, res, ...args) => {
|
|
1259
1281
|
return { urn: makeUrn(t, name), id: undefined, props: undefined };
|
|
1260
1282
|
},
|
|
1261
1283
|
},
|
|
1262
|
-
|
|
1284
|
+
component_dependencies: {
|
|
1263
1285
|
program: path.join(base, "073.component_dependencies"),
|
|
1264
1286
|
expectResourceCount: 4,
|
|
1265
1287
|
registerResource: (ctx, dryrun, t, name, res, dependencies, ...args) => {
|
|
@@ -1337,14 +1359,12 @@ describe("rpc", () => {
|
|
|
1337
1359
|
const provider = req.getProvider();
|
|
1338
1360
|
const ignoreChanges = req.getIgnorechangesList().sort();
|
|
1339
1361
|
const replaceOnChanges = req.getReplaceonchangesList().sort();
|
|
1340
|
-
const propertyDeps = Array.from(req.getPropertydependenciesMap().entries())
|
|
1341
|
-
.reduce((o, [key, value]) => {
|
|
1362
|
+
const propertyDeps = Array.from(req.getPropertydependenciesMap().entries()).reduce((o, [key, value]) => {
|
|
1342
1363
|
return Object.assign(Object.assign({}, o), { [key]: value.getUrnsList().sort() });
|
|
1343
1364
|
}, {});
|
|
1344
1365
|
const version = req.getVersion();
|
|
1345
1366
|
const importID = req.getImportid();
|
|
1346
|
-
const providers = Array.from(req.getProvidersMap().entries())
|
|
1347
|
-
.reduce((o, [key, value]) => {
|
|
1367
|
+
const providers = Array.from(req.getProvidersMap().entries()).reduce((o, [key, value]) => {
|
|
1348
1368
|
return Object.assign(Object.assign({}, o), { [key]: value });
|
|
1349
1369
|
}, {});
|
|
1350
1370
|
const { urn, id, props } = opts.registerResource(ctx, dryrun, t, name, res, deps, custom, protect, parent, provider, propertyDeps, ignoreChanges, version, importID, replaceOnChanges, providers);
|
|
@@ -1539,7 +1559,9 @@ function createMockEngineAsync(opts, invokeCallback, readResourceCallback, regis
|
|
|
1539
1559
|
server.addService(resrpc.ResourceMonitorService, {
|
|
1540
1560
|
supportsFeature: supportsFeatureCallback,
|
|
1541
1561
|
invoke: invokeCallback,
|
|
1542
|
-
streamInvoke: () => {
|
|
1562
|
+
streamInvoke: () => {
|
|
1563
|
+
throw new Error("StreamInvoke not implemented in mock engine");
|
|
1564
|
+
},
|
|
1543
1565
|
readResource: readResourceCallback,
|
|
1544
1566
|
registerResource: registerResourceCallback,
|
|
1545
1567
|
registerResourceOutputs: registerResourceOutputsCallback,
|
|
@@ -1582,7 +1604,9 @@ function serveLanguageHostProcess(engineAddr) {
|
|
|
1582
1604
|
// Hook the first line so we can parse the address. Then we hook the rest to print for debugging purposes, and
|
|
1583
1605
|
// hand back the resulting process object plus the address we plucked out.
|
|
1584
1606
|
let addrResolve;
|
|
1585
|
-
const addr = new Promise((resolve) => {
|
|
1607
|
+
const addr = new Promise((resolve) => {
|
|
1608
|
+
addrResolve = resolve;
|
|
1609
|
+
});
|
|
1586
1610
|
proc.stdout.on("data", (data) => {
|
|
1587
1611
|
const dataString = stripEOL(data);
|
|
1588
1612
|
if (addrResolve) {
|