pulumi/sdk/nodejs/runtime
Pat Gavlin 248f78bafe [sdk/*] Add support for resource source positions
Add support to the core SDKs for reporting resource source positions.

In each SDK, this is implemented by crawling the stack when a resource
is registered in order to determine the position of the user code that
registered the resource.

This is somewhat brittle in that it expects a call stack of the form:
- Resource class constructor
- abstract Resource subclass constructor
- concrete Resource subclass constructor
- user code

This stack reflects the expected class hierarchy of "cloud resource /
component resource < customresource/componentresource < resource".

For example, consider the AWS S3 Bucket resource. When user code
instantiates a Bucket, the stack will look like
this in NodeJS:

    new Resource (/path/to/resource.ts:123:45)
    new CustomResource (/path/to/resource.ts:678:90)
    new Bucket (/path/to/bucket.ts:987:65)
    <user code> (/path/to/index.ts:4:3)

In order to determine the source position, we locate the fourth frame
(the `<user code>` frame).
2023-07-13 16:46:04 -07:00
..
closure This commit safely replaces empty interfaces with type aliases. 2023-05-11 23:10:00 -04:00
asyncIterableUtil.ts Apply autoformat 2023-04-28 18:27:10 -04:00
config.ts Apply autoformat 2023-04-28 18:27:10 -04:00
debuggable.ts Use existing PULUMI_DEBUG_PROMISE_LEAKS=1 flag to enable printing 2023-06-15 07:43:05 -07:00
index.ts Add support for async mocks in TS 2023-06-01 13:58:53 +02:00
invoke.ts Eliminate unnecessary double negations. 2023-05-09 18:35:59 -04:00
mocks.ts Apply suggestions from code review 2023-06-08 19:22:53 +02:00
resource.ts [sdk/*] Add support for resource source positions 2023-07-13 16:46:04 -07:00
rpc.ts Use existing PULUMI_DEBUG_PROMISE_LEAKS=1 flag to enable printing 2023-06-15 07:43:05 -07:00
settings.ts Eliminate assignment statements used as expressions. 2023-05-15 19:48:47 -04:00
stack.ts Apply autoformat 2023-04-28 18:27:10 -04:00
state.ts Apply autoformat 2023-04-28 18:27:10 -04:00