From 8761776487493a45c8647df60caf96df734b2b0c Mon Sep 17 00:00:00 2001 From: Ananthu C V Date: Thu, 24 Aug 2023 14:25:11 +0530 Subject: [PATCH 01/48] fix: publish job not publishing all npm packages (#3947) Seems the array was not being expanded properly and instead of iterating over each element it was treated as a single string. This syntax does work is zsh shells but probably is not bash compliant. This fix hopefully fixes the issue of only sdk package being uploaded to npm. ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9c6bd3f256..c69ebd23a24 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -352,7 +352,7 @@ jobs: PACKAGE_VERSION: ${{ needs.build.outputs.version }} run: | PACKAGES=("winglang-sdk" "winglang-compiler" "wingconsole-design-system" "wingconsole-ui" "wingconsole-server" "wingconsole-app") - for PACKAGE in $PACKAGES; do + for PACKAGE in "${PACKAGES[@]}"; do npm publish "$PACKAGE-$PACKAGE_VERSION.tgz" --access public done From 9c6fa1d52e2f353713486805c53df261a2c80599 Mon Sep 17 00:00:00 2001 From: Ananthu C V Date: Thu, 24 Aug 2023 16:00:45 +0530 Subject: [PATCH 02/48] fix: publish job doesn't include winglang package (#3948) Winglang package actually seems to be missing in the publish action! ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c69ebd23a24..d132eb423c0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -351,7 +351,7 @@ jobs: env: PACKAGE_VERSION: ${{ needs.build.outputs.version }} run: | - PACKAGES=("winglang-sdk" "winglang-compiler" "wingconsole-design-system" "wingconsole-ui" "wingconsole-server" "wingconsole-app") + PACKAGES=("winglang-sdk" "winglang-compiler" "wingconsole-design-system" "wingconsole-ui" "wingconsole-server" "wingconsole-app" "winglang") for PACKAGE in "${PACKAGES[@]}"; do npm publish "$PACKAGE-$PACKAGE_VERSION.tgz" --access public done From d5e69bf10ae2366273e12d76f2bff292c3d825ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pol=20Amor=C3=B3s?= Date: Thu, 24 Aug 2023 13:46:26 +0200 Subject: [PATCH 03/48] feat(console): remove rounded corners for playground and learn sites (#3949) Before image After image *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- apps/wing-console/console/ui/src/layout/default-layout.tsx | 3 ++- apps/wing-console/console/ui/src/layout/layout-provider.tsx | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/wing-console/console/ui/src/layout/default-layout.tsx b/apps/wing-console/console/ui/src/layout/default-layout.tsx index 2f497324248..c474c2b0fa2 100644 --- a/apps/wing-console/console/ui/src/layout/default-layout.tsx +++ b/apps/wing-console/console/ui/src/layout/default-layout.tsx @@ -246,7 +246,8 @@ export const DefaultLayout = ({ "h-full flex flex-col select-none", theme.text2, showTerms && "blur-sm", - "gap-1 pt-1", + "gap-1", + layout?.panels?.rounded && "pt-1", )} > {cloudAppState === "error" && diff --git a/apps/wing-console/console/ui/src/layout/layout-provider.tsx b/apps/wing-console/console/ui/src/layout/layout-provider.tsx index 2dea2f18b98..81b9e8e06bf 100644 --- a/apps/wing-console/console/ui/src/layout/layout-provider.tsx +++ b/apps/wing-console/console/ui/src/layout/layout-provider.tsx @@ -39,6 +39,9 @@ export function LayoutProvider({ }, ], }, + panels: { + rounded: false, + }, }; break; @@ -64,6 +67,9 @@ export function LayoutProvider({ statusBar: { hide: true, }, + panels: { + rounded: false, + }, }; break; } From f0480cdd92758058dcb452834af099c089a0c45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pol=20Amor=C3=B3s?= Date: Thu, 24 Aug 2023 15:23:16 +0200 Subject: [PATCH 04/48] feat(console): remove theme toggle for playground (#3952) Removes the theme toggle from the footer for the playground layout. Before image After image *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- apps/wing-console/console/ui/src/layout/layout-provider.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/wing-console/console/ui/src/layout/layout-provider.tsx b/apps/wing-console/console/ui/src/layout/layout-provider.tsx index 81b9e8e06bf..8af50a15386 100644 --- a/apps/wing-console/console/ui/src/layout/layout-provider.tsx +++ b/apps/wing-console/console/ui/src/layout/layout-provider.tsx @@ -39,6 +39,9 @@ export function LayoutProvider({ }, ], }, + statusBar: { + showThemeToggle: false, + }, panels: { rounded: false, }, From bd45fd524c68ae24fa83adc907c7da135734e1c5 Mon Sep 17 00:00:00 2001 From: Hasan <45375125+hasanaburayyan@users.noreply.github.com> Date: Thu, 24 Aug 2023 11:25:07 -0400 Subject: [PATCH 05/48] fix(compiler): cant call fromJson on imported structs (#3944) Closes: https://github.com/winglang/wing/issues/3792 Now supports calling fromJson on structs that were brought from other wing files example: file_1.w ```js struct Person { name: str; } ``` file_2.w ```js bring "./file1.w" as f1; let j = { name: "cool" }; f1.Person.fromJson(j); ``` ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [x] Docs updated (only required for features) - [x] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- examples/tests/valid/struct_from_json.w | 14 +++- examples/tests/valid/subdir/structs.w | 7 ++ libs/wingc/src/jsify.rs | 10 ++- libs/wingc/src/type_check.rs | 2 - .../valid/bring_local.w_compile_tf-aws.md | 2 +- .../struct_from_json.w_compile_tf-aws.md | 76 +++++++++++++++++++ 6 files changed, 103 insertions(+), 8 deletions(-) create mode 100644 examples/tests/valid/subdir/structs.w diff --git a/examples/tests/valid/struct_from_json.w b/examples/tests/valid/struct_from_json.w index d3db2b0b4a9..454b5ea9cdb 100644 --- a/examples/tests/valid/struct_from_json.w +++ b/examples/tests/valid/struct_from_json.w @@ -236,4 +236,16 @@ test "lifting a student" { assert(studentInflight1.dob.month == 10); assert(studentInflight1.dob.day == 10); assert(studentInflight1.dob.year == 2005); -} \ No newline at end of file +} + +// bring structs from other files +bring "./subdir/structs.w" as externalStructs; + +let jj1 = { + data: { + val: 10 + } +}; + +let externalBar = externalStructs.MyOtherStruct.fromJson(jj1); +assert(externalBar.data.val == 10); \ No newline at end of file diff --git a/examples/tests/valid/subdir/structs.w b/examples/tests/valid/subdir/structs.w new file mode 100644 index 00000000000..5307cdca1d0 --- /dev/null +++ b/examples/tests/valid/subdir/structs.w @@ -0,0 +1,7 @@ +struct MyStruct { + val: num; +} + +struct MyOtherStruct { + data: MyStruct; +} \ No newline at end of file diff --git a/libs/wingc/src/jsify.rs b/libs/wingc/src/jsify.rs index f2805ead5e1..59c462277a2 100644 --- a/libs/wingc/src/jsify.rs +++ b/libs/wingc/src/jsify.rs @@ -540,8 +540,9 @@ impl<'a> JSifier<'a> { ExprKind::Reference(Reference::InstanceMember { object, .. }) => { self.jsify_expression(&object, ctx) }, - ExprKind::Reference(Reference::TypeMember { .. }) => { - expr_string.clone().split(".").next().unwrap_or("").to_string() + ExprKind::Reference(Reference::TypeMember { property, .. }) => { + // remove the property name from the expression string + expr_string.split(".").filter(|s| s != &property.name).join(".") }, _ => expr_string, } @@ -1556,8 +1557,9 @@ fn get_public_symbols(scope: &Scope) -> Vec { } // interfaces are bringable, but there's nothing to emit StmtKind::Interface(_) => {} - // structs are bringable, but there's nothing to emit - StmtKind::Struct { .. } => {} + StmtKind::Struct { name, .. } => { + symbols.push(name.clone()); + } StmtKind::Enum { name, .. } => { symbols.push(name.clone()); } diff --git a/libs/wingc/src/type_check.rs b/libs/wingc/src/type_check.rs index bff3b08d9f9..c1ee103cc53 100644 --- a/libs/wingc/src/type_check.rs +++ b/libs/wingc/src/type_check.rs @@ -4593,8 +4593,6 @@ impl<'a> TypeChecker<'a> { } } } - let lookup = env.lookup(&s.name, None); - let type_ = lookup.unwrap().as_type().unwrap(); let new_class = self.hydrate_class_type_arguments(env, WINGSDK_STRUCT, vec![type_]); let v = self.get_property_from_class_like(new_class.as_class().unwrap(), property, true); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md index b5f20f9effe..8d26bdf7eba 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md @@ -586,7 +586,7 @@ module.exports = function({ $stdlib }) { })({}) ; const Point = require("./Point.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); - return { Util, Store, Color }; + return { Util, Store, Color, Point }; }; ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md index 1b4f392312e..1d44834d3fc 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md @@ -227,6 +227,67 @@ module.exports = function(stdStruct, fromInline) { ``` +## MyOtherStruct.Struct.js +```js +module.exports = function(stdStruct, fromInline) { + class MyOtherStruct { + static jsonSchema() { + return { + id: "/MyOtherStruct", + type: "object", + properties: { + data: { "$ref": "#/$defs/MyStruct" }, + }, + required: [ + "data", + ], + $defs: { + "MyStruct": { type: "object", "properties": require("./MyStruct.Struct.js")().jsonSchema().properties }, + } + } + } + static fromJson(obj) { + return stdStruct._validate(obj, this.jsonSchema()) + } + static _toInflightType(context) { + return fromInline(`require("./MyOtherStruct.Struct.js")(${ context._lift(stdStruct) })`); + } + } + return MyOtherStruct; +}; + +``` + +## MyStruct.Struct.js +```js +module.exports = function(stdStruct, fromInline) { + class MyStruct { + static jsonSchema() { + return { + id: "/MyStruct", + type: "object", + properties: { + val: { type: "number" }, + }, + required: [ + "val", + ], + $defs: { + } + } + } + static fromJson(obj) { + return stdStruct._validate(obj, this.jsonSchema()) + } + static _toInflightType(context) { + return fromInline(`require("./MyStruct.Struct.js")(${ context._lift(stdStruct) })`); + } + } + return MyStruct; +}; + +``` + ## Person.Struct.js ```js module.exports = function(stdStruct, fromInline) { @@ -561,6 +622,7 @@ const $stdlib = require('@winglang/sdk'); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; +const externalStructs = require("./preflight.structs-1.js")({ $stdlib }); class $Root extends $stdlib.std.Resource { constructor(scope, id) { super(scope, id); @@ -731,6 +793,9 @@ class $Root extends $stdlib.std.Resource { } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:flight school student :)",new $Closure1(this,"$Closure1")); this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:lifting a student",new $Closure2(this,"$Closure2")); + const jj1 = ({"data": ({"val": 10})}); + const externalBar = (externalStructs.MyOtherStruct.fromJson(jj1)); + {((cond) => {if (!cond) throw new Error("assertion failed: externalBar.data.val == 10")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(externalBar.data.val,10)))}; } } const $App = $stdlib.core.App.for(process.env.WING_TARGET); @@ -738,3 +803,14 @@ new $App({ outdir: $outdir, name: "struct_from_json", rootConstruct: $Root, plug ``` +## preflight.structs-1.js +```js +module.exports = function({ $stdlib }) { + const std = $stdlib.std; + const MyStruct = require("./MyStruct.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const MyOtherStruct = require("./MyOtherStruct.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + return { MyStruct, MyOtherStruct }; +}; + +``` + From 3d7de7bf5a655f19eb4e244df5ed55b8ac188a72 Mon Sep 17 00:00:00 2001 From: Mark McCulloh Date: Thu, 24 Aug 2023 13:06:54 -0400 Subject: [PATCH 06/48] chore(repo): ensure the self mutation updater actual does a real merge commit (#3946) The change introduced in https://github.com/winglang/wing/pull/3922 technically works, but the result is confusing because the patch applied is not an actual merge commit. So Github shows those changes as if you made them. This PR instead does the mutation update via the github API. The downside of this (other than the obvious complexity) is that technically the updated branch can be newer than the one the diffs were created against. I would rather have that problem than the one we have now. Change has been tested in my fork here https://github.com/MarkMcCulloh/wing-distributed-workflow/pull/5 *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .github/workflows/build.yml | 26 +----------- .github/workflows/mutation.yml | 76 ++++++++++++++++++++++++---------- libs/wingcompiler/package.json | 2 +- 3 files changed, 56 insertions(+), 48 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d132eb423c0..ffd302b784a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -102,25 +102,6 @@ jobs: name: dist path: dist/* - # Create patch to go from the PR head to the merge commit - - name: Create git patch for merge - if: github.event_name == 'pull_request' - id: diff - run: | - git diff --binary --patch ${{ github.event.pull_request.head.sha }} ${{ github.sha }} > update.diff - if [ -s update.diff ]; then - echo "Diff found, creating a patch to apply later" - cat update.diff - echo "diff=true" >> $GITHUB_OUTPUT - fi - - - name: Upload patch - if: steps.diff.outputs.diff == 'true' - uses: actions/upload-artifact@v3 - with: - name: update.diff - path: update.diff - test: name: Test timeout-minutes: 30 @@ -312,11 +293,8 @@ jobs: run: | PATCH_COUNT=0 for f in $(find ./*.diff/*.diff); do - # Exclude update.diff since we don't want to fail if the PR is just not up to date - if [ "$f" != "./update.diff/update.diff" ]; then - PATCH_COUNT=$((PATCH_COUNT + 1)) - cat $f - fi + PATCH_COUNT=$((PATCH_COUNT + 1)) + cat $f done if [ $PATCH_COUNT -gt 0 ]; then echo "Found $PATCH_COUNT patches, build failed. A self-mutation should happen soon." diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index b1a9fe408e1..302a440d5b2 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -21,8 +21,7 @@ permissions: jobs: mutate: runs-on: ubuntu-latest - # Run if the workflow run is a pull request - if: github.event.workflow_run.conclusion == 'failure' && (!contains(fromJSON('["main", "dev"]'), github.event.workflow_run.head_branch) || github.event.workflow_run.head_repository.fork) + if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure' && (!contains(fromJSON('["main", "dev"]'), github.event.workflow_run.head_branch) || github.event.workflow_run.head_repository.fork) steps: - name: Download artifacts id: download-artifacts @@ -57,18 +56,65 @@ jobs: run: | git config --global core.hooksPath /dev/null + - name: Update PR Branch + uses: actions/github-script@v6 + if: github.event.workflow_run.event == 'pull_request' && steps.download-artifacts.outputs.found_artifact == 'true' + with: + github-token: ${{ secrets.MUTATION_TOKEN }} + script: | + // use API to get the PR data since we can't rely on the context across forks + const pulls = await github.rest.pulls.list({ + per_page: 1, + owner: context.repo.owner, + repo: context.repo.repo, + head: `${context.payload.workflow_run.head_repository.full_name}:${context.payload.workflow_run.head_branch}` + }); + + const prContextData = pulls.data[0]; + const prNumber = prContextData.number; + const originalSha = prContextData.head.sha; + + try { + console.log("Updating PR branch"); + await github.rest.pulls.updateBranch({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: prNumber + }); + console.log("PR branch updated"); + + let updatedSha = originalSha; + let retries = 0; + const MAX_RETRIES = 10; + while (updatedSha == originalSha && retries++ < MAX_RETRIES) { + console.log(`Waiting for PR branch to update (attempt ${retries}/${MAX_RETRIES})`); + + await new Promise(r => setTimeout(r, 500)); + const updatedPR = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: prNumber + }); + updatedSha = updatedPR.data.head.sha; + } + } catch (error) { + // The branch is already up to date or can't otherwise be updated + // That's fine, we tried our best + console.warn(error); + } + - name: Checkout Workflow Branch if: steps.download-artifacts.outputs.found_artifact == 'true' uses: actions/checkout@v3 with: - token: ${{secrets.MUTATION_TOKEN}} + token: ${{ secrets.MUTATION_TOKEN }} ref: ${{ github.event.workflow_run.head_branch }} repository: ${{ github.event.workflow_run.head_repository.full_name }} path: repo - id: self_mutation if: steps.download-artifacts.outputs.found_artifact == 'true' - name: Apply downloaded pathes + name: Apply downloaded patches working-directory: repo env: HEAD_REF: ${{ github.event.workflow_run.head_branch }} @@ -76,29 +122,12 @@ jobs: git config user.name "monada-bot[bot]" git config user.email "monabot@monada.co" - # if ../patches/update.diff/update.diff exists, apply it first - UPDATE_PATCH_FILE="../patches/update.diff/update.diff" - if [ -f $UPDATE_PATCH_FILE ]; then - echo "Updating branch" - git apply --binary $UPDATE_PATCH_FILE - if [ $? -eq 0 ]; then - git add --all - git commit -s -m "Merge branch 'main' into $HEAD_REF" - echo "Patch applied successfully" - rm $UPDATE_PATCH_FILE - else - echo "Patch failed to apply" - cat $UPDATE_PATCH_FILE - exit 1 - fi - fi - for f in $(find ../patches/*.diff/*.diff); do echo "Applying $f" git apply --binary $f if [ $? -eq 0 ]; then git add --all - git commit -s -m "chore: self mutation ($f)" + git commit -s -m "chore: self mutation ($(basename $f))" echo "Patch applied successfully" rm $f else @@ -116,12 +145,13 @@ jobs: with: github-token: ${{ secrets.MUTATION_TOKEN }} script: | + // use API to get the PR number since we can't rely on the context across forks const pulls = await github.rest.pulls.list({ + per_page: 1, owner: context.repo.owner, repo: context.repo.repo, head: `${context.payload.workflow_run.head_repository.full_name}:${context.payload.workflow_run.head_branch}` }); - const prNumber = pulls.data[0].number; const labels = ["⚠️ pr/review-mutation"]; diff --git a/libs/wingcompiler/package.json b/libs/wingcompiler/package.json index 469da4c9287..49c9cd2cc4c 100644 --- a/libs/wingcompiler/package.json +++ b/libs/wingcompiler/package.json @@ -17,7 +17,7 @@ "url": "git+https://github.com/winglang/wing.git" }, "scripts": { - "compile:copy-wingc-wasm": "cp ../../target/wasm32-wasi/release/wingc.wasm . && cp wingc.wasm ../../dist/wingc.wasm", + "compile:copy-wingc-wasm": "cp ../../target/wasm32-wasi/release/wingc.wasm . && mkdir -p ../../dist && cp wingc.wasm ../../dist/wingc.wasm", "compile": "tsup-node", "watch": "tsup-node --watch", "test": "vitest run --passWithNoTests", From 01a08af00d0e0daf47161880dc3ed34b8190cd41 Mon Sep 17 00:00:00 2001 From: Uri Bar <106860404+staycoolcall911@users.noreply.github.com> Date: Fri, 25 Aug 2023 00:46:48 +0300 Subject: [PATCH 07/48] chore(compiler)!: remove panic built-in method (#3950) > Don't panic! Stay cool... This minor breaking change was staring at me for too long - better remove `panic()` before anyone starts using it. Closes #2055 ## Checklist - [ ] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [ ] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .../02-concepts/01-preflight-and-inflight.md | 2 +- docs/docs/03-language-reference.md | 13 +----------- examples/tests/error/utilities.w | 3 +-- libs/wingc/src/ast.rs | 9 +-------- libs/wingc/src/lib.rs | 20 +------------------ .../completions/call_struct_expansion.snap | 12 ----------- .../call_struct_expansion_partial.snap | 12 ----------- .../src/lsp/snapshots/completions/empty.snap | 12 ----------- .../only_show_symbols_in_scope.snap | 12 ----------- .../completions/struct_literal_value.snap | 12 ----------- .../test_corpus/valid/debug_env.w_test_sim.md | 2 +- 11 files changed, 6 insertions(+), 103 deletions(-) diff --git a/docs/docs/02-concepts/01-preflight-and-inflight.md b/docs/docs/02-concepts/01-preflight-and-inflight.md index de5f99c7468..cc0c4b2b884 100644 --- a/docs/docs/02-concepts/01-preflight-and-inflight.md +++ b/docs/docs/02-concepts/01-preflight-and-inflight.md @@ -266,7 +266,7 @@ inflight () => { ## Phase-independent code -The global functions `log`, `assert`, `throw`, and `panic` can all be used in both preflight and inflight code. +The global functions `log`, `assert`, and `throw` can all be used in both preflight and inflight code. Issue [#435](https://github.com/winglang/wing/issues/435) is tracking support for the capability to define phase-independent functions. diff --git a/docs/docs/03-language-reference.md b/docs/docs/03-language-reference.md index 72ed26e99c7..69fc22a739e 100644 --- a/docs/docs/03-language-reference.md +++ b/docs/docs/03-language-reference.md @@ -517,17 +517,11 @@ log("UTC: ${t1.utc.toIso())}"); // output: 2023-02-09T06:21:03.000Z | -------- | -------------------------------------------------------- | | `log` | logs str | | `throw` | creates and throws an instance of an exception | -| `panic` | exits with a serializable, dumps the trace + a core dump | -| `assert` | checks a condition and _panics_ if evaluated to false | - -`panic` is a fatal call by design. If the intention is error handling, panic is the -last resort. Exceptions are non fatal and should be used instead for effectively -communicating errors to the user. +| `assert` | checks a condition and _throws_ if evaluated to false | > ```TS > log("Hello ${name}"); > throw("a recoverable error occurred"); -> panic("a fatal error encountered"); > assert(x > 0); > ``` @@ -969,13 +963,8 @@ translate to JavaScript. You can create a new exception with a `throw` call. In the presence of `try`, both `catch` and `finally` are optional but at least one of them must be present. In the presence of `catch` the variable holding the exception (`e` in the example below) is optional. -`panic` is meant to be fatal error handling. `throw` is meant to be recoverable error handling. -An uncaught exception is considered user error but a panic call is not. Compiler -guarantees exception safety by throwing a compile error if an exception is -expected from a call and it is not being caught. - > ```TS > try { > let x: num? = 1; diff --git a/examples/tests/error/utilities.w b/examples/tests/error/utilities.w index 0a422904368..6c324a4ee97 100644 --- a/examples/tests/error/utilities.w +++ b/examples/tests/error/utilities.w @@ -1,4 +1,3 @@ assert(false); log("W"); -throw("me"); -panic("L"); +throw("me"); \ No newline at end of file diff --git a/libs/wingc/src/ast.rs b/libs/wingc/src/ast.rs index c3c203b0443..4c228b5bbbd 100644 --- a/libs/wingc/src/ast.rs +++ b/libs/wingc/src/ast.rs @@ -304,7 +304,6 @@ pub struct Stmt { #[derive(Debug)] pub enum UtilityFunctions { Log, - Panic, Throw, Assert, } @@ -312,12 +311,7 @@ pub enum UtilityFunctions { impl UtilityFunctions { /// Returns all utility functions. pub fn all() -> Vec { - vec![ - UtilityFunctions::Log, - UtilityFunctions::Panic, - UtilityFunctions::Throw, - UtilityFunctions::Assert, - ] + vec![UtilityFunctions::Log, UtilityFunctions::Throw, UtilityFunctions::Assert] } } @@ -325,7 +319,6 @@ impl Display for UtilityFunctions { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { UtilityFunctions::Log => write!(f, "log"), - UtilityFunctions::Panic => write!(f, "panic"), UtilityFunctions::Throw => write!(f, "throw"), UtilityFunctions::Assert => write!(f, "assert"), } diff --git a/libs/wingc/src/lib.rs b/libs/wingc/src/lib.rs index c695ff46803..8dedec5ab1c 100644 --- a/libs/wingc/src/lib.rs +++ b/libs/wingc/src/lib.rs @@ -141,7 +141,7 @@ pub unsafe extern "C" fn wingc_free(ptr: *mut u8, size: usize) { /// should be called before any other function #[no_mangle] pub unsafe extern "C" fn wingc_init() { - // Setup a custom panic hook to report panics as complitation diagnostics + // Setup a custom panic hook to report panics as compilation diagnostics set_custom_panic_hook(); } @@ -260,24 +260,6 @@ pub fn type_check( scope, types, ); - add_builtin( - UtilityFunctions::Panic.to_string().as_str(), - Type::Function(FunctionSignature { - this_type: None, - parameters: vec![FunctionParameter { - typeref: types.string(), - name: "message".into(), - docs: Docs::with_summary("The message to panic with"), - variadic: false, - }], - return_type: types.void(), - phase: Phase::Independent, - js_override: Some("{((msg) => {console.error(msg, (new Error()).stack);process.exit(1)})($args$)}".to_string()), - docs: Docs::with_summary("panics with an error"), - }), - scope, - types, - ); let mut scope_env = types.get_scope_env(&scope); let mut tc = TypeChecker::new(types, file_path, jsii_types, jsii_imports); diff --git a/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion.snap b/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion.snap index 0f1c0bd004a..eaec35e6afc 100644 --- a/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion.snap +++ b/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion.snap @@ -37,18 +37,6 @@ source: libs/wingc/src/lsp/completions.rs command: title: triggerParameterHints command: editor.action.triggerParameterHints -- label: panic - kind: 3 - detail: "(message: str): void" - documentation: - kind: markdown - value: "```wing\npanic: (message: str): void\n```\n---\npanics with an error\n\n### Parameters\n- `message` — The message to panic with" - sortText: cc|panic - insertText: panic($0) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints - label: throw kind: 3 detail: "(message: str): void" diff --git a/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion_partial.snap b/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion_partial.snap index 76f6c9f4596..2fa5ecc4b5f 100644 --- a/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion_partial.snap +++ b/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion_partial.snap @@ -37,18 +37,6 @@ source: libs/wingc/src/lsp/completions.rs command: title: triggerParameterHints command: editor.action.triggerParameterHints -- label: panic - kind: 3 - detail: "(message: str): void" - documentation: - kind: markdown - value: "```wing\npanic: (message: str): void\n```\n---\npanics with an error\n\n### Parameters\n- `message` — The message to panic with" - sortText: cc|panic - insertText: panic($0) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints - label: throw kind: 3 detail: "(message: str): void" diff --git a/libs/wingc/src/lsp/snapshots/completions/empty.snap b/libs/wingc/src/lsp/snapshots/completions/empty.snap index 01abaae3093..a16c46c8443 100644 --- a/libs/wingc/src/lsp/snapshots/completions/empty.snap +++ b/libs/wingc/src/lsp/snapshots/completions/empty.snap @@ -25,18 +25,6 @@ source: libs/wingc/src/lsp/completions.rs command: title: triggerParameterHints command: editor.action.triggerParameterHints -- label: panic - kind: 3 - detail: "(message: str): void" - documentation: - kind: markdown - value: "```wing\npanic: (message: str): void\n```\n---\npanics with an error\n\n### Parameters\n- `message` — The message to panic with" - sortText: cc|panic - insertText: panic($0) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints - label: throw kind: 3 detail: "(message: str): void" diff --git a/libs/wingc/src/lsp/snapshots/completions/only_show_symbols_in_scope.snap b/libs/wingc/src/lsp/snapshots/completions/only_show_symbols_in_scope.snap index 6387b3c3862..9bb6c11d82a 100644 --- a/libs/wingc/src/lsp/snapshots/completions/only_show_symbols_in_scope.snap +++ b/libs/wingc/src/lsp/snapshots/completions/only_show_symbols_in_scope.snap @@ -39,18 +39,6 @@ source: libs/wingc/src/lsp/completions.rs command: title: triggerParameterHints command: editor.action.triggerParameterHints -- label: panic - kind: 3 - detail: "(message: str): void" - documentation: - kind: markdown - value: "```wing\npanic: (message: str): void\n```\n---\npanics with an error\n\n### Parameters\n- `message` — The message to panic with" - sortText: cc|panic - insertText: panic($0) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints - label: throw kind: 3 detail: "(message: str): void" diff --git a/libs/wingc/src/lsp/snapshots/completions/struct_literal_value.snap b/libs/wingc/src/lsp/snapshots/completions/struct_literal_value.snap index 6c1c26d4a38..61505c5c11d 100644 --- a/libs/wingc/src/lsp/snapshots/completions/struct_literal_value.snap +++ b/libs/wingc/src/lsp/snapshots/completions/struct_literal_value.snap @@ -25,18 +25,6 @@ source: libs/wingc/src/lsp/completions.rs command: title: triggerParameterHints command: editor.action.triggerParameterHints -- label: panic - kind: 3 - detail: "(message: str): void" - documentation: - kind: markdown - value: "```wing\npanic: (message: str): void\n```\n---\npanics with an error\n\n### Parameters\n- `message` — The message to panic with" - sortText: cc|panic - insertText: panic($0) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints - label: throw kind: 3 detail: "(message: str): void" diff --git a/tools/hangar/__snapshots__/test_corpus/valid/debug_env.w_test_sim.md b/tools/hangar/__snapshots__/test_corpus/valid/debug_env.w_test_sim.md index 43946a08247..15946e9ff87 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/debug_env.w_test_sim.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/debug_env.w_test_sim.md @@ -4,7 +4,7 @@ ```log [symbol environment at ../../../../examples/tests/valid/debug_env.w:7:5] level 0: { this => A } -level 1: { A => A [type], assert => (condition: bool): void, cloud => cloud [namespace], log => (message: str): void, panic => (message: str): void, std => std [namespace], throw => (message: str): void } +level 1: { A => A [type], assert => (condition: bool): void, cloud => cloud [namespace], log => (message: str): void, std => std [namespace], throw => (message: str): void } pass ─ debug_env.wsim (no tests) From 1184705bd916fbaa02a4cf1c8dad1bca097e6f68 Mon Sep 17 00:00:00 2001 From: Marcio Cruz de Almeida <67694075+marciocadev@users.noreply.github.com> Date: Thu, 24 Aug 2023 18:55:12 -0300 Subject: [PATCH 08/48] fix(compiler): error when more than one space is placed between `if` and `let` (#3960) @MarkMcCulloh, your review on PR #3888 made me realize that if I put more than one space between `if let`, it generates errors. I've updated the `if let` to work even with extra spaces. Closes #3959 ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- examples/tests/valid/optionals.w | 6 ++++++ libs/tree-sitter-wing/grammar.js | 3 ++- .../test_corpus/valid/optionals.w_compile_tf-aws.md | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/examples/tests/valid/optionals.w b/examples/tests/valid/optionals.w index 0ca09eb0423..deacf2a1216 100644 --- a/examples/tests/valid/optionals.w +++ b/examples/tests/valid/optionals.w @@ -66,6 +66,12 @@ if let var z = a { assert(z == 2); } +// extra space between if and let +let b: num? = 1; +if let z = b { + assert(z == 1); +} + // Nested if lets if let parsedName = tryParseName("Good Name") { assert(parsedName.first == "Good"); diff --git a/libs/tree-sitter-wing/grammar.js b/libs/tree-sitter-wing/grammar.js index c9d8ae40ad5..094b038aa9a 100644 --- a/libs/tree-sitter-wing/grammar.js +++ b/libs/tree-sitter-wing/grammar.js @@ -274,7 +274,8 @@ module.exports = grammar({ if_let_statement: ($) => seq( - "if let", + "if", + "let", optional(field("reassignable", $.reassignable)), field("name", $.identifier), "=", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md index 4fb5ec1e07c..05ceea75c62 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md @@ -476,6 +476,14 @@ class $Root extends $stdlib.std.Resource { {((cond) => {if (!cond) throw new Error("assertion failed: z == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(z,2)))}; } } + const b = 1; + { + const $IF_LET_VALUE = b; + if ($IF_LET_VALUE != undefined) { + const z = $IF_LET_VALUE; + {((cond) => {if (!cond) throw new Error("assertion failed: z == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(z,1)))}; + } + } { const $IF_LET_VALUE = (tryParseName("Good Name")); if ($IF_LET_VALUE != undefined) { From 8efecc27b58d3266e3946ea5c8fb8b3ef853914d Mon Sep 17 00:00:00 2001 From: Chris Rybicki Date: Thu, 24 Aug 2023 18:29:01 -0400 Subject: [PATCH 09/48] feat(sdk)!: std.Node (#3884) As part of the effort to fix #3717, I'm trying to refactor some parts of the SDK so that we do not need to rely on the `std.Resource` class. The issue this PR addresses is that the `Resource` class has an extra property named `display` which is not available if you extend `cdk8s.Chart`: ```js bring cdk8s; class Bar { init() { this.display.title = "hi"; // OK } } class MyChart extends cdk8s.Chart { init() { this.display.title = "hello"; // error: Unknown symbol "display" } } ``` The solution implemented by this PR is to standardize display property access through `std.Node`: ```js bring cdk8s; class Bar { init() { std.Node.of(this).title = "hi"; // OK } } // once #3717 is fixed class MyChart extends cdk8s.Chart { init() { std.Node.of(this).title = "hello"; // OK } } ``` `std.Node.of(this)` also allows you toaccess all other fields and methods normally available through the `constructs.Node` class. Other changes: - I've replaced the `_addInflightOps` method from `std.Resource` with an API contract where a class can (optionally) implement a method named `_getInflightOps()`. This removes one more of the places where the compiler assumes behavior that only exists on `std.Resource` and not on `constructs.Construct`. - I've removed the `Code` class from the SDK. I looked through our codebase and 100% of the usages have just been to access its `text` field, so the class isn't really doing anything important. Just using plain `string`'s seems like a nice simplification. BREAKING CHANGE: `.display` property is no longer available in Wing classes. To change how classes are displayed in the Wing Console, use `std.Node.of(this)` and modify fields like `.title` and `.description`. ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- docs/docs/04-standard-library/01-cloud/api.md | 26 - .../04-standard-library/01-cloud/bucket.md | 26 - .../04-standard-library/01-cloud/counter.md | 13 - .../04-standard-library/01-cloud/function.md | 26 - .../04-standard-library/01-cloud/on-deploy.md | 26 - .../04-standard-library/01-cloud/queue.md | 26 - .../04-standard-library/01-cloud/schedule.md | 26 - .../04-standard-library/01-cloud/secret.md | 13 - .../04-standard-library/01-cloud/service.md | 26 - .../04-standard-library/01-cloud/topic.md | 26 - .../04-standard-library/01-cloud/website.md | 13 - .../02-std/api-reference.md | 541 ++++++++++++++++++ .../04-util/api-reference.md | 13 - .../06-ex/api-reference.md | 26 - examples/tests/valid/construct-base.w | 2 +- libs/wingc/src/closure_transform.rs | 47 +- libs/wingc/src/jsify.rs | 100 ++-- ...methods_and_properties_on_collections.snap | 16 +- .../access_property_on_primitive.snap | 16 +- ...rty_on_value_returned_from_collection.snap | 16 +- .../base_class_captures_inflight.snap | 28 +- .../base_class_captures_preflight.snap | 28 +- .../snapshots/base_class_lift_indirect.snap | 28 +- .../base_class_with_fields_inflight.snap | 28 +- .../base_class_with_fields_preflight.snap | 28 +- .../base_class_with_lifted_field_object.snap | 28 +- .../base_class_with_lifted_fields.snap | 28 +- libs/wingc/src/jsify/snapshots/builtins.snap | 16 +- ..._static_inflight_from_static_inflight.snap | 28 +- .../calls_methods_on_preflight_object.snap | 16 +- ...pture_from_inside_an_inflight_closure.snap | 16 +- ...entifier_closure_from_preflight_scope.snap | 32 +- ...pture_identifier_from_preflight_scope.snap | 16 +- ...from_preflight_scope_with_method_call.snap | 30 +- ...om_preflight_scope_with_nested_object.snap | 30 +- ...er_from_preflight_scope_with_property.snap | 16 +- .../snapshots/capture_in_keyword_args.snap | 16 +- .../capture_object_with_this_in_name.snap | 16 +- .../src/jsify/snapshots/capture_token.snap | 16 +- ...type_inflight_class_sibling_from_init.snap | 16 +- ...pe_inflight_class_sibling_from_method.snap | 16 +- ...e_new_inflight_class_inner_no_capture.snap | 16 +- ...capture_type_new_inflight_class_outer.snap | 30 +- .../snapshots/capture_type_static_method.snap | 30 +- ...ure_type_static_method_inflight_class.snap | 30 +- .../capture_var_from_method_inflight.snap | 16 +- ...ht_class_extends_outer_inflight_class.snap | 30 +- .../src/jsify/snapshots/closure_field.snap | 46 +- .../wingc/src/jsify/snapshots/enum_value.snap | 16 +- .../free_inflight_obj_from_inflight.snap | 16 +- .../free_preflight_object_from_preflight.snap | 14 +- .../jsify/snapshots/func_returns_func.snap | 16 +- .../src/jsify/snapshots/identify_field.snap | 14 +- .../implicit_lift_inflight_init.snap | 14 +- .../src/jsify/snapshots/indirect_capture.snap | 30 +- ..._extends_both_inside_inflight_closure.snap | 16 +- ...inflight_class_extends_inflight_class.snap | 28 +- .../jsify/snapshots/inflight_constructor.snap | 14 +- .../src/jsify/snapshots/inflight_field.snap | 14 +- .../inflight_field_from_inflight.snap | 14 +- .../inflight_field_from_inflight_class.snap | 14 +- .../snapshots/inline_inflight_class.snap | 30 +- .../src/jsify/snapshots/json_object.snap | 16 +- ...ary_preflight_and_inflight_expression.snap | 16 +- .../lift_binary_preflight_expression.snap | 16 +- ...lift_element_from_collection_as_field.snap | 14 +- ...ft_element_from_collection_of_objects.snap | 16 +- .../snapshots/lift_inflight_closure.snap | 32 +- .../lift_inside_preflight_method.snap | 30 +- .../src/jsify/snapshots/lift_string.snap | 16 +- libs/wingc/src/jsify/snapshots/lift_this.snap | 30 +- .../jsify/snapshots/lift_var_with_this.snap | 30 +- .../src/jsify/snapshots/lift_via_closure.snap | 32 +- .../lift_via_closure_class_explicit.snap | 30 +- .../namespaced_static_from_inflight.snap | 16 +- ...ed_inflight_after_preflight_operation.snap | 30 +- .../snapshots/nested_preflight_operation.snap | 44 +- .../jsify/snapshots/new_inflight_object.snap | 30 +- .../snapshots/no_capture_inside_methods.snap | 16 +- ...apture_of_identifier_from_inner_scope.snap | 16 +- ...capture_of_identifier_from_same_scope.snap | 16 +- ...no_capture_shadow_inside_inner_scopes.snap | 16 +- .../no_lift_shadow_inside_inner_scopes.snap | 16 +- ...eflight_class_extends_preflight_class.snap | 28 +- .../jsify/snapshots/preflight_collection.snap | 16 +- ...light_collection_of_preflight_objects.snap | 16 +- ...eflight_nested_object_with_operations.snap | 30 +- .../src/jsify/snapshots/preflight_object.snap | 30 +- .../preflight_object_through_property.snap | 30 +- .../preflight_object_with_operations.snap | 16 +- ...ject_with_operations_multiple_methods.snap | 14 +- .../snapshots/preflight_value_field.snap | 30 +- .../jsify/snapshots/read_primitive_value.snap | 16 +- .../snapshots/reassign_captured_variable.snap | 16 +- .../src/jsify/snapshots/ref_std_macro.snap | 16 +- .../reference_from_static_inflight.snap | 14 +- .../snapshots/reference_inflight_class.snap | 30 +- .../snapshots/reference_inflight_field.snap | 14 +- .../reference_inflight_from_inflight.snap | 30 +- .../snapshots/reference_preflight_field.snap | 14 +- ...eflight_field_call_independent_method.snap | 14 +- .../snapshots/reference_preflight_fields.snap | 14 +- ..._variable_with_this_in_the_expression.snap | 14 +- ...preflight_object_from_static_inflight.snap | 14 +- .../snapshots/reference_static_inflight.snap | 30 +- ...ght_which_references_preflight_object.snap | 30 +- .../static_external_inflight_class.snap | 30 +- .../static_external_preflight_class.snap | 30 +- .../snapshots/static_inflight_operation.snap | 30 +- .../static_local_inflight_class.snap | 16 +- .../jsify/snapshots/static_on_std_type.snap | 16 +- .../jsify/snapshots/transitive_reference.snap | 30 +- ...ansitive_reference_via_inflight_class.snap | 30 +- .../transitive_reference_via_static.snap | 44 +- .../jsify/snapshots/two_identical_lifts.snap | 16 +- .../unqualified_lift_of_collection.snap | 16 +- .../jsify/snapshots/use_util_functions.snap | 16 +- .../var_inflight_field_from_inflight.snap | 14 +- libs/wingc/src/jsify/snapshots/wait_util.snap | 16 +- .../completions/capture_in_test.snap | 7 - libs/wingsdk/.projen/deps.json | 6 +- libs/wingsdk/.projenrc.ts | 2 +- libs/wingsdk/package.json | 6 +- libs/wingsdk/src/cloud/api.ts | 12 +- libs/wingsdk/src/cloud/bucket.ts | 46 +- libs/wingsdk/src/cloud/counter.ts | 19 +- libs/wingsdk/src/cloud/function.ts | 18 +- libs/wingsdk/src/cloud/on-deploy.ts | 11 +- libs/wingsdk/src/cloud/queue.ts | 19 +- libs/wingsdk/src/cloud/schedule.ts | 11 +- libs/wingsdk/src/cloud/secret.ts | 16 +- libs/wingsdk/src/cloud/service.ts | 16 +- libs/wingsdk/src/cloud/topic.ts | 13 +- libs/wingsdk/src/cloud/website.ts | 11 +- libs/wingsdk/src/core/inflight.ts | 99 +--- libs/wingsdk/src/core/internal.ts | 4 +- libs/wingsdk/src/core/tree.ts | 10 +- libs/wingsdk/src/ex/redis.ts | 15 +- libs/wingsdk/src/ex/table.ts | 15 +- libs/wingsdk/src/http/http.ts | 4 +- libs/wingsdk/src/math/math.ts | 4 +- libs/wingsdk/src/shared/convert.ts | 24 +- libs/wingsdk/src/std/array.ts | 6 +- libs/wingsdk/src/std/bool.ts | 4 +- libs/wingsdk/src/std/datetime.ts | 4 +- libs/wingsdk/src/std/duration.ts | 4 +- libs/wingsdk/src/std/index.ts | 1 + libs/wingsdk/src/std/json.ts | 6 +- libs/wingsdk/src/std/map.ts | 6 +- libs/wingsdk/src/std/node.ts | 349 +++++++++++ libs/wingsdk/src/std/number.ts | 4 +- libs/wingsdk/src/std/range.ts | 4 +- libs/wingsdk/src/std/resource.ts | 125 +--- libs/wingsdk/src/std/set.ts | 6 +- libs/wingsdk/src/std/string.ts | 4 +- libs/wingsdk/src/std/struct.ts | 4 +- libs/wingsdk/src/std/test-runner.ts | 17 +- libs/wingsdk/src/std/test.ts | 15 +- libs/wingsdk/src/target-awscdk/app.ts | 2 +- libs/wingsdk/src/target-awscdk/bucket.ts | 17 +- libs/wingsdk/src/target-awscdk/counter.ts | 2 +- libs/wingsdk/src/target-awscdk/function.ts | 2 +- libs/wingsdk/src/target-awscdk/on-deploy.ts | 2 +- libs/wingsdk/src/target-awscdk/queue.ts | 7 +- libs/wingsdk/src/target-awscdk/schedule.ts | 6 +- libs/wingsdk/src/target-awscdk/secret.ts | 2 +- libs/wingsdk/src/target-awscdk/test-runner.ts | 2 +- libs/wingsdk/src/target-awscdk/topic.ts | 7 +- libs/wingsdk/src/target-sim/api.ts | 12 +- libs/wingsdk/src/target-sim/app.ts | 3 +- libs/wingsdk/src/target-sim/bucket.ts | 3 +- libs/wingsdk/src/target-sim/counter.ts | 3 +- libs/wingsdk/src/target-sim/event-mapping.ts | 12 +- libs/wingsdk/src/target-sim/function.ts | 3 +- libs/wingsdk/src/target-sim/on-deploy.ts | 7 +- libs/wingsdk/src/target-sim/queue.ts | 12 +- libs/wingsdk/src/target-sim/redis.ts | 3 +- libs/wingsdk/src/target-sim/schedule.ts | 11 +- libs/wingsdk/src/target-sim/secret.ts | 3 +- libs/wingsdk/src/target-sim/service.ts | 14 +- libs/wingsdk/src/target-sim/table.ts | 3 +- libs/wingsdk/src/target-sim/test-runner.ts | 3 +- libs/wingsdk/src/target-sim/topic.ts | 12 +- libs/wingsdk/src/target-sim/util.ts | 17 +- libs/wingsdk/src/target-sim/website.ts | 3 +- libs/wingsdk/src/target-tf-aws/api.ts | 22 +- libs/wingsdk/src/target-tf-aws/bucket.ts | 2 +- libs/wingsdk/src/target-tf-aws/counter.ts | 2 +- libs/wingsdk/src/target-tf-aws/function.ts | 2 +- libs/wingsdk/src/target-tf-aws/on-deploy.ts | 2 +- libs/wingsdk/src/target-tf-aws/queue.ts | 7 +- libs/wingsdk/src/target-tf-aws/redis.ts | 3 +- libs/wingsdk/src/target-tf-aws/schedule.ts | 6 +- libs/wingsdk/src/target-tf-aws/secret.ts | 2 +- libs/wingsdk/src/target-tf-aws/table.ts | 2 +- libs/wingsdk/src/target-tf-aws/test-runner.ts | 2 +- libs/wingsdk/src/target-tf-aws/topic.ts | 7 +- libs/wingsdk/src/target-tf-aws/website.ts | 2 +- libs/wingsdk/src/target-tf-azure/bucket.ts | 2 +- libs/wingsdk/src/target-tf-azure/function.ts | 3 +- libs/wingsdk/src/target-tf-gcp/bucket.ts | 3 +- libs/wingsdk/src/testing/simulator.ts | 4 +- libs/wingsdk/src/testing/testing.ts | 22 +- libs/wingsdk/src/util/util.ts | 4 +- .../__snapshots__/connections.test.ts.snap | 10 +- .../test/core/to-inflight-type.test.ts | 5 +- .../target-sim/__snapshots__/api.test.ts.snap | 176 +++--- .../__snapshots__/bucket.test.ts.snap | 30 +- .../__snapshots__/counter.test.ts.snap | 42 +- .../__snapshots__/file-counter.test.ts.snap | 45 +- .../__snapshots__/function.test.ts.snap | 60 +- .../immutable-capture.test.ts.snap | 262 ++++----- .../__snapshots__/on-deploy.test.ts.snap | 11 +- .../__snapshots__/queue.test.ts.snap | 106 ++-- .../__snapshots__/redis.test.ts.snap | 6 +- .../__snapshots__/schedule.test.ts.snap | 51 +- .../__snapshots__/secret.test.ts.snap | 6 +- .../__snapshots__/service.test.ts.snap | 13 +- .../__snapshots__/table.test.ts.snap | 36 +- .../__snapshots__/test.test.ts.snap | 10 +- .../__snapshots__/topic.test.ts.snap | 6 +- libs/wingsdk/test/target-sim/bucket.test.ts | 7 +- libs/wingsdk/test/target-sim/counter.test.ts | 7 +- libs/wingsdk/test/target-sim/function.test.ts | 9 +- libs/wingsdk/test/target-sim/inflight.test.ts | 12 +- libs/wingsdk/test/target-sim/queue.test.ts | 8 +- libs/wingsdk/test/target-sim/topic.test.ts | 7 +- .../__snapshots__/bucket.test.ts.snap | 116 ++-- .../__snapshots__/counter.test.ts.snap | 68 +-- .../__snapshots__/function.test.ts.snap | 48 +- .../__snapshots__/on-deploy.test.ts.snap | 34 +- .../__snapshots__/queue.test.ts.snap | 42 +- .../__snapshots__/schedule.test.ts.snap | 42 +- .../__snapshots__/secret.test.ts.snap | 6 +- .../__snapshots__/table.test.ts.snap | 10 +- .../__snapshots__/topic.test.ts.snap | 30 +- .../__snapshots__/website.test.ts.snap | 12 +- .../__snapshots__/bucket.test.ts.snap | 26 +- .../__snapshots__/function.test.ts.snap | 24 +- .../__snapshots__/bucket.test.ts.snap | 22 +- .../__snapshots__/simulator.test.ts.snap | 10 +- libs/wingsdk/test/testing/reload.test.ts | 5 +- libs/wingsdk/test/util.ts | 10 +- pnpm-lock.yaml | 71 +-- tools/hangar/__snapshots__/error.ts.snap | 10 +- .../sdk_tests/api/delete.w_compile_tf-aws.md | 32 +- .../sdk_tests/api/get.w_compile_tf-aws.md | 32 +- .../sdk_tests/api/options.w_compile_tf-aws.md | 64 ++- .../sdk_tests/api/patch.w_compile_tf-aws.md | 32 +- .../sdk_tests/api/post.w_compile_tf-aws.md | 32 +- .../sdk_tests/api/put.w_compile_tf-aws.md | 32 +- .../bucket/add_file.w_compile_tf-aws.md | 16 +- .../bucket/add_object.w_compile_tf-aws.md | 16 +- .../bucket/bucket_list.w_compile_tf-aws.md | 16 +- .../bucket/delete.w_compile_tf-aws.md | 16 +- .../bucket/events.w_compile_tf-aws.md | 134 +++-- .../bucket/exists.w_compile_tf-aws.md | 16 +- .../bucket/public_url.w_compile_tf-aws.md | 16 +- .../sdk_tests/bucket/put.w_compile_tf-aws.md | 16 +- .../bucket/put_json.w_compile_tf-aws.md | 16 +- .../bucket/try_delete.w_compile_tf-aws.md | 16 +- .../bucket/try_get.w_compile_tf-aws.md | 16 +- .../bucket/try_get_json.w_compile_tf-aws.md | 16 +- .../sdk_tests/counter/dec.w_compile_tf-aws.md | 32 +- .../sdk_tests/counter/inc.w_compile_tf-aws.md | 32 +- .../counter/initial.w_compile_tf-aws.md | 48 +- .../counter/peek.w_compile_tf-aws.md | 32 +- .../sdk_tests/counter/set.w_compile_tf-aws.md | 32 +- .../function/invoke.w_compile_tf-aws.md | 32 +- .../function/logging.w_compile_tf-aws.md | 62 +- .../memory_and_env.w_compile_tf-aws.md | 48 +- .../sdk_tests/math/abs.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/acos.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/acot.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/acsc.w_compile_tf-aws.md | 16 +- .../angular_conversion.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/asec.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/asin.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/atan.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/atan2.w_compile_tf-aws.md | 16 +- .../math/combinations.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/cos.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/cot.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/csc.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/euler.w_compile_tf-aws.md | 32 +- .../math/factorial.w_compile_tf-aws.md | 16 +- .../math/fibonacci.w_compile_tf-aws.md | 16 +- .../math/floor_ceil_round.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/hypot.w_compile_tf-aws.md | 16 +- .../math/median_mode_mean.w_compile_tf-aws.md | 48 +- .../math/min_max.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/pi.w_compile_tf-aws.md | 32 +- .../sdk_tests/math/prime.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/random.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/sec.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/sin.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/sqrt.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/tan.w_compile_tf-aws.md | 16 +- .../sdk_tests/math/tau.w_compile_tf-aws.md | 16 +- .../execute_after.w_compile_tf-aws.md | 48 +- .../sdk_tests/queue/pop.w_compile_tf-aws.md | 16 +- .../sdk_tests/queue/purge.w_compile_tf-aws.md | 16 +- .../queue/set_consumer.w_compile_tf-aws.md | 46 +- .../schedule/on_tick.w_compile_tf-aws.md | 48 +- .../sdk_tests/std/array.w_compile_tf-aws.md | 240 ++++---- .../sdk_tests/std/bool.w_compile_tf-aws.md | 16 +- .../std/datetime.w_compile_tf-aws.md | 16 +- .../std/duration.w_compile_tf-aws.md | 16 +- .../sdk_tests/std/json.w_compile_tf-aws.md | 48 +- .../sdk_tests/std/number.w_compile_tf-aws.md | 32 +- .../sdk_tests/std/string.w_compile_tf-aws.md | 224 ++++---- .../table/add_row.w_compile_tf-aws.md | 16 +- .../sdk_tests/table/list.w_compile_tf-aws.md | 16 +- .../topic/on_message.w_compile_tf-aws.md | 62 +- .../sdk_tests/util/base64.w_compile_tf-aws.md | 16 +- .../sdk_tests/util/env.w_compile_tf-aws.md | 16 +- .../sdk_tests/util/nanoid.w_compile_tf-aws.md | 16 +- .../sdk_tests/util/sha256.w_compile_tf-aws.md | 16 +- .../sdk_tests/util/sleep.w_compile_tf-aws.md | 30 +- .../sdk_tests/util/uuidv4.w_compile_tf-aws.md | 44 +- .../util/wait-until.w_compile_tf-aws.md | 94 +-- .../website/two_websites.w_compile_tf-aws.md | 16 +- .../website/website.w_compile_tf-aws.md | 30 +- .../test_corpus/valid/api.w_compile_tf-aws.md | 62 +- .../valid/api_path_vars.w_compile_tf-aws.md | 32 +- .../valid/api_valid_path.w_compile_tf-aws.md | 16 +- .../valid/assert.w_compile_tf-aws.md | 16 +- ...cit_await_in_functions.w_compile_tf-aws.md | 32 +- .../test_corpus/valid/baz.w_compile_tf-aws.md | 14 +- .../valid/bring_awscdk.w_compile_tf-aws.md | 14 +- .../valid/bring_cdktf.w_compile_tf-aws.md | 14 +- .../valid/bring_jsii.w_compile_tf-aws.md | 16 +- .../valid/bring_jsii_path.w_compile_tf-aws.md | 16 +- .../valid/bring_local.w_compile_tf-aws.md | 108 ++-- ...ng_local_normalization.w_compile_tf-aws.md | 42 +- .../valid/bucket_events.w_compile_tf-aws.md | 96 ++-- .../valid/bucket_keys.w_compile_tf-aws.md | 16 +- .../call_static_of_myself.w_compile_tf-aws.md | 44 +- ...ling_inflight_variants.w_compile_tf-aws.md | 46 +- .../capture_containers.w_compile_tf-aws.md | 16 +- .../capture_in_binary.w_compile_tf-aws.md | 16 +- .../capture_mutables.w_compile_tf-aws.md | 32 +- .../capture_primitives.w_compile_tf-aws.md | 16 +- ...eassigable_class_field.w_compile_tf-aws.md | 62 +- .../capture_reassignable.w_compile_tf-aws.md | 32 +- ...ture_resource_and_data.w_compile_tf-aws.md | 16 +- ...ource_with_no_inflight.w_compile_tf-aws.md | 30 +- .../valid/capture_tokens.w_compile_tf-aws.md | 46 +- .../valid/captures.w_compile_tf-aws.md | 32 +- .../valid/class.w_compile_tf-aws.md | 288 ++++++---- .../valid/closure_class.w_compile_tf-aws.md | 30 +- .../valid/construct-base.w_compile_tf-aws.md | 16 +- .../valid/custom_obj_id.w_compile_tf-aws.md | 14 +- .../valid/debug_env.w_compile_tf-aws.md | 14 +- .../valid/deep_equality.w_compile_tf-aws.md | 198 ++++--- .../double_reference.w_compile_tf-aws.md | 44 +- .../valid/doubler.w_compile_tf-aws.md | 92 +-- .../valid/enums.w_compile_tf-aws.md | 16 +- .../extern_implementation.w_compile_tf-aws.md | 46 +- .../valid/file_counter.w_compile_tf-aws.md | 16 +- .../valid/for_loop.w_compile_tf-aws.md | 30 +- .../valid/forward_decl.w_compile_tf-aws.md | 14 +- ...ction_returns_function.w_compile_tf-aws.md | 16 +- .../valid/function_type.w_compile_tf-aws.md | 46 +- .../valid/hello.w_compile_tf-aws.md | 16 +- .../identical_inflights.w_compile_tf-aws.md | 32 +- .../valid/impl_interface.w_compile_tf-aws.md | 72 ++- .../valid/inference.w_compile_tf-aws.md | 16 +- .../inflight-subscribers.w_compile_tf-aws.md | 32 +- ...nflight_capture_static.w_compile_tf-aws.md | 92 +-- ...lass_as_struct_members.w_compile_tf-aws.md | 52 +- ...ht_class_capture_const.w_compile_tf-aws.md | 30 +- ...ight_class_definitions.w_compile_tf-aws.md | 118 ++-- ..._inner_capture_mutable.w_compile_tf-aws.md | 16 +- ...nside_inflight_closure.w_compile_tf-aws.md | 62 +- ...flight_class_modifiers.w_compile_tf-aws.md | 14 +- ...tside_inflight_closure.w_compile_tf-aws.md | 30 +- ...tural_interace_handler.w_compile_tf-aws.md | 30 +- ...ght_class_without_init.w_compile_tf-aws.md | 30 +- .../valid/inflight_concat.w_compile_tf-aws.md | 14 +- ...ghts_calling_inflights.w_compile_tf-aws.md | 94 +-- .../valid/issue_2889.w_compile_tf-aws.md | 32 +- .../valid/json.w_compile_tf-aws.md | 50 +- .../valid/json_bucket.w_compile_tf-aws.md | 32 +- .../valid/json_static.w_compile_tf-aws.md | 32 +- .../lift_expr_with_this.w_compile_tf-aws.md | 30 +- .../lift_redefinition.w_compile_tf-aws.md | 16 +- .../valid/lift_this.w_compile_tf-aws.md | 30 +- .../lift_via_closure.w_compile_tf-aws.md | 62 +- ...t_via_closure_explicit.w_compile_tf-aws.md | 30 +- .../test_corpus/valid/nil.w_compile_tf-aws.md | 46 +- .../valid/optionals.w_compile_tf-aws.md | 84 +-- .../valid/print.w_compile_tf-aws.md | 32 +- .../valid/reassignment.w_compile_tf-aws.md | 14 +- .../valid/redis.w_compile_tf-aws.md | 32 +- .../valid/resource.w_compile_tf-aws.md | 150 ++--- ...ce_as_inflight_literal.w_compile_tf-aws.md | 30 +- .../resource_call_static.w_compile_tf-aws.md | 30 +- .../resource_captures.w_compile_tf-aws.md | 58 +- ...ource_captures_globals.w_compile_tf-aws.md | 88 +-- .../valid/shadowing.w_compile_tf-aws.md | 32 +- .../valid/statements_if.w_compile_tf-aws.md | 16 +- .../valid/static_members.w_compile_tf-aws.md | 30 +- .../valid/std_containers.w_compile_tf-aws.md | 42 +- .../valid/std_string.w_compile_tf-aws.md | 16 +- .../valid/store.w_compile_tf-aws.md | 50 +- .../struct_from_json.w_compile_tf-aws.md | 98 ++-- .../valid/structs.w_compile_tf-aws.md | 66 ++- .../valid/super_call.w_compile_tf-aws.md | 158 ++--- .../valid/symbol_shadow.w_compile_tf-aws.md | 78 +-- .../valid/test_bucket.w_compile_tf-aws.md | 32 +- .../test_without_bring.w_compile_tf-aws.md | 16 +- ...od_inside_init_closure.w_compile_tf-aws.md | 30 +- .../website_with_api.w_compile_tf-aws.md | 48 +- .../while_loop_await.w_compile_tf-aws.md | 16 +- 415 files changed, 7066 insertions(+), 5490 deletions(-) create mode 100644 libs/wingsdk/src/std/node.ts diff --git a/docs/docs/04-standard-library/01-cloud/api.md b/docs/docs/04-standard-library/01-cloud/api.md index 0a203867f91..1df2c8d9fa0 100644 --- a/docs/docs/04-standard-library/01-cloud/api.md +++ b/docs/docs/04-standard-library/01-cloud/api.md @@ -422,7 +422,6 @@ Options for the route. | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | | url | str | The base URL of the API endpoint. | --- @@ -439,18 +438,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ##### `url`Required ```wing @@ -757,7 +744,6 @@ A resource with an inflight "handle" method that can be passed to one of the `Ap | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -773,18 +759,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ### IApiEndpointHandlerClient - *Implemented By:* IApiEndpointHandlerClient diff --git a/docs/docs/04-standard-library/01-cloud/bucket.md b/docs/docs/04-standard-library/01-cloud/bucket.md index 1d73d388ac5..fe78827918f 100644 --- a/docs/docs/04-standard-library/01-cloud/bucket.md +++ b/docs/docs/04-standard-library/01-cloud/bucket.md @@ -516,7 +516,6 @@ Key of the object. | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -532,18 +531,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ## Structs @@ -729,7 +716,6 @@ A resource with an inflight "handle" method that can be passed to the bucket eve | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -745,18 +731,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ### IBucketEventHandlerClient - *Implemented By:* IBucketEventHandlerClient diff --git a/docs/docs/04-standard-library/01-cloud/counter.md b/docs/docs/04-standard-library/01-cloud/counter.md index e212d494e1d..1c865fd92fe 100644 --- a/docs/docs/04-standard-library/01-cloud/counter.md +++ b/docs/docs/04-standard-library/01-cloud/counter.md @@ -208,7 +208,6 @@ specify the key to be set. | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | | initial | num | The initial value of the counter. | --- @@ -225,18 +224,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ##### `initial`Required ```wing diff --git a/docs/docs/04-standard-library/01-cloud/function.md b/docs/docs/04-standard-library/01-cloud/function.md index 5427e9f6442..98f2315a6b2 100644 --- a/docs/docs/04-standard-library/01-cloud/function.md +++ b/docs/docs/04-standard-library/01-cloud/function.md @@ -151,7 +151,6 @@ Invoke the function asynchronously with a given payload. | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | | env | MutMap<str> | Returns the set of environment variables for this function. | --- @@ -168,18 +167,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ##### `env`Required ```wing @@ -275,7 +262,6 @@ A resource with an inflight "handle" method that can be used to create a `cloud. | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -291,18 +277,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ### IFunctionHandlerClient - *Implemented By:* IFunctionHandlerClient diff --git a/docs/docs/04-standard-library/01-cloud/on-deploy.md b/docs/docs/04-standard-library/01-cloud/on-deploy.md index 67dd6edfdd7..4cbc2c42173 100644 --- a/docs/docs/04-standard-library/01-cloud/on-deploy.md +++ b/docs/docs/04-standard-library/01-cloud/on-deploy.md @@ -105,7 +105,6 @@ new cloud.OnDeploy(handler: IOnDeployHandler, props?: OnDeployProps); | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -121,18 +120,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ## Structs @@ -244,7 +231,6 @@ A resource with an inflight "handle" method that can be used by `cloud.OnDeploy` | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -260,18 +246,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ### IOnDeployHandlerClient - *Implemented By:* IOnDeployHandlerClient diff --git a/docs/docs/04-standard-library/01-cloud/queue.md b/docs/docs/04-standard-library/01-cloud/queue.md index a4f0fe8fc9e..487b88c507a 100644 --- a/docs/docs/04-standard-library/01-cloud/queue.md +++ b/docs/docs/04-standard-library/01-cloud/queue.md @@ -189,7 +189,6 @@ Payload to send to the queue. | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -205,18 +204,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ## Structs @@ -361,7 +348,6 @@ A resource with an inflight "handle" method that can be passed to `Queue.setCons | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -377,18 +363,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ### IQueueSetConsumerHandlerClient - *Implemented By:* IQueueSetConsumerHandlerClient diff --git a/docs/docs/04-standard-library/01-cloud/schedule.md b/docs/docs/04-standard-library/01-cloud/schedule.md index 5dfd545f1e6..d4797df3977 100644 --- a/docs/docs/04-standard-library/01-cloud/schedule.md +++ b/docs/docs/04-standard-library/01-cloud/schedule.md @@ -122,7 +122,6 @@ Create a function that runs when receiving the scheduled event. | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -138,18 +137,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ## Structs @@ -297,7 +284,6 @@ A resource with an inflight "handle" method that can be passed to `Schedule.on_t | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -313,18 +299,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ### IScheduleOnTickHandlerClient - *Implemented By:* IScheduleOnTickHandlerClient diff --git a/docs/docs/04-standard-library/01-cloud/secret.md b/docs/docs/04-standard-library/01-cloud/secret.md index d1a6868a7f0..eef5ee1d42e 100644 --- a/docs/docs/04-standard-library/01-cloud/secret.md +++ b/docs/docs/04-standard-library/01-cloud/secret.md @@ -154,7 +154,6 @@ Retrieve the Json value of the secret. | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -170,18 +169,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ## Structs diff --git a/docs/docs/04-standard-library/01-cloud/service.md b/docs/docs/04-standard-library/01-cloud/service.md index bdd48208648..9ff388450dc 100644 --- a/docs/docs/04-standard-library/01-cloud/service.md +++ b/docs/docs/04-standard-library/01-cloud/service.md @@ -175,7 +175,6 @@ Stop the service. | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -191,18 +190,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ## Structs @@ -369,7 +356,6 @@ A resource with an inflight "handle" method that can be passed to `ServiceProps. | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -385,15 +371,3 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - diff --git a/docs/docs/04-standard-library/01-cloud/topic.md b/docs/docs/04-standard-library/01-cloud/topic.md index caf69090f8a..832f78e0427 100644 --- a/docs/docs/04-standard-library/01-cloud/topic.md +++ b/docs/docs/04-standard-library/01-cloud/topic.md @@ -186,7 +186,6 @@ Payload to publish to Topic. | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -202,18 +201,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ## Structs @@ -310,7 +297,6 @@ A resource with an inflight "handle" method that can be passed to `Topic.on_mess | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -326,18 +312,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ### ITopicOnMessageHandlerClient - *Implemented By:* ITopicOnMessageHandlerClient diff --git a/docs/docs/04-standard-library/01-cloud/website.md b/docs/docs/04-standard-library/01-cloud/website.md index 030b02f571e..5eb546c15cd 100644 --- a/docs/docs/04-standard-library/01-cloud/website.md +++ b/docs/docs/04-standard-library/01-cloud/website.md @@ -128,7 +128,6 @@ the data to write to the file. | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | | path | str | Absolute local path to the website's static files. | | url | str | The website's url. | @@ -146,18 +145,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ##### `path`Required ```wing diff --git a/docs/docs/04-standard-library/02-std/api-reference.md b/docs/docs/04-standard-library/02-std/api-reference.md index 04f1df5ee88..e1ce2b51dc8 100644 --- a/docs/docs/04-standard-library/02-std/api-reference.md +++ b/docs/docs/04-standard-library/02-std/api-reference.md @@ -1740,6 +1740,491 @@ The length of the set. --- +### Node + +The internal node of a construct. + +#### Methods + +| **Name** | **Description** | +| --- | --- | +| addConnection | Adds a connection between two constructs. | +| addDependency | Add an ordering dependency on another construct. | +| addMetadata | Adds a metadata entry to this construct. | +| addValidation | Adds a validation to this construct. | +| findAll | Return this construct and all of its children in the given order. | +| findChild | Return a direct child by id. | +| getContext | Retrieves a value from tree context if present. Otherwise, would throw an error. | +| lock | Locks this construct from allowing more children to be added. | +| setContext | This can be used to set contextual values. | +| tryFindChild | Return a direct child by id, or undefined. | +| tryGetContext | Retrieves a value from tree context. | +| tryRemoveChild | Remove the child with the given name, if present. | +| validate | Validates this construct. | + +--- + +##### `addConnection` + +```wing +addConnection(props: AddConnectionProps): void +``` + +Adds a connection between two constructs. + +A connection is a piece of +metadata describing how one construct is related to another construct. + +###### `props`Required + +- *Type:* AddConnectionProps + +--- + +##### `addDependency` + +```wing +addDependency(deps: IDependable): void +``` + +Add an ordering dependency on another construct. + +An `IDependable` + +###### `deps`Required + +- *Type:* constructs.IDependable + +--- + +##### `addMetadata` + +```wing +addMetadata(type: str, data: any, options?: MetadataOptions): void +``` + +Adds a metadata entry to this construct. + +Entries are arbitrary values and will also include a stack trace to allow tracing back to +the code location for when the entry was added. It can be used, for example, to include source +mapping in CloudFormation templates to improve diagnostics. + +###### `type`Required + +- *Type:* str + +a string denoting the type of metadata. + +--- + +###### `data`Required + +- *Type:* any + +the value of the metadata (can be a Token). + +If null/undefined, metadata will not be added. + +--- + +###### `options`Optional + +- *Type:* constructs.MetadataOptions + +options. + +--- + +##### `addValidation` + +```wing +addValidation(validation: IValidation): void +``` + +Adds a validation to this construct. + +When `node.validate()` is called, the `validate()` method will be called on +all validations and all errors will be returned. + +###### `validation`Required + +- *Type:* constructs.IValidation + +The validation object. + +--- + +##### `findAll` + +```wing +findAll(order?: ConstructOrder): MutArray +``` + +Return this construct and all of its children in the given order. + +###### `order`Optional + +- *Type:* constructs.ConstructOrder + +--- + +##### `findChild` + +```wing +findChild(): IConstruct +``` + +Return a direct child by id. + +Throws an error if the child is not found. + +##### `getContext` + +```wing +getContext(key: str): any +``` + +Retrieves a value from tree context if present. Otherwise, would throw an error. + +Context is usually initialized at the root, but can be overridden at any point in the tree. + +###### `key`Required + +- *Type:* str + +The context key. + +--- + +##### `lock` + +```wing +lock(): void +``` + +Locks this construct from allowing more children to be added. + +After this +call, no more children can be added to this construct or to any children. + +##### `setContext` + +```wing +setContext(key: str, value: any): void +``` + +This can be used to set contextual values. + +Context must be set before any children are added, since children may consult context info during construction. +If the key already exists, it will be overridden. + +###### `key`Required + +- *Type:* str + +The context key. + +--- + +###### `value`Required + +- *Type:* any + +The context value. + +--- + +##### `tryFindChild` + +```wing +tryFindChild(): IConstruct +``` + +Return a direct child by id, or undefined. + +##### `tryGetContext` + +```wing +tryGetContext(key: str): any +``` + +Retrieves a value from tree context. + +Context is usually initialized at the root, but can be overridden at any point in the tree. + +###### `key`Required + +- *Type:* str + +The context key. + +--- + +##### `tryRemoveChild` + +```wing +tryRemoveChild(childName: str): bool +``` + +Remove the child with the given name, if present. + +###### `childName`Required + +- *Type:* str + +--- + +##### `validate` + +```wing +validate(): MutArray +``` + +Validates this construct. + +Invokes the `validate()` method on all validations added through +`addValidation()`. + + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| addr | str | Returns an opaque tree-unique address for this construct. | +| children | MutArray<constructs.IConstruct> | All direct children of this construct. | +| dependencies | MutArray<constructs.IConstruct> | Return all dependencies registered on this node (non-recursive). | +| id | str | The id of this construct within the current scope. | +| locked | bool | Returns true if this construct or the scopes in which it is defined are locked. | +| metadata | MutArray<constructs.MetadataEntry> | An immutable array of metadata objects associated with this construct. | +| path | str | The full, absolute path of this construct in the tree. | +| root | constructs.IConstruct | Returns the root of the construct tree. | +| scopes | MutArray<constructs.IConstruct> | All parent scopes of this construct. | +| scope | constructs.IConstruct | Returns the scope in which this construct is defined. | +| defaultChild | constructs.IConstruct | Returns the child construct that has the id `Default` or `Resource"`. | +| description | str | Description of the construct for display purposes. | +| hidden | bool | Whether the construct should be hidden by default in tree visualizations. | +| sourceModule | str | The source file or library where the construct was defined. | +| title | str | Title of the construct for display purposes. | + +--- + +##### `addr`Required + +```wing +addr: str; +``` + +- *Type:* str + +Returns an opaque tree-unique address for this construct. + +Addresses are 42 characters hexadecimal strings. They begin with "c8" +followed by 40 lowercase hexadecimal characters (0-9a-f). + +Addresses are calculated using a SHA-1 of the components of the construct +path. + +To enable refactorings of construct trees, constructs with the ID `Default` +will be excluded from the calculation. In those cases constructs in the +same tree may have the same addreess. + +--- + +*Example* + +```wing +c83a2846e506bcc5f10682b564084bca2d275709ee +``` + + +##### `children`Required + +```wing +children: MutArray; +``` + +- *Type:* MutArray<constructs.IConstruct> + +All direct children of this construct. + +--- + +##### `dependencies`Required + +```wing +dependencies: MutArray; +``` + +- *Type:* MutArray<constructs.IConstruct> + +Return all dependencies registered on this node (non-recursive). + +--- + +##### `id`Required + +```wing +id: str; +``` + +- *Type:* str + +The id of this construct within the current scope. + +This is a a scope-unique id. To obtain an app-unique id for this construct, use `addr`. + +--- + +##### `locked`Required + +```wing +locked: bool; +``` + +- *Type:* bool + +Returns true if this construct or the scopes in which it is defined are locked. + +--- + +##### `metadata`Required + +```wing +metadata: MutArray; +``` + +- *Type:* MutArray<constructs.MetadataEntry> + +An immutable array of metadata objects associated with this construct. + +This can be used, for example, to implement support for deprecation notices, source mapping, etc. + +--- + +##### `path`Required + +```wing +path: str; +``` + +- *Type:* str + +The full, absolute path of this construct in the tree. + +Components are separated by '/'. + +--- + +##### `root`Required + +```wing +root: IConstruct; +``` + +- *Type:* constructs.IConstruct + +Returns the root of the construct tree. + +--- + +##### `scopes`Required + +```wing +scopes: MutArray; +``` + +- *Type:* MutArray<constructs.IConstruct> + +All parent scopes of this construct. + +--- + +##### `scope`Optional + +```wing +scope: IConstruct; +``` + +- *Type:* constructs.IConstruct + +Returns the scope in which this construct is defined. + +The value is `undefined` at the root of the construct scope tree. + +--- + +##### `defaultChild`Optional + +```wing +defaultChild: IConstruct; +``` + +- *Type:* constructs.IConstruct + +Returns the child construct that has the id `Default` or `Resource"`. + +This is usually the construct that provides the bulk of the underlying functionality. +Useful for modifications of the underlying construct that are not available at the higher levels. +Override the defaultChild property. + +This should only be used in the cases where the correct +default child is not named 'Resource' or 'Default' as it +should be. + +If you set this to undefined, the default behavior of finding +the child named 'Resource' or 'Default' will be used. + +--- + +##### `description`Optional + +```wing +description: str; +``` + +- *Type:* str + +Description of the construct for display purposes. + +--- + +##### `hidden`Optional + +```wing +hidden: bool; +``` + +- *Type:* bool + +Whether the construct should be hidden by default in tree visualizations. + +--- + +##### `sourceModule`Optional + +```wing +sourceModule: str; +``` + +- *Type:* str + +The source file or library where the construct was defined. + +--- + +##### `title`Optional + +```wing +title: str; +``` + +- *Type:* str + +Title of the construct for display purposes. + +--- + + ### Number Number. @@ -2162,6 +2647,62 @@ Converts a Json to a Struct, returning nil if the Json is not valid. ## Structs +### AddConnectionProps + +Props for `Node.addConnection`. + +#### Initializer + +```wing +let AddConnectionProps = AddConnectionProps{ ... }; +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| name | str | A name for the connection. | +| source | constructs.IConstruct | The source of the connection. | +| target | constructs.IConstruct | The target of the connection. | + +--- + +##### `name`Required + +```wing +name: str; +``` + +- *Type:* str + +A name for the connection. + +--- + +##### `source`Required + +```wing +source: IConstruct; +``` + +- *Type:* constructs.IConstruct + +The source of the connection. + +--- + +##### `target`Required + +```wing +target: IConstruct; +``` + +- *Type:* constructs.IConstruct + +The target of the connection. + +--- + ### DatetimeComponents Interface that is used for setting Datetime date. diff --git a/docs/docs/04-standard-library/04-util/api-reference.md b/docs/docs/04-standard-library/04-util/api-reference.md index 045116849a0..8fdce93f81e 100644 --- a/docs/docs/04-standard-library/04-util/api-reference.md +++ b/docs/docs/04-standard-library/04-util/api-reference.md @@ -334,7 +334,6 @@ A predicate with an inflight "handle" method that can be passed to `util.busyWai | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -350,18 +349,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ### IPredicateHandlerClient - *Implemented By:* IPredicateHandlerClient diff --git a/docs/docs/04-standard-library/06-ex/api-reference.md b/docs/docs/04-standard-library/06-ex/api-reference.md index 673e74daf0f..e86fb8d4891 100644 --- a/docs/docs/04-standard-library/06-ex/api-reference.md +++ b/docs/docs/04-standard-library/06-ex/api-reference.md @@ -222,7 +222,6 @@ Get url of redis server. | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | --- @@ -238,18 +237,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ### Table @@ -409,7 +396,6 @@ data to be updated. | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| display | Display | Information on how to display a resource in the UI. | | columns | MutMap<ColumnType> | Table columns. | | name | str | Table name. | | primaryKey | str | Table primary key name. | @@ -428,18 +414,6 @@ The tree node. --- -##### `display`Required - -```wing -display: Display; -``` - -- *Type:* Display - -Information on how to display a resource in the UI. - ---- - ##### `columns`Required ```wing diff --git a/examples/tests/valid/construct-base.w b/examples/tests/valid/construct-base.w index 3fb55e3904b..9f2d3af6a1a 100644 --- a/examples/tests/valid/construct-base.w +++ b/examples/tests/valid/construct-base.w @@ -14,7 +14,7 @@ let getPath = (c: cx.Construct): str => { }; let getDisplayName = (r: std.Resource): str? => { - return r.display.title; + return std.Node.of(r).title; }; let q = new aws.sqsQueue.SqsQueue(); diff --git a/libs/wingc/src/closure_transform.rs b/libs/wingc/src/closure_transform.rs index 8bc707669e6..bbb32b85440 100644 --- a/libs/wingc/src/closure_transform.rs +++ b/libs/wingc/src/closure_transform.rs @@ -2,9 +2,9 @@ use indexmap::IndexMap; use crate::{ ast::{ - ArgList, Class, ClassField, Expr, ExprKind, FunctionBody, FunctionDefinition, FunctionParameter, FunctionSignature, - Literal, NewExpr, Phase, Reference, Scope, Stmt, StmtKind, Symbol, TypeAnnotation, TypeAnnotationKind, - UserDefinedType, + ArgList, CalleeKind, Class, ClassField, Expr, ExprKind, FunctionBody, FunctionDefinition, FunctionParameter, + FunctionSignature, Literal, NewExpr, Phase, Reference, Scope, Stmt, StmtKind, Symbol, TypeAnnotation, + TypeAnnotationKind, UserDefinedType, }, diagnostic::WingSpan, fold::{self, Fold}, @@ -184,23 +184,40 @@ impl Fold for ClosureTransformer { // class_init_body := // ``` - // this.display.hidden = true; + // std.Node.of(this).hidden = true; // ``` + let std_display_of_this = Expr::new( + ExprKind::Call { + callee: CalleeKind::Expr(Box::new(Expr::new( + ExprKind::Reference(Reference::TypeMember { + typeobject: Box::new(Expr::new( + ExprKind::Reference(Reference::TypeReference(UserDefinedType { + root: Symbol::new("std", WingSpan::for_file(file_id)), + fields: vec![Symbol::new("Node", WingSpan::for_file(file_id))], + span: WingSpan::for_file(file_id), + })), + WingSpan::for_file(file_id), + )), + property: Symbol::new("of", WingSpan::for_file(file_id)), + }), + WingSpan::for_file(file_id), + ))), + arg_list: ArgList { + named_args: IndexMap::new(), + pos_args: vec![Expr::new( + ExprKind::Reference(Reference::Identifier(Symbol::new("this", WingSpan::for_file(file_id)))), + WingSpan::for_file(file_id), + )], + span: WingSpan::for_file(file_id), + }, + }, + WingSpan::for_file(file_id), + ); let class_init_body = vec![Stmt { idx: 0, kind: StmtKind::Assignment { variable: Reference::InstanceMember { - object: Box::new(Expr::new( - ExprKind::Reference(Reference::InstanceMember { - object: Box::new(Expr::new( - ExprKind::Reference(Reference::Identifier(Symbol::new("this", WingSpan::for_file(file_id)))), - WingSpan::for_file(file_id), - )), - property: Symbol::new("display", WingSpan::for_file(file_id)), - optional_accessor: false, - }), - WingSpan::for_file(file_id), - )), + object: Box::new(std_display_of_this), property: Symbol::new("hidden", WingSpan::for_file(file_id)), optional_accessor: false, }, diff --git a/libs/wingc/src/jsify.rs b/libs/wingc/src/jsify.rs index 59c462277a2..5a1ac1b0665 100644 --- a/libs/wingc/src/jsify.rs +++ b/libs/wingc/src/jsify.rs @@ -307,30 +307,6 @@ impl<'a> JSifier<'a> { } } - // This helper determines what requirement and dependency to add to the struct schema based - // on the type annotation of the field. - // I.E. if a struct has a field named "foo" with a type "OtherStruct", then we want to add - // the field "foo" as a required and the struct "OtherStruct" as a dependency. so the result is - // a tuple (required, dependency) - fn extract_struct_field_schema_dependency( - &self, - typ: &TypeAnnotationKind, - field_name: &String, - ) -> (Option, Option) { - match typ { - TypeAnnotationKind::UserDefined(udt) => (Some(field_name.clone()), Some(udt.root.name.clone())), - TypeAnnotationKind::Array(t) | TypeAnnotationKind::Set(t) | TypeAnnotationKind::Map(t) => { - self.extract_struct_field_schema_dependency(&t.kind, field_name) - } - TypeAnnotationKind::Optional(t) => { - let deps = self.extract_struct_field_schema_dependency(&t.kind, field_name); - // We never want to add an optional to the required block - (None, deps.1) - } - _ => (Some(field_name.clone()), None), - } - } - fn jsify_struct_field_to_json_schema_type(&self, typ: &TypeAnnotationKind) -> String { match typ { TypeAnnotationKind::Bool | TypeAnnotationKind::Number | TypeAnnotationKind::String => { @@ -706,7 +682,7 @@ impl<'a> JSifier<'a> { // getValidator method that will create a json schema validator. let mut code = CodeMaker::default(); - code.open("module.exports = function(stdStruct, fromInline) {".to_string()); + code.open("module.exports = function(stdStruct) {".to_string()); code.open(format!("class {} {{", name)); // create schema @@ -724,7 +700,7 @@ impl<'a> JSifier<'a> { // determine which fields are required, and which schemas need to be added to validator for field in fields { - let dep = self.extract_struct_field_schema_dependency(&field.member_type.kind, &field.name.name); + let dep = extract_struct_field_schema_dependency(&field.member_type.kind, &field.name.name); if let Some(req) = dep.0 { required.push(req); } @@ -778,7 +754,7 @@ impl<'a> JSifier<'a> { // create _toInflightType function that just requires the generated struct file code.open("static _toInflightType(context) {".to_string()); code.line(format!( - "return fromInline(`require(\"{}\")(${{ context._lift(stdStruct) }})`);", + "return `require(\"{}\")(${{ context._lift(stdStruct) }})`;", struct_filename(&name.name) )); code.close("}"); @@ -979,10 +955,9 @@ impl<'a> JSifier<'a> { // Reset the code maker for code to be inserted in preflight.js code = CodeMaker::default(); code.line(format!( - "const {} = require(\"{}\")({}.std.Struct, {}.core.NodeJsCode.fromInline);", + "const {} = require(\"{}\")({}.std.Struct);", name, struct_filename(&name.name), - STDLIB, STDLIB )); code @@ -1198,6 +1173,7 @@ impl<'a> JSifier<'a> { // `_liftType`). code.add_code(self.jsify_to_inflight_type_method(&class, ctx)); code.add_code(self.jsify_to_inflight_method(&class.name, ctx)); + code.add_code(self.jsify_get_inflight_ops_method(&class)); // emit `_registerBindObject` to register bindings (for type & instance binds) code.add_code(self.jsify_register_bind_method(class, class_type, BindMethod::Instance, ctx)); @@ -1242,29 +1218,26 @@ impl<'a> JSifier<'a> { } body_code.add_code(self.jsify_scope_body(&init_statements, ctx)); - let inflight_fields = class.inflight_fields(); - let inflight_methods = class.inflight_methods(true); + code.add_code(body_code); - if inflight_fields.len() + inflight_methods.len() > 0 { - let inflight_method_names = inflight_methods - .iter() - .filter_map(|m| m.name.clone()) - .map(|s| s.name) - .collect_vec(); + code.close("}"); + code + } - let inflight_field_names = inflight_fields.iter().map(|f| f.name.name.clone()).collect_vec(); - let inflight_ops_string = inflight_method_names - .iter() - .chain(inflight_field_names.iter()) - .map(|name| format!("\"{}\"", name)) - .join(", "); + fn jsify_get_inflight_ops_method(&self, class: &AstClass) -> CodeMaker { + let mut code = CodeMaker::default(); - // insert as the first statement after the super() call - body_code.insert_line(1, format!("this._addInflightOps({inflight_ops_string});")); - } + code.open("_getInflightOps() {"); - code.add_code(body_code); + let mut ops = vec![]; + for field in class.inflight_fields() { + ops.push(format!("\"{}\"", field.name.name)); + } + for method in class.inflight_methods(true) { + ops.push(format!("\"{}\"", method.name.as_ref().unwrap().name)); + } + code.line(format!("return [{}];", ops.join(", "))); code.close("}"); code } @@ -1276,7 +1249,7 @@ impl<'a> JSifier<'a> { code.open("static _toInflightType(context) {"); // TODO: consider removing the context and making _lift a static method - code.open(format!("return {STDLIB}.core.NodeJsCode.fromInline(`")); + code.open("return `"); code.open(format!("require(\"{client_path}\")({{")); @@ -1290,7 +1263,7 @@ impl<'a> JSifier<'a> { code.close("})"); - code.close("`);"); + code.close("`;"); code.close("}"); code @@ -1301,12 +1274,12 @@ impl<'a> JSifier<'a> { code.open("_toInflight() {"); - code.open(format!("return {STDLIB}.core.NodeJsCode.fromInline(`")); + code.open("return `"); code.open("(await (async () => {"); code.line(format!( - "const {}Client = ${{{}._toInflightType(this).text}};", + "const {}Client = ${{{}._toInflightType(this)}};", resource_name.name, resource_name.name, )); @@ -1327,7 +1300,7 @@ impl<'a> JSifier<'a> { code.close("})())"); - code.close("`);"); + code.close("`;"); code.close("}"); code @@ -1534,6 +1507,29 @@ impl<'a> JSifier<'a> { } } +// This helper determines what requirement and dependency to add to the struct schema based +// on the type annotation of the field. +// I.E. if a struct has a field named "foo" with a type "OtherStruct", then we want to add +// the field "foo" as a required and the struct "OtherStruct" as a dependency. so the result is +// a tuple (required, dependency) +fn extract_struct_field_schema_dependency( + typ: &TypeAnnotationKind, + field_name: &String, +) -> (Option, Option) { + match typ { + TypeAnnotationKind::UserDefined(udt) => (Some(field_name.clone()), Some(udt.root.name.clone())), + TypeAnnotationKind::Array(t) | TypeAnnotationKind::Set(t) | TypeAnnotationKind::Map(t) => { + extract_struct_field_schema_dependency(&t.kind, field_name) + } + TypeAnnotationKind::Optional(t) => { + let deps = extract_struct_field_schema_dependency(&t.kind, field_name); + // We never want to add an optional to the required block + (None, deps.1) + } + _ => (Some(field_name.clone()), None), + } +} + fn get_public_symbols(scope: &Scope) -> Vec { let mut symbols = Vec::new(); diff --git a/libs/wingc/src/jsify/snapshots/access_methods_and_properties_on_collections.snap b/libs/wingc/src/jsify/snapshots/access_methods_and_properties_on_collections.snap index d52bc90f298..edacc5a06b0 100644 --- a/libs/wingc/src/jsify/snapshots/access_methods_and_properties_on_collections.snap +++ b/libs/wingc/src/jsify/snapshots/access_methods_and_properties_on_collections.snap @@ -47,27 +47,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $_y_at_0__: ${context._lift((y.at(0)))}, $x_length: ${context._lift(x.length)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/access_property_on_primitive.snap b/libs/wingc/src/jsify/snapshots/access_property_on_primitive.snap index d9a58337d6a..71362ff2189 100644 --- a/libs/wingc/src/jsify/snapshots/access_property_on_primitive.snap +++ b/libs/wingc/src/jsify/snapshots/access_property_on_primitive.snap @@ -44,26 +44,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $s_length: ${context._lift(s.length)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/access_property_on_value_returned_from_collection.snap b/libs/wingc/src/jsify/snapshots/access_property_on_value_returned_from_collection.snap index 9143fae97f0..272b8abb75c 100644 --- a/libs/wingc/src/jsify/snapshots/access_property_on_value_returned_from_collection.snap +++ b/libs/wingc/src/jsify/snapshots/access_property_on_value_returned_from_collection.snap @@ -44,26 +44,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $_s___hello___length: ${context._lift((s)["hello"].length)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/base_class_captures_inflight.snap b/libs/wingc/src/jsify/snapshots/base_class_captures_inflight.snap index 61845634071..ffd29a776f5 100644 --- a/libs/wingc/src/jsify/snapshots/base_class_captures_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/base_class_captures_inflight.snap @@ -65,25 +65,27 @@ class $Root extends $stdlib.std.Resource { class Base extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("bar", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Base-1.js")({ $x: ${context._lift(x)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BaseClient = ${Base._toInflightType(this).text}; + const BaseClient = ${Base._toInflightType(this)}; const client = new BaseClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["bar", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("bar")) { @@ -95,25 +97,27 @@ class $Root extends $stdlib.std.Resource { class Derived extends Base { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Derived-1.js")({ $Base: ${context._lift(Base)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const DerivedClient = ${Derived._toInflightType(this).text}; + const DerivedClient = ${Derived._toInflightType(this)}; const client = new DerivedClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foo", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("foo")) { diff --git a/libs/wingc/src/jsify/snapshots/base_class_captures_preflight.snap b/libs/wingc/src/jsify/snapshots/base_class_captures_preflight.snap index 5fa9d3f3ad5..5b15601affd 100644 --- a/libs/wingc/src/jsify/snapshots/base_class_captures_preflight.snap +++ b/libs/wingc/src/jsify/snapshots/base_class_captures_preflight.snap @@ -59,54 +59,58 @@ class $Root extends $stdlib.std.Resource { class Base extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } bar() { {console.log(x)}; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Base-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BaseClient = ${Base._toInflightType(this).text}; + const BaseClient = ${Base._toInflightType(this)}; const client = new BaseClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Derived extends Base { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } foo() { (this.bar()); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Derived-1.js")({ $Base: ${context._lift(Base)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const DerivedClient = ${Derived._toInflightType(this).text}; + const DerivedClient = ${Derived._toInflightType(this)}; const client = new DerivedClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } const x = "hello"; diff --git a/libs/wingc/src/jsify/snapshots/base_class_lift_indirect.snap b/libs/wingc/src/jsify/snapshots/base_class_lift_indirect.snap index 8e9f1eb7da8..4169ed6c761 100644 --- a/libs/wingc/src/jsify/snapshots/base_class_lift_indirect.snap +++ b/libs/wingc/src/jsify/snapshots/base_class_lift_indirect.snap @@ -74,26 +74,28 @@ class $Root extends $stdlib.std.Resource { class Base extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("put", "$inflight_init"); this.b = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Base-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BaseClient = ${Base._toInflightType(this).text}; + const BaseClient = ${Base._toInflightType(this)}; const client = new BaseClient({ $this_b: ${this._lift(this.b)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["put", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -108,25 +110,27 @@ class $Root extends $stdlib.std.Resource { class Derived extends Base { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Derived-1.js")({ $Base: ${context._lift(Base)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const DerivedClient = ${Derived._toInflightType(this).text}; + const DerivedClient = ${Derived._toInflightType(this)}; const client = new DerivedClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foo", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("foo")) { diff --git a/libs/wingc/src/jsify/snapshots/base_class_with_fields_inflight.snap b/libs/wingc/src/jsify/snapshots/base_class_with_fields_inflight.snap index f3a47183996..75836d2aa36 100644 --- a/libs/wingc/src/jsify/snapshots/base_class_with_fields_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/base_class_with_fields_inflight.snap @@ -74,48 +74,52 @@ class $Root extends $stdlib.std.Resource { class Base extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init", "f"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Base-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BaseClient = ${Base._toInflightType(this).text}; + const BaseClient = ${Base._toInflightType(this)}; const client = new BaseClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["f", "$inflight_init"]; } } class Derived extends Base { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init", "g"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Derived-1.js")({ $Base: ${context._lift(Base)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const DerivedClient = ${Derived._toInflightType(this).text}; + const DerivedClient = ${Derived._toInflightType(this)}; const client = new DerivedClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["g", "foo", "$inflight_init"]; } } } diff --git a/libs/wingc/src/jsify/snapshots/base_class_with_fields_preflight.snap b/libs/wingc/src/jsify/snapshots/base_class_with_fields_preflight.snap index d058e989e24..9c10d1dd5fb 100644 --- a/libs/wingc/src/jsify/snapshots/base_class_with_fields_preflight.snap +++ b/libs/wingc/src/jsify/snapshots/base_class_with_fields_preflight.snap @@ -64,31 +64,32 @@ class $Root extends $stdlib.std.Resource { class Base extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.f = "hello"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Base-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BaseClient = ${Base._toInflightType(this).text}; + const BaseClient = ${Base._toInflightType(this)}; const client = new BaseClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Derived extends Base { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.g = "world"; } foo() { @@ -96,22 +97,25 @@ class $Root extends $stdlib.std.Resource { this.g; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Derived-1.js")({ $Base: ${context._lift(Base)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const DerivedClient = ${Derived._toInflightType(this).text}; + const DerivedClient = ${Derived._toInflightType(this)}; const client = new DerivedClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } } diff --git a/libs/wingc/src/jsify/snapshots/base_class_with_lifted_field_object.snap b/libs/wingc/src/jsify/snapshots/base_class_with_lifted_field_object.snap index 97c2a1dfc77..714e156e925 100644 --- a/libs/wingc/src/jsify/snapshots/base_class_with_lifted_field_object.snap +++ b/libs/wingc/src/jsify/snapshots/base_class_with_lifted_field_object.snap @@ -65,50 +65,54 @@ class $Root extends $stdlib.std.Resource { class Base extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.b = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Base-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BaseClient = ${Base._toInflightType(this).text}; + const BaseClient = ${Base._toInflightType(this)}; const client = new BaseClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Derived extends Base { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Derived-1.js")({ $Base: ${context._lift(Base)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const DerivedClient = ${Derived._toInflightType(this).text}; + const DerivedClient = ${Derived._toInflightType(this)}; const client = new DerivedClient({ $this_b: ${this._lift(this.b)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foo", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { diff --git a/libs/wingc/src/jsify/snapshots/base_class_with_lifted_fields.snap b/libs/wingc/src/jsify/snapshots/base_class_with_lifted_fields.snap index 1c1a2a0dc23..7a48375e64d 100644 --- a/libs/wingc/src/jsify/snapshots/base_class_with_lifted_fields.snap +++ b/libs/wingc/src/jsify/snapshots/base_class_with_lifted_fields.snap @@ -64,50 +64,54 @@ class $Root extends $stdlib.std.Resource { class Base extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.f = x; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Base-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BaseClient = ${Base._toInflightType(this).text}; + const BaseClient = ${Base._toInflightType(this)}; const client = new BaseClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Derived extends Base { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Derived-1.js")({ $Base: ${context._lift(Base)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const DerivedClient = ${Derived._toInflightType(this).text}; + const DerivedClient = ${Derived._toInflightType(this)}; const client = new DerivedClient({ $this_f: ${this._lift(this.f)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foo", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { diff --git a/libs/wingc/src/jsify/snapshots/builtins.snap b/libs/wingc/src/jsify/snapshots/builtins.snap index eed347eed90..a614e150060 100644 --- a/libs/wingc/src/jsify/snapshots/builtins.snap +++ b/libs/wingc/src/jsify/snapshots/builtins.snap @@ -42,25 +42,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/call_static_inflight_from_static_inflight.snap b/libs/wingc/src/jsify/snapshots/call_static_inflight_from_static_inflight.snap index a4b86273ec1..8baff267302 100644 --- a/libs/wingc/src/jsify/snapshots/call_static_inflight_from_static_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/call_static_inflight_from_static_inflight.snap @@ -58,48 +58,52 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foo", "$inflight_init"]; } } class B extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("bar", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.B-1.js")({ $A: ${context._lift(A)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BClient = ${B._toInflightType(this).text}; + const BClient = ${B._toInflightType(this)}; const client = new BClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["bar", "$inflight_init"]; } static _registerTypeBind(host, ops) { if (ops.includes("bar")) { diff --git a/libs/wingc/src/jsify/snapshots/calls_methods_on_preflight_object.snap b/libs/wingc/src/jsify/snapshots/calls_methods_on_preflight_object.snap index 49330c29cb7..0df2a2b1526 100644 --- a/libs/wingc/src/jsify/snapshots/calls_methods_on_preflight_object.snap +++ b/libs/wingc/src/jsify/snapshots/calls_methods_on_preflight_object.snap @@ -48,26 +48,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/capture_from_inside_an_inflight_closure.snap b/libs/wingc/src/jsify/snapshots/capture_from_inside_an_inflight_closure.snap index e6a65204c5a..8633c670474 100644 --- a/libs/wingc/src/jsify/snapshots/capture_from_inside_an_inflight_closure.snap +++ b/libs/wingc/src/jsify/snapshots/capture_from_inside_an_inflight_closure.snap @@ -49,26 +49,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $foo: ${context._lift(foo)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/capture_identifier_closure_from_preflight_scope.snap b/libs/wingc/src/jsify/snapshots/capture_identifier_closure_from_preflight_scope.snap index 0770566cc96..385d889d748 100644 --- a/libs/wingc/src/jsify/snapshots/capture_identifier_closure_from_preflight_scope.snap +++ b/libs/wingc/src/jsify/snapshots/capture_identifier_closure_from_preflight_scope.snap @@ -60,50 +60,54 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $foo: ${context._lift(foo)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope.snap b/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope.snap index 10cc98b0b15..a05245109e3 100644 --- a/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope.snap +++ b/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope.snap @@ -43,26 +43,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $x: ${context._lift(x)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_method_call.snap b/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_method_call.snap index 25f732f82dc..fd4d7d9877f 100644 --- a/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_method_call.snap +++ b/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_method_call.snap @@ -61,49 +61,53 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("bar", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["bar", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $f: ${context._lift(f)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_nested_object.snap b/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_nested_object.snap index d9ebe0d871b..99f04e96351 100644 --- a/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_nested_object.snap +++ b/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_nested_object.snap @@ -65,50 +65,54 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.b = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $f_b: ${context._lift(f.b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_property.snap b/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_property.snap index 4a1bfb05c5d..7da2fa75bbc 100644 --- a/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_property.snap +++ b/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_property.snap @@ -43,26 +43,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $x_length: ${context._lift(x.length)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/capture_in_keyword_args.snap b/libs/wingc/src/jsify/snapshots/capture_in_keyword_args.snap index 2e47375a37e..a30234386a4 100644 --- a/libs/wingc/src/jsify/snapshots/capture_in_keyword_args.snap +++ b/libs/wingc/src/jsify/snapshots/capture_in_keyword_args.snap @@ -49,27 +49,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $util_Util: ${context._lift(util.Util)}, $x: ${context._lift(x)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/capture_object_with_this_in_name.snap b/libs/wingc/src/jsify/snapshots/capture_object_with_this_in_name.snap index 7365ec46e79..3013d6d5c27 100644 --- a/libs/wingc/src/jsify/snapshots/capture_object_with_this_in_name.snap +++ b/libs/wingc/src/jsify/snapshots/capture_object_with_this_in_name.snap @@ -45,26 +45,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $bucket_this: ${context._lift(bucket_this)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/capture_token.snap b/libs/wingc/src/jsify/snapshots/capture_token.snap index 8a163f13be4..8266ff4a019 100644 --- a/libs/wingc/src/jsify/snapshots/capture_token.snap +++ b/libs/wingc/src/jsify/snapshots/capture_token.snap @@ -44,26 +44,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $api_url: ${context._lift(api.url)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/capture_type_inflight_class_sibling_from_init.snap b/libs/wingc/src/jsify/snapshots/capture_type_inflight_class_sibling_from_init.snap index d91687bfebc..3c01f7aad4a 100644 --- a/libs/wingc/src/jsify/snapshots/capture_type_inflight_class_sibling_from_init.snap +++ b/libs/wingc/src/jsify/snapshots/capture_type_inflight_class_sibling_from_init.snap @@ -65,25 +65,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/capture_type_inflight_class_sibling_from_method.snap b/libs/wingc/src/jsify/snapshots/capture_type_inflight_class_sibling_from_method.snap index ade1a7f272e..8ac3a9d4569 100644 --- a/libs/wingc/src/jsify/snapshots/capture_type_inflight_class_sibling_from_method.snap +++ b/libs/wingc/src/jsify/snapshots/capture_type_inflight_class_sibling_from_method.snap @@ -53,25 +53,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/capture_type_new_inflight_class_inner_no_capture.snap b/libs/wingc/src/jsify/snapshots/capture_type_new_inflight_class_inner_no_capture.snap index 96539d9e883..659be7acc5d 100644 --- a/libs/wingc/src/jsify/snapshots/capture_type_new_inflight_class_inner_no_capture.snap +++ b/libs/wingc/src/jsify/snapshots/capture_type_new_inflight_class_inner_no_capture.snap @@ -45,25 +45,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/capture_type_new_inflight_class_outer.snap b/libs/wingc/src/jsify/snapshots/capture_type_new_inflight_class_outer.snap index bb6f3015563..2beeff39a32 100644 --- a/libs/wingc/src/jsify/snapshots/capture_type_new_inflight_class_outer.snap +++ b/libs/wingc/src/jsify/snapshots/capture_type_new_inflight_class_outer.snap @@ -54,49 +54,53 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $Foo: ${context._lift(Foo)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/capture_type_static_method.snap b/libs/wingc/src/jsify/snapshots/capture_type_static_method.snap index 811b1a44e8c..4e46d1be5cf 100644 --- a/libs/wingc/src/jsify/snapshots/capture_type_static_method.snap +++ b/libs/wingc/src/jsify/snapshots/capture_type_static_method.snap @@ -61,49 +61,53 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("bars", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["bars", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $Foo: ${context._lift(Foo)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/capture_type_static_method_inflight_class.snap b/libs/wingc/src/jsify/snapshots/capture_type_static_method_inflight_class.snap index 672acf6459d..3e16141cc42 100644 --- a/libs/wingc/src/jsify/snapshots/capture_type_static_method_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/capture_type_static_method_inflight_class.snap @@ -59,49 +59,53 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("bar", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["bar", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $Foo: ${context._lift(Foo)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/capture_var_from_method_inflight.snap b/libs/wingc/src/jsify/snapshots/capture_var_from_method_inflight.snap index 2b9708b6e6d..96db3202ac8 100644 --- a/libs/wingc/src/jsify/snapshots/capture_var_from_method_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/capture_var_from_method_inflight.snap @@ -50,25 +50,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/closed_inflight_class_extends_outer_inflight_class.snap b/libs/wingc/src/jsify/snapshots/closed_inflight_class_extends_outer_inflight_class.snap index e07edc93ab7..130df0f7fc1 100644 --- a/libs/wingc/src/jsify/snapshots/closed_inflight_class_extends_outer_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/closed_inflight_class_extends_outer_inflight_class.snap @@ -57,49 +57,53 @@ class $Root extends $stdlib.std.Resource { class Base extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Base-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BaseClient = ${Base._toInflightType(this).text}; + const BaseClient = ${Base._toInflightType(this)}; const client = new BaseClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $Base: ${context._lift(Base)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/closure_field.snap b/libs/wingc/src/jsify/snapshots/closure_field.snap index 09449994251..0eff98185c4 100644 --- a/libs/wingc/src/jsify/snapshots/closure_field.snap +++ b/libs/wingc/src/jsify/snapshots/closure_field.snap @@ -100,31 +100,32 @@ class $Root extends $stdlib.std.Resource { class MyResource extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init"); const __parent_this_1 = this; class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $globalBucket: ${context._lift(globalBucket)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -136,22 +137,25 @@ class $Root extends $stdlib.std.Resource { this.closure = new $Closure1(this,"$Closure1"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyResource-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyResourceClient = ${MyResource._toInflightType(this).text}; + const MyResourceClient = ${MyResource._toInflightType(this)}; const client = new MyResourceClient({ $this_closure: ${this._lift(this.closure)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foo", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -166,26 +170,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $x: ${context._lift(x)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/enum_value.snap b/libs/wingc/src/jsify/snapshots/enum_value.snap index a5145c2282b..af1c07be3e1 100644 --- a/libs/wingc/src/jsify/snapshots/enum_value.snap +++ b/libs/wingc/src/jsify/snapshots/enum_value.snap @@ -47,27 +47,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $MyEnum: ${context._lift(MyEnum)}, $x: ${context._lift(x)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/free_inflight_obj_from_inflight.snap b/libs/wingc/src/jsify/snapshots/free_inflight_obj_from_inflight.snap index c09b9f8bc88..4bb8f2c6e74 100644 --- a/libs/wingc/src/jsify/snapshots/free_inflight_obj_from_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/free_inflight_obj_from_inflight.snap @@ -53,25 +53,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/free_preflight_object_from_preflight.snap b/libs/wingc/src/jsify/snapshots/free_preflight_object_from_preflight.snap index 205545bdbf4..ac3600da5d7 100644 --- a/libs/wingc/src/jsify/snapshots/free_preflight_object_from_preflight.snap +++ b/libs/wingc/src/jsify/snapshots/free_preflight_object_from_preflight.snap @@ -38,27 +38,29 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } foo() { {console.log(x)}; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } const x = "hello"; diff --git a/libs/wingc/src/jsify/snapshots/func_returns_func.snap b/libs/wingc/src/jsify/snapshots/func_returns_func.snap index 2675fa93a92..a7759c0fa39 100644 --- a/libs/wingc/src/jsify/snapshots/func_returns_func.snap +++ b/libs/wingc/src/jsify/snapshots/func_returns_func.snap @@ -52,25 +52,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/identify_field.snap b/libs/wingc/src/jsify/snapshots/identify_field.snap index 1b1295bce35..7175afe48af 100644 --- a/libs/wingc/src/jsify/snapshots/identify_field.snap +++ b/libs/wingc/src/jsify/snapshots/identify_field.snap @@ -48,26 +48,28 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init"); this.bucket_this = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ $this_bucket_this: ${this._lift(this.bucket_this)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foo", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { diff --git a/libs/wingc/src/jsify/snapshots/implicit_lift_inflight_init.snap b/libs/wingc/src/jsify/snapshots/implicit_lift_inflight_init.snap index 7dbfefee587..4b63453e753 100644 --- a/libs/wingc/src/jsify/snapshots/implicit_lift_inflight_init.snap +++ b/libs/wingc/src/jsify/snapshots/implicit_lift_inflight_init.snap @@ -66,26 +66,28 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("incCounter", "dontTouchCounter", "$inflight_init", "myField2"); this.c = this.node.root.newAbstract("@winglang/sdk.cloud.Counter",this,"cloud.Counter"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ $this_c: ${this._lift(this.c)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["myField2", "incCounter", "dontTouchCounter", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { diff --git a/libs/wingc/src/jsify/snapshots/indirect_capture.snap b/libs/wingc/src/jsify/snapshots/indirect_capture.snap index cc4b31a6fca..4de1d4cb609 100644 --- a/libs/wingc/src/jsify/snapshots/indirect_capture.snap +++ b/libs/wingc/src/jsify/snapshots/indirect_capture.snap @@ -78,26 +78,28 @@ class $Root extends $stdlib.std.Resource { class Capture extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "goo", "$inflight_init"); this.q = this.node.root.newAbstract("@winglang/sdk.cloud.Queue",this,"cloud.Queue"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Capture-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const CaptureClient = ${Capture._toInflightType(this).text}; + const CaptureClient = ${Capture._toInflightType(this)}; const client = new CaptureClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foo", "goo", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("foo")) { @@ -112,26 +114,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $f: ${context._lift(f)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/inflight_class_extends_both_inside_inflight_closure.snap b/libs/wingc/src/jsify/snapshots/inflight_class_extends_both_inside_inflight_closure.snap index 8262d94333e..949b9a41d0b 100644 --- a/libs/wingc/src/jsify/snapshots/inflight_class_extends_both_inside_inflight_closure.snap +++ b/libs/wingc/src/jsify/snapshots/inflight_class_extends_both_inside_inflight_closure.snap @@ -46,25 +46,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/inflight_class_extends_inflight_class.snap b/libs/wingc/src/jsify/snapshots/inflight_class_extends_inflight_class.snap index 71b38a97a7d..9a61e3fc3b7 100644 --- a/libs/wingc/src/jsify/snapshots/inflight_class_extends_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/inflight_class_extends_inflight_class.snap @@ -43,48 +43,52 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class B extends A { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.B-1.js")({ $A: ${context._lift(A)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BClient = ${B._toInflightType(this).text}; + const BClient = ${B._toInflightType(this)}; const client = new BClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } } diff --git a/libs/wingc/src/jsify/snapshots/inflight_constructor.snap b/libs/wingc/src/jsify/snapshots/inflight_constructor.snap index a039c894786..73d169b58d2 100644 --- a/libs/wingc/src/jsify/snapshots/inflight_constructor.snap +++ b/libs/wingc/src/jsify/snapshots/inflight_constructor.snap @@ -50,24 +50,26 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init", "x"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["x", "foo", "$inflight_init"]; } } } diff --git a/libs/wingc/src/jsify/snapshots/inflight_field.snap b/libs/wingc/src/jsify/snapshots/inflight_field.snap index e5a44b14ed3..376bdb0f912 100644 --- a/libs/wingc/src/jsify/snapshots/inflight_field.snap +++ b/libs/wingc/src/jsify/snapshots/inflight_field.snap @@ -49,24 +49,26 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("method", "$inflight_init", "x"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["x", "method", "$inflight_init"]; } } } diff --git a/libs/wingc/src/jsify/snapshots/inflight_field_from_inflight.snap b/libs/wingc/src/jsify/snapshots/inflight_field_from_inflight.snap index 9782d58e010..d7bd03b8062 100644 --- a/libs/wingc/src/jsify/snapshots/inflight_field_from_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/inflight_field_from_inflight.snap @@ -48,24 +48,26 @@ class $Root extends $stdlib.std.Resource { class MyType extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init", "s"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyType-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyTypeClient = ${MyType._toInflightType(this).text}; + const MyTypeClient = ${MyType._toInflightType(this)}; const client = new MyTypeClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["s", "foo", "$inflight_init"]; } } } diff --git a/libs/wingc/src/jsify/snapshots/inflight_field_from_inflight_class.snap b/libs/wingc/src/jsify/snapshots/inflight_field_from_inflight_class.snap index c31c5a07a67..b91ca15338d 100644 --- a/libs/wingc/src/jsify/snapshots/inflight_field_from_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/inflight_field_from_inflight_class.snap @@ -45,24 +45,26 @@ class $Root extends $stdlib.std.Resource { class MyType extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("getField", "$inflight_init", "field"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyType-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyTypeClient = ${MyType._toInflightType(this).text}; + const MyTypeClient = ${MyType._toInflightType(this)}; const client = new MyTypeClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["field", "getField", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { diff --git a/libs/wingc/src/jsify/snapshots/inline_inflight_class.snap b/libs/wingc/src/jsify/snapshots/inline_inflight_class.snap index 07286ef4cb6..0ca916aedc0 100644 --- a/libs/wingc/src/jsify/snapshots/inline_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/inline_inflight_class.snap @@ -66,33 +66,34 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.b = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); this.q = this.node.root.newAbstract("@winglang/sdk.cloud.Queue",this,"cloud.Queue"); const __parent_this_1 = this; class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $__parent_this_1_b: ${context._lift(__parent_this_1.b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -104,21 +105,24 @@ class $Root extends $stdlib.std.Resource { (this.q.setConsumer(new $Closure1(this,"$Closure1"))); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } } diff --git a/libs/wingc/src/jsify/snapshots/json_object.snap b/libs/wingc/src/jsify/snapshots/json_object.snap index 1e1d952344e..e247dea455c 100644 --- a/libs/wingc/src/jsify/snapshots/json_object.snap +++ b/libs/wingc/src/jsify/snapshots/json_object.snap @@ -44,27 +44,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $jsonObj1: ${context._lift(jsonObj1)}, $std_Json: ${context._lift(std.Json)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/lift_binary_preflight_and_inflight_expression.snap b/libs/wingc/src/jsify/snapshots/lift_binary_preflight_and_inflight_expression.snap index 23d3a84674b..9e888844142 100644 --- a/libs/wingc/src/jsify/snapshots/lift_binary_preflight_and_inflight_expression.snap +++ b/libs/wingc/src/jsify/snapshots/lift_binary_preflight_and_inflight_expression.snap @@ -45,26 +45,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $x: ${context._lift(x)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/lift_binary_preflight_expression.snap b/libs/wingc/src/jsify/snapshots/lift_binary_preflight_expression.snap index 661b27558dd..b8a05ac5fe5 100644 --- a/libs/wingc/src/jsify/snapshots/lift_binary_preflight_expression.snap +++ b/libs/wingc/src/jsify/snapshots/lift_binary_preflight_expression.snap @@ -44,27 +44,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $x: ${context._lift(x)}, $y: ${context._lift(y)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/lift_element_from_collection_as_field.snap b/libs/wingc/src/jsify/snapshots/lift_element_from_collection_as_field.snap index 0249bf57a62..a974b7568b6 100644 --- a/libs/wingc/src/jsify/snapshots/lift_element_from_collection_as_field.snap +++ b/libs/wingc/src/jsify/snapshots/lift_element_from_collection_as_field.snap @@ -49,26 +49,28 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init"); this.arr = [this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket")]; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ $_this_arr_at_0__: ${this._lift((this.arr.at(0)))}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foo", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { diff --git a/libs/wingc/src/jsify/snapshots/lift_element_from_collection_of_objects.snap b/libs/wingc/src/jsify/snapshots/lift_element_from_collection_of_objects.snap index d3afbc8f310..769e8413e55 100644 --- a/libs/wingc/src/jsify/snapshots/lift_element_from_collection_of_objects.snap +++ b/libs/wingc/src/jsify/snapshots/lift_element_from_collection_of_objects.snap @@ -46,26 +46,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $_a_at_0__: ${context._lift((a.at(0)))}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/lift_inflight_closure.snap b/libs/wingc/src/jsify/snapshots/lift_inflight_closure.snap index 93b7fafce97..f177d41715e 100644 --- a/libs/wingc/src/jsify/snapshots/lift_inflight_closure.snap +++ b/libs/wingc/src/jsify/snapshots/lift_inflight_closure.snap @@ -61,50 +61,54 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $f: ${context._lift(f)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/lift_inside_preflight_method.snap b/libs/wingc/src/jsify/snapshots/lift_inside_preflight_method.snap index 1130bdb5b7e..f58dd4df03a 100644 --- a/libs/wingc/src/jsify/snapshots/lift_inside_preflight_method.snap +++ b/libs/wingc/src/jsify/snapshots/lift_inside_preflight_method.snap @@ -67,7 +67,6 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); (this.defineBucket("b1")); (this.defineBucket("b2")); } @@ -77,26 +76,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -108,21 +109,24 @@ class $Root extends $stdlib.std.Resource { new $Closure1(this,"$Closure1"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } } diff --git a/libs/wingc/src/jsify/snapshots/lift_string.snap b/libs/wingc/src/jsify/snapshots/lift_string.snap index 87da600510c..819f0d8c842 100644 --- a/libs/wingc/src/jsify/snapshots/lift_string.snap +++ b/libs/wingc/src/jsify/snapshots/lift_string.snap @@ -43,26 +43,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/lift_this.snap b/libs/wingc/src/jsify/snapshots/lift_this.snap index be50cb6951d..c580d4b04ca 100644 --- a/libs/wingc/src/jsify/snapshots/lift_this.snap +++ b/libs/wingc/src/jsify/snapshots/lift_this.snap @@ -78,24 +78,26 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("bar", "foo", "$inflight_init", "x"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["x", "bar", "foo", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("foo")) { @@ -107,26 +109,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $f: ${context._lift(f)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/lift_var_with_this.snap b/libs/wingc/src/jsify/snapshots/lift_var_with_this.snap index f3ba92ba5dd..9f06393d8a4 100644 --- a/libs/wingc/src/jsify/snapshots/lift_var_with_this.snap +++ b/libs/wingc/src/jsify/snapshots/lift_var_with_this.snap @@ -61,50 +61,54 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.value = "hello"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ $foo_this_value: ${this._lift(foo_this.value)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { diff --git a/libs/wingc/src/jsify/snapshots/lift_via_closure.snap b/libs/wingc/src/jsify/snapshots/lift_via_closure.snap index 67a5216b2fd..fcd179881b9 100644 --- a/libs/wingc/src/jsify/snapshots/lift_via_closure.snap +++ b/libs/wingc/src/jsify/snapshots/lift_via_closure.snap @@ -69,26 +69,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $bucket: ${context._lift(bucket)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -100,26 +102,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $fn: ${context._lift(fn)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/lift_via_closure_class_explicit.snap b/libs/wingc/src/jsify/snapshots/lift_via_closure_class_explicit.snap index 4ad566c32e5..04657a48596 100644 --- a/libs/wingc/src/jsify/snapshots/lift_via_closure_class_explicit.snap +++ b/libs/wingc/src/jsify/snapshots/lift_via_closure_class_explicit.snap @@ -84,26 +84,28 @@ class $Root extends $stdlib.std.Resource { class MyClosure extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "another", "$inflight_init"); this.q = this.node.root.newAbstract("@winglang/sdk.cloud.Queue",this,"cloud.Queue"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyClosure-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyClosureClient = ${MyClosure._toInflightType(this).text}; + const MyClosureClient = ${MyClosure._toInflightType(this)}; const client = new MyClosureClient({ $this_q: ${this._lift(this.q)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "another", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -121,26 +123,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $fn: ${context._lift(fn)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/namespaced_static_from_inflight.snap b/libs/wingc/src/jsify/snapshots/namespaced_static_from_inflight.snap index 006e21c6642..6423479c369 100644 --- a/libs/wingc/src/jsify/snapshots/namespaced_static_from_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/namespaced_static_from_inflight.snap @@ -44,26 +44,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/nested_inflight_after_preflight_operation.snap b/libs/wingc/src/jsify/snapshots/nested_inflight_after_preflight_operation.snap index 7afa895824a..040d031f519 100644 --- a/libs/wingc/src/jsify/snapshots/nested_inflight_after_preflight_operation.snap +++ b/libs/wingc/src/jsify/snapshots/nested_inflight_after_preflight_operation.snap @@ -68,49 +68,53 @@ class $Root extends $stdlib.std.Resource { class YourType extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init", "b"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.YourType-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const YourTypeClient = ${YourType._toInflightType(this).text}; + const YourTypeClient = ${YourType._toInflightType(this)}; const client = new YourTypeClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["b", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $y: ${context._lift(y)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/nested_preflight_operation.snap b/libs/wingc/src/jsify/snapshots/nested_preflight_operation.snap index 432517b3b5e..cc47169e693 100644 --- a/libs/wingc/src/jsify/snapshots/nested_preflight_operation.snap +++ b/libs/wingc/src/jsify/snapshots/nested_preflight_operation.snap @@ -83,74 +83,80 @@ class $Root extends $stdlib.std.Resource { class YourType extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.b = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.YourType-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const YourTypeClient = ${YourType._toInflightType(this).text}; + const YourTypeClient = ${YourType._toInflightType(this)}; const client = new YourTypeClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class MyType extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.y = new YourType(this,"YourType"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyType-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyTypeClient = ${MyType._toInflightType(this).text}; + const MyTypeClient = ${MyType._toInflightType(this)}; const client = new MyTypeClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $t_y_b: ${context._lift(t.y.b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/new_inflight_object.snap b/libs/wingc/src/jsify/snapshots/new_inflight_object.snap index c5fac10e15e..90d94f21754 100644 --- a/libs/wingc/src/jsify/snapshots/new_inflight_object.snap +++ b/libs/wingc/src/jsify/snapshots/new_inflight_object.snap @@ -54,49 +54,53 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $Foo: ${context._lift(Foo)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/no_capture_inside_methods.snap b/libs/wingc/src/jsify/snapshots/no_capture_inside_methods.snap index a6972d9902b..fda11ee31eb 100644 --- a/libs/wingc/src/jsify/snapshots/no_capture_inside_methods.snap +++ b/libs/wingc/src/jsify/snapshots/no_capture_inside_methods.snap @@ -48,25 +48,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/no_capture_of_identifier_from_inner_scope.snap b/libs/wingc/src/jsify/snapshots/no_capture_of_identifier_from_inner_scope.snap index 91355f2a465..045b030dffe 100644 --- a/libs/wingc/src/jsify/snapshots/no_capture_of_identifier_from_inner_scope.snap +++ b/libs/wingc/src/jsify/snapshots/no_capture_of_identifier_from_inner_scope.snap @@ -48,25 +48,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/no_capture_of_identifier_from_same_scope.snap b/libs/wingc/src/jsify/snapshots/no_capture_of_identifier_from_same_scope.snap index a5d3822e42e..0eadacf8de1 100644 --- a/libs/wingc/src/jsify/snapshots/no_capture_of_identifier_from_same_scope.snap +++ b/libs/wingc/src/jsify/snapshots/no_capture_of_identifier_from_same_scope.snap @@ -44,25 +44,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/no_capture_shadow_inside_inner_scopes.snap b/libs/wingc/src/jsify/snapshots/no_capture_shadow_inside_inner_scopes.snap index 5541612edc4..f61f98d2a87 100644 --- a/libs/wingc/src/jsify/snapshots/no_capture_shadow_inside_inner_scopes.snap +++ b/libs/wingc/src/jsify/snapshots/no_capture_shadow_inside_inner_scopes.snap @@ -56,25 +56,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:testing",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/no_lift_shadow_inside_inner_scopes.snap b/libs/wingc/src/jsify/snapshots/no_lift_shadow_inside_inner_scopes.snap index a706ab987b5..05c76c61cc4 100644 --- a/libs/wingc/src/jsify/snapshots/no_lift_shadow_inside_inner_scopes.snap +++ b/libs/wingc/src/jsify/snapshots/no_lift_shadow_inside_inner_scopes.snap @@ -54,26 +54,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $i: ${context._lift(i)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/preflight_class_extends_preflight_class.snap b/libs/wingc/src/jsify/snapshots/preflight_class_extends_preflight_class.snap index 8b6238a7d9f..6ec77fd57d9 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_class_extends_preflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_class_extends_preflight_class.snap @@ -48,48 +48,52 @@ class $Root extends $stdlib.std.Resource { class Base extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Base-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BaseClient = ${Base._toInflightType(this).text}; + const BaseClient = ${Base._toInflightType(this)}; const client = new BaseClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Derived extends Base { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Derived-1.js")({ $Base: ${context._lift(Base)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const DerivedClient = ${Derived._toInflightType(this).text}; + const DerivedClient = ${Derived._toInflightType(this)}; const client = new DerivedClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } } diff --git a/libs/wingc/src/jsify/snapshots/preflight_collection.snap b/libs/wingc/src/jsify/snapshots/preflight_collection.snap index 25b9992fd1b..2ec831efbf9 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_collection.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_collection.snap @@ -45,27 +45,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $_a_at_0__: ${context._lift((a.at(0)))}, $a_length: ${context._lift(a.length)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/preflight_collection_of_preflight_objects.snap b/libs/wingc/src/jsify/snapshots/preflight_collection_of_preflight_objects.snap index 249d8d5f189..b3987bd9b3b 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_collection_of_preflight_objects.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_collection_of_preflight_objects.snap @@ -50,27 +50,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $_arr_at_0__: ${context._lift((arr.at(0)))}, $arr_length: ${context._lift(arr.length)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/preflight_nested_object_with_operations.snap b/libs/wingc/src/jsify/snapshots/preflight_nested_object_with_operations.snap index 32ae46848c6..aeccbcdc457 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_nested_object_with_operations.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_nested_object_with_operations.snap @@ -65,50 +65,54 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.bucky = b; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $a_bucky: ${context._lift(a.bucky)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/preflight_object.snap b/libs/wingc/src/jsify/snapshots/preflight_object.snap index 7aee0d3ad5a..4158da5a7af 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_object.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_object.snap @@ -65,49 +65,53 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("hello", "goodbye", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["hello", "goodbye", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $pf_obj: ${context._lift(pf_obj)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/preflight_object_through_property.snap b/libs/wingc/src/jsify/snapshots/preflight_object_through_property.snap index 21a677d7983..39fd58175ea 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_object_through_property.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_object_through_property.snap @@ -66,50 +66,54 @@ class $Root extends $stdlib.std.Resource { class MyType extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.b = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyType-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyTypeClient = ${MyType._toInflightType(this).text}; + const MyTypeClient = ${MyType._toInflightType(this)}; const client = new MyTypeClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $t_b: ${context._lift(t.b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/preflight_object_with_operations.snap b/libs/wingc/src/jsify/snapshots/preflight_object_with_operations.snap index 7260b50077b..4d960ed7e0a 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_object_with_operations.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_object_with_operations.snap @@ -47,26 +47,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/preflight_object_with_operations_multiple_methods.snap b/libs/wingc/src/jsify/snapshots/preflight_object_with_operations_multiple_methods.snap index bab56d0db8e..faddaed2442 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_object_with_operations_multiple_methods.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_object_with_operations_multiple_methods.snap @@ -52,25 +52,27 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("put", "list", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["put", "list", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("list")) { diff --git a/libs/wingc/src/jsify/snapshots/preflight_value_field.snap b/libs/wingc/src/jsify/snapshots/preflight_value_field.snap index 1f3e085e730..e12f8f109cc 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_value_field.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_value_field.snap @@ -70,53 +70,57 @@ class $Root extends $stdlib.std.Resource { class MyType extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.name = "hello"; this.last = "world"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyType-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyTypeClient = ${MyType._toInflightType(this).text}; + const MyTypeClient = ${MyType._toInflightType(this)}; const client = new MyTypeClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $t_last: ${context._lift(t.last)}, $t_name: ${context._lift(t.name)}, $t_name_length: ${context._lift(t.name.length)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/read_primitive_value.snap b/libs/wingc/src/jsify/snapshots/read_primitive_value.snap index 765afb7a20c..eeaff7a658c 100644 --- a/libs/wingc/src/jsify/snapshots/read_primitive_value.snap +++ b/libs/wingc/src/jsify/snapshots/read_primitive_value.snap @@ -44,26 +44,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $x: ${context._lift(x)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/reassign_captured_variable.snap b/libs/wingc/src/jsify/snapshots/reassign_captured_variable.snap index 9d482a1db29..ea829512716 100644 --- a/libs/wingc/src/jsify/snapshots/reassign_captured_variable.snap +++ b/libs/wingc/src/jsify/snapshots/reassign_captured_variable.snap @@ -53,25 +53,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/ref_std_macro.snap b/libs/wingc/src/jsify/snapshots/ref_std_macro.snap index da141162b4a..154c49dfb98 100644 --- a/libs/wingc/src/jsify/snapshots/ref_std_macro.snap +++ b/libs/wingc/src/jsify/snapshots/ref_std_macro.snap @@ -44,26 +44,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $arr_length: ${context._lift(arr.length)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/reference_from_static_inflight.snap b/libs/wingc/src/jsify/snapshots/reference_from_static_inflight.snap index 52ca85a6c18..de43edbd6f2 100644 --- a/libs/wingc/src/jsify/snapshots/reference_from_static_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/reference_from_static_inflight.snap @@ -43,25 +43,27 @@ class $Root extends $stdlib.std.Resource { class MyType extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("staticMethod", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyType-1.js")({ $s: ${context._lift(s)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyTypeClient = ${MyType._toInflightType(this).text}; + const MyTypeClient = ${MyType._toInflightType(this)}; const client = new MyTypeClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["staticMethod", "$inflight_init"]; } static _registerTypeBind(host, ops) { if (ops.includes("staticMethod")) { diff --git a/libs/wingc/src/jsify/snapshots/reference_inflight_class.snap b/libs/wingc/src/jsify/snapshots/reference_inflight_class.snap index 872a568ab74..9c7abcefac2 100644 --- a/libs/wingc/src/jsify/snapshots/reference_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/reference_inflight_class.snap @@ -59,49 +59,53 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("a", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["a", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $Foo: ${context._lift(Foo)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/reference_inflight_field.snap b/libs/wingc/src/jsify/snapshots/reference_inflight_field.snap index 0911173ba05..2a74151c3cd 100644 --- a/libs/wingc/src/jsify/snapshots/reference_inflight_field.snap +++ b/libs/wingc/src/jsify/snapshots/reference_inflight_field.snap @@ -50,24 +50,26 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("method", "$inflight_init", "x"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["x", "method", "$inflight_init"]; } } } diff --git a/libs/wingc/src/jsify/snapshots/reference_inflight_from_inflight.snap b/libs/wingc/src/jsify/snapshots/reference_inflight_from_inflight.snap index ccaa6f62335..f7fa8f10e6a 100644 --- a/libs/wingc/src/jsify/snapshots/reference_inflight_from_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/reference_inflight_from_inflight.snap @@ -71,25 +71,27 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foofoo1", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ $s: ${context._lift(s)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foofoo1", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("foofoo1")) { @@ -101,26 +103,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $Foo: ${context._lift(Foo)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const s = "hello"; diff --git a/libs/wingc/src/jsify/snapshots/reference_preflight_field.snap b/libs/wingc/src/jsify/snapshots/reference_preflight_field.snap index 2a732ee7407..bd5e7edfaea 100644 --- a/libs/wingc/src/jsify/snapshots/reference_preflight_field.snap +++ b/libs/wingc/src/jsify/snapshots/reference_preflight_field.snap @@ -48,26 +48,28 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("method", "$inflight_init"); this.x = "world"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ $this_x: ${this._lift(this.x)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["method", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { diff --git a/libs/wingc/src/jsify/snapshots/reference_preflight_field_call_independent_method.snap b/libs/wingc/src/jsify/snapshots/reference_preflight_field_call_independent_method.snap index 7db3fbdbe53..e6a997fd0fd 100644 --- a/libs/wingc/src/jsify/snapshots/reference_preflight_field_call_independent_method.snap +++ b/libs/wingc/src/jsify/snapshots/reference_preflight_field_call_independent_method.snap @@ -48,26 +48,28 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("method", "$inflight_init"); this.arr = ["hello", "world"]; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ $_this_arr_at_1__: ${this._lift((this.arr.at(1)))}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["method", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { diff --git a/libs/wingc/src/jsify/snapshots/reference_preflight_fields.snap b/libs/wingc/src/jsify/snapshots/reference_preflight_fields.snap index cb2515b9488..ce1ddedefae 100644 --- a/libs/wingc/src/jsify/snapshots/reference_preflight_fields.snap +++ b/libs/wingc/src/jsify/snapshots/reference_preflight_fields.snap @@ -65,20 +65,19 @@ class $Root extends $stdlib.std.Resource { class MyType extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("boom", "bam", "$inflight_init"); this.s = "hello"; this.b = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyType-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyTypeClient = ${MyType._toInflightType(this).text}; + const MyTypeClient = ${MyType._toInflightType(this)}; const client = new MyTypeClient({ $this_b: ${this._lift(this.b)}, $this_s_length: ${this._lift(this.s.length)}, @@ -86,7 +85,10 @@ class $Root extends $stdlib.std.Resource { if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["boom", "bam", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { diff --git a/libs/wingc/src/jsify/snapshots/reference_preflight_free_variable_with_this_in_the_expression.snap b/libs/wingc/src/jsify/snapshots/reference_preflight_free_variable_with_this_in_the_expression.snap index e649aa44992..77aef0e3983 100644 --- a/libs/wingc/src/jsify/snapshots/reference_preflight_free_variable_with_this_in_the_expression.snap +++ b/libs/wingc/src/jsify/snapshots/reference_preflight_free_variable_with_this_in_the_expression.snap @@ -52,27 +52,29 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("method", "$inflight_init"); this.name = "my_object"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ $this_name: ${this._lift(this.name)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["method", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { diff --git a/libs/wingc/src/jsify/snapshots/reference_preflight_object_from_static_inflight.snap b/libs/wingc/src/jsify/snapshots/reference_preflight_object_from_static_inflight.snap index 8953e449c30..efdab3f5033 100644 --- a/libs/wingc/src/jsify/snapshots/reference_preflight_object_from_static_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/reference_preflight_object_from_static_inflight.snap @@ -46,25 +46,27 @@ class $Root extends $stdlib.std.Resource { class MyType extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("addToQueue", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyType-1.js")({ $q: ${context._lift(q)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyTypeClient = ${MyType._toInflightType(this).text}; + const MyTypeClient = ${MyType._toInflightType(this)}; const client = new MyTypeClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["addToQueue", "$inflight_init"]; } static _registerTypeBind(host, ops) { if (ops.includes("addToQueue")) { diff --git a/libs/wingc/src/jsify/snapshots/reference_static_inflight.snap b/libs/wingc/src/jsify/snapshots/reference_static_inflight.snap index 6c16089e092..76ae3c3e66a 100644 --- a/libs/wingc/src/jsify/snapshots/reference_static_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/reference_static_inflight.snap @@ -60,49 +60,53 @@ class $Root extends $stdlib.std.Resource { class MyType extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("myStaticMethod", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyType-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyTypeClient = ${MyType._toInflightType(this).text}; + const MyTypeClient = ${MyType._toInflightType(this)}; const client = new MyTypeClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["myStaticMethod", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $MyType: ${context._lift(MyType)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/reference_static_inflight_which_references_preflight_object.snap b/libs/wingc/src/jsify/snapshots/reference_static_inflight_which_references_preflight_object.snap index 231175df245..18ef92e84a7 100644 --- a/libs/wingc/src/jsify/snapshots/reference_static_inflight_which_references_preflight_object.snap +++ b/libs/wingc/src/jsify/snapshots/reference_static_inflight_which_references_preflight_object.snap @@ -70,25 +70,27 @@ class $Root extends $stdlib.std.Resource { class MyType extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("staticMethod", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyType-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyTypeClient = ${MyType._toInflightType(this).text}; + const MyTypeClient = ${MyType._toInflightType(this)}; const client = new MyTypeClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["staticMethod", "$inflight_init"]; } static _registerTypeBind(host, ops) { if (ops.includes("staticMethod")) { @@ -100,26 +102,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $MyType: ${context._lift(MyType)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/static_external_inflight_class.snap b/libs/wingc/src/jsify/snapshots/static_external_inflight_class.snap index 449ac73a011..fea740fd5c1 100644 --- a/libs/wingc/src/jsify/snapshots/static_external_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/static_external_inflight_class.snap @@ -70,49 +70,53 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foo", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $A: ${context._lift(A)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/static_external_preflight_class.snap b/libs/wingc/src/jsify/snapshots/static_external_preflight_class.snap index 86e02439895..93435d867c7 100644 --- a/libs/wingc/src/jsify/snapshots/static_external_preflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/static_external_preflight_class.snap @@ -69,49 +69,53 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foo", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $A: ${context._lift(A)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/static_inflight_operation.snap b/libs/wingc/src/jsify/snapshots/static_inflight_operation.snap index 168ce60b9cd..fd90f83ada7 100644 --- a/libs/wingc/src/jsify/snapshots/static_inflight_operation.snap +++ b/libs/wingc/src/jsify/snapshots/static_inflight_operation.snap @@ -67,25 +67,27 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("myop", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["myop", "$inflight_init"]; } static _registerTypeBind(host, ops) { if (ops.includes("myop")) { @@ -97,26 +99,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $A: ${context._lift(A)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/static_local_inflight_class.snap b/libs/wingc/src/jsify/snapshots/static_local_inflight_class.snap index b7437a15e90..3c95e889d0e 100644 --- a/libs/wingc/src/jsify/snapshots/static_local_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/static_local_inflight_class.snap @@ -62,25 +62,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/static_on_std_type.snap b/libs/wingc/src/jsify/snapshots/static_on_std_type.snap index f6cab58ca16..30bd3aa2542 100644 --- a/libs/wingc/src/jsify/snapshots/static_on_std_type.snap +++ b/libs/wingc/src/jsify/snapshots/static_on_std_type.snap @@ -44,27 +44,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $std_Json: ${context._lift(std.Json)}, $std_String: ${context._lift(std.String)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/transitive_reference.snap b/libs/wingc/src/jsify/snapshots/transitive_reference.snap index 05a4eb83eed..e43de2e8ad0 100644 --- a/libs/wingc/src/jsify/snapshots/transitive_reference.snap +++ b/libs/wingc/src/jsify/snapshots/transitive_reference.snap @@ -85,26 +85,28 @@ class $Root extends $stdlib.std.Resource { class MyType extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("isEmpty", "checkIfEmpty", "$inflight_init"); this.b = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyType-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyTypeClient = ${MyType._toInflightType(this).text}; + const MyTypeClient = ${MyType._toInflightType(this)}; const client = new MyTypeClient({ $this_b: ${this._lift(this.b)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["isEmpty", "checkIfEmpty", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -122,26 +124,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $t: ${context._lift(t)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/transitive_reference_via_inflight_class.snap b/libs/wingc/src/jsify/snapshots/transitive_reference_via_inflight_class.snap index 315edba51eb..01847a619df 100644 --- a/libs/wingc/src/jsify/snapshots/transitive_reference_via_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/transitive_reference_via_inflight_class.snap @@ -68,25 +68,27 @@ class $Root extends $stdlib.std.Resource { class MyInflightClass extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("putInBucket", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyInflightClass-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyInflightClassClient = ${MyInflightClass._toInflightType(this).text}; + const MyInflightClassClient = ${MyInflightClass._toInflightType(this)}; const client = new MyInflightClassClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["putInBucket", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("putInBucket")) { @@ -98,26 +100,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $MyInflightClass: ${context._lift(MyInflightClass)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const b = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); diff --git a/libs/wingc/src/jsify/snapshots/transitive_reference_via_static.snap b/libs/wingc/src/jsify/snapshots/transitive_reference_via_static.snap index 76fa4b9e175..b0847c1b0e8 100644 --- a/libs/wingc/src/jsify/snapshots/transitive_reference_via_static.snap +++ b/libs/wingc/src/jsify/snapshots/transitive_reference_via_static.snap @@ -90,25 +90,27 @@ class $Root extends $stdlib.std.Resource { class MyType extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("putInBucket", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyType-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyTypeClient = ${MyType._toInflightType(this).text}; + const MyTypeClient = ${MyType._toInflightType(this)}; const client = new MyTypeClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["putInBucket", "$inflight_init"]; } static _registerTypeBind(host, ops) { if (ops.includes("putInBucket")) { @@ -120,25 +122,27 @@ class $Root extends $stdlib.std.Resource { class YourType extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("putIndirect", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.YourType-1.js")({ $MyType: ${context._lift(MyType)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const YourTypeClient = ${YourType._toInflightType(this).text}; + const YourTypeClient = ${YourType._toInflightType(this)}; const client = new YourTypeClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["putIndirect", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("putIndirect")) { @@ -150,26 +154,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $t: ${context._lift(t)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/two_identical_lifts.snap b/libs/wingc/src/jsify/snapshots/two_identical_lifts.snap index 2f8c690dd65..5aa56669c9d 100644 --- a/libs/wingc/src/jsify/snapshots/two_identical_lifts.snap +++ b/libs/wingc/src/jsify/snapshots/two_identical_lifts.snap @@ -54,26 +54,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/unqualified_lift_of_collection.snap b/libs/wingc/src/jsify/snapshots/unqualified_lift_of_collection.snap index f8e2020f0a5..31fe6ecbb73 100644 --- a/libs/wingc/src/jsify/snapshots/unqualified_lift_of_collection.snap +++ b/libs/wingc/src/jsify/snapshots/unqualified_lift_of_collection.snap @@ -44,26 +44,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $a: ${context._lift(a)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/libs/wingc/src/jsify/snapshots/use_util_functions.snap b/libs/wingc/src/jsify/snapshots/use_util_functions.snap index 8158ce81b3b..7b2885f7db8 100644 --- a/libs/wingc/src/jsify/snapshots/use_util_functions.snap +++ b/libs/wingc/src/jsify/snapshots/use_util_functions.snap @@ -43,26 +43,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure1(this,"$Closure1")); diff --git a/libs/wingc/src/jsify/snapshots/var_inflight_field_from_inflight.snap b/libs/wingc/src/jsify/snapshots/var_inflight_field_from_inflight.snap index 18855fe4f9b..6e5332b7e57 100644 --- a/libs/wingc/src/jsify/snapshots/var_inflight_field_from_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/var_inflight_field_from_inflight.snap @@ -50,24 +50,26 @@ class $Root extends $stdlib.std.Resource { class MyType extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init", "s"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyType-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyTypeClient = ${MyType._toInflightType(this).text}; + const MyTypeClient = ${MyType._toInflightType(this)}; const client = new MyTypeClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["s", "foo", "$inflight_init"]; } } } diff --git a/libs/wingc/src/jsify/snapshots/wait_util.snap b/libs/wingc/src/jsify/snapshots/wait_util.snap index f9add8f3206..45cfbd730dc 100644 --- a/libs/wingc/src/jsify/snapshots/wait_util.snap +++ b/libs/wingc/src/jsify/snapshots/wait_util.snap @@ -51,26 +51,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const foo = "test"; diff --git a/libs/wingc/src/lsp/snapshots/completions/capture_in_test.snap b/libs/wingc/src/lsp/snapshots/completions/capture_in_test.snap index 145e11cfea0..8e1a6ccd9e6 100644 --- a/libs/wingc/src/lsp/snapshots/completions/capture_in_test.snap +++ b/libs/wingc/src/lsp/snapshots/completions/capture_in_test.snap @@ -1,13 +1,6 @@ --- source: libs/wingc/src/lsp/completions.rs --- -- label: display - kind: 5 - detail: Display - documentation: - kind: markdown - value: "```wing\npreflight display: Display\n```\n---\nInformation on how to display a resource in the UI." - sortText: ab|display - label: node kind: 5 detail: Node diff --git a/libs/wingsdk/.projen/deps.json b/libs/wingsdk/.projen/deps.json index 663b3b5cc13..5b87d21c565 100644 --- a/libs/wingsdk/.projen/deps.json +++ b/libs/wingsdk/.projen/deps.json @@ -67,7 +67,7 @@ }, { "name": "constructs", - "version": "~10.1.314", + "version": "~10.2.69", "type": "build" }, { @@ -291,12 +291,12 @@ }, { "name": "constructs", - "version": "~10.1.314", + "version": "~10.2.69", "type": "peer" }, { "name": "constructs", - "version": "~10.1.314", + "version": "~10.2.69", "type": "runtime" } ], diff --git a/libs/wingsdk/.projenrc.ts b/libs/wingsdk/.projenrc.ts index c48909d83c3..b6c52a838a1 100644 --- a/libs/wingsdk/.projenrc.ts +++ b/libs/wingsdk/.projenrc.ts @@ -23,7 +23,7 @@ if (undocumentedResources.length) { ); } -const JSII_DEPS = ["constructs@~10.1.314"]; +const JSII_DEPS = ["constructs@~10.2.69"]; const CDKTF_VERSION = "0.17.0"; const CDKTF_PROVIDERS = [ diff --git a/libs/wingsdk/package.json b/libs/wingsdk/package.json index ea93690be0e..976e8d19399 100644 --- a/libs/wingsdk/package.json +++ b/libs/wingsdk/package.json @@ -52,7 +52,7 @@ "aws-sdk-client-mock-jest": "^2.0.1", "bump-pack": "workspace:^", "cdktf-cli": "0.17.0", - "constructs": "~10.1.314", + "constructs": "~10.2.69", "eslint": "^8", "eslint-config-prettier": "^8.6.0", "eslint-import-resolver-node": "^0.3.7", @@ -75,7 +75,7 @@ "wing-api-checker": "workspace:^" }, "peerDependencies": { - "constructs": "~10.1.314" + "constructs": "~10.2.69" }, "dependencies": { "@aws-sdk/client-cloudwatch-logs": "3.354.0", @@ -98,7 +98,7 @@ "@types/aws-lambda": "^8.10.109", "aws-cdk-lib": "^2.64.0", "cdktf": "0.17.0", - "constructs": "~10.1.314", + "constructs": "~10.2.69", "cron-parser": "^4.8.1", "esbuild-wasm": "^0.18.5", "express": "^4.18.2", diff --git a/libs/wingsdk/src/cloud/api.ts b/libs/wingsdk/src/cloud/api.ts index 9ee759ed0d5..d1bd395f397 100644 --- a/libs/wingsdk/src/cloud/api.ts +++ b/libs/wingsdk/src/cloud/api.ts @@ -1,7 +1,7 @@ import { Construct } from "constructs"; import { fqnForType } from "../constants"; import { App } from "../core"; -import { IResource, Resource } from "../std/resource"; +import { IResource, Node, Resource } from "../std"; /** * Global identifier for `Api`. @@ -60,9 +60,15 @@ export abstract class Api extends Resource { props; - this.display.title = "Api"; - this.display.description = "A REST API endpoint"; + Node.of(this).title = "Api"; + Node.of(this).description = "A REST API endpoint"; } + + /** @internal */ + public _getInflightOps(): string[] { + return []; + } + /** * Add a inflight handler to the api for GET requests on the given path. * @param path The path to handle GET requests for. diff --git a/libs/wingsdk/src/cloud/bucket.ts b/libs/wingsdk/src/cloud/bucket.ts index c637f61a226..eff73f9f7a4 100644 --- a/libs/wingsdk/src/cloud/bucket.ts +++ b/libs/wingsdk/src/cloud/bucket.ts @@ -3,9 +3,9 @@ import { isAbsolute, resolve } from "path"; import { Construct } from "constructs"; import { Topic } from "./topic"; import { fqnForType } from "../constants"; -import { App, Connections } from "../core"; +import { App } from "../core"; import { convertBetweenHandlers } from "../shared/convert"; -import { Json, IResource, Resource } from "../std"; +import { Json, IResource, Node, Resource } from "../std"; /** * Global identifier for `Bucket`. @@ -43,16 +43,19 @@ export abstract class Bucket extends Resource { /** @internal */ protected readonly _topics = new Map(); - private scope: Construct; constructor(scope: Construct, id: string, props: BucketProps = {}) { super(scope, id); - this.display.title = "Bucket"; - this.display.description = "A cloud object store"; - this.scope = scope; + Node.of(this).title = "Bucket"; + Node.of(this).description = "A cloud object store"; - this._addInflightOps( + props; + } + + /** @internal */ + public _getInflightOps(): string[] { + return [ BucketInflightMethods.DELETE, BucketInflightMethods.GET, BucketInflightMethods.GET_JSON, @@ -63,10 +66,8 @@ export abstract class Bucket extends Resource { BucketInflightMethods.EXISTS, BucketInflightMethods.TRY_GET, BucketInflightMethods.TRY_GET_JSON, - BucketInflightMethods.TRY_DELETE - ); - - props; + BucketInflightMethods.TRY_DELETE, + ]; } /** @@ -90,13 +91,14 @@ export abstract class Bucket extends Resource { path: string, encoding: BufferEncoding = "utf-8" ): void { + const app = App.of(this); if (isAbsolute(path)) { path = path; } else { - if (!App.of(this.scope).entrypointDir) { + if (!app.entrypointDir) { throw new Error("Missing environment variable: WING_SOURCE_DIR"); } - path = resolve(App.of(this.scope).entrypointDir, path); + path = resolve(app.entrypointDir, path); } const data = fs.readFileSync(path, { encoding: encoding }); @@ -116,7 +118,7 @@ export abstract class Bucket extends Resource { this.node.addDependency(topic); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: topic, name: `${actionType}()`, @@ -348,30 +350,22 @@ export interface IBucketClient { /** * `onCreate` event options */ -export interface BucketOnCreateProps { - /* Elided */ -} +export interface BucketOnCreateProps {} /** * `onDelete` event options */ -export interface BucketOnDeleteProps { - /* Elided */ -} +export interface BucketOnDeleteProps {} /** * `onUpdate` event options */ -export interface BucketOnUpdateProps { - /* Elided */ -} +export interface BucketOnUpdateProps {} /** * `onEvent` options */ -export interface BucketOnEventProps { - /* Elided */ -} +export interface BucketOnEventProps {} /** * A resource with an inflight "handle" method that can be passed to diff --git a/libs/wingsdk/src/cloud/counter.ts b/libs/wingsdk/src/cloud/counter.ts index 3527ba86db1..aa8365e0425 100644 --- a/libs/wingsdk/src/cloud/counter.ts +++ b/libs/wingsdk/src/cloud/counter.ts @@ -1,7 +1,7 @@ import { Construct } from "constructs"; import { fqnForType } from "../constants"; import { App } from "../core"; -import { Resource } from "../std"; +import { Node, Resource } from "../std"; /** * Global identifier for `Counter`. @@ -44,17 +44,20 @@ export abstract class Counter extends Resource { constructor(scope: Construct, id: string, props: CounterProps = {}) { super(scope, id); - this.display.title = "Counter"; - this.display.description = "A distributed atomic counter"; + Node.of(this).title = "Counter"; + Node.of(this).description = "A distributed atomic counter"; - this._addInflightOps( + this.initial = props.initial ?? 0; + } + + /** @internal */ + public _getInflightOps(): string[] { + return [ CounterInflightMethods.INC, CounterInflightMethods.DEC, CounterInflightMethods.PEEK, - CounterInflightMethods.SET - ); - - this.initial = props.initial ?? 0; + CounterInflightMethods.SET, + ]; } } diff --git a/libs/wingsdk/src/cloud/function.ts b/libs/wingsdk/src/cloud/function.ts index 1ab7495b7b8..ef2634c78fc 100644 --- a/libs/wingsdk/src/cloud/function.ts +++ b/libs/wingsdk/src/cloud/function.ts @@ -2,10 +2,9 @@ import { mkdirSync, writeFileSync } from "fs"; import { join } from "path"; import { Construct } from "constructs"; import { fqnForType } from "../constants"; -import { App } from "../core/app"; +import { App } from "../core"; import { CaseConventions, ResourceNames } from "../shared/resource-names"; -import { Duration } from "../std/duration"; -import { IInflightHost, IResource, Resource } from "../std/resource"; +import { Duration, IInflightHost, IResource, Node, Resource } from "../std"; /** * Global identifier for `Function`. @@ -69,10 +68,8 @@ export abstract class Function extends Resource implements IInflightHost { ) { super(scope, id); - this.display.title = "Function"; - this.display.description = "A cloud function (FaaS)"; - - this._addInflightOps(FunctionInflightMethods.INVOKE); + Node.of(this).title = "Function"; + Node.of(this).description = "A cloud function (FaaS)"; for (const [key, value] of Object.entries(props.env ?? {})) { this.addEnvironment(key, value); @@ -86,7 +83,7 @@ export abstract class Function extends Resource implements IInflightHost { const lines = new Array(); lines.push("exports.handler = async function(event) {"); - lines.push(` return await (${inflightClient.text}).handle(event);`); + lines.push(` return await (${inflightClient}).handle(event);`); lines.push("};"); const assetName = ResourceNames.generateName(this, { @@ -110,6 +107,11 @@ export abstract class Function extends Resource implements IInflightHost { } } + /** @internal */ + public _getInflightOps(): string[] { + return [FunctionInflightMethods.INVOKE]; + } + /** * Add an environment variable to the function. */ diff --git a/libs/wingsdk/src/cloud/on-deploy.ts b/libs/wingsdk/src/cloud/on-deploy.ts index fd747b92985..9157aabcaca 100644 --- a/libs/wingsdk/src/cloud/on-deploy.ts +++ b/libs/wingsdk/src/cloud/on-deploy.ts @@ -2,7 +2,7 @@ import { Construct } from "constructs"; import { FunctionProps } from "./function"; import { fqnForType } from "../constants"; import { App } from "../core"; -import { IResource, Resource } from "../std"; +import { IResource, Node, Resource } from "../std"; /** * Global identifier for `OnDeploy`. @@ -53,12 +53,17 @@ export abstract class OnDeploy extends Resource { ) { super(scope, id); - this.display.title = "OnDeploy"; - this.display.description = "Run code during the app's deployment."; + Node.of(this).title = "OnDeploy"; + Node.of(this).description = "Run code during the app's deployment."; handler; props; } + + /** @internal */ + public _getInflightOps(): string[] { + return []; + } } /** diff --git a/libs/wingsdk/src/cloud/queue.ts b/libs/wingsdk/src/cloud/queue.ts index 3ef33ec9fa6..152d219f1c0 100644 --- a/libs/wingsdk/src/cloud/queue.ts +++ b/libs/wingsdk/src/cloud/queue.ts @@ -2,7 +2,7 @@ import { Construct } from "constructs"; import { Function, FunctionProps } from "./function"; import { fqnForType } from "../constants"; import { App } from "../core"; -import { Duration, IResource, Resource } from "../std"; +import { Duration, IResource, Node, Resource } from "../std"; /** * Global identifier for `Queue`. @@ -47,17 +47,20 @@ export abstract class Queue extends Resource { constructor(scope: Construct, id: string, props: QueueProps = {}) { super(scope, id); - this.display.title = "Queue"; - this.display.description = "A distributed message queue"; + Node.of(this).title = "Queue"; + Node.of(this).description = "A distributed message queue"; - this._addInflightOps( + props; + } + + /** @internal */ + public _getInflightOps(): string[] { + return [ QueueInflightMethods.PUSH, QueueInflightMethods.PURGE, QueueInflightMethods.APPROX_SIZE, - QueueInflightMethods.POP - ); - - props; + QueueInflightMethods.POP, + ]; } /** diff --git a/libs/wingsdk/src/cloud/schedule.ts b/libs/wingsdk/src/cloud/schedule.ts index 43cbcf08d75..6f9bdec6cfd 100644 --- a/libs/wingsdk/src/cloud/schedule.ts +++ b/libs/wingsdk/src/cloud/schedule.ts @@ -2,7 +2,7 @@ import { Construct } from "constructs"; import { Function, FunctionProps } from "./function"; import { fqnForType } from "../constants"; import { App } from "../core"; -import { Duration, IResource, Resource } from "../std"; +import { Duration, IResource, Node, Resource } from "../std"; /** * Global identifier for `Schedule`. @@ -50,8 +50,8 @@ export abstract class Schedule extends Resource { constructor(scope: Construct, id: string, props: ScheduleProps = {}) { super(scope, id); - this.display.title = "Schedule"; - this.display.description = + Node.of(this).title = "Schedule"; + Node.of(this).description = "A cloud schedule to trigger events at regular intervals"; const { cron, rate } = props; @@ -77,6 +77,11 @@ export abstract class Schedule extends Resource { } } + /** @internal */ + public _getInflightOps(): string[] { + return []; + } + /** * Create a function that runs when receiving the scheduled event. */ diff --git a/libs/wingsdk/src/cloud/secret.ts b/libs/wingsdk/src/cloud/secret.ts index 8dbd0a8764c..8810a0c18d2 100644 --- a/libs/wingsdk/src/cloud/secret.ts +++ b/libs/wingsdk/src/cloud/secret.ts @@ -1,7 +1,7 @@ import { Construct } from "constructs"; import { fqnForType } from "../constants"; import { App } from "../core"; -import { Json, Resource } from "../std"; +import { Json, Node, Resource } from "../std"; /** * Global identifier for `Secret`. @@ -45,16 +45,16 @@ export abstract class Secret extends Resource { constructor(scope: Construct, id: string, props: SecretProps = {}) { super(scope, id); - this.display.title = "Secret"; - this.display.description = "A cloud secret"; - - this._addInflightOps( - SecretInflightMethods.VALUE, - SecretInflightMethods.VALUE_JSON - ); + Node.of(this).title = "Secret"; + Node.of(this).description = "A cloud secret"; props; } + + /** @internal */ + public _getInflightOps(): string[] { + return [SecretInflightMethods.VALUE, SecretInflightMethods.VALUE_JSON]; + } } /** diff --git a/libs/wingsdk/src/cloud/service.ts b/libs/wingsdk/src/cloud/service.ts index 49a5933377d..fd2a4bcce80 100644 --- a/libs/wingsdk/src/cloud/service.ts +++ b/libs/wingsdk/src/cloud/service.ts @@ -2,7 +2,7 @@ import { Construct } from "constructs"; import { FunctionProps } from "./function"; import { fqnForType } from "../constants"; import { App } from "../core"; -import { IResource, Resource } from "../std"; +import { IResource, Node, Resource } from "../std"; /** * Global identifier for `Service`. @@ -50,16 +50,16 @@ export abstract class Service extends Resource { constructor(scope: Construct, id: string, props: ServiceProps) { super(scope, id); - this.display.title = "Service"; - this.display.description = "A cloud service"; - - this._addInflightOps( - ServiceInflightMethods.START, - ServiceInflightMethods.STOP - ); + Node.of(this).title = "Service"; + Node.of(this).description = "A cloud service"; props; } + + /** @internal */ + public _getInflightOps(): string[] { + return [ServiceInflightMethods.START, ServiceInflightMethods.STOP]; + } } /** diff --git a/libs/wingsdk/src/cloud/topic.ts b/libs/wingsdk/src/cloud/topic.ts index d079aac4b03..c1de181c30f 100644 --- a/libs/wingsdk/src/cloud/topic.ts +++ b/libs/wingsdk/src/cloud/topic.ts @@ -2,7 +2,7 @@ import { Construct } from "constructs"; import { Function, FunctionProps } from "./function"; import { fqnForType } from "../constants"; import { App } from "../core"; -import { IResource, Resource } from "../std"; +import { IResource, Node, Resource } from "../std"; export const TOPIC_FQN = fqnForType("cloud.Topic"); @@ -32,14 +32,17 @@ export abstract class Topic extends Resource { constructor(scope: Construct, id: string, props: TopicProps = {}) { super(scope, id); - this.display.title = "Topic"; - this.display.description = "A pub/sub notification topic"; - - this._addInflightOps(TopicInflightMethods.PUBLISH); + Node.of(this).title = "Topic"; + Node.of(this).description = "A pub/sub notification topic"; props; } + /** @internal */ + public _getInflightOps(): string[] { + return [TopicInflightMethods.PUBLISH]; + } + /** * Run an inflight whenever an message is published to the topic. */ diff --git a/libs/wingsdk/src/cloud/website.ts b/libs/wingsdk/src/cloud/website.ts index 540f2b46fad..0c789fb8e40 100644 --- a/libs/wingsdk/src/cloud/website.ts +++ b/libs/wingsdk/src/cloud/website.ts @@ -2,7 +2,7 @@ import { isAbsolute, resolve } from "path"; import { Construct } from "constructs"; import { fqnForType } from "../constants"; import { App } from "../core"; -import { Json, Resource } from "../std"; +import { Json, Node, Resource } from "../std"; /** * Global identifier for `Website`. @@ -53,8 +53,8 @@ export abstract class Website extends Resource { constructor(scope: Construct, id: string, props: WebsiteProps) { super(scope, id); - this.display.title = "Website"; - this.display.description = "A static website"; + Node.of(this).title = "Website"; + Node.of(this).description = "A static website"; if (isAbsolute(props.path)) { this._path = props.path; @@ -68,6 +68,11 @@ export abstract class Website extends Resource { this._domain = props.domain; } + /** @internal */ + public _getInflightOps(): string[] { + return []; + } + /** * Absolute local path to the website's static files. */ diff --git a/libs/wingsdk/src/core/inflight.ts b/libs/wingsdk/src/core/inflight.ts index 3f77a7df93a..dc7a1603989 100644 --- a/libs/wingsdk/src/core/inflight.ts +++ b/libs/wingsdk/src/core/inflight.ts @@ -1,87 +1,8 @@ -import { createHash } from "crypto"; -import { readFileSync } from "fs"; import { basename } from "path"; import { normalPath } from "../shared/misc"; -/** - * Reference to a piece of code. - */ -export abstract class Code { - /** - * The language of the code. - */ - public abstract readonly language: Language; - - /** - * The code. - */ - public abstract readonly text: string; - - /** - * Generate a hash of the code contents. - */ - public get hash(): string { - return createHash("sha512").update(this.text).digest("hex"); - } -} - -/** - * The language of a piece of code. - */ -export enum Language { - /** Node.js */ - NODE_JS = "nodejs", -} - -/** - * Reference to a piece of Node.js code. - */ -export class NodeJsCode extends Code { - /** - * Reference code from a file path. - */ - public static fromFile(path: string) { - return new NodeJsCode(readFileSync(path, "utf-8")); - } - - /** - * Reference code directly from a string. - */ - public static fromInline(text: string) { - return new NodeJsCode(text); - } - - public readonly language = Language.NODE_JS; - public readonly text: string; - - private constructor(text: string) { - super(); - this.text = text; - } -} - export type InflightBindings = Record; -/** - * Props for `Inflight`. - */ -export interface InflightProps { - /** - * Reference to the inflight code. Only JavaScript code is currently - * supported. - * - * The JavaScript code needs be in the form `async handle(event) { ... }`, and - * all references to resources must be made through `this.`. - */ - readonly code: Code; - - /** - * Data and resource binding information. - * @default - no bindings - */ - readonly bindings?: InflightBindings; -} - /** * An inflight binding. */ @@ -102,30 +23,26 @@ export interface InflightBinding { */ export class InflightClient { /** - * Creates a `Code` instance with code for creating an inflight client. + * Returns code for creating an inflight client. */ public static for( dirname: string, filename: string, clientClass: string, args: string[] - ): Code { + ): string { const inflightDir = dirname; const inflightFile = basename(filename).split(".")[0] + ".inflight"; - return NodeJsCode.fromInline( - `new (require("${normalPath( - `${inflightDir}/${inflightFile}` - )}")).${clientClass}(${args.join(", ")})` - ); + return `new (require("${normalPath( + `${inflightDir}/${inflightFile}` + )}")).${clientClass}(${args.join(", ")})`; } /** - * Returns a `Code` instance with code for implementing `_toInflightType()`. + * Returns code for implementing `_toInflightType()`. */ - public static forType(filename: string, clientClass: string): Code { - return NodeJsCode.fromInline( - `require("${normalPath(filename)}").${clientClass}` - ); + public static forType(filename: string, clientClass: string): string { + return `require("${normalPath(filename)}").${clientClass}`; } private constructor() {} diff --git a/libs/wingsdk/src/core/internal.ts b/libs/wingsdk/src/core/internal.ts index f835d89fce5..5df8521a68b 100644 --- a/libs/wingsdk/src/core/internal.ts +++ b/libs/wingsdk/src/core/internal.ts @@ -17,7 +17,7 @@ export function liftObject(scope: IConstruct, obj: any): string { // if the object is a type, and it has a "_toInflightType" method, we use it to serialize // fyi, typeof(obj) in this case is a "function". if (typeof obj?._toInflightType === "function") { - return obj._toInflightType(scope).text; + return obj._toInflightType(scope); } switch (typeof obj) { @@ -50,7 +50,7 @@ export function liftObject(scope: IConstruct, obj: any): string { // if the object is a resource (i.e. has a "_toInflight" method"), we use it to serialize // itself. if (typeof (obj as IResource)._toInflight === "function") { - return (obj as IResource)._toInflight().text; + return (obj as IResource)._toInflight(); } // structs are just plain objects diff --git a/libs/wingsdk/src/core/tree.ts b/libs/wingsdk/src/core/tree.ts index 440f734eacd..9bbd9fbce47 100644 --- a/libs/wingsdk/src/core/tree.ts +++ b/libs/wingsdk/src/core/tree.ts @@ -2,7 +2,7 @@ import * as fs from "fs"; import * as path from "path"; import { IConstruct } from "constructs"; import { App } from "./app"; -import { IResource, Resource } from "../std/resource"; +import { IResource, Node, Resource } from "../std"; export const TREE_FILE_PATH = "tree.json"; @@ -153,9 +153,13 @@ function synthDisplay(construct: IConstruct): DisplayInfo | undefined { if (!isIResource(construct)) { return; } - const { display } = construct; + const display = Node.of(construct); if (display.description || display.title || display.hidden) { - return display; + return { + title: display.title, + description: display.description, + hidden: display.hidden, + }; } return; } diff --git a/libs/wingsdk/src/ex/redis.ts b/libs/wingsdk/src/ex/redis.ts index c3068184cc3..d516ea481b0 100644 --- a/libs/wingsdk/src/ex/redis.ts +++ b/libs/wingsdk/src/ex/redis.ts @@ -1,7 +1,7 @@ import { Construct } from "constructs"; import { fqnForType } from "../constants"; import { App } from "../core"; -import { Resource } from "../std"; +import { Node, Resource } from "../std"; /** * Global identifier for `Bucket`. @@ -25,10 +25,13 @@ export abstract class Redis extends Resource { constructor(scope: Construct, id: string) { super(scope, id); - this.display.title = "Redis"; - this.display.description = "A Redis server"; + Node.of(this).title = "Redis"; + Node.of(this).description = "A Redis server"; + } - this._addInflightOps( + /** @internal */ + public _getInflightOps(): string[] { + return [ RedisInflightMethods.RAW_CLIENT, RedisInflightMethods.URL, RedisInflightMethods.SET, @@ -37,8 +40,8 @@ export abstract class Redis extends Resource { RedisInflightMethods.HGET, RedisInflightMethods.SADD, RedisInflightMethods.SMEMBERS, - RedisInflightMethods.DEL - ); + RedisInflightMethods.DEL, + ]; } } diff --git a/libs/wingsdk/src/ex/table.ts b/libs/wingsdk/src/ex/table.ts index 72521bb6549..719b4ddae50 100644 --- a/libs/wingsdk/src/ex/table.ts +++ b/libs/wingsdk/src/ex/table.ts @@ -1,7 +1,7 @@ import { Construct } from "constructs"; import { fqnForType } from "../constants"; import { App } from "../core"; -import { Json, Resource } from "../std"; +import { Json, Node, Resource } from "../std"; /** * Global identifier for `Table`. @@ -84,8 +84,8 @@ export abstract class Table extends Resource { constructor(scope: Construct, id: string, props: TableProps) { super(scope, id); - this.display.title = "Table"; - this.display.description = + Node.of(this).title = "Table"; + Node.of(this).description = "A cloud NoSQL database table that can be used to store and query data"; if (!props.name) { @@ -101,14 +101,17 @@ export abstract class Table extends Resource { throw new Error("No column is defined"); } this.columns = props.columns; + } - this._addInflightOps( + /** @internal */ + public _getInflightOps(): string[] { + return [ TableInflightMethods.INSERT, TableInflightMethods.UPDATE, TableInflightMethods.DELETE, TableInflightMethods.GET, - TableInflightMethods.LIST - ); + TableInflightMethods.LIST, + ]; } /** diff --git a/libs/wingsdk/src/http/http.ts b/libs/wingsdk/src/http/http.ts index e0f79cf6060..29bfb78d2cb 100644 --- a/libs/wingsdk/src/http/http.ts +++ b/libs/wingsdk/src/http/http.ts @@ -1,4 +1,4 @@ -import { Code, InflightClient } from "../core"; +import { InflightClient } from "../core"; /** * The cache mode of the request. @@ -165,7 +165,7 @@ export class Util { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } /** diff --git a/libs/wingsdk/src/math/math.ts b/libs/wingsdk/src/math/math.ts index e2269c6df3d..0f0340addff 100644 --- a/libs/wingsdk/src/math/math.ts +++ b/libs/wingsdk/src/math/math.ts @@ -1,4 +1,4 @@ -import { Code, InflightClient } from "../core"; +import { InflightClient } from "../core"; /** * Options for rounding a number. @@ -34,7 +34,7 @@ export class Util { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } diff --git a/libs/wingsdk/src/shared/convert.ts b/libs/wingsdk/src/shared/convert.ts index b1fb9f25e55..05fa8b73aa7 100644 --- a/libs/wingsdk/src/shared/convert.ts +++ b/libs/wingsdk/src/shared/convert.ts @@ -1,7 +1,6 @@ import { Construct } from "constructs"; import { normalPath } from "./misc"; -import { NodeJsCode } from "../core"; -import { IInflightHost, IResource, Resource } from "../std"; +import { IInflightHost, IResource, Node, Resource } from "../std"; /** * Convert a resource with a single method into a resource with a different @@ -26,20 +25,21 @@ export function convertBetweenHandlers( constructor(theScope: Construct, theId: string, handler: IResource) { super(theScope, theId); this.handler = handler; - this.display.hidden = true; - this._addInflightOps("handle"); + Node.of(this).hidden = true; this.args = args; } - public _toInflight(): NodeJsCode { + public _getInflightOps(): string[] { + return ["handle"]; + } + + public _toInflight(): string { const handlerClient = this.handler._toInflight(); - return NodeJsCode.fromInline( - `new (require("${normalPath( - newHandlerClientPath - )}")).${newHandlerClientClassName}({ handler: ${ - handlerClient.text - }, args: ${JSON.stringify(this.args)} })` - ); + return `new (require("${normalPath( + newHandlerClientPath + )}")).${newHandlerClientClassName}({ handler: ${handlerClient}, args: ${JSON.stringify( + this.args + )} })`; } public _registerBind(host: IInflightHost, ops: string[]): void { diff --git a/libs/wingsdk/src/std/array.ts b/libs/wingsdk/src/std/array.ts index 7d61e23788f..077d797df4f 100644 --- a/libs/wingsdk/src/std/array.ts +++ b/libs/wingsdk/src/std/array.ts @@ -3,7 +3,7 @@ // TODO: These should be interfaces, currently Wing does not support interface JSII imports import { T1 } from "./generics"; -import { Code, InflightClient } from "../core"; +import { InflightClient } from "../core"; /** * Immutable Array @@ -14,7 +14,7 @@ export class Array { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } @@ -135,7 +135,7 @@ export class MutArray { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } diff --git a/libs/wingsdk/src/std/bool.ts b/libs/wingsdk/src/std/bool.ts index bf9ee536321..ce967a7f6bf 100644 --- a/libs/wingsdk/src/std/bool.ts +++ b/libs/wingsdk/src/std/bool.ts @@ -1,5 +1,5 @@ import { Json } from "./json"; -import { Code, InflightClient } from "../core"; +import { InflightClient } from "../core"; /** * Boolean @@ -24,7 +24,7 @@ export class Boolean { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } diff --git a/libs/wingsdk/src/std/datetime.ts b/libs/wingsdk/src/std/datetime.ts index 86cbc03c1cd..5fc8ac09bb9 100644 --- a/libs/wingsdk/src/std/datetime.ts +++ b/libs/wingsdk/src/std/datetime.ts @@ -1,4 +1,4 @@ -import { Code, InflightClient } from "../core"; +import { InflightClient } from "../core"; /** * Interface that is used for setting Datetime date @@ -46,7 +46,7 @@ export class Datetime { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } /** diff --git a/libs/wingsdk/src/std/duration.ts b/libs/wingsdk/src/std/duration.ts index c3410dc0521..749050f93ec 100644 --- a/libs/wingsdk/src/std/duration.ts +++ b/libs/wingsdk/src/std/duration.ts @@ -1,4 +1,4 @@ -import { Code, InflightClient } from "../core"; +import { InflightClient } from "../core"; /** * Represents a length of time. @@ -8,7 +8,7 @@ export class Duration { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } diff --git a/libs/wingsdk/src/std/index.ts b/libs/wingsdk/src/std/index.ts index 20a20c23409..eafedd393ba 100644 --- a/libs/wingsdk/src/std/index.ts +++ b/libs/wingsdk/src/std/index.ts @@ -5,6 +5,7 @@ export * from "./duration"; export * from "./generics"; export * from "./json"; export * from "./map"; +export * from "./node"; export * from "./number"; export * from "./range"; export * from "./resource"; diff --git a/libs/wingsdk/src/std/json.ts b/libs/wingsdk/src/std/json.ts index 27eed2aba79..6d39d704df8 100644 --- a/libs/wingsdk/src/std/json.ts +++ b/libs/wingsdk/src/std/json.ts @@ -1,4 +1,4 @@ -import { Code, InflightClient } from "../core"; +import { InflightClient } from "../core"; /** * Options for stringify() method. @@ -15,7 +15,7 @@ export class Json { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } @@ -271,7 +271,7 @@ export class MutJson { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } diff --git a/libs/wingsdk/src/std/map.ts b/libs/wingsdk/src/std/map.ts index ab647aa2ed8..a074b2400e4 100644 --- a/libs/wingsdk/src/std/map.ts +++ b/libs/wingsdk/src/std/map.ts @@ -4,7 +4,7 @@ import { Array } from "./array"; import { T1 } from "./generics"; -import { Code, InflightClient } from "../core"; +import { InflightClient } from "../core"; /** * Immutable Map @@ -15,7 +15,7 @@ export class Map { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } @@ -105,7 +105,7 @@ export class MutMap { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } diff --git a/libs/wingsdk/src/std/node.ts b/libs/wingsdk/src/std/node.ts new file mode 100644 index 00000000000..a69349960c8 --- /dev/null +++ b/libs/wingsdk/src/std/node.ts @@ -0,0 +1,349 @@ +import { + IConstruct, + Node as ConstructsNode, + ConstructOrder, + IDependable, + MetadataOptions, + IValidation, +} from "constructs"; +import { Connections } from "../core"; + +const NODE_SYMBOL = Symbol.for("@winglang/sdk.std.Node"); + +export const CONNECTIONS_FILE_PATH = "connections.json"; +export const SDK_SOURCE_MODULE = "@winglang/sdk"; + +/** + * The internal node of a construct. + */ +export class Node { + /** + * Return the internal construct node. + */ + public static of(construct: IConstruct): Node { + let node = (construct as any)[NODE_SYMBOL]; + + if (!node) { + node = new Node(construct); + (construct as any)[NODE_SYMBOL] = node; + } + + return node; + } + + /** + * Title of the construct for display purposes. + */ + public title?: string; + + /** + * Description of the construct for display purposes. + */ + public description?: string; + + /** + * The source file or library where the construct was defined. + */ + public sourceModule?: string; + + /** + * Whether the construct should be hidden by default in tree visualizations. + */ + public hidden?: boolean; + + private readonly _constructsNode: ConstructsNode; + private readonly _connections: Connections; + + private constructor(construct: IConstruct) { + this._constructsNode = construct.node; + this._connections = Connections.of(construct); // tree-unique instance + } + + /** + * Adds a connection between two constructs. A connection is a piece of + * metadata describing how one construct is related to another construct. + */ + public addConnection(props: AddConnectionProps) { + this._connections.add(props); + } + + // ---- constructs 10.x APIs ---- + // https://github.com/aws/constructs/blob/10.x/src/construct.ts + + /** + * Returns the scope in which this construct is defined. + * + * The value is `undefined` at the root of the construct scope tree. + */ + public get scope(): IConstruct | undefined { + return this._constructsNode.scope; + } + + /** + * The id of this construct within the current scope. + * + * This is a a scope-unique id. To obtain an app-unique id for this construct, use `addr`. + */ + public get id(): string { + return this._constructsNode.id; + } + + /** + * The full, absolute path of this construct in the tree. + * + * Components are separated by '/'. + */ + public get path(): string { + return this._constructsNode.path; + } + + /** + * Returns an opaque tree-unique address for this construct. + * + * Addresses are 42 characters hexadecimal strings. They begin with "c8" + * followed by 40 lowercase hexadecimal characters (0-9a-f). + * + * Addresses are calculated using a SHA-1 of the components of the construct + * path. + * + * To enable refactorings of construct trees, constructs with the ID `Default` + * will be excluded from the calculation. In those cases constructs in the + * same tree may have the same addreess. + * + * @example c83a2846e506bcc5f10682b564084bca2d275709ee + */ + public get addr(): string { + return this._constructsNode.addr; + } + + /** + * Return a direct child by id, or undefined + * + * @param id Identifier of direct child + * @returns the child if found, or undefined + */ + public tryFindChild(id: string): IConstruct | undefined { + return this._constructsNode.tryFindChild(id); + } + + /** + * Return a direct child by id + * + * Throws an error if the child is not found. + * + * @param id Identifier of direct child + * @returns Child with the given id. + */ + public findChild(id: string): IConstruct { + return this._constructsNode.findChild(id); + } + + /** + * Returns the child construct that has the id `Default` or `Resource"`. + * This is usually the construct that provides the bulk of the underlying functionality. + * Useful for modifications of the underlying construct that are not available at the higher levels. + * + * @throws if there is more than one child + * @returns a construct or undefined if there is no default child + */ + public get defaultChild(): IConstruct | undefined { + return this._constructsNode.defaultChild; + } + + /** + * Override the defaultChild property. + * + * This should only be used in the cases where the correct + * default child is not named 'Resource' or 'Default' as it + * should be. + * + * If you set this to undefined, the default behavior of finding + * the child named 'Resource' or 'Default' will be used. + */ + public set defaultChild(value: IConstruct | undefined) { + this._constructsNode.defaultChild = value; + } + + /** + * All direct children of this construct. + */ + public get children() { + return this._constructsNode.children; + } + + /** + * Return this construct and all of its children in the given order + */ + public findAll( + order: ConstructOrder = ConstructOrder.PREORDER + ): IConstruct[] { + return this._constructsNode.findAll(order); + } + + /** + * This can be used to set contextual values. + * Context must be set before any children are added, since children may consult context info during construction. + * If the key already exists, it will be overridden. + * @param key The context key + * @param value The context value + */ + public setContext(key: string, value: any) { + this._constructsNode.setContext(key, value); + } + + /** + * Retrieves a value from tree context if present. Otherwise, would throw an error. + * + * Context is usually initialized at the root, but can be overridden at any point in the tree. + * + * @param key The context key + * @returns The context value or throws error if there is no context value for this key + */ + public getContext(key: string): any { + return this._constructsNode.getContext(key); + } + + /** + * Retrieves a value from tree context. + * + * Context is usually initialized at the root, but can be overridden at any point in the tree. + * + * @param key The context key + * @returns The context value or `undefined` if there is no context value for this key. + */ + public tryGetContext(key: string): any { + return this._constructsNode.tryGetContext(key); + } + + /** + * An immutable array of metadata objects associated with this construct. + * This can be used, for example, to implement support for deprecation notices, source mapping, etc. + */ + public get metadata() { + return this._constructsNode.metadata; + } + + /** + * Adds a metadata entry to this construct. + * Entries are arbitrary values and will also include a stack trace to allow tracing back to + * the code location for when the entry was added. It can be used, for example, to include source + * mapping in CloudFormation templates to improve diagnostics. + * + * @param type a string denoting the type of metadata + * @param data the value of the metadata (can be a Token). If null/undefined, metadata will not be added. + * @param options options + */ + public addMetadata( + type: string, + data: any, + options: MetadataOptions = {} + ): void { + this._constructsNode.addMetadata(type, data, options); + } + + /** + * All parent scopes of this construct. + * + * @returns a list of parent scopes. The last element in the list will always + * be the current construct and the first element will be the root of the + * tree. + */ + public get scopes(): IConstruct[] { + return this._constructsNode.scopes; + } + + /** + * Returns the root of the construct tree. + * @returns The root of the construct tree. + */ + public get root() { + return this._constructsNode.root; + } + + /** + * Returns true if this construct or the scopes in which it is defined are + * locked. + */ + public get locked() { + return this._constructsNode.locked; + } + + /** + * Add an ordering dependency on another construct. + * + * An `IDependable` + */ + public addDependency(...deps: IDependable[]) { + this._constructsNode.addDependency(...deps); + } + + /** + * Return all dependencies registered on this node (non-recursive). + */ + public get dependencies(): IConstruct[] { + return this._constructsNode.dependencies; + } + + /** + * Remove the child with the given name, if present. + * + * @returns Whether a child with the given name was deleted. + * @experimental + */ + public tryRemoveChild(childName: string): boolean { + return this._constructsNode.tryRemoveChild(childName); + } + + /** + * Adds a validation to this construct. + * + * When `node.validate()` is called, the `validate()` method will be called on + * all validations and all errors will be returned. + * + * @param validation The validation object + */ + public addValidation(validation: IValidation) { + this._constructsNode.addValidation(validation); + } + + /** + * Validates this construct. + * + * Invokes the `validate()` method on all validations added through + * `addValidation()`. + * + * @returns an array of validation error messages associated with this + * construct. + */ + public validate(): string[] { + return this._constructsNode.validate(); + } + + /** + * Locks this construct from allowing more children to be added. After this + * call, no more children can be added to this construct or to any children. + */ + public lock() { + this._constructsNode.lock(); + } +} + +/** + * Props for `Node.addConnection`. + */ +export interface AddConnectionProps { + /** + * The source of the connection. + */ + readonly source: IConstruct; + + /** + * The target of the connection. + */ + readonly target: IConstruct; + + /** + * A name for the connection. + */ + readonly name: string; +} diff --git a/libs/wingsdk/src/std/number.ts b/libs/wingsdk/src/std/number.ts index 8dd14cfa071..09593ffab5a 100644 --- a/libs/wingsdk/src/std/number.ts +++ b/libs/wingsdk/src/std/number.ts @@ -1,5 +1,5 @@ import { Json } from "./json"; -import { Code, InflightClient } from "../core"; +import { InflightClient } from "../core"; /** * Number @@ -35,7 +35,7 @@ export class Number { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } diff --git a/libs/wingsdk/src/std/range.ts b/libs/wingsdk/src/std/range.ts index 02840058056..1125d833ef8 100644 --- a/libs/wingsdk/src/std/range.ts +++ b/libs/wingsdk/src/std/range.ts @@ -1,4 +1,4 @@ -import { Code, InflightClient } from "../core"; +import { InflightClient } from "../core"; /** * Range @@ -30,7 +30,7 @@ export class Range { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } diff --git a/libs/wingsdk/src/std/resource.ts b/libs/wingsdk/src/std/resource.ts index f89b0dca05c..c6ae0d5b2d1 100644 --- a/libs/wingsdk/src/std/resource.ts +++ b/libs/wingsdk/src/std/resource.ts @@ -1,9 +1,9 @@ import { Construct, IConstruct } from "constructs"; import { Duration } from "./duration"; -import { App, Connections } from "../core"; -import { Code } from "../core/inflight"; +import { App } from "../core"; import { liftObject } from "../core/internal"; import { log } from "../shared/log"; +import { Node } from "../std"; /** * A resource that can run inflight code. @@ -16,11 +16,6 @@ export interface IInflightHost extends IResource {} * @skipDocs */ export interface IResource extends IConstruct { - /** - * Information on how to display a resource in the UI. - */ - readonly display: Display; - /** * Binds the resource to the host so that it can be used by inflight code. * @@ -40,11 +35,22 @@ export interface IResource extends IConstruct { /** * Return a code snippet that can be used to reference this resource inflight. + * * Note this code snippet may by async code, so it's unsafe to run it in a * constructor or other sync context. + * + * @internal + */ + _toInflight(): string; + + /** + * Return a list of all inflight operations that are supported by this resource. + * + * If this method doesn't exist, the resource is assumed to not support any inflight operations. + * * @internal */ - _toInflight(): Code; + _getInflightOps(): string[]; /** * A hook for performing operations after the tree of resources has been @@ -162,27 +168,8 @@ export abstract class Resource extends Construct implements IResource { private readonly bindMap: Map> = new Map(); - /** - * A list of all inflight operations that are supported by this resource. - */ - private readonly inflightOps: string[] = ["$inflight_init"]; - - /** - * Information on how to display a resource in the UI. - */ - public readonly display = new Display(); - - /** - * Record that this resource supports the given inflight operation. - * - * This is used to give better error messages if the compiler attempts to bind - * a resource with an operation that is not supported. - * - * @internal - */ - public _addInflightOps(...ops: string[]) { - this.inflightOps.push(...ops); - } + /** @internal */ + public abstract _getInflightOps(): string[]; /** * Binds the resource to the host so that it can be used by inflight code. @@ -229,9 +216,10 @@ export abstract class Resource extends Construct implements IResource { const opsForHost = this.bindMap.get(host)!; - // For each operation, re + // For each operation, check if the host supports it. If it does, register the binding. + const supportedOps = [...(this._getInflightOps() ?? []), "$inflight_init"]; for (const op of ops) { - if (!this.inflightOps.includes(op)) { + if (!supportedOps.includes(op)) { throw new Error( `Resource ${this.node.path} does not support inflight operation ${op} (requested by ${host.node.path})` ); @@ -245,7 +233,7 @@ export abstract class Resource extends Construct implements IResource { this._registerBind(host, [op]); // add connection metadata - Connections.of(this).add({ + Node.of(this).addConnection({ source: host, target: this, name: op.endsWith("()") ? op : `${op}()`, @@ -274,12 +262,9 @@ export abstract class Resource extends Construct implements IResource { /** * Return a code snippet that can be used to reference this resource inflight. * - * TODO: support passing an InflightRuntime enum to indicate which language - * runtime we're targeting. - * * @internal */ - public abstract _toInflight(): Code; + public abstract _toInflight(): string; /** * "Lifts" a value into an inflight context. If the value is a resource (i.e. has a `_toInflight` @@ -312,74 +297,6 @@ export interface OperationAnnotation { }; } -/** - * Properties for the Display class. - * @skipDocs - */ -export interface DisplayProps { - /** - * Title of the resource. - * @default - No title. - */ - readonly title?: string; - - /** - * Description of the resource. - * @default - No description. - */ - readonly description?: string; - - /** - * The source file or library where the resource was defined. - * @default - No source module. - */ - readonly sourceModule?: string; - - /** - * Whether the resource should be hidden from the UI. - * @default - Undefined - */ - readonly hidden?: boolean; -} - -/** - * Information on how to display a resource in the UI. - * @skipDocs - */ -export class Display { - /** - * The source module for the SDK. - */ - public static readonly SDK_SOURCE_MODULE = "@winglang/sdk"; - - /** - * Title of the resource. - */ - public title?: string; - - /** - * Description of the resource. - */ - public description?: string; - - /** - * The source file or library where the resource was defined. - */ - public sourceModule?: string; - - /** - * Whether the resource should be hidden from the UI. - */ - public hidden?: boolean; - - public constructor(props?: DisplayProps) { - this.title = props?.title; - this.description = props?.description; - this.hidden = props?.hidden; - this.sourceModule = props?.sourceModule; - } -} - function isResource(obj: any): obj is Resource { return isIResourceType(obj.constructor); } diff --git a/libs/wingsdk/src/std/set.ts b/libs/wingsdk/src/std/set.ts index 1992a45a635..81c5462f792 100644 --- a/libs/wingsdk/src/std/set.ts +++ b/libs/wingsdk/src/std/set.ts @@ -4,7 +4,7 @@ import { Array } from "./array"; import { T1 } from "./generics"; -import { Code, InflightClient } from "../core"; +import { InflightClient } from "../core"; /** * Immutable Set @@ -15,7 +15,7 @@ export class Set { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } @@ -71,7 +71,7 @@ export class MutSet { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } diff --git a/libs/wingsdk/src/std/string.ts b/libs/wingsdk/src/std/string.ts index cc1340c7e6f..dce12e5d41e 100644 --- a/libs/wingsdk/src/std/string.ts +++ b/libs/wingsdk/src/std/string.ts @@ -3,7 +3,7 @@ // TODO: This should be an interface, currently Wing does not support interface JSII imports import { Json } from "./json"; -import { Code, InflightClient } from "../core"; +import { InflightClient } from "../core"; /** * String @@ -13,7 +13,7 @@ export class String { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } diff --git a/libs/wingsdk/src/std/struct.ts b/libs/wingsdk/src/std/struct.ts index d51df83c692..60760135f45 100644 --- a/libs/wingsdk/src/std/struct.ts +++ b/libs/wingsdk/src/std/struct.ts @@ -1,7 +1,7 @@ import { Validator } from "jsonschema"; import { T1 } from "./generics"; import { Json } from "./json"; -import { Code, InflightClient } from "../core"; +import { InflightClient } from "../core"; /** * Shared behavior for all structs @@ -12,7 +12,7 @@ export class Struct { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } diff --git a/libs/wingsdk/src/std/test-runner.ts b/libs/wingsdk/src/std/test-runner.ts index f496adc8be5..d252d9bb212 100644 --- a/libs/wingsdk/src/std/test-runner.ts +++ b/libs/wingsdk/src/std/test-runner.ts @@ -2,7 +2,8 @@ import { Construct } from "constructs"; import { Resource } from "./resource"; import { Test } from "./test"; import { fqnForType } from "../constants"; -import { App } from "../core/app"; +import { App } from "../core"; +import { Node } from "../std"; /** * Global identifier for `TestRunner`. @@ -37,14 +38,22 @@ export abstract class TestRunner extends Resource { constructor(scope: Construct, id: string, props: TestRunnerProps = {}) { super(scope, id); - this.display.hidden = true; - this.display.title = "TestRunner"; - this.display.description = + Node.of(this).hidden = true; + Node.of(this).title = "TestRunner"; + Node.of(this).description = "A suite of APIs for running tests and collecting results."; props; } + /** @internal */ + public _getInflightOps(): string[] { + return [ + TestRunnerInflightMethods.LIST_TESTS, + TestRunnerInflightMethods.RUN_TEST, + ]; + } + /** * Find all tests in the construct tree. * @returns A list of tests. diff --git a/libs/wingsdk/src/std/test.ts b/libs/wingsdk/src/std/test.ts index 3351630bf1d..ee28c9ec01e 100644 --- a/libs/wingsdk/src/std/test.ts +++ b/libs/wingsdk/src/std/test.ts @@ -2,8 +2,8 @@ import { Construct } from "constructs"; import { IInflightHost, IResource, Resource } from "./resource"; import { Function, FUNCTION_FQN, FunctionProps } from "../cloud/function"; import { fqnForType } from "../constants"; -import { App } from "../core/app"; -import { Code } from "../core/inflight"; +import { App } from "../core"; +import { Node } from "../std"; /** * Global identifier for `Test`. @@ -49,8 +49,8 @@ export class Test extends Resource implements IInflightHost { ) { super(scope, id); - this.display.title = "Test"; - this.display.description = "A cloud unit test."; + Node.of(this).title = "Test"; + Node.of(this).description = "A cloud unit test."; this._fn = App.of(scope).newAbstract( FUNCTION_FQN, @@ -62,7 +62,12 @@ export class Test extends Resource implements IInflightHost { } /** @internal */ - public _toInflight(): Code { + public _getInflightOps(): string[] { + return []; + } + + /** @internal */ + public _toInflight(): string { throw new Error("unimplemented"); } } diff --git a/libs/wingsdk/src/target-awscdk/app.ts b/libs/wingsdk/src/target-awscdk/app.ts index a7912c5428d..e315f4cb06f 100644 --- a/libs/wingsdk/src/target-awscdk/app.ts +++ b/libs/wingsdk/src/target-awscdk/app.ts @@ -29,8 +29,8 @@ import { App as CoreApp, AppProps, preSynthesizeAllConstructs, - Connections, synthesizeTree, + Connections, } from "../core"; import { PluginManager } from "../core/plugin-manager"; import { TEST_RUNNER_FQN } from "../std"; diff --git a/libs/wingsdk/src/target-awscdk/bucket.ts b/libs/wingsdk/src/target-awscdk/bucket.ts index 9ced1fe4d4c..f27430fba47 100644 --- a/libs/wingsdk/src/target-awscdk/bucket.ts +++ b/libs/wingsdk/src/target-awscdk/bucket.ts @@ -13,10 +13,9 @@ import { App } from "./app"; import { Function } from "./function"; import * as cloud from "../cloud"; import * as core from "../core"; -import { Connections } from "../core"; import { convertBetweenHandlers } from "../shared/convert"; import { calculateBucketPermissions } from "../shared-aws/permissions"; -import { IInflightHost } from "../std"; +import { IInflightHost, Node } from "../std"; const EVENTS = { [cloud.BucketEventType.DELETE]: EventType.OBJECT_REMOVED, @@ -96,7 +95,7 @@ export class Bucket extends cloud.Bucket { ): void { const fn = this.onEventFunction("OnCreate", inflight, opts); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "onCreate()", @@ -114,7 +113,7 @@ export class Bucket extends cloud.Bucket { ): void { const fn = this.onEventFunction("OnDelete", inflight, opts); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "onDelete()", @@ -132,7 +131,7 @@ export class Bucket extends cloud.Bucket { ): void { const fn = this.onEventFunction("OnUpdate", inflight, opts); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "onUpdate()", @@ -150,7 +149,7 @@ export class Bucket extends cloud.Bucket { ) { const fn = this.onEventFunction("OnEvent", inflight, opts); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "onCreate()", @@ -160,7 +159,7 @@ export class Bucket extends cloud.Bucket { new LambdaDestination(fn._function) ); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "onDelete()", @@ -170,7 +169,7 @@ export class Bucket extends cloud.Bucket { new LambdaDestination(fn._function) ); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "onUpdate()", @@ -198,7 +197,7 @@ export class Bucket extends cloud.Bucket { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-awscdk", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-awscdk/counter.ts b/libs/wingsdk/src/target-awscdk/counter.ts index 797bd2d736d..d75a2533a44 100644 --- a/libs/wingsdk/src/target-awscdk/counter.ts +++ b/libs/wingsdk/src/target-awscdk/counter.ts @@ -39,7 +39,7 @@ export class Counter extends cloud.Counter { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-awscdk", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-awscdk/function.ts b/libs/wingsdk/src/target-awscdk/function.ts index f01614d55f5..b17108c142c 100644 --- a/libs/wingsdk/src/target-awscdk/function.ts +++ b/libs/wingsdk/src/target-awscdk/function.ts @@ -71,7 +71,7 @@ export class Function extends cloud.Function implements IAwsFunction { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-awscdk", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-awscdk/on-deploy.ts b/libs/wingsdk/src/target-awscdk/on-deploy.ts index 692083ef38e..a0f90016e85 100644 --- a/libs/wingsdk/src/target-awscdk/on-deploy.ts +++ b/libs/wingsdk/src/target-awscdk/on-deploy.ts @@ -30,7 +30,7 @@ export class OnDeploy extends cloud.OnDeploy { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-awscdk", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-awscdk/queue.ts b/libs/wingsdk/src/target-awscdk/queue.ts index 107acbd85ba..fd4636cb5fc 100644 --- a/libs/wingsdk/src/target-awscdk/queue.ts +++ b/libs/wingsdk/src/target-awscdk/queue.ts @@ -6,10 +6,9 @@ import { Construct } from "constructs"; import { Function } from "./function"; import * as cloud from "../cloud"; import * as core from "../core"; -import { Connections } from "../core"; import { convertBetweenHandlers } from "../shared/convert"; import { calculateQueuePermissions } from "../shared-aws/permissions"; -import { IInflightHost } from "../std"; +import { IInflightHost, Node } from "../std"; /** * AWS implementation of `cloud.Queue`. @@ -65,7 +64,7 @@ export class Queue extends cloud.Queue { }); fn._addEventSource(eventSource); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "setConsumer()", @@ -93,7 +92,7 @@ export class Queue extends cloud.Queue { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-awscdk", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-awscdk/schedule.ts b/libs/wingsdk/src/target-awscdk/schedule.ts index ad85bfca2ad..6096426d15d 100644 --- a/libs/wingsdk/src/target-awscdk/schedule.ts +++ b/libs/wingsdk/src/target-awscdk/schedule.ts @@ -9,8 +9,8 @@ import { Construct } from "constructs"; import { Function } from "./function"; import * as cloud from "../cloud"; import * as core from "../core"; -import { Connections } from "../core"; import { convertBetweenHandlers } from "../shared/convert"; +import { Node } from "../std"; /** * AWS implementation of `cloud.Schedule`. @@ -94,7 +94,7 @@ export class Schedule extends cloud.Schedule { this.rule.addTarget(new LambdaFunction(fn._function)); addLambdaPermission(this.rule, fn._function); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "onTick()", @@ -104,7 +104,7 @@ export class Schedule extends cloud.Schedule { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-awscdk", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-awscdk/secret.ts b/libs/wingsdk/src/target-awscdk/secret.ts index 5b1fb8c103a..16471526138 100644 --- a/libs/wingsdk/src/target-awscdk/secret.ts +++ b/libs/wingsdk/src/target-awscdk/secret.ts @@ -56,7 +56,7 @@ export class Secret extends cloud.Secret { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-awscdk", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-awscdk/test-runner.ts b/libs/wingsdk/src/target-awscdk/test-runner.ts index 38b0c910b2c..dd76990e8f3 100644 --- a/libs/wingsdk/src/target-awscdk/test-runner.ts +++ b/libs/wingsdk/src/target-awscdk/test-runner.ts @@ -76,7 +76,7 @@ export class TestRunner extends std.TestRunner { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-awscdk", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-awscdk/topic.ts b/libs/wingsdk/src/target-awscdk/topic.ts index a78562db6b7..435dad4a5b6 100644 --- a/libs/wingsdk/src/target-awscdk/topic.ts +++ b/libs/wingsdk/src/target-awscdk/topic.ts @@ -5,10 +5,9 @@ import { Construct } from "constructs"; import { Function } from "./function"; import * as cloud from "../cloud"; import * as core from "../core"; -import { Connections } from "../core"; import { convertBetweenHandlers } from "../shared/convert"; import { calculateTopicPermissions } from "../shared-aws/permissions"; -import { IInflightHost } from "../std"; +import { IInflightHost, Node } from "../std"; /** * AWS Implementation of `cloud.Topic`. @@ -61,7 +60,7 @@ export class Topic extends cloud.Topic { const subscription = new LambdaSubscription(fn._function); this.topic.addSubscription(subscription); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "onMessage()", @@ -85,7 +84,7 @@ export class Topic extends cloud.Topic { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-awscdk", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-sim/api.ts b/libs/wingsdk/src/target-sim/api.ts index a42922f66ab..63c5a42d937 100644 --- a/libs/wingsdk/src/target-sim/api.ts +++ b/libs/wingsdk/src/target-sim/api.ts @@ -5,9 +5,7 @@ import { ApiSchema, API_TYPE, ApiRoute } from "./schema-resources"; import { simulatorAttrToken } from "./tokens"; import { bindSimulatorResource, makeSimulatorJsClient } from "./util"; import * as cloud from "../cloud"; -import * as core from "../core"; -import { Connections } from "../core"; -import { Display, IInflightHost } from "../std"; +import { IInflightHost, Node, SDK_SOURCE_MODULE } from "../std"; import { BaseResourceSchema } from "../testing/simulator"; /** @@ -48,8 +46,8 @@ export class Api extends cloud.Api implements ISimulatorResource { } const fn = Function._newFunction(this, fnPath, inflight, props) as Function; - fn.display.sourceModule = Display.SDK_SOURCE_MODULE; - fn.display.title = `${method.toLowerCase()}()`; + Node.of(fn).sourceModule = SDK_SOURCE_MODULE; + Node.of(fn).title = `${method.toLowerCase()}()`; const eventMapping = new EventMapping(this, eventId, { publisher: this, @@ -79,7 +77,7 @@ export class Api extends cloud.Api implements ISimulatorResource { this._addToSpec(path, method, undefined); const fn = this.createOrGetFunction(inflight, props, path, method); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: `${method.toLowerCase()}()`, @@ -216,7 +214,7 @@ export class Api extends cloud.Api implements ISimulatorResource { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return makeSimulatorJsClient(__filename, this); } } diff --git a/libs/wingsdk/src/target-sim/app.ts b/libs/wingsdk/src/target-sim/app.ts index 5504df3c177..b36d1f86e7e 100644 --- a/libs/wingsdk/src/target-sim/app.ts +++ b/libs/wingsdk/src/target-sim/app.ts @@ -32,7 +32,6 @@ import { } from "../cloud"; import { SDK_VERSION } from "../constants"; import * as core from "../core"; -import { Connections } from "../core"; import { preSynthesizeAllConstructs } from "../core/app"; import { TABLE_FQN, REDIS_FQN } from "../ex"; import { TEST_RUNNER_FQN } from "../std"; @@ -145,7 +144,7 @@ export class App extends core.App { core.synthesizeTree(this, this.outdir); // write `outdir/connections.json` - Connections.of(this).synth(this.outdir); + core.Connections.of(this).synth(this.outdir); this.synthed = true; diff --git a/libs/wingsdk/src/target-sim/bucket.ts b/libs/wingsdk/src/target-sim/bucket.ts index 79aedbc9222..9a9918c4eca 100644 --- a/libs/wingsdk/src/target-sim/bucket.ts +++ b/libs/wingsdk/src/target-sim/bucket.ts @@ -5,7 +5,6 @@ import { BucketSchema, BUCKET_TYPE } from "./schema-resources"; import { simulatorHandleToken } from "./tokens"; import { bindSimulatorResource, makeSimulatorJsClient } from "./util"; import * as cloud from "../cloud"; -import * as core from "../core"; import { IInflightHost } from "../std"; import { BaseResourceSchema } from "../testing/simulator"; @@ -65,7 +64,7 @@ export class Bucket extends cloud.Bucket implements ISimulatorResource { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return makeSimulatorJsClient(__filename, this); } } diff --git a/libs/wingsdk/src/target-sim/counter.ts b/libs/wingsdk/src/target-sim/counter.ts index 7eec9249205..cdcae25a14d 100644 --- a/libs/wingsdk/src/target-sim/counter.ts +++ b/libs/wingsdk/src/target-sim/counter.ts @@ -3,7 +3,6 @@ import { ISimulatorResource } from "./resource"; import { CounterSchema, COUNTER_TYPE } from "./schema-resources"; import { bindSimulatorResource, makeSimulatorJsClient } from "./util"; import * as cloud from "../cloud"; -import * as core from "../core"; import { IInflightHost } from "../std"; import { BaseResourceSchema } from "../testing/simulator"; @@ -38,7 +37,7 @@ export class Counter extends cloud.Counter implements ISimulatorResource { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return makeSimulatorJsClient(__filename, this); } } diff --git a/libs/wingsdk/src/target-sim/event-mapping.ts b/libs/wingsdk/src/target-sim/event-mapping.ts index baa9b6cd1f2..058da761505 100644 --- a/libs/wingsdk/src/target-sim/event-mapping.ts +++ b/libs/wingsdk/src/target-sim/event-mapping.ts @@ -9,8 +9,7 @@ import { import { simulatorHandleToken } from "./tokens"; import { bindSimulatorResource, makeSimulatorJsClient } from "./util"; import { fqnForType } from "../constants"; -import { Code } from "../core"; -import { Resource, IInflightHost, IResource } from "../std"; +import { IInflightHost, IResource, Node, Resource } from "../std"; import { BaseResourceSchema, ISimulatorResourceInstance, @@ -50,13 +49,18 @@ export class EventMapping extends Resource implements ISimulatorResource { constructor(scope: Construct, id: string, props: EventMappingProps) { super(scope, id); this._eventProps = props; - this.display.hidden = true; + Node.of(this).hidden = true; // Add dependencies to the publisher and subscriber this.node.addDependency(props.subscriber); this.node.addDependency(props.publisher); } + /** @internal */ + public _getInflightOps(): string[] { + return []; + } + public get eventProps(): EventMappingProps { return this._eventProps; } @@ -80,7 +84,7 @@ export class EventMapping extends Resource implements ISimulatorResource { super.bind(host, ops); } - public _toInflight(): Code { + public _toInflight(): string { return makeSimulatorJsClient(__filename, this); } } diff --git a/libs/wingsdk/src/target-sim/function.ts b/libs/wingsdk/src/target-sim/function.ts index b90263f9bbc..f993cc084df 100644 --- a/libs/wingsdk/src/target-sim/function.ts +++ b/libs/wingsdk/src/target-sim/function.ts @@ -4,7 +4,6 @@ import { ISimulatorResource } from "./resource"; import { FunctionSchema, FUNCTION_TYPE } from "./schema-resources"; import { bindSimulatorResource, makeSimulatorJsClient } from "./util"; import * as cloud from "../cloud"; -import * as core from "../core"; import { App } from "../core"; import { IInflightHost } from "../std"; import { Duration } from "../std/duration"; @@ -56,7 +55,7 @@ export class Function extends cloud.Function implements ISimulatorResource { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return makeSimulatorJsClient(__filename, this); } } diff --git a/libs/wingsdk/src/target-sim/on-deploy.ts b/libs/wingsdk/src/target-sim/on-deploy.ts index 6ef1545d33b..5f182774bfa 100644 --- a/libs/wingsdk/src/target-sim/on-deploy.ts +++ b/libs/wingsdk/src/target-sim/on-deploy.ts @@ -3,8 +3,7 @@ import { ON_DEPLOY_TYPE, OnDeploySchema } from "./schema-resources"; import { simulatorHandleToken } from "./tokens"; import { bindSimulatorResource, makeSimulatorJsClient } from "./util"; import * as cloud from "../cloud"; -import * as core from "../core"; -import { Display, IInflightHost } from "../std"; +import { IInflightHost, Node, SDK_SOURCE_MODULE } from "../std"; import { BaseResourceSchema } from "../testing"; export class OnDeploy extends cloud.OnDeploy { @@ -18,7 +17,7 @@ export class OnDeploy extends cloud.OnDeploy { super(scope, id, handler, props); this.fn = cloud.Function._newFunction(this, "Function", handler, props); - this.fn.display.sourceModule = Display.SDK_SOURCE_MODULE; + Node.of(this.fn).sourceModule = SDK_SOURCE_MODULE; this.node.addDependency(this.fn); @@ -49,7 +48,7 @@ export class OnDeploy extends cloud.OnDeploy { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return makeSimulatorJsClient(__filename, this); } } diff --git a/libs/wingsdk/src/target-sim/queue.ts b/libs/wingsdk/src/target-sim/queue.ts index 894eda4ee40..02cd57d1189 100644 --- a/libs/wingsdk/src/target-sim/queue.ts +++ b/libs/wingsdk/src/target-sim/queue.ts @@ -6,10 +6,8 @@ import { ISimulatorResource } from "./resource"; import { QueueSchema, QUEUE_TYPE } from "./schema-resources"; import { bindSimulatorResource, makeSimulatorJsClient } from "./util"; import * as cloud from "../cloud"; -import * as core from "../core"; -import { Connections } from "../core"; import { convertBetweenHandlers } from "../shared/convert"; -import { Display, Duration, IInflightHost } from "../std"; +import { Duration, IInflightHost, Node, SDK_SOURCE_MODULE } from "../std"; import { BaseResourceSchema } from "../testing/simulator"; /** @@ -75,8 +73,8 @@ export class Queue extends cloud.Queue implements ISimulatorResource { functionHandler, props ); - fn.display.sourceModule = Display.SDK_SOURCE_MODULE; - fn.display.title = "setConsumer()"; + Node.of(fn).sourceModule = SDK_SOURCE_MODULE; + Node.of(fn).title = "setConsumer()"; new EventMapping(this, `${this.node.id}-QueueEventMapping-${hash}`, { subscriber: fn, @@ -86,7 +84,7 @@ export class Queue extends cloud.Queue implements ISimulatorResource { }, }); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "setConsumer()", @@ -114,7 +112,7 @@ export class Queue extends cloud.Queue implements ISimulatorResource { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return makeSimulatorJsClient(__filename, this); } } diff --git a/libs/wingsdk/src/target-sim/redis.ts b/libs/wingsdk/src/target-sim/redis.ts index 781b9d70d11..0dacb725c49 100644 --- a/libs/wingsdk/src/target-sim/redis.ts +++ b/libs/wingsdk/src/target-sim/redis.ts @@ -2,7 +2,6 @@ import { Construct } from "constructs"; import { ISimulatorResource } from "./resource"; import { RedisSchema, REDIS_TYPE } from "./schema-resources"; import { bindSimulatorResource, makeSimulatorJsClient } from "./util"; -import * as core from "../core"; import * as ex from "../ex"; import { IInflightHost } from "../std"; import { BaseResourceSchema } from "../testing/simulator"; @@ -33,7 +32,7 @@ export class Redis extends ex.Redis implements ISimulatorResource { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return makeSimulatorJsClient(__filename, this); } } diff --git a/libs/wingsdk/src/target-sim/schedule.ts b/libs/wingsdk/src/target-sim/schedule.ts index 2951909e3ea..a9d238b621d 100644 --- a/libs/wingsdk/src/target-sim/schedule.ts +++ b/libs/wingsdk/src/target-sim/schedule.ts @@ -10,9 +10,8 @@ import { convertDurationToCronExpression, } from "./util"; import * as cloud from "../cloud"; -import { Code, Connections } from "../core"; import { convertBetweenHandlers } from "../shared/convert"; -import { Display, IInflightHost } from "../std"; +import { IInflightHost, Node, SDK_SOURCE_MODULE } from "../std"; import { BaseResourceSchema } from "../testing"; /** @@ -49,8 +48,8 @@ export class Schedule extends cloud.Schedule implements ISimulatorResource { functionHandler, props ); - fn.display.sourceModule = Display.SDK_SOURCE_MODULE; - fn.display.title = "onTick()"; + Node.of(fn).sourceModule = SDK_SOURCE_MODULE; + Node.of(fn).title = "onTick()"; new EventMapping(this, `${this.node.id}-OnTickMapping-${hash}`, { subscriber: fn, @@ -58,7 +57,7 @@ export class Schedule extends cloud.Schedule implements ISimulatorResource { subscriptionProps: {}, }); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "onTick()", @@ -80,7 +79,7 @@ export class Schedule extends cloud.Schedule implements ISimulatorResource { } /** @internal */ - public _toInflight(): Code { + public _toInflight(): string { return makeSimulatorJsClient(__filename, this); } diff --git a/libs/wingsdk/src/target-sim/secret.ts b/libs/wingsdk/src/target-sim/secret.ts index 7983faf7bd8..319addebd43 100644 --- a/libs/wingsdk/src/target-sim/secret.ts +++ b/libs/wingsdk/src/target-sim/secret.ts @@ -3,7 +3,6 @@ import { ISimulatorResource } from "./resource"; import { SECRET_TYPE, SecretSchema } from "./schema-resources"; import { bindSimulatorResource, makeSimulatorJsClient } from "./util"; import * as cloud from "../cloud"; -import * as core from "../core"; import { ResourceNames } from "../shared/resource-names"; import { IInflightHost } from "../std"; import { BaseResourceSchema } from "../testing/simulator"; @@ -29,7 +28,7 @@ export class Secret extends cloud.Secret implements ISimulatorResource { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return makeSimulatorJsClient(__filename, this); } diff --git a/libs/wingsdk/src/target-sim/service.ts b/libs/wingsdk/src/target-sim/service.ts index 3f2aee08269..5ab4e38461f 100644 --- a/libs/wingsdk/src/target-sim/service.ts +++ b/libs/wingsdk/src/target-sim/service.ts @@ -6,10 +6,8 @@ import { SERVICE_TYPE, ServiceSchema } from "./schema-resources"; import { simulatorHandleToken } from "./tokens"; import { bindSimulatorResource, makeSimulatorJsClient } from "./util"; import * as cloud from "../cloud"; -import * as core from "../core"; -import { Connections } from "../core"; import { convertBetweenHandlers } from "../shared/convert"; -import { Display, IInflightHost } from "../std"; +import { IInflightHost, Node, SDK_SOURCE_MODULE } from "../std"; import { BaseResourceSchema } from "../testing"; export class Service extends cloud.Service implements ISimulatorResource { @@ -27,7 +25,7 @@ export class Service extends cloud.Service implements ISimulatorResource { ); this.onStartHandlerToken = simulatorHandleToken(onStartFunction); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: onStartFunction, name: "onStart()", @@ -41,7 +39,7 @@ export class Service extends cloud.Service implements ISimulatorResource { ); this.onStopHandlerToken = simulatorHandleToken(onStopFunction); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: onStopFunction, name: "onStop()", @@ -70,8 +68,8 @@ export class Service extends cloud.Service implements ISimulatorResource { onStartFunctionHandler, {} ); - fn.display.sourceModule = Display.SDK_SOURCE_MODULE; - fn.display.title = "onStart()"; + Node.of(fn).sourceModule = SDK_SOURCE_MODULE; + Node.of(fn).title = "onStart()"; this.node.addDependency(fn); return fn; @@ -98,7 +96,7 @@ export class Service extends cloud.Service implements ISimulatorResource { super.bind(host, ops); } - public _toInflight(): core.Code { + public _toInflight(): string { return makeSimulatorJsClient(__filename, this); } } diff --git a/libs/wingsdk/src/target-sim/table.ts b/libs/wingsdk/src/target-sim/table.ts index 2c0786546ae..5abdc80dc9e 100644 --- a/libs/wingsdk/src/target-sim/table.ts +++ b/libs/wingsdk/src/target-sim/table.ts @@ -2,7 +2,6 @@ import { Construct } from "constructs"; import { ISimulatorResource } from "./resource"; import { TableSchema, TABLE_TYPE } from "./schema-resources"; import { bindSimulatorResource, makeSimulatorJsClient } from "./util"; -import * as core from "../core"; import * as ex from "../ex"; import { Json, IInflightHost } from "../std"; import { BaseResourceSchema } from "../testing/simulator"; @@ -43,7 +42,7 @@ export class Table extends ex.Table implements ISimulatorResource { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return makeSimulatorJsClient(__filename, this); } } diff --git a/libs/wingsdk/src/target-sim/test-runner.ts b/libs/wingsdk/src/target-sim/test-runner.ts index 46fe11650bf..b20e94c9173 100644 --- a/libs/wingsdk/src/target-sim/test-runner.ts +++ b/libs/wingsdk/src/target-sim/test-runner.ts @@ -3,7 +3,6 @@ import { ISimulatorResource } from "./resource"; import { TestRunnerSchema, TEST_RUNNER_TYPE } from "./schema-resources"; import { simulatorHandleToken } from "./tokens"; import { bindSimulatorResource, makeSimulatorJsClient } from "./util"; -import * as core from "../core"; import * as std from "../std"; import { IInflightHost } from "../std"; import { BaseResourceSchema } from "../testing/simulator"; @@ -55,7 +54,7 @@ export class TestRunner extends std.TestRunner implements ISimulatorResource { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return makeSimulatorJsClient("test-runner", this); } } diff --git a/libs/wingsdk/src/target-sim/topic.ts b/libs/wingsdk/src/target-sim/topic.ts index aa488f19814..9d7c8e35751 100644 --- a/libs/wingsdk/src/target-sim/topic.ts +++ b/libs/wingsdk/src/target-sim/topic.ts @@ -6,10 +6,8 @@ import { ISimulatorResource } from "./resource"; import { TopicSchema, TOPIC_TYPE } from "./schema-resources"; import { bindSimulatorResource, makeSimulatorJsClient } from "./util"; import * as cloud from "../cloud"; -import * as core from "../core"; -import { Connections } from "../core"; import { convertBetweenHandlers } from "../shared/convert"; -import { Display, IInflightHost } from "../std"; +import { IInflightHost, Node, SDK_SOURCE_MODULE } from "../std"; import { BaseResourceSchema } from "../testing/simulator"; /** @@ -41,8 +39,8 @@ export class Topic extends cloud.Topic implements ISimulatorResource { functionHandler, props ); - fn.display.sourceModule = Display.SDK_SOURCE_MODULE; - fn.display.title = "onMessage()"; + Node.of(fn).sourceModule = SDK_SOURCE_MODULE; + Node.of(fn).title = "onMessage()"; new EventMapping(this, `${this.node.id}-TopicEventMapping-${hash}`, { subscriber: fn, @@ -50,7 +48,7 @@ export class Topic extends cloud.Topic implements ISimulatorResource { subscriptionProps: {}, }); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "onMessage()", @@ -65,7 +63,7 @@ export class Topic extends cloud.Topic implements ISimulatorResource { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return makeSimulatorJsClient(__filename, this); } diff --git a/libs/wingsdk/src/target-sim/util.ts b/libs/wingsdk/src/target-sim/util.ts index bc93e16bc0f..5e8da5638da 100644 --- a/libs/wingsdk/src/target-sim/util.ts +++ b/libs/wingsdk/src/target-sim/util.ts @@ -4,7 +4,6 @@ import { promisify } from "util"; import { IConstruct } from "constructs"; import { Function } from "./function"; import { simulatorHandleToken } from "./tokens"; -import { NodeJsCode } from "../core"; import { Duration, IInflightHost, Resource } from "../std"; /** @@ -51,15 +50,13 @@ export function bindSimulatorResource( export function makeSimulatorJsClient(filename: string, resource: Resource) { const type = basename(filename).split(".")[0]; const env = makeEnvVarName(type, resource); - return NodeJsCode.fromInline( - `(function(env) { - let handle = process.env[env]; - if (!handle) { - throw new Error("Missing environment variable: " + env); - } - return $simulator.findInstance(handle); - })("${env}")` - ); + return `(function(env) { + let handle = process.env[env]; + if (!handle) { + throw new Error("Missing environment variable: " + env); + } + return $simulator.findInstance(handle); +})("${env}")`; } // helper function to convert duration to a cron string diff --git a/libs/wingsdk/src/target-sim/website.ts b/libs/wingsdk/src/target-sim/website.ts index 9a56f8e7a1e..5a2435770e8 100644 --- a/libs/wingsdk/src/target-sim/website.ts +++ b/libs/wingsdk/src/target-sim/website.ts @@ -4,7 +4,6 @@ import { WebsiteSchema, WEBSITE_TYPE } from "./schema-resources"; import { simulatorAttrToken } from "./tokens"; import { bindSimulatorResource, makeSimulatorJsClient } from "./util"; import * as cloud from "../cloud"; -import * as core from "../core"; import { IInflightHost, Json } from "../std"; import { BaseResourceSchema } from "../testing/simulator"; @@ -46,7 +45,7 @@ export class Website extends cloud.Website implements ISimulatorResource { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return makeSimulatorJsClient(__filename, this); } } diff --git a/libs/wingsdk/src/target-tf-aws/api.ts b/libs/wingsdk/src/target-tf-aws/api.ts index 40dd46cd00b..c8680e38936 100644 --- a/libs/wingsdk/src/target-tf-aws/api.ts +++ b/libs/wingsdk/src/target-tf-aws/api.ts @@ -12,15 +12,13 @@ import { ApiGatewayStage } from "../.gen/providers/aws/api-gateway-stage"; import { LambdaPermission } from "../.gen/providers/aws/lambda-permission"; import * as cloud from "../cloud"; import { OpenApiSpec } from "../cloud"; -import { Connections } from "../core"; -import { Code } from "../core/inflight"; import { convertBetweenHandlers } from "../shared/convert"; import { CaseConventions, NameOptions, ResourceNames, } from "../shared/resource-names"; -import { IInflightHost } from "../std"; +import { IInflightHost, Node } from "../std"; /** * The stage name for the API, used in its url. @@ -71,7 +69,7 @@ export class Api extends cloud.Api { const apiSpecEndpoint = this.api.addEndpoint(path, "GET", fn); this._addToSpec(path, "GET", apiSpecEndpoint); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "get()", @@ -98,7 +96,7 @@ export class Api extends cloud.Api { const apiSpecEndpoint = this.api.addEndpoint(path, "POST", fn); this._addToSpec(path, "POST", apiSpecEndpoint); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "post()", @@ -125,7 +123,7 @@ export class Api extends cloud.Api { const apiSpecEndpoint = this.api.addEndpoint(path, "PUT", fn); this._addToSpec(path, "PUT", apiSpecEndpoint); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "put()", @@ -152,7 +150,7 @@ export class Api extends cloud.Api { const apiSpecEndpoint = this.api.addEndpoint(path, "DELETE", fn); this._addToSpec(path, "DELETE", apiSpecEndpoint); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "delete()", @@ -179,7 +177,7 @@ export class Api extends cloud.Api { const apiSpecEndpoint = this.api.addEndpoint(path, "PATCH", fn); this._addToSpec(path, "PATCH", apiSpecEndpoint); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "patch()", @@ -206,7 +204,7 @@ export class Api extends cloud.Api { const apiSpecEndpoint = this.api.addEndpoint(path, "OPTIONS", fn); this._addToSpec(path, "OPTIONS", apiSpecEndpoint); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "options()", @@ -233,7 +231,7 @@ export class Api extends cloud.Api { const apiSpecEndpoint = this.api.addEndpoint(path, "HEAD", fn); this._addToSpec(path, "HEAD", apiSpecEndpoint); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "head()", @@ -260,7 +258,7 @@ export class Api extends cloud.Api { const apiSpecEndpoint = this.api.addEndpoint(path, "CONNECT", fn); this._addToSpec(path, "CONNECT", apiSpecEndpoint); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "connect()", @@ -346,7 +344,7 @@ export class Api extends cloud.Api { } /** @internal */ - public _toInflight(): Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-tf-aws", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-tf-aws/bucket.ts b/libs/wingsdk/src/target-tf-aws/bucket.ts index 7e8b592e067..5c48a91445e 100644 --- a/libs/wingsdk/src/target-tf-aws/bucket.ts +++ b/libs/wingsdk/src/target-tf-aws/bucket.ts @@ -124,7 +124,7 @@ export class Bucket extends cloud.Bucket { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-tf-aws", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-tf-aws/counter.ts b/libs/wingsdk/src/target-tf-aws/counter.ts index d488fd40959..8e88f15bdb7 100644 --- a/libs/wingsdk/src/target-tf-aws/counter.ts +++ b/libs/wingsdk/src/target-tf-aws/counter.ts @@ -50,7 +50,7 @@ export class Counter extends cloud.Counter { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-tf-aws", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-tf-aws/function.ts b/libs/wingsdk/src/target-tf-aws/function.ts index 0fcec512191..f1f36823ae8 100644 --- a/libs/wingsdk/src/target-tf-aws/function.ts +++ b/libs/wingsdk/src/target-tf-aws/function.ts @@ -244,7 +244,7 @@ export class Function extends cloud.Function implements IAwsFunction { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-tf-aws", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-tf-aws/on-deploy.ts b/libs/wingsdk/src/target-tf-aws/on-deploy.ts index d2ce80de261..ee3b44acdfe 100644 --- a/libs/wingsdk/src/target-tf-aws/on-deploy.ts +++ b/libs/wingsdk/src/target-tf-aws/on-deploy.ts @@ -57,7 +57,7 @@ export class OnDeploy extends cloud.OnDeploy { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-tf-aws", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-tf-aws/queue.ts b/libs/wingsdk/src/target-tf-aws/queue.ts index c5e0052a47d..a547e88645b 100644 --- a/libs/wingsdk/src/target-tf-aws/queue.ts +++ b/libs/wingsdk/src/target-tf-aws/queue.ts @@ -5,11 +5,10 @@ import { LambdaEventSourceMapping } from "../.gen/providers/aws/lambda-event-sou import { SqsQueue } from "../.gen/providers/aws/sqs-queue"; import * as cloud from "../cloud"; import * as core from "../core"; -import { Connections } from "../core"; import { convertBetweenHandlers } from "../shared/convert"; import { NameOptions, ResourceNames } from "../shared/resource-names"; import { calculateQueuePermissions } from "../shared-aws/permissions"; -import { IInflightHost } from "../std"; +import { IInflightHost, Node } from "../std"; /** * Queue names are limited to 80 characters. @@ -85,7 +84,7 @@ export class Queue extends cloud.Queue { batchSize: props.batchSize ?? 1, }); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "setConsumer()", @@ -111,7 +110,7 @@ export class Queue extends cloud.Queue { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-tf-aws", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-tf-aws/redis.ts b/libs/wingsdk/src/target-tf-aws/redis.ts index 53e02d6a004..34f2ede9471 100644 --- a/libs/wingsdk/src/target-tf-aws/redis.ts +++ b/libs/wingsdk/src/target-tf-aws/redis.ts @@ -5,7 +5,6 @@ import { ElasticacheCluster } from "../.gen/providers/aws/elasticache-cluster"; import { ElasticacheSubnetGroup } from "../.gen/providers/aws/elasticache-subnet-group"; import { SecurityGroup } from "../.gen/providers/aws/security-group"; import { Subnet } from "../.gen/providers/aws/subnet"; -import { Code } from "../core"; import * as core from "../core"; import * as ex from "../ex"; import { @@ -120,7 +119,7 @@ export class Redis extends ex.Redis { } /** @internal */ - public _toInflight(): Code { + public _toInflight(): string { return core.InflightClient.for(__dirname, __filename, "RedisClient", [ `process.env["${this.envName()}"]`, ]); diff --git a/libs/wingsdk/src/target-tf-aws/schedule.ts b/libs/wingsdk/src/target-tf-aws/schedule.ts index 833705e1501..c664a169baf 100644 --- a/libs/wingsdk/src/target-tf-aws/schedule.ts +++ b/libs/wingsdk/src/target-tf-aws/schedule.ts @@ -5,8 +5,8 @@ import { CloudwatchEventRule } from "../.gen/providers/aws/cloudwatch-event-rule import { CloudwatchEventTarget } from "../.gen/providers/aws/cloudwatch-event-target"; import * as cloud from "../cloud"; import * as core from "../core"; -import { Connections } from "../core"; import { convertBetweenHandlers } from "../shared/convert"; +import { Node } from "../std"; /** * AWS implementation of `cloud.Schedule`. @@ -78,7 +78,7 @@ export class Schedule extends cloud.Schedule { rule: this.rule.name, }); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "onTick()", @@ -88,7 +88,7 @@ export class Schedule extends cloud.Schedule { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-tf-aws", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-tf-aws/secret.ts b/libs/wingsdk/src/target-tf-aws/secret.ts index 41f6d50c8d7..0a204800fb6 100644 --- a/libs/wingsdk/src/target-tf-aws/secret.ts +++ b/libs/wingsdk/src/target-tf-aws/secret.ts @@ -62,7 +62,7 @@ export class Secret extends cloud.Secret { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-tf-aws", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-tf-aws/table.ts b/libs/wingsdk/src/target-tf-aws/table.ts index 07068139ed0..987a0d4f76d 100644 --- a/libs/wingsdk/src/target-tf-aws/table.ts +++ b/libs/wingsdk/src/target-tf-aws/table.ts @@ -108,7 +108,7 @@ export class Table extends ex.Table { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-tf-aws", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-tf-aws/test-runner.ts b/libs/wingsdk/src/target-tf-aws/test-runner.ts index 04cef349b74..29108bdfbc4 100644 --- a/libs/wingsdk/src/target-tf-aws/test-runner.ts +++ b/libs/wingsdk/src/target-tf-aws/test-runner.ts @@ -76,7 +76,7 @@ export class TestRunner extends std.TestRunner { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-tf-aws", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-tf-aws/topic.ts b/libs/wingsdk/src/target-tf-aws/topic.ts index fe715e11128..5948bcf882d 100644 --- a/libs/wingsdk/src/target-tf-aws/topic.ts +++ b/libs/wingsdk/src/target-tf-aws/topic.ts @@ -6,11 +6,10 @@ import { SnsTopicPolicy } from "../.gen/providers/aws/sns-topic-policy"; import { SnsTopicSubscription } from "../.gen/providers/aws/sns-topic-subscription"; import * as cloud from "../cloud"; import * as core from "../core"; -import { Connections } from "../core"; import { convertBetweenHandlers } from "../shared/convert"; import { NameOptions, ResourceNames } from "../shared/resource-names"; import { calculateTopicPermissions } from "../shared-aws/permissions"; -import { IInflightHost, Resource } from "../std"; +import { IInflightHost, Node, Resource } from "../std"; /** * Topic names are limited to 256 characters. @@ -89,7 +88,7 @@ export class Topic extends cloud.Topic { fn.addPermissionToInvoke(this, "sns.amazonaws.com", this.topic.arn, {}); - Connections.of(this).add({ + Node.of(this).addConnection({ source: this, target: fn, name: "onMessage()", @@ -148,7 +147,7 @@ export class Topic extends cloud.Topic { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-tf-aws", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-tf-aws/website.ts b/libs/wingsdk/src/target-tf-aws/website.ts index f97af71174d..b49dda278f3 100644 --- a/libs/wingsdk/src/target-tf-aws/website.ts +++ b/libs/wingsdk/src/target-tf-aws/website.ts @@ -182,7 +182,7 @@ export class Website extends cloud.Website { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for( __dirname.replace("target-tf-aws", "shared-aws"), __filename, diff --git a/libs/wingsdk/src/target-tf-azure/bucket.ts b/libs/wingsdk/src/target-tf-azure/bucket.ts index d85e6a80575..0f64b0993a4 100644 --- a/libs/wingsdk/src/target-tf-azure/bucket.ts +++ b/libs/wingsdk/src/target-tf-azure/bucket.ts @@ -174,7 +174,7 @@ export class Bucket extends cloud.Bucket { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { return core.InflightClient.for(__dirname, __filename, "BucketClient", [ `process.env["${this.envName()}"]`, `process.env["${this.envStorageAccountName()}"]`, diff --git a/libs/wingsdk/src/target-tf-azure/function.ts b/libs/wingsdk/src/target-tf-azure/function.ts index ec3a23515d2..a72bf2d65f7 100644 --- a/libs/wingsdk/src/target-tf-azure/function.ts +++ b/libs/wingsdk/src/target-tf-azure/function.ts @@ -10,7 +10,6 @@ import { ServicePlan } from "../.gen/providers/azurerm/service-plan"; import { StorageAccount } from "../.gen/providers/azurerm/storage-account"; import { StorageBlob } from "../.gen/providers/azurerm/storage-blob"; import * as cloud from "../cloud"; -import * as core from "../core"; import { createBundle } from "../shared/bundling"; import { CaseConventions, @@ -229,7 +228,7 @@ export class Function extends cloud.Function { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { // TODO: support inflight https://github.com/winglang/wing/issues/1371 throw new Error( "cloud.Function cannot be used as an Inflight resource on Azure yet" diff --git a/libs/wingsdk/src/target-tf-gcp/bucket.ts b/libs/wingsdk/src/target-tf-gcp/bucket.ts index 4880cd7b0a8..dd6d18ebea4 100644 --- a/libs/wingsdk/src/target-tf-gcp/bucket.ts +++ b/libs/wingsdk/src/target-tf-gcp/bucket.ts @@ -5,7 +5,6 @@ import { StorageBucketIamMember } from "../.gen/providers/google/storage-bucket- import { StorageBucketObject } from "../.gen/providers/google/storage-bucket-object"; import { Id } from "../.gen/providers/random/id"; import * as cloud from "../cloud"; -import * as core from "../core"; import { CaseConventions, NameOptions, @@ -88,7 +87,7 @@ export class Bucket extends cloud.Bucket { } /** @internal */ - public _toInflight(): core.Code { + public _toInflight(): string { throw new Error("Method not implemented."); } } diff --git a/libs/wingsdk/src/testing/simulator.ts b/libs/wingsdk/src/testing/simulator.ts index 550ba2e6ec5..a214dfb480a 100644 --- a/libs/wingsdk/src/testing/simulator.ts +++ b/libs/wingsdk/src/testing/simulator.ts @@ -2,9 +2,9 @@ import { existsSync } from "fs"; import { join } from "path"; import { Tree } from "./tree"; import { SDK_VERSION } from "../constants"; -import { CONNECTIONS_FILE_PATH, ConstructTree, TREE_FILE_PATH } from "../core"; +import { ConstructTree, TREE_FILE_PATH } from "../core"; import { readJsonSync } from "../shared/misc"; -import { Trace, TraceType } from "../std"; +import { CONNECTIONS_FILE_PATH, Trace, TraceType } from "../std"; // eslint-disable-next-line import/no-restricted-paths import { DefaultSimulatorFactory } from "../target-sim/factory.inflight"; import { isToken } from "../target-sim/tokens"; diff --git a/libs/wingsdk/src/testing/testing.ts b/libs/wingsdk/src/testing/testing.ts index 00b202c5c9e..c8a207fff8b 100644 --- a/libs/wingsdk/src/testing/testing.ts +++ b/libs/wingsdk/src/testing/testing.ts @@ -1,7 +1,7 @@ import { IConstruct } from "constructs"; -import { InflightBindings, NodeJsCode } from "../core"; +import { InflightBindings } from "../core"; import { liftObject } from "../core/internal"; -import { IInflightHost, IResource, Resource } from "../std"; +import { IInflightHost, IResource, Node, Resource } from "../std"; /** * Test utilities. @@ -43,16 +43,17 @@ export class Testing { (this as any)[field] = value.obj; } - this.display.title = "Inflight"; - this.display.description = "An inflight resource"; - this.display.hidden = true; + Node.of(this).title = "Inflight"; + Node.of(this).description = "An inflight resource"; + Node.of(this).hidden = true; + } - this._addInflightOps("handle"); + public _getInflightOps(): string[] { + return ["handle"]; } - public _toInflight(): NodeJsCode { - return NodeJsCode.fromInline( - `new ((function(){ + public _toInflight(): string { + return `new ((function(){ return class Handler { constructor(clients) { for (const [name, client] of Object.entries(clients)) { @@ -65,8 +66,7 @@ return class Handler { ${Object.entries(clients) .map(([name, client]) => `${name}: ${client}`) .join(",\n")} -})` - ); +})`; } public _registerBind(host: IInflightHost, ops: string[]): void { diff --git a/libs/wingsdk/src/util/util.ts b/libs/wingsdk/src/util/util.ts index 03fb3484d76..a1dd71b315c 100644 --- a/libs/wingsdk/src/util/util.ts +++ b/libs/wingsdk/src/util/util.ts @@ -1,7 +1,7 @@ import { createHash } from "crypto"; import { nanoid, customAlphabet } from "nanoid"; import { v4 } from "uuid"; -import { Code, InflightClient } from "../core"; +import { InflightClient } from "../core"; import { Duration, IResource } from "../std"; /** @@ -168,7 +168,7 @@ export class Util { /** * @internal */ - public static _toInflightType(): Code { + public static _toInflightType(): string { return InflightClient.forType(__filename, this.name); } private constructor() {} diff --git a/libs/wingsdk/test/core/__snapshots__/connections.test.ts.snap b/libs/wingsdk/test/core/__snapshots__/connections.test.ts.snap index 18fd2d9caa2..fa9a64d691d 100644 --- a/libs/wingsdk/test/core/__snapshots__/connections.test.ts.snap +++ b/libs/wingsdk/test/core/__snapshots__/connections.test.ts.snap @@ -66,7 +66,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -79,7 +79,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -92,7 +92,7 @@ return class Handler { "my_bucket": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -104,7 +104,7 @@ return class Handler { "my_function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -116,7 +116,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/core/to-inflight-type.test.ts b/libs/wingsdk/test/core/to-inflight-type.test.ts index 0d5bbb30968..54025cc97a1 100644 --- a/libs/wingsdk/test/core/to-inflight-type.test.ts +++ b/libs/wingsdk/test/core/to-inflight-type.test.ts @@ -14,6 +14,9 @@ const skip = [ "std.TraceType", "std.TEST_RUNNER_FQN", "std.Resource", + "std.CONNECTIONS_FILE_PATH", + "std.SDK_SOURCE_MODULE", + "std.Node", "util.RequestCache", // an enum "util.RequestRedirect", // an enum "util.HttpMethod", // an enum @@ -33,7 +36,7 @@ function makeTest(module: any, moduleName: string, className: string) { `${p} is missing _toInflightType()` ); - const code = module[className]._toInflightType().text; + const code = module[className]._toInflightType(); let v = vm.runInNewContext(code, { require: (name: string) => { // eslint-disable-next-line @typescript-eslint/no-require-imports diff --git a/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap index aa9a55613d8..135e8f3fe48 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap @@ -115,7 +115,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -128,7 +128,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -143,7 +143,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -154,11 +154,10 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -167,7 +166,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A REST API endpoint", @@ -179,7 +178,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -304,7 +303,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -317,7 +316,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -332,7 +331,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -343,11 +342,10 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -356,7 +354,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A REST API endpoint", @@ -368,7 +366,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -493,7 +491,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -506,7 +504,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -521,7 +519,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -532,11 +530,10 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -545,7 +542,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A REST API endpoint", @@ -557,7 +554,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -682,7 +679,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -695,7 +692,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -710,7 +707,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -721,11 +718,10 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -734,7 +730,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A REST API endpoint", @@ -746,7 +742,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -871,7 +867,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -884,7 +880,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -899,7 +895,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -910,11 +906,10 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -923,7 +918,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A REST API endpoint", @@ -935,7 +930,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -1192,7 +1187,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1205,7 +1200,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1220,7 +1215,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -1231,11 +1226,10 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -1244,7 +1238,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A REST API endpoint", @@ -1256,7 +1250,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -1379,7 +1373,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1392,7 +1386,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1407,7 +1401,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -1418,11 +1412,10 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -1431,7 +1424,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A REST API endpoint", @@ -1443,7 +1436,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -1632,7 +1625,7 @@ return class Handler { "Handler1": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1645,7 +1638,7 @@ return class Handler { "Handler2": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1658,7 +1651,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1673,7 +1666,7 @@ return class Handler { "ApiEventMapping-7c48a9f0": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -1684,7 +1677,7 @@ return class Handler { "ApiEventMapping-f6d90a7f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -1695,11 +1688,10 @@ return class Handler { "OnRequestHandler-7c48a9f0": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-7c48a9f0", @@ -1708,11 +1700,10 @@ return class Handler { "OnRequestHandler-f6d90a7f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "post()", }, "id": "OnRequestHandler-f6d90a7f", @@ -1721,7 +1712,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A REST API endpoint", @@ -1733,7 +1724,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -1924,7 +1915,7 @@ return class Handler { "Handler1": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1937,7 +1928,7 @@ return class Handler { "Handler2": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1950,7 +1941,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1965,7 +1956,7 @@ return class Handler { "ApiEventMapping-7c48a9f0": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -1976,7 +1967,7 @@ return class Handler { "ApiEventMapping-f6d90a7f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -1987,11 +1978,10 @@ return class Handler { "OnRequestHandler-7c48a9f0": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-7c48a9f0", @@ -2000,11 +1990,10 @@ return class Handler { "OnRequestHandler-f6d90a7f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-f6d90a7f", @@ -2013,7 +2002,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A REST API endpoint", @@ -2025,7 +2014,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -2150,7 +2139,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -2163,7 +2152,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2178,7 +2167,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -2189,11 +2178,10 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -2202,7 +2190,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A REST API endpoint", @@ -2214,7 +2202,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -2348,7 +2336,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -2361,7 +2349,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2376,7 +2364,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -2387,11 +2375,10 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -2400,7 +2387,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A REST API endpoint", @@ -2412,7 +2399,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -2537,7 +2524,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -2550,7 +2537,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2565,7 +2552,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -2576,11 +2563,10 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "post()", }, "id": "OnRequestHandler-e645076f", @@ -2589,7 +2575,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A REST API endpoint", @@ -2601,7 +2587,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -2647,7 +2633,7 @@ exports[`create an api 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2660,7 +2646,7 @@ exports[`create an api 1`] = ` "my_api": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A REST API endpoint", @@ -2672,7 +2658,7 @@ exports[`create an api 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/bucket.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/bucket.test.ts.snap index d16dcfc4085..71e0b024361 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/bucket.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/bucket.test.ts.snap @@ -97,7 +97,7 @@ exports[`can add file in preflight 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -110,7 +110,7 @@ exports[`can add file in preflight 2`] = ` "my_bucket": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -122,7 +122,7 @@ exports[`can add file in preflight 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -182,7 +182,7 @@ exports[`can add object in preflight 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -195,7 +195,7 @@ exports[`can add object in preflight 2`] = ` "my_bucket": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -207,7 +207,7 @@ exports[`can add object in preflight 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -252,7 +252,7 @@ exports[`create a bucket 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -265,7 +265,7 @@ exports[`create a bucket 1`] = ` "my_bucket": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -277,7 +277,7 @@ exports[`create a bucket 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -332,7 +332,7 @@ exports[`get invalid object throws an error 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -345,7 +345,7 @@ exports[`get invalid object throws an error 2`] = ` "my_bucket": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -357,7 +357,7 @@ exports[`get invalid object throws an error 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -448,7 +448,7 @@ exports[`put and get Json object from bucket 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -461,7 +461,7 @@ exports[`put and get Json object from bucket 2`] = ` "my_bucket": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -473,7 +473,7 @@ exports[`put and get Json object from bucket 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/counter.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/counter.test.ts.snap index 2f5734a4c2c..018c695b0c4 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/counter.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/counter.test.ts.snap @@ -33,7 +33,7 @@ exports[`create a counter 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -46,7 +46,7 @@ exports[`create a counter 1`] = ` "my_counter": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed atomic counter", @@ -58,7 +58,7 @@ exports[`create a counter 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -114,7 +114,7 @@ exports[`dec 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -127,7 +127,7 @@ exports[`dec 2`] = ` "my_counter": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed atomic counter", @@ -139,7 +139,7 @@ exports[`dec 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -195,7 +195,7 @@ exports[`inc 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -208,7 +208,7 @@ exports[`inc 2`] = ` "my_counter": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed atomic counter", @@ -220,7 +220,7 @@ exports[`inc 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -276,7 +276,7 @@ exports[`key dec 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -289,7 +289,7 @@ exports[`key dec 2`] = ` "my_counter": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed atomic counter", @@ -301,7 +301,7 @@ exports[`key dec 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -357,7 +357,7 @@ exports[`key inc 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -370,7 +370,7 @@ exports[`key inc 2`] = ` "my_counter": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed atomic counter", @@ -382,7 +382,7 @@ exports[`key inc 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -436,7 +436,7 @@ exports[`key set to new value 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -449,7 +449,7 @@ exports[`key set to new value 2`] = ` "my_counter": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed atomic counter", @@ -461,7 +461,7 @@ exports[`key set to new value 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -515,7 +515,7 @@ exports[`set to new value 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -528,7 +528,7 @@ exports[`set to new value 2`] = ` "my_counter": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed atomic counter", @@ -540,7 +540,7 @@ exports[`set to new value 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/file-counter.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/file-counter.test.ts.snap index 695bedc655c..6ca224e353a 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/file-counter.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/file-counter.test.ts.snap @@ -18,19 +18,19 @@ return class Handler { }; })())({ counter: (function(env) { - let handle = process.env[env]; - if (!handle) { - throw new Error(\\"Missing environment variable: \\" + env); - } - return $simulator.findInstance(handle); - })(\\"COUNTER_HANDLE_4ecd8d46\\"), + let handle = process.env[env]; + if (!handle) { + throw new Error(\\"Missing environment variable: \\" + env); + } + return $simulator.findInstance(handle); +})(\\"COUNTER_HANDLE_4ecd8d46\\"), bucket: (function(env) { - let handle = process.env[env]; - if (!handle) { - throw new Error(\\"Missing environment variable: \\" + env); - } - return $simulator.findInstance(handle); - })(\\"BUCKET_HANDLE_5f2a41c8\\") + let handle = process.env[env]; + if (!handle) { + throw new Error(\\"Missing environment variable: \\" + env); + } + return $simulator.findInstance(handle); +})(\\"BUCKET_HANDLE_5f2a41c8\\") }), args: {} })).handle(event); };", "connections.json": { @@ -147,7 +147,7 @@ bucket: (function(env) { "Bucket": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -159,7 +159,7 @@ bucket: (function(env) { "Counter": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed atomic counter", @@ -171,7 +171,7 @@ bucket: (function(env) { "Processor": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -186,7 +186,7 @@ bucket: (function(env) { "Queue-QueueEventMapping-401ee792": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -197,11 +197,10 @@ bucket: (function(env) { "Queue-SetConsumer-401ee792": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "setConsumer()", }, "id": "Queue-SetConsumer-401ee792", @@ -210,7 +209,7 @@ bucket: (function(env) { "Queue-SetConsumerHandler-401ee792": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -221,7 +220,7 @@ bucket: (function(env) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed message queue", @@ -233,7 +232,7 @@ bucket: (function(env) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "HelloWorld", "path": "root/HelloWorld", @@ -241,7 +240,7 @@ bucket: (function(env) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -254,7 +253,7 @@ bucket: (function(env) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/function.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/function.test.ts.snap index 03385a45e2b..aa0e02ad635 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/function.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/function.test.ts.snap @@ -65,7 +65,7 @@ async handle(event) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -78,7 +78,7 @@ async handle(event) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -91,7 +91,7 @@ async handle(event) { "my_function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -103,7 +103,7 @@ async handle(event) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -186,7 +186,7 @@ async handle(event) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -199,7 +199,7 @@ async handle(event) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -212,7 +212,7 @@ async handle(event) { "my_function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -224,7 +224,7 @@ async handle(event) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -307,7 +307,7 @@ async handle(event) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -320,7 +320,7 @@ async handle(event) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -333,7 +333,7 @@ async handle(event) { "my_function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -345,7 +345,7 @@ async handle(event) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -430,7 +430,7 @@ async handle(event) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -443,7 +443,7 @@ async handle(event) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -456,7 +456,7 @@ async handle(event) { "my_function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -468,7 +468,7 @@ async handle(event) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -541,7 +541,7 @@ async handle() { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -554,7 +554,7 @@ async handle() { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -567,7 +567,7 @@ async handle() { "my_function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -579,7 +579,7 @@ async handle() { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -734,7 +734,7 @@ return class Handler { "Function.0": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -746,7 +746,7 @@ return class Handler { "Function.0.handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -759,7 +759,7 @@ return class Handler { "Function.1": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -771,7 +771,7 @@ return class Handler { "Function.1.handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -784,7 +784,7 @@ return class Handler { "Function.2": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -796,7 +796,7 @@ return class Handler { "Function.2.handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -809,7 +809,7 @@ return class Handler { "Function.3": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -821,7 +821,7 @@ return class Handler { "Function.3.handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -834,7 +834,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -847,7 +847,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/immutable-capture.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/immutable-capture.test.ts.snap index bf217450ff2..3b6b4d27d02 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/immutable-capture.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/immutable-capture.test.ts.snap @@ -55,7 +55,7 @@ my_capture: [\\"hello\\",\\"dude\\"] "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -67,7 +67,7 @@ my_capture: [\\"hello\\",\\"dude\\"] "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -80,7 +80,7 @@ my_capture: [\\"hello\\",\\"dude\\"] "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -93,7 +93,7 @@ my_capture: [\\"hello\\",\\"dude\\"] }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -125,18 +125,18 @@ if (!(await this.my_buckets[1].get(\\"foo\\") === \\"bar\\")) { throw new Error( }; })())({ my_buckets: [(function(env) { - let handle = process.env[env]; - if (!handle) { - throw new Error(\\"Missing environment variable: \\" + env); - } - return $simulator.findInstance(handle); - })(\\"BUCKET_HANDLE_4fecd6d0\\"),(function(env) { - let handle = process.env[env]; - if (!handle) { - throw new Error(\\"Missing environment variable: \\" + env); - } - return $simulator.findInstance(handle); - })(\\"BUCKET_HANDLE_300e8055\\")] + let handle = process.env[env]; + if (!handle) { + throw new Error(\\"Missing environment variable: \\" + env); + } + return $simulator.findInstance(handle); +})(\\"BUCKET_HANDLE_4fecd6d0\\"),(function(env) { + let handle = process.env[env]; + if (!handle) { + throw new Error(\\"Missing environment variable: \\" + env); + } + return $simulator.findInstance(handle); +})(\\"BUCKET_HANDLE_300e8055\\")] })).handle(event); };", "connections.json": { @@ -207,7 +207,7 @@ my_buckets: [(function(env) { "B1": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -219,7 +219,7 @@ my_buckets: [(function(env) { "B2": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -231,7 +231,7 @@ my_buckets: [(function(env) { "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -243,7 +243,7 @@ my_buckets: [(function(env) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -256,7 +256,7 @@ my_buckets: [(function(env) { "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -269,7 +269,7 @@ my_buckets: [(function(env) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -334,7 +334,7 @@ my_array: [{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": 0.1666666666666666 "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -346,7 +346,7 @@ my_array: [{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": 0.1666666666666666 "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -359,7 +359,7 @@ my_array: [{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": 0.1666666666666666 "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -372,7 +372,7 @@ my_array: [{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": 0.1666666666666666 }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -436,7 +436,7 @@ my_array: [new Map([[\\"foo\\",1],[\\"bar\\",2]]),new Map([[\\"foo\\",3],[\\"bar "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -448,7 +448,7 @@ my_array: [new Map([[\\"foo\\",1],[\\"bar\\",2]]),new Map([[\\"foo\\",3],[\\"bar "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -461,7 +461,7 @@ my_array: [new Map([[\\"foo\\",1],[\\"bar\\",2]]),new Map([[\\"foo\\",3],[\\"bar "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -474,7 +474,7 @@ my_array: [new Map([[\\"foo\\",1],[\\"bar\\",2]]),new Map([[\\"foo\\",3],[\\"bar }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -537,7 +537,7 @@ my_capture: false "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -549,7 +549,7 @@ my_capture: false "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -562,7 +562,7 @@ my_capture: false "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -575,7 +575,7 @@ my_capture: false }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -640,7 +640,7 @@ my_capture: {\\"seconds\\": 7200,\\"minutes\\": 120,\\"hours\\": 2,} "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -652,7 +652,7 @@ my_capture: {\\"seconds\\": 7200,\\"minutes\\": 120,\\"hours\\": 2,} "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -665,7 +665,7 @@ my_capture: {\\"seconds\\": 7200,\\"minutes\\": 120,\\"hours\\": 2,} "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -678,7 +678,7 @@ my_capture: {\\"seconds\\": 7200,\\"minutes\\": 120,\\"hours\\": 2,} }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -745,7 +745,7 @@ my_capture: new Map([[\\"foo\\",123],[\\"bar\\",456]]) "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -757,7 +757,7 @@ my_capture: new Map([[\\"foo\\",123],[\\"bar\\",456]]) "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -770,7 +770,7 @@ my_capture: new Map([[\\"foo\\",123],[\\"bar\\",456]]) "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -783,7 +783,7 @@ my_capture: new Map([[\\"foo\\",123],[\\"bar\\",456]]) }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -852,7 +852,7 @@ my_map: new Map([[\\"foo\\",[1,2]],[\\"bar\\",[3,4]]]) "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -864,7 +864,7 @@ my_map: new Map([[\\"foo\\",[1,2]],[\\"bar\\",[3,4]]]) "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -877,7 +877,7 @@ my_map: new Map([[\\"foo\\",[1,2]],[\\"bar\\",[3,4]]]) "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -890,7 +890,7 @@ my_map: new Map([[\\"foo\\",[1,2]],[\\"bar\\",[3,4]]]) }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -956,7 +956,7 @@ my_map: new Map([[\\"foo\\",[{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -968,7 +968,7 @@ my_map: new Map([[\\"foo\\",[{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -981,7 +981,7 @@ my_map: new Map([[\\"foo\\",[{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -994,7 +994,7 @@ my_map: new Map([[\\"foo\\",[{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -1023,18 +1023,18 @@ if (!(await foo.get(\\"hello.txt\\") === \\"world\\")) { throw new Error(\`asser }; })())({ my_map: new Map([[\\"foo\\",(function(env) { - let handle = process.env[env]; - if (!handle) { - throw new Error(\\"Missing environment variable: \\" + env); - } - return $simulator.findInstance(handle); - })(\\"BUCKET_HANDLE_4fecd6d0\\")],[\\"bar\\",(function(env) { - let handle = process.env[env]; - if (!handle) { - throw new Error(\\"Missing environment variable: \\" + env); - } - return $simulator.findInstance(handle); - })(\\"BUCKET_HANDLE_300e8055\\")]]) + let handle = process.env[env]; + if (!handle) { + throw new Error(\\"Missing environment variable: \\" + env); + } + return $simulator.findInstance(handle); +})(\\"BUCKET_HANDLE_4fecd6d0\\")],[\\"bar\\",(function(env) { + let handle = process.env[env]; + if (!handle) { + throw new Error(\\"Missing environment variable: \\" + env); + } + return $simulator.findInstance(handle); +})(\\"BUCKET_HANDLE_300e8055\\")]]) })).handle(event); };", "connections.json": { @@ -1105,7 +1105,7 @@ my_map: new Map([[\\"foo\\",(function(env) { "B1": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -1117,7 +1117,7 @@ my_map: new Map([[\\"foo\\",(function(env) { "B2": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -1129,7 +1129,7 @@ my_map: new Map([[\\"foo\\",(function(env) { "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -1141,7 +1141,7 @@ my_map: new Map([[\\"foo\\",(function(env) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1154,7 +1154,7 @@ my_map: new Map([[\\"foo\\",(function(env) { "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1167,7 +1167,7 @@ my_map: new Map([[\\"foo\\",(function(env) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -1230,7 +1230,7 @@ my_capture: 123 "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -1242,7 +1242,7 @@ my_capture: 123 "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1255,7 +1255,7 @@ my_capture: 123 "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1268,7 +1268,7 @@ my_capture: 123 }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -1334,7 +1334,7 @@ my_capture: new Set([\\"boom\\",\\"bam\\",\\"bang\\"]) "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -1346,7 +1346,7 @@ my_capture: new Set([\\"boom\\",\\"bam\\",\\"bang\\"]) "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1359,7 +1359,7 @@ my_capture: new Set([\\"boom\\",\\"bam\\",\\"bang\\"]) "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1372,7 +1372,7 @@ my_capture: new Set([\\"boom\\",\\"bam\\",\\"bang\\"]) }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -1437,7 +1437,7 @@ my_set: new Set([{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": 0.1666666666 "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -1449,7 +1449,7 @@ my_set: new Set([{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": 0.1666666666 "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1462,7 +1462,7 @@ my_set: new Set([{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": 0.1666666666 "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1475,7 +1475,7 @@ my_set: new Set([{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": 0.1666666666 }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -1539,7 +1539,7 @@ my_capture: \\"bam bam bam\\" "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -1551,7 +1551,7 @@ my_capture: \\"bam bam bam\\" "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1564,7 +1564,7 @@ my_capture: \\"bam bam bam\\" "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1577,7 +1577,7 @@ my_capture: \\"bam bam bam\\" }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -1643,7 +1643,7 @@ my_capture: {\\"hello\\": \\"dude\\",\\"world\\": \\"cup\\",\\"foo\\": \\"bar\\" "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -1655,7 +1655,7 @@ my_capture: {\\"hello\\": \\"dude\\",\\"world\\": \\"cup\\",\\"foo\\": \\"bar\\" "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1668,7 +1668,7 @@ my_capture: {\\"hello\\": \\"dude\\",\\"world\\": \\"cup\\",\\"foo\\": \\"bar\\" "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1681,7 +1681,7 @@ my_capture: {\\"hello\\": \\"dude\\",\\"world\\": \\"cup\\",\\"foo\\": \\"bar\\" }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -1747,7 +1747,7 @@ my_struct: {\\"foo\\": new Map([[\\"foo\\",1],[\\"bar\\",2]]),\\"bar\\": new Map "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -1759,7 +1759,7 @@ my_struct: {\\"foo\\": new Map([[\\"foo\\",1],[\\"bar\\",2]]),\\"bar\\": new Map "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1772,7 +1772,7 @@ my_struct: {\\"foo\\": new Map([[\\"foo\\",1],[\\"bar\\",2]]),\\"bar\\": new Map "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1785,7 +1785,7 @@ my_struct: {\\"foo\\": new Map([[\\"foo\\",1],[\\"bar\\",2]]),\\"bar\\": new Map }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -1819,36 +1819,36 @@ if (!(await bar.get(\\"foo\\") === \\"bar\\")) { throw new Error(\`assertion fai }; })())({ my_struct: {\\"bucky\\": (function(env) { - let handle = process.env[env]; - if (!handle) { - throw new Error(\\"Missing environment variable: \\" + env); - } - return $simulator.findInstance(handle); - })(\\"BUCKET_HANDLE_4fecd6d0\\"),\\"mapy\\": new Map([[\\"foo\\",(function(env) { - let handle = process.env[env]; - if (!handle) { - throw new Error(\\"Missing environment variable: \\" + env); - } - return $simulator.findInstance(handle); - })(\\"BUCKET_HANDLE_300e8055\\")],[\\"bar\\",(function(env) { - let handle = process.env[env]; - if (!handle) { - throw new Error(\\"Missing environment variable: \\" + env); - } - return $simulator.findInstance(handle); - })(\\"BUCKET_HANDLE_0120daf4\\")]]),\\"arry\\": {\\"boom\\": [(function(env) { - let handle = process.env[env]; - if (!handle) { - throw new Error(\\"Missing environment variable: \\" + env); - } - return $simulator.findInstance(handle); - })(\\"BUCKET_HANDLE_ea7944ef\\"),(function(env) { - let handle = process.env[env]; - if (!handle) { - throw new Error(\\"Missing environment variable: \\" + env); - } - return $simulator.findInstance(handle); - })(\\"BUCKET_HANDLE_1d7ab674\\")],},} + let handle = process.env[env]; + if (!handle) { + throw new Error(\\"Missing environment variable: \\" + env); + } + return $simulator.findInstance(handle); +})(\\"BUCKET_HANDLE_4fecd6d0\\"),\\"mapy\\": new Map([[\\"foo\\",(function(env) { + let handle = process.env[env]; + if (!handle) { + throw new Error(\\"Missing environment variable: \\" + env); + } + return $simulator.findInstance(handle); +})(\\"BUCKET_HANDLE_300e8055\\")],[\\"bar\\",(function(env) { + let handle = process.env[env]; + if (!handle) { + throw new Error(\\"Missing environment variable: \\" + env); + } + return $simulator.findInstance(handle); +})(\\"BUCKET_HANDLE_0120daf4\\")]]),\\"arry\\": {\\"boom\\": [(function(env) { + let handle = process.env[env]; + if (!handle) { + throw new Error(\\"Missing environment variable: \\" + env); + } + return $simulator.findInstance(handle); +})(\\"BUCKET_HANDLE_ea7944ef\\"),(function(env) { + let handle = process.env[env]; + if (!handle) { + throw new Error(\\"Missing environment variable: \\" + env); + } + return $simulator.findInstance(handle); +})(\\"BUCKET_HANDLE_1d7ab674\\")],},} })).handle(event); };", "connections.json": { @@ -1967,7 +1967,7 @@ my_struct: {\\"bucky\\": (function(env) { "B1": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -1979,7 +1979,7 @@ my_struct: {\\"bucky\\": (function(env) { "B2": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -1991,7 +1991,7 @@ my_struct: {\\"bucky\\": (function(env) { "B3": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -2003,7 +2003,7 @@ my_struct: {\\"bucky\\": (function(env) { "B4": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -2015,7 +2015,7 @@ my_struct: {\\"bucky\\": (function(env) { "B5": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -2027,7 +2027,7 @@ my_struct: {\\"bucky\\": (function(env) { "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -2039,7 +2039,7 @@ my_struct: {\\"bucky\\": (function(env) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2052,7 +2052,7 @@ my_struct: {\\"bucky\\": (function(env) { "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -2065,7 +2065,7 @@ my_struct: {\\"bucky\\": (function(env) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/on-deploy.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/on-deploy.test.ts.snap index 24c26de5a96..7357e557fec 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/on-deploy.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/on-deploy.test.ts.snap @@ -58,7 +58,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -71,7 +71,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -86,11 +86,10 @@ return class Handler { "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "Function", }, "id": "Function", @@ -99,7 +98,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "Run code during the app's deployment.", @@ -111,7 +110,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/queue.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/queue.test.ts.snap index d6a66ed8561..29bb5c6f7f0 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/queue.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/queue.test.ts.snap @@ -34,7 +34,7 @@ exports[`create a queue 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -47,7 +47,7 @@ exports[`create a queue 2`] = ` "my_queue": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed message queue", @@ -59,7 +59,7 @@ exports[`create a queue 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -178,7 +178,7 @@ async handle(message) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -191,7 +191,7 @@ async handle(message) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -206,7 +206,7 @@ async handle(message) { "my_queue-QueueEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -217,11 +217,10 @@ async handle(message) { "my_queue-SetConsumer-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "setConsumer()", }, "id": "my_queue-SetConsumer-e645076f", @@ -230,7 +229,7 @@ async handle(message) { "my_queue-SetConsumerHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -241,7 +240,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed message queue", @@ -253,7 +252,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -372,7 +371,7 @@ async handle(message) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -385,7 +384,7 @@ async handle(message) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -400,7 +399,7 @@ async handle(message) { "my_queue-QueueEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -411,11 +410,10 @@ async handle(message) { "my_queue-SetConsumer-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "setConsumer()", }, "id": "my_queue-SetConsumer-e645076f", @@ -424,7 +422,7 @@ async handle(message) { "my_queue-SetConsumerHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -435,7 +433,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed message queue", @@ -447,7 +445,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -567,7 +565,7 @@ async handle(message) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -580,7 +578,7 @@ async handle(message) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -595,7 +593,7 @@ async handle(message) { "my_queue-QueueEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -606,11 +604,10 @@ async handle(message) { "my_queue-SetConsumer-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "setConsumer()", }, "id": "my_queue-SetConsumer-e645076f", @@ -619,7 +616,7 @@ async handle(message) { "my_queue-SetConsumerHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -630,7 +627,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed message queue", @@ -642,7 +639,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -700,7 +697,7 @@ exports[`queue batch size of 2, purge the queue 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -713,7 +710,7 @@ exports[`queue batch size of 2, purge the queue 2`] = ` "my_queue": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed message queue", @@ -725,7 +722,7 @@ exports[`queue batch size of 2, purge the queue 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -756,12 +753,12 @@ return class Handler { }; })())({ queue: (function(env) { - let handle = process.env[env]; - if (!handle) { - throw new Error(\\"Missing environment variable: \\" + env); - } - return $simulator.findInstance(handle); - })(\\"QUEUE_HANDLE_54fcf4cd\\") + let handle = process.env[env]; + if (!handle) { + throw new Error(\\"Missing environment variable: \\" + env); + } + return $simulator.findInstance(handle); +})(\\"QUEUE_HANDLE_54fcf4cd\\") })).handle(event); };", ".wing/my_queue-setconsumer-e645076f_c8ddc1ce.js": "exports.handler = async function(event) { @@ -885,7 +882,7 @@ async handle(message) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -898,7 +895,7 @@ async handle(message) { "OnDeployHandler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -911,7 +908,7 @@ async handle(message) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -926,7 +923,7 @@ async handle(message) { "my_queue-QueueEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -937,11 +934,10 @@ async handle(message) { "my_queue-SetConsumer-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "setConsumer()", }, "id": "my_queue-SetConsumer-e645076f", @@ -950,7 +946,7 @@ async handle(message) { "my_queue-SetConsumerHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -961,7 +957,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed message queue", @@ -975,11 +971,10 @@ async handle(message) { "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "Function", }, "id": "Function", @@ -988,7 +983,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "Run code during the app's deployment.", @@ -1000,7 +995,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -1118,7 +1113,7 @@ async handle(message) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1131,7 +1126,7 @@ async handle(message) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1146,7 +1141,7 @@ async handle(message) { "my_queue-QueueEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -1157,11 +1152,10 @@ async handle(message) { "my_queue-SetConsumer-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "setConsumer()", }, "id": "my_queue-SetConsumer-e645076f", @@ -1170,7 +1164,7 @@ async handle(message) { "my_queue-SetConsumerHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -1181,7 +1175,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed message queue", @@ -1193,7 +1187,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/redis.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/redis.test.ts.snap index 078798f0d27..a5296705978 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/redis.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/redis.test.ts.snap @@ -31,7 +31,7 @@ exports[`create a Redis resource 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -44,7 +44,7 @@ exports[`create a Redis resource 1`] = ` "my_redis": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A Redis server", @@ -56,7 +56,7 @@ exports[`create a Redis resource 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/schedule.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/schedule.test.ts.snap index bbafaed67a7..37abcc55723 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/schedule.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/schedule.test.ts.snap @@ -33,7 +33,7 @@ exports[`create a schedule 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -46,7 +46,7 @@ exports[`create a schedule 1`] = ` "my_schedule": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud schedule to trigger events at regular intervals", @@ -58,7 +58,7 @@ exports[`create a schedule 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -155,7 +155,7 @@ console.log(\\"Hello from schedule!\\"); "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -168,7 +168,7 @@ console.log(\\"Hello from schedule!\\"); "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -183,11 +183,10 @@ console.log(\\"Hello from schedule!\\"); "my_schedule-OnTick-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "onTick()", }, "id": "my_schedule-OnTick-e645076f", @@ -196,7 +195,7 @@ console.log(\\"Hello from schedule!\\"); "my_schedule-OnTickMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -207,7 +206,7 @@ console.log(\\"Hello from schedule!\\"); "my_scheduleOnTickHandlere645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -218,7 +217,7 @@ console.log(\\"Hello from schedule!\\"); }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud schedule to trigger events at regular intervals", @@ -230,7 +229,7 @@ console.log(\\"Hello from schedule!\\"); }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -327,7 +326,7 @@ console.log(\\"Hello from schedule!\\"); "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -340,7 +339,7 @@ console.log(\\"Hello from schedule!\\"); "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -355,11 +354,10 @@ console.log(\\"Hello from schedule!\\"); "my_schedule-OnTick-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "onTick()", }, "id": "my_schedule-OnTick-e645076f", @@ -368,7 +366,7 @@ console.log(\\"Hello from schedule!\\"); "my_schedule-OnTickMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -379,7 +377,7 @@ console.log(\\"Hello from schedule!\\"); "my_scheduleOnTickHandlere645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -390,7 +388,7 @@ console.log(\\"Hello from schedule!\\"); }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud schedule to trigger events at regular intervals", @@ -402,7 +400,7 @@ console.log(\\"Hello from schedule!\\"); }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -499,7 +497,7 @@ console.log(\\"Hello from schedule!\\"); "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -512,7 +510,7 @@ console.log(\\"Hello from schedule!\\"); "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -527,11 +525,10 @@ console.log(\\"Hello from schedule!\\"); "my_schedule-OnTick-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "onTick()", }, "id": "my_schedule-OnTick-e645076f", @@ -540,7 +537,7 @@ console.log(\\"Hello from schedule!\\"); "my_schedule-OnTickMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -551,7 +548,7 @@ console.log(\\"Hello from schedule!\\"); "my_scheduleOnTickHandlere645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -562,7 +559,7 @@ console.log(\\"Hello from schedule!\\"); }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud schedule to trigger events at regular intervals", @@ -574,7 +571,7 @@ console.log(\\"Hello from schedule!\\"); }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/secret.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/secret.test.ts.snap index d0a417fdef3..93891a3e66b 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/secret.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/secret.test.ts.snap @@ -33,7 +33,7 @@ exports[`create a secret 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -46,7 +46,7 @@ exports[`create a secret 1`] = ` "my_secret": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud secret", @@ -58,7 +58,7 @@ exports[`create a secret 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/service.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/service.test.ts.snap index 36e8b92eb1c..e2a7ee5146f 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/service.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/service.test.ts.snap @@ -78,7 +78,7 @@ async handle(message) { "OnStartHandler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -91,7 +91,7 @@ async handle(message) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -106,7 +106,7 @@ async handle(message) { "my_service-ServiceOnStart-ef2b13b9": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -117,11 +117,10 @@ async handle(message) { "my_service-ServiceOnStartef2b13b9": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", - "sourceModule": "@winglang/sdk", "title": "onStart()", }, "id": "my_service-ServiceOnStartef2b13b9", @@ -130,7 +129,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud service", @@ -142,7 +141,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/table.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/table.test.ts.snap index 8e88a0335d8..762d2ca3042 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/table.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/table.test.ts.snap @@ -56,7 +56,7 @@ exports[`can add row in preflight 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -69,7 +69,7 @@ exports[`can add row in preflight 2`] = ` "my_table": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud NoSQL database table that can be used to store and query data", @@ -81,7 +81,7 @@ exports[`can add row in preflight 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -130,7 +130,7 @@ exports[`create a table 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -143,7 +143,7 @@ exports[`create a table 1`] = ` "my_table": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud NoSQL database table that can be used to store and query data", @@ -155,7 +155,7 @@ exports[`create a table 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -216,7 +216,7 @@ exports[`get row 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -229,7 +229,7 @@ exports[`get row 2`] = ` "my_table": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud NoSQL database table that can be used to store and query data", @@ -241,7 +241,7 @@ exports[`get row 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -301,7 +301,7 @@ exports[`insert row 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -314,7 +314,7 @@ exports[`insert row 2`] = ` "my_table": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud NoSQL database table that can be used to store and query data", @@ -326,7 +326,7 @@ exports[`insert row 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -389,7 +389,7 @@ exports[`list table 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -402,7 +402,7 @@ exports[`list table 2`] = ` "my_table": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud NoSQL database table that can be used to store and query data", @@ -414,7 +414,7 @@ exports[`list table 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", @@ -478,7 +478,7 @@ exports[`update row 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -491,7 +491,7 @@ exports[`update row 2`] = ` "my_table": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud NoSQL database table that can be used to store and query data", @@ -503,7 +503,7 @@ exports[`update row 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/test.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/test.test.ts.snap index 41f61ff94e2..1dff4918f7c 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/test.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/test.test.ts.snap @@ -55,7 +55,7 @@ async handle(event) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -68,7 +68,7 @@ async handle(event) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -83,7 +83,7 @@ async handle(event) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -95,7 +95,7 @@ async handle(event) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud unit test.", @@ -107,7 +107,7 @@ async handle(event) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/topic.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/topic.test.ts.snap index a69eb27dc71..913b72bd215 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/topic.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/topic.test.ts.snap @@ -31,7 +31,7 @@ exports[`create a topic 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -44,7 +44,7 @@ exports[`create a topic 1`] = ` "my_topic": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A pub/sub notification topic", @@ -56,7 +56,7 @@ exports[`create a topic 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/bucket.test.ts b/libs/wingsdk/test/target-sim/bucket.test.ts index 23973084566..58244848e0c 100644 --- a/libs/wingsdk/test/target-sim/bucket.test.ts +++ b/libs/wingsdk/test/target-sim/bucket.test.ts @@ -5,6 +5,7 @@ import { vi, test, expect } from "vitest"; import { listMessages, treeJsonOf } from "./util"; import * as cloud from "../../src/cloud"; import { BucketEventType } from "../../src/cloud"; +import { Node } from "../../src/std"; import { Testing } from "../../src/testing"; import { SimApp } from "../sim-app"; @@ -442,7 +443,7 @@ test("bucket has no display hidden property", async () => { const bucket = app.node.tryFindChild("my_bucket") as cloud.Bucket; // THEN - expect(bucket.display.hidden).toBeUndefined(); + expect(Node.of(bucket).hidden).toBeUndefined(); expect(treeJson.tree.children).toBeDefined(); expect(treeJson.tree.children).not.toMatchObject({ my_bucket: { @@ -463,8 +464,8 @@ test("bucket has display title and description properties", async () => { const bucket = app.node.tryFindChild("my_bucket") as cloud.Bucket; // THEN - expect(bucket.display.title).toBeDefined(); - expect(bucket.display.description).toBeDefined(); + expect(Node.of(bucket).title).toBeDefined(); + expect(Node.of(bucket).description).toBeDefined(); expect(treeJson.tree.children).toMatchObject({ my_bucket: { display: { diff --git a/libs/wingsdk/test/target-sim/counter.test.ts b/libs/wingsdk/test/target-sim/counter.test.ts index f34d0340b9d..650fc77b08f 100644 --- a/libs/wingsdk/test/target-sim/counter.test.ts +++ b/libs/wingsdk/test/target-sim/counter.test.ts @@ -2,6 +2,7 @@ import { test, expect } from "vitest"; import { listMessages, treeJsonOf } from "./util"; import * as cloud from "../../src/cloud"; import { ICounterClient } from "../../src/cloud"; +import { Node } from "../../src/std"; import { SimApp } from "../sim-app"; test("create a counter", async () => { @@ -241,7 +242,7 @@ test("counter has no display hidden property", async () => { const counter = app.node.tryFindChild("my_counter") as cloud.Counter; // THEN - expect(counter.display.hidden).toBeUndefined(); + expect(Node.of(counter).hidden).toBeUndefined(); expect(treeJson.tree.children).toBeDefined(); expect(treeJson.tree.children).not.toMatchObject({ my_counter: { @@ -262,8 +263,8 @@ test("counter has display title and description properties", async () => { const counter = app.node.tryFindChild("my_counter") as cloud.Counter; // THEN - expect(counter.display.title).toBeDefined(); - expect(counter.display.description).toBeDefined(); + expect(Node.of(counter).title).toBeDefined(); + expect(Node.of(counter).description).toBeDefined(); expect(treeJson.tree.children).toMatchObject({ my_counter: { display: { diff --git a/libs/wingsdk/test/target-sim/function.test.ts b/libs/wingsdk/test/target-sim/function.test.ts index 6bbde9cb00c..cfce52fd4dd 100644 --- a/libs/wingsdk/test/target-sim/function.test.ts +++ b/libs/wingsdk/test/target-sim/function.test.ts @@ -1,7 +1,8 @@ import { test, expect } from "vitest"; import { listMessages, treeJsonOf } from "./util"; import * as cloud from "../../src/cloud"; -import { Simulator, Testing } from "../../src/testing"; +import { Node } from "../../src/std"; +import { Testing } from "../../src/testing"; import { SimApp } from "../sim-app"; const INFLIGHT_CODE = ` @@ -143,7 +144,7 @@ test("function has no display hidden property", async () => { const func = app.node.tryFindChild("my_function") as cloud.Function; // THEN - expect(func.display.hidden).toBeUndefined(); + expect(Node.of(func).hidden).toBeUndefined(); expect(treeJson.tree.children).toBeDefined(); expect(treeJson.tree.children).not.toMatchObject({ my_function: { @@ -165,8 +166,8 @@ test("function has display title and description properties", async () => { const func = app.node.tryFindChild("my_function") as cloud.Function; // THEN - expect(func.display.title).toBeDefined(); - expect(func.display.description).toBeDefined(); + expect(Node.of(func).title).toBeDefined(); + expect(Node.of(func).description).toBeDefined(); expect(treeJson.tree.children).toMatchObject({ my_function: { display: { diff --git a/libs/wingsdk/test/target-sim/inflight.test.ts b/libs/wingsdk/test/target-sim/inflight.test.ts index 646e789e74c..2ac4a4b698f 100644 --- a/libs/wingsdk/test/target-sim/inflight.test.ts +++ b/libs/wingsdk/test/target-sim/inflight.test.ts @@ -1,6 +1,6 @@ import { test, expect } from "vitest"; import { treeJsonOf } from "./util"; -import { Inflight } from "../../src/core"; +import { Node } from "../../src/std"; import { Testing } from "../../src/testing"; import { SimApp } from "../sim-app"; @@ -17,10 +17,10 @@ test("inflight has display hidden property set to true", async () => { // WHEN const treeJson = treeJsonOf(app.synth()); - const inflight = app.node.tryFindChild("Handler") as Inflight; + const inflight = app.node.findChild("Handler"); // THEN - expect(inflight.display.hidden).toEqual(true); + expect(Node.of(inflight).hidden).toEqual(true); expect(treeJson.tree.children).toBeDefined(); expect(treeJson.tree.children).toMatchObject({ Handler: { @@ -38,11 +38,11 @@ test("inflight has display title and description properties", async () => { // WHEN const treeJson = treeJsonOf(app.synth()); - const inflight = app.node.tryFindChild("Handler") as Inflight; + const inflight = app.node.findChild("Handler"); // THEN - expect(inflight.display.title).toBeDefined(); - expect(inflight.display.description).toBeDefined(); + expect(Node.of(inflight).title).toBeDefined(); + expect(Node.of(inflight).description).toBeDefined(); expect(treeJson.tree.children).toMatchObject({ Handler: { display: { diff --git a/libs/wingsdk/test/target-sim/queue.test.ts b/libs/wingsdk/test/target-sim/queue.test.ts index 238990b7a58..f09fce43319 100644 --- a/libs/wingsdk/test/target-sim/queue.test.ts +++ b/libs/wingsdk/test/target-sim/queue.test.ts @@ -6,7 +6,7 @@ import { waitUntilTraceCount, } from "./util"; import * as cloud from "../../src/cloud"; -import { Duration } from "../../src/std"; +import { Duration, Node } from "../../src/std"; import { QUEUE_TYPE } from "../../src/target-sim/schema-resources"; import { Testing } from "../../src/testing"; import { SimApp } from "../sim-app"; @@ -274,7 +274,7 @@ test("queue has no display hidden property", async () => { const queue = app.node.tryFindChild("my_queue") as cloud.Queue; // THEN - expect(queue.display.hidden).toBeUndefined(); + expect(Node.of(queue).hidden).toBeUndefined(); expect(treeJson.tree.children).toBeDefined(); expect(treeJson.tree.children).not.toMatchObject({ my_queue: { @@ -295,8 +295,8 @@ test("queue has display title and description properties", async () => { const queue = app.node.tryFindChild("my_queue") as cloud.Queue; // THEN - expect(queue.display.title).toBeDefined(); - expect(queue.display.description).toBeDefined(); + expect(Node.of(queue).title).toBeDefined(); + expect(Node.of(queue).description).toBeDefined(); expect(treeJson.tree.children).toMatchObject({ my_queue: { display: { diff --git a/libs/wingsdk/test/target-sim/topic.test.ts b/libs/wingsdk/test/target-sim/topic.test.ts index 68210b04243..4a20a73e1c4 100644 --- a/libs/wingsdk/test/target-sim/topic.test.ts +++ b/libs/wingsdk/test/target-sim/topic.test.ts @@ -1,6 +1,7 @@ import { test, expect } from "vitest"; import { listMessages, treeJsonOf } from "./util"; import * as cloud from "../../src/cloud"; +import { Node } from "../../src/std"; import { Testing } from "../../src/testing"; import { SimApp } from "../sim-app"; @@ -84,7 +85,7 @@ test("topic has no display hidden property", async () => { const topic = app.node.tryFindChild("my_topic") as cloud.Topic; // THEN - expect(topic.display.hidden).toBeUndefined(); + expect(Node.of(topic).hidden).toBeUndefined(); expect(treeJson.tree.children).toBeDefined(); expect(treeJson.tree.children).not.toMatchObject({ my_topic: { @@ -105,8 +106,8 @@ test("topic has display title and description properties", async () => { const topic = app.node.tryFindChild("my_topic") as cloud.Topic; // THEN - expect(topic.display.title).toBeDefined(); - expect(topic.display.description).toBeDefined(); + expect(Node.of(topic).title).toBeDefined(); + expect(Node.of(topic).description).toBeDefined(); expect(treeJson.tree.children).toMatchObject({ my_topic: { display: { diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/bucket.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/bucket.test.ts.snap index 8f4edb43c8c..62fa5ad868f 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/bucket.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/bucket.test.ts.snap @@ -77,7 +77,7 @@ exports[`bucket is public 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -124,7 +124,7 @@ exports[`bucket is public 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -136,7 +136,7 @@ exports[`bucket is public 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -228,7 +228,7 @@ exports[`bucket prefix must be lowercase 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -258,7 +258,7 @@ exports[`bucket prefix must be lowercase 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -271,7 +271,7 @@ exports[`bucket prefix must be lowercase 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -363,7 +363,7 @@ exports[`bucket prefix valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -394,7 +394,7 @@ exports[`bucket prefix valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -406,7 +406,7 @@ exports[`bucket prefix valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -615,7 +615,7 @@ exports[`bucket with onCreate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -628,7 +628,7 @@ exports[`bucket with onCreate method 2`] = ` "inflight": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -709,7 +709,7 @@ exports[`bucket with onCreate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A pub/sub notification topic", @@ -779,7 +779,7 @@ exports[`bucket with onCreate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -791,7 +791,7 @@ exports[`bucket with onCreate method 2`] = ` "my_bucket-oncreate-OnMessageHandler-7b961f4d": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -802,7 +802,7 @@ exports[`bucket with onCreate method 2`] = ` "my_bucket-oncreate-eventHandler-9eade8f6": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -813,7 +813,7 @@ exports[`bucket with onCreate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -825,7 +825,7 @@ exports[`bucket with onCreate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -1034,7 +1034,7 @@ exports[`bucket with onDelete method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1047,7 +1047,7 @@ exports[`bucket with onDelete method 2`] = ` "inflight": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1128,7 +1128,7 @@ exports[`bucket with onDelete method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A pub/sub notification topic", @@ -1198,7 +1198,7 @@ exports[`bucket with onDelete method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -1210,7 +1210,7 @@ exports[`bucket with onDelete method 2`] = ` "my_bucket-ondelete-OnMessageHandler-1de1a361": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -1221,7 +1221,7 @@ exports[`bucket with onDelete method 2`] = ` "my_bucket-ondelete-eventHandler-9eade8f6": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -1232,7 +1232,7 @@ exports[`bucket with onDelete method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -1244,7 +1244,7 @@ exports[`bucket with onDelete method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -1575,7 +1575,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1588,7 +1588,7 @@ exports[`bucket with onEvent method 2`] = ` "inflight": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1669,7 +1669,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A pub/sub notification topic", @@ -1739,7 +1739,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -1751,7 +1751,7 @@ exports[`bucket with onEvent method 2`] = ` "my_bucket-oncreate-OnMessageHandler-7b961f4d": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -1762,7 +1762,7 @@ exports[`bucket with onEvent method 2`] = ` "my_bucket-oncreate-eventHandler-9eade8f6": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -1799,7 +1799,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A pub/sub notification topic", @@ -1869,7 +1869,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -1881,7 +1881,7 @@ exports[`bucket with onEvent method 2`] = ` "my_bucket-ondelete-OnMessageHandler-1de1a361": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -1892,7 +1892,7 @@ exports[`bucket with onEvent method 2`] = ` "my_bucket-ondelete-eventHandler-9eade8f6": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -1929,7 +1929,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A pub/sub notification topic", @@ -1999,7 +1999,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -2011,7 +2011,7 @@ exports[`bucket with onEvent method 2`] = ` "my_bucket-onupdate-OnMessageHandler-46c07356": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -2022,7 +2022,7 @@ exports[`bucket with onEvent method 2`] = ` "my_bucket-onupdate-eventHandler-9eade8f6": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -2033,7 +2033,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -2045,7 +2045,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -2254,7 +2254,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2267,7 +2267,7 @@ exports[`bucket with onUpdate method 2`] = ` "inflight": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -2348,7 +2348,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A pub/sub notification topic", @@ -2418,7 +2418,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -2430,7 +2430,7 @@ exports[`bucket with onUpdate method 2`] = ` "my_bucket-onupdate-OnMessageHandler-46c07356": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -2441,7 +2441,7 @@ exports[`bucket with onUpdate method 2`] = ` "my_bucket-onupdate-eventHandler-9eade8f6": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -2452,7 +2452,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -2464,7 +2464,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -2586,7 +2586,7 @@ exports[`bucket with two preflight files 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2649,7 +2649,7 @@ exports[`bucket with two preflight files 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -2661,7 +2661,7 @@ exports[`bucket with two preflight files 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -2783,7 +2783,7 @@ exports[`bucket with two preflight objects 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2846,7 +2846,7 @@ exports[`bucket with two preflight objects 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -2858,7 +2858,7 @@ exports[`bucket with two preflight objects 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -2950,7 +2950,7 @@ exports[`create a bucket 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2981,7 +2981,7 @@ exports[`create a bucket 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -2993,7 +2993,7 @@ exports[`create a bucket 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/counter.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/counter.test.ts.snap index 3e2c5f50f40..691e3f79912 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/counter.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/counter.test.ts.snap @@ -46,7 +46,7 @@ exports[`counter name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed atomic counter", @@ -76,7 +76,7 @@ exports[`counter name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -89,7 +89,7 @@ exports[`counter name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -168,7 +168,7 @@ exports[`counter with initial value 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed atomic counter", @@ -198,7 +198,7 @@ exports[`counter with initial value 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -211,7 +211,7 @@ exports[`counter with initial value 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -349,7 +349,7 @@ exports[`dec() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed atomic counter", @@ -411,7 +411,7 @@ exports[`dec() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -423,7 +423,7 @@ exports[`dec() policy statement 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -454,7 +454,7 @@ exports[`dec() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -467,7 +467,7 @@ exports[`dec() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -648,7 +648,7 @@ exports[`function with a counter binding 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed atomic counter", @@ -710,7 +710,7 @@ exports[`function with a counter binding 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -722,7 +722,7 @@ exports[`function with a counter binding 3`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -753,7 +753,7 @@ exports[`function with a counter binding 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -766,7 +766,7 @@ exports[`function with a counter binding 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -904,7 +904,7 @@ exports[`inc() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed atomic counter", @@ -966,7 +966,7 @@ exports[`inc() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -978,7 +978,7 @@ exports[`inc() policy statement 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1009,7 +1009,7 @@ exports[`inc() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1022,7 +1022,7 @@ exports[`inc() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -1160,7 +1160,7 @@ exports[`peek() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed atomic counter", @@ -1222,7 +1222,7 @@ exports[`peek() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -1234,7 +1234,7 @@ exports[`peek() policy statement 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1265,7 +1265,7 @@ exports[`peek() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1278,7 +1278,7 @@ exports[`peek() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -1357,7 +1357,7 @@ exports[`replace invalid character from counter name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed atomic counter", @@ -1387,7 +1387,7 @@ exports[`replace invalid character from counter name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1400,7 +1400,7 @@ exports[`replace invalid character from counter name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -1538,7 +1538,7 @@ exports[`set() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed atomic counter", @@ -1600,7 +1600,7 @@ exports[`set() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -1612,7 +1612,7 @@ exports[`set() policy statement 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1643,7 +1643,7 @@ exports[`set() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1656,7 +1656,7 @@ exports[`set() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/function.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/function.test.ts.snap index 283e1556c3d..971beee01f7 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/function.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/function.test.ts.snap @@ -131,7 +131,7 @@ exports[`basic function 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -143,7 +143,7 @@ exports[`basic function 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -174,7 +174,7 @@ exports[`basic function 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -187,7 +187,7 @@ exports[`basic function 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -353,7 +353,7 @@ exports[`basic function with environment variables 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -365,7 +365,7 @@ exports[`basic function with environment variables 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -396,7 +396,7 @@ exports[`basic function with environment variables 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -409,7 +409,7 @@ exports[`basic function with environment variables 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -574,7 +574,7 @@ exports[`basic function with memory size specified 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -586,7 +586,7 @@ exports[`basic function with memory size specified 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -617,7 +617,7 @@ exports[`basic function with memory size specified 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -630,7 +630,7 @@ exports[`basic function with memory size specified 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -794,7 +794,7 @@ exports[`basic function with timeout explicitly set 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -806,7 +806,7 @@ exports[`basic function with timeout explicitly set 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -837,7 +837,7 @@ exports[`basic function with timeout explicitly set 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -850,7 +850,7 @@ exports[`basic function with timeout explicitly set 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -964,7 +964,7 @@ exports[`function name valid 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1027,7 +1027,7 @@ exports[`function name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -1057,7 +1057,7 @@ exports[`function name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1070,7 +1070,7 @@ exports[`function name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -1184,7 +1184,7 @@ exports[`replace invalid character from function name 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -1247,7 +1247,7 @@ exports[`replace invalid character from function name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -1277,7 +1277,7 @@ exports[`replace invalid character from function name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1290,7 +1290,7 @@ exports[`replace invalid character from function name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/on-deploy.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/on-deploy.test.ts.snap index 857968b5497..a7074a0fc0a 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/on-deploy.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/on-deploy.test.ts.snap @@ -90,7 +90,7 @@ exports[`create an OnDeploy 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -121,7 +121,7 @@ exports[`create an OnDeploy 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -186,7 +186,7 @@ exports[`create an OnDeploy 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -206,7 +206,7 @@ exports[`create an OnDeploy 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "Run code during the app's deployment.", @@ -218,7 +218,7 @@ exports[`create an OnDeploy 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -360,7 +360,7 @@ exports[`execute OnDeploy after other resources 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -391,7 +391,7 @@ exports[`execute OnDeploy after other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -422,7 +422,7 @@ exports[`execute OnDeploy after other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -486,7 +486,7 @@ exports[`execute OnDeploy after other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -506,7 +506,7 @@ exports[`execute OnDeploy after other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "Run code during the app's deployment.", @@ -518,7 +518,7 @@ exports[`execute OnDeploy after other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -663,7 +663,7 @@ exports[`execute OnDeploy before other resources 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -694,7 +694,7 @@ exports[`execute OnDeploy before other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -725,7 +725,7 @@ exports[`execute OnDeploy before other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -789,7 +789,7 @@ exports[`execute OnDeploy before other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -809,7 +809,7 @@ exports[`execute OnDeploy before other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "Run code during the app's deployment.", @@ -821,7 +821,7 @@ exports[`execute OnDeploy before other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/queue.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/queue.test.ts.snap index 725146e42ed..e82e0b294cd 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/queue.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/queue.test.ts.snap @@ -38,7 +38,7 @@ exports[`default queue behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed message queue", @@ -68,7 +68,7 @@ exports[`default queue behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -81,7 +81,7 @@ exports[`default queue behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -152,7 +152,7 @@ exports[`queue name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed message queue", @@ -182,7 +182,7 @@ exports[`queue name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -195,7 +195,7 @@ exports[`queue name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -324,7 +324,7 @@ exports[`queue with a consumer function 3`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -355,7 +355,7 @@ exports[`queue with a consumer function 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed message queue", @@ -417,7 +417,7 @@ exports[`queue with a consumer function 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -429,7 +429,7 @@ exports[`queue with a consumer function 3`] = ` "Queue-SetConsumerHandler-c5395e41": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -458,7 +458,7 @@ exports[`queue with a consumer function 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -471,7 +471,7 @@ exports[`queue with a consumer function 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -543,7 +543,7 @@ exports[`queue with custom retention 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed message queue", @@ -573,7 +573,7 @@ exports[`queue with custom retention 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -586,7 +586,7 @@ exports[`queue with custom retention 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -658,7 +658,7 @@ exports[`queue with custom timeout 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed message queue", @@ -688,7 +688,7 @@ exports[`queue with custom timeout 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -701,7 +701,7 @@ exports[`queue with custom timeout 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -772,7 +772,7 @@ exports[`replace invalid character from queue name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A distributed message queue", @@ -802,7 +802,7 @@ exports[`replace invalid character from queue name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -815,7 +815,7 @@ exports[`replace invalid character from queue name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/schedule.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/schedule.test.ts.snap index 9f719892a70..da95ee388ae 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/schedule.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/schedule.test.ts.snap @@ -102,7 +102,7 @@ exports[`schedule behavior with cron 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -133,7 +133,7 @@ exports[`schedule behavior with cron 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud schedule to trigger events at regular intervals", @@ -203,7 +203,7 @@ exports[`schedule behavior with cron 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -215,7 +215,7 @@ exports[`schedule behavior with cron 2`] = ` "Schedule-OnTickHandler-c5395e41": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -244,7 +244,7 @@ exports[`schedule behavior with cron 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -257,7 +257,7 @@ exports[`schedule behavior with cron 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -392,7 +392,7 @@ exports[`schedule behavior with rate 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -423,7 +423,7 @@ exports[`schedule behavior with rate 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud schedule to trigger events at regular intervals", @@ -493,7 +493,7 @@ exports[`schedule behavior with rate 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -505,7 +505,7 @@ exports[`schedule behavior with rate 2`] = ` "Schedule-OnTickHandler-c5395e41": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -534,7 +534,7 @@ exports[`schedule behavior with rate 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -547,7 +547,7 @@ exports[`schedule behavior with rate 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -728,7 +728,7 @@ exports[`schedule with two functions 2`] = ` "Handler1": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -741,7 +741,7 @@ exports[`schedule with two functions 2`] = ` "Handler2": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -780,7 +780,7 @@ exports[`schedule with two functions 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud schedule to trigger events at regular intervals", @@ -850,7 +850,7 @@ exports[`schedule with two functions 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -920,7 +920,7 @@ exports[`schedule with two functions 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -932,7 +932,7 @@ exports[`schedule with two functions 2`] = ` "Schedule-OnTickHandler-0a615500": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -943,7 +943,7 @@ exports[`schedule with two functions 2`] = ` "Schedule-OnTickHandler-7b33bcba": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -972,7 +972,7 @@ exports[`schedule with two functions 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -985,7 +985,7 @@ exports[`schedule with two functions 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/secret.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/secret.test.ts.snap index 26cc7fb0e68..796409f29d7 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/secret.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/secret.test.ts.snap @@ -49,7 +49,7 @@ exports[`default secret behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud secret", @@ -79,7 +79,7 @@ exports[`default secret behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -92,7 +92,7 @@ exports[`default secret behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/table.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/table.test.ts.snap index 2bc23ea6b69..33b905f11ab 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/table.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/table.test.ts.snap @@ -189,7 +189,7 @@ exports[`function with a table binding 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -201,7 +201,7 @@ exports[`function with a table binding 3`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -224,7 +224,7 @@ exports[`function with a table binding 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud NoSQL database table that can be used to store and query data", @@ -254,7 +254,7 @@ exports[`function with a table binding 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -267,7 +267,7 @@ exports[`function with a table binding 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/topic.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/topic.test.ts.snap index 8acdc240a9f..a03fdbbc268 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/topic.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/topic.test.ts.snap @@ -38,7 +38,7 @@ exports[`default topic behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A pub/sub notification topic", @@ -68,7 +68,7 @@ exports[`default topic behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -81,7 +81,7 @@ exports[`default topic behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -152,7 +152,7 @@ exports[`replace invalid character from queue name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A pub/sub notification topic", @@ -182,7 +182,7 @@ exports[`replace invalid character from queue name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -195,7 +195,7 @@ exports[`replace invalid character from queue name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -266,7 +266,7 @@ exports[`topic name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A pub/sub notification topic", @@ -296,7 +296,7 @@ exports[`topic name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -309,7 +309,7 @@ exports[`topic name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -458,7 +458,7 @@ exports[`topic with subscriber function 3`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -489,7 +489,7 @@ exports[`topic with subscriber function 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A pub/sub notification topic", @@ -559,7 +559,7 @@ exports[`topic with subscriber function 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -571,7 +571,7 @@ exports[`topic with subscriber function 3`] = ` "Topic-OnMessageHandler-c5395e41": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "hidden": true, @@ -600,7 +600,7 @@ exports[`topic with subscriber function 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -613,7 +613,7 @@ exports[`topic with subscriber function 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/website.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/website.test.ts.snap index c0bbccbf5a6..5a4cf47e21e 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/website.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/website.test.ts.snap @@ -237,7 +237,7 @@ exports[`default website behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A static website", @@ -267,7 +267,7 @@ exports[`default website behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -280,7 +280,7 @@ exports[`default website behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -567,7 +567,7 @@ exports[`website with add_json 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A static website", @@ -597,7 +597,7 @@ exports[`website with add_json 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -610,7 +610,7 @@ exports[`website with add_json 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-azure/__snapshots__/bucket.test.ts.snap b/libs/wingsdk/test/target-tf-azure/__snapshots__/bucket.test.ts.snap index 660a1d3008f..3177d765aa6 100644 --- a/libs/wingsdk/test/target-tf-azure/__snapshots__/bucket.test.ts.snap +++ b/libs/wingsdk/test/target-tf-azure/__snapshots__/bucket.test.ts.snap @@ -74,7 +74,7 @@ exports[`bucket is public 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -86,7 +86,7 @@ exports[`bucket is public 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -185,7 +185,7 @@ exports[`bucket name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -205,7 +205,7 @@ exports[`bucket name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -344,7 +344,7 @@ exports[`bucket with two preflight files 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -356,7 +356,7 @@ exports[`bucket with two preflight files 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -495,7 +495,7 @@ exports[`bucket with two preflight objects 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -507,7 +507,7 @@ exports[`bucket with two preflight objects 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -614,7 +614,7 @@ exports[`create a bucket 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -626,7 +626,7 @@ exports[`create a bucket 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -738,7 +738,7 @@ exports[`create multiple buckets 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -760,7 +760,7 @@ exports[`create multiple buckets 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -772,7 +772,7 @@ exports[`create multiple buckets 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-azure/__snapshots__/function.test.ts.snap b/libs/wingsdk/test/target-tf-azure/__snapshots__/function.test.ts.snap index 9a66d0fe89e..2d2aad8bc21 100644 --- a/libs/wingsdk/test/target-tf-azure/__snapshots__/function.test.ts.snap +++ b/libs/wingsdk/test/target-tf-azure/__snapshots__/function.test.ts.snap @@ -124,7 +124,7 @@ exports[`basic function 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -144,7 +144,7 @@ exports[`basic function 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -156,7 +156,7 @@ exports[`basic function 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -201,7 +201,7 @@ exports[`basic function 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -360,7 +360,7 @@ exports[`basic function with environment variables 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -380,7 +380,7 @@ exports[`basic function with environment variables 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -392,7 +392,7 @@ exports[`basic function with environment variables 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -437,7 +437,7 @@ exports[`basic function with environment variables 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -558,7 +558,7 @@ exports[`replace invalid character from function name 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -639,7 +639,7 @@ exports[`replace invalid character from function name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -659,7 +659,7 @@ exports[`replace invalid character from function name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -671,7 +671,7 @@ exports[`replace invalid character from function name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-gcp/__snapshots__/bucket.test.ts.snap b/libs/wingsdk/test/target-tf-gcp/__snapshots__/bucket.test.ts.snap index 9a15e6ffda0..bc31f676bfa 100644 --- a/libs/wingsdk/test/target-tf-gcp/__snapshots__/bucket.test.ts.snap +++ b/libs/wingsdk/test/target-tf-gcp/__snapshots__/bucket.test.ts.snap @@ -72,7 +72,7 @@ exports[`bucket is public 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -92,7 +92,7 @@ exports[`bucket is public 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -210,7 +210,7 @@ exports[`bucket with two preflight files 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -230,7 +230,7 @@ exports[`bucket with two preflight files 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -348,7 +348,7 @@ exports[`bucket with two preflight objects 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -368,7 +368,7 @@ exports[`bucket with two preflight objects 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -458,7 +458,7 @@ exports[`create a bucket 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -478,7 +478,7 @@ exports[`create a bucket 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", @@ -577,7 +577,7 @@ exports[`two buckets 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -607,7 +607,7 @@ exports[`two buckets 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud object store", @@ -627,7 +627,7 @@ exports[`two buckets 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/testing/__snapshots__/simulator.test.ts.snap b/libs/wingsdk/test/testing/__snapshots__/simulator.test.ts.snap index 7028ab293ef..351b2de2bd9 100644 --- a/libs/wingsdk/test/testing/__snapshots__/simulator.test.ts.snap +++ b/libs/wingsdk/test/testing/__snapshots__/simulator.test.ts.snap @@ -7,7 +7,7 @@ exports[`provides raw tree data 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -22,7 +22,7 @@ exports[`provides raw tree data 1`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud function (FaaS)", @@ -34,7 +34,7 @@ exports[`provides raw tree data 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "A cloud unit test.", @@ -46,7 +46,7 @@ exports[`provides raw tree data 1`] = ` "test.handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "display": { "description": "An inflight resource", @@ -59,7 +59,7 @@ exports[`provides raw tree data 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.314", + "version": "10.2.69", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/testing/reload.test.ts b/libs/wingsdk/test/testing/reload.test.ts index 8154ca86a50..dd7e7005a01 100644 --- a/libs/wingsdk/test/testing/reload.test.ts +++ b/libs/wingsdk/test/testing/reload.test.ts @@ -1,5 +1,6 @@ import { test, expect } from "vitest"; import { Bucket } from "../../src/cloud"; +import { Node } from "../../src/std"; import * as sim from "../../src/target-sim"; import * as testing from "../../src/testing"; import { mkdtemp } from "../util"; @@ -10,7 +11,7 @@ test("reloading the simulator updates the state of the tree", async () => { // Create a .wsim file const app = new sim.App({ outdir: workdir }); const bucket1 = Bucket._newBucket(app, "my_bucket", { public: false }); - bucket1.display.hidden = false; + Node.of(bucket1).hidden = false; const simfile = app.synth(); // Start the simulator @@ -24,7 +25,7 @@ test("reloading the simulator updates the state of the tree", async () => { // Update the .wsim file in-place const app2 = new sim.App({ outdir: workdir }); const bucket2 = Bucket._newBucket(app2, "my_bucket", { public: true }); - bucket2.display.hidden = true; + Node.of(bucket2).hidden = true; app2.synth(); // Reload the simulator diff --git a/libs/wingsdk/test/util.ts b/libs/wingsdk/test/util.ts index 855e3c811d3..0a9fcf21f4d 100644 --- a/libs/wingsdk/test/util.ts +++ b/libs/wingsdk/test/util.ts @@ -2,7 +2,7 @@ import { mkdtempSync, readFileSync, readdirSync, statSync } from "fs"; import { tmpdir } from "os"; import { extname, isAbsolute, join } from "path"; import { Template } from "aws-cdk-lib/assertions"; -import { App, Code } from "../src/core"; +import { App } from "../src/core"; export function treeJsonOf(outdir: string): any { return JSON.parse(readFileSync(join(outdir, "tree.json"), "utf8")); @@ -157,7 +157,7 @@ export function directorySnapshot(initialRoot: string) { case ".js": const code = readFileSync(abspath, "utf-8"); - snapshot[key] = sanitizeCodeText(code); + snapshot[key] = sanitizeCode(code); break; default: @@ -175,7 +175,7 @@ export function directorySnapshot(initialRoot: string) { /** * Sanitize the text of a code bundle to remove path references that are system-specific. */ -export function sanitizeCodeText(code: string): string { +export function sanitizeCode(code: string): string { function removeAbsolutePaths(text: string) { const regex = /".+\/libs\/wingsdk\/(.+)"/g; @@ -186,10 +186,6 @@ export function sanitizeCodeText(code: string): string { return removeAbsolutePaths(code); } -export function sanitizeCode(code: Code): string { - return sanitizeCodeText(code.text); -} - export function mkdtemp() { return mkdtempSync(join(tmpdir(), "wingsdk.")); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 086a472068d..aa2b869c25f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1125,13 +1125,13 @@ importers: version: 8.10.109 aws-cdk-lib: specifier: ^2.64.0 - version: 2.64.0(constructs@10.1.314) + version: 2.64.0(constructs@10.2.69) cdktf: specifier: 0.17.0 - version: 0.17.0(constructs@10.1.314) + version: 0.17.0(constructs@10.2.69) constructs: - specifier: ~10.1.314 - version: 10.1.314 + specifier: ~10.2.69 + version: 10.2.69 cron-parser: specifier: ^4.8.1 version: 4.8.1 @@ -1162,7 +1162,7 @@ importers: devDependencies: '@cdktf/provider-aws': specifier: ^15.0.0 - version: 15.0.0(cdktf@0.17.0)(constructs@10.1.314) + version: 15.0.0(cdktf@0.17.0)(constructs@10.2.69) '@types/express': specifier: ^4.17.17 version: 4.17.17 @@ -1322,7 +1322,7 @@ importers: version: link:../../libs/wingsdk cdktf: specifier: ^0.17.0 - version: 0.17.0(constructs@10.2.51) + version: 0.17.0(constructs@10.2.69) execa: specifier: ^7.1.1 version: 7.1.1 @@ -5382,12 +5382,12 @@ packages: '@cdktf/node-pty-prebuilt-multiarch': 0.10.1-pre.10 '@sentry/node': 6.19.7 archiver: 5.3.1 - cdktf: 0.17.0(constructs@10.2.51) + cdktf: 0.17.0(constructs@10.2.69) chalk: 4.1.2 chokidar: 3.5.3 cli-spinners: 2.7.0 codemaker: 1.84.0 - constructs: 10.2.51 + constructs: 10.2.69 cross-fetch: 3.1.6 cross-spawn: 7.0.3 detect-port: 1.5.1 @@ -5438,9 +5438,9 @@ packages: dependencies: '@npmcli/ci-detect': 1.4.0 '@sentry/node': 6.19.7 - cdktf: 0.17.0(constructs@10.2.51) + cdktf: 0.17.0(constructs@10.2.69) codemaker: 1.84.0 - constructs: 10.2.51 + constructs: 10.2.69 cross-spawn: 7.0.3 follow-redirects: 1.15.2 fs-extra: 8.1.0 @@ -5489,27 +5489,27 @@ packages: prebuild-install: 7.1.1 dev: true - /@cdktf/provider-aws@15.0.0(cdktf@0.17.0)(constructs@10.1.314): + /@cdktf/provider-aws@15.0.0(cdktf@0.17.0)(constructs@10.2.51): resolution: {integrity: sha512-GeXpsU8+TsXhFFowjos+7bYv2CDAMHjOlKxXTx6aaqEO7BTlyqXBM/Qetw6y/6MxwIcyEf5siduBeT6T3lg3Dg==} engines: {node: '>= 16.14.0'} peerDependencies: cdktf: ^0.17.0 constructs: ^10.0.0 dependencies: - cdktf: 0.17.0(constructs@10.1.314) - constructs: 10.1.314 - dev: true + cdktf: 0.17.0(constructs@10.2.51) + constructs: 10.2.51 + dev: false - /@cdktf/provider-aws@15.0.0(cdktf@0.17.0)(constructs@10.2.51): + /@cdktf/provider-aws@15.0.0(cdktf@0.17.0)(constructs@10.2.69): resolution: {integrity: sha512-GeXpsU8+TsXhFFowjos+7bYv2CDAMHjOlKxXTx6aaqEO7BTlyqXBM/Qetw6y/6MxwIcyEf5siduBeT6T3lg3Dg==} engines: {node: '>= 16.14.0'} peerDependencies: cdktf: ^0.17.0 constructs: ^10.0.0 dependencies: - cdktf: 0.17.0(constructs@10.2.51) - constructs: 10.2.51 - dev: false + cdktf: 0.17.0(constructs@10.2.69) + constructs: 10.2.69 + dev: true /@cdktf/provider-generator@0.17.0: resolution: {integrity: sha512-/Ei9uVuLT6xjJIn6hvGepmS7tOjOAYsUplpc3J2jS1US85aO7oMASgjjgISvDC7saddLqhYCfysSWrYU5zUp0g==} @@ -10392,7 +10392,7 @@ packages: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} - /aws-cdk-lib@2.64.0(constructs@10.1.314): + /aws-cdk-lib@2.64.0(constructs@10.2.51): resolution: {integrity: sha512-IrgL7thb6TeOyHgyR/qKWTdA9FBb9lv7Z9QPDzCNJlkKI+0ANjYHy3RYV8Gd+1+kc6l8DG9Z1elij40YCr/Ptg==} engines: {node: '>= 14.15.0'} peerDependencies: @@ -10403,7 +10403,7 @@ packages: '@aws-cdk/asset-node-proxy-agent-v5': 2.0.165 '@balena/dockerignore': 1.0.2 case: 1.6.3 - constructs: 10.1.314 + constructs: 10.2.51 fs-extra: 9.1.0 ignore: 5.2.4 jsonschema: 1.4.1 @@ -10423,7 +10423,7 @@ packages: - semver - yaml - /aws-cdk-lib@2.64.0(constructs@10.2.51): + /aws-cdk-lib@2.64.0(constructs@10.2.69): resolution: {integrity: sha512-IrgL7thb6TeOyHgyR/qKWTdA9FBb9lv7Z9QPDzCNJlkKI+0ANjYHy3RYV8Gd+1+kc6l8DG9Z1elij40YCr/Ptg==} engines: {node: '>= 14.15.0'} peerDependencies: @@ -10434,7 +10434,7 @@ packages: '@aws-cdk/asset-node-proxy-agent-v5': 2.0.165 '@balena/dockerignore': 1.0.2 case: 1.6.3 - constructs: 10.2.51 + constructs: 10.2.69 fs-extra: 9.1.0 ignore: 5.2.4 jsonschema: 1.4.1 @@ -11093,9 +11093,9 @@ packages: '@cdktf/hcl2json': 0.17.0 '@inquirer/prompts': 2.2.0 '@sentry/node': 6.19.7 - cdktf: 0.17.0(constructs@10.2.51) + cdktf: 0.17.0(constructs@10.2.69) codemaker: 1.84.0 - constructs: 10.2.51 + constructs: 10.2.69 cross-spawn: 7.0.3 https-proxy-agent: 5.0.1 ink-select-input: 4.2.2(ink@3.2.0)(react@17.0.2) @@ -11122,27 +11122,28 @@ packages: - utf-8-validate dev: true - /cdktf@0.17.0(constructs@10.1.314): + /cdktf@0.17.0(constructs@10.2.51): resolution: {integrity: sha512-4R57uBLBqeb8NgfKZdn/az8UE3yXxGHyzH6Xjsz1Oo9kNvSkPibX7YqNLUpuCgdYNVgU2fdaNoHj9h4LXc6iCw==} peerDependencies: constructs: ^10.0.25 dependencies: archiver: 5.3.1 - constructs: 10.1.314 + constructs: 10.2.51 json-stable-stringify: 1.0.2 semver: 7.5.3 + dev: false bundledDependencies: - archiver - json-stable-stringify - semver - /cdktf@0.17.0(constructs@10.2.51): + /cdktf@0.17.0(constructs@10.2.69): resolution: {integrity: sha512-4R57uBLBqeb8NgfKZdn/az8UE3yXxGHyzH6Xjsz1Oo9kNvSkPibX7YqNLUpuCgdYNVgU2fdaNoHj9h4LXc6iCw==} peerDependencies: constructs: ^10.0.25 dependencies: archiver: 5.3.1 - constructs: 10.2.51 + constructs: 10.2.69 json-stable-stringify: 1.0.2 semver: 7.5.3 bundledDependencies: @@ -11649,14 +11650,14 @@ packages: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} dev: true - /constructs@10.1.314: - resolution: {integrity: sha512-wqQn0tuwYmj7tl/nSfnlw/1uaBcFDhjSe6UMVvxwGwXyAg/ZUqpiWFbrojxPqDOAQPCNEj8LjL7IH1SPioa6kg==} - engines: {node: '>= 14.17.0'} - /constructs@10.2.51: resolution: {integrity: sha512-vB96JQJzno7k0e+dX7Y9UmV4NDxqdr+2qnD5izDi552u7uFSpRF88GAEJjtv2eAWHG4WCDNu9+lV59Z3fYHlRQ==} engines: {node: '>= 16.14.0'} + /constructs@10.2.69: + resolution: {integrity: sha512-0AiM/uQe5Uk6JVe/62oolmSN2MjbFQkOlYrM3fFGZLKuT+g7xlAI10EebFhyCcZwI2JAcWuWCmmCAyCothxjuw==} + engines: {node: '>= 16.14.0'} + /constructs@3.3.69: resolution: {integrity: sha512-mfU72Bb1N57UVwdxDzdhSFAt6DIFnPHSkeAMtTlCUpBYOfSPS3iK6Kh06RvpESM4x9m1x0PZP7k00ZjaAkjSyg==} engines: {node: '>= 10.17.0'} @@ -12473,7 +12474,7 @@ packages: dependencies: semver: 7.5.3 shelljs: 0.8.5 - typescript: 5.3.0-dev.20230823 + typescript: 5.3.0-dev.20230824 dev: true /dset@3.1.2: @@ -21392,8 +21393,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - /typescript@5.3.0-dev.20230823: - resolution: {integrity: sha512-IEFfTl67UgTTJzf+Ma4+0txDKzxzxtjNjyFjTm7c+yP5sff+atKe44mAjhCxX8wGjwRrFuhAUeHz1udmzBZ4ow==} + /typescript@5.3.0-dev.20230824: + resolution: {integrity: sha512-iiUWxGibzrRHEBLDJfVymsvpPKflf3cMrw0oQTMQoguFS2ikNlVlfQWAsYeHqGpRQc77nSQkzsE9rAHNHqvIjw==} engines: {node: '>=14.17'} hasBin: true dev: true diff --git a/tools/hangar/__snapshots__/error.ts.snap b/tools/hangar/__snapshots__/error.ts.snap index 8cd04f5883d..82b26ebdc8e 100644 --- a/tools/hangar/__snapshots__/error.ts.snap +++ b/tools/hangar/__snapshots__/error.ts.snap @@ -119,7 +119,7 @@ exports[`struct_from_json_1.w 1`] = ` - instance.age is not of a type(s) number ../../../examples/tests/error/target/test/struct_from_json_1.wsim.[REDACTED].tmp/.wing/preflight.js:9 - const Person = require(\\"./Person.Struct.js\\")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const Person = require(\\"./Person.Struct.js\\")($stdlib.std.Struct); const j = ({\\"name\\": \\"cool\\",\\"age\\": \\"not a number\\"}); >> (Person.fromJson(j)); } @@ -138,7 +138,7 @@ exports[`struct_from_json_2.w 1`] = ` - instance requires property \\"advisor\\" ../../../examples/tests/error/target/test/struct_from_json_2.wsim.[REDACTED].tmp/.wing/preflight.js:11 - const Student = require(\\"./Student.Struct.js\\")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const Student = require(\\"./Student.Struct.js\\")($stdlib.std.Struct); const missingAdvisor = ({\\"name\\": \\"cool\\",\\"age\\": \\"not a number\\"}); >> (Student.fromJson(missingAdvisor)); } @@ -157,7 +157,7 @@ exports[`struct_from_json_3.w 1`] = ` - instance.advisors[1].id is not of a type(s) string ../../../examples/tests/error/target/test/struct_from_json_3.wsim.[REDACTED].tmp/.wing/preflight.js:11 - const Student = require(\\"./Student.Struct.js\\")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const Student = require(\\"./Student.Struct.js\\")($stdlib.std.Struct); const invalidAdvisorInArray = ({\\"name\\": \\"cool\\",\\"age\\": \\"not a number\\",\\"advisors\\": [({\\"id\\": \\"advisor1\\",\\"name\\": \\"Bob\\",\\"age\\": 34}), ({\\"id\\": 10,\\"name\\": \\"Jacob\\",\\"age\\": 45})]}); >> (Student.fromJson(invalidAdvisorInArray)); } @@ -175,7 +175,7 @@ exports[`struct_from_json_4.w 1`] = ` - instance.advisors contains duplicate item ../../../examples/tests/error/target/test/struct_from_json_4.wsim.[REDACTED].tmp/.wing/preflight.js:11 - const Student = require(\\"./Student.Struct.js\\")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const Student = require(\\"./Student.Struct.js\\")($stdlib.std.Struct); const invalidAdvisorInArray = ({\\"name\\": \\"cool\\",\\"age\\": 22,\\"advisors\\": [({\\"id\\": \\"advisor1\\",\\"name\\": \\"Bob\\",\\"age\\": 34}), ({\\"id\\": \\"advisor1\\",\\"name\\": \\"Bob\\",\\"age\\": 34})]}); >> (Student.fromJson(invalidAdvisorInArray)); } @@ -193,7 +193,7 @@ exports[`struct_from_json_5.w 1`] = ` - instance.names.c is not of a type(s) string ../../../examples/tests/error/target/test/struct_from_json_5.wsim.[REDACTED].tmp/.wing/preflight.js:9 - const Foo = require(\\"./Foo.Struct.js\\")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const Foo = require(\\"./Foo.Struct.js\\")($stdlib.std.Struct); const jFoo = ({\\"names\\": ({\\"a\\": \\"Amanda\\",\\"b\\": \\"Barry\\",\\"c\\": 10})}); >> (Foo.fromJson(jFoo)); } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md index 648a3df6744..0141a75bc7e 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md @@ -320,53 +320,57 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $cloud_HttpMethod: ${context._lift(cloud.HttpMethod)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $api_url: ${context._lift(api.url)}, $http_HttpMethod: ${context._lift(http.HttpMethod)}, $http_Util: ${context._lift(http.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md index fcebfadc52d..7a8fbf09690 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md @@ -324,27 +324,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $body: ${context._lift(body)}, $cloud_HttpMethod: ${context._lift(cloud.HttpMethod)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -356,29 +358,31 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $api_url: ${context._lift(api.url)}, $body: ${context._lift(body)}, $http_HttpMethod: ${context._lift(http.HttpMethod)}, $http_Util: ${context._lift(http.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md index 0e0ad80ccdb..b9362388a33 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md @@ -512,27 +512,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $cloud_HttpMethod: ${context._lift(cloud.HttpMethod)}, $path: ${context._lift(path)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -544,27 +546,29 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $cloud_HttpMethod: ${context._lift(cloud.HttpMethod)}, $path: ${context._lift(path)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -576,53 +580,57 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure4 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure4-1.js")({ $api_url: ${context._lift(api.url)}, $http_HttpMethod: ${context._lift(http.HttpMethod)}, $http_Util: ${context._lift(http.Util)}, $path: ${context._lift(path)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure4Client = ${$Closure4._toInflightType(this).text}; + const $Closure4Client = ${$Closure4._toInflightType(this)}; const client = new $Closure4Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md index 47146f31b37..169eb97bfd4 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md @@ -321,29 +321,31 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $_id: ${context._lift(_id)}, $body: ${context._lift(body)}, $cloud_HttpMethod: ${context._lift(cloud.HttpMethod)}, $std_Json: ${context._lift(std.Json)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -356,11 +358,10 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $_id: ${context._lift(_id)}, $api_url: ${context._lift(api.url)}, @@ -369,18 +370,21 @@ class $Root extends $stdlib.std.Resource { $http_Util: ${context._lift(http.Util)}, $std_Json: ${context._lift(std.Json)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md index 87a81be8597..9e381e5b6e8 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md @@ -320,28 +320,30 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $body: ${context._lift(body)}, $cloud_HttpMethod: ${context._lift(cloud.HttpMethod)}, $std_Json: ${context._lift(std.Json)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -353,11 +355,10 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $api_url: ${context._lift(api.url)}, $body: ${context._lift(body)}, @@ -365,18 +366,21 @@ class $Root extends $stdlib.std.Resource { $http_Util: ${context._lift(http.Util)}, $std_Json: ${context._lift(std.Json)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md index 66f674c076a..dc73d56b93f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md @@ -325,11 +325,10 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $_id: ${context._lift(_id)}, $body: ${context._lift(body)}, @@ -337,18 +336,21 @@ class $Root extends $stdlib.std.Resource { $std_Json: ${context._lift(std.Json)}, $user: ${context._lift(user)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -362,11 +364,10 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $_id: ${context._lift(_id)}, $api_url: ${context._lift(api.url)}, @@ -376,18 +377,21 @@ class $Root extends $stdlib.std.Resource { $std_Json: ${context._lift(std.Json)}, $user: ${context._lift(user)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_file.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_file.w_compile_tf-aws.md index 2f16fc07fe4..26ddd121794 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_file.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_file.w_compile_tf-aws.md @@ -205,26 +205,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_object.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_object.w_compile_tf-aws.md index 269de54e82b..72e0428646f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_object.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_object.w_compile_tf-aws.md @@ -205,28 +205,30 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, $jsonObj1: ${context._lift(jsonObj1)}, $std_Json: ${context._lift(std.Json)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/bucket_list.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/bucket_list.w_compile_tf-aws.md index 5e49c34347a..66e6d72607f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/bucket_list.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/bucket_list.w_compile_tf-aws.md @@ -208,26 +208,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md index 236b35d811f..4c377072322 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md @@ -209,26 +209,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md index 2e6d53938f9..758ab035a57 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md @@ -2,7 +2,7 @@ ## CheckHitCountOptions.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class CheckHitCountOptions { static jsonSchema() { return { @@ -29,7 +29,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./CheckHitCountOptions.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./CheckHitCountOptions.Struct.js")(${ context._lift(stdStruct) })`; } } return CheckHitCountOptions; @@ -1080,27 +1080,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $idsCounter: ${context._lift(idsCounter)}, $table: ${context._lift(table)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1113,27 +1115,29 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $Source: ${context._lift(Source)}, $logHistory: ${context._lift(logHistory)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1145,27 +1149,29 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $Source: ${context._lift(Source)}, $logHistory: ${context._lift(logHistory)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1177,27 +1183,29 @@ class $Root extends $stdlib.std.Resource { class $Closure4 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure4-1.js")({ $Source: ${context._lift(Source)}, $logHistory: ${context._lift(logHistory)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure4Client = ${$Closure4._toInflightType(this).text}; + const $Closure4Client = ${$Closure4._toInflightType(this)}; const client = new $Closure4Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1209,27 +1217,29 @@ class $Root extends $stdlib.std.Resource { class $Closure5 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure5-1.js")({ $Source: ${context._lift(Source)}, $logHistory: ${context._lift(logHistory)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure5Client = ${$Closure5._toInflightType(this).text}; + const $Closure5Client = ${$Closure5._toInflightType(this)}; const client = new $Closure5Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1241,52 +1251,56 @@ class $Root extends $stdlib.std.Resource { class $Closure6 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure6-1.js")({ $std_Duration: ${context._lift(std.Duration)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure6Client = ${$Closure6._toInflightType(this).text}; + const $Closure6Client = ${$Closure6._toInflightType(this)}; const client = new $Closure6Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure7 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure7-1.js")({ $table: ${context._lift(table)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure7Client = ${$Closure7._toInflightType(this).text}; + const $Closure7Client = ${$Closure7._toInflightType(this)}; const client = new $Closure7Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1298,11 +1312,10 @@ class $Root extends $stdlib.std.Resource { class $Closure8 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure8-1.js")({ $Source: ${context._lift(Source)}, $b: ${context._lift(b)}, @@ -1310,18 +1323,21 @@ class $Root extends $stdlib.std.Resource { $util_Util: ${context._lift(util.Util)}, $wait: ${context._lift(wait)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure8Client = ${$Closure8._toInflightType(this).text}; + const $Closure8Client = ${$Closure8._toInflightType(this)}; const client = new $Closure8Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1348,7 +1364,7 @@ class $Root extends $stdlib.std.Resource { (b.onCreate(new $Closure4(this,"$Closure4"))); (b.onEvent(new $Closure5(this,"$Closure5"))); const wait = new $Closure6(this,"$Closure6"); - const CheckHitCountOptions = require("./CheckHitCountOptions.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const CheckHitCountOptions = require("./CheckHitCountOptions.Struct.js")($stdlib.std.Struct); const checkHitCount = new $Closure7(this,"$Closure7"); this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"hitCount is incremented according to the bucket event",new $Closure8(this,"$Closure8"),{ timeout: (std.Duration.fromSeconds(480)) }); } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/exists.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/exists.w_compile_tf-aws.md index 8a2090feba6..740ff4fa9d5 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/exists.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/exists.w_compile_tf-aws.md @@ -187,26 +187,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md index 8d8631aeec7..de9a0cb42f9 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md @@ -255,29 +255,31 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $http_Util: ${context._lift(http.Util)}, $privateBucket: ${context._lift(privateBucket)}, $publicBucket: ${context._lift(publicBucket)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put.w_compile_tf-aws.md index 8a03aaf826c..0ae03909729 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put.w_compile_tf-aws.md @@ -193,26 +193,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md index 2a41cf985a9..04b78ad53aa 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md @@ -196,26 +196,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_delete.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_delete.w_compile_tf-aws.md index 8e783b501e3..22deae5bb51 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_delete.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_delete.w_compile_tf-aws.md @@ -191,26 +191,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get.w_compile_tf-aws.md index 679acc51cca..aca4daa7e9f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get.w_compile_tf-aws.md @@ -187,26 +187,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get_json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get_json.w_compile_tf-aws.md index d9acfc931e6..a5597769524 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get_json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get_json.w_compile_tf-aws.md @@ -191,27 +191,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, $std_Json: ${context._lift(std.Json)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/dec.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/dec.w_compile_tf-aws.md index 307ee6d0e1c..df2736e19fd 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/dec.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/dec.w_compile_tf-aws.md @@ -270,26 +270,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $counter: ${context._lift(counter)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -301,26 +303,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $counter: ${context._lift(counter)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/inc.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/inc.w_compile_tf-aws.md index afe517e4457..43cc979aa84 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/inc.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/inc.w_compile_tf-aws.md @@ -280,26 +280,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $counter: ${context._lift(counter)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -311,26 +313,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $counter: ${context._lift(counter)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/initial.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/initial.w_compile_tf-aws.md index 3112e4cd663..0cc14cfd77b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/initial.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/initial.w_compile_tf-aws.md @@ -376,26 +376,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $counterA: ${context._lift(counterA)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -407,26 +409,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $counterB: ${context._lift(counterB)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -438,26 +442,28 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $counterC: ${context._lift(counterC)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/peek.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/peek.w_compile_tf-aws.md index f80230778ef..d07ac1a5a1f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/peek.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/peek.w_compile_tf-aws.md @@ -264,26 +264,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $c: ${context._lift(c)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -295,26 +297,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $c: ${context._lift(c)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/set.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/set.w_compile_tf-aws.md index b5f7a0128fb..1ef2b566b14 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/set.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/set.w_compile_tf-aws.md @@ -274,26 +274,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $counter: ${context._lift(counter)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -305,26 +307,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $counter: ${context._lift(counter)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/invoke.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/invoke.w_compile_tf-aws.md index f90d748e4db..56a840e4262 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/invoke.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/invoke.w_compile_tf-aws.md @@ -243,51 +243,55 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $f: ${context._lift(f)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/logging.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/logging.w_compile_tf-aws.md index 4513301d7c7..dbd4ae18d99 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/logging.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/logging.w_compile_tf-aws.md @@ -342,73 +342,79 @@ class $Root extends $stdlib.std.Resource { class Util extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("logging", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Util-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const UtilClient = ${Util._toInflightType(this).text}; + const UtilClient = ${Util._toInflightType(this)}; const client = new UtilClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["logging", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $f1: ${context._lift(f1)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -420,27 +426,29 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $Util: ${context._lift(Util)}, $f2: ${context._lift(f2)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/memory_and_env.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/memory_and_env.w_compile_tf-aws.md index d4875c9e22c..e663edf81e7 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/memory_and_env.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/memory_and_env.w_compile_tf-aws.md @@ -381,26 +381,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $c: ${context._lift(c)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -412,27 +414,29 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $c: ${context._lift(c)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -444,28 +448,30 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $c: ${context._lift(c)}, $f1: ${context._lift(f1)}, $f2: ${context._lift(f2)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/abs.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/abs.w_compile_tf-aws.md index 17dfb1402df..c2be631cbcc 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/abs.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/abs.w_compile_tf-aws.md @@ -153,28 +153,30 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, $x: ${context._lift(x)}, $y: ${context._lift(y)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acos.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acos.w_compile_tf-aws.md index 7b9d2bd66c6..f3b3ce28e3f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acos.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acos.w_compile_tf-aws.md @@ -170,26 +170,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } try { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acot.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acot.w_compile_tf-aws.md index 8a3c16d71fd..81d6c512f91 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acot.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acot.w_compile_tf-aws.md @@ -156,26 +156,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: math.acot(0) == 1.5707963267948966")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((math.Util.acot(0)),1.5707963267948966)))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acsc.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acsc.w_compile_tf-aws.md index 7411b75860d..74d5ad969f7 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acsc.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acsc.w_compile_tf-aws.md @@ -163,26 +163,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } try { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/angular_conversion.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/angular_conversion.w_compile_tf-aws.md index 5bcf00adfdd..608005cc570 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/angular_conversion.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/angular_conversion.w_compile_tf-aws.md @@ -163,26 +163,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: math.degreesToRadians(360) == math.TAU")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((math.Util.degreesToRadians(360)),math.Util.TAU)))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asec.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asec.w_compile_tf-aws.md index a4cb61e748e..f4094a4ac22 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asec.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asec.w_compile_tf-aws.md @@ -164,26 +164,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } try { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asin.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asin.w_compile_tf-aws.md index 7af08fd52b1..83fd15a927b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asin.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asin.w_compile_tf-aws.md @@ -170,26 +170,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } try { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan.w_compile_tf-aws.md index 3c86fe46ccb..6ad55651a32 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan.w_compile_tf-aws.md @@ -155,26 +155,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: math.atan(-1) == -0.7853981633974483")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((math.Util.atan((-1))),(-0.7853981633974483))))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan2.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan2.w_compile_tf-aws.md index ae2d3f9f532..a47a72fda56 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan2.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan2.w_compile_tf-aws.md @@ -158,26 +158,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: math.atan2(90, 15) == 1.4056476493802699")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((math.Util.atan2(90,15)),1.4056476493802699)))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/combinations.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/combinations.w_compile_tf-aws.md index e7f7fbbd04b..03452d7b013 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/combinations.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/combinations.w_compile_tf-aws.md @@ -152,28 +152,30 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, $population: ${context._lift(population)}, $subset: ${context._lift(subset)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cos.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cos.w_compile_tf-aws.md index 8c405397384..7064c116c5a 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cos.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cos.w_compile_tf-aws.md @@ -157,26 +157,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: math.cos(-0) == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((math.Util.cos((-0))),1)))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cot.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cot.w_compile_tf-aws.md index 193533d6cd3..e7042c90a24 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cot.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cot.w_compile_tf-aws.md @@ -155,26 +155,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: math.cot(0) == math.INF")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((math.Util.cot(0)),math.Util.INF)))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/csc.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/csc.w_compile_tf-aws.md index ba3d4856df9..4cd60533a5f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/csc.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/csc.w_compile_tf-aws.md @@ -159,26 +159,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: math.csc(-0) == -math.INF")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((math.Util.csc((-0))),(-math.Util.INF))))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/euler.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/euler.w_compile_tf-aws.md index 2184e44becb..0a53dafda99 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/euler.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/euler.w_compile_tf-aws.md @@ -170,54 +170,58 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $compoundOneYear: ${context._lift(compoundOneYear)}, $interest: ${context._lift(interest)}, $math_Util: ${context._lift(math.Util)}, $value: ${context._lift(value)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/factorial.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/factorial.w_compile_tf-aws.md index cd49f22892f..ff0c5f2c6e6 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/factorial.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/factorial.w_compile_tf-aws.md @@ -157,26 +157,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: math.factorial(0) == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((math.Util.factorial(0)),1)))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/fibonacci.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/fibonacci.w_compile_tf-aws.md index c73c37ad315..061cc07b96f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/fibonacci.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/fibonacci.w_compile_tf-aws.md @@ -162,26 +162,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: math.fibonacci(0) == 0")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((math.Util.fibonacci(0)),0)))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/floor_ceil_round.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/floor_ceil_round.w_compile_tf-aws.md index e27155fc3f2..137b513f7aa 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/floor_ceil_round.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/floor_ceil_round.w_compile_tf-aws.md @@ -162,11 +162,10 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $__x_: ${context._lift((-x))}, $__y_: ${context._lift((-y))}, @@ -174,18 +173,21 @@ class $Root extends $stdlib.std.Resource { $x: ${context._lift(x)}, $y: ${context._lift(y)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/hypot.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/hypot.w_compile_tf-aws.md index fd27803ee3b..bcab598b7a6 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/hypot.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/hypot.w_compile_tf-aws.md @@ -155,26 +155,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: math.hypot([3, 4]) == 5")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((math.Util.hypot([3, 4])),5)))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/median_mode_mean.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/median_mode_mean.w_compile_tf-aws.md index 5a432bd9ecb..1cd4d700454 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/median_mode_mean.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/median_mode_mean.w_compile_tf-aws.md @@ -328,28 +328,30 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $even_arr: ${context._lift(even_arr)}, $math_Util: ${context._lift(math.Util)}, $odd_arr: ${context._lift(odd_arr)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -362,11 +364,10 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $_bimodal_at_0__: ${context._lift((bimodal.at(0)))}, $_bimodal_at_1__: ${context._lift((bimodal.at(1)))}, @@ -376,18 +377,21 @@ class $Root extends $stdlib.std.Resource { $math_Util: ${context._lift(math.Util)}, $modal_arr: ${context._lift(modal_arr)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -404,27 +408,29 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $math_Util: ${context._lift(math.Util)}, $mean_arr: ${context._lift(mean_arr)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/min_max.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/min_max.w_compile_tf-aws.md index eae05617f54..2984df6eaab 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/min_max.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/min_max.w_compile_tf-aws.md @@ -153,27 +153,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, $myArray: ${context._lift(myArray)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/pi.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/pi.w_compile_tf-aws.md index 5232301e165..3ec65b7dbcb 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/pi.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/pi.w_compile_tf-aws.md @@ -170,53 +170,57 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $circumference: ${context._lift(circumference)}, $math_Util: ${context._lift(math.Util)}, $r: ${context._lift(r)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/prime.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/prime.w_compile_tf-aws.md index d44a88ad3a4..a6d6691063b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/prime.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/prime.w_compile_tf-aws.md @@ -158,26 +158,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: math.isPrime(1) == false")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((math.Util.isPrime(1)),false)))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/random.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/random.w_compile_tf-aws.md index b149e5e482a..a56fbb9ae74 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/random.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/random.w_compile_tf-aws.md @@ -153,26 +153,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: math.random() >= 0")})(((math.Util.random()) >= 0))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sec.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sec.w_compile_tf-aws.md index 9a65edd7fc7..71adb03d9e1 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sec.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sec.w_compile_tf-aws.md @@ -157,26 +157,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: math.sec(-0) == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((math.Util.sec((-0))),1)))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sin.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sin.w_compile_tf-aws.md index 0eec4ebff71..e3875f94079 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sin.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sin.w_compile_tf-aws.md @@ -156,26 +156,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: math.sin(-0) == -0")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((math.Util.sin((-0))),(-0))))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sqrt.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sqrt.w_compile_tf-aws.md index 29698c197ad..f43a0bdb96e 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sqrt.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sqrt.w_compile_tf-aws.md @@ -164,26 +164,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } try { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tan.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tan.w_compile_tf-aws.md index 9c313e7c4ed..715d356c49e 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tan.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tan.w_compile_tf-aws.md @@ -155,26 +155,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: math.tan(-0) == -0")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((math.Util.tan((-0))),(-0))))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tau.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tau.w_compile_tf-aws.md index 8b308d516e0..9d51deab130 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tau.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tau.w_compile_tf-aws.md @@ -155,26 +155,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $math_Util: ${context._lift(math.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: math.TAU / 4 == math.PI / 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((math.Util.TAU / 4),(math.Util.PI / 2))))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/on_deploy/execute_after.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/on_deploy/execute_after.w_compile_tf-aws.md index 9fcb5cca3c2..0e92e500087 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/on_deploy/execute_after.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/on_deploy/execute_after.w_compile_tf-aws.md @@ -375,26 +375,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $counter: ${context._lift(counter)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -406,26 +408,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $counter: ${context._lift(counter)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -437,26 +441,28 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $counter: ${context._lift(counter)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/pop.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/pop.w_compile_tf-aws.md index bc920fe8eb6..72bd5001855 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/pop.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/pop.w_compile_tf-aws.md @@ -170,26 +170,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $q: ${context._lift(q)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/purge.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/purge.w_compile_tf-aws.md index 5d5edc87c1b..be5736b369b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/purge.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/purge.w_compile_tf-aws.md @@ -188,28 +188,30 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $q: ${context._lift(q)}, $std_Duration: ${context._lift(std.Duration)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/set_consumer.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/set_consumer.w_compile_tf-aws.md index d5d7914a541..e202b706d0d 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/set_consumer.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/set_consumer.w_compile_tf-aws.md @@ -310,26 +310,28 @@ class $Root extends $stdlib.std.Resource { class Predicate extends $stdlib.std.Resource { constructor(scope, id, c) { super(scope, id); - this._addInflightOps("test", "$inflight_init"); this.c = c; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Predicate-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const PredicateClient = ${Predicate._toInflightType(this).text}; + const PredicateClient = ${Predicate._toInflightType(this)}; const client = new PredicateClient({ $this_c: ${this._lift(this.c)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["test", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -344,26 +346,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $c: ${context._lift(c)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -375,29 +379,31 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $predicate: ${context._lift(predicate)}, $q: ${context._lift(q)}, $std_Duration: ${context._lift(std.Duration)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/schedule/on_tick.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/schedule/on_tick.w_compile_tf-aws.md index e3091d8097c..f71300abeab 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/schedule/on_tick.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/schedule/on_tick.w_compile_tf-aws.md @@ -437,26 +437,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $c1: ${context._lift(c1)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -468,26 +470,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $c2: ${context._lift(c2)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -499,29 +503,31 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $c1: ${context._lift(c1)}, $c2: ${context._lift(c2)}, $std_Duration: ${context._lift(std.Duration)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md index 3f340f55601..cfeb2f11073 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md @@ -1513,361 +1513,391 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure4 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure4-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure4Client = ${$Closure4._toInflightType(this).text}; + const $Closure4Client = ${$Closure4._toInflightType(this)}; const client = new $Closure4Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure5 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure5-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure5Client = ${$Closure5._toInflightType(this).text}; + const $Closure5Client = ${$Closure5._toInflightType(this)}; const client = new $Closure5Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure6 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure6-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure6Client = ${$Closure6._toInflightType(this).text}; + const $Closure6Client = ${$Closure6._toInflightType(this)}; const client = new $Closure6Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure7 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure7-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure7Client = ${$Closure7._toInflightType(this).text}; + const $Closure7Client = ${$Closure7._toInflightType(this)}; const client = new $Closure7Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure8 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure8-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure8Client = ${$Closure8._toInflightType(this).text}; + const $Closure8Client = ${$Closure8._toInflightType(this)}; const client = new $Closure8Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure9 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure9-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure9Client = ${$Closure9._toInflightType(this).text}; + const $Closure9Client = ${$Closure9._toInflightType(this)}; const client = new $Closure9Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure10 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure10-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure10Client = ${$Closure10._toInflightType(this).text}; + const $Closure10Client = ${$Closure10._toInflightType(this)}; const client = new $Closure10Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure11 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure11-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure11Client = ${$Closure11._toInflightType(this).text}; + const $Closure11Client = ${$Closure11._toInflightType(this)}; const client = new $Closure11Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure12 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure12-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure12Client = ${$Closure12._toInflightType(this).text}; + const $Closure12Client = ${$Closure12._toInflightType(this)}; const client = new $Closure12Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure13 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure13-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure13Client = ${$Closure13._toInflightType(this).text}; + const $Closure13Client = ${$Closure13._toInflightType(this)}; const client = new $Closure13Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure14 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure14-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure14Client = ${$Closure14._toInflightType(this).text}; + const $Closure14Client = ${$Closure14._toInflightType(this)}; const client = new $Closure14Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure15 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure15-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure15Client = ${$Closure15._toInflightType(this).text}; + const $Closure15Client = ${$Closure15._toInflightType(this)}; const client = new $Closure15Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const bucket = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"myBucket"); diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/bool.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/bool.w_compile_tf-aws.md index 0ce3fa9cb6e..523c0a8bb2f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/bool.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/bool.w_compile_tf-aws.md @@ -161,28 +161,30 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $PARSE_ERROR: ${context._lift(PARSE_ERROR)}, $std_Boolean: ${context._lift(std.Boolean)}, $std_Json: ${context._lift(std.Json)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/datetime.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/datetime.w_compile_tf-aws.md index b95e1297bef..1559c4a64b6 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/datetime.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/datetime.w_compile_tf-aws.md @@ -175,11 +175,10 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $_d4_toUtc____hours: ${context._lift((d4.toUtc()).hours)}, $d4_hours: ${context._lift(d4.hours)}, @@ -189,18 +188,21 @@ class $Root extends $stdlib.std.Resource { $std_Duration: ${context._lift(std.Duration)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/duration.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/duration.w_compile_tf-aws.md index fb04efc078e..8be7f4eb9c6 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/duration.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/duration.w_compile_tf-aws.md @@ -170,26 +170,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $std_Duration: ${context._lift(std.Duration)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: 12ms.seconds == 12 / 1000")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((std.Duration.fromSeconds(0.012)).seconds,(12 / 1000))))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md index 131134f416c..8148cf0ba1a 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md @@ -331,74 +331,80 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $std_Json: ${context._lift(std.Json)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const a = ({"a": 1}); diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/number.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/number.w_compile_tf-aws.md index 134187ed269..1af274d6a3c 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/number.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/number.w_compile_tf-aws.md @@ -235,51 +235,55 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $std_Number: ${context._lift(std.Number)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $std_Number: ${context._lift(std.Number)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {((cond) => {if (!cond) throw new Error("assertion failed: num.fromJson(Json 12) == 12")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((args) => { if (typeof args !== "number") {throw new Error("unable to parse " + typeof args + " " + args + " as a number")}; return JSON.parse(JSON.stringify(args)) })(12),12)))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/string.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/string.w_compile_tf-aws.md index 923be9a41ee..9da0ebf091e 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/string.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/string.w_compile_tf-aws.md @@ -1293,27 +1293,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $PARSE_ERROR: ${context._lift(PARSE_ERROR)}, $std_String: ${context._lift(std.String)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1325,50 +1327,54 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $INDEX_OUT_OF_BOUNDS_ERROR: ${context._lift(INDEX_OUT_OF_BOUNDS_ERROR)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1380,265 +1386,287 @@ class $Root extends $stdlib.std.Resource { class $Closure4 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure4-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure4Client = ${$Closure4._toInflightType(this).text}; + const $Closure4Client = ${$Closure4._toInflightType(this)}; const client = new $Closure4Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure5 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure5-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure5Client = ${$Closure5._toInflightType(this).text}; + const $Closure5Client = ${$Closure5._toInflightType(this)}; const client = new $Closure5Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure6 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure6-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure6Client = ${$Closure6._toInflightType(this).text}; + const $Closure6Client = ${$Closure6._toInflightType(this)}; const client = new $Closure6Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure7 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure7-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure7Client = ${$Closure7._toInflightType(this).text}; + const $Closure7Client = ${$Closure7._toInflightType(this)}; const client = new $Closure7Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure8 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure8-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure8Client = ${$Closure8._toInflightType(this).text}; + const $Closure8Client = ${$Closure8._toInflightType(this)}; const client = new $Closure8Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure9 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure9-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure9Client = ${$Closure9._toInflightType(this).text}; + const $Closure9Client = ${$Closure9._toInflightType(this)}; const client = new $Closure9Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure10 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure10-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure10Client = ${$Closure10._toInflightType(this).text}; + const $Closure10Client = ${$Closure10._toInflightType(this)}; const client = new $Closure10Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure11 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure11-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure11Client = ${$Closure11._toInflightType(this).text}; + const $Closure11Client = ${$Closure11._toInflightType(this)}; const client = new $Closure11Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure12 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure12-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure12Client = ${$Closure12._toInflightType(this).text}; + const $Closure12Client = ${$Closure12._toInflightType(this)}; const client = new $Closure12Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure13 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure13-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure13Client = ${$Closure13._toInflightType(this).text}; + const $Closure13Client = ${$Closure13._toInflightType(this)}; const client = new $Closure13Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure14 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure14-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure14Client = ${$Closure14._toInflightType(this).text}; + const $Closure14Client = ${$Closure14._toInflightType(this)}; const client = new $Closure14Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const assertThrows = ((expected, block) => { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md index 00feae12e17..c86032de1df 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md @@ -204,11 +204,10 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $_marioInfo___gender__: ${context._lift((marioInfo)["gender"])}, $_marioInfo___role__: ${context._lift((marioInfo)["role"])}, @@ -216,18 +215,21 @@ class $Root extends $stdlib.std.Resource { $_peachInfo___role__: ${context._lift((peachInfo)["role"])}, $table: ${context._lift(table)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md index 2917f9774ae..78c9801f50b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md @@ -186,27 +186,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $std_String: ${context._lift(std.String)}, $table: ${context._lift(table)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/topic/on_message.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/topic/on_message.w_compile_tf-aws.md index 30bee44cb90..f010d9a7374 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/topic/on_message.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/topic/on_message.w_compile_tf-aws.md @@ -433,26 +433,28 @@ class $Root extends $stdlib.std.Resource { class Predicate extends $stdlib.std.Resource { constructor(scope, id, c) { super(scope, id); - this._addInflightOps("test", "$inflight_init"); this.c = c; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Predicate-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const PredicateClient = ${Predicate._toInflightType(this).text}; + const PredicateClient = ${Predicate._toInflightType(this)}; const client = new PredicateClient({ $this_c: ${this._lift(this.c)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["test", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -467,26 +469,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $c: ${context._lift(c)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -498,26 +502,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $c: ${context._lift(c)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -529,29 +535,31 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $predicate: ${context._lift(predicate)}, $std_Duration: ${context._lift(std.Duration)}, $t: ${context._lift(t)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/base64.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/base64.w_compile_tf-aws.md index 7fe1a3a3038..464eceb9573 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/base64.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/base64.w_compile_tf-aws.md @@ -160,26 +160,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const string = "https://www.winglang.io/docs"; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/env.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/env.w_compile_tf-aws.md index e993670b792..469d2e656bb 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/env.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/env.w_compile_tf-aws.md @@ -154,28 +154,30 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $NIL: ${context._lift(NIL)}, $RANDOM: ${context._lift(RANDOM)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/nanoid.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/nanoid.w_compile_tf-aws.md index e8e49c34db5..5b44c717714 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/nanoid.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/nanoid.w_compile_tf-aws.md @@ -165,26 +165,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const standard_id = (util.Util.nanoid()); diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sha256.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sha256.w_compile_tf-aws.md index 160147a584a..90063c8776b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sha256.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sha256.w_compile_tf-aws.md @@ -153,26 +153,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const data = (util.Util.sha256("winglang")); diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sleep.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sleep.w_compile_tf-aws.md index 9c5c91ebf69..7eadd45a6b2 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sleep.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sleep.w_compile_tf-aws.md @@ -171,51 +171,55 @@ class $Root extends $stdlib.std.Resource { class JSHelper extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("getTime", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.JSHelper-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const JSHelperClient = ${JSHelper._toInflightType(this).text}; + const JSHelperClient = ${JSHelper._toInflightType(this)}; const client = new JSHelperClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["getTime", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $JSHelper: ${context._lift(JSHelper)}, $oneHundredMiliseconds: ${context._lift(oneHundredMiliseconds)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/uuidv4.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/uuidv4.w_compile_tf-aws.md index 3c81343cb6f..3e34fd9cecd 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/uuidv4.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/uuidv4.w_compile_tf-aws.md @@ -180,76 +180,82 @@ class $Root extends $stdlib.std.Resource { class JSHelper extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static validateUUIDv4(uuidv4) { return (require("/uuidv4-helper.js")["validateUUIDv4"])(uuidv4) } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.JSHelper-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const JSHelperClient = ${JSHelper._toInflightType(this).text}; + const JSHelperClient = ${JSHelper._toInflightType(this)}; const client = new JSHelperClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class JSHelperInflight extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("validateUUIDv4", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.JSHelperInflight-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const JSHelperInflightClient = ${JSHelperInflight._toInflightType(this).text}; + const JSHelperInflightClient = ${JSHelperInflight._toInflightType(this)}; const client = new JSHelperInflightClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["validateUUIDv4", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $JSHelperInflight: ${context._lift(JSHelperInflight)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md index c2c61fe8b72..5cc0a971eca 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md @@ -578,50 +578,54 @@ class $Root extends $stdlib.std.Resource { class JSHelper extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("getTime", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.JSHelper-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const JSHelperClient = ${JSHelper._toInflightType(this).text}; + const JSHelperClient = ${JSHelper._toInflightType(this)}; const client = new JSHelperClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["getTime", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $JSHelper: ${context._lift(JSHelper)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -633,28 +637,30 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $JSHelper: ${context._lift(JSHelper)}, $oneSecond: ${context._lift(oneSecond)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -667,29 +673,31 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $JSHelper: ${context._lift(JSHelper)}, $invokeCounter: ${context._lift(invokeCounter)}, $oneSecond: ${context._lift(oneSecond)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -703,11 +711,10 @@ class $Root extends $stdlib.std.Resource { class $Closure4 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure4-1.js")({ $JSHelper: ${context._lift(JSHelper)}, $fiveSeconds: ${context._lift(fiveSeconds)}, @@ -715,18 +722,21 @@ class $Root extends $stdlib.std.Resource { $oneSecond: ${context._lift(oneSecond)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure4Client = ${$Closure4._toInflightType(this).text}; + const $Closure4Client = ${$Closure4._toInflightType(this)}; const client = new $Closure4Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -741,27 +751,29 @@ class $Root extends $stdlib.std.Resource { class $Closure5 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure5-1.js")({ $invokeCounter: ${context._lift(invokeCounter)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure5Client = ${$Closure5._toInflightType(this).text}; + const $Closure5Client = ${$Closure5._toInflightType(this)}; const client = new $Closure5Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/two_websites.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/two_websites.w_compile_tf-aws.md index 121db52a195..f5e645d79e2 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/two_websites.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/two_websites.w_compile_tf-aws.md @@ -522,28 +522,30 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $http_Util: ${context._lift(http.Util)}, $w1_url: ${context._lift(w1.url)}, $w2_url: ${context._lift(w2.url)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/website.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/website.w_compile_tf-aws.md index 1bf8a79bc28..2d2ebf62201 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/website.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/website.w_compile_tf-aws.md @@ -373,37 +373,38 @@ class $Root extends $stdlib.std.Resource { class Util extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static readFile(path) { return (require("/fs.js")["readFile"])(path) } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Util-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const UtilClient = ${Util._toInflightType(this).text}; + const UtilClient = ${Util._toInflightType(this)}; const client = new UtilClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $config: ${context._lift(config)}, $http_Util: ${context._lift(http.Util)}, @@ -412,18 +413,21 @@ class $Root extends $stdlib.std.Resource { $std_Json: ${context._lift(std.Json)}, $w_url: ${context._lift(w.url)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md index a0513ee7043..b660526126b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md @@ -477,27 +477,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $counter: ${context._lift(counter)}, $std_Json: ${context._lift(std.Json)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -509,26 +511,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $api_url: ${context._lift(api.url)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -540,32 +544,33 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.api = this.node.root.newAbstract("@winglang/sdk.cloud.Api",this,"cloud.Api"); const __parent_this_3 = this; class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $__parent_this_3_api_url: ${context._lift(__parent_this_3.api.url)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -577,21 +582,24 @@ class $Root extends $stdlib.std.Resource { (this.api.get("/endpoint1",new $Closure3(this,"$Closure3"))); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } const api = this.node.root.newAbstract("@winglang/sdk.cloud.Api",this,"cloud.Api"); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md index b7d7577b30d..3a10cf262e5 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md @@ -310,53 +310,57 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $std_Json: ${context._lift(std.Json)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $api_url: ${context._lift(api.url)}, $http_Util: ${context._lift(http.Util)}, $std_Json: ${context._lift(std.Json)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md index 8855f56e344..38039f28de4 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md @@ -273,25 +273,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const api = this.node.root.newAbstract("@winglang/sdk.cloud.Api",this,"cloud.Api"); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/assert.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/assert.w_compile_tf-aws.md index a412abedb07..4bec860c0a9 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/assert.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/assert.w_compile_tf-aws.md @@ -165,27 +165,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $s1: ${context._lift(s1)}, $s2: ${context._lift(s2)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/asynchronous_model_implicit_await_in_functions.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/asynchronous_model_implicit_await_in_functions.w_compile_tf-aws.md index 27e6c9daaee..3be20c5178e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/asynchronous_model_implicit_await_in_functions.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/asynchronous_model_implicit_await_in_functions.w_compile_tf-aws.md @@ -248,50 +248,54 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $strToStr: ${context._lift(strToStr)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/baz.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/baz.w_compile_tf-aws.md index 01994e355c4..d60fff4ee13 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/baz.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/baz.w_compile_tf-aws.md @@ -56,27 +56,29 @@ class $Root extends $stdlib.std.Resource { class Baz extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static baz() { return "baz"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Baz-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BazClient = ${Baz._toInflightType(this).text}; + const BazClient = ${Baz._toInflightType(this)}; const client = new BazClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_awscdk.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_awscdk.w_compile_tf-aws.md index 371270a6064..9e5a27d50d6 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_awscdk.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_awscdk.w_compile_tf-aws.md @@ -57,25 +57,27 @@ class $Root extends $stdlib.std.Resource { class CdkDockerImageFunction extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.function = this.node.root.new("aws-cdk-lib.aws_lambda.DockerImageFunction",awscdk.aws_lambda.DockerImageFunction,this,"DockerImageFunction",({"code": (awscdk.aws_lambda.DockerImageCode.fromImageAsset("./test.ts"))})); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.CdkDockerImageFunction-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const CdkDockerImageFunctionClient = ${CdkDockerImageFunction._toInflightType(this).text}; + const CdkDockerImageFunctionClient = ${CdkDockerImageFunction._toInflightType(this)}; const client = new CdkDockerImageFunctionClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } this.node.root.new("aws-cdk-lib.App",awscdk.App,); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_cdktf.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_cdktf.w_compile_tf-aws.md index 5cfffd12d0c..e9e392f221b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_cdktf.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_cdktf.w_compile_tf-aws.md @@ -75,25 +75,27 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.node.root.new("cdktf.S3Backend",cdktf.S3Backend,this,({"bucket": "foo","key": "bar"})); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } this.node.root.new("@cdktf/provider-aws.s3Bucket.S3Bucket",aws.s3Bucket.S3Bucket,this,"Bucket",{ bucketPrefix: "hello", versioning: ({"enabled": true,"mfaDelete": true}) }); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii.w_compile_tf-aws.md index 9faad110f04..d5806b2e55e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii.w_compile_tf-aws.md @@ -153,26 +153,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $greeting: ${context._lift(greeting)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii_path.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii_path.w_compile_tf-aws.md index 2b1264c53ea..b61519b50ee 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii_path.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii_path.w_compile_tf-aws.md @@ -153,26 +153,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $greeting: ${context._lift(greeting)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md index 8d26bdf7eba..1fcfed6dc7c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md @@ -2,7 +2,7 @@ ## Point.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Point { static jsonSchema() { return { @@ -24,7 +24,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Point.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Point.Struct.js")(${ context._lift(stdStruct) })`; } } return Point; @@ -389,26 +389,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-3.js")({ $store: ${context._lift(store)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -420,50 +422,54 @@ class $Root extends $stdlib.std.Resource { class Triangle extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } area() { return 1; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Triangle-3.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const TriangleClient = ${Triangle._toInflightType(this).text}; + const TriangleClient = ${Triangle._toInflightType(this)}; const client = new TriangleClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Util extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Util-3.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const UtilClient = ${Util._toInflightType(this).text}; + const UtilClient = ${Util._toInflightType(this)}; const client = new UtilClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } const store = new file1.Store(this,"file1.Store"); @@ -490,55 +496,58 @@ module.exports = function({ $stdlib }) { class Util extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Util-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const UtilClient = ${Util._toInflightType(this).text}; + const UtilClient = ${Util._toInflightType(this)}; const client = new UtilClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Store extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("store", "$inflight_init"); this.b = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); const __parent_this_1 = this; class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $__parent_this_1_b: ${context._lift(__parent_this_1.b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -550,22 +559,25 @@ module.exports = function({ $stdlib }) { const prefill = this.node.root.newAbstract("@winglang/sdk.cloud.OnDeploy",this,"cloud.OnDeploy",new $Closure1(this,"$Closure1")); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Store-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const StoreClient = ${Store._toInflightType(this).text}; + const StoreClient = ${Store._toInflightType(this)}; const client = new StoreClient({ $this_b: ${this._lift(this.b)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["store", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -585,7 +597,7 @@ module.exports = function({ $stdlib }) { return tmp; })({}) ; - const Point = require("./Point.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const Point = require("./Point.Struct.js")($stdlib.std.Struct); return { Util, Store, Color, Point }; }; @@ -599,24 +611,26 @@ module.exports = function({ $stdlib }) { class Q extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Q-2.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const QClient = ${Q._toInflightType(this).text}; + const QClient = ${Q._toInflightType(this)}; const client = new QClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } return { Q }; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_local_normalization.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_local_normalization.w_compile_tf-aws.md index 6e11dbe49a0..340260912e9 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_local_normalization.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_local_normalization.w_compile_tf-aws.md @@ -75,27 +75,29 @@ module.exports = function({ $stdlib }) { class Bar extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static bar() { return "bar"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Bar-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BarClient = ${Bar._toInflightType(this).text}; + const BarClient = ${Bar._toInflightType(this)}; const client = new BarClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } return { Bar }; @@ -110,27 +112,29 @@ module.exports = function({ $stdlib }) { class Baz extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static baz() { return "baz"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Baz-2.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BazClient = ${Baz._toInflightType(this).text}; + const BazClient = ${Baz._toInflightType(this)}; const client = new BazClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } return { Baz }; @@ -147,7 +151,6 @@ module.exports = function({ $stdlib }) { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static foo() { return "foo"; @@ -159,21 +162,24 @@ module.exports = function({ $stdlib }) { return (baz.Baz.baz()); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-3.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } return { Foo }; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bucket_events.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bucket_events.w_compile_tf-aws.md index 957fb434c8f..cc59d3ac501 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bucket_events.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bucket_events.w_compile_tf-aws.md @@ -1303,98 +1303,106 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure4 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure4-1.js")({ $other: ${context._lift(other)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure4Client = ${$Closure4._toInflightType(this).text}; + const $Closure4Client = ${$Closure4._toInflightType(this)}; const client = new $Closure4Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1406,50 +1414,54 @@ class $Root extends $stdlib.std.Resource { class $Closure5 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure5-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure5Client = ${$Closure5._toInflightType(this).text}; + const $Closure5Client = ${$Closure5._toInflightType(this)}; const client = new $Closure5Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure6 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure6-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure6Client = ${$Closure6._toInflightType(this).text}; + const $Closure6Client = ${$Closure6._toInflightType(this)}; const client = new $Closure6Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bucket_keys.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bucket_keys.w_compile_tf-aws.md index 9d20e9cd302..c7292f05634 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bucket_keys.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bucket_keys.w_compile_tf-aws.md @@ -191,26 +191,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md index bb7f7bb0b27..280715395c3 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md @@ -198,74 +198,80 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "bar", "callThis", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foo", "bar", "callThis", "$inflight_init"]; } } class Bar extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("bar", "callThis", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Bar-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BarClient = ${Bar._toInflightType(this).text}; + const BarClient = ${Bar._toInflightType(this)}; const client = new BarClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["bar", "callThis", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $Bar: ${context._lift(Bar)}, $Foo: ${context._lift(Foo)}, $foo: ${context._lift(foo)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md index db83a781d64..6730f9d9e0d 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md @@ -210,51 +210,55 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("makeFn", "callFn", "callFn2", "$inflight_init", "inflight2"); const __parent_this_1 = this; class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.inflight1 = new $Closure1(this,"$Closure1"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ $this_inflight1: ${this._lift(this.inflight1)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["inflight2", "makeFn", "callFn", "callFn2", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -278,26 +282,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $foo: ${context._lift(foo)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md index d3aa54ceca4..5498e62ae92 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md @@ -160,11 +160,10 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $Object_keys_myMap__length: ${context._lift(Object.keys(myMap).length)}, $__bang__in___arrOfMap_at_0____: ${context._lift(("bang" in ((arrOfMap.at(0)))))}, @@ -176,18 +175,21 @@ class $Root extends $stdlib.std.Resource { $arr_length: ${context._lift(arr.length)}, $mySet_size: ${context._lift(mySet.size)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_in_binary.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_in_binary.w_compile_tf-aws.md index 59afbe6b1e8..2148200f97b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_in_binary.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_in_binary.w_compile_tf-aws.md @@ -183,27 +183,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, $x: ${context._lift(x)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md index 24e5c1e0136..be6bad42217 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md @@ -172,29 +172,31 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $Object_keys_m__length: ${context._lift(Object.keys(m).length)}, $aCloned_length: ${context._lift(aCloned.length)}, $a_length: ${context._lift(a.length)}, $s_size: ${context._lift(s.size)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -209,26 +211,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $handler: ${context._lift(handler)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_primitives.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_primitives.w_compile_tf-aws.md index 11e021eed80..10b4fa5abaf 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_primitives.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_primitives.w_compile_tf-aws.md @@ -166,11 +166,10 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $myBool: ${context._lift(myBool)}, $myDur_hours: ${context._lift(myDur.hours)}, @@ -180,18 +179,21 @@ class $Root extends $stdlib.std.Resource { $mySecondBool: ${context._lift(mySecondBool)}, $myStr: ${context._lift(myStr)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_reassigable_class_field.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_reassigable_class_field.w_compile_tf-aws.md index 3f39d9a4f39..d939fcbb293 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_reassigable_class_field.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_reassigable_class_field.w_compile_tf-aws.md @@ -270,31 +270,32 @@ class $Root extends $stdlib.std.Resource { class KeyValueStore extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("get", "set", "$inflight_init"); this.bucket = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); const __parent_this_1 = this; class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.onUpdateCallback = new $Closure1(this,"$Closure1"); @@ -303,15 +304,15 @@ class $Root extends $stdlib.std.Resource { this.onUpdateCallback = fn; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.KeyValueStore-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const KeyValueStoreClient = ${KeyValueStore._toInflightType(this).text}; + const KeyValueStoreClient = ${KeyValueStore._toInflightType(this)}; const client = new KeyValueStoreClient({ $this_bucket: ${this._lift(this.bucket)}, $this_onUpdateCallback: ${this._lift(this.onUpdateCallback)}, @@ -319,7 +320,10 @@ class $Root extends $stdlib.std.Resource { if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["get", "set", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -339,26 +343,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $counter: ${context._lift(counter)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -370,28 +376,30 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $counter: ${context._lift(counter)}, $kv: ${context._lift(kv)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_reassignable.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_reassignable.w_compile_tf-aws.md index 754f5b2d1f3..661c17d7b59 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_reassignable.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_reassignable.w_compile_tf-aws.md @@ -170,26 +170,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $x: ${context._lift(x)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -201,26 +203,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $handler: ${context._lift(handler)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_and_data.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_and_data.w_compile_tf-aws.md index e327bf84892..3f6164976d5 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_and_data.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_and_data.w_compile_tf-aws.md @@ -196,28 +196,30 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $data_size: ${context._lift(data.size)}, $queue: ${context._lift(queue)}, $res: ${context._lift(res)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_with_no_inflight.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_with_no_inflight.w_compile_tf-aws.md index 4287aee2820..9e68d82aeae 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_with_no_inflight.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_with_no_inflight.w_compile_tf-aws.md @@ -191,27 +191,29 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("incCounter", "bar", "$inflight_init"); this.field = "hey"; this.counter = this.node.root.newAbstract("@winglang/sdk.cloud.Counter",this,"cloud.Counter"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ $this_counter: ${this._lift(this.counter)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["incCounter", "bar", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -226,27 +228,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $a: ${context._lift(a)}, $a_field: ${context._lift(a.field)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md index 34389110a89..a4f0e75048e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md @@ -350,20 +350,19 @@ class $Root extends $stdlib.std.Resource { class MyResource extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("isValidUrl", "foo", "$inflight_init"); this.api = this.node.root.newAbstract("@winglang/sdk.cloud.Api",this,"cloud.Api"); this.url = this.api.url; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyResource-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyResourceClient = ${MyResource._toInflightType(this).text}; + const MyResourceClient = ${MyResource._toInflightType(this)}; const client = new MyResourceClient({ $this_api_url: ${this._lift(this.api.url)}, $this_url: ${this._lift(this.url)}, @@ -371,7 +370,10 @@ class $Root extends $stdlib.std.Resource { if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["isValidUrl", "foo", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -388,26 +390,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $r: ${context._lift(r)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -419,28 +423,30 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $MyResource: ${context._lift(MyResource)}, $api_url: ${context._lift(api.url)}, $url: ${context._lift(url)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md index 6b5a737f8bb..f47a83d9902 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md @@ -594,28 +594,30 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $bucket1: ${context._lift(bucket1)}, $bucket2: ${context._lift(bucket2)}, $bucket3: ${context._lift(bucket3)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -629,26 +631,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $headers: ${context._lift(headers)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/class.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/class.w_compile_tf-aws.md index 69c5d9da1ee..d5dfaa86102 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/class.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/class.w_compile_tf-aws.md @@ -619,149 +619,161 @@ class $Root extends $stdlib.std.Resource { class C1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.C1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const C1Client = ${C1._toInflightType(this).text}; + const C1Client = ${C1._toInflightType(this)}; const client = new C1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class C2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.x = 1; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.C2-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const C2Client = ${C2._toInflightType(this).text}; + const C2Client = ${C2._toInflightType(this)}; const client = new C2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class C3 extends $stdlib.std.Resource { constructor(scope, id, a, b) { super(scope, id); - this._addInflightOps("$inflight_init"); this.x = a; if (true) { this.y = b; } } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.C3-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const C3Client = ${C3._toInflightType(this).text}; + const C3Client = ${C3._toInflightType(this)}; const client = new C3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class C4 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static m() { return 1; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.C4-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const C4Client = ${C4._toInflightType(this).text}; + const C4Client = ${C4._toInflightType(this)}; const client = new C4Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class C5 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("set", "$inflight_init", "x", "y"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.C5-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const C5Client = ${C5._toInflightType(this).text}; + const C5Client = ${C5._toInflightType(this)}; const client = new C5Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["x", "y", "set", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $c5: ${context._lift(c5)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -773,102 +785,110 @@ class $Root extends $stdlib.std.Resource { class Person extends $stdlib.std.Resource { constructor(scope, id, name) { super(scope, id); - this._addInflightOps("$inflight_init"); this.name = name; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Person-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const PersonClient = ${Person._toInflightType(this).text}; + const PersonClient = ${Person._toInflightType(this)}; const client = new PersonClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Student extends Person { constructor(scope, id, name, major) { super(scope,id,name); - this._addInflightOps("$inflight_init"); this.major = major; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Student-1.js")({ $Person: ${context._lift(Person)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const StudentClient = ${Student._toInflightType(this).text}; + const StudentClient = ${Student._toInflightType(this)}; const client = new StudentClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class PaidStudent extends Student { constructor(scope, id, name, major, hrlyWage) { super(scope,id,name,major); - this._addInflightOps("$inflight_init"); this.hrlyWage = hrlyWage; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.PaidStudent-1.js")({ $Student: ${context._lift(Student)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const PaidStudentClient = ${PaidStudent._toInflightType(this).text}; + const PaidStudentClient = ${PaidStudent._toInflightType(this)}; const client = new PaidStudentClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $student_hrlyWage: ${context._lift(student.hrlyWage)}, $student_major: ${context._lift(student.major)}, $student_name: ${context._lift(student.name)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -882,51 +902,55 @@ class $Root extends $stdlib.std.Resource { class TeacherAid extends PaidStudent { constructor(scope, id, name, major, hrlyWage) { super(scope,id,name,major,hrlyWage); - this._addInflightOps("$inflight_init"); this.hrlyWage = 10; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.TeacherAid-1.js")({ $PaidStudent: ${context._lift(PaidStudent)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const TeacherAidClient = ${TeacherAid._toInflightType(this).text}; + const TeacherAidClient = ${TeacherAid._toInflightType(this)}; const client = new TeacherAidClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $ta_hrlyWage: ${context._lift(ta.hrlyWage)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -938,24 +962,26 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init", "sound"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["sound", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -967,168 +993,182 @@ class $Root extends $stdlib.std.Resource { class B extends A { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.B-1.js")({ $A: ${context._lift(A)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BClient = ${B._toInflightType(this).text}; + const BClient = ${B._toInflightType(this)}; const client = new BClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure4 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure4-1.js")({ $B: ${context._lift(B)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure4Client = ${$Closure4._toInflightType(this).text}; + const $Closure4Client = ${$Closure4._toInflightType(this)}; const client = new $Closure4Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class Bar extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Bar-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BarClient = ${Bar._toInflightType(this).text}; + const BarClient = ${Bar._toInflightType(this)}; const client = new BarClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Foo extends Bar { constructor(scope, id, ) { super(scope,id,); - this._addInflightOps("doStuff", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ $Bar: ${context._lift(Bar)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["doStuff", "$inflight_init"]; } } class Baz extends Bar { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Baz-1.js")({ $Bar: ${context._lift(Bar)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BazClient = ${Baz._toInflightType(this).text}; + const BazClient = ${Baz._toInflightType(this)}; const client = new BazClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Boom extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Boom-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BoomClient = ${Boom._toInflightType(this).text}; + const BoomClient = ${Boom._toInflightType(this)}; const client = new BoomClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Bam extends Boom { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Bam-1.js")({ $Boom: ${context._lift(Boom)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BamClient = ${Bam._toInflightType(this).text}; + const BamClient = ${Bam._toInflightType(this)}; const client = new BamClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } new C1(this,"C1"); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/closure_class.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/closure_class.w_compile_tf-aws.md index 9d24b2e8044..7475a3e1cf2 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/closure_class.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/closure_class.w_compile_tf-aws.md @@ -173,49 +173,53 @@ class $Root extends $stdlib.std.Resource { class MyClosure extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("another", "handle", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyClosure-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyClosureClient = ${MyClosure._toInflightType(this).text}; + const MyClosureClient = ${MyClosure._toInflightType(this)}; const client = new MyClosureClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["another", "handle", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $fn: ${context._lift(fn)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/construct-base.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/construct-base.w_compile_tf-aws.md index f1b6bab9ec5..39acde82ee4 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/construct-base.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/construct-base.w_compile_tf-aws.md @@ -71,32 +71,34 @@ class $Root extends $stdlib.std.Resource { class WingResource extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); {console.log(String.raw({ raw: ["my id is ", ""] }, this.node.id))}; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.WingResource-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const WingResourceClient = ${WingResource._toInflightType(this).text}; + const WingResourceClient = ${WingResource._toInflightType(this)}; const client = new WingResourceClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } const getPath = ((c) => { return c.node.path; }); const getDisplayName = ((r) => { - return r.display.title; + return (std.Node.of(r)).title; }); const q = this.node.root.new("@cdktf/provider-aws.sqsQueue.SqsQueue",aws.sqsQueue.SqsQueue,this,"aws.sqsQueue.SqsQueue"); const wr = new WingResource(this,"WingResource"); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/custom_obj_id.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/custom_obj_id.w_compile_tf-aws.md index 20b95d51ba9..b3293c4502b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/custom_obj_id.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/custom_obj_id.w_compile_tf-aws.md @@ -56,24 +56,26 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } const foo1 = new Foo(this,"Foo"); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/debug_env.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/debug_env.w_compile_tf-aws.md index d9ec95f9d83..d0f3691e536 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/debug_env.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/debug_env.w_compile_tf-aws.md @@ -57,25 +57,27 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.b = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/deep_equality.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/deep_equality.w_compile_tf-aws.md index 2de13cd6cde..74005ea6251 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/deep_equality.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/deep_equality.w_compile_tf-aws.md @@ -2,7 +2,7 @@ ## Cat.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Cat { static jsonSchema() { return { @@ -24,7 +24,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Cat.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Cat.Struct.js")(${ context._lift(stdStruct) })`; } } return Cat; @@ -1121,29 +1121,31 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $numA: ${context._lift(numA)}, $numB: ${context._lift(numB)}, $strA: ${context._lift(strA)}, $strB: ${context._lift(strB)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1158,29 +1160,31 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $numA: ${context._lift(numA)}, $numC: ${context._lift(numC)}, $strA: ${context._lift(strA)}, $strC: ${context._lift(strC)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1195,27 +1199,29 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $jsonA: ${context._lift(jsonA)}, $jsonB: ${context._lift(jsonB)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1228,28 +1234,30 @@ class $Root extends $stdlib.std.Resource { class $Closure4 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure4-1.js")({ $jsonA: ${context._lift(jsonA)}, $jsonB: ${context._lift(jsonB)}, $jsonC: ${context._lift(jsonC)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure4Client = ${$Closure4._toInflightType(this).text}; + const $Closure4Client = ${$Closure4._toInflightType(this)}; const client = new $Closure4Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1263,27 +1271,29 @@ class $Root extends $stdlib.std.Resource { class $Closure5 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure5-1.js")({ $setA: ${context._lift(setA)}, $setB: ${context._lift(setB)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure5Client = ${$Closure5._toInflightType(this).text}; + const $Closure5Client = ${$Closure5._toInflightType(this)}; const client = new $Closure5Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1296,28 +1306,30 @@ class $Root extends $stdlib.std.Resource { class $Closure6 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure6-1.js")({ $setA: ${context._lift(setA)}, $setB: ${context._lift(setB)}, $setC: ${context._lift(setC)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure6Client = ${$Closure6._toInflightType(this).text}; + const $Closure6Client = ${$Closure6._toInflightType(this)}; const client = new $Closure6Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1331,27 +1343,29 @@ class $Root extends $stdlib.std.Resource { class $Closure7 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure7-1.js")({ $mapA: ${context._lift(mapA)}, $mapB: ${context._lift(mapB)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure7Client = ${$Closure7._toInflightType(this).text}; + const $Closure7Client = ${$Closure7._toInflightType(this)}; const client = new $Closure7Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1364,28 +1378,30 @@ class $Root extends $stdlib.std.Resource { class $Closure8 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure8-1.js")({ $mapA: ${context._lift(mapA)}, $mapB: ${context._lift(mapB)}, $mapC: ${context._lift(mapC)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure8Client = ${$Closure8._toInflightType(this).text}; + const $Closure8Client = ${$Closure8._toInflightType(this)}; const client = new $Closure8Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1399,27 +1415,29 @@ class $Root extends $stdlib.std.Resource { class $Closure9 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure9-1.js")({ $arrayA: ${context._lift(arrayA)}, $arrayB: ${context._lift(arrayB)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure9Client = ${$Closure9._toInflightType(this).text}; + const $Closure9Client = ${$Closure9._toInflightType(this)}; const client = new $Closure9Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1432,28 +1450,30 @@ class $Root extends $stdlib.std.Resource { class $Closure10 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure10-1.js")({ $arrayA: ${context._lift(arrayA)}, $arrayB: ${context._lift(arrayB)}, $arrayC: ${context._lift(arrayC)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure10Client = ${$Closure10._toInflightType(this).text}; + const $Closure10Client = ${$Closure10._toInflightType(this)}; const client = new $Closure10Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1467,27 +1487,29 @@ class $Root extends $stdlib.std.Resource { class $Closure11 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure11-1.js")({ $cat1: ${context._lift(cat1)}, $cat2: ${context._lift(cat2)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure11Client = ${$Closure11._toInflightType(this).text}; + const $Closure11Client = ${$Closure11._toInflightType(this)}; const client = new $Closure11Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1500,28 +1522,30 @@ class $Root extends $stdlib.std.Resource { class $Closure12 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure12-1.js")({ $cat1: ${context._lift(cat1)}, $cat2: ${context._lift(cat2)}, $cat3: ${context._lift(cat3)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure12Client = ${$Closure12._toInflightType(this).text}; + const $Closure12Client = ${$Closure12._toInflightType(this)}; const client = new $Closure12Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1560,7 +1584,7 @@ class $Root extends $stdlib.std.Resource { const arrayC = [4, 5, 6]; this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:Array with the same value",new $Closure9(this,"$Closure9")); this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:Array with different values",new $Closure10(this,"$Closure10")); - const Cat = require("./Cat.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const Cat = require("./Cat.Struct.js")($stdlib.std.Struct); const cat1 = ({"name": "Mittens","age": 3}); const cat2 = ({"name": "Mittens","age": 3}); const cat3 = ({"name": "Simba","age": 5}); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/double_reference.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/double_reference.w_compile_tf-aws.md index da17b13cfaa..50011ae6402 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/double_reference.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/double_reference.w_compile_tf-aws.md @@ -207,25 +207,27 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("method", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ $initCount: ${context._lift(initCount)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["method", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -237,26 +239,28 @@ class $Root extends $stdlib.std.Resource { class Bar extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("callFoo", "$inflight_init"); this.foo = new Foo(this,"Foo"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Bar-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BarClient = ${Bar._toInflightType(this).text}; + const BarClient = ${Bar._toInflightType(this)}; const client = new BarClient({ $this_foo: ${this._lift(this.foo)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["callFoo", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -271,28 +275,30 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $bar: ${context._lift(bar)}, $bar_foo: ${context._lift(bar.foo)}, $initCount: ${context._lift(initCount)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/doubler.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/doubler.w_compile_tf-aws.md index 65ee4e1e814..c8b3874a7ce 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/doubler.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/doubler.w_compile_tf-aws.md @@ -306,26 +306,28 @@ class $Root extends $stdlib.std.Resource { class Doubler extends $stdlib.std.Resource { constructor(scope, id, func) { super(scope, id); - this._addInflightOps("invoke", "$inflight_init"); this.func = func; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Doubler-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const DoublerClient = ${Doubler._toInflightType(this).text}; + const DoublerClient = ${Doubler._toInflightType(this)}; const client = new DoublerClient({ $this_func: ${this._lift(this.func)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["invoke", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -340,59 +342,62 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class Doubler2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } makeFunc(handler) { const __parent_this_2 = this; class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $handler: ${context._lift(handler)}, $std_Json: ${context._lift(std.Json)}, $std_Number: ${context._lift(std.Number)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -404,70 +409,77 @@ class $Root extends $stdlib.std.Resource { return this.node.root.newAbstract("@winglang/sdk.cloud.Function",this,"cloud.Function",new $Closure2(this,"$Closure2")); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Doubler2-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const Doubler2Client = ${Doubler2._toInflightType(this).text}; + const Doubler2Client = ${Doubler2._toInflightType(this)}; const client = new Doubler2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure4 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure4-1.js")({ $f: ${context._lift(f)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure4Client = ${$Closure4._toInflightType(this).text}; + const $Closure4Client = ${$Closure4._toInflightType(this)}; const client = new $Closure4Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/enums.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/enums.w_compile_tf-aws.md index b4eca033203..c3d038202c6 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/enums.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/enums.w_compile_tf-aws.md @@ -152,28 +152,30 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $SomeEnum: ${context._lift(SomeEnum)}, $one: ${context._lift(one)}, $two: ${context._lift(two)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md index b7dc5592a27..0042d479114 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md @@ -266,7 +266,6 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("regexInflight", "getUuid", "getData", "print", "call", "$inflight_init"); } static getGreeting(name) { return (require("/external_js.js")["getGreeting"])(name) @@ -275,46 +274,51 @@ class $Root extends $stdlib.std.Resource { return (require("/index.js")["v4"])() } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["regexInflight", "getUuid", "getData", "print", "call", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $f: ${context._lift(f)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -326,26 +330,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $f: ${context._lift(f)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/file_counter.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/file_counter.w_compile_tf-aws.md index 3b8b03b95ef..c7c4a15f256 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/file_counter.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/file_counter.w_compile_tf-aws.md @@ -228,27 +228,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $bucket: ${context._lift(bucket)}, $counter: ${context._lift(counter)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/for_loop.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/for_loop.w_compile_tf-aws.md index a5b0f1cf573..76b3c6d5335 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/for_loop.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/for_loop.w_compile_tf-aws.md @@ -173,48 +173,52 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("hello", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["hello", "$inflight_init"]; } } const words = ["wing", "lang", "dang"]; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/forward_decl.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/forward_decl.w_compile_tf-aws.md index bdf19718dc9..16394d2384f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/forward_decl.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/forward_decl.w_compile_tf-aws.md @@ -56,7 +56,6 @@ class $Root extends $stdlib.std.Resource { class R extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.f = "Hello World!!!"; } method2() { @@ -67,21 +66,24 @@ class $Root extends $stdlib.std.Resource { method1() { } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.R-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const RClient = ${R._toInflightType(this).text}; + const RClient = ${R._toInflightType(this)}; const client = new RClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } const x = "hi"; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/function_returns_function.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/function_returns_function.w_compile_tf-aws.md index 0e43bb5384f..dabdf27fbab 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/function_returns_function.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/function_returns_function.w_compile_tf-aws.md @@ -162,25 +162,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const fn = ((s) => { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/function_type.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/function_type.w_compile_tf-aws.md index b5744a3a2ae..e60e4bae976 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/function_type.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/function_type.w_compile_tf-aws.md @@ -94,76 +94,82 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class C extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("my_method3", "my_method4", "$inflight_init"); } my_method(x) { } my_method2(x) { } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.C-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const CClient = ${C._toInflightType(this).text}; + const CClient = ${C._toInflightType(this)}; const client = new CClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["my_method3", "my_method4", "$inflight_init"]; } } const my_func = ((callback) => { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/hello.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/hello.w_compile_tf-aws.md index c2e0b19e6c2..a288d67a543 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/hello.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/hello.w_compile_tf-aws.md @@ -205,26 +205,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $bucket: ${context._lift(bucket)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/identical_inflights.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/identical_inflights.w_compile_tf-aws.md index 27dcdd21f8a..622b7ed89fd 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/identical_inflights.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/identical_inflights.w_compile_tf-aws.md @@ -78,49 +78,53 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const x = new $Closure1(this,"$Closure1"); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/impl_interface.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/impl_interface.w_compile_tf-aws.md index ea8d46d1ecc..f894b85854d 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/impl_interface.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/impl_interface.w_compile_tf-aws.md @@ -127,49 +127,53 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $x: ${context._lift(x)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -181,7 +185,6 @@ class $Root extends $stdlib.std.Resource { class r extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("method2", "$inflight_init"); } method1(x) { return x; @@ -190,68 +193,75 @@ class $Root extends $stdlib.std.Resource { return x; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.r-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const rClient = ${r._toInflightType(this).text}; + const rClient = ${r._toInflightType(this)}; const client = new rClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["method2", "$inflight_init"]; } } class Dog extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("eat", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Dog-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const DogClient = ${Dog._toInflightType(this).text}; + const DogClient = ${Dog._toInflightType(this)}; const client = new DogClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["eat", "$inflight_init"]; } } class Terrier extends Dog { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("eat", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Terrier-1.js")({ $Dog: ${context._lift(Dog)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const TerrierClient = ${Terrier._toInflightType(this).text}; + const TerrierClient = ${Terrier._toInflightType(this)}; const client = new TerrierClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["eat", "$inflight_init"]; } } const x = new A(this,"A"); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md index 5b638af6996..6bdedc0f54d 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md @@ -221,25 +221,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const preflightClosure = ((nice) => { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight-subscribers.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight-subscribers.w_compile_tf-aws.md index 24adaed5076..036ce433c84 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight-subscribers.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight-subscribers.w_compile_tf-aws.md @@ -298,49 +298,53 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } (this.node.root.newAbstract("@winglang/sdk.cloud.Topic",this,"cloud.Topic").onMessage(new $Closure1(this,"$Closure1"),{ timeout: (std.Duration.fromSeconds(180)) })); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md index 0a55c09f826..d163d42b725 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md @@ -446,72 +446,78 @@ class $Root extends $stdlib.std.Resource { class Preflight extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("staticMethod", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Preflight-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const PreflightClient = ${Preflight._toInflightType(this).text}; + const PreflightClient = ${Preflight._toInflightType(this)}; const client = new PreflightClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["staticMethod", "$inflight_init"]; } } class OuterInflight extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("staticMethod", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.OuterInflight-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const OuterInflightClient = ${OuterInflight._toInflightType(this).text}; + const OuterInflightClient = ${OuterInflight._toInflightType(this)}; const client = new OuterInflightClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["staticMethod", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $Preflight: ${context._lift(Preflight)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -523,75 +529,81 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $OuterInflight: ${context._lift(OuterInflight)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure4 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure4-1.js")({ $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure4Client = ${$Closure4._toInflightType(this).text}; + const $Closure4Client = ${$Closure4._toInflightType(this)}; const client = new $Closure4Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:call static method of preflight",new $Closure1(this,"$Closure1")); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_as_struct_members.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_as_struct_members.w_compile_tf-aws.md index 5f872e30c2b..a9fa753bf46 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_as_struct_members.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_as_struct_members.w_compile_tf-aws.md @@ -2,7 +2,7 @@ ## Bar.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Bar { static jsonSchema() { return { @@ -23,7 +23,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Bar.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Bar.Struct.js")(${ context._lift(stdStruct) })`; } } return Bar; @@ -214,74 +214,80 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("get", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["get", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $Foo: ${context._lift(Foo)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $getBar: ${context._lift(getBar)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -290,7 +296,7 @@ class $Root extends $stdlib.std.Resource { super._registerBind(host, ops); } } - const Bar = require("./Bar.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const Bar = require("./Bar.Struct.js")($stdlib.std.Struct); const getBar = new $Closure1(this,"$Closure1"); this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure2(this,"$Closure2")); } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_const.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_const.w_compile_tf-aws.md index 70c2f115e6c..5b4a73c12ea 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_const.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_const.w_compile_tf-aws.md @@ -166,25 +166,27 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("getValue", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ $myConst: ${context._lift(myConst)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["getValue", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("getValue")) { @@ -196,27 +198,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $Foo: ${context._lift(Foo)}, $myConst: ${context._lift(myConst)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_definitions.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_definitions.w_compile_tf-aws.md index 9d5efa1ce98..2feb91375d4 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_definitions.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_definitions.w_compile_tf-aws.md @@ -267,104 +267,111 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("goo", "$inflight_init"); } foo() { return "a1"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["goo", "$inflight_init"]; } } class B extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.B-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BClient = ${B._toInflightType(this).text}; + const BClient = ${B._toInflightType(this)}; const client = new BClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foo", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class D extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("callInner", "$inflight_init"); class E extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } foo() { return "e1"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.E-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const EClient = ${E._toInflightType(this).text}; + const EClient = ${E._toInflightType(this)}; const client = new EClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } const pb = new E(this,"E"); @@ -372,50 +379,54 @@ class $Root extends $stdlib.std.Resource { class F extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.F-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FClient = ${F._toInflightType(this).text}; + const FClient = ${F._toInflightType(this)}; const client = new FClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foo", "$inflight_init"]; } } const __parent_this_2 = this; class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $F: ${context._lift(F)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.inner = new $Closure2(this,"$Closure2"); @@ -424,22 +435,25 @@ class $Root extends $stdlib.std.Resource { return this.inner; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.D-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const DClient = ${D._toInflightType(this).text}; + const DClient = ${D._toInflightType(this)}; const client = new DClient({ $this_inner: ${this._lift(this.inner)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["callInner", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -454,11 +468,10 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $B: ${context._lift(B)}, $a: ${context._lift(a)}, @@ -466,18 +479,21 @@ class $Root extends $stdlib.std.Resource { $fn: ${context._lift(fn)}, $innerD: ${context._lift(innerD)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inner_capture_mutable.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inner_capture_mutable.w_compile_tf-aws.md index a2d8068df06..dffa5d18cf5 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inner_capture_mutable.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inner_capture_mutable.w_compile_tf-aws.md @@ -163,25 +163,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:inner inflight class capture immutable",new $Closure1(this,"$Closure1")); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inside_inflight_closure.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inside_inflight_closure.w_compile_tf-aws.md index 17e19672c9f..f541e1ef5cc 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inside_inflight_closure.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inside_inflight_closure.w_compile_tf-aws.md @@ -380,7 +380,6 @@ class $Root extends $stdlib.std.Resource { class PreflightClass extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.b = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); } preflight_method() { @@ -388,26 +387,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $__parent_this_1_b: ${context._lift(__parent_this_1.b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -420,46 +421,51 @@ class $Root extends $stdlib.std.Resource { return this.node.root.newAbstract("@winglang/sdk.cloud.Function",this,"cloud.Function",inflight_closure); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.PreflightClass-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const PreflightClassClient = ${PreflightClass._toInflightType(this).text}; + const PreflightClassClient = ${PreflightClass._toInflightType(this)}; const client = new PreflightClassClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $f: ${context._lift(f)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -471,25 +477,27 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const p = new PreflightClass(this,"PreflightClass"); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_modifiers.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_modifiers.w_compile_tf-aws.md index fc57cc0f672..d1ca8f30ef7 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_modifiers.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_modifiers.w_compile_tf-aws.md @@ -59,24 +59,26 @@ class $Root extends $stdlib.std.Resource { class C extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("method", "$inflight_init", "field"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.C-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const CClient = ${C._toInflightType(this).text}; + const CClient = ${C._toInflightType(this)}; const client = new CClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["field", "method", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_outside_inflight_closure.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_outside_inflight_closure.w_compile_tf-aws.md index 56709635b4f..f914c0aa62a 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_outside_inflight_closure.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_outside_inflight_closure.w_compile_tf-aws.md @@ -170,24 +170,26 @@ class $Root extends $stdlib.std.Resource { class BinaryOperation extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("add", "$inflight_init", "lhs", "rhs"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.BinaryOperation-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BinaryOperationClient = ${BinaryOperation._toInflightType(this).text}; + const BinaryOperationClient = ${BinaryOperation._toInflightType(this)}; const client = new BinaryOperationClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["lhs", "rhs", "add", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -202,26 +204,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $BinaryOperation: ${context._lift(BinaryOperation)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:inflight class outside inflight closure",new $Closure1(this,"$Closure1")); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_structural_interace_handler.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_structural_interace_handler.w_compile_tf-aws.md index 5300e2aff01..14cb73aafd9 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_structural_interace_handler.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_structural_interace_handler.w_compile_tf-aws.md @@ -176,49 +176,53 @@ class $Root extends $stdlib.std.Resource { class NotGoo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.NotGoo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const NotGooClient = ${NotGoo._toInflightType(this).text}; + const NotGooClient = ${NotGoo._toInflightType(this)}; const client = new NotGooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $NotGoo: ${context._lift(NotGoo)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:structure interface types for 'handle'",new $Closure1(this,"$Closure1")); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_without_init.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_without_init.w_compile_tf-aws.md index f4a44024a3f..3e01098e03e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_without_init.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_without_init.w_compile_tf-aws.md @@ -162,49 +162,53 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $Foo: ${context._lift(Foo)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:inflight class without init",new $Closure1(this,"$Closure1")); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_concat.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_concat.w_compile_tf-aws.md index aef57441e30..46b6de10648 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_concat.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_concat.w_compile_tf-aws.md @@ -61,26 +61,28 @@ class $Root extends $stdlib.std.Resource { class R extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init"); this.s1 = "hello"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.R-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const RClient = ${R._toInflightType(this).text}; + const RClient = ${R._toInflightType(this)}; const client = new RClient({ $_this_s1_concat___world___: ${this._lift((this.s1.concat(" world")))}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foo", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflights_calling_inflights.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflights_calling_inflights.w_compile_tf-aws.md index e6e6215e885..6aa69ae8d2c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflights_calling_inflights.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflights_calling_inflights.w_compile_tf-aws.md @@ -407,26 +407,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $globalBucket: ${context._lift(globalBucket)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -438,26 +440,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $storeInBucket: ${context._lift(storeInBucket)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -469,27 +473,29 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $func1: ${context._lift(func1)}, $globalBucket: ${context._lift(globalBucket)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -502,31 +508,32 @@ class $Root extends $stdlib.std.Resource { class MyResource extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("foo", "$inflight_init"); const __parent_this_4 = this; class $Closure4 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure4-1.js")({ $globalBucket: ${context._lift(globalBucket)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure4Client = ${$Closure4._toInflightType(this).text}; + const $Closure4Client = ${$Closure4._toInflightType(this)}; const client = new $Closure4Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -538,22 +545,25 @@ class $Root extends $stdlib.std.Resource { this.closure = new $Closure4(this,"$Closure4"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyResource-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyResourceClient = ${MyResource._toInflightType(this).text}; + const MyResourceClient = ${MyResource._toInflightType(this)}; const client = new MyResourceClient({ $this_closure: ${this._lift(this.closure)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["foo", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -568,26 +578,28 @@ class $Root extends $stdlib.std.Resource { class $Closure5 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure5-1.js")({ $x: ${context._lift(x)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure5Client = ${$Closure5._toInflightType(this).text}; + const $Closure5Client = ${$Closure5._toInflightType(this)}; const client = new $Closure5Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md index 7b0957b7ce5..26edcebea61 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md @@ -311,53 +311,57 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $std_Json: ${context._lift(std.Json)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $api_url: ${context._lift(api.url)}, $http_Util: ${context._lift(http.Util)}, $std_Json: ${context._lift(std.Json)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json.w_compile_tf-aws.md index 58a6f2ebeca..5e10864d9cb 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json.w_compile_tf-aws.md @@ -2,7 +2,7 @@ ## Base.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Base { static jsonSchema() { return { @@ -22,7 +22,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Base.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Base.Struct.js")(${ context._lift(stdStruct) })`; } } return Base; @@ -32,7 +32,7 @@ module.exports = function(stdStruct, fromInline) { ## HasBucket.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class HasBucket { static jsonSchema() { return { @@ -53,7 +53,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./HasBucket.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./HasBucket.Struct.js")(${ context._lift(stdStruct) })`; } } return HasBucket; @@ -63,7 +63,7 @@ module.exports = function(stdStruct, fromInline) { ## HasInnerBucket.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class HasInnerBucket { static jsonSchema() { return { @@ -84,7 +84,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./HasInnerBucket.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./HasInnerBucket.Struct.js")(${ context._lift(stdStruct) })`; } } return HasInnerBucket; @@ -94,7 +94,7 @@ module.exports = function(stdStruct, fromInline) { ## InnerStructyJson.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class InnerStructyJson { static jsonSchema() { return { @@ -117,7 +117,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./InnerStructyJson.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./InnerStructyJson.Struct.js")(${ context._lift(stdStruct) })`; } } return InnerStructyJson; @@ -127,7 +127,7 @@ module.exports = function(stdStruct, fromInline) { ## LastOne.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class LastOne { static jsonSchema() { return { @@ -150,7 +150,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./LastOne.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./LastOne.Struct.js")(${ context._lift(stdStruct) })`; } } return LastOne; @@ -160,7 +160,7 @@ module.exports = function(stdStruct, fromInline) { ## StructyJson.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class StructyJson { static jsonSchema() { return { @@ -184,7 +184,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./StructyJson.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./StructyJson.Struct.js")(${ context._lift(stdStruct) })`; } } return StructyJson; @@ -281,25 +281,27 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.SumStr = "wow!"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } const jsonNumber = 123; @@ -419,15 +421,15 @@ class $Root extends $stdlib.std.Resource { {((cond) => {if (!cond) throw new Error("assertion failed: notSpecified.get(\"foo\") == \"bar\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((notSpecified)["foo"],"bar")))}; const empty = ({}); {((cond) => {if (!cond) throw new Error("assertion failed: Json.has(empty, \"something\") == false")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((args) => { return args[0].hasOwnProperty(args[1]); })([empty,"something"]),false)))}; - const Base = require("./Base.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); - const LastOne = require("./LastOne.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); - const InnerStructyJson = require("./InnerStructyJson.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); - const StructyJson = require("./StructyJson.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const Base = require("./Base.Struct.js")($stdlib.std.Struct); + const LastOne = require("./LastOne.Struct.js")($stdlib.std.Struct); + const InnerStructyJson = require("./InnerStructyJson.Struct.js")($stdlib.std.Struct); + const StructyJson = require("./StructyJson.Struct.js")($stdlib.std.Struct); const notJsonMissingField = ({"foo": "bar","stuff": []}); const notJson = ({"foo": "bar","stuff": [1, 2, 3],"maybe": ({"good": true,"inner_stuff": [({"hi": 1,"base": "base"})]})}); let mutableJson = ({"foo": "bar","stuff": [1, 2, 3],"maybe": ({"good": true,"inner_stuff": [({"hi": 1,"base": "base"})]})}); - const HasBucket = require("./HasBucket.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); - const HasInnerBucket = require("./HasInnerBucket.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const HasBucket = require("./HasBucket.Struct.js")($stdlib.std.Struct); + const HasInnerBucket = require("./HasInnerBucket.Struct.js")($stdlib.std.Struct); const hasBucket = ({"a": ({"a": this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket")})}); } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md index d63c5779e44..6ce136e26c9 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md @@ -269,27 +269,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, $fileName: ${context._lift(fileName)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -302,29 +304,31 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $b: ${context._lift(b)}, $fileName: ${context._lift(fileName)}, $getJson: ${context._lift(getJson)}, $j: ${context._lift(j)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md index c6195e32840..2c48572c265 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md @@ -239,27 +239,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $jj: ${context._lift(jj)}, $std_Json: ${context._lift(std.Json)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -271,26 +273,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $std_Json: ${context._lift(std.Json)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const x = ({"a": 123,"b": ({"c": 456,"d": 789})}); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_expr_with_this.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_expr_with_this.w_compile_tf-aws.md index 4cf8e8f8ec4..036835a375f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_expr_with_this.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_expr_with_this.w_compile_tf-aws.md @@ -164,50 +164,54 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.value = "hello"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ $foo_this_value: ${this._lift(foo_this.value)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_redefinition.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_redefinition.w_compile_tf-aws.md index ec9d60fee0c..a61b3d64803 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_redefinition.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_redefinition.w_compile_tf-aws.md @@ -153,26 +153,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $y: ${context._lift(y)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_this.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_this.w_compile_tf-aws.md index 97acebd7415..bf42112b69e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_this.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_this.w_compile_tf-aws.md @@ -172,24 +172,26 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("bar", "foo", "$inflight_init", "x"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["x", "bar", "foo", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("foo")) { @@ -201,26 +203,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $f: ${context._lift(f)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure.w_compile_tf-aws.md index 5b810547574..d7d67e965f8 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure.w_compile_tf-aws.md @@ -342,26 +342,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $bucket2: ${context._lift(bucket2)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -373,27 +375,29 @@ class $Root extends $stdlib.std.Resource { class MyClosure extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "putFile", "listFiles", "$inflight_init"); this.bucket = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyClosure-1.js")({ $bucket2: ${context._lift(bucket2)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyClosureClient = ${MyClosure._toInflightType(this).text}; + const MyClosureClient = ${MyClosure._toInflightType(this)}; const client = new MyClosureClient({ $this_bucket: ${this._lift(this.bucket)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "putFile", "listFiles", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -415,26 +419,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $fn: ${context._lift(fn)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -446,28 +452,30 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $bucket2: ${context._lift(bucket2)}, $fn2: ${context._lift(fn2)}, $fn2_bucket: ${context._lift(fn2.bucket)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure_explicit.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure_explicit.w_compile_tf-aws.md index a100b481ca7..5541a82c23c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure_explicit.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure_explicit.w_compile_tf-aws.md @@ -183,26 +183,28 @@ class $Root extends $stdlib.std.Resource { class MyClosure extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); this.q = this.node.root.newAbstract("@winglang/sdk.cloud.Queue",this,"cloud.Queue"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyClosure-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyClosureClient = ${MyClosure._toInflightType(this).text}; + const MyClosureClient = ${MyClosure._toInflightType(this)}; const client = new MyClosureClient({ $this_q: ${this._lift(this.q)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -217,26 +219,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $fn: ${context._lift(fn)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/nil.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/nil.w_compile_tf-aws.md index 41596c3afa9..fb5ad38e37e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/nil.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/nil.w_compile_tf-aws.md @@ -270,49 +270,53 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("returnNil", "setOptionalValue", "getOptionalValue", "$inflight_init", "optionalVar"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["optionalVar", "returnNil", "setOptionalValue", "getOptionalValue", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $foo: ${context._lift(foo)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -324,26 +328,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $foo: ${context._lift(foo)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md index 05ceea75c62..f6347bfc782 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md @@ -2,7 +2,7 @@ ## Name.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Name { static jsonSchema() { return { @@ -23,7 +23,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Name.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Name.Struct.js")(${ context._lift(stdStruct) })`; } } return Name; @@ -33,7 +33,7 @@ module.exports = function(stdStruct, fromInline) { ## Payload.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Payload { static jsonSchema() { return { @@ -56,7 +56,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Payload.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Payload.Struct.js")(${ context._lift(stdStruct) })`; } } return Payload; @@ -298,128 +298,138 @@ class $Root extends $stdlib.std.Resource { class Super extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.name = "Super"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Super-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const SuperClient = ${Super._toInflightType(this).text}; + const SuperClient = ${Super._toInflightType(this)}; const client = new SuperClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Sub extends Super { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.name = "Sub"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Sub-1.js")({ $Super: ${context._lift(Super)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const SubClient = ${Sub._toInflightType(this).text}; + const SubClient = ${Sub._toInflightType(this)}; const client = new SubClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Sub1 extends Super { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.name = "Sub"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Sub1-1.js")({ $Super: ${context._lift(Super)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const Sub1Client = ${Sub1._toInflightType(this).text}; + const Sub1Client = ${Sub1._toInflightType(this)}; const client = new Sub1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Node extends $stdlib.std.Resource { constructor(scope, id, value, left, right) { super(scope, id); - this._addInflightOps("$inflight_init"); this.value = value; this.left = left; this.right = right; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Node-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const NodeClient = ${Node._toInflightType(this).text}; + const NodeClient = ${Node._toInflightType(this)}; const client = new NodeClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $__payloadWithBucket_c_____null_: ${context._lift(((payloadWithBucket.c) != null))}, $__payloadWithoutOptions_b_____null_: ${context._lift(((payloadWithoutOptions.b) != null))}, $payloadWithBucket_c: ${context._lift(payloadWithBucket.c)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -439,7 +449,7 @@ class $Root extends $stdlib.std.Resource { const optionalSup = new Super(this,"Super"); const s = (optionalSup ?? new Sub(this,"Sub")); {((cond) => {if (!cond) throw new Error("assertion failed: s.name == \"Super\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(s.name,"Super")))}; - const Name = require("./Name.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const Name = require("./Name.Struct.js")($stdlib.std.Struct); let name = ({"first": "John","last": "Doe"}); { const $IF_LET_VALUE = name; @@ -571,7 +581,7 @@ class $Root extends $stdlib.std.Resource { {((cond) => {if (!cond) throw new Error("assertion failed: o.value == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(o.value,1)))}; } } - const Payload = require("./Payload.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const Payload = require("./Payload.Struct.js")($stdlib.std.Struct); const payloadWithoutOptions = ({"a": "a"}); const payloadWithBucket = ({"a": "a","c": this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"orange bucket")}); this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:t",new $Closure1(this,"$Closure1")); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/print.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/print.w_compile_tf-aws.md index 328ae6dd57c..13569d9a6e6 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/print.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/print.w_compile_tf-aws.md @@ -238,49 +238,53 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } {console.log("preflight log")}; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/reassignment.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/reassignment.w_compile_tf-aws.md index c5181c19f4d..574a86b0357 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/reassignment.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/reassignment.w_compile_tf-aws.md @@ -56,7 +56,6 @@ class $Root extends $stdlib.std.Resource { class R extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); if (true) { this.f = 1; this.f1 = 0; @@ -66,21 +65,24 @@ class $Root extends $stdlib.std.Resource { this.f = (this.f + 1); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.R-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const RClient = ${R._toInflightType(this).text}; + const RClient = ${R._toInflightType(this)}; const client = new RClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } let x = 5; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/redis.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/redis.w_compile_tf-aws.md index 0daf2c3c215..edf9c2cc32a 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/redis.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/redis.w_compile_tf-aws.md @@ -603,26 +603,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $r: ${context._lift(r)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -634,29 +636,31 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $queue: ${context._lift(queue)}, $r: ${context._lift(r)}, $r2: ${context._lift(r2)}, $util_Util: ${context._lift(util.Util)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md index dfe25f76cf2..d827ee9196e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md @@ -837,26 +837,28 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("fooInc", "fooGet", "fooStatic", "$inflight_init", "inflightField"); this.c = this.node.root.newAbstract("@winglang/sdk.cloud.Counter",this,"cloud.Counter"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ $this_c: ${this._lift(this.c)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["inflightField", "fooInc", "fooGet", "fooStatic", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -874,24 +876,23 @@ class $Root extends $stdlib.std.Resource { class Bar extends $stdlib.std.Resource { constructor(scope, id, name, b, e) { super(scope, id); - this._addInflightOps("barStatic", "myMethod", "testTypeAccess", "$inflight_init"); this.name = name; this.b = b; this.foo = new Foo(this,"Foo"); this.e = e; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Bar-1.js")({ $Foo: ${context._lift(Foo)}, $MyEnum: ${context._lift(MyEnum)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BarClient = ${Bar._toInflightType(this).text}; + const BarClient = ${Bar._toInflightType(this)}; const client = new BarClient({ $this_b: ${this._lift(this.b)}, $this_e: ${this._lift(this.e)}, @@ -900,7 +901,10 @@ class $Root extends $stdlib.std.Resource { if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["barStatic", "myMethod", "testTypeAccess", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -923,28 +927,30 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $bucket: ${context._lift(bucket)}, $res: ${context._lift(res)}, $res_foo: ${context._lift(res.foo)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -958,7 +964,6 @@ class $Root extends $stdlib.std.Resource { class BigPublisher extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("publish", "getObjectCount", "$inflight_init"); this.b = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); this.b2 = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"b2"); this.q = this.node.root.newAbstract("@winglang/sdk.cloud.Queue",this,"cloud.Queue"); @@ -967,26 +972,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $__parent_this_2_b: ${context._lift(__parent_this_2.b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1000,26 +1007,28 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $__parent_this_3_b: ${context._lift(__parent_this_3.b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1033,26 +1042,28 @@ class $Root extends $stdlib.std.Resource { class $Closure4 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure4-1.js")({ $__parent_this_4_q: ${context._lift(__parent_this_4.q)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure4Client = ${$Closure4._toInflightType(this).text}; + const $Closure4Client = ${$Closure4._toInflightType(this)}; const client = new $Closure4Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1064,15 +1075,15 @@ class $Root extends $stdlib.std.Resource { (this.b2.onCreate(new $Closure4(this,"$Closure4"))); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.BigPublisher-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BigPublisherClient = ${BigPublisher._toInflightType(this).text}; + const BigPublisherClient = ${BigPublisher._toInflightType(this)}; const client = new BigPublisherClient({ $this_b: ${this._lift(this.b)}, $this_b2: ${this._lift(this.b2)}, @@ -1082,7 +1093,10 @@ class $Root extends $stdlib.std.Resource { if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["publish", "getObjectCount", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -1105,26 +1119,28 @@ class $Root extends $stdlib.std.Resource { class $Closure5 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure5-1.js")({ $bigOlPublisher: ${context._lift(bigOlPublisher)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure5Client = ${$Closure5._toInflightType(this).text}; + const $Closure5Client = ${$Closure5._toInflightType(this)}; const client = new $Closure5Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -1136,30 +1152,31 @@ class $Root extends $stdlib.std.Resource { class Dummy extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Dummy-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const DummyClient = ${Dummy._toInflightType(this).text}; + const DummyClient = ${Dummy._toInflightType(this)}; const client = new DummyClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class ScopeAndIdTestClass extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); const d1 = new Dummy(this,"Dummy"); {((cond) => {if (!cond) throw new Error("assertion failed: d1.node.path.endsWith(\"/ScopeAndIdTestClass/Dummy\")")})(d1.node.path.endsWith("/ScopeAndIdTestClass/Dummy"))}; const d2 = new Dummy(d1,"Dummy"); @@ -1171,21 +1188,24 @@ class $Root extends $stdlib.std.Resource { } } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.ScopeAndIdTestClass-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const ScopeAndIdTestClassClient = ${ScopeAndIdTestClass._toInflightType(this).text}; + const ScopeAndIdTestClassClient = ${ScopeAndIdTestClass._toInflightType(this)}; const client = new ScopeAndIdTestClassClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } const MyEnum = diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_as_inflight_literal.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_as_inflight_literal.w_compile_tf-aws.md index b886007be17..1f5a4a25ebd 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_as_inflight_literal.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_as_inflight_literal.w_compile_tf-aws.md @@ -237,49 +237,53 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $fn: ${context._lift(fn)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_call_static.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_call_static.w_compile_tf-aws.md index 1a061857437..49ff678084f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_call_static.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_call_static.w_compile_tf-aws.md @@ -187,25 +187,27 @@ class $Root extends $stdlib.std.Resource { class Another extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("myStaticMethod", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Another-1.js")({ $globalCounter: ${context._lift(globalCounter)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AnotherClient = ${Another._toInflightType(this).text}; + const AnotherClient = ${Another._toInflightType(this)}; const client = new AnotherClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["myStaticMethod", "$inflight_init"]; } static _registerTypeBind(host, ops) { if (ops.includes("myStaticMethod")) { @@ -217,26 +219,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $Another: ${context._lift(Another)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures.w_compile_tf-aws.md index abc89fbfa84..5f473b03da4 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures.w_compile_tf-aws.md @@ -391,56 +391,59 @@ class $Root extends $stdlib.std.Resource { class First extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.myResource = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.First-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FirstClient = ${First._toInflightType(this).text}; + const FirstClient = ${First._toInflightType(this)}; const client = new FirstClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Another extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("meaningOfLife", "anotherFunc", "$inflight_init"); this.myField = "hello!"; this.first = new First(this,"First"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Another-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AnotherClient = ${Another._toInflightType(this).text}; + const AnotherClient = ${Another._toInflightType(this)}; const client = new AnotherClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["meaningOfLife", "anotherFunc", "$inflight_init"]; } } class MyResource extends $stdlib.std.Resource { constructor(scope, id, externalBucket, externalNum) { super(scope, id); - this._addInflightOps("testNoCapture", "testCaptureCollectionsOfData", "testCapturePrimitives", "testCaptureOptional", "testCaptureResource", "testNestedInflightField", "testNestedResource", "testExpressionRecursive", "testExternal", "testUserDefinedResource", "testInflightField", "$inflight_init", "inflightField"); this.myResource = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); this.myStr = "myString"; this.myNum = 42; @@ -459,15 +462,15 @@ class $Root extends $stdlib.std.Resource { return this.another; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyResource-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyResourceClient = ${MyResource._toInflightType(this).text}; + const MyResourceClient = ${MyResource._toInflightType(this)}; const client = new MyResourceClient({ $___this_setOfStr_has__s3____: ${this._lift((!(this.setOfStr.has("s3"))))}, $_this_arrayOfStr_at_0__: ${this._lift((this.arrayOfStr.at(0)))}, @@ -492,7 +495,10 @@ class $Root extends $stdlib.std.Resource { if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["inflightField", "testNoCapture", "testCaptureCollectionsOfData", "testCapturePrimitives", "testCaptureOptional", "testCaptureResource", "testNestedInflightField", "testNestedResource", "testExpressionRecursive", "testExternal", "testUserDefinedResource", "testInflightField", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -561,26 +567,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $r: ${context._lift(r)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md index 9fabf451a80..83fb4428499 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md @@ -517,51 +517,55 @@ class $Root extends $stdlib.std.Resource { class First extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.myResource = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.First-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FirstClient = ${First._toInflightType(this).text}; + const FirstClient = ${First._toInflightType(this)}; const client = new FirstClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Another extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("myMethod", "myStaticMethod", "$inflight_init"); this.myField = "hello!"; this.first = new First(this,"First"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Another-1.js")({ $globalCounter: ${context._lift(globalCounter)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AnotherClient = ${Another._toInflightType(this).text}; + const AnotherClient = ${Another._toInflightType(this)}; const client = new AnotherClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["myMethod", "myStaticMethod", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -582,33 +586,34 @@ class $Root extends $stdlib.std.Resource { class MyResource extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("myPut", "$inflight_init"); this.localTopic = this.node.root.newAbstract("@winglang/sdk.cloud.Topic",this,"cloud.Topic"); this.localCounter = this.node.root.newAbstract("@winglang/sdk.cloud.Counter",this,"cloud.Counter"); const $parentThis = this; class R extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.R-1.js")({ $_parentThis_localCounter: ${context._lift($parentThis.localCounter)}, $globalCounter: ${context._lift(globalCounter)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const RClient = ${R._toInflightType(this).text}; + const RClient = ${R._toInflightType(this)}; const client = new RClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -621,7 +626,7 @@ class $Root extends $stdlib.std.Resource { (this.localTopic.onMessage(new R(this,"R"))); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.MyResource-1.js")({ $Another: ${context._lift(Another)}, $_globalArrayOfStr_at_0__: ${context._lift((globalArrayOfStr.at(0)))}, @@ -635,19 +640,22 @@ class $Root extends $stdlib.std.Resource { $globalNum: ${context._lift(globalNum)}, $globalStr: ${context._lift(globalStr)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const MyResourceClient = ${MyResource._toInflightType(this).text}; + const MyResourceClient = ${MyResource._toInflightType(this)}; const client = new MyResourceClient({ $this_localTopic: ${this._lift(this.localTopic)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["myPut", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -673,26 +681,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $res: ${context._lift(res)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -704,26 +714,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $Another: ${context._lift(Another)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/shadowing.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/shadowing.w_compile_tf-aws.md index 4da8d232a89..0b643f576ce 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/shadowing.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/shadowing.w_compile_tf-aws.md @@ -182,26 +182,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $bar: ${context._lift(bar)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -213,26 +215,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $fn: ${context._lift(fn)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/statements_if.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/statements_if.w_compile_tf-aws.md index c22d76ab1bf..473885fc4a3 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/statements_if.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/statements_if.w_compile_tf-aws.md @@ -171,25 +171,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } if (true) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/static_members.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/static_members.w_compile_tf-aws.md index 038d3960598..31add1170c0 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/static_members.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/static_members.w_compile_tf-aws.md @@ -177,52 +177,56 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("get123", "$inflight_init"); this.instanceField = 100; } static m() { return 99; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["get123", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const foo = new Foo(this,"Foo"); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/std_containers.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/std_containers.w_compile_tf-aws.md index c8334c978c4..2610edf6c74 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/std_containers.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/std_containers.w_compile_tf-aws.md @@ -82,72 +82,78 @@ class $Root extends $stdlib.std.Resource { class Animal extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Animal-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AnimalClient = ${Animal._toInflightType(this).text}; + const AnimalClient = ${Animal._toInflightType(this)}; const client = new AnimalClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Cat extends Animal { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Cat-1.js")({ $Animal: ${context._lift(Animal)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const CatClient = ${Cat._toInflightType(this).text}; + const CatClient = ${Cat._toInflightType(this)}; const client = new CatClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Dog extends Animal { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Dog-1.js")({ $Animal: ${context._lift(Animal)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const DogClient = ${Dog._toInflightType(this).text}; + const DogClient = ${Dog._toInflightType(this)}; const client = new DogClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } const sArray = ["one", "two"]; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/std_string.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/std_string.w_compile_tf-aws.md index 91e46e354bc..d2adc6ff19e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/std_string.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/std_string.w_compile_tf-aws.md @@ -153,28 +153,30 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $__s1_split_______at_1__: ${context._lift(((s1.split(" ")).at(1)))}, $_s1_concat_s2__: ${context._lift((s1.concat(s2)))}, $s1_indexOf__s__: ${context._lift(s1.indexOf("s"))}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/store.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/store.w_compile_tf-aws.md index 7e637f6ef1b..627684bf1bf 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/store.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/store.w_compile_tf-aws.md @@ -2,7 +2,7 @@ ## Point.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Point { static jsonSchema() { return { @@ -24,7 +24,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Point.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Point.Struct.js")(${ context._lift(stdStruct) })`; } } return Point; @@ -134,55 +134,58 @@ class $Root extends $stdlib.std.Resource { class Util extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Util-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const UtilClient = ${Util._toInflightType(this).text}; + const UtilClient = ${Util._toInflightType(this)}; const client = new UtilClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class Store extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("store", "$inflight_init"); this.b = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"cloud.Bucket"); const __parent_this_1 = this; class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $__parent_this_1_b: ${context._lift(__parent_this_1.b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -194,22 +197,25 @@ class $Root extends $stdlib.std.Resource { const prefill = this.node.root.newAbstract("@winglang/sdk.cloud.OnDeploy",this,"cloud.OnDeploy",new $Closure1(this,"$Closure1")); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Store-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const StoreClient = ${Store._toInflightType(this).text}; + const StoreClient = ${Store._toInflightType(this)}; const client = new StoreClient({ $this_b: ${this._lift(this.b)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["store", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -229,7 +235,7 @@ class $Root extends $stdlib.std.Resource { return tmp; })({}) ; - const Point = require("./Point.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const Point = require("./Point.Struct.js")($stdlib.std.Struct); } } const $App = $stdlib.core.App.for(process.env.WING_TARGET); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md index 1d44834d3fc..686247b6d26 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md @@ -2,7 +2,7 @@ ## Advisor.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Advisor { static jsonSchema() { return { @@ -25,7 +25,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Advisor.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Advisor.Struct.js")(${ context._lift(stdStruct) })`; } } return Advisor; @@ -35,7 +35,7 @@ module.exports = function(stdStruct, fromInline) { ## Bar.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Bar { static jsonSchema() { return { @@ -58,7 +58,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Bar.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Bar.Struct.js")(${ context._lift(stdStruct) })`; } } return Bar; @@ -68,7 +68,7 @@ module.exports = function(stdStruct, fromInline) { ## Course.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Course { static jsonSchema() { return { @@ -90,7 +90,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Course.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Course.Struct.js")(${ context._lift(stdStruct) })`; } } return Course; @@ -100,7 +100,7 @@ module.exports = function(stdStruct, fromInline) { ## CourseResults.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class CourseResults { static jsonSchema() { return { @@ -126,7 +126,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./CourseResults.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./CourseResults.Struct.js")(${ context._lift(stdStruct) })`; } } return CourseResults; @@ -136,7 +136,7 @@ module.exports = function(stdStruct, fromInline) { ## Date.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Date { static jsonSchema() { return { @@ -160,7 +160,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Date.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Date.Struct.js")(${ context._lift(stdStruct) })`; } } return Date; @@ -170,7 +170,7 @@ module.exports = function(stdStruct, fromInline) { ## Foo.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Foo { static jsonSchema() { return { @@ -190,7 +190,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Foo.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Foo.Struct.js")(${ context._lift(stdStruct) })`; } } return Foo; @@ -200,7 +200,7 @@ module.exports = function(stdStruct, fromInline) { ## Foosible.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Foosible { static jsonSchema() { return { @@ -219,7 +219,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Foosible.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Foosible.Struct.js")(${ context._lift(stdStruct) })`; } } return Foosible; @@ -229,7 +229,7 @@ module.exports = function(stdStruct, fromInline) { ## MyOtherStruct.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class MyOtherStruct { static jsonSchema() { return { @@ -250,7 +250,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./MyOtherStruct.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./MyOtherStruct.Struct.js")(${ context._lift(stdStruct) })`; } } return MyOtherStruct; @@ -260,7 +260,7 @@ module.exports = function(stdStruct, fromInline) { ## MyStruct.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class MyStruct { static jsonSchema() { return { @@ -280,7 +280,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./MyStruct.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./MyStruct.Struct.js")(${ context._lift(stdStruct) })`; } } return MyStruct; @@ -290,7 +290,7 @@ module.exports = function(stdStruct, fromInline) { ## Person.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Person { static jsonSchema() { return { @@ -315,7 +315,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Person.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Person.Struct.js")(${ context._lift(stdStruct) })`; } } return Person; @@ -325,7 +325,7 @@ module.exports = function(stdStruct, fromInline) { ## Student.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Student { static jsonSchema() { return { @@ -357,7 +357,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Student.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Student.Struct.js")(${ context._lift(stdStruct) })`; } } return Student; @@ -629,52 +629,56 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $Student: ${context._lift(Student)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $Student: ${context._lift(Student)}, $jStudent1: ${context._lift(jStudent1)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -683,10 +687,10 @@ class $Root extends $stdlib.std.Resource { super._registerBind(host, ops); } } - const Foo = require("./Foo.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const Foo = require("./Foo.Struct.js")($stdlib.std.Struct); const jFoo = ({"f": "bar"}); {((cond) => {if (!cond) throw new Error("assertion failed: Foo.fromJson(jFoo).f == \"bar\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((Foo.fromJson(jFoo)).f,"bar")))}; - const Foosible = require("./Foosible.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const Foosible = require("./Foosible.Struct.js")($stdlib.std.Struct); const jFoosible = ({}); const jFoosible2 = ({"f": "bar"}); { @@ -706,17 +710,17 @@ class $Root extends $stdlib.std.Resource { {((cond) => {if (!cond) throw new Error("assertion failed: false")})(false)}; } } - const Bar = require("./Bar.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const Bar = require("./Bar.Struct.js")($stdlib.std.Struct); const jBar = ({"f": "bar","b": 10}); const b = (Bar.fromJson(jBar)); {((cond) => {if (!cond) throw new Error("assertion failed: b.f == \"bar\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(b.f,"bar")))}; {((cond) => {if (!cond) throw new Error("assertion failed: b.b == 10")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(b.b,10)))}; - const Date = require("./Date.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); - const Person = require("./Person.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); - const Advisor = require("./Advisor.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); - const Course = require("./Course.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); - const CourseResults = require("./CourseResults.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); - const Student = require("./Student.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const Date = require("./Date.Struct.js")($stdlib.std.Struct); + const Person = require("./Person.Struct.js")($stdlib.std.Struct); + const Advisor = require("./Advisor.Struct.js")($stdlib.std.Struct); + const Course = require("./Course.Struct.js")($stdlib.std.Struct); + const CourseResults = require("./CourseResults.Struct.js")($stdlib.std.Struct); + const Student = require("./Student.Struct.js")($stdlib.std.Struct); const jStudent1 = ({"firstName": "John","lastName": "Smith","enrolled": true,"schoolId": "s1-xyz","dob": ({"month": 10,"day": 10,"year": 2005}),"enrolledCourses": []}); const student1 = (Student.fromJson(jStudent1)); {((cond) => {if (!cond) throw new Error("assertion failed: student1.firstName == \"John\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(student1.firstName,"John")))}; @@ -807,8 +811,8 @@ new $App({ outdir: $outdir, name: "struct_from_json", rootConstruct: $Root, plug ```js module.exports = function({ $stdlib }) { const std = $stdlib.std; - const MyStruct = require("./MyStruct.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); - const MyOtherStruct = require("./MyOtherStruct.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const MyStruct = require("./MyStruct.Struct.js")($stdlib.std.Struct); + const MyOtherStruct = require("./MyOtherStruct.Struct.js")($stdlib.std.Struct); return { MyStruct, MyOtherStruct }; }; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/structs.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/structs.w_compile_tf-aws.md index e61ce8a61a3..a89432366da 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/structs.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/structs.w_compile_tf-aws.md @@ -2,7 +2,7 @@ ## A.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class A { static jsonSchema() { return { @@ -22,7 +22,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./A.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./A.Struct.js")(${ context._lift(stdStruct) })`; } } return A; @@ -32,7 +32,7 @@ module.exports = function(stdStruct, fromInline) { ## B.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class B { static jsonSchema() { return { @@ -60,7 +60,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./B.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./B.Struct.js")(${ context._lift(stdStruct) })`; } } return B; @@ -70,7 +70,7 @@ module.exports = function(stdStruct, fromInline) { ## Dazzle.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Dazzle { static jsonSchema() { return { @@ -90,7 +90,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Dazzle.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Dazzle.Struct.js")(${ context._lift(stdStruct) })`; } } return Dazzle; @@ -100,7 +100,7 @@ module.exports = function(stdStruct, fromInline) { ## Razzle.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Razzle { static jsonSchema() { return { @@ -120,7 +120,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Razzle.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Razzle.Struct.js")(${ context._lift(stdStruct) })`; } } return Razzle; @@ -130,7 +130,7 @@ module.exports = function(stdStruct, fromInline) { ## Showtime.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class Showtime { static jsonSchema() { return { @@ -154,7 +154,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./Showtime.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./Showtime.Struct.js")(${ context._lift(stdStruct) })`; } } return Showtime; @@ -199,7 +199,7 @@ module.exports = function({ }) { ## lotsOfTypes.Struct.js ```js -module.exports = function(stdStruct, fromInline) { +module.exports = function(stdStruct) { class lotsOfTypes { static jsonSchema() { return { @@ -232,7 +232,7 @@ module.exports = function(stdStruct, fromInline) { return stdStruct._validate(obj, this.jsonSchema()) } static _toInflightType(context) { - return fromInline(`require("./lotsOfTypes.Struct.js")(${ context._lift(stdStruct) })`); + return `require("./lotsOfTypes.Struct.js")(${ context._lift(stdStruct) })`; } } return lotsOfTypes; @@ -373,26 +373,28 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, b) { super(scope, id); - this._addInflightOps("getStuff", "$inflight_init"); this.data = b; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ $this_data_field0: ${this._lift(this.data.field0)}, }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["getStuff", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { @@ -407,38 +409,40 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } - const A = require("./A.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); - const B = require("./B.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const A = require("./A.Struct.js")($stdlib.std.Struct); + const B = require("./B.Struct.js")($stdlib.std.Struct); const x = ({"field0": "Sup"}); const y = ({"field0": "hello","field1": 1,"field2": "world","field3": ({"field0": "foo"})}); {((cond) => {if (!cond) throw new Error("assertion failed: x.field0 == \"Sup\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(x.field0,"Sup")))}; {((cond) => {if (!cond) throw new Error("assertion failed: y.field1 == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(y.field1,1)))}; {((cond) => {if (!cond) throw new Error("assertion failed: y.field3.field0 == \"foo\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(y.field3.field0,"foo")))}; - const lotsOfTypes = require("./lotsOfTypes.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); - const Razzle = require("./Razzle.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); - const Dazzle = require("./Dazzle.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); - const Showtime = require("./Showtime.Struct.js")($stdlib.std.Struct, $stdlib.core.NodeJsCode.fromInline); + const lotsOfTypes = require("./lotsOfTypes.Struct.js")($stdlib.std.Struct); + const Razzle = require("./Razzle.Struct.js")($stdlib.std.Struct); + const Dazzle = require("./Dazzle.Struct.js")($stdlib.std.Struct); + const Showtime = require("./Showtime.Struct.js")($stdlib.std.Struct); const s = ({"a": "Boom baby"}); this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:struct definitions are phase independant",new $Closure1(this,"$Closure1")); } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/super_call.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/super_call.w_compile_tf-aws.md index 7a49db8d062..65fb7b1d24b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/super_call.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/super_call.w_compile_tf-aws.md @@ -388,226 +388,244 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); this.message = "A message from your ancestor"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class B extends A { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } description() { return "B"; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.B-1.js")({ $A: ${context._lift(A)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BClient = ${B._toInflightType(this).text}; + const BClient = ${B._toInflightType(this)}; const client = new BClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class C extends B { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } description() { return String.raw({ raw: ["C extends ", ""] }, (super.description())); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.C-1.js")({ $B: ${context._lift(B)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const CClient = ${C._toInflightType(this).text}; + const CClient = ${C._toInflightType(this)}; const client = new CClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class D extends C { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.D-1.js")({ $C: ${context._lift(C)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const DClient = ${D._toInflightType(this).text}; + const DClient = ${D._toInflightType(this)}; const client = new DClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class E extends D { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); } description() { return String.raw({ raw: ["E extends ", ""] }, (super.description())); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.E-1.js")({ $D: ${context._lift(D)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const EClient = ${E._toInflightType(this).text}; + const EClient = ${E._toInflightType(this)}; const client = new EClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class InflightA extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("description", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.InflightA-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const InflightAClient = ${InflightA._toInflightType(this).text}; + const InflightAClient = ${InflightA._toInflightType(this)}; const client = new InflightAClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["description", "$inflight_init"]; } } class InflightB extends InflightA { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("description", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.InflightB-1.js")({ $InflightA: ${context._lift(InflightA)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const InflightBClient = ${InflightB._toInflightType(this).text}; + const InflightBClient = ${InflightB._toInflightType(this)}; const client = new InflightBClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["description", "$inflight_init"]; } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $InflightB: ${context._lift(InflightB)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } class BaseClass extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("do", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.BaseClass-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const BaseClassClient = ${BaseClass._toInflightType(this).text}; + const BaseClassClient = ${BaseClass._toInflightType(this)}; const client = new BaseClassClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["do", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("do")) { @@ -619,26 +637,28 @@ class $Root extends $stdlib.std.Resource { class ExtendedClass extends BaseClass { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("do", "$inflight_init"); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.ExtendedClass-1.js")({ $BaseClass: ${context._lift(BaseClass)}, $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const ExtendedClassClient = ${ExtendedClass._toInflightType(this).text}; + const ExtendedClassClient = ${ExtendedClass._toInflightType(this)}; const client = new ExtendedClassClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["do", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("do")) { @@ -650,26 +670,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $extended: ${context._lift(extended)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/symbol_shadow.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/symbol_shadow.w_compile_tf-aws.md index 1a84c4eb3a3..23687e05f0b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/symbol_shadow.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/symbol_shadow.w_compile_tf-aws.md @@ -417,33 +417,34 @@ class $Root extends $stdlib.std.Resource { class A extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("$inflight_init"); const s = "inResource"; {((cond) => {if (!cond) throw new Error("assertion failed: s == \"inResource\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(s,"inResource")))}; const __parent_this_2 = this; class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $s: ${context._lift(s)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -455,46 +456,51 @@ class $Root extends $stdlib.std.Resource { this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:inflight in resource should capture the right scoped var",new $Closure2(this,"$Closure2")); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.A-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const AClient = ${A._toInflightType(this).text}; + const AClient = ${A._toInflightType(this)}; const client = new AClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["$inflight_init"]; } } class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ $s: ${context._lift(s)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -506,25 +512,27 @@ class $Root extends $stdlib.std.Resource { class $Closure4 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure4-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure4Client = ${$Closure4._toInflightType(this).text}; + const $Closure4Client = ${$Closure4._toInflightType(this)}; const client = new $Closure4Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const s = "top"; @@ -534,26 +542,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $s: ${context._lift(s)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/test_bucket.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/test_bucket.w_compile_tf-aws.md index 643549a26f5..0d9a1139110 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/test_bucket.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/test_bucket.w_compile_tf-aws.md @@ -269,26 +269,28 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -300,26 +302,28 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $b: ${context._lift(b)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/test_without_bring.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/test_without_bring.w_compile_tf-aws.md index 074df8accd6..ce61d39e3bc 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/test_without_bring.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/test_without_bring.w_compile_tf-aws.md @@ -151,25 +151,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:hello test",new $Closure1(this,"$Closure1")); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/use_inflight_method_inside_init_closure.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/use_inflight_method_inside_init_closure.w_compile_tf-aws.md index 07a43ab1433..8ef44300222 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/use_inflight_method_inside_init_closure.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/use_inflight_method_inside_init_closure.w_compile_tf-aws.md @@ -166,31 +166,32 @@ class $Root extends $stdlib.std.Resource { class Foo extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("bar", "$inflight_init"); const __parent_this_1 = this; class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $__parent_this_1: ${context._lift(__parent_this_1)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -202,21 +203,24 @@ class $Root extends $stdlib.std.Resource { this.node.root.newAbstract("@winglang/sdk.cloud.Function",this,"cloud.Function",new $Closure1(this,"$Closure1")); } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.Foo-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const FooClient = ${Foo._toInflightType(this).text}; + const FooClient = ${Foo._toInflightType(this)}; const client = new FooClient({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["bar", "$inflight_init"]; } } new Foo(this,"Foo"); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md index 57248cb7170..7d490292275 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md @@ -633,27 +633,29 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ $std_Json: ${context._lift(std.Json)}, $usersTable: ${context._lift(usersTable)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -665,27 +667,29 @@ class $Root extends $stdlib.std.Resource { class $Closure2 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure2-1.js")({ $std_Json: ${context._lift(std.Json)}, $usersTable: ${context._lift(usersTable)}, }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const $Closure2Client = ${$Closure2._toInflightType(this)}; const client = new $Closure2Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } _registerBind(host, ops) { if (ops.includes("handle")) { @@ -697,25 +701,27 @@ class $Root extends $stdlib.std.Resource { class $Closure3 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure3-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const $Closure3Client = ${$Closure3._toInflightType(this)}; const client = new $Closure3Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const api = this.node.root.newAbstract("@winglang/sdk.cloud.Api",this,"cloud.Api"); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/while_loop_await.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/while_loop_await.w_compile_tf-aws.md index 679d5ffccfa..0f7e60c6526 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/while_loop_await.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/while_loop_await.w_compile_tf-aws.md @@ -183,25 +183,27 @@ class $Root extends $stdlib.std.Resource { class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { super(scope, id); - this._addInflightOps("handle", "$inflight_init"); - this.display.hidden = true; + (std.Node.of(this)).hidden = true; } static _toInflightType(context) { - return $stdlib.core.NodeJsCode.fromInline(` + return ` require("./inflight.$Closure1-1.js")({ }) - `); + `; } _toInflight() { - return $stdlib.core.NodeJsCode.fromInline(` + return ` (await (async () => { - const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const $Closure1Client = ${$Closure1._toInflightType(this)}; const client = new $Closure1Client({ }); if (client.$inflight_init) { await client.$inflight_init(); } return client; })()) - `); + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; } } const queue = this.node.root.newAbstract("@winglang/sdk.cloud.Queue",this,"cloud.Queue"); From dd9055c96bdc605db1e89f66520abf302673f9a7 Mon Sep 17 00:00:00 2001 From: Chris Rybicki Date: Fri, 25 Aug 2023 11:07:15 -0400 Subject: [PATCH 10/48] feat(sdk): use arm64 for `awscdk` and `tf-aws` functions (#3963) This change should give better price/performance for most workloads, and not have any effect on runtime behavior since all cloud functions are using the AWS-provided NodeJS runtimes. ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- libs/wingsdk/src/target-awscdk/function.ts | 2 + libs/wingsdk/src/target-tf-aws/function.ts | 1 + .../__snapshots__/bucket.test.ts.snap | 12 +++++ .../__snapshots__/counter.test.ts.snap | 15 +++++++ .../__snapshots__/function.test.ts.snap | 12 +++++ .../__snapshots__/on-deploy.test.ts.snap | 21 ++++++--- .../__snapshots__/queue.test.ts.snap | 3 ++ .../__snapshots__/schedule.test.ts.snap | 12 +++++ .../__snapshots__/topic.test.ts.snap | 9 ++++ .../__snapshots__/bucket.test.ts.snap | 18 ++++++++ .../__snapshots__/captures.test.ts.snap | 21 +++++++++ .../__snapshots__/counter.test.ts.snap | 15 +++++++ .../__snapshots__/function.test.ts.snap | 18 ++++++++ .../__snapshots__/logger.test.ts.snap | 3 ++ .../__snapshots__/on-deploy.test.ts.snap | 9 ++++ .../__snapshots__/queue.test.ts.snap | 3 ++ .../__snapshots__/schedule.test.ts.snap | 12 +++++ .../__snapshots__/table.test.ts.snap | 3 ++ .../__snapshots__/tokens.test.ts.snap | 3 ++ .../__snapshots__/topic.test.ts.snap | 3 ++ tools/hangar/__snapshots__/plugins.ts.snap | 15 +++++++ .../sdk_tests/api/delete.w_compile_tf-aws.md | 6 +++ .../sdk_tests/api/get.w_compile_tf-aws.md | 6 +++ .../sdk_tests/api/options.w_compile_tf-aws.md | 12 +++++ .../sdk_tests/api/patch.w_compile_tf-aws.md | 6 +++ .../sdk_tests/api/post.w_compile_tf-aws.md | 6 +++ .../sdk_tests/api/put.w_compile_tf-aws.md | 6 +++ .../bucket/add_file.w_compile_tf-aws.md | 3 ++ .../bucket/add_object.w_compile_tf-aws.md | 3 ++ .../bucket/bucket_list.w_compile_tf-aws.md | 3 ++ .../bucket/delete.w_compile_tf-aws.md | 3 ++ .../bucket/events.w_compile_tf-aws.md | 21 +++++++++ .../bucket/exists.w_compile_tf-aws.md | 3 ++ .../bucket/public_url.w_compile_tf-aws.md | 3 ++ .../sdk_tests/bucket/put.w_compile_tf-aws.md | 3 ++ .../bucket/put_json.w_compile_tf-aws.md | 3 ++ .../bucket/try_delete.w_compile_tf-aws.md | 3 ++ .../bucket/try_get.w_compile_tf-aws.md | 3 ++ .../bucket/try_get_json.w_compile_tf-aws.md | 3 ++ .../sdk_tests/counter/dec.w_compile_tf-aws.md | 6 +++ .../sdk_tests/counter/inc.w_compile_tf-aws.md | 6 +++ .../counter/initial.w_compile_tf-aws.md | 9 ++++ .../counter/peek.w_compile_tf-aws.md | 6 +++ .../sdk_tests/counter/set.w_compile_tf-aws.md | 6 +++ .../function/invoke.w_compile_tf-aws.md | 6 +++ .../function/logging.w_compile_tf-aws.md | 9 ++++ .../memory_and_env.w_compile_tf-aws.md | 9 ++++ .../sdk_tests/math/abs.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/acos.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/acot.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/acsc.w_compile_tf-aws.md | 3 ++ .../angular_conversion.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/asec.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/asin.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/atan.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/atan2.w_compile_tf-aws.md | 3 ++ .../math/combinations.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/cos.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/cot.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/csc.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/euler.w_compile_tf-aws.md | 3 ++ .../math/factorial.w_compile_tf-aws.md | 3 ++ .../math/fibonacci.w_compile_tf-aws.md | 3 ++ .../math/floor_ceil_round.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/hypot.w_compile_tf-aws.md | 3 ++ .../math/median_mode_mean.w_compile_tf-aws.md | 9 ++++ .../math/min_max.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/pi.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/prime.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/random.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/sec.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/sin.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/sqrt.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/tan.w_compile_tf-aws.md | 3 ++ .../sdk_tests/math/tau.w_compile_tf-aws.md | 3 ++ .../execute_after.w_compile_tf-aws.md | 9 ++++ .../sdk_tests/queue/pop.w_compile_tf-aws.md | 3 ++ .../sdk_tests/queue/purge.w_compile_tf-aws.md | 3 ++ .../queue/set_consumer.w_compile_tf-aws.md | 6 +++ .../schedule/on_tick.w_compile_tf-aws.md | 9 ++++ .../sdk_tests/std/array.w_compile_tf-aws.md | 45 +++++++++++++++++++ .../sdk_tests/std/bool.w_compile_tf-aws.md | 3 ++ .../std/datetime.w_compile_tf-aws.md | 3 ++ .../std/duration.w_compile_tf-aws.md | 3 ++ .../sdk_tests/std/json.w_compile_tf-aws.md | 9 ++++ .../sdk_tests/std/number.w_compile_tf-aws.md | 6 +++ .../sdk_tests/std/string.w_compile_tf-aws.md | 42 +++++++++++++++++ .../table/add_row.w_compile_tf-aws.md | 3 ++ .../sdk_tests/table/list.w_compile_tf-aws.md | 3 ++ .../topic/on_message.w_compile_tf-aws.md | 9 ++++ .../sdk_tests/util/base64.w_compile_tf-aws.md | 3 ++ .../sdk_tests/util/env.w_compile_tf-aws.md | 3 ++ .../sdk_tests/util/nanoid.w_compile_tf-aws.md | 3 ++ .../sdk_tests/util/sha256.w_compile_tf-aws.md | 3 ++ .../sdk_tests/util/sleep.w_compile_tf-aws.md | 3 ++ .../sdk_tests/util/uuidv4.w_compile_tf-aws.md | 3 ++ .../util/wait-until.w_compile_tf-aws.md | 15 +++++++ .../website/two_websites.w_compile_tf-aws.md | 3 ++ .../website/website.w_compile_tf-aws.md | 3 ++ .../test_corpus/valid/api.w_compile_tf-aws.md | 9 ++++ .../valid/api_path_vars.w_compile_tf-aws.md | 6 +++ .../valid/api_valid_path.w_compile_tf-aws.md | 3 ++ .../valid/assert.w_compile_tf-aws.md | 3 ++ ...cit_await_in_functions.w_compile_tf-aws.md | 6 +++ .../valid/bring_jsii.w_compile_tf-aws.md | 3 ++ .../valid/bring_jsii_path.w_compile_tf-aws.md | 3 ++ .../valid/bring_local.w_compile_tf-aws.md | 6 +++ .../valid/bucket_events.w_compile_tf-aws.md | 30 +++++++++++++ .../valid/bucket_keys.w_compile_tf-aws.md | 3 ++ .../call_static_of_myself.w_compile_tf-aws.md | 3 ++ ...ling_inflight_variants.w_compile_tf-aws.md | 3 ++ .../capture_containers.w_compile_tf-aws.md | 3 ++ .../capture_in_binary.w_compile_tf-aws.md | 3 ++ .../capture_mutables.w_compile_tf-aws.md | 3 ++ .../capture_primitives.w_compile_tf-aws.md | 3 ++ ...eassigable_class_field.w_compile_tf-aws.md | 3 ++ .../capture_reassignable.w_compile_tf-aws.md | 3 ++ ...ture_resource_and_data.w_compile_tf-aws.md | 3 ++ ...ource_with_no_inflight.w_compile_tf-aws.md | 3 ++ .../valid/capture_tokens.w_compile_tf-aws.md | 6 +++ .../valid/captures.w_compile_tf-aws.md | 12 +++++ .../valid/class.w_compile_tf-aws.md | 12 +++++ .../valid/closure_class.w_compile_tf-aws.md | 3 ++ .../valid/deep_equality.w_compile_tf-aws.md | 36 +++++++++++++++ .../double_reference.w_compile_tf-aws.md | 3 ++ .../valid/doubler.w_compile_tf-aws.md | 6 +++ .../valid/enums.w_compile_tf-aws.md | 3 ++ .../extern_implementation.w_compile_tf-aws.md | 6 +++ .../valid/file_counter.w_compile_tf-aws.md | 3 ++ .../valid/for_loop.w_compile_tf-aws.md | 3 ++ ...ction_returns_function.w_compile_tf-aws.md | 3 ++ .../valid/hello.w_compile_tf-aws.md | 3 ++ .../valid/inference.w_compile_tf-aws.md | 3 ++ .../inflight-subscribers.w_compile_tf-aws.md | 6 +++ ...nflight_capture_static.w_compile_tf-aws.md | 12 +++++ ...lass_as_struct_members.w_compile_tf-aws.md | 3 ++ ...ht_class_capture_const.w_compile_tf-aws.md | 3 ++ ...ight_class_definitions.w_compile_tf-aws.md | 3 ++ ..._inner_capture_mutable.w_compile_tf-aws.md | 3 ++ ...nside_inflight_closure.w_compile_tf-aws.md | 9 ++++ ...tside_inflight_closure.w_compile_tf-aws.md | 3 ++ ...tural_interace_handler.w_compile_tf-aws.md | 3 ++ ...ght_class_without_init.w_compile_tf-aws.md | 3 ++ ...ghts_calling_inflights.w_compile_tf-aws.md | 9 ++++ .../valid/issue_2889.w_compile_tf-aws.md | 6 +++ .../valid/json_bucket.w_compile_tf-aws.md | 6 +++ .../valid/json_static.w_compile_tf-aws.md | 6 +++ .../lift_expr_with_this.w_compile_tf-aws.md | 3 ++ .../lift_redefinition.w_compile_tf-aws.md | 3 ++ .../valid/lift_this.w_compile_tf-aws.md | 3 ++ .../lift_via_closure.w_compile_tf-aws.md | 6 +++ ...t_via_closure_explicit.w_compile_tf-aws.md | 3 ++ .../test_corpus/valid/nil.w_compile_tf-aws.md | 6 +++ .../valid/optionals.w_compile_tf-aws.md | 3 ++ .../valid/print.w_compile_tf-aws.md | 6 +++ .../valid/redis.w_compile_tf-aws.md | 6 +++ .../valid/resource.w_compile_tf-aws.md | 15 +++++++ ...ce_as_inflight_literal.w_compile_tf-aws.md | 6 +++ .../resource_call_static.w_compile_tf-aws.md | 3 ++ .../resource_captures.w_compile_tf-aws.md | 3 ++ ...ource_captures_globals.w_compile_tf-aws.md | 9 ++++ .../valid/shadowing.w_compile_tf-aws.md | 3 ++ .../valid/statements_if.w_compile_tf-aws.md | 3 ++ .../valid/static_members.w_compile_tf-aws.md | 3 ++ .../valid/std_string.w_compile_tf-aws.md | 3 ++ .../struct_from_json.w_compile_tf-aws.md | 6 +++ .../valid/structs.w_compile_tf-aws.md | 3 ++ .../valid/super_call.w_compile_tf-aws.md | 6 +++ .../valid/symbol_shadow.w_compile_tf-aws.md | 12 +++++ .../valid/test_bucket.w_compile_tf-aws.md | 6 +++ .../test_without_bring.w_compile_tf-aws.md | 3 ++ ...od_inside_init_closure.w_compile_tf-aws.md | 3 ++ .../website_with_api.w_compile_tf-aws.md | 9 ++++ .../while_loop_await.w_compile_tf-aws.md | 3 ++ 174 files changed, 1059 insertions(+), 6 deletions(-) diff --git a/libs/wingsdk/src/target-awscdk/function.ts b/libs/wingsdk/src/target-awscdk/function.ts index b17108c142c..1b0d2358295 100644 --- a/libs/wingsdk/src/target-awscdk/function.ts +++ b/libs/wingsdk/src/target-awscdk/function.ts @@ -2,6 +2,7 @@ import { resolve } from "path"; import { Duration } from "aws-cdk-lib"; import { PolicyStatement as CdkPolicyStatement } from "aws-cdk-lib/aws-iam"; import { + Architecture, Function as CdkFunction, Code, IEventSource, @@ -44,6 +45,7 @@ export class Function extends cloud.Function implements IAwsFunction { ? Duration.seconds(props.timeout.seconds) : Duration.minutes(0.5), memorySize: props.memory ? props.memory : undefined, + architecture: Architecture.ARM_64, }); this.arn = this.function.functionArn; diff --git a/libs/wingsdk/src/target-tf-aws/function.ts b/libs/wingsdk/src/target-tf-aws/function.ts index f1f36823ae8..f097174c3e3 100644 --- a/libs/wingsdk/src/target-tf-aws/function.ts +++ b/libs/wingsdk/src/target-tf-aws/function.ts @@ -208,6 +208,7 @@ export class Function extends cloud.Function implements IAwsFunction { ? props.timeout.seconds : Duration.fromMinutes(0.5).seconds, memorySize: props.memory ? props.memory : undefined, + architectures: ["arm64"], }); this.arn = this.function.arn; diff --git a/libs/wingsdk/test/target-awscdk/__snapshots__/bucket.test.ts.snap b/libs/wingsdk/test/target-awscdk/__snapshots__/bucket.test.ts.snap index 5905b7ea384..4b103cbd384 100644 --- a/libs/wingsdk/test/target-awscdk/__snapshots__/bucket.test.ts.snap +++ b/libs/wingsdk/test/target-awscdk/__snapshots__/bucket.test.ts.snap @@ -367,6 +367,9 @@ def submit_response(event: dict, context, response_status: str, error_message: s "mybucketOnCreatec185c7e3ServiceRoleE5FE1BDD", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -718,6 +721,9 @@ def submit_response(event: dict, context, response_status: str, error_message: s "mybucketOnDeletec185c7e3ServiceRole113BE170", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -1091,6 +1097,9 @@ def submit_response(event: dict, context, response_status: str, error_message: s "mybucketOnEventc185c7e3ServiceRole3C4A0154", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -1442,6 +1451,9 @@ def submit_response(event: dict, context, response_status: str, error_message: s "mybucketOnUpdatec185c7e3ServiceRoleA530B9CD", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", diff --git a/libs/wingsdk/test/target-awscdk/__snapshots__/counter.test.ts.snap b/libs/wingsdk/test/target-awscdk/__snapshots__/counter.test.ts.snap index 1d0345c31f7..11871e4602c 100644 --- a/libs/wingsdk/test/target-awscdk/__snapshots__/counter.test.ts.snap +++ b/libs/wingsdk/test/target-awscdk/__snapshots__/counter.test.ts.snap @@ -125,6 +125,9 @@ exports[`dec() policy statement 2`] = ` "FunctionServiceRole675BB04A", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -363,6 +366,9 @@ exports[`function with a counter binding 2`] = ` "FunctionServiceRole675BB04A", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -535,6 +541,9 @@ exports[`inc() policy statement 2`] = ` "FunctionServiceRole675BB04A", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -707,6 +716,9 @@ exports[`peek() policy statement 2`] = ` "FunctionServiceRole675BB04A", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -879,6 +891,9 @@ exports[`set() policy statement 2`] = ` "FunctionServiceRole675BB04A", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", diff --git a/libs/wingsdk/test/target-awscdk/__snapshots__/function.test.ts.snap b/libs/wingsdk/test/target-awscdk/__snapshots__/function.test.ts.snap index 514c4ea5c3a..5b694c3e940 100644 --- a/libs/wingsdk/test/target-awscdk/__snapshots__/function.test.ts.snap +++ b/libs/wingsdk/test/target-awscdk/__snapshots__/function.test.ts.snap @@ -20,6 +20,9 @@ exports[`basic function 1`] = ` "FunctionServiceRole675BB04A", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -120,6 +123,9 @@ exports[`basic function with environment variables 1`] = ` "FunctionServiceRole675BB04A", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -226,6 +232,9 @@ exports[`basic function with memory size specified 1`] = ` "FunctionServiceRole675BB04A", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -327,6 +336,9 @@ exports[`basic function with timeout explicitly set 1`] = ` "FunctionServiceRole675BB04A", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", diff --git a/libs/wingsdk/test/target-awscdk/__snapshots__/on-deploy.test.ts.snap b/libs/wingsdk/test/target-awscdk/__snapshots__/on-deploy.test.ts.snap index 080f5376473..549e5bc90d8 100644 --- a/libs/wingsdk/test/target-awscdk/__snapshots__/on-deploy.test.ts.snap +++ b/libs/wingsdk/test/target-awscdk/__snapshots__/on-deploy.test.ts.snap @@ -98,6 +98,9 @@ exports[`create an OnDeploy 1`] = ` "myondeployFunctionServiceRole7277F8BB", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -116,7 +119,7 @@ exports[`create an OnDeploy 1`] = ` }, "Type": "AWS::Lambda::Function", }, - "myondeployFunctionCurrentVersion6BC23754dc8a690e8db1c57e1302de9438f9dfa2": { + "myondeployFunctionCurrentVersion6BC23754495ffbfe7093f6d76e062790f78856b0": { "Properties": { "FunctionName": { "Ref": "myondeployFunction47551748", @@ -159,7 +162,7 @@ exports[`create an OnDeploy 1`] = ` "DeletionPolicy": "Delete", "Properties": { "HandlerArn": { - "Ref": "myondeployFunctionCurrentVersion6BC23754dc8a690e8db1c57e1302de9438f9dfa2", + "Ref": "myondeployFunctionCurrentVersion6BC23754495ffbfe7093f6d76e062790f78856b0", }, "ServiceToken": { "Fn::GetAtt": [ @@ -322,6 +325,9 @@ exports[`execute OnDeploy after other resources 1`] = ` "myondeployFunctionServiceRole7277F8BB", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -340,7 +346,7 @@ exports[`execute OnDeploy after other resources 1`] = ` }, "Type": "AWS::Lambda::Function", }, - "myondeployFunctionCurrentVersion6BC23754dc8a690e8db1c57e1302de9438f9dfa2": { + "myondeployFunctionCurrentVersion6BC23754495ffbfe7093f6d76e062790f78856b0": { "Properties": { "FunctionName": { "Ref": "myondeployFunction47551748", @@ -386,7 +392,7 @@ exports[`execute OnDeploy after other resources 1`] = ` ], "Properties": { "HandlerArn": { - "Ref": "myondeployFunctionCurrentVersion6BC23754dc8a690e8db1c57e1302de9438f9dfa2", + "Ref": "myondeployFunctionCurrentVersion6BC23754495ffbfe7093f6d76e062790f78856b0", }, "ServiceToken": { "Fn::GetAtt": [ @@ -552,6 +558,9 @@ exports[`execute OnDeploy before other resources 1`] = ` "myondeployFunctionServiceRole7277F8BB", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -570,7 +579,7 @@ exports[`execute OnDeploy before other resources 1`] = ` }, "Type": "AWS::Lambda::Function", }, - "myondeployFunctionCurrentVersion6BC23754dc8a690e8db1c57e1302de9438f9dfa2": { + "myondeployFunctionCurrentVersion6BC23754495ffbfe7093f6d76e062790f78856b0": { "Properties": { "FunctionName": { "Ref": "myondeployFunction47551748", @@ -613,7 +622,7 @@ exports[`execute OnDeploy before other resources 1`] = ` "DeletionPolicy": "Delete", "Properties": { "HandlerArn": { - "Ref": "myondeployFunctionCurrentVersion6BC23754dc8a690e8db1c57e1302de9438f9dfa2", + "Ref": "myondeployFunctionCurrentVersion6BC23754495ffbfe7093f6d76e062790f78856b0", }, "ServiceToken": { "Fn::GetAtt": [ diff --git a/libs/wingsdk/test/target-awscdk/__snapshots__/queue.test.ts.snap b/libs/wingsdk/test/target-awscdk/__snapshots__/queue.test.ts.snap index 61fff8cd2cb..3fd8a76ab1c 100644 --- a/libs/wingsdk/test/target-awscdk/__snapshots__/queue.test.ts.snap +++ b/libs/wingsdk/test/target-awscdk/__snapshots__/queue.test.ts.snap @@ -82,6 +82,9 @@ exports[`queue with a consumer function 2`] = ` "QueueSetConsumerc185c7e3ServiceRole98E9022D", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", diff --git a/libs/wingsdk/test/target-awscdk/__snapshots__/schedule.test.ts.snap b/libs/wingsdk/test/target-awscdk/__snapshots__/schedule.test.ts.snap index 9b336244a02..835ef82e3fe 100644 --- a/libs/wingsdk/test/target-awscdk/__snapshots__/schedule.test.ts.snap +++ b/libs/wingsdk/test/target-awscdk/__snapshots__/schedule.test.ts.snap @@ -57,6 +57,9 @@ exports[`schedule behavior with cron 1`] = ` "ScheduleSetConsumerc185c7e3ServiceRoleAA894847", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -194,6 +197,9 @@ exports[`schedule behavior with rate 1`] = ` "ScheduleSetConsumerc185c7e3ServiceRoleAA894847", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -359,6 +365,9 @@ exports[`schedule with two functions 1`] = ` "ScheduleSetConsumer6e1b4252ServiceRole88F787AF", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -413,6 +422,9 @@ exports[`schedule with two functions 1`] = ` "ScheduleSetConsumerc185c7e3ServiceRoleAA894847", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", diff --git a/libs/wingsdk/test/target-awscdk/__snapshots__/topic.test.ts.snap b/libs/wingsdk/test/target-awscdk/__snapshots__/topic.test.ts.snap index 376a6824169..6f8df812bdb 100644 --- a/libs/wingsdk/test/target-awscdk/__snapshots__/topic.test.ts.snap +++ b/libs/wingsdk/test/target-awscdk/__snapshots__/topic.test.ts.snap @@ -102,6 +102,9 @@ exports[`topic with multiple subscribers 3`] = ` "TopicOnMessage6e1b4252ServiceRoleEC336C6C", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -187,6 +190,9 @@ exports[`topic with multiple subscribers 3`] = ` "TopicOnMessagee967ab9dServiceRole111B1D6D", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", @@ -336,6 +342,9 @@ exports[`topic with subscriber function 2`] = ` "TopicOnMessagec185c7e3ServiceRole9266A390", ], "Properties": { + "Architectures": [ + "arm64", + ], "Code": { "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/bucket.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/bucket.test.ts.snap index 62fa5ad868f..efc99ca9fd2 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/bucket.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/bucket.test.ts.snap @@ -466,6 +466,9 @@ exports[`bucket with onCreate method 1`] = ` }, "aws_lambda_function": { "my_bucket_my_bucket-oncreate-OnMessage-7b961f4d_8104FB90": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "my_bucket-oncreate-OnMessage-7b961f4d-c81311dd", @@ -885,6 +888,9 @@ exports[`bucket with onDelete method 1`] = ` }, "aws_lambda_function": { "my_bucket_my_bucket-ondelete-OnMessage-1de1a361_37C9E1F7": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "my_bucket-ondelete-OnMessage-1de1a361-c89e08bf", @@ -1326,6 +1332,9 @@ exports[`bucket with onEvent method 1`] = ` }, "aws_lambda_function": { "my_bucket_my_bucket-oncreate-OnMessage-7b961f4d_8104FB90": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "my_bucket-oncreate-OnMessage-7b961f4d-c81311dd", @@ -1345,6 +1354,9 @@ exports[`bucket with onEvent method 1`] = ` }, }, "my_bucket_my_bucket-ondelete-OnMessage-1de1a361_37C9E1F7": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "my_bucket-ondelete-OnMessage-1de1a361-c89e08bf", @@ -1364,6 +1376,9 @@ exports[`bucket with onEvent method 1`] = ` }, }, "my_bucket_my_bucket-onupdate-OnMessage-46c07356_F3040BF9": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "my_bucket-onupdate-OnMessage-46c07356-c844b8ba", @@ -2105,6 +2120,9 @@ exports[`bucket with onUpdate method 1`] = ` }, "aws_lambda_function": { "my_bucket_my_bucket-onupdate-OnMessage-46c07356_F3040BF9": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "my_bucket-onupdate-OnMessage-46c07356-c844b8ba", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/captures.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/captures.test.ts.snap index 5980e179dfc..a2d4632673a 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/captures.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/captures.test.ts.snap @@ -71,6 +71,9 @@ exports[`function with a function binding 3`] = ` }, "aws_lambda_function": { "Function1": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Function1-c87c16f1", @@ -90,6 +93,9 @@ exports[`function with a function binding 3`] = ` }, }, "Function2": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "FUNCTION_NAME_50735b21": "\${aws_lambda_function.Function1.arn}", @@ -206,6 +212,9 @@ exports[`function with a queue binding 3`] = ` }, "aws_lambda_function": { "Function": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "QUEUE_URL_1cfcc997": "\${aws_sqs_queue.Queue.url}", @@ -226,6 +235,9 @@ exports[`function with a queue binding 3`] = ` }, }, "Queue-SetConsumer-5cb7e554": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Queue-SetConsumer-5cb7e554-c8f6c540", @@ -313,6 +325,9 @@ exports[`function with bucket binding > put operation 2`] = ` }, "aws_lambda_function": { "Function": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "BUCKET_NAME_1357ca3a": "\${aws_s3_bucket.Bucket.bucket}", @@ -403,6 +418,9 @@ exports[`two functions reusing the same IFunctionHandler 1`] = ` }, "aws_lambda_function": { "Function1": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Function1-c87c16f1", @@ -422,6 +440,9 @@ exports[`two functions reusing the same IFunctionHandler 1`] = ` }, }, "Function2": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Function2-c827e998", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/counter.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/counter.test.ts.snap index 691e3f79912..5b0ebb3c38e 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/counter.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/counter.test.ts.snap @@ -284,6 +284,9 @@ exports[`dec() policy statement 1`] = ` }, "aws_lambda_function": { "Function": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_6cb5a3a4": "\${aws_dynamodb_table.Counter.name}", @@ -583,6 +586,9 @@ exports[`function with a counter binding 2`] = ` }, "aws_lambda_function": { "Function": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_6cb5a3a4": "\${aws_dynamodb_table.Counter.name}", @@ -839,6 +845,9 @@ exports[`inc() policy statement 1`] = ` }, "aws_lambda_function": { "Function": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_6cb5a3a4": "\${aws_dynamodb_table.Counter.name}", @@ -1095,6 +1104,9 @@ exports[`peek() policy statement 1`] = ` }, "aws_lambda_function": { "Function": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_6cb5a3a4": "\${aws_dynamodb_table.Counter.name}", @@ -1473,6 +1485,9 @@ exports[`set() policy statement 1`] = ` }, "aws_lambda_function": { "Function": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_6cb5a3a4": "\${aws_dynamodb_table.Counter.name}", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/function.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/function.test.ts.snap index 971beee01f7..37462863bf1 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/function.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/function.test.ts.snap @@ -27,6 +27,9 @@ exports[`basic function 1`] = ` }, "aws_lambda_function": { "Function": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Function-c852aba6", @@ -247,6 +250,9 @@ exports[`basic function with environment variables 1`] = ` }, "aws_lambda_function": { "Function": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "BOOM": "BAM", @@ -469,6 +475,9 @@ exports[`basic function with memory size specified 1`] = ` }, "aws_lambda_function": { "Function": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Function-c852aba6", @@ -690,6 +699,9 @@ exports[`basic function with timeout explicitly set 1`] = ` }, "aws_lambda_function": { "Function": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Function-c852aba6", @@ -910,6 +922,9 @@ exports[`function name valid 1`] = ` }, "aws_lambda_function": { "The-Mighty_Function-01": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "The-Mighty_Function-01-c86057f3", @@ -1130,6 +1145,9 @@ exports[`replace invalid character from function name 1`] = ` }, "aws_lambda_function": { "TheMightyFunction": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "The-Mighty-Function-c86ccf73", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/logger.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/logger.test.ts.snap index e52250432d4..150e21f3747 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/logger.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/logger.test.ts.snap @@ -44,6 +44,9 @@ exports[`inflight function uses a logger 2`] = ` }, "aws_lambda_function": { "Function": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Function-c852aba6", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/on-deploy.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/on-deploy.test.ts.snap index a7074a0fc0a..4e843f231f2 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/on-deploy.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/on-deploy.test.ts.snap @@ -36,6 +36,9 @@ exports[`create an OnDeploy 1`] = ` }, "aws_lambda_function": { "my_on_deploy_Function_59669FC0": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Function-c88c90bc", @@ -290,6 +293,9 @@ exports[`execute OnDeploy after other resources 1`] = ` }, "aws_lambda_function": { "my_on_deploy_Function_59669FC0": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Function-c88c90bc", @@ -587,6 +593,9 @@ exports[`execute OnDeploy before other resources 1`] = ` }, "aws_lambda_function": { "my_on_deploy_Function_59669FC0": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Function-c88c90bc", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/queue.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/queue.test.ts.snap index e82e0b294cd..c0745d8fb77 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/queue.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/queue.test.ts.snap @@ -264,6 +264,9 @@ exports[`queue with a consumer function 2`] = ` }, "aws_lambda_function": { "Queue-SetConsumer-c5395e41": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Queue-SetConsumer-c5395e41-c80c3bf7", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/schedule.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/schedule.test.ts.snap index da95ee388ae..ca8105a3f9a 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/schedule.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/schedule.test.ts.snap @@ -39,6 +39,9 @@ exports[`schedule behavior with cron 1`] = ` }, "aws_lambda_function": { "Schedule-OnTick-c5395e41": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Schedule-OnTick-c5395e41-c861b8f8", @@ -329,6 +332,9 @@ exports[`schedule behavior with rate 1`] = ` }, "aws_lambda_function": { "Schedule-OnTick-c5395e41": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Schedule-OnTick-c5395e41-c861b8f8", @@ -634,6 +640,9 @@ exports[`schedule with two functions 1`] = ` }, "aws_lambda_function": { "Schedule-OnTick-0a615500": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Schedule-OnTick-0a615500-c8fd8480", @@ -653,6 +662,9 @@ exports[`schedule with two functions 1`] = ` }, }, "Schedule-OnTick-7b33bcba": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Schedule-OnTick-7b33bcba-c86000d7", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/table.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/table.test.ts.snap index 33b905f11ab..685d968ba38 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/table.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/table.test.ts.snap @@ -82,6 +82,9 @@ exports[`function with a table binding 2`] = ` }, "aws_lambda_function": { "Function": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_e7245baa": "\${aws_dynamodb_table.Table.name}", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/tokens.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/tokens.test.ts.snap index 9079917bca1..dea6594c468 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/tokens.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/tokens.test.ts.snap @@ -75,6 +75,9 @@ exports[`captures tokens 2`] = ` }, "aws_lambda_function": { "Api_Api-OnRequest-c5395e41_37F21C2B": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Api-OnRequest-c5395e41-c8f26cae", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/topic.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/topic.test.ts.snap index a03fdbbc268..2dbdc430f66 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/topic.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/topic.test.ts.snap @@ -384,6 +384,9 @@ exports[`topic with subscriber function 2`] = ` }, "aws_lambda_function": { "Topic-OnMessage-c5395e41": { + "architectures": [ + "arm64", + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Topic-OnMessage-c5395e41-c8eb4431", diff --git a/tools/hangar/__snapshots__/plugins.ts.snap b/tools/hangar/__snapshots__/plugins.ts.snap index 22c1a316acd..525d042a936 100644 --- a/tools/hangar/__snapshots__/plugins.ts.snap +++ b/tools/hangar/__snapshots__/plugins.ts.snap @@ -86,6 +86,9 @@ exports[`Plugin examples > AWS target plugins > permission-boundary.js 1`] = ` "uniqueId": "cloudQueue-SetConsumer-cdafee6e", }, }, + "architectures": [ + "arm64", + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "\${aws_s3_bucket.cloudBucket.bucket}", @@ -329,6 +332,9 @@ exports[`Plugin examples > AWS target plugins > replicate-s3.js 1`] = ` "uniqueId": "cloudQueue-SetConsumer-cdafee6e", }, }, + "architectures": [ + "arm64", + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "\${aws_s3_bucket.cloudBucket.bucket}", @@ -620,6 +626,9 @@ exports[`Plugin examples > AWS target plugins > tf-backend.js > azurerm backend "uniqueId": "cloudQueue-SetConsumer-cdafee6e", }, }, + "architectures": [ + "arm64", + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "\${aws_s3_bucket.cloudBucket.bucket}", @@ -793,6 +802,9 @@ exports[`Plugin examples > AWS target plugins > tf-backend.js > gcp backend 1`] "uniqueId": "cloudQueue-SetConsumer-cdafee6e", }, }, + "architectures": [ + "arm64", + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "\${aws_s3_bucket.cloudBucket.bucket}", @@ -966,6 +978,9 @@ exports[`Plugin examples > AWS target plugins > tf-backend.js > s3 backend 1`] = "uniqueId": "cloudQueue-SetConsumer-cdafee6e", }, }, + "architectures": [ + "arm64", + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "\${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md index 0141a75bc7e..335a6d1c24c 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md @@ -204,6 +204,9 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util }) { "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", @@ -230,6 +233,9 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util }) { "uniqueId": "testhttpdeleteandhttpfetchcanpreformacalltoanapi_Handler_98044CDF" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c897cd38", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md index 7a8fbf09690..5818b54c3e1 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md @@ -208,6 +208,9 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util }) { "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", @@ -234,6 +237,9 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util }) { "uniqueId": "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_9FEA2521" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c838ce37", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md index b9362388a33..4b20ed3078f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md @@ -296,6 +296,9 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $path }) { "uniqueId": "cloudApi_cloudApi-OnRequest-3fc9280c_5DA20E7A" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-3fc9280c-c8d3ecf9", @@ -322,6 +325,9 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $path }) { "uniqueId": "cloudApi_cloudApi-OnRequest-86898773_701F5CA7" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-86898773-c8ed6547", @@ -348,6 +354,9 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $path }) { "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", @@ -374,6 +383,9 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $path }) { "uniqueId": "testhttpfetchcanpreformacalltoanapitoCONNECTHEADandOPTIONS_Handler_E8EF5111" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8f5c667", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md index 169eb97bfd4..be3cba4e1ae 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md @@ -205,6 +205,9 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", @@ -231,6 +234,9 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, "uniqueId": "testhttppatchandhttpfetchcanpreformacalltoanapi_Handler_185CBA02" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c89df580", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md index 9e381e5b6e8..cb811fc0ab7 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md @@ -204,6 +204,9 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util, $std_ "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", @@ -230,6 +233,9 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util, $std_ "uniqueId": "testhttppostandhttpfetchcanpreformacalltoanapi_Handler_C4853DBD" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c88947b5", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md index dc73d56b93f..efdb2f7338f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md @@ -209,6 +209,9 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", @@ -235,6 +238,9 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, "uniqueId": "testhttpputandhttpfetchcanpreformacalltoanapi_Handler_2B7157C1" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8e4b12f", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_file.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_file.w_compile_tf-aws.md index 26ddd121794..eba835502c9 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_file.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_file.w_compile_tf-aws.md @@ -93,6 +93,9 @@ module.exports = function({ $b }) { "uniqueId": "testaddObject_Handler_44ECC49C" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_object.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_object.w_compile_tf-aws.md index 72e0428646f..701f2e3f535 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_object.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_object.w_compile_tf-aws.md @@ -93,6 +93,9 @@ module.exports = function({ $b, $jsonObj1, $std_Json }) { "uniqueId": "testaddObject_Handler_44ECC49C" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/bucket_list.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/bucket_list.w_compile_tf-aws.md index 66e6d72607f..19e6a1a8aa4 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/bucket_list.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/bucket_list.w_compile_tf-aws.md @@ -107,6 +107,9 @@ module.exports = function({ $b }) { "uniqueId": "testlist_Handler_58856559" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md index 4c377072322..67c0f95a53a 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md @@ -108,6 +108,9 @@ module.exports = function({ $b }) { "uniqueId": "testdelete_Handler_3DFCE06A" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md index 758ab035a57..10e2873e77c 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md @@ -497,6 +497,9 @@ module.exports = function({ $Source, $b, $checkHitCount, $util_Util, $wait }) { "uniqueId": "cloudBucket_cloudBucket-oncreate-OnMessage-42558af0_C94BBC24" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -527,6 +530,9 @@ module.exports = function({ $Source, $b, $checkHitCount, $util_Util, $wait }) { "uniqueId": "cloudBucket_cloudBucket-oncreate-OnMessage-47274dc3_A5F9D3AA" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -557,6 +563,9 @@ module.exports = function({ $Source, $b, $checkHitCount, $util_Util, $wait }) { "uniqueId": "cloudBucket_cloudBucket-ondelete-OnMessage-4b0506cb_9EE796E8" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -587,6 +596,9 @@ module.exports = function({ $Source, $b, $checkHitCount, $util_Util, $wait }) { "uniqueId": "cloudBucket_cloudBucket-ondelete-OnMessage-cd5c55f4_57A0B983" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -617,6 +629,9 @@ module.exports = function({ $Source, $b, $checkHitCount, $util_Util, $wait }) { "uniqueId": "cloudBucket_cloudBucket-onupdate-OnMessage-39d17a37_8E8F6CE8" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -647,6 +662,9 @@ module.exports = function({ $Source, $b, $checkHitCount, $util_Util, $wait }) { "uniqueId": "cloudBucket_cloudBucket-onupdate-OnMessage-ff1f5e53_791EE56B" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -677,6 +695,9 @@ module.exports = function({ $Source, $b, $checkHitCount, $util_Util, $wait }) { "uniqueId": "hitCountisincrementedaccordingtothebucketevent_Handler_29DEB1F6" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/exists.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/exists.w_compile_tf-aws.md index 740ff4fa9d5..793de52a4a7 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/exists.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/exists.w_compile_tf-aws.md @@ -97,6 +97,9 @@ module.exports = function({ $b }) { "uniqueId": "testexists_Handler_D37905B7" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md index de9a0cb42f9..03bf06b5e24 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md @@ -106,6 +106,9 @@ module.exports = function({ $http_Util, $privateBucket, $publicBucket, $util_Uti "uniqueId": "testpublicUrl_Handler_E965919F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_7c320eda": "${aws_s3_bucket.publicBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put.w_compile_tf-aws.md index 0ae03909729..2d79779da3b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put.w_compile_tf-aws.md @@ -103,6 +103,9 @@ module.exports = function({ $b }) { "uniqueId": "testput_Handler_724F92D5" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md index 04b78ad53aa..d8de9f8341d 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md @@ -106,6 +106,9 @@ module.exports = function({ $b }) { "uniqueId": "testputJson_Handler_08BF437F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_delete.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_delete.w_compile_tf-aws.md index 22deae5bb51..4064b1a7aba 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_delete.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_delete.w_compile_tf-aws.md @@ -101,6 +101,9 @@ module.exports = function({ $b }) { "uniqueId": "testtryDelete_Handler_C4052A94" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get.w_compile_tf-aws.md index aca4daa7e9f..750f5145f4c 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get.w_compile_tf-aws.md @@ -97,6 +97,9 @@ module.exports = function({ $b }) { "uniqueId": "testtryGet_Handler_EE8DDBD9" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get_json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get_json.w_compile_tf-aws.md index a5597769524..7372dcb229f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get_json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get_json.w_compile_tf-aws.md @@ -101,6 +101,9 @@ module.exports = function({ $b, $std_Json }) { "uniqueId": "testtryGetJson_Handler_A244DB7C" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/dec.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/dec.w_compile_tf-aws.md index df2736e19fd..6fc1094d149 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/dec.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/dec.w_compile_tf-aws.md @@ -170,6 +170,9 @@ module.exports = function({ $counter }) { "uniqueId": "testdec_Handler_BE7C58D4" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -197,6 +200,9 @@ module.exports = function({ $counter }) { "uniqueId": "testkeydec_Handler_4A8C3A6B" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/inc.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/inc.w_compile_tf-aws.md index 43cc979aa84..c4672f1b330 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/inc.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/inc.w_compile_tf-aws.md @@ -180,6 +180,9 @@ module.exports = function({ $counter }) { "uniqueId": "testinc_Handler_5C48B863" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -207,6 +210,9 @@ module.exports = function({ $counter }) { "uniqueId": "testkeyinc_Handler_15600574" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/initial.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/initial.w_compile_tf-aws.md index 0cc14cfd77b..db376ae9827 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/initial.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/initial.w_compile_tf-aws.md @@ -238,6 +238,9 @@ module.exports = function({ $counterC }) { "uniqueId": "testinitialdefault_Handler_CE963B96" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_220d28dd": "${aws_dynamodb_table.counterA.name}", @@ -265,6 +268,9 @@ module.exports = function({ $counterC }) { "uniqueId": "testinitialnegative-value_Handler_C5E9E480" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_4795370d": "${aws_dynamodb_table.counterC.name}", @@ -292,6 +298,9 @@ module.exports = function({ $counterC }) { "uniqueId": "testinitialpositive-value_Handler_473ACDB1" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_96df6c3c": "${aws_dynamodb_table.counterB.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/peek.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/peek.w_compile_tf-aws.md index d07ac1a5a1f..eadea18a76d 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/peek.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/peek.w_compile_tf-aws.md @@ -164,6 +164,9 @@ module.exports = function({ $c }) { "uniqueId": "testkeypeek_Handler_03F3EFDE" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -191,6 +194,9 @@ module.exports = function({ $c }) { "uniqueId": "testpeek_Handler_70E78480" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/set.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/set.w_compile_tf-aws.md index 1ef2b566b14..32b532e93db 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/set.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/set.w_compile_tf-aws.md @@ -174,6 +174,9 @@ module.exports = function({ $counter }) { "uniqueId": "testkeyset_Handler_33945E34" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -201,6 +204,9 @@ module.exports = function({ $counter }) { "uniqueId": "testset_Handler_62442DF2" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/invoke.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/invoke.w_compile_tf-aws.md index 56a840e4262..42127dc1079 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/invoke.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/invoke.w_compile_tf-aws.md @@ -143,6 +143,9 @@ module.exports = function({ $f }) { "uniqueId": "cloudFunction" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Function-c8d2eca1", @@ -169,6 +172,9 @@ module.exports = function({ $f }) { "uniqueId": "testinvoke_Handler_A47C4946" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "FUNCTION_NAME_5bb84dfa": "${aws_lambda_function.cloudFunction.arn}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/logging.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/logging.w_compile_tf-aws.md index dbd4ae18d99..ae66d8fa290 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/logging.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/logging.w_compile_tf-aws.md @@ -205,6 +205,9 @@ module.exports = function({ }) { "uniqueId": "f1" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "f1-c8545025", @@ -231,6 +234,9 @@ module.exports = function({ }) { "uniqueId": "f2" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "FUNCTION_NAME_09b8c606": "${aws_lambda_function.f1.arn}", @@ -258,6 +264,9 @@ module.exports = function({ }) { "uniqueId": "testlogging_Handler_2002EF98" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "FUNCTION_NAME_0300817a": "${aws_lambda_function.f2.arn}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/memory_and_env.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/memory_and_env.w_compile_tf-aws.md index e663edf81e7..95658a3f07f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/memory_and_env.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/memory_and_env.w_compile_tf-aws.md @@ -209,6 +209,9 @@ module.exports = function({ $c, $f1, $f2 }) { "uniqueId": "envfn" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -238,6 +241,9 @@ module.exports = function({ $c, $f1, $f2 }) { "uniqueId": "memoryfn" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -266,6 +272,9 @@ module.exports = function({ $c, $f1, $f2 }) { "uniqueId": "testfunctionwithmemoryandfunctionwithenvcanbeinvoked_Handler_BE0A518F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/abs.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/abs.w_compile_tf-aws.md index c2be631cbcc..771f7e08a0d 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/abs.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/abs.w_compile_tf-aws.md @@ -92,6 +92,9 @@ module.exports = function({ $math_Util, $x, $y }) { "uniqueId": "testinflightabsolute_Handler_DB051761" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c84ad0c4", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acos.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acos.w_compile_tf-aws.md index f3b3ce28e3f..867321f2ac5 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acos.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acos.w_compile_tf-aws.md @@ -109,6 +109,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightarccosine_Handler_506E61C9" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c853dd3e", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acot.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acot.w_compile_tf-aws.md index 81d6c512f91..b56c1c3ee2a 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acot.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acot.w_compile_tf-aws.md @@ -95,6 +95,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightarccotgent_Handler_E7A125FF" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8e6e1b8", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acsc.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acsc.w_compile_tf-aws.md index 74d5ad969f7..26da5650a55 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acsc.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acsc.w_compile_tf-aws.md @@ -102,6 +102,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightarccosecant_Handler_B1D46C37" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c850f94d", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/angular_conversion.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/angular_conversion.w_compile_tf-aws.md index 608005cc570..e6e6e4cb68e 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/angular_conversion.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/angular_conversion.w_compile_tf-aws.md @@ -102,6 +102,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightangularconversions_Handler_70CD171D" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c85ddda6", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asec.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asec.w_compile_tf-aws.md index f4094a4ac22..31cbd1654f4 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asec.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asec.w_compile_tf-aws.md @@ -103,6 +103,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightarccosecant_Handler_B1D46C37" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c850f94d", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asin.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asin.w_compile_tf-aws.md index 83fd15a927b..97f69838e91 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asin.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asin.w_compile_tf-aws.md @@ -109,6 +109,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightarcsine_Handler_7B606063" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8343dcd", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan.w_compile_tf-aws.md index 6ad55651a32..e2e87ce288f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan.w_compile_tf-aws.md @@ -94,6 +94,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightarctangent_Handler_85128CD1" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8657687", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan2.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan2.w_compile_tf-aws.md index a47a72fda56..5170e879159 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan2.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan2.w_compile_tf-aws.md @@ -97,6 +97,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightarctangent2_Handler_412D0A11" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c88af4a6", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/combinations.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/combinations.w_compile_tf-aws.md index 03452d7b013..80199aa49fd 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/combinations.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/combinations.w_compile_tf-aws.md @@ -91,6 +91,9 @@ module.exports = function({ $math_Util, $population, $subset }) { "uniqueId": "testinflightcombinations_Handler_B89BE656" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8a6ff13", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cos.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cos.w_compile_tf-aws.md index 7064c116c5a..6b810342238 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cos.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cos.w_compile_tf-aws.md @@ -96,6 +96,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightcosine_Handler_8C1A066C" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c81ebe2a", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cot.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cot.w_compile_tf-aws.md index e7042c90a24..ef773d64111 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cot.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cot.w_compile_tf-aws.md @@ -94,6 +94,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightcotangent_Handler_93C199E4" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8fc3a88", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/csc.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/csc.w_compile_tf-aws.md index 4cd60533a5f..51b68e4b159 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/csc.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/csc.w_compile_tf-aws.md @@ -98,6 +98,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightcosecant_Handler_0491DCB0" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8baaa0a", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/euler.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/euler.w_compile_tf-aws.md index 0a53dafda99..8c5ee8ac996 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/euler.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/euler.w_compile_tf-aws.md @@ -109,6 +109,9 @@ module.exports = function({ $compoundOneYear, $interest, $math_Util, $value }) { "uniqueId": "testEULER_Handler_7DE24200" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c80e7a9d", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/factorial.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/factorial.w_compile_tf-aws.md index ff0c5f2c6e6..e499aa1b148 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/factorial.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/factorial.w_compile_tf-aws.md @@ -96,6 +96,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightfactorial_Handler_23BDFAA4" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c818ed07", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/fibonacci.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/fibonacci.w_compile_tf-aws.md index 061cc07b96f..0d052bb9389 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/fibonacci.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/fibonacci.w_compile_tf-aws.md @@ -101,6 +101,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightfibonacci_Handler_5DF5857A" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c87dfd42", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/floor_ceil_round.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/floor_ceil_round.w_compile_tf-aws.md index 137b513f7aa..c569a80541d 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/floor_ceil_round.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/floor_ceil_round.w_compile_tf-aws.md @@ -101,6 +101,9 @@ module.exports = function({ $__x_, $__y_, $math_Util, $x, $y }) { "uniqueId": "testinflightfloor--ceil--round_Handler_90E85A3F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8bf255a", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/hypot.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/hypot.w_compile_tf-aws.md index bcab598b7a6..77a62fb0f84 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/hypot.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/hypot.w_compile_tf-aws.md @@ -94,6 +94,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflighthypot_Handler_892C5ACF" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8289cd0", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/median_mode_mean.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/median_mode_mean.w_compile_tf-aws.md index 1cd4d700454..55668d07f49 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/median_mode_mean.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/median_mode_mean.w_compile_tf-aws.md @@ -193,6 +193,9 @@ module.exports = function({ $math_Util, $mean_arr }) { "uniqueId": "testinflightmean_Handler_8EC47095" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c81bc5c0", @@ -219,6 +222,9 @@ module.exports = function({ $math_Util, $mean_arr }) { "uniqueId": "testinflightmedian_Handler_B978E173" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8d95514", @@ -245,6 +251,9 @@ module.exports = function({ $math_Util, $mean_arr }) { "uniqueId": "testinflightmode_Handler_72A19270" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8c7e996", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/min_max.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/min_max.w_compile_tf-aws.md index 2984df6eaab..93e6978a5fa 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/min_max.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/min_max.w_compile_tf-aws.md @@ -92,6 +92,9 @@ module.exports = function({ $math_Util, $myArray }) { "uniqueId": "testinflightmin--max_Handler_7896C0CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c88f3f4b", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/pi.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/pi.w_compile_tf-aws.md index 3ec65b7dbcb..f057e1f1802 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/pi.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/pi.w_compile_tf-aws.md @@ -109,6 +109,9 @@ module.exports = function({ $circumference, $math_Util, $r }) { "uniqueId": "testPI_Handler_129F22B0" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8f48054", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/prime.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/prime.w_compile_tf-aws.md index a6d6691063b..55919c8fe8f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/prime.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/prime.w_compile_tf-aws.md @@ -97,6 +97,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightprimenumbers_Handler_E7E982CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c80a9be6", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/random.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/random.w_compile_tf-aws.md index a56fbb9ae74..399cae762f6 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/random.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/random.w_compile_tf-aws.md @@ -92,6 +92,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightabsolute_Handler_DB051761" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c84ad0c4", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sec.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sec.w_compile_tf-aws.md index 71adb03d9e1..cf0ba5b1cc2 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sec.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sec.w_compile_tf-aws.md @@ -96,6 +96,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightsecant_Handler_72888816" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8dc1a66", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sin.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sin.w_compile_tf-aws.md index e3875f94079..bf26c9b7744 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sin.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sin.w_compile_tf-aws.md @@ -95,6 +95,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightsine_Handler_C32FE4B8" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8977bb8", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sqrt.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sqrt.w_compile_tf-aws.md index f43a0bdb96e..22fbe098cfb 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sqrt.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sqrt.w_compile_tf-aws.md @@ -103,6 +103,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflightsquareroot_Handler_2121E9F7" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c88a288d", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tan.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tan.w_compile_tf-aws.md index 715d356c49e..aec07e7e5ec 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tan.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tan.w_compile_tf-aws.md @@ -94,6 +94,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testinflighttangent_Handler_C5A37FFB" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8879d07", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tau.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tau.w_compile_tf-aws.md index 9d51deab130..8311b24fdf9 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tau.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tau.w_compile_tf-aws.md @@ -94,6 +94,9 @@ module.exports = function({ $math_Util }) { "uniqueId": "testTAU_Handler_FB9BAA33" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c86e3343", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/on_deploy/execute_after.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/on_deploy/execute_after.w_compile_tf-aws.md index 0e92e500087..59ffae740e4 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/on_deploy/execute_after.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/on_deploy/execute_after.w_compile_tf-aws.md @@ -237,6 +237,9 @@ module.exports = function({ $counter }) { "uniqueId": "init1_Function_9744E65A" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -264,6 +267,9 @@ module.exports = function({ $counter }) { "uniqueId": "init2_Function_C6177D5D" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -291,6 +297,9 @@ module.exports = function({ $counter }) { "uniqueId": "testcounter_Handler_9843F4E3" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/pop.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/pop.w_compile_tf-aws.md index 72bd5001855..0a8e1db99b1 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/pop.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/pop.w_compile_tf-aws.md @@ -97,6 +97,9 @@ module.exports = function({ $q }) { "uniqueId": "testpop_Handler_595175BF" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "QUEUE_URL_31e95cbd": "${aws_sqs_queue.cloudQueue.url}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/purge.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/purge.w_compile_tf-aws.md index be5736b369b..a030a6076e8 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/purge.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/purge.w_compile_tf-aws.md @@ -114,6 +114,9 @@ module.exports = function({ $q, $std_Duration, $util_Util }) { "uniqueId": "testpurge_Handler_F7A5D0E5" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "QUEUE_URL_31e95cbd": "${aws_sqs_queue.cloudQueue.url}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/set_consumer.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/set_consumer.w_compile_tf-aws.md index e202b706d0d..cfaad2bfdfc 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/set_consumer.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/set_consumer.w_compile_tf-aws.md @@ -197,6 +197,9 @@ module.exports = function({ }) { "uniqueId": "cloudQueue-SetConsumer-cdafee6e" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -224,6 +227,9 @@ module.exports = function({ }) { "uniqueId": "testsetConsumer_Handler_A97FE23F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/schedule/on_tick.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/schedule/on_tick.w_compile_tf-aws.md index f71300abeab..616fec90ca8 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/schedule/on_tick.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/schedule/on_tick.w_compile_tf-aws.md @@ -269,6 +269,9 @@ module.exports = function({ $c1, $c2, $std_Duration, $util_Util }) { "uniqueId": "from_cron-OnTick-cdafee6e" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_bca69a1d": "${aws_dynamodb_table.c1.name}", @@ -296,6 +299,9 @@ module.exports = function({ $c1, $c2, $std_Duration, $util_Util }) { "uniqueId": "from_rate-OnTick-86898773" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_7ba9f967": "${aws_dynamodb_table.c2.name}", @@ -323,6 +329,9 @@ module.exports = function({ $c1, $c2, $std_Duration, $util_Util }) { "uniqueId": "ontickiscalledbothforrateandcronschedules_Handler_B4B8DF58" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_7ba9f967": "${aws_dynamodb_table.c2.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md index cfeb2f11073..14c22e0564b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md @@ -854,6 +854,9 @@ module.exports = function({ }) { "uniqueId": "testat_Handler_E4F013BC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c858faac", @@ -880,6 +883,9 @@ module.exports = function({ }) { "uniqueId": "testconcatArray_Handler_F66848AE" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8ba9aa0", @@ -906,6 +912,9 @@ module.exports = function({ }) { "uniqueId": "testconcatMutArray_Handler_40D88E89" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8e5a138", @@ -932,6 +941,9 @@ module.exports = function({ }) { "uniqueId": "testcontains_Handler_F60865D9" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8e953a0", @@ -958,6 +970,9 @@ module.exports = function({ }) { "uniqueId": "testcopyMut_Handler_851E24B4" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8b1cc09", @@ -984,6 +999,9 @@ module.exports = function({ }) { "uniqueId": "testcopy_Handler_27A14A0E" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c802a3d7", @@ -1010,6 +1028,9 @@ module.exports = function({ }) { "uniqueId": "testindexOfArray_Handler_DB3A81F5" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c88fa7a3", @@ -1036,6 +1057,9 @@ module.exports = function({ }) { "uniqueId": "testindexOf_Handler_BD91EA6F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c80be453", @@ -1062,6 +1086,9 @@ module.exports = function({ }) { "uniqueId": "testinsert_Handler_20BB87F8" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8bd9541", @@ -1088,6 +1115,9 @@ module.exports = function({ }) { "uniqueId": "testjoinWithDefaultSeparator_Handler_7AE1258D" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c833ed71", @@ -1114,6 +1144,9 @@ module.exports = function({ }) { "uniqueId": "testjoin_Handler_6AC62A8E" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8a46f15", @@ -1140,6 +1173,9 @@ module.exports = function({ }) { "uniqueId": "testlastIndexOf_Handler_FFB2061F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c84609d0", @@ -1166,6 +1202,9 @@ module.exports = function({ }) { "uniqueId": "testlength_Handler_BFD8933F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8e0ccbd", @@ -1192,6 +1231,9 @@ module.exports = function({ }) { "uniqueId": "testpushAndPop_Handler_EAC0C8FF" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8b6e896", @@ -1218,6 +1260,9 @@ module.exports = function({ }) { "uniqueId": "testset_Handler_ADDF1A01" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8240bc7", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/bool.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/bool.w_compile_tf-aws.md index 523c0a8bb2f..d2eb1b0fab7 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/bool.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/bool.w_compile_tf-aws.md @@ -101,6 +101,9 @@ module.exports = function({ $PARSE_ERROR, $std_Boolean, $std_Json }) { "uniqueId": "testfromJson_Handler_ACD6C987" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8d3ce6e", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/datetime.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/datetime.w_compile_tf-aws.md index 1559c4a64b6..baff0200333 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/datetime.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/datetime.w_compile_tf-aws.md @@ -112,6 +112,9 @@ module.exports = function({ $_d4_toUtc____hours, $d4_hours, $d4_timezone, $math_ "uniqueId": "testinflightdatetime_Handler_CCA19CA1" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8211bab", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/duration.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/duration.w_compile_tf-aws.md index 8be7f4eb9c6..2c882bee5aa 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/duration.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/duration.w_compile_tf-aws.md @@ -110,6 +110,9 @@ module.exports = function({ $std_Duration }) { "uniqueId": "testduration_Handler_50E6E252" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8eae108", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md index 8148cf0ba1a..3590b41a4d4 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md @@ -196,6 +196,9 @@ module.exports = function({ $std_Json }) { "uniqueId": "testsetAt_Handler_51015029" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c841d86c", @@ -222,6 +225,9 @@ module.exports = function({ $std_Json }) { "uniqueId": "testset_Handler_ADDF1A01" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8240bc7", @@ -248,6 +254,9 @@ module.exports = function({ $std_Json }) { "uniqueId": "teststringify_Handler_2E93A8A7" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c84b217d", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/number.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/number.w_compile_tf-aws.md index 1af274d6a3c..eae3c68673a 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/number.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/number.w_compile_tf-aws.md @@ -138,6 +138,9 @@ module.exports = function({ $std_Number }) { "uniqueId": "testfromJson_Handler_CA86BEEA" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c89f3277", @@ -164,6 +167,9 @@ module.exports = function({ $std_Number }) { "uniqueId": "testfromStr_Handler_03ACB5A8" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8fdb1d1", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/string.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/string.w_compile_tf-aws.md index 9da0ebf091e..8596c92aad3 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/string.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/string.w_compile_tf-aws.md @@ -752,6 +752,9 @@ module.exports = function({ }) { "uniqueId": "testat_Handler_E4F013BC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c858faac", @@ -778,6 +781,9 @@ module.exports = function({ }) { "uniqueId": "testconcat_Handler_E184D86A" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c869963c", @@ -804,6 +810,9 @@ module.exports = function({ }) { "uniqueId": "testcontains_Handler_F60865D9" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8e953a0", @@ -830,6 +839,9 @@ module.exports = function({ }) { "uniqueId": "testendsWith_Handler_9BA42993" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8465c4f", @@ -856,6 +868,9 @@ module.exports = function({ }) { "uniqueId": "testfromJson_Handler_CA86BEEA" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c89f3277", @@ -882,6 +897,9 @@ module.exports = function({ }) { "uniqueId": "testindexOf_Handler_BD91EA6F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c80be453", @@ -908,6 +926,9 @@ module.exports = function({ }) { "uniqueId": "testlength_Handler_BFD8933F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8e0ccbd", @@ -934,6 +955,9 @@ module.exports = function({ }) { "uniqueId": "testlowercase_Handler_EAADE79D" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c86ac32a", @@ -960,6 +984,9 @@ module.exports = function({ }) { "uniqueId": "testreplace_Handler_83836186" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c876baf0", @@ -986,6 +1013,9 @@ module.exports = function({ }) { "uniqueId": "testsplit_Handler_4FAF6D9E" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8e87cf7", @@ -1012,6 +1042,9 @@ module.exports = function({ }) { "uniqueId": "teststartsWith_Handler_C8752245" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8f6a537", @@ -1038,6 +1071,9 @@ module.exports = function({ }) { "uniqueId": "testsubstring_Handler_E6617207" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c803a722", @@ -1064,6 +1100,9 @@ module.exports = function({ }) { "uniqueId": "testtrim_Handler_403ED8AD" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c81cc785", @@ -1090,6 +1129,9 @@ module.exports = function({ }) { "uniqueId": "testuppercase_Handler_352FFA2E" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c882dfb8", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md index c86032de1df..19d032232fd 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md @@ -139,6 +139,9 @@ module.exports = function({ $_marioInfo___gender__, $_marioInfo___role__, $_peac "uniqueId": "testaddRow_Handler_2806A65E" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_d5d44f18": "${aws_dynamodb_table.exTable.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md index 78c9801f50b..7799f58d5f5 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md @@ -121,6 +121,9 @@ module.exports = function({ $std_String, $table }) { "uniqueId": "testlist_Handler_58856559" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_d5d44f18": "${aws_dynamodb_table.exTable.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/topic/on_message.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/topic/on_message.w_compile_tf-aws.md index f010d9a7374..5a30e24d52a 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/topic/on_message.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/topic/on_message.w_compile_tf-aws.md @@ -232,6 +232,9 @@ module.exports = function({ }) { "uniqueId": "cloudTopic-OnMessage-86898773" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -259,6 +262,9 @@ module.exports = function({ }) { "uniqueId": "cloudTopic-OnMessage-cdafee6e" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -286,6 +292,9 @@ module.exports = function({ }) { "uniqueId": "testonMessage_Handler_1EC8F213" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/base64.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/base64.w_compile_tf-aws.md index 464eceb9573..8ad1cb25a80 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/base64.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/base64.w_compile_tf-aws.md @@ -99,6 +99,9 @@ module.exports = function({ $util_Util }) { "uniqueId": "testinflightbase64_Handler_31E9772F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c853d8cf", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/env.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/env.w_compile_tf-aws.md index 469d2e656bb..c778ddcf9c2 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/env.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/env.w_compile_tf-aws.md @@ -93,6 +93,9 @@ module.exports = function({ $NIL, $RANDOM, $util_Util }) { "uniqueId": "testuseutilfrominflight_Handler_6C871F39" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8904ffd", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/nanoid.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/nanoid.w_compile_tf-aws.md index 5b44c717714..f6ba4dbeef7 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/nanoid.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/nanoid.w_compile_tf-aws.md @@ -104,6 +104,9 @@ module.exports = function({ $util_Util }) { "uniqueId": "testinflightnanoid_Handler_154ED1B9" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c864f292", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sha256.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sha256.w_compile_tf-aws.md index 90063c8776b..2b56ad8fa47 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sha256.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sha256.w_compile_tf-aws.md @@ -92,6 +92,9 @@ module.exports = function({ $util_Util }) { "uniqueId": "testinflightsha256_Handler_A03FE0BD" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8b74430", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sleep.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sleep.w_compile_tf-aws.md index 7eadd45a6b2..ba4d7d4dc3e 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sleep.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sleep.w_compile_tf-aws.md @@ -110,6 +110,9 @@ module.exports = function({ }) { "uniqueId": "testsleep100miliseconds_Handler_F390CA22" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8e32fa2", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/uuidv4.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/uuidv4.w_compile_tf-aws.md index 3e34fd9cecd..58684f11e59 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/uuidv4.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/uuidv4.w_compile_tf-aws.md @@ -119,6 +119,9 @@ module.exports = function({ }) { "uniqueId": "testinflightuuidv4_Handler_3A34A54F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c86b3dcf", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md index 5cc0a971eca..2ef82ed6d82 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md @@ -365,6 +365,9 @@ module.exports = function({ }) { "uniqueId": "testreturnsaftersometimewaiting_Handler_436A90C3" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -392,6 +395,9 @@ module.exports = function({ }) { "uniqueId": "testreturnsfalsegoestotimeout_Handler_A7F9DD9D" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c857ac6d", @@ -418,6 +424,9 @@ module.exports = function({ }) { "uniqueId": "testreturnstrueimmediately_Handler_0210037F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c85e05f6", @@ -444,6 +453,9 @@ module.exports = function({ }) { "uniqueId": "testsettingprops_Handler_8BB7DC9B" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -471,6 +483,9 @@ module.exports = function({ }) { "uniqueId": "testthrowingexceptionfrompredicateshouldthrowimmediately_Handler_B4BADFD9" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/two_websites.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/two_websites.w_compile_tf-aws.md index f5e645d79e2..19b0d4ce031 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/two_websites.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/two_websites.w_compile_tf-aws.md @@ -292,6 +292,9 @@ module.exports = function({ $http_Util, $w1_url, $w2_url }) { "uniqueId": "testdeployingtwowebsites_Handler_DDBE7E21" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8683851", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/website.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/website.w_compile_tf-aws.md index 2d2ebf62201..02bca8431ac 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/website.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/website.w_compile_tf-aws.md @@ -209,6 +209,9 @@ module.exports = function({ }) { "uniqueId": "testaccessfilesonthewebsite_Handler_B4D12109" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c867c4e0", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md index b660526126b..8b23a1e46da 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md @@ -311,6 +311,9 @@ module.exports = function({ }) { "uniqueId": "A_cloudApi_cloudApi-OnRequest-73c5308f_E645B0BE" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-73c5308f-c85168bb", @@ -338,6 +341,9 @@ module.exports = function({ }) { "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -365,6 +371,9 @@ module.exports = function({ }) { "uniqueId": "testapiurl_Handler_7D451301" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8315524", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md index 3a10cf262e5..1d408d20842 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md @@ -195,6 +195,9 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", @@ -221,6 +224,9 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8f4f2a1", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md index 38039f28de4..692f349b52f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md @@ -145,6 +145,9 @@ module.exports = function({ }) { "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/assert.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/assert.w_compile_tf-aws.md index 4bec860c0a9..7ac37edfd5c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/assert.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/assert.w_compile_tf-aws.md @@ -105,6 +105,9 @@ module.exports = function({ $s1, $s2 }) { "uniqueId": "testassertworksinflight_Handler_915EA51A" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8a7b0b3", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/asynchronous_model_implicit_await_in_functions.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/asynchronous_model_implicit_await_in_functions.w_compile_tf-aws.md index 3be20c5178e..5e378540b7a 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/asynchronous_model_implicit_await_in_functions.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/asynchronous_model_implicit_await_in_functions.w_compile_tf-aws.md @@ -138,6 +138,9 @@ module.exports = function({ $strToStr }) { "uniqueId": "func" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "FUNCTION_NAME_bc9a3a6d": "${aws_lambda_function.strToStr.arn}", @@ -165,6 +168,9 @@ module.exports = function({ $strToStr }) { "uniqueId": "strToStr" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "strToStr-c8d5081f", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii.w_compile_tf-aws.md index d5806b2e55e..51f1b7c5191 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii.w_compile_tf-aws.md @@ -91,6 +91,9 @@ module.exports = function({ $greeting }) { "uniqueId": "testsayHello_Handler_98B5E136" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c887876f", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii_path.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii_path.w_compile_tf-aws.md index b61519b50ee..6073027472f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii_path.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii_path.w_compile_tf-aws.md @@ -91,6 +91,9 @@ module.exports = function({ $greeting }) { "uniqueId": "testsayHello_Handler_98B5E136" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c887876f", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md index 1fcfed6dc7c..48307aa2cc8 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md @@ -249,6 +249,9 @@ module.exports = function({ }) { "uniqueId": "file1Store_cloudOnDeploy_Function_9539541F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_94dc4b3e": "${aws_s3_bucket.file1Store_cloudBucket_86CE87B1.bucket}", @@ -276,6 +279,9 @@ module.exports = function({ }) { "uniqueId": "testadddatatostore_Handler_19066842" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_94dc4b3e": "${aws_s3_bucket.file1Store_cloudBucket_86CE87B1.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bucket_events.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bucket_events.w_compile_tf-aws.md index cc59d3ac501..922e5ea2ac0 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bucket_events.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bucket_events.w_compile_tf-aws.md @@ -446,6 +446,9 @@ module.exports = function({ $b }) { "uniqueId": "b_b-oncreate-OnMessage-1d3b2039_20E46F00" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "b-oncreate-OnMessage-1d3b2039-c8a821e7", @@ -472,6 +475,9 @@ module.exports = function({ $b }) { "uniqueId": "b_b-oncreate-OnMessage-a729fee3_49378F05" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_73fd1ead": "${aws_s3_bucket.other.bucket}", @@ -499,6 +505,9 @@ module.exports = function({ $b }) { "uniqueId": "b_b-ondelete-OnMessage-4b2cd998_0DD64A53" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_73fd1ead": "${aws_s3_bucket.other.bucket}", @@ -526,6 +535,9 @@ module.exports = function({ $b }) { "uniqueId": "b_b-ondelete-OnMessage-b83da9f8_75B42E31" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "b-ondelete-OnMessage-b83da9f8-c80fdb5a", @@ -552,6 +564,9 @@ module.exports = function({ $b }) { "uniqueId": "b_b-onupdate-OnMessage-2dce4026_5DC58D89" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "b-onupdate-OnMessage-2dce4026-c8164eef", @@ -578,6 +593,9 @@ module.exports = function({ $b }) { "uniqueId": "b_b-onupdate-OnMessage-b03e6c67_09F5FCDD" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_73fd1ead": "${aws_s3_bucket.other.bucket}", @@ -605,6 +623,9 @@ module.exports = function({ $b }) { "uniqueId": "other_other-oncreate-OnMessage-2b1e14fd_9EE2200F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "other-oncreate-OnMessage-2b1e14fd-c8a9cff0", @@ -631,6 +652,9 @@ module.exports = function({ $b }) { "uniqueId": "other_other-ondelete-OnMessage-9bef38d2_7F9E1372" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "other-ondelete-OnMessage-9bef38d2-c8c0555a", @@ -657,6 +681,9 @@ module.exports = function({ $b }) { "uniqueId": "other_other-onupdate-OnMessage-bffa2a20_0A9CE94D" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "other-onupdate-OnMessage-bffa2a20-c85595aa", @@ -683,6 +710,9 @@ module.exports = function({ $b }) { "uniqueId": "testputtinganddeletingfromabuckettotriggerbucketevents_Handler_31F6B48C" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_34279ead": "${aws_s3_bucket.b.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bucket_keys.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bucket_keys.w_compile_tf-aws.md index c7292f05634..0184448ea87 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bucket_keys.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bucket_keys.w_compile_tf-aws.md @@ -101,6 +101,9 @@ module.exports = function({ $b }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md index 280715395c3..30c783cb0b6 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md @@ -138,6 +138,9 @@ module.exports = function({ }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8f4f2a1", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md index 6730f9d9e0d..8241b751c2e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md @@ -150,6 +150,9 @@ module.exports = function({ }) { "uniqueId": "testcallingdifferenttypesofinflights_Handler_F0BAE661" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8f324e0", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md index 5498e62ae92..1a37cb45cf6 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md @@ -99,6 +99,9 @@ module.exports = function({ $Object_keys_myMap__length, $__bang__in___arrOfMap_a "uniqueId": "testcapture_containers_Handler_C1B42BA9" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c876b763", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_in_binary.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_in_binary.w_compile_tf-aws.md index 2148200f97b..a4ef9337aef 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_in_binary.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_in_binary.w_compile_tf-aws.md @@ -93,6 +93,9 @@ module.exports = function({ $b, $x }) { "uniqueId": "testbinaryexpressions_Handler_BDFD91F0" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md index be6bad42217..ce2b816910f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md @@ -112,6 +112,9 @@ module.exports = function({ $handler }) { "uniqueId": "testmain_Handler_242B2607" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8d10438", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_primitives.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_primitives.w_compile_tf-aws.md index 10b4fa5abaf..e05626a1971 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_primitives.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_primitives.w_compile_tf-aws.md @@ -105,6 +105,9 @@ module.exports = function({ $myBool, $myDur_hours, $myDur_minutes, $myDur_second "uniqueId": "cloudFunction" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Function-c8d2eca1", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_reassigable_class_field.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_reassigable_class_field.w_compile_tf-aws.md index d939fcbb293..5f4450dff22 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_reassigable_class_field.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_reassigable_class_field.w_compile_tf-aws.md @@ -178,6 +178,9 @@ module.exports = function({ }) { "uniqueId": "testmain_Handler_242B2607" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_ce72b88b": "${aws_s3_bucket.KeyValueStore_cloudBucket_D9D365FD.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_reassignable.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_reassignable.w_compile_tf-aws.md index 661c17d7b59..cda5ac85f2c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_reassignable.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_reassignable.w_compile_tf-aws.md @@ -109,6 +109,9 @@ module.exports = function({ $handler }) { "uniqueId": "testmain_Handler_242B2607" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8d10438", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_and_data.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_and_data.w_compile_tf-aws.md index 3f6164976d5..f7305c0fecb 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_and_data.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_and_data.w_compile_tf-aws.md @@ -94,6 +94,9 @@ module.exports = function({ $data_size, $queue, $res }) { "uniqueId": "testresourceanddata_Handler_1086F74C" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_with_no_inflight.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_with_no_inflight.w_compile_tf-aws.md index 9e68d82aeae..ce8b39b5769 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_with_no_inflight.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_with_no_inflight.w_compile_tf-aws.md @@ -129,6 +129,9 @@ module.exports = function({ }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_5b05aa10": "${aws_dynamodb_table.A_cloudCounter_1CAB7DAD.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md index a4f0e75048e..80ac4b9c51e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md @@ -250,6 +250,9 @@ module.exports = function({ }) { "uniqueId": "testinflightclass_Handler_F51916C9" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8ed8f29", @@ -277,6 +280,9 @@ module.exports = function({ }) { "uniqueId": "testinflightglobals_Handler_386DF115" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8ecc6d5", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md index f47a83d9902..35b710e96e3 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md @@ -277,6 +277,9 @@ module.exports = function({ $headers }) { "uniqueId": "AnotherFunction" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_0c557d45": "${aws_s3_bucket.PrivateBucket.bucket}", @@ -306,6 +309,9 @@ module.exports = function({ $headers }) { "uniqueId": "cloudApi_cloudApi-OnRequest-86898773_701F5CA7" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-86898773-c8ed6547", @@ -332,6 +338,9 @@ module.exports = function({ $headers }) { "uniqueId": "cloudFunction" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_0c557d45": "${aws_s3_bucket.PrivateBucket.bucket}", @@ -361,6 +370,9 @@ module.exports = function({ $headers }) { "uniqueId": "cloudQueue-SetConsumer-cdafee6e" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_0c557d45": "${aws_s3_bucket.PrivateBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/class.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/class.w_compile_tf-aws.md index d5dfaa86102..00a508bcae8 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/class.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/class.w_compile_tf-aws.md @@ -447,6 +447,9 @@ module.exports = function({ $PaidStudent }) { "uniqueId": "testaccessinflightfield_Handler_39158E6E" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c84be49a", @@ -473,6 +476,9 @@ module.exports = function({ $PaidStudent }) { "uniqueId": "testcheckderivedclassinstancevariables_Handler_6847A085" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c87bcb74", @@ -499,6 +505,9 @@ module.exports = function({ $PaidStudent }) { "uniqueId": "testdevivedclassinitbodyhappensaftersuper_Handler_8CA21B73" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8edbb48", @@ -525,6 +534,9 @@ module.exports = function({ $PaidStudent }) { "uniqueId": "testinflightsuperconstructor_Handler_C698F98B" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c81ddf4a", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/closure_class.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/closure_class.w_compile_tf-aws.md index 7475a3e1cf2..aef512e9d3b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/closure_class.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/closure_class.w_compile_tf-aws.md @@ -113,6 +113,9 @@ module.exports = function({ }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8f4f2a1", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/deep_equality.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/deep_equality.w_compile_tf-aws.md index 74005ea6251..025cda772e9 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/deep_equality.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/deep_equality.w_compile_tf-aws.md @@ -654,6 +654,9 @@ module.exports = function({ $arrayA, $arrayB }) { "uniqueId": "testArraywithdifferentvalues_Handler_2422390C" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c804987d", @@ -680,6 +683,9 @@ module.exports = function({ $arrayA, $arrayB }) { "uniqueId": "testArraywiththesamevalue_Handler_7A26272F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c85bde80", @@ -706,6 +712,9 @@ module.exports = function({ $arrayA, $arrayB }) { "uniqueId": "testJsonwithdifferentvalues_Handler_7CBC98A6" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c81ffded", @@ -732,6 +741,9 @@ module.exports = function({ $arrayA, $arrayB }) { "uniqueId": "testJsonwiththesamevalue_Handler_0A930AF7" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8a70f75", @@ -758,6 +770,9 @@ module.exports = function({ $arrayA, $arrayB }) { "uniqueId": "testMapwithdifferentvalues_Handler_E889ADD0" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8bfa9fd", @@ -784,6 +799,9 @@ module.exports = function({ $arrayA, $arrayB }) { "uniqueId": "testMapwiththesamevalue_Handler_74DC4830" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8e1f849", @@ -810,6 +828,9 @@ module.exports = function({ $arrayA, $arrayB }) { "uniqueId": "testPrimitivetypeswithdifferentvalues_Handler_1CD5AE77" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8339af6", @@ -836,6 +857,9 @@ module.exports = function({ $arrayA, $arrayB }) { "uniqueId": "testPrimitivetypeswiththesamevalue_Handler_E7430682" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8c80713", @@ -862,6 +886,9 @@ module.exports = function({ $arrayA, $arrayB }) { "uniqueId": "testSettypeswithdifferentvalues_Handler_827F38F3" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8f9b754", @@ -888,6 +915,9 @@ module.exports = function({ $arrayA, $arrayB }) { "uniqueId": "testSettypeswiththesamevalue_Handler_16147212" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c80c25d8", @@ -914,6 +944,9 @@ module.exports = function({ $arrayA, $arrayB }) { "uniqueId": "testStructwithdifferentvalues_Handler_A8DC5651" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8546ffd", @@ -940,6 +973,9 @@ module.exports = function({ $arrayA, $arrayB }) { "uniqueId": "testStructwiththesamevalue_Handler_4436CF3A" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8c23fc1", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/double_reference.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/double_reference.w_compile_tf-aws.md index 50011ae6402..0dfd5425de9 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/double_reference.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/double_reference.w_compile_tf-aws.md @@ -145,6 +145,9 @@ module.exports = function({ $initCount }) { "uniqueId": "testhello_Handler_549C38EE" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/doubler.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/doubler.w_compile_tf-aws.md index c8b3874a7ce..e14f1485058 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/doubler.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/doubler.w_compile_tf-aws.md @@ -207,6 +207,9 @@ module.exports = function({ }) { "uniqueId": "Doubler2_cloudFunction_402CDAA3" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Function-c8d4b6f0", @@ -233,6 +236,9 @@ module.exports = function({ }) { "uniqueId": "testf28_Handler_DBBFD2BC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "FUNCTION_NAME_f7db7b1d": "${aws_lambda_function.Doubler2_cloudFunction_402CDAA3.arn}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/enums.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/enums.w_compile_tf-aws.md index c3d038202c6..393cee9118a 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/enums.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/enums.w_compile_tf-aws.md @@ -92,6 +92,9 @@ module.exports = function({ $SomeEnum, $one, $two }) { "uniqueId": "testinflight_Handler_93A83C5E" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c85726ab", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md index 0042d479114..03f930063b1 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md @@ -168,6 +168,9 @@ module.exports = function({ }) { "uniqueId": "testcall_Handler_7902F7E6" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8074088", @@ -194,6 +197,9 @@ module.exports = function({ }) { "uniqueId": "testconsole_Handler_057D9B4E" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8fb077d", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/file_counter.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/file_counter.w_compile_tf-aws.md index c7c4a15f256..d4a1ab16c9f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/file_counter.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/file_counter.w_compile_tf-aws.md @@ -125,6 +125,9 @@ module.exports = function({ $bucket, $counter }) { "uniqueId": "cloudQueue-SetConsumer-cdafee6e" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/for_loop.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/for_loop.w_compile_tf-aws.md index 76b3c6d5335..21269b6a117 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/for_loop.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/for_loop.w_compile_tf-aws.md @@ -112,6 +112,9 @@ module.exports = function({ }) { "uniqueId": "cloudFunction" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Function-c8d2eca1", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/function_returns_function.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/function_returns_function.w_compile_tf-aws.md index dabdf27fbab..e4bcc7f383a 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/function_returns_function.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/function_returns_function.w_compile_tf-aws.md @@ -101,6 +101,9 @@ module.exports = function({ }) { "uniqueId": "testinflightfunctionscanreturnotherinflightfunctions_Handler_7EBEFDAA" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8801592", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/hello.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/hello.w_compile_tf-aws.md index a288d67a543..9b9fb4edc96 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/hello.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/hello.w_compile_tf-aws.md @@ -104,6 +104,9 @@ module.exports = function({ $bucket }) { "uniqueId": "cloudQueue-SetConsumer-cdafee6e" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md index 6bdedc0f54d..ae30f01931a 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md @@ -145,6 +145,9 @@ module.exports = function({ }) { "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight-subscribers.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight-subscribers.w_compile_tf-aws.md index 036ce433c84..033daa79d43 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight-subscribers.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight-subscribers.w_compile_tf-aws.md @@ -151,6 +151,9 @@ module.exports = function({ }) { "uniqueId": "cloudQueue-SetConsumer-86898773" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Queue-SetConsumer-86898773-c8cecfb3", @@ -177,6 +180,9 @@ module.exports = function({ }) { "uniqueId": "cloudTopic-OnMessage-cdafee6e" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Topic-OnMessage-cdafee6e-c814de3f", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md index d163d42b725..d13aa852af7 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md @@ -274,6 +274,9 @@ module.exports = function({ }) { "uniqueId": "testcallstaticmethodofanamespacedtype_Handler_482915F1" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c808c556", @@ -300,6 +303,9 @@ module.exports = function({ }) { "uniqueId": "testcallstaticmethodofaninnerinflightclass_Handler_2C5AF32C" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8d913d8", @@ -326,6 +332,9 @@ module.exports = function({ }) { "uniqueId": "testcallstaticmethodofanouterinflightclass_Handler_2DD5B79F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8dbdf1b", @@ -352,6 +361,9 @@ module.exports = function({ }) { "uniqueId": "testcallstaticmethodofpreflight_Handler_8B40B9DA" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8e286c0", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_as_struct_members.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_as_struct_members.w_compile_tf-aws.md index a9fa753bf46..e4b38c3dcf6 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_as_struct_members.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_as_struct_members.w_compile_tf-aws.md @@ -154,6 +154,9 @@ module.exports = function({ }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8f4f2a1", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_const.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_const.w_compile_tf-aws.md index 5b4a73c12ea..ca254f1bab1 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_const.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_const.w_compile_tf-aws.md @@ -105,6 +105,9 @@ module.exports = function({ $myConst }) { "uniqueId": "testinflightclasscapturesconst_Handler_17207FA8" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8e53a58", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_definitions.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_definitions.w_compile_tf-aws.md index 2feb91375d4..ac5ced691c1 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_definitions.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_definitions.w_compile_tf-aws.md @@ -207,6 +207,9 @@ module.exports = function({ }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8f4f2a1", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inner_capture_mutable.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inner_capture_mutable.w_compile_tf-aws.md index dffa5d18cf5..6bae67ddc15 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inner_capture_mutable.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inner_capture_mutable.w_compile_tf-aws.md @@ -102,6 +102,9 @@ module.exports = function({ }) { "uniqueId": "testinnerinflightclasscaptureimmutable_Handler_8A6A0444" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c88a8b71", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inside_inflight_closure.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inside_inflight_closure.w_compile_tf-aws.md index f541e1ef5cc..f6b4f203704 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inside_inflight_closure.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inside_inflight_closure.w_compile_tf-aws.md @@ -215,6 +215,9 @@ module.exports = function({ }) { "uniqueId": "PreflightClass_cloudFunction_9F7C6688" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_70ca4fed": "${aws_s3_bucket.PreflightClass_cloudBucket_05421049.bucket}", @@ -242,6 +245,9 @@ module.exports = function({ }) { "uniqueId": "testinflightclassinsideclosurecapturesfromclosure_Handler_9491D6BF" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c866c5da", @@ -268,6 +274,9 @@ module.exports = function({ }) { "uniqueId": "testitworks_Handler_FCB0C220" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "FUNCTION_NAME_31bff872": "${aws_lambda_function.PreflightClass_cloudFunction_9F7C6688.arn}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_outside_inflight_closure.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_outside_inflight_closure.w_compile_tf-aws.md index f914c0aa62a..cd8354cc440 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_outside_inflight_closure.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_outside_inflight_closure.w_compile_tf-aws.md @@ -109,6 +109,9 @@ module.exports = function({ }) { "uniqueId": "testinflightclassoutsideinflightclosure_Handler_D7A68A3D" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8046c38", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_structural_interace_handler.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_structural_interace_handler.w_compile_tf-aws.md index 14cb73aafd9..2a98ec0ed59 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_structural_interace_handler.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_structural_interace_handler.w_compile_tf-aws.md @@ -115,6 +115,9 @@ module.exports = function({ }) { "uniqueId": "teststructureinterfacetypesforhandle_Handler_2DA6D9F8" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c83718d0", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_without_init.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_without_init.w_compile_tf-aws.md index 3e01098e03e..28c12f0ac60 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_without_init.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_without_init.w_compile_tf-aws.md @@ -101,6 +101,9 @@ module.exports = function({ }) { "uniqueId": "testinflightclasswithoutinit_Handler_26AF0424" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8459d32", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflights_calling_inflights.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflights_calling_inflights.w_compile_tf-aws.md index 6aa69ae8d2c..9eec43bcca0 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflights_calling_inflights.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflights_calling_inflights.w_compile_tf-aws.md @@ -240,6 +240,9 @@ module.exports = function({ }) { "uniqueId": "func1" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", @@ -267,6 +270,9 @@ module.exports = function({ }) { "uniqueId": "testinflightscancallotherinflights_Handler_90705AE1" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", @@ -295,6 +301,9 @@ module.exports = function({ }) { "uniqueId": "testvariablecanbeaninflightclosure_Handler_E55D136A" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md index 26edcebea61..726f6081ded 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md @@ -196,6 +196,9 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", @@ -222,6 +225,9 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "uniqueId": "testapishouldreturnavalidstringifiedjson_Handler_DCAABCD2" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c88c3aa2", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md index 6ce136e26c9..a00fe034016 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md @@ -140,6 +140,9 @@ module.exports = function({ $b, $fileName, $getJson, $j }) { "uniqueId": "cloudFunction" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", @@ -167,6 +170,9 @@ module.exports = function({ $b, $fileName, $getJson, $j }) { "uniqueId": "testput_Handler_724F92D5" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md index 2c48572c265..c7b04646202 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md @@ -141,6 +141,9 @@ module.exports = function({ $std_Json }) { "uniqueId": "testAccessJsonstaticinflight_Handler_E1606978" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8867497", @@ -167,6 +170,9 @@ module.exports = function({ $std_Json }) { "uniqueId": "testhaskeyornot_Handler_3209D975" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8ecbdc2", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_expr_with_this.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_expr_with_this.w_compile_tf-aws.md index 036835a375f..b0d924ca70c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_expr_with_this.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_expr_with_this.w_compile_tf-aws.md @@ -104,6 +104,9 @@ module.exports = function({ }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8f4f2a1", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_redefinition.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_redefinition.w_compile_tf-aws.md index a61b3d64803..3a769c0479a 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_redefinition.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_redefinition.w_compile_tf-aws.md @@ -93,6 +93,9 @@ module.exports = function({ $y }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8f4f2a1", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_this.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_this.w_compile_tf-aws.md index bf42112b69e..551c7ecfa07 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_this.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_this.w_compile_tf-aws.md @@ -112,6 +112,9 @@ module.exports = function({ }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8f4f2a1", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure.w_compile_tf-aws.md index d7d67e965f8..1fef377074c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure.w_compile_tf-aws.md @@ -187,6 +187,9 @@ module.exports = function({ $bucket2 }) { "uniqueId": "testcallnon-syntheticclosureasafunction_Handler_8C8F5E97" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_bbe94f63": "${aws_s3_bucket.MyClosure_cloudBucket_4DAD12C0.bucket}", @@ -215,6 +218,9 @@ module.exports = function({ $bucket2 }) { "uniqueId": "testcallsyntheticclosureclassasafunction_Handler_577F53A9" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure_explicit.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure_explicit.w_compile_tf-aws.md index 5541a82c23c..06a623093d3 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure_explicit.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure_explicit.w_compile_tf-aws.md @@ -110,6 +110,9 @@ module.exports = function({ }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "QUEUE_URL_6ec5b2e4": "${aws_sqs_queue.MyClosure_cloudQueue_465FD228.url}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/nil.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/nil.w_compile_tf-aws.md index fb5ad38e37e..47116339c7c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/nil.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/nil.w_compile_tf-aws.md @@ -172,6 +172,9 @@ module.exports = function({ }) { "uniqueId": "testnilreturn_Handler_C1CE87DB" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8668556", @@ -198,6 +201,9 @@ module.exports = function({ }) { "uniqueId": "testoptionalinstancevariable_Handler_CA8A00DB" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8a1de9c", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md index f6347bfc782..8e3343c98d2 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md @@ -208,6 +208,9 @@ module.exports = function({ }) { "uniqueId": "testt_Handler_FF112F5E" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_c1491ba5": "${aws_s3_bucket.orangebucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/print.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/print.w_compile_tf-aws.md index 13569d9a6e6..0b22cc73cdc 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/print.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/print.w_compile_tf-aws.md @@ -140,6 +140,9 @@ module.exports = function({ }) { "uniqueId": "testlog1_Handler_EDBEC34F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c82c13b7", @@ -166,6 +169,9 @@ module.exports = function({ }) { "uniqueId": "testlog2_Handler_C5C192A7" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c87c0241", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/redis.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/redis.w_compile_tf-aws.md index edf9c2cc32a..fb403510060 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/redis.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/redis.w_compile_tf-aws.md @@ -253,6 +253,9 @@ module.exports = function({ $queue, $r, $r2, $util_Util }) { "uniqueId": "cloudQueue-SetConsumer-cdafee6e" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "REDIS_CLUSTER_ID_89baf91f": "${aws_elasticache_cluster.exRedis_RedisCluster_3C9A5882.cluster_id}", @@ -284,6 +287,9 @@ module.exports = function({ $queue, $r, $r2, $util_Util }) { "uniqueId": "testtestingRedis_Handler_7678DD27" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "QUEUE_URL_31e95cbd": "${aws_sqs_queue.cloudQueue.url}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md index d827ee9196e..5ea05264681 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md @@ -423,6 +423,9 @@ module.exports = function({ }) { "uniqueId": "BigPublisher_b2_b2-oncreate-OnMessage-59543b60_93D04CBC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "QUEUE_URL_b0ba884c": "${aws_sqs_queue.BigPublisher_cloudQueue_2EE8871A.url}", @@ -450,6 +453,9 @@ module.exports = function({ }) { "uniqueId": "BigPublisher_cloudQueue-SetConsumer-c50bc9ef_67ECF75E" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_7ef741f5": "${aws_s3_bucket.BigPublisher_cloudBucket_ABF95118.bucket}", @@ -477,6 +483,9 @@ module.exports = function({ }) { "uniqueId": "BigPublisher_cloudTopic-OnMessage-113c9059_12D15502" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_7ef741f5": "${aws_s3_bucket.BigPublisher_cloudBucket_ABF95118.bucket}", @@ -504,6 +513,9 @@ module.exports = function({ }) { "uniqueId": "testdependencycycles_Handler_2DD0D3F7" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_584271ad": "${aws_s3_bucket.BigPublisher_b2_702AC841.bucket}", @@ -534,6 +546,9 @@ module.exports = function({ }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_as_inflight_literal.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_as_inflight_literal.w_compile_tf-aws.md index 1f5a4a25ebd..19280889453 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_as_inflight_literal.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_as_inflight_literal.w_compile_tf-aws.md @@ -138,6 +138,9 @@ module.exports = function({ }) { "uniqueId": "cloudFunction" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Function-c8d2eca1", @@ -164,6 +167,9 @@ module.exports = function({ }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "FUNCTION_NAME_5bb84dfa": "${aws_lambda_function.cloudFunction.arn}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_call_static.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_call_static.w_compile_tf-aws.md index 49ff678084f..2564ad6ee8f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_call_static.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_call_static.w_compile_tf-aws.md @@ -125,6 +125,9 @@ module.exports = function({ $globalCounter }) { "uniqueId": "testaccesscloudresourcethroughstaticmethodsonly_Handler_BC0E7705" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures.w_compile_tf-aws.md index 5f473b03da4..36007829c12 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures.w_compile_tf-aws.md @@ -235,6 +235,9 @@ module.exports = function({ }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_51ee81c0": "${aws_s3_bucket.MyResource_cloudBucket_B5E6C951.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md index 83fb4428499..689c0e6beef 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md @@ -283,6 +283,9 @@ module.exports = function({ $_parentThis_localCounter, $globalCounter }) { "uniqueId": "MyResource_cloudTopic-OnMessage-f10eb240_23BCEE41" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -311,6 +314,9 @@ module.exports = function({ $_parentThis_localCounter, $globalCounter }) { "uniqueId": "testaccesscloudresourcethroughstaticmethodsonly_Handler_BC0E7705" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", @@ -338,6 +344,9 @@ module.exports = function({ $_parentThis_localCounter, $globalCounter }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_ae5b06c6": "${aws_s3_bucket.Another_First_cloudBucket_DB822B7C.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/shadowing.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/shadowing.w_compile_tf-aws.md index 0b643f576ce..9bda77a428d 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/shadowing.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/shadowing.w_compile_tf-aws.md @@ -121,6 +121,9 @@ module.exports = function({ $fn }) { "uniqueId": "testcaptureshadowinteraction_Handler_9B768E38" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8807c1f", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/statements_if.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/statements_if.w_compile_tf-aws.md index 473885fc4a3..5f731dd497d 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/statements_if.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/statements_if.w_compile_tf-aws.md @@ -110,6 +110,9 @@ module.exports = function({ }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8f4f2a1", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/static_members.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/static_members.w_compile_tf-aws.md index 31add1170c0..7564d6aa868 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/static_members.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/static_members.w_compile_tf-aws.md @@ -116,6 +116,9 @@ module.exports = function({ }) { "uniqueId": "testtest_Handler_295107CC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8f4f2a1", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/std_string.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/std_string.w_compile_tf-aws.md index d2adc6ff19e..0a45a587895 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/std_string.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/std_string.w_compile_tf-aws.md @@ -93,6 +93,9 @@ module.exports = function({ $__s1_split_______at_1__, $_s1_concat_s2__, $s1_inde "uniqueId": "teststring_Handler_2FEE704D" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8a1f7f0", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md index 686247b6d26..8f674d5b32c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md @@ -531,6 +531,9 @@ module.exports = function({ $Student, $jStudent1 }) { "uniqueId": "testflightschoolstudent_Handler_8BE7AA78" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c85c011b", @@ -557,6 +560,9 @@ module.exports = function({ $Student, $jStudent1 }) { "uniqueId": "testliftingastudent_Handler_30A43B55" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c82f8661", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/structs.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/structs.w_compile_tf-aws.md index a89432366da..07256fc6178 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/structs.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/structs.w_compile_tf-aws.md @@ -313,6 +313,9 @@ module.exports = function(stdStruct) { "uniqueId": "teststructdefinitionsarephaseindependant_Handler_F8CACE9E" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8158c42", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/super_call.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/super_call.w_compile_tf-aws.md index 65fb7b1d24b..8685ed7b56f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/super_call.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/super_call.w_compile_tf-aws.md @@ -261,6 +261,9 @@ module.exports = function({ $InflightA }) { "uniqueId": "testsupercallinflight_Handler_8BA833E3" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c83c6423", @@ -287,6 +290,9 @@ module.exports = function({ $InflightA }) { "uniqueId": "testsupercallsetsbindingpermissions_Handler_094D9398" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/symbol_shadow.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/symbol_shadow.w_compile_tf-aws.md index 23687e05f0b..44235dc2f2e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/symbol_shadow.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/symbol_shadow.w_compile_tf-aws.md @@ -245,6 +245,9 @@ module.exports = function({ }) { "uniqueId": "A_testinflightinresourceshouldcapturetherightscopedvar_Handler_B24941AC" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c83cf74f", @@ -271,6 +274,9 @@ module.exports = function({ }) { "uniqueId": "testinflightnestedshouldnotcapturetheshadowedvar_Handler_B6B64A92" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c85de384", @@ -297,6 +303,9 @@ module.exports = function({ }) { "uniqueId": "testinflightontopshouldcapturetop_Handler_2FA69946" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c859340a", @@ -323,6 +332,9 @@ module.exports = function({ }) { "uniqueId": "testinsideInflightshouldcapturetherightscope_Handler_B6CD7A27" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c83ad462", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/test_bucket.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/test_bucket.w_compile_tf-aws.md index 0d9a1139110..21048fb7bbe 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/test_bucket.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/test_bucket.w_compile_tf-aws.md @@ -141,6 +141,9 @@ module.exports = function({ $b }) { "uniqueId": "testget_Handler_67989B36" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", @@ -168,6 +171,9 @@ module.exports = function({ $b }) { "uniqueId": "testput_Handler_724F92D5" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/test_without_bring.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/test_without_bring.w_compile_tf-aws.md index ce61d39e3bc..54a6a41966b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/test_without_bring.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/test_without_bring.w_compile_tf-aws.md @@ -91,6 +91,9 @@ module.exports = function({ }) { "uniqueId": "testhellotest_Handler_388AC021" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "Handler-c8123dd7", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/use_inflight_method_inside_init_closure.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/use_inflight_method_inside_init_closure.w_compile_tf-aws.md index 8ef44300222..7faab539bb4 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/use_inflight_method_inside_init_closure.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/use_inflight_method_inside_init_closure.w_compile_tf-aws.md @@ -105,6 +105,9 @@ module.exports = function({ }) { "uniqueId": "Foo_cloudFunction_E4309ED7" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Function-c8858302", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md index 7d490292275..9865b1a9975 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md @@ -365,6 +365,9 @@ module.exports = function({ }) { "uniqueId": "cloudApi_cloudApi-OnRequest-3fc9280c_5DA20E7A" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-3fc9280c-c8d3ecf9", @@ -391,6 +394,9 @@ module.exports = function({ }) { "uniqueId": "cloudApi_cloudApi-OnRequest-86898773_701F5CA7" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_d5d44f18": "${aws_dynamodb_table.exTable.name}", @@ -420,6 +426,9 @@ module.exports = function({ }) { "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "DYNAMODB_TABLE_NAME_d5d44f18": "${aws_dynamodb_table.exTable.name}", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/while_loop_await.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/while_loop_await.w_compile_tf-aws.md index 0f7e60c6526..250a6503c56 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/while_loop_await.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/while_loop_await.w_compile_tf-aws.md @@ -111,6 +111,9 @@ module.exports = function({ }) { "uniqueId": "cloudQueue-SetConsumer-cdafee6e" } }, + "architectures": [ + "arm64" + ], "environment": { "variables": { "WING_FUNCTION_NAME": "cloud-Queue-SetConsumer-cdafee6e-c8eb6a09", From d4ae09d3d5ddf8f8064d0462e66fa7c418a05f64 Mon Sep 17 00:00:00 2001 From: Marcio Cruz de Almeida <67694075+marciocadev@users.noreply.github.com> Date: Fri, 25 Aug 2023 13:12:45 -0300 Subject: [PATCH 11/48] feat(compiler): elif let statement (#3888) ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [ ] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- examples/tests/valid/optionals.w | 13 ++ libs/tree-sitter-wing/grammar.js | 12 ++ .../test/corpus/statements/statements.txt | 21 +++ libs/wingc/src/ast.rs | 9 + libs/wingc/src/fold.rs | 18 +- libs/wingc/src/jsify.rs | 84 ++++++++- libs/wingc/src/lsp/hover.rs | 8 + libs/wingc/src/parser.rs | 21 ++- libs/wingc/src/type_check.rs | 160 ++++++++++-------- libs/wingc/src/visit.rs | 6 + .../valid/container_types.w_compile_tf-aws.md | 12 +- .../valid/inference.w_compile_tf-aws.md | 6 +- ...nflight_capture_static.w_compile_tf-aws.md | 6 +- .../valid/json.w_compile_tf-aws.md | 42 ++--- .../valid/optionals.w_compile_tf-aws.md | 105 +++++++----- .../struct_from_json.w_compile_tf-aws.md | 42 ++--- 16 files changed, 391 insertions(+), 174 deletions(-) diff --git a/examples/tests/valid/optionals.w b/examples/tests/valid/optionals.w index deacf2a1216..4833e18a16a 100644 --- a/examples/tests/valid/optionals.w +++ b/examples/tests/valid/optionals.w @@ -58,6 +58,19 @@ let tryParseName = (fullName: str): Name? => { }; }; +let json_obj = Json { ghost: "spooky" }; +let var something_else = false; +if let y = json_obj.tryAsBool() { + assert(y == true || y == false); +} elif let y = json_obj.tryAsNum() { + assert(y + 0 == y); +} elif let y = json_obj.tryAsStr() { + assert(y.length >= 0); +} else { + something_else = true; +} +assert(something_else); + // if lets reassignable let a: num? = 1; if let var z = a { diff --git a/libs/tree-sitter-wing/grammar.js b/libs/tree-sitter-wing/grammar.js index 094b038aa9a..d9cf896193c 100644 --- a/libs/tree-sitter-wing/grammar.js +++ b/libs/tree-sitter-wing/grammar.js @@ -281,9 +281,21 @@ module.exports = grammar({ "=", field("value", $.expression), field("block", $.block), + repeat(field("elif_let_block", $.elif_let_block)), optional(seq("else", field("else_block", $.block))) ), + elif_let_block: ($) => + seq( + "elif", + "let", + optional(field("reassignable", $.reassignable)), + field("name", $.identifier), + "=", + field("value", $.expression), + field("block", $.block) + ), + if_statement: ($) => seq( "if", diff --git a/libs/tree-sitter-wing/test/corpus/statements/statements.txt b/libs/tree-sitter-wing/test/corpus/statements/statements.txt index db2456efda2..43635bfb719 100644 --- a/libs/tree-sitter-wing/test/corpus/statements/statements.txt +++ b/libs/tree-sitter-wing/test/corpus/statements/statements.txt @@ -401,6 +401,27 @@ if let x = y {} else {} block: (block) else_block: (block))) +================================================================================ +If Let Elif Let Else +================================================================================ + +if let x = y {} elif let x = z {} else {} + +-------------------------------------------------------------------------------- + +(source + (if_let_statement + name: (identifier) + value: (reference + (reference_identifier)) + block: (block) + elif_let_block: (elif_let_block + name: (identifier) + value: (reference + (reference_identifier)) + block: (block)) + else_block: (block))) + ================================================================================ If Let Var ================================================================================ diff --git a/libs/wingc/src/ast.rs b/libs/wingc/src/ast.rs index 4c228b5bbbd..3c0046ecd7a 100644 --- a/libs/wingc/src/ast.rs +++ b/libs/wingc/src/ast.rs @@ -331,6 +331,14 @@ pub struct ElifBlock { pub statements: Scope, } +#[derive(Debug)] +pub struct ElifLetBlock { + pub reassignable: bool, + pub var_name: Symbol, + pub value: Expr, + pub statements: Scope, +} + #[derive(Debug)] pub struct Class { pub name: Symbol, @@ -449,6 +457,7 @@ pub enum StmtKind { var_name: Symbol, value: Expr, statements: Scope, + elif_statements: Vec, else_statements: Option, }, If { diff --git a/libs/wingc/src/fold.rs b/libs/wingc/src/fold.rs index c424fc50f31..9264ae7e934 100644 --- a/libs/wingc/src/fold.rs +++ b/libs/wingc/src/fold.rs @@ -1,9 +1,9 @@ use crate::{ ast::{ - ArgList, BringSource, CalleeKind, CatchBlock, Class, ClassField, ElifBlock, Expr, ExprKind, FunctionBody, - FunctionDefinition, FunctionParameter, FunctionSignature, Interface, InterpolatedString, InterpolatedStringPart, - Literal, NewExpr, Reference, Scope, Stmt, StmtKind, StructField, Symbol, TypeAnnotation, TypeAnnotationKind, - UserDefinedType, + ArgList, BringSource, CalleeKind, CatchBlock, Class, ClassField, ElifBlock, ElifLetBlock, Expr, ExprKind, + FunctionBody, FunctionDefinition, FunctionParameter, FunctionSignature, Interface, InterpolatedString, + InterpolatedStringPart, Literal, NewExpr, Reference, Scope, Stmt, StmtKind, StructField, Symbol, TypeAnnotation, + TypeAnnotationKind, UserDefinedType, }, dbg_panic, }; @@ -118,12 +118,22 @@ where statements, reassignable, var_name, + elif_statements, else_statements, } => StmtKind::IfLet { value: f.fold_expr(value), statements: f.fold_scope(statements), reassignable, var_name: f.fold_symbol(var_name), + elif_statements: elif_statements + .into_iter() + .map(|elif_let_block| ElifLetBlock { + reassignable: elif_let_block.reassignable, + statements: f.fold_scope(elif_let_block.statements), + value: f.fold_expr(elif_let_block.value), + var_name: f.fold_symbol(elif_let_block.var_name), + }) + .collect(), else_statements: else_statements.map(|statements| f.fold_scope(statements)), }, StmtKind::If { diff --git a/libs/wingc/src/jsify.rs b/libs/wingc/src/jsify.rs index 5a1ac1b0665..fb817bda645 100644 --- a/libs/wingc/src/jsify.rs +++ b/libs/wingc/src/jsify.rs @@ -16,7 +16,7 @@ use std::{ use crate::{ ast::{ - ArgList, BinaryOperator, BringSource, CalleeKind, Class as AstClass, Expr, ExprKind, FunctionBody, + ArgList, BinaryOperator, BringSource, CalleeKind, Class as AstClass, ElifLetBlock, Expr, ExprKind, FunctionBody, FunctionDefinition, InterpolatedStringPart, Literal, NewExpr, Phase, Reference, Scope, Stmt, StmtKind, StructField, Symbol, TypeAnnotationKind, UnaryOperator, UserDefinedType, }, @@ -765,6 +765,78 @@ impl<'a> JSifier<'a> { code } + // To avoid a performance penalty when evaluating assignments made in the elif statement, + // it was necessary to nest the if statements. + // + // Thus, this code in Wing: + // + // if let x = tryA() { + // ... + // } elif let x = tryB() { + // ... + // } elif let x = TryC() { + // ... + // } else { + // ... + // } + // + // In JavaScript, will become this: + // + // const $if_let_value = tryA(); + // if ($if_let_value !== undefined) { + // ... + // } else { + // let $elif_let_value0 = tryB(); + // if ($elif_let_value0 !== undefined) { + // ... + // } else { + // let $elif_let_value1 = tryC(); + // if ($elif_let_value1 !== undefined) { + // ... + // } else { + // ... + // } + // } + // } + fn jsify_elif_statements( + &self, + code: &mut CodeMaker, + elif_statements: &Vec, + index: usize, + else_statements: &Option, + ctx: &mut JSifyContext, + ) { + let elif_let_value = "$elif_let_value"; + + let value = format!("{}{}", elif_let_value, index); + code.line(format!( + "const {} = {};", + value, + self.jsify_expression(&elif_statements.get(index).unwrap().value, ctx) + )); + let value = format!("{}{}", elif_let_value, index); + code.open(format!("if ({value} != undefined) {{")); + let elif_block = elif_statements.get(index).unwrap(); + if elif_block.reassignable { + code.line(format!("let {} = {};", elif_block.var_name, value)); + } else { + code.line(format!("const {} = {};", elif_block.var_name, value)); + } + code.add_code(self.jsify_scope_body(&elif_block.statements, ctx)); + code.close("}"); + + if index < elif_statements.len() - 1 { + code.open("else {"); + self.jsify_elif_statements(code, elif_statements, index + 1, else_statements, ctx); + code.close("}"); + } else if let Some(else_scope) = else_statements { + code.open("else {"); + code.add_code(self.jsify_scope_body(else_scope, ctx)); + code.close("}"); + } + return; + } + fn jsify_statement(&self, env: &SymbolEnv, statement: &Stmt, ctx: &mut JSifyContext) -> CodeMaker { CompilationContext::set(CompilationPhase::Jsifying, &statement.span); match &statement.kind { @@ -836,6 +908,7 @@ impl<'a> JSifier<'a> { value, statements, var_name, + elif_statements, else_statements, } => { let mut code = CodeMaker::default(); @@ -867,12 +940,13 @@ impl<'a> JSifier<'a> { // The temporary scope is created so that intermediate variables created by consecutive `if let` clauses // do not interfere with each other. code.open("{"); - let if_let_value = "$IF_LET_VALUE".to_string(); + let if_let_value = "$if_let_value".to_string(); code.line(format!( "const {} = {};", if_let_value, self.jsify_expression(value, ctx) )); + code.open(format!("if ({if_let_value} != undefined) {{")); if *reassignable { code.line(format!("let {} = {};", var_name, if_let_value)); @@ -882,7 +956,11 @@ impl<'a> JSifier<'a> { code.add_code(self.jsify_scope_body(statements, ctx)); code.close("}"); - if let Some(else_scope) = else_statements { + if elif_statements.len() > 0 { + code.open("else {"); + self.jsify_elif_statements(&mut code, elif_statements, 0, else_statements, ctx); + code.close("}"); + } else if let Some(else_scope) = else_statements { code.open("else {"); code.add_code(self.jsify_scope_body(else_scope, ctx)); code.close("}"); diff --git a/libs/wingc/src/lsp/hover.rs b/libs/wingc/src/lsp/hover.rs index 377adda20f0..b41df8cc23a 100644 --- a/libs/wingc/src/lsp/hover.rs +++ b/libs/wingc/src/lsp/hover.rs @@ -169,6 +169,7 @@ impl<'a> Visit<'a> for HoverVisitor<'a> { value, statements, reassignable: _, + elif_statements, else_statements, } => { self.with_scope(statements, |v| { @@ -176,6 +177,13 @@ impl<'a> Visit<'a> for HoverVisitor<'a> { }); self.visit_expr(value); self.visit_scope(statements); + for elif in elif_statements { + self.with_scope(&elif.statements, |v| { + v.visit_symbol(&elif.var_name); + }); + self.visit_expr(&elif.value); + self.visit_scope(&elif.statements); + } if let Some(else_statements) = else_statements { self.visit_scope(else_statements); } diff --git a/libs/wingc/src/parser.rs b/libs/wingc/src/parser.rs index 6789f1d2112..d509522d234 100644 --- a/libs/wingc/src/parser.rs +++ b/libs/wingc/src/parser.rs @@ -8,8 +8,8 @@ use tree_sitter::Node; use tree_sitter_traversal::{traverse, Order}; use crate::ast::{ - ArgList, BinaryOperator, BringSource, CalleeKind, CatchBlock, Class, ClassField, ElifBlock, Expr, ExprKind, - FunctionBody, FunctionDefinition, FunctionParameter, FunctionSignature, Interface, InterpolatedString, + ArgList, BinaryOperator, BringSource, CalleeKind, CatchBlock, Class, ClassField, ElifBlock, ElifLetBlock, Expr, + ExprKind, FunctionBody, FunctionDefinition, FunctionParameter, FunctionSignature, Interface, InterpolatedString, InterpolatedStringPart, Literal, NewExpr, Phase, Reference, Scope, Stmt, StmtKind, StructField, Symbol, TypeAnnotation, TypeAnnotationKind, UnaryOperator, UserDefinedType, }; @@ -571,6 +571,22 @@ impl<'s> Parser<'s> { let reassignable = statement_node.child_by_field_name("reassignable").is_some(); let value = self.build_expression(&statement_node.child_by_field_name("value").unwrap(), phase)?; let name = self.check_reserved_symbol(&statement_node.child_by_field_name("name").unwrap())?; + + let mut elif_vec = vec![]; + let mut cursor = statement_node.walk(); + for node in statement_node.children_by_field_name("elif_let_block", &mut cursor) { + let statements = self.build_scope(&node.child_by_field_name("block").unwrap(), phase); + let value = self.build_expression(&node.child_by_field_name("value").unwrap(), phase)?; + let name = self.check_reserved_symbol(&statement_node.child_by_field_name("name").unwrap())?; + let elif = ElifLetBlock { + reassignable: node.child_by_field_name("reassignable").is_some(), + statements: statements, + value: value, + var_name: name, + }; + elif_vec.push(elif); + } + let else_block = if let Some(else_block) = statement_node.child_by_field_name("else_block") { Some(self.build_scope(&else_block, phase)) } else { @@ -581,6 +597,7 @@ impl<'s> Parser<'s> { reassignable, value, statements: if_block, + elif_statements: elif_vec, else_statements: else_block, }) } diff --git a/libs/wingc/src/type_check.rs b/libs/wingc/src/type_check.rs index c1ee103cc53..3108b103ee0 100644 --- a/libs/wingc/src/type_check.rs +++ b/libs/wingc/src/type_check.rs @@ -3072,57 +3072,22 @@ impl<'a> TypeChecker<'a> { statements, reassignable, var_name, + elif_statements, else_statements, } => { - let (mut cond_type, _) = self.type_check_exp(value, env); - - if let Type::Inferred(n) = *cond_type { - // If the type is inferred and unlinked, we must make sure that the type is also optional - // So let's make a new inference, but this time optional - if self.types.get_inference_by_id(n).is_none() { - let new_inference = self.types.make_inference(); - cond_type = self.types.make_option(new_inference); - self.types.update_inferred_type(n, cond_type, &value.span); - } - } - - if !cond_type.is_option() { - report_diagnostic(Diagnostic { - message: format!("Expected type to be optional, but got \"{}\" instead", cond_type), - span: Some(value.span()), - }); - } - - // Technically we only allow if let statements to be used with optionals - // and above validate_type_is_optional method will attach a diagnostic error if it is not. - // However for the sake of verbose diagnostics we'll allow the code to continue if the type is not an optional - // and complete the type checking process for additional errors. - let var_type = *cond_type.maybe_unwrap_option(); - - let mut stmt_env = self.types.add_symbol_env(SymbolEnv::new( - Some(env.get_ref()), - env.return_type, - false, - false, - env.phase, - stmt.idx, - )); + self.type_check_if_let_statement(value, statements, reassignable, var_name, stmt, env); - // Add the variable to if block scope - match stmt_env.define( - var_name, - SymbolKind::make_free_variable(var_name.clone(), var_type, *reassignable, env.phase), - StatementIdx::Top, - ) { - Err(type_error) => { - self.type_error(type_error); - } - _ => {} + for elif_scope in elif_statements { + self.type_check_if_let_statement( + &elif_scope.value, + &elif_scope.statements, + &elif_scope.reassignable, + &elif_scope.var_name, + stmt, + env, + ); } - self.types.set_scope_env(statements, stmt_env); - self.inner_scopes.push(statements); - if let Some(else_scope) = else_statements { let else_scope_env = self.types.add_symbol_env(SymbolEnv::new( Some(env.get_ref()), @@ -3142,34 +3107,10 @@ impl<'a> TypeChecker<'a> { elif_statements, else_statements, } => { - let (cond_type, _) = self.type_check_exp(condition, env); - self.validate_type(cond_type, self.types.bool(), condition); - - let if_scope_env = self.types.add_symbol_env(SymbolEnv::new( - Some(env.get_ref()), - env.return_type, - false, - false, - env.phase, - stmt.idx, - )); - self.types.set_scope_env(statements, if_scope_env); - self.inner_scopes.push(statements); + self.type_check_if_statement(condition, statements, stmt, env); for elif_scope in elif_statements { - let (cond_type, _) = self.type_check_exp(&elif_scope.condition, env); - self.validate_type(cond_type, self.types.bool(), condition); - - let elif_scope_env = self.types.add_symbol_env(SymbolEnv::new( - Some(env.get_ref()), - env.return_type, - false, - false, - env.phase, - stmt.idx, - )); - self.types.set_scope_env(&elif_scope.statements, elif_scope_env); - self.inner_scopes.push(&elif_scope.statements); + self.type_check_if_statement(&elif_scope.condition, &elif_scope.statements, stmt, env); } if let Some(else_scope) = else_statements { @@ -3751,6 +3692,81 @@ impl<'a> TypeChecker<'a> { } } + fn type_check_if_let_statement( + &mut self, + value: &Expr, + statements: &Scope, + reassignable: &bool, + var_name: &Symbol, + stmt: &Stmt, + env: &mut SymbolEnv, + ) { + let (mut cond_type, _) = self.type_check_exp(value, env); + + if let Type::Inferred(n) = *cond_type { + // If the type is inferred and unlinked, we must make sure that the type is also optional + // So let's make a new inference, but this time optional + if self.types.get_inference_by_id(n).is_none() { + let new_inference = self.types.make_inference(); + cond_type = self.types.make_option(new_inference); + self.types.update_inferred_type(n, cond_type, &value.span); + } + } + + if !cond_type.is_option() { + report_diagnostic(Diagnostic { + message: format!("Expected type to be optional, but got \"{}\" instead", cond_type), + span: Some(value.span()), + }); + } + + // Technically we only allow if let statements to be used with optionals + // and above validate_type_is_optional method will attach a diagnostic error if it is not. + // However for the sake of verbose diagnostics we'll allow the code to continue if the type is not an optional + // and complete the type checking process for additional errors. + let var_type = *cond_type.maybe_unwrap_option(); + + let mut stmt_env = self.types.add_symbol_env(SymbolEnv::new( + Some(env.get_ref()), + env.return_type, + false, + false, + env.phase, + stmt.idx, + )); + + // Add the variable to if block scope + match stmt_env.define( + var_name, + SymbolKind::make_free_variable(var_name.clone(), var_type, *reassignable, env.phase), + StatementIdx::Top, + ) { + Err(type_error) => { + self.type_error(type_error); + } + _ => {} + } + + self.types.set_scope_env(statements, stmt_env); + self.inner_scopes.push(statements); + } + + fn type_check_if_statement(&mut self, condition: &Expr, statements: &Scope, stmt: &Stmt, env: &mut SymbolEnv) { + let (cond_type, _) = self.type_check_exp(condition, env); + self.validate_type(cond_type, self.types.bool(), condition); + + let if_scope_env = self.types.add_symbol_env(SymbolEnv::new( + Some(env.get_ref()), + env.return_type, + false, + false, + env.phase, + stmt.idx, + )); + self.types.set_scope_env(statements, if_scope_env); + self.inner_scopes.push(statements); + } + fn type_check_super_constructor_against_parent_initializer( &mut self, scope: &Scope, diff --git a/libs/wingc/src/visit.rs b/libs/wingc/src/visit.rs index 9e9214808b7..57c00e0e171 100644 --- a/libs/wingc/src/visit.rs +++ b/libs/wingc/src/visit.rs @@ -136,11 +136,17 @@ where statements, reassignable: _, var_name, + elif_statements, else_statements, } => { v.visit_symbol(var_name); v.visit_expr(value); v.visit_scope(statements); + for elif in elif_statements { + v.visit_symbol(&elif.var_name); + v.visit_expr(&elif.value); + v.visit_scope(&elif.statements); + } if let Some(statements) = else_statements { v.visit_scope(statements); } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/container_types.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/container_types.w_compile_tf-aws.md index c5c951f9743..cda7fb0258b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/container_types.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/container_types.w_compile_tf-aws.md @@ -155,16 +155,16 @@ class $Root extends $stdlib.std.Resource { {((cond) => {if (!cond) throw new Error("assertion failed: arr7.length == 3")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(arr7.length,3)))}; {((cond) => {if (!cond) throw new Error("assertion failed: arr7.at(1) == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((arr7.at(1)),2)))}; { - const $IF_LET_VALUE = (emptyArray.at(0)); - if ($IF_LET_VALUE != undefined) { - const val = $IF_LET_VALUE; + const $if_let_value = (emptyArray.at(0)); + if ($if_let_value != undefined) { + const val = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: false")})(false)}; } } { - const $IF_LET_VALUE = (arr1.at(0)); - if ($IF_LET_VALUE != undefined) { - const val = $IF_LET_VALUE; + const $if_let_value = (arr1.at(0)); + if ($if_let_value != undefined) { + const val = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: val == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(val,1)))}; } else { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md index ae30f01931a..b2a7fa6340f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md @@ -280,9 +280,9 @@ class $Root extends $stdlib.std.Resource { const stringArray = [shouldBeString]; const closureWithUnwrapping = ((optionalString) => { { - const $IF_LET_VALUE = optionalString; - if ($IF_LET_VALUE != undefined) { - const justString = $IF_LET_VALUE; + const $if_let_value = optionalString; + if ($if_let_value != undefined) { + const justString = $if_let_value; {console.log(justString)}; } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md index d13aa852af7..f8ab6d0666e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md @@ -70,9 +70,9 @@ module.exports = function({ $util_Util }) { } async handle() { { - const $IF_LET_VALUE = (await $util_Util.tryEnv("WING_TARGET")); - if ($IF_LET_VALUE != undefined) { - const target = $IF_LET_VALUE; + const $if_let_value = (await $util_Util.tryEnv("WING_TARGET")); + if ($if_let_value != undefined) { + const target = $if_let_value; {console.log(String.raw({ raw: ["WING_TARGET=", ""] }, target))}; } else { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json.w_compile_tf-aws.md index 5e10864d9cb..4102fdc19ff 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json.w_compile_tf-aws.md @@ -355,9 +355,9 @@ class $Root extends $stdlib.std.Resource { {((cond) => {if (!cond) throw new Error("assertion failed: unestedJsonArr.getAt(0) == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((unestedJsonArr)[0],1)))}; const jsonElements = ({"strings": ({"single": "Hello","array": ["Hello", "World", "!"]}),"numbers": ({"one": 1,"two": 2,"three": 3}),"bools": ({"t": true,"f": false})}); { - const $IF_LET_VALUE = ((arg) => { if (typeof arg !== "string") {throw new Error("unable to parse " + typeof arg + " " + arg + " as a string")}; return JSON.parse(JSON.stringify(arg)) })(((jsonElements)?.["strings"])?.["single"]); - if ($IF_LET_VALUE != undefined) { - const val = $IF_LET_VALUE; + const $if_let_value = ((arg) => { if (typeof arg !== "string") {throw new Error("unable to parse " + typeof arg + " " + arg + " as a string")}; return JSON.parse(JSON.stringify(arg)) })(((jsonElements)?.["strings"])?.["single"]); + if ($if_let_value != undefined) { + const val = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: val == \"Hello\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(val,"Hello")))}; } else { @@ -365,13 +365,13 @@ class $Root extends $stdlib.std.Resource { } } { - const $IF_LET_VALUE = ((jsonElements)?.["strings"])?.["array"]; - if ($IF_LET_VALUE != undefined) { - const vals = $IF_LET_VALUE; + const $if_let_value = ((jsonElements)?.["strings"])?.["array"]; + if ($if_let_value != undefined) { + const vals = $if_let_value; { - const $IF_LET_VALUE = (vals)?.[0]; - if ($IF_LET_VALUE != undefined) { - const hello = $IF_LET_VALUE; + const $if_let_value = (vals)?.[0]; + if ($if_let_value != undefined) { + const hello = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: hello == \"Hello\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(hello,"Hello")))}; } else { @@ -384,9 +384,9 @@ class $Root extends $stdlib.std.Resource { } } { - const $IF_LET_VALUE = ((arg) => { return (typeof arg === "number") ? JSON.parse(JSON.stringify(arg)) : undefined })(((jsonElements)?.["numbers"])?.["two"]); - if ($IF_LET_VALUE != undefined) { - const two = $IF_LET_VALUE; + const $if_let_value = ((arg) => { return (typeof arg === "number") ? JSON.parse(JSON.stringify(arg)) : undefined })(((jsonElements)?.["numbers"])?.["two"]); + if ($if_let_value != undefined) { + const two = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: two + 2 == 4")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((two + 2),4)))}; } else { @@ -394,9 +394,9 @@ class $Root extends $stdlib.std.Resource { } } { - const $IF_LET_VALUE = ((arg) => { return (typeof arg === "boolean") ? JSON.parse(JSON.stringify(arg)) : undefined })(((jsonElements)?.["bools"])?.["t"]); - if ($IF_LET_VALUE != undefined) { - const truth = $IF_LET_VALUE; + const $if_let_value = ((arg) => { return (typeof arg === "boolean") ? JSON.parse(JSON.stringify(arg)) : undefined })(((jsonElements)?.["bools"])?.["t"]); + if ($if_let_value != undefined) { + const truth = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: truth")})(truth)}; } else { @@ -404,16 +404,16 @@ class $Root extends $stdlib.std.Resource { } } { - const $IF_LET_VALUE = ((((jsonElements)?.["strings"])?.["non"])?.["existant"])?.["element"]; - if ($IF_LET_VALUE != undefined) { - const val = $IF_LET_VALUE; + const $if_let_value = ((((jsonElements)?.["strings"])?.["non"])?.["existant"])?.["element"]; + if ($if_let_value != undefined) { + const val = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: false")})(false)}; } } { - const $IF_LET_VALUE = (((jsonElements)?.["cant"])?.[1000])?.[42]; - if ($IF_LET_VALUE != undefined) { - const val = $IF_LET_VALUE; + const $if_let_value = (((jsonElements)?.["cant"])?.[1000])?.[42]; + if ($if_let_value != undefined) { + const val = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: false")})(false)}; } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md index 8e3343c98d2..7b01a79ca31 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md @@ -455,17 +455,17 @@ class $Root extends $stdlib.std.Resource { const Name = require("./Name.Struct.js")($stdlib.std.Struct); let name = ({"first": "John","last": "Doe"}); { - const $IF_LET_VALUE = name; - if ($IF_LET_VALUE != undefined) { - const n = $IF_LET_VALUE; + const $if_let_value = name; + if ($if_let_value != undefined) { + const n = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: n.first == \"John\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(n.first,"John")))}; } } name = undefined; { - const $IF_LET_VALUE = name; - if ($IF_LET_VALUE != undefined) { - const n = $IF_LET_VALUE; + const $if_let_value = name; + if ($if_let_value != undefined) { + const n = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: false")})(false)}; } else { @@ -479,11 +479,38 @@ class $Root extends $stdlib.std.Resource { } return ({"first": (parts.at(0)),"last": (parts.at(1))}); }); + const json_obj = ({"ghost": "spooky"}); + let something_else = false; + { + const $if_let_value = ((arg) => { return (typeof arg === "boolean") ? JSON.parse(JSON.stringify(arg)) : undefined })(json_obj); + if ($if_let_value != undefined) { + const y = $if_let_value; + {((cond) => {if (!cond) throw new Error("assertion failed: y == true || y == false")})(((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(y,true)) || (((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(y,false))))}; + } + else { + const $elif_let_value0 = ((arg) => { return (typeof arg === "number") ? JSON.parse(JSON.stringify(arg)) : undefined })(json_obj); + if ($elif_let_value0 != undefined) { + const y = $elif_let_value0; + {((cond) => {if (!cond) throw new Error("assertion failed: y + 0 == y")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((y + 0),y)))}; + } + else { + const $elif_let_value1 = ((arg) => { return (typeof arg === "string") ? JSON.parse(JSON.stringify(arg)) : undefined })(json_obj); + if ($elif_let_value1 != undefined) { + const y = $elif_let_value1; + {((cond) => {if (!cond) throw new Error("assertion failed: y.length >= 0")})((y.length >= 0))}; + } + else { + something_else = true; + } + } + } + } + {((cond) => {if (!cond) throw new Error("assertion failed: something_else")})(something_else)}; const a = 1; { - const $IF_LET_VALUE = a; - if ($IF_LET_VALUE != undefined) { - let z = $IF_LET_VALUE; + const $if_let_value = a; + if ($if_let_value != undefined) { + let z = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: z == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(z,1)))}; z = 2; {((cond) => {if (!cond) throw new Error("assertion failed: z == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(z,2)))}; @@ -491,21 +518,21 @@ class $Root extends $stdlib.std.Resource { } const b = 1; { - const $IF_LET_VALUE = b; - if ($IF_LET_VALUE != undefined) { - const z = $IF_LET_VALUE; + const $if_let_value = b; + if ($if_let_value != undefined) { + const z = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: z == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(z,1)))}; } } { - const $IF_LET_VALUE = (tryParseName("Good Name")); - if ($IF_LET_VALUE != undefined) { - const parsedName = $IF_LET_VALUE; + const $if_let_value = (tryParseName("Good Name")); + if ($if_let_value != undefined) { + const parsedName = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: parsedName.first == \"Good\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(parsedName.first,"Good")))}; { - const $IF_LET_VALUE = parsedName.last; - if ($IF_LET_VALUE != undefined) { - const lastName = $IF_LET_VALUE; + const $if_let_value = parsedName.last; + if ($if_let_value != undefined) { + const lastName = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: lastName == \"Name\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(lastName,"Name")))}; } else { @@ -515,14 +542,14 @@ class $Root extends $stdlib.std.Resource { } } { - const $IF_LET_VALUE = (tryParseName("BadName")); - if ($IF_LET_VALUE != undefined) { - const parsedName = $IF_LET_VALUE; + const $if_let_value = (tryParseName("BadName")); + if ($if_let_value != undefined) { + const parsedName = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: parsedName.first == \"BadName\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(parsedName.first,"BadName")))}; { - const $IF_LET_VALUE = parsedName.last; - if ($IF_LET_VALUE != undefined) { - const lastName = $IF_LET_VALUE; + const $if_let_value = parsedName.last; + if ($if_let_value != undefined) { + const lastName = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: false")})(false)}; } } @@ -530,9 +557,9 @@ class $Root extends $stdlib.std.Resource { } const falsy = false; { - const $IF_LET_VALUE = falsy; - if ($IF_LET_VALUE != undefined) { - const f = $IF_LET_VALUE; + const $if_let_value = falsy; + if ($if_let_value != undefined) { + const f = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: f == false")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(f,false)))}; } else { @@ -541,15 +568,15 @@ class $Root extends $stdlib.std.Resource { } const shadow = "root"; { - const $IF_LET_VALUE = shadow; - if ($IF_LET_VALUE != undefined) { - const shadow = $IF_LET_VALUE; + const $if_let_value = shadow; + if ($if_let_value != undefined) { + const shadow = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: shadow == \"root\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(shadow,"root")))}; const shadow1 = "nested"; { - const $IF_LET_VALUE = shadow1; - if ($IF_LET_VALUE != undefined) { - const shadow1 = $IF_LET_VALUE; + const $if_let_value = shadow1; + if ($if_let_value != undefined) { + const shadow1 = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: shadow1 == \"nested\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(shadow1,"nested")))}; } else { @@ -560,9 +587,9 @@ class $Root extends $stdlib.std.Resource { } const fun = ((a) => { { - const $IF_LET_VALUE = a; - if ($IF_LET_VALUE != undefined) { - const y = $IF_LET_VALUE; + const $if_let_value = a; + if ($if_let_value != undefined) { + const y = $if_let_value; return y; } else { @@ -578,9 +605,9 @@ class $Root extends $stdlib.std.Resource { {((cond) => {if (!cond) throw new Error("assertion failed: thirteen == 13")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(thirteen,13)))}; {((cond) => {if (!cond) throw new Error("assertion failed: notThere == nil")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(notThere,undefined)))}; { - const $IF_LET_VALUE = tree.left?.left; - if ($IF_LET_VALUE != undefined) { - const o = $IF_LET_VALUE; + const $if_let_value = tree.left?.left; + if ($if_let_value != undefined) { + const o = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: o.value == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(o.value,1)))}; } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md index 8f674d5b32c..0e44de21773 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md @@ -385,9 +385,9 @@ module.exports = function({ $Student }) { {((cond) => {if (!cond) throw new Error("assertion failed: studentInflight1.dob.day == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(studentInflight1.dob.day,1)))}; {((cond) => {if (!cond) throw new Error("assertion failed: studentInflight1.dob.year == 1999")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(studentInflight1.dob.year,1999)))}; { - const $IF_LET_VALUE = studentInflight1.coursesTaken; - if ($IF_LET_VALUE != undefined) { - const coursesTaken = $IF_LET_VALUE; + const $if_let_value = studentInflight1.coursesTaken; + if ($if_let_value != undefined) { + const coursesTaken = $if_let_value; const course1 = (await coursesTaken.at(0)); const course2 = (await coursesTaken.at(1)); {((cond) => {if (!cond) throw new Error("assertion failed: course1.grade == \"B\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(course1.grade,"B")))}; @@ -700,16 +700,16 @@ class $Root extends $stdlib.std.Resource { const jFoosible = ({}); const jFoosible2 = ({"f": "bar"}); { - const $IF_LET_VALUE = (Foosible.fromJson(jFoosible)).f; - if ($IF_LET_VALUE != undefined) { - const f = $IF_LET_VALUE; + const $if_let_value = (Foosible.fromJson(jFoosible)).f; + if ($if_let_value != undefined) { + const f = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: false")})(false)}; } } { - const $IF_LET_VALUE = (Foosible.fromJson(jFoosible2)).f; - if ($IF_LET_VALUE != undefined) { - const f = $IF_LET_VALUE; + const $if_let_value = (Foosible.fromJson(jFoosible2)).f; + if ($if_let_value != undefined) { + const f = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: f == \"bar\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(f,"bar")))}; } else { @@ -746,9 +746,9 @@ class $Root extends $stdlib.std.Resource { {((cond) => {if (!cond) throw new Error("assertion failed: student2.dob.day == 31")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(student2.dob.day,31)))}; {((cond) => {if (!cond) throw new Error("assertion failed: student2.dob.year == 1987")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(student2.dob.year,1987)))}; { - const $IF_LET_VALUE = student2.enrolledCourses; - if ($IF_LET_VALUE != undefined) { - const enrolledCourses = $IF_LET_VALUE; + const $if_let_value = student2.enrolledCourses; + if ($if_let_value != undefined) { + const enrolledCourses = $if_let_value; const courses = [...(enrolledCourses)]; const s2Course1 = (courses.at(0)); const s2Course2 = (courses.at(1)); @@ -764,9 +764,9 @@ class $Root extends $stdlib.std.Resource { const jStudent3 = ({"enrolled": false,"schoolId": "w/e","firstName": student2.firstName,"lastName": student2.lastName,"dob": ({"month": 1,"day": 1,"year": 1959}),"additionalData": ({"notes": "wow such notes","legacy": false,"emergencyContactsNumbers": ["123-345-9928"]})}); const student3 = (Student.fromJson(jStudent3)); { - const $IF_LET_VALUE = student3.additionalData; - if ($IF_LET_VALUE != undefined) { - const additionalData = $IF_LET_VALUE; + const $if_let_value = student3.additionalData; + if ($if_let_value != undefined) { + const additionalData = $if_let_value; const notes = (additionalData)["notes"]; {((cond) => {if (!cond) throw new Error("assertion failed: notes == \"wow such notes\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(notes,"wow such notes")))}; } @@ -776,9 +776,9 @@ class $Root extends $stdlib.std.Resource { } const invalidStudent = ({"firstName": "I dont have","lastName": "Any other info"}); { - const $IF_LET_VALUE = (() => { try { return Student.fromJson(invalidStudent); } catch { return undefined; }})();; - if ($IF_LET_VALUE != undefined) { - const student = $IF_LET_VALUE; + const $if_let_value = (() => { try { return Student.fromJson(invalidStudent); } catch { return undefined; }})();; + if ($if_let_value != undefined) { + const student = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: false")})(false)}; } else { @@ -786,9 +786,9 @@ class $Root extends $stdlib.std.Resource { } } { - const $IF_LET_VALUE = (() => { try { return Student.fromJson(jStudent2); } catch { return undefined; }})();; - if ($IF_LET_VALUE != undefined) { - const student = $IF_LET_VALUE; + const $if_let_value = (() => { try { return Student.fromJson(jStudent2); } catch { return undefined; }})();; + if ($if_let_value != undefined) { + const student = $if_let_value; {((cond) => {if (!cond) throw new Error("assertion failed: student.firstName == \"Sally\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(student.firstName,"Sally")))}; {((cond) => {if (!cond) throw new Error("assertion failed: student.lastName == \"Reynolds\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(student.lastName,"Reynolds")))}; {((cond) => {if (!cond) throw new Error("assertion failed: !student.enrolled")})((!student.enrolled))}; From 554920dab53aa421d951346be1dac7f54a5ffb31 Mon Sep 17 00:00:00 2001 From: Chris Rybicki Date: Fri, 25 Aug 2023 12:12:56 -0400 Subject: [PATCH 12/48] fix(sdk): missing sourceModule info (#3968) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes a regression from https://github.com/winglang/wing/pull/3884 - tree.json was no longer being emitted with `sourceModule` information, causing some issues in the Wing Console. Thanks @polamoros for catching this 🙏 ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- libs/wingsdk/src/core/tree.ts | 7 +++++++ .../test/target-sim/__snapshots__/api.test.ts.snap | 14 ++++++++++++++ .../__snapshots__/file-counter.test.ts.snap | 1 + .../__snapshots__/on-deploy.test.ts.snap | 1 + .../target-sim/__snapshots__/queue.test.ts.snap | 6 ++++++ .../target-sim/__snapshots__/schedule.test.ts.snap | 3 +++ .../target-sim/__snapshots__/service.test.ts.snap | 1 + 7 files changed, 33 insertions(+) diff --git a/libs/wingsdk/src/core/tree.ts b/libs/wingsdk/src/core/tree.ts index 9bbd9fbce47..7bcf2a103eb 100644 --- a/libs/wingsdk/src/core/tree.ts +++ b/libs/wingsdk/src/core/tree.ts @@ -62,6 +62,12 @@ export interface DisplayInfo { * @default false (visible) */ readonly hidden?: boolean; + + /** + * The source file or library where the construct was defined. + * @default - no source information + */ + readonly sourceModule?: string; } /** @@ -159,6 +165,7 @@ function synthDisplay(construct: IConstruct): DisplayInfo | undefined { title: display.title, description: display.description, hidden: display.hidden, + sourceModule: display.sourceModule, }; } return; diff --git a/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap index 135e8f3fe48..b5fb8f6d08e 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap @@ -158,6 +158,7 @@ return class Handler { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -346,6 +347,7 @@ return class Handler { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -534,6 +536,7 @@ return class Handler { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -722,6 +725,7 @@ return class Handler { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -910,6 +914,7 @@ return class Handler { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -1230,6 +1235,7 @@ return class Handler { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -1416,6 +1422,7 @@ return class Handler { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -1692,6 +1699,7 @@ return class Handler { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-7c48a9f0", @@ -1704,6 +1712,7 @@ return class Handler { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "post()", }, "id": "OnRequestHandler-f6d90a7f", @@ -1982,6 +1991,7 @@ return class Handler { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-7c48a9f0", @@ -1994,6 +2004,7 @@ return class Handler { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-f6d90a7f", @@ -2182,6 +2193,7 @@ return class Handler { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -2379,6 +2391,7 @@ return class Handler { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "get()", }, "id": "OnRequestHandler-e645076f", @@ -2567,6 +2580,7 @@ return class Handler { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "post()", }, "id": "OnRequestHandler-e645076f", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/file-counter.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/file-counter.test.ts.snap index 6ca224e353a..a916baf1a5a 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/file-counter.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/file-counter.test.ts.snap @@ -201,6 +201,7 @@ bucket: (function(env) { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "setConsumer()", }, "id": "Queue-SetConsumer-401ee792", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/on-deploy.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/on-deploy.test.ts.snap index 7357e557fec..217b4af668b 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/on-deploy.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/on-deploy.test.ts.snap @@ -90,6 +90,7 @@ return class Handler { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "Function", }, "id": "Function", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/queue.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/queue.test.ts.snap index 29bb5c6f7f0..69b04c08221 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/queue.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/queue.test.ts.snap @@ -221,6 +221,7 @@ async handle(message) { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "setConsumer()", }, "id": "my_queue-SetConsumer-e645076f", @@ -414,6 +415,7 @@ async handle(message) { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "setConsumer()", }, "id": "my_queue-SetConsumer-e645076f", @@ -608,6 +610,7 @@ async handle(message) { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "setConsumer()", }, "id": "my_queue-SetConsumer-e645076f", @@ -938,6 +941,7 @@ async handle(message) { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "setConsumer()", }, "id": "my_queue-SetConsumer-e645076f", @@ -975,6 +979,7 @@ async handle(message) { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "Function", }, "id": "Function", @@ -1156,6 +1161,7 @@ async handle(message) { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "setConsumer()", }, "id": "my_queue-SetConsumer-e645076f", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/schedule.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/schedule.test.ts.snap index 37abcc55723..a65964f99c6 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/schedule.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/schedule.test.ts.snap @@ -187,6 +187,7 @@ console.log(\\"Hello from schedule!\\"); }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "onTick()", }, "id": "my_schedule-OnTick-e645076f", @@ -358,6 +359,7 @@ console.log(\\"Hello from schedule!\\"); }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "onTick()", }, "id": "my_schedule-OnTick-e645076f", @@ -529,6 +531,7 @@ console.log(\\"Hello from schedule!\\"); }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "onTick()", }, "id": "my_schedule-OnTick-e645076f", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/service.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/service.test.ts.snap index e2a7ee5146f..00584b3f08b 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/service.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/service.test.ts.snap @@ -121,6 +121,7 @@ async handle(message) { }, "display": { "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", "title": "onStart()", }, "id": "my_service-ServiceOnStartef2b13b9", From 2b2aa817bef5f56c56c8a0d02961858dd47c5860 Mon Sep 17 00:00:00 2001 From: Chris Rybicki Date: Fri, 25 Aug 2023 15:18:54 -0400 Subject: [PATCH 13/48] chore(compiler): make preflight.js more self-contained (#3972) Currently the `preflight.js` files generated by Wing contain a reference to a value named `$plugins` which has to be injected by a NodeJS VM. Because of this, it's not possible to run `node path/to/.wing/preflight.js` for debugging purposes without manually editing the file to stub in a fake value. I've removed the need to inject this value by passing the list of plugin paths through an environment variable instead. ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- libs/wingc/src/jsify.rs | 11 ++++++--- ...methods_and_properties_on_collections.snap | 1 + .../access_property_on_primitive.snap | 1 + ...rty_on_value_returned_from_collection.snap | 1 + .../base_class_captures_inflight.snap | 1 + .../base_class_captures_preflight.snap | 1 + .../snapshots/base_class_lift_indirect.snap | 1 + .../base_class_with_fields_inflight.snap | 1 + .../base_class_with_fields_preflight.snap | 1 + .../base_class_with_lifted_field_object.snap | 1 + .../base_class_with_lifted_fields.snap | 1 + libs/wingc/src/jsify/snapshots/builtins.snap | 1 + ..._static_inflight_from_static_inflight.snap | 1 + .../calls_methods_on_preflight_object.snap | 1 + ...pture_from_inside_an_inflight_closure.snap | 1 + ...entifier_closure_from_preflight_scope.snap | 1 + ...pture_identifier_from_preflight_scope.snap | 1 + ...from_preflight_scope_with_method_call.snap | 1 + ...om_preflight_scope_with_nested_object.snap | 1 + ...er_from_preflight_scope_with_property.snap | 1 + .../snapshots/capture_in_keyword_args.snap | 1 + .../capture_object_with_this_in_name.snap | 1 + .../src/jsify/snapshots/capture_token.snap | 1 + ...type_inflight_class_sibling_from_init.snap | 1 + ...pe_inflight_class_sibling_from_method.snap | 1 + ...e_new_inflight_class_inner_no_capture.snap | 1 + ...capture_type_new_inflight_class_outer.snap | 1 + .../snapshots/capture_type_static_method.snap | 1 + ...ure_type_static_method_inflight_class.snap | 1 + .../capture_var_from_method_inflight.snap | 1 + ...ht_class_extends_outer_inflight_class.snap | 1 + .../src/jsify/snapshots/closure_field.snap | 1 + .../wingc/src/jsify/snapshots/enum_value.snap | 1 + .../free_inflight_obj_from_inflight.snap | 1 + .../free_preflight_object_from_preflight.snap | 1 + .../jsify/snapshots/func_returns_func.snap | 1 + .../src/jsify/snapshots/identify_field.snap | 1 + .../implicit_lift_inflight_init.snap | 1 + .../src/jsify/snapshots/indirect_capture.snap | 1 + ..._extends_both_inside_inflight_closure.snap | 1 + ...inflight_class_extends_inflight_class.snap | 1 + .../jsify/snapshots/inflight_constructor.snap | 1 + .../src/jsify/snapshots/inflight_field.snap | 1 + .../inflight_field_from_inflight.snap | 1 + .../inflight_field_from_inflight_class.snap | 1 + .../snapshots/inline_inflight_class.snap | 1 + .../src/jsify/snapshots/json_object.snap | 1 + ...ary_preflight_and_inflight_expression.snap | 1 + .../lift_binary_preflight_expression.snap | 1 + ...lift_element_from_collection_as_field.snap | 1 + ...ft_element_from_collection_of_objects.snap | 1 + .../snapshots/lift_inflight_closure.snap | 1 + .../lift_inside_preflight_method.snap | 1 + .../src/jsify/snapshots/lift_string.snap | 1 + libs/wingc/src/jsify/snapshots/lift_this.snap | 1 + .../jsify/snapshots/lift_var_with_this.snap | 1 + .../src/jsify/snapshots/lift_via_closure.snap | 1 + .../lift_via_closure_class_explicit.snap | 1 + .../namespaced_static_from_inflight.snap | 1 + ...ed_inflight_after_preflight_operation.snap | 1 + .../snapshots/nested_preflight_operation.snap | 1 + .../jsify/snapshots/new_inflight_object.snap | 1 + .../snapshots/no_capture_inside_methods.snap | 1 + ...apture_of_identifier_from_inner_scope.snap | 1 + ...capture_of_identifier_from_same_scope.snap | 1 + ...no_capture_shadow_inside_inner_scopes.snap | 1 + .../no_lift_shadow_inside_inner_scopes.snap | 1 + ...eflight_class_extends_preflight_class.snap | 1 + .../jsify/snapshots/preflight_collection.snap | 1 + ...light_collection_of_preflight_objects.snap | 1 + ...eflight_nested_object_with_operations.snap | 1 + .../src/jsify/snapshots/preflight_object.snap | 1 + .../preflight_object_through_property.snap | 1 + .../preflight_object_with_operations.snap | 1 + ...ject_with_operations_multiple_methods.snap | 1 + .../snapshots/preflight_value_field.snap | 1 + .../jsify/snapshots/read_primitive_value.snap | 1 + .../snapshots/reassign_captured_variable.snap | 1 + ...eassigned_captured_variable_preflight.snap | 1 + .../src/jsify/snapshots/ref_std_macro.snap | 1 + .../reference_from_static_inflight.snap | 1 + .../snapshots/reference_inflight_class.snap | 1 + .../snapshots/reference_inflight_field.snap | 1 + .../reference_inflight_from_inflight.snap | 1 + .../snapshots/reference_preflight_field.snap | 1 + ...eflight_field_call_independent_method.snap | 1 + .../snapshots/reference_preflight_fields.snap | 1 + ..._variable_with_this_in_the_expression.snap | 1 + ...preflight_object_from_static_inflight.snap | 1 + .../snapshots/reference_static_inflight.snap | 1 + ...ght_which_references_preflight_object.snap | 1 + .../static_external_inflight_class.snap | 1 + .../static_external_preflight_class.snap | 1 + .../snapshots/static_inflight_operation.snap | 1 + .../static_local_inflight_class.snap | 1 + .../jsify/snapshots/static_on_std_type.snap | 1 + .../jsify/snapshots/transitive_reference.snap | 1 + ...ansitive_reference_via_inflight_class.snap | 1 + .../transitive_reference_via_static.snap | 1 + .../jsify/snapshots/two_identical_lifts.snap | 1 + .../unqualified_lift_of_collection.snap | 1 + .../jsify/snapshots/use_util_functions.snap | 1 + .../var_inflight_field_from_inflight.snap | 1 + libs/wingc/src/jsify/snapshots/wait_util.snap | 1 + libs/wingcompiler/src/compile.ts | 8 +++---- tools/hangar/__snapshots__/error.ts.snap | 24 +++++++++---------- .../sdk_tests/api/delete.w_compile_tf-aws.md | 1 + .../sdk_tests/api/get.w_compile_tf-aws.md | 1 + .../sdk_tests/api/options.w_compile_tf-aws.md | 1 + .../sdk_tests/api/patch.w_compile_tf-aws.md | 1 + .../sdk_tests/api/post.w_compile_tf-aws.md | 1 + .../sdk_tests/api/put.w_compile_tf-aws.md | 1 + .../bucket/add_file.w_compile_tf-aws.md | 1 + .../bucket/add_object.w_compile_tf-aws.md | 1 + .../bucket/bucket_list.w_compile_tf-aws.md | 1 + .../bucket/delete.w_compile_tf-aws.md | 1 + .../bucket/events.w_compile_tf-aws.md | 1 + .../bucket/exists.w_compile_tf-aws.md | 1 + .../bucket/public_url.w_compile_tf-aws.md | 1 + .../sdk_tests/bucket/put.w_compile_tf-aws.md | 1 + .../bucket/put_json.w_compile_tf-aws.md | 1 + .../bucket/try_delete.w_compile_tf-aws.md | 1 + .../bucket/try_get.w_compile_tf-aws.md | 1 + .../bucket/try_get_json.w_compile_tf-aws.md | 1 + .../sdk_tests/counter/dec.w_compile_tf-aws.md | 1 + .../sdk_tests/counter/inc.w_compile_tf-aws.md | 1 + .../counter/initial.w_compile_tf-aws.md | 1 + .../counter/peek.w_compile_tf-aws.md | 1 + .../sdk_tests/counter/set.w_compile_tf-aws.md | 1 + .../function/invoke.w_compile_tf-aws.md | 1 + .../function/logging.w_compile_tf-aws.md | 1 + .../memory_and_env.w_compile_tf-aws.md | 1 + .../sdk_tests/math/abs.w_compile_tf-aws.md | 1 + .../sdk_tests/math/acos.w_compile_tf-aws.md | 1 + .../sdk_tests/math/acot.w_compile_tf-aws.md | 1 + .../sdk_tests/math/acsc.w_compile_tf-aws.md | 1 + .../angular_conversion.w_compile_tf-aws.md | 1 + .../sdk_tests/math/asec.w_compile_tf-aws.md | 1 + .../sdk_tests/math/asin.w_compile_tf-aws.md | 1 + .../sdk_tests/math/atan.w_compile_tf-aws.md | 1 + .../sdk_tests/math/atan2.w_compile_tf-aws.md | 1 + .../math/combinations.w_compile_tf-aws.md | 1 + .../sdk_tests/math/cos.w_compile_tf-aws.md | 1 + .../sdk_tests/math/cot.w_compile_tf-aws.md | 1 + .../sdk_tests/math/csc.w_compile_tf-aws.md | 1 + .../sdk_tests/math/euler.w_compile_tf-aws.md | 1 + .../math/factorial.w_compile_tf-aws.md | 1 + .../math/fibonacci.w_compile_tf-aws.md | 1 + .../math/floor_ceil_round.w_compile_tf-aws.md | 1 + .../sdk_tests/math/hypot.w_compile_tf-aws.md | 1 + .../math/median_mode_mean.w_compile_tf-aws.md | 1 + .../math/min_max.w_compile_tf-aws.md | 1 + .../sdk_tests/math/pi.w_compile_tf-aws.md | 1 + .../sdk_tests/math/prime.w_compile_tf-aws.md | 1 + .../sdk_tests/math/random.w_compile_tf-aws.md | 1 + .../sdk_tests/math/sec.w_compile_tf-aws.md | 1 + .../sdk_tests/math/sin.w_compile_tf-aws.md | 1 + .../sdk_tests/math/sqrt.w_compile_tf-aws.md | 1 + .../sdk_tests/math/tan.w_compile_tf-aws.md | 1 + .../sdk_tests/math/tau.w_compile_tf-aws.md | 1 + .../execute_after.w_compile_tf-aws.md | 1 + .../sdk_tests/queue/pop.w_compile_tf-aws.md | 1 + .../sdk_tests/queue/purge.w_compile_tf-aws.md | 1 + .../queue/set_consumer.w_compile_tf-aws.md | 1 + .../schedule/on_tick.w_compile_tf-aws.md | 1 + .../sdk_tests/std/array.w_compile_tf-aws.md | 1 + .../sdk_tests/std/bool.w_compile_tf-aws.md | 1 + .../std/datetime.w_compile_tf-aws.md | 1 + .../std/duration.w_compile_tf-aws.md | 1 + .../sdk_tests/std/json.w_compile_tf-aws.md | 1 + .../sdk_tests/std/map.w_compile_tf-aws.md | 1 + .../sdk_tests/std/number.w_compile_tf-aws.md | 1 + .../sdk_tests/std/range.w_compile_tf-aws.md | 1 + .../sdk_tests/std/set.w_compile_tf-aws.md | 1 + .../sdk_tests/std/string.w_compile_tf-aws.md | 1 + .../table/add_row.w_compile_tf-aws.md | 1 + .../sdk_tests/table/list.w_compile_tf-aws.md | 1 + .../topic/on_message.w_compile_tf-aws.md | 1 + .../sdk_tests/util/base64.w_compile_tf-aws.md | 1 + .../sdk_tests/util/env.w_compile_tf-aws.md | 1 + .../sdk_tests/util/nanoid.w_compile_tf-aws.md | 1 + .../sdk_tests/util/sha256.w_compile_tf-aws.md | 1 + .../sdk_tests/util/sleep.w_compile_tf-aws.md | 1 + .../sdk_tests/util/uuidv4.w_compile_tf-aws.md | 1 + .../util/wait-until.w_compile_tf-aws.md | 1 + .../website/two_websites.w_compile_tf-aws.md | 1 + .../website/website.w_compile_tf-aws.md | 1 + .../valid/anon_function.w_compile_tf-aws.md | 1 + .../test_corpus/valid/api.w_compile_tf-aws.md | 1 + .../valid/api_path_vars.w_compile_tf-aws.md | 1 + .../valid/api_valid_path.w_compile_tf-aws.md | 1 + .../valid/assert.w_compile_tf-aws.md | 1 + ...cit_await_in_functions.w_compile_tf-aws.md | 1 + .../test_corpus/valid/baz.w_compile_tf-aws.md | 1 + .../valid/bring_awscdk.w_compile_tf-aws.md | 1 + .../valid/bring_cdktf.w_compile_tf-aws.md | 1 + .../valid/bring_jsii.w_compile_tf-aws.md | 1 + .../valid/bring_jsii_path.w_compile_tf-aws.md | 1 + .../valid/bring_local.w_compile_tf-aws.md | 1 + ...ng_local_normalization.w_compile_tf-aws.md | 1 + .../valid/bring_projen.w_compile_tf-aws.md | 1 + .../valid/bucket_events.w_compile_tf-aws.md | 1 + .../valid/bucket_keys.w_compile_tf-aws.md | 1 + .../call_static_of_myself.w_compile_tf-aws.md | 1 + ...ling_inflight_variants.w_compile_tf-aws.md | 1 + .../capture_containers.w_compile_tf-aws.md | 1 + .../capture_in_binary.w_compile_tf-aws.md | 1 + .../capture_mutables.w_compile_tf-aws.md | 1 + .../capture_primitives.w_compile_tf-aws.md | 1 + ...eassigable_class_field.w_compile_tf-aws.md | 1 + .../capture_reassignable.w_compile_tf-aws.md | 1 + ...ture_resource_and_data.w_compile_tf-aws.md | 1 + ...ource_with_no_inflight.w_compile_tf-aws.md | 1 + .../valid/capture_tokens.w_compile_tf-aws.md | 1 + .../valid/captures.w_compile_tf-aws.md | 1 + .../valid/class.w_compile_tf-aws.md | 1 + .../valid/closure_class.w_compile_tf-aws.md | 1 + .../valid/construct-base.w_compile_tf-aws.md | 1 + .../valid/container_types.w_compile_tf-aws.md | 1 + .../valid/custom_obj_id.w_compile_tf-aws.md | 1 + .../valid/debug_env.w_compile_tf-aws.md | 1 + .../valid/deep_equality.w_compile_tf-aws.md | 1 + .../double_reference.w_compile_tf-aws.md | 1 + .../valid/doubler.w_compile_tf-aws.md | 1 + .../valid/enums.w_compile_tf-aws.md | 1 + ...sions_binary_operators.w_compile_tf-aws.md | 1 + ...s_string_interpolation.w_compile_tf-aws.md | 1 + .../extern_implementation.w_compile_tf-aws.md | 1 + .../valid/file_counter.w_compile_tf-aws.md | 1 + .../valid/for_loop.w_compile_tf-aws.md | 1 + .../valid/forward_decl.w_compile_tf-aws.md | 1 + ...ction_returns_function.w_compile_tf-aws.md | 1 + .../valid/function_type.w_compile_tf-aws.md | 1 + ...ion_variadic_arguments.w_compile_tf-aws.md | 1 + .../valid/hello.w_compile_tf-aws.md | 1 + .../identical_inflights.w_compile_tf-aws.md | 1 + .../valid/impl_interface.w_compile_tf-aws.md | 1 + .../valid/implicit_std.w_compile_tf-aws.md | 1 + .../valid/inference.w_compile_tf-aws.md | 1 + .../inflight-subscribers.w_compile_tf-aws.md | 1 + ...nflight_capture_static.w_compile_tf-aws.md | 1 + ...lass_as_struct_members.w_compile_tf-aws.md | 1 + ...ht_class_capture_const.w_compile_tf-aws.md | 1 + ...pture_preflight_object.w_compile_tf-aws.md | 1 + ...ight_class_definitions.w_compile_tf-aws.md | 1 + ..._inner_capture_mutable.w_compile_tf-aws.md | 1 + ...nside_inflight_closure.w_compile_tf-aws.md | 1 + ...flight_class_modifiers.w_compile_tf-aws.md | 1 + ...tside_inflight_closure.w_compile_tf-aws.md | 1 + ...tural_interace_handler.w_compile_tf-aws.md | 1 + ...ght_class_without_init.w_compile_tf-aws.md | 1 + .../valid/inflight_concat.w_compile_tf-aws.md | 1 + ...ghts_calling_inflights.w_compile_tf-aws.md | 1 + .../valid/interface.w_compile_tf-aws.md | 1 + .../valid/issue_2889.w_compile_tf-aws.md | 1 + .../valid/json.w_compile_tf-aws.md | 1 + .../valid/json_bucket.w_compile_tf-aws.md | 1 + .../valid/json_static.w_compile_tf-aws.md | 1 + ...n_string_interpolation.w_compile_tf-aws.md | 1 + .../lift_expr_with_this.w_compile_tf-aws.md | 1 + .../lift_redefinition.w_compile_tf-aws.md | 1 + .../valid/lift_this.w_compile_tf-aws.md | 1 + .../lift_via_closure.w_compile_tf-aws.md | 1 + ...t_via_closure_explicit.w_compile_tf-aws.md | 1 + .../mut_container_types.w_compile_tf-aws.md | 1 + .../test_corpus/valid/nil.w_compile_tf-aws.md | 1 + .../valid/optionals.w_compile_tf-aws.md | 1 + .../primitive_methods.w_compile_tf-aws.md | 1 + .../valid/print.w_compile_tf-aws.md | 1 + .../valid/reassignment.w_compile_tf-aws.md | 1 + .../valid/redis.w_compile_tf-aws.md | 1 + .../valid/resource.w_compile_tf-aws.md | 1 + ...ce_as_inflight_literal.w_compile_tf-aws.md | 1 + .../resource_call_static.w_compile_tf-aws.md | 1 + .../resource_captures.w_compile_tf-aws.md | 1 + ...ource_captures_globals.w_compile_tf-aws.md | 1 + .../valid/service.w_compile_tf-aws.md | 1 + .../valid/shadowing.w_compile_tf-aws.md | 1 + .../valid/statements_if.w_compile_tf-aws.md | 1 + ..._variable_declarations.w_compile_tf-aws.md | 1 + .../valid/static_members.w_compile_tf-aws.md | 1 + .../valid/std_containers.w_compile_tf-aws.md | 1 + .../valid/std_string.w_compile_tf-aws.md | 1 + .../valid/store.w_compile_tf-aws.md | 1 + .../struct_from_json.w_compile_tf-aws.md | 1 + .../valid/structs.w_compile_tf-aws.md | 1 + .../valid/super_call.w_compile_tf-aws.md | 1 + .../valid/symbol_shadow.w_compile_tf-aws.md | 1 + .../valid/table.w_compile_tf-aws.md | 1 + .../valid/test_bucket.w_compile_tf-aws.md | 1 + .../test_without_bring.w_compile_tf-aws.md | 1 + .../valid/try_catch.w_compile_tf-aws.md | 1 + ...od_inside_init_closure.w_compile_tf-aws.md | 1 + .../website_with_api.w_compile_tf-aws.md | 1 + .../valid/while.w_compile_tf-aws.md | 1 + .../while_loop_await.w_compile_tf-aws.md | 1 + tools/hangar/src/unsupported.test.ts | 2 +- 297 files changed, 318 insertions(+), 20 deletions(-) diff --git a/libs/wingc/src/jsify.rs b/libs/wingc/src/jsify.rs index fb817bda645..57474367b1a 100644 --- a/libs/wingc/src/jsify.rs +++ b/libs/wingc/src/jsify.rs @@ -43,6 +43,7 @@ const STDLIB_MODULE: &str = WINGSDK_ASSEMBLY_NAME; const ENV_WING_IS_TEST: &str = "$wing_is_test"; const OUTDIR_VAR: &str = "$outdir"; +const PLUGINS_VAR: &str = "$plugins"; const ROOT_CLASS: &str = "$Root"; const JS_CONSTRUCTOR: &str = "constructor"; @@ -140,8 +141,11 @@ impl<'a> JSifier<'a> { if is_entrypoint_file { output.line(format!("const {} = require('{}');", STDLIB, STDLIB_MODULE)); + output.line(format!( + "const {} = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS);", + PLUGINS_VAR + )); output.line(format!("const {} = process.env.WING_SYNTH_DIR ?? \".\";", OUTDIR_VAR)); - // "std" is implicitly imported output.line(format!( "const {} = process.env.WING_IS_TEST === \"true\";", ENV_WING_IS_TEST @@ -150,6 +154,7 @@ impl<'a> JSifier<'a> { output.open(format!("module.exports = function({{ {} }}) {{", STDLIB)); } + // "std" is implicitly imported output.line(format!("const std = {STDLIB}.{WINGSDK_STD_MODULE};")); output.add_code(imports); @@ -166,8 +171,8 @@ impl<'a> JSifier<'a> { output.line("const $App = $stdlib.core.App.for(process.env.WING_TARGET);".to_string()); let app_name = self.entrypoint_file_path.file_stem().unwrap().to_string_lossy(); output.line(format!( - "new $App({{ outdir: {}, name: \"{}\", rootConstruct: {}, plugins: $plugins, isTestEnvironment: {}, entrypointDir: process.env['WING_SOURCE_DIR'], rootId: process.env['WING_ROOT_ID'] }}).synth();", - OUTDIR_VAR, app_name, ROOT_CLASS, ENV_WING_IS_TEST + "new $App({{ outdir: {}, name: \"{}\", rootConstruct: {}, plugins: {}, isTestEnvironment: {}, entrypointDir: process.env['WING_SOURCE_DIR'], rootId: process.env['WING_ROOT_ID'] }}).synth();", + OUTDIR_VAR, app_name, ROOT_CLASS, PLUGINS_VAR, ENV_WING_IS_TEST )); } else { output.add_code(js); diff --git a/libs/wingc/src/jsify/snapshots/access_methods_and_properties_on_collections.snap b/libs/wingc/src/jsify/snapshots/access_methods_and_properties_on_collections.snap index edacc5a06b0..fe6b98d8651 100644 --- a/libs/wingc/src/jsify/snapshots/access_methods_and_properties_on_collections.snap +++ b/libs/wingc/src/jsify/snapshots/access_methods_and_properties_on_collections.snap @@ -38,6 +38,7 @@ module.exports = function({ $_y_at_0__, $x_length }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/access_property_on_primitive.snap b/libs/wingc/src/jsify/snapshots/access_property_on_primitive.snap index 71362ff2189..4714c7bc230 100644 --- a/libs/wingc/src/jsify/snapshots/access_property_on_primitive.snap +++ b/libs/wingc/src/jsify/snapshots/access_property_on_primitive.snap @@ -35,6 +35,7 @@ module.exports = function({ $s_length }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/access_property_on_value_returned_from_collection.snap b/libs/wingc/src/jsify/snapshots/access_property_on_value_returned_from_collection.snap index 272b8abb75c..52d701c8d10 100644 --- a/libs/wingc/src/jsify/snapshots/access_property_on_value_returned_from_collection.snap +++ b/libs/wingc/src/jsify/snapshots/access_property_on_value_returned_from_collection.snap @@ -35,6 +35,7 @@ module.exports = function({ $_s___hello___length }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/base_class_captures_inflight.snap b/libs/wingc/src/jsify/snapshots/base_class_captures_inflight.snap index ffd29a776f5..e4cb52a7035 100644 --- a/libs/wingc/src/jsify/snapshots/base_class_captures_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/base_class_captures_inflight.snap @@ -56,6 +56,7 @@ module.exports = function({ $Base }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/base_class_captures_preflight.snap b/libs/wingc/src/jsify/snapshots/base_class_captures_preflight.snap index 5b15601affd..b10451c2573 100644 --- a/libs/wingc/src/jsify/snapshots/base_class_captures_preflight.snap +++ b/libs/wingc/src/jsify/snapshots/base_class_captures_preflight.snap @@ -50,6 +50,7 @@ module.exports = function({ $Base }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/base_class_lift_indirect.snap b/libs/wingc/src/jsify/snapshots/base_class_lift_indirect.snap index 4169ed6c761..1b8f5ea0d87 100644 --- a/libs/wingc/src/jsify/snapshots/base_class_lift_indirect.snap +++ b/libs/wingc/src/jsify/snapshots/base_class_lift_indirect.snap @@ -64,6 +64,7 @@ module.exports = function({ $Base }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/base_class_with_fields_inflight.snap b/libs/wingc/src/jsify/snapshots/base_class_with_fields_inflight.snap index 75836d2aa36..ff1a9d66a57 100644 --- a/libs/wingc/src/jsify/snapshots/base_class_with_fields_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/base_class_with_fields_inflight.snap @@ -65,6 +65,7 @@ module.exports = function({ $Base }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/base_class_with_fields_preflight.snap b/libs/wingc/src/jsify/snapshots/base_class_with_fields_preflight.snap index 9c10d1dd5fb..97329763e41 100644 --- a/libs/wingc/src/jsify/snapshots/base_class_with_fields_preflight.snap +++ b/libs/wingc/src/jsify/snapshots/base_class_with_fields_preflight.snap @@ -55,6 +55,7 @@ module.exports = function({ $Base }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/base_class_with_lifted_field_object.snap b/libs/wingc/src/jsify/snapshots/base_class_with_lifted_field_object.snap index 714e156e925..fd2757e8668 100644 --- a/libs/wingc/src/jsify/snapshots/base_class_with_lifted_field_object.snap +++ b/libs/wingc/src/jsify/snapshots/base_class_with_lifted_field_object.snap @@ -55,6 +55,7 @@ module.exports = function({ $Base }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/base_class_with_lifted_fields.snap b/libs/wingc/src/jsify/snapshots/base_class_with_lifted_fields.snap index 7a48375e64d..4336a445f65 100644 --- a/libs/wingc/src/jsify/snapshots/base_class_with_lifted_fields.snap +++ b/libs/wingc/src/jsify/snapshots/base_class_with_lifted_fields.snap @@ -55,6 +55,7 @@ module.exports = function({ $Base }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/builtins.snap b/libs/wingc/src/jsify/snapshots/builtins.snap index a614e150060..22b8b4d90b6 100644 --- a/libs/wingc/src/jsify/snapshots/builtins.snap +++ b/libs/wingc/src/jsify/snapshots/builtins.snap @@ -33,6 +33,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/call_static_inflight_from_static_inflight.snap b/libs/wingc/src/jsify/snapshots/call_static_inflight_from_static_inflight.snap index 8baff267302..c09e128ac8a 100644 --- a/libs/wingc/src/jsify/snapshots/call_static_inflight_from_static_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/call_static_inflight_from_static_inflight.snap @@ -49,6 +49,7 @@ module.exports = function({ $A }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/calls_methods_on_preflight_object.snap b/libs/wingc/src/jsify/snapshots/calls_methods_on_preflight_object.snap index 0df2a2b1526..59430bde2b5 100644 --- a/libs/wingc/src/jsify/snapshots/calls_methods_on_preflight_object.snap +++ b/libs/wingc/src/jsify/snapshots/calls_methods_on_preflight_object.snap @@ -38,6 +38,7 @@ module.exports = function({ $b }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/capture_from_inside_an_inflight_closure.snap b/libs/wingc/src/jsify/snapshots/capture_from_inside_an_inflight_closure.snap index 8633c670474..92333ca78fb 100644 --- a/libs/wingc/src/jsify/snapshots/capture_from_inside_an_inflight_closure.snap +++ b/libs/wingc/src/jsify/snapshots/capture_from_inside_an_inflight_closure.snap @@ -39,6 +39,7 @@ module.exports = function({ $foo }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/capture_identifier_closure_from_preflight_scope.snap b/libs/wingc/src/jsify/snapshots/capture_identifier_closure_from_preflight_scope.snap index 385d889d748..9cb047e6911 100644 --- a/libs/wingc/src/jsify/snapshots/capture_identifier_closure_from_preflight_scope.snap +++ b/libs/wingc/src/jsify/snapshots/capture_identifier_closure_from_preflight_scope.snap @@ -51,6 +51,7 @@ module.exports = function({ $foo }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope.snap b/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope.snap index a05245109e3..27e023ca566 100644 --- a/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope.snap +++ b/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope.snap @@ -34,6 +34,7 @@ module.exports = function({ $x }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_method_call.snap b/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_method_call.snap index fd4d7d9877f..b3c3590d331 100644 --- a/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_method_call.snap +++ b/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_method_call.snap @@ -52,6 +52,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_nested_object.snap b/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_nested_object.snap index 99f04e96351..5b6c73b029c 100644 --- a/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_nested_object.snap +++ b/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_nested_object.snap @@ -55,6 +55,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_property.snap b/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_property.snap index 7da2fa75bbc..fdc704d034c 100644 --- a/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_property.snap +++ b/libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope_with_property.snap @@ -34,6 +34,7 @@ module.exports = function({ $x_length }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/capture_in_keyword_args.snap b/libs/wingc/src/jsify/snapshots/capture_in_keyword_args.snap index a30234386a4..c718f960da2 100644 --- a/libs/wingc/src/jsify/snapshots/capture_in_keyword_args.snap +++ b/libs/wingc/src/jsify/snapshots/capture_in_keyword_args.snap @@ -39,6 +39,7 @@ module.exports = function({ $util_Util, $x }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/capture_object_with_this_in_name.snap b/libs/wingc/src/jsify/snapshots/capture_object_with_this_in_name.snap index 3013d6d5c27..da7814e5f68 100644 --- a/libs/wingc/src/jsify/snapshots/capture_object_with_this_in_name.snap +++ b/libs/wingc/src/jsify/snapshots/capture_object_with_this_in_name.snap @@ -35,6 +35,7 @@ module.exports = function({ $bucket_this }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/capture_token.snap b/libs/wingc/src/jsify/snapshots/capture_token.snap index 8266ff4a019..58ae345f8a8 100644 --- a/libs/wingc/src/jsify/snapshots/capture_token.snap +++ b/libs/wingc/src/jsify/snapshots/capture_token.snap @@ -34,6 +34,7 @@ module.exports = function({ $api_url }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/capture_type_inflight_class_sibling_from_init.snap b/libs/wingc/src/jsify/snapshots/capture_type_inflight_class_sibling_from_init.snap index 3c01f7aad4a..3e00fee1225 100644 --- a/libs/wingc/src/jsify/snapshots/capture_type_inflight_class_sibling_from_init.snap +++ b/libs/wingc/src/jsify/snapshots/capture_type_inflight_class_sibling_from_init.snap @@ -56,6 +56,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/capture_type_inflight_class_sibling_from_method.snap b/libs/wingc/src/jsify/snapshots/capture_type_inflight_class_sibling_from_method.snap index 8ac3a9d4569..55254750515 100644 --- a/libs/wingc/src/jsify/snapshots/capture_type_inflight_class_sibling_from_method.snap +++ b/libs/wingc/src/jsify/snapshots/capture_type_inflight_class_sibling_from_method.snap @@ -44,6 +44,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/capture_type_new_inflight_class_inner_no_capture.snap b/libs/wingc/src/jsify/snapshots/capture_type_new_inflight_class_inner_no_capture.snap index 659be7acc5d..30ecce454d8 100644 --- a/libs/wingc/src/jsify/snapshots/capture_type_new_inflight_class_inner_no_capture.snap +++ b/libs/wingc/src/jsify/snapshots/capture_type_new_inflight_class_inner_no_capture.snap @@ -36,6 +36,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/capture_type_new_inflight_class_outer.snap b/libs/wingc/src/jsify/snapshots/capture_type_new_inflight_class_outer.snap index 2beeff39a32..6fa6842fc7d 100644 --- a/libs/wingc/src/jsify/snapshots/capture_type_new_inflight_class_outer.snap +++ b/libs/wingc/src/jsify/snapshots/capture_type_new_inflight_class_outer.snap @@ -45,6 +45,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/capture_type_static_method.snap b/libs/wingc/src/jsify/snapshots/capture_type_static_method.snap index 4e46d1be5cf..5b8ba4ee037 100644 --- a/libs/wingc/src/jsify/snapshots/capture_type_static_method.snap +++ b/libs/wingc/src/jsify/snapshots/capture_type_static_method.snap @@ -52,6 +52,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/capture_type_static_method_inflight_class.snap b/libs/wingc/src/jsify/snapshots/capture_type_static_method_inflight_class.snap index 3e16141cc42..8775dcd5873 100644 --- a/libs/wingc/src/jsify/snapshots/capture_type_static_method_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/capture_type_static_method_inflight_class.snap @@ -50,6 +50,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/capture_var_from_method_inflight.snap b/libs/wingc/src/jsify/snapshots/capture_var_from_method_inflight.snap index 96db3202ac8..befc0e638f7 100644 --- a/libs/wingc/src/jsify/snapshots/capture_var_from_method_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/capture_var_from_method_inflight.snap @@ -41,6 +41,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/closed_inflight_class_extends_outer_inflight_class.snap b/libs/wingc/src/jsify/snapshots/closed_inflight_class_extends_outer_inflight_class.snap index 130df0f7fc1..1410dd2d219 100644 --- a/libs/wingc/src/jsify/snapshots/closed_inflight_class_extends_outer_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/closed_inflight_class_extends_outer_inflight_class.snap @@ -48,6 +48,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/closure_field.snap b/libs/wingc/src/jsify/snapshots/closure_field.snap index 0eff98185c4..f8947d99ed9 100644 --- a/libs/wingc/src/jsify/snapshots/closure_field.snap +++ b/libs/wingc/src/jsify/snapshots/closure_field.snap @@ -90,6 +90,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/enum_value.snap b/libs/wingc/src/jsify/snapshots/enum_value.snap index af1c07be3e1..cb9fbac2478 100644 --- a/libs/wingc/src/jsify/snapshots/enum_value.snap +++ b/libs/wingc/src/jsify/snapshots/enum_value.snap @@ -38,6 +38,7 @@ module.exports = function({ $MyEnum, $x }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/free_inflight_obj_from_inflight.snap b/libs/wingc/src/jsify/snapshots/free_inflight_obj_from_inflight.snap index 4bb8f2c6e74..90334c5f0e5 100644 --- a/libs/wingc/src/jsify/snapshots/free_inflight_obj_from_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/free_inflight_obj_from_inflight.snap @@ -44,6 +44,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/free_preflight_object_from_preflight.snap b/libs/wingc/src/jsify/snapshots/free_preflight_object_from_preflight.snap index ac3600da5d7..6276b36b7c8 100644 --- a/libs/wingc/src/jsify/snapshots/free_preflight_object_from_preflight.snap +++ b/libs/wingc/src/jsify/snapshots/free_preflight_object_from_preflight.snap @@ -29,6 +29,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/func_returns_func.snap b/libs/wingc/src/jsify/snapshots/func_returns_func.snap index a7759c0fa39..110e6aec865 100644 --- a/libs/wingc/src/jsify/snapshots/func_returns_func.snap +++ b/libs/wingc/src/jsify/snapshots/func_returns_func.snap @@ -43,6 +43,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/identify_field.snap b/libs/wingc/src/jsify/snapshots/identify_field.snap index 7175afe48af..a0f30fa9d1d 100644 --- a/libs/wingc/src/jsify/snapshots/identify_field.snap +++ b/libs/wingc/src/jsify/snapshots/identify_field.snap @@ -38,6 +38,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/implicit_lift_inflight_init.snap b/libs/wingc/src/jsify/snapshots/implicit_lift_inflight_init.snap index 4b63453e753..e739760e70f 100644 --- a/libs/wingc/src/jsify/snapshots/implicit_lift_inflight_init.snap +++ b/libs/wingc/src/jsify/snapshots/implicit_lift_inflight_init.snap @@ -56,6 +56,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/indirect_capture.snap b/libs/wingc/src/jsify/snapshots/indirect_capture.snap index 4de1d4cb609..31ddd9efbee 100644 --- a/libs/wingc/src/jsify/snapshots/indirect_capture.snap +++ b/libs/wingc/src/jsify/snapshots/indirect_capture.snap @@ -68,6 +68,7 @@ module.exports = function({ $b }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/inflight_class_extends_both_inside_inflight_closure.snap b/libs/wingc/src/jsify/snapshots/inflight_class_extends_both_inside_inflight_closure.snap index 949b9a41d0b..882e2e9efd8 100644 --- a/libs/wingc/src/jsify/snapshots/inflight_class_extends_both_inside_inflight_closure.snap +++ b/libs/wingc/src/jsify/snapshots/inflight_class_extends_both_inside_inflight_closure.snap @@ -37,6 +37,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/inflight_class_extends_inflight_class.snap b/libs/wingc/src/jsify/snapshots/inflight_class_extends_inflight_class.snap index 9a61e3fc3b7..49881c86651 100644 --- a/libs/wingc/src/jsify/snapshots/inflight_class_extends_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/inflight_class_extends_inflight_class.snap @@ -34,6 +34,7 @@ module.exports = function({ $A }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/inflight_constructor.snap b/libs/wingc/src/jsify/snapshots/inflight_constructor.snap index 73d169b58d2..a0f5e32c12f 100644 --- a/libs/wingc/src/jsify/snapshots/inflight_constructor.snap +++ b/libs/wingc/src/jsify/snapshots/inflight_constructor.snap @@ -41,6 +41,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/inflight_field.snap b/libs/wingc/src/jsify/snapshots/inflight_field.snap index 376bdb0f912..717ed97c60a 100644 --- a/libs/wingc/src/jsify/snapshots/inflight_field.snap +++ b/libs/wingc/src/jsify/snapshots/inflight_field.snap @@ -40,6 +40,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/inflight_field_from_inflight.snap b/libs/wingc/src/jsify/snapshots/inflight_field_from_inflight.snap index d7bd03b8062..bd0fb0bce99 100644 --- a/libs/wingc/src/jsify/snapshots/inflight_field_from_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/inflight_field_from_inflight.snap @@ -39,6 +39,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/inflight_field_from_inflight_class.snap b/libs/wingc/src/jsify/snapshots/inflight_field_from_inflight_class.snap index b91ca15338d..2c72afb09c1 100644 --- a/libs/wingc/src/jsify/snapshots/inflight_field_from_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/inflight_field_from_inflight_class.snap @@ -36,6 +36,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/inline_inflight_class.snap b/libs/wingc/src/jsify/snapshots/inline_inflight_class.snap index 0ca916aedc0..8d9937f640b 100644 --- a/libs/wingc/src/jsify/snapshots/inline_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/inline_inflight_class.snap @@ -56,6 +56,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/json_object.snap b/libs/wingc/src/jsify/snapshots/json_object.snap index e247dea455c..063cc6b485f 100644 --- a/libs/wingc/src/jsify/snapshots/json_object.snap +++ b/libs/wingc/src/jsify/snapshots/json_object.snap @@ -35,6 +35,7 @@ module.exports = function({ $jsonObj1, $std_Json }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/lift_binary_preflight_and_inflight_expression.snap b/libs/wingc/src/jsify/snapshots/lift_binary_preflight_and_inflight_expression.snap index 9e888844142..b8e839f5a14 100644 --- a/libs/wingc/src/jsify/snapshots/lift_binary_preflight_and_inflight_expression.snap +++ b/libs/wingc/src/jsify/snapshots/lift_binary_preflight_and_inflight_expression.snap @@ -36,6 +36,7 @@ module.exports = function({ $x }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/lift_binary_preflight_expression.snap b/libs/wingc/src/jsify/snapshots/lift_binary_preflight_expression.snap index b8a05ac5fe5..c88265874fe 100644 --- a/libs/wingc/src/jsify/snapshots/lift_binary_preflight_expression.snap +++ b/libs/wingc/src/jsify/snapshots/lift_binary_preflight_expression.snap @@ -35,6 +35,7 @@ module.exports = function({ $x, $y }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/lift_element_from_collection_as_field.snap b/libs/wingc/src/jsify/snapshots/lift_element_from_collection_as_field.snap index a974b7568b6..9f26636aca3 100644 --- a/libs/wingc/src/jsify/snapshots/lift_element_from_collection_as_field.snap +++ b/libs/wingc/src/jsify/snapshots/lift_element_from_collection_as_field.snap @@ -39,6 +39,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/lift_element_from_collection_of_objects.snap b/libs/wingc/src/jsify/snapshots/lift_element_from_collection_of_objects.snap index 769e8413e55..4b667ed4146 100644 --- a/libs/wingc/src/jsify/snapshots/lift_element_from_collection_of_objects.snap +++ b/libs/wingc/src/jsify/snapshots/lift_element_from_collection_of_objects.snap @@ -36,6 +36,7 @@ module.exports = function({ $_a_at_0__ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/lift_inflight_closure.snap b/libs/wingc/src/jsify/snapshots/lift_inflight_closure.snap index f177d41715e..57cd6a40409 100644 --- a/libs/wingc/src/jsify/snapshots/lift_inflight_closure.snap +++ b/libs/wingc/src/jsify/snapshots/lift_inflight_closure.snap @@ -52,6 +52,7 @@ module.exports = function({ $f }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/lift_inside_preflight_method.snap b/libs/wingc/src/jsify/snapshots/lift_inside_preflight_method.snap index f58dd4df03a..d2ecdffeac4 100644 --- a/libs/wingc/src/jsify/snapshots/lift_inside_preflight_method.snap +++ b/libs/wingc/src/jsify/snapshots/lift_inside_preflight_method.snap @@ -57,6 +57,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/lift_string.snap b/libs/wingc/src/jsify/snapshots/lift_string.snap index 819f0d8c842..c68ab79b20f 100644 --- a/libs/wingc/src/jsify/snapshots/lift_string.snap +++ b/libs/wingc/src/jsify/snapshots/lift_string.snap @@ -34,6 +34,7 @@ module.exports = function({ $b }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/lift_this.snap b/libs/wingc/src/jsify/snapshots/lift_this.snap index c580d4b04ca..5b4aa12c190 100644 --- a/libs/wingc/src/jsify/snapshots/lift_this.snap +++ b/libs/wingc/src/jsify/snapshots/lift_this.snap @@ -69,6 +69,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/lift_var_with_this.snap b/libs/wingc/src/jsify/snapshots/lift_var_with_this.snap index 9f06393d8a4..12743983963 100644 --- a/libs/wingc/src/jsify/snapshots/lift_var_with_this.snap +++ b/libs/wingc/src/jsify/snapshots/lift_var_with_this.snap @@ -52,6 +52,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/lift_via_closure.snap b/libs/wingc/src/jsify/snapshots/lift_via_closure.snap index fcd179881b9..87608b721fc 100644 --- a/libs/wingc/src/jsify/snapshots/lift_via_closure.snap +++ b/libs/wingc/src/jsify/snapshots/lift_via_closure.snap @@ -59,6 +59,7 @@ module.exports = function({ $fn }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/lift_via_closure_class_explicit.snap b/libs/wingc/src/jsify/snapshots/lift_via_closure_class_explicit.snap index 04657a48596..a5dbb777b2e 100644 --- a/libs/wingc/src/jsify/snapshots/lift_via_closure_class_explicit.snap +++ b/libs/wingc/src/jsify/snapshots/lift_via_closure_class_explicit.snap @@ -74,6 +74,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/namespaced_static_from_inflight.snap b/libs/wingc/src/jsify/snapshots/namespaced_static_from_inflight.snap index 6423479c369..3b59f1a0c26 100644 --- a/libs/wingc/src/jsify/snapshots/namespaced_static_from_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/namespaced_static_from_inflight.snap @@ -34,6 +34,7 @@ module.exports = function({ $util_Util }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/nested_inflight_after_preflight_operation.snap b/libs/wingc/src/jsify/snapshots/nested_inflight_after_preflight_operation.snap index 040d031f519..904051771c1 100644 --- a/libs/wingc/src/jsify/snapshots/nested_inflight_after_preflight_operation.snap +++ b/libs/wingc/src/jsify/snapshots/nested_inflight_after_preflight_operation.snap @@ -58,6 +58,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/nested_preflight_operation.snap b/libs/wingc/src/jsify/snapshots/nested_preflight_operation.snap index cc47169e693..e0abb54aadb 100644 --- a/libs/wingc/src/jsify/snapshots/nested_preflight_operation.snap +++ b/libs/wingc/src/jsify/snapshots/nested_preflight_operation.snap @@ -73,6 +73,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/new_inflight_object.snap b/libs/wingc/src/jsify/snapshots/new_inflight_object.snap index 90d94f21754..f99985d31ef 100644 --- a/libs/wingc/src/jsify/snapshots/new_inflight_object.snap +++ b/libs/wingc/src/jsify/snapshots/new_inflight_object.snap @@ -45,6 +45,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/no_capture_inside_methods.snap b/libs/wingc/src/jsify/snapshots/no_capture_inside_methods.snap index fda11ee31eb..193b3fd28d8 100644 --- a/libs/wingc/src/jsify/snapshots/no_capture_inside_methods.snap +++ b/libs/wingc/src/jsify/snapshots/no_capture_inside_methods.snap @@ -39,6 +39,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/no_capture_of_identifier_from_inner_scope.snap b/libs/wingc/src/jsify/snapshots/no_capture_of_identifier_from_inner_scope.snap index 045b030dffe..c4429e111ea 100644 --- a/libs/wingc/src/jsify/snapshots/no_capture_of_identifier_from_inner_scope.snap +++ b/libs/wingc/src/jsify/snapshots/no_capture_of_identifier_from_inner_scope.snap @@ -39,6 +39,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/no_capture_of_identifier_from_same_scope.snap b/libs/wingc/src/jsify/snapshots/no_capture_of_identifier_from_same_scope.snap index 0eadacf8de1..fa5698db09a 100644 --- a/libs/wingc/src/jsify/snapshots/no_capture_of_identifier_from_same_scope.snap +++ b/libs/wingc/src/jsify/snapshots/no_capture_of_identifier_from_same_scope.snap @@ -35,6 +35,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/no_capture_shadow_inside_inner_scopes.snap b/libs/wingc/src/jsify/snapshots/no_capture_shadow_inside_inner_scopes.snap index f61f98d2a87..5f8abbb6369 100644 --- a/libs/wingc/src/jsify/snapshots/no_capture_shadow_inside_inner_scopes.snap +++ b/libs/wingc/src/jsify/snapshots/no_capture_shadow_inside_inner_scopes.snap @@ -47,6 +47,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/no_lift_shadow_inside_inner_scopes.snap b/libs/wingc/src/jsify/snapshots/no_lift_shadow_inside_inner_scopes.snap index 05c76c61cc4..0209c79d5b7 100644 --- a/libs/wingc/src/jsify/snapshots/no_lift_shadow_inside_inner_scopes.snap +++ b/libs/wingc/src/jsify/snapshots/no_lift_shadow_inside_inner_scopes.snap @@ -45,6 +45,7 @@ module.exports = function({ $i }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/preflight_class_extends_preflight_class.snap b/libs/wingc/src/jsify/snapshots/preflight_class_extends_preflight_class.snap index 6ec77fd57d9..65f781432ea 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_class_extends_preflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_class_extends_preflight_class.snap @@ -39,6 +39,7 @@ module.exports = function({ $Base }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/preflight_collection.snap b/libs/wingc/src/jsify/snapshots/preflight_collection.snap index 2ec831efbf9..f573974efb4 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_collection.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_collection.snap @@ -36,6 +36,7 @@ module.exports = function({ $_a_at_0__, $a_length }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/preflight_collection_of_preflight_objects.snap b/libs/wingc/src/jsify/snapshots/preflight_collection_of_preflight_objects.snap index b3987bd9b3b..4db17090331 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_collection_of_preflight_objects.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_collection_of_preflight_objects.snap @@ -40,6 +40,7 @@ module.exports = function({ $_arr_at_0__, $arr_length }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/preflight_nested_object_with_operations.snap b/libs/wingc/src/jsify/snapshots/preflight_nested_object_with_operations.snap index aeccbcdc457..0076165bd22 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_nested_object_with_operations.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_nested_object_with_operations.snap @@ -55,6 +55,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/preflight_object.snap b/libs/wingc/src/jsify/snapshots/preflight_object.snap index 4158da5a7af..61f69324a93 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_object.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_object.snap @@ -56,6 +56,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/preflight_object_through_property.snap b/libs/wingc/src/jsify/snapshots/preflight_object_through_property.snap index 39fd58175ea..69d44c46470 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_object_through_property.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_object_through_property.snap @@ -56,6 +56,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/preflight_object_with_operations.snap b/libs/wingc/src/jsify/snapshots/preflight_object_with_operations.snap index 4d960ed7e0a..2b2fa6f25d7 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_object_with_operations.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_object_with_operations.snap @@ -37,6 +37,7 @@ module.exports = function({ $b }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/preflight_object_with_operations_multiple_methods.snap b/libs/wingc/src/jsify/snapshots/preflight_object_with_operations_multiple_methods.snap index faddaed2442..6063022e9ca 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_object_with_operations_multiple_methods.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_object_with_operations_multiple_methods.snap @@ -42,6 +42,7 @@ module.exports = function({ $b }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/preflight_value_field.snap b/libs/wingc/src/jsify/snapshots/preflight_value_field.snap index e12f8f109cc..024c05c5c9d 100644 --- a/libs/wingc/src/jsify/snapshots/preflight_value_field.snap +++ b/libs/wingc/src/jsify/snapshots/preflight_value_field.snap @@ -61,6 +61,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/read_primitive_value.snap b/libs/wingc/src/jsify/snapshots/read_primitive_value.snap index eeaff7a658c..4a48c2aee98 100644 --- a/libs/wingc/src/jsify/snapshots/read_primitive_value.snap +++ b/libs/wingc/src/jsify/snapshots/read_primitive_value.snap @@ -35,6 +35,7 @@ module.exports = function({ $x }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/reassign_captured_variable.snap b/libs/wingc/src/jsify/snapshots/reassign_captured_variable.snap index ea829512716..385eae2c8e8 100644 --- a/libs/wingc/src/jsify/snapshots/reassign_captured_variable.snap +++ b/libs/wingc/src/jsify/snapshots/reassign_captured_variable.snap @@ -44,6 +44,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/reassigned_captured_variable_preflight.snap b/libs/wingc/src/jsify/snapshots/reassigned_captured_variable_preflight.snap index 60d5dbd5621..68410577aff 100644 --- a/libs/wingc/src/jsify/snapshots/reassigned_captured_variable_preflight.snap +++ b/libs/wingc/src/jsify/snapshots/reassigned_captured_variable_preflight.snap @@ -16,6 +16,7 @@ source: libs/wingc/src/jsify/tests.rs ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/ref_std_macro.snap b/libs/wingc/src/jsify/snapshots/ref_std_macro.snap index 154c49dfb98..e41fb7d75f9 100644 --- a/libs/wingc/src/jsify/snapshots/ref_std_macro.snap +++ b/libs/wingc/src/jsify/snapshots/ref_std_macro.snap @@ -35,6 +35,7 @@ module.exports = function({ $arr_length }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/reference_from_static_inflight.snap b/libs/wingc/src/jsify/snapshots/reference_from_static_inflight.snap index de43edbd6f2..469dc6d67e1 100644 --- a/libs/wingc/src/jsify/snapshots/reference_from_static_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/reference_from_static_inflight.snap @@ -34,6 +34,7 @@ module.exports = function({ $s }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/reference_inflight_class.snap b/libs/wingc/src/jsify/snapshots/reference_inflight_class.snap index 9c7abcefac2..ca2b24327fb 100644 --- a/libs/wingc/src/jsify/snapshots/reference_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/reference_inflight_class.snap @@ -50,6 +50,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/reference_inflight_field.snap b/libs/wingc/src/jsify/snapshots/reference_inflight_field.snap index 2a74151c3cd..8fee284fd4a 100644 --- a/libs/wingc/src/jsify/snapshots/reference_inflight_field.snap +++ b/libs/wingc/src/jsify/snapshots/reference_inflight_field.snap @@ -41,6 +41,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/reference_inflight_from_inflight.snap b/libs/wingc/src/jsify/snapshots/reference_inflight_from_inflight.snap index f7fa8f10e6a..958279290b8 100644 --- a/libs/wingc/src/jsify/snapshots/reference_inflight_from_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/reference_inflight_from_inflight.snap @@ -62,6 +62,7 @@ module.exports = function({ $s }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/reference_preflight_field.snap b/libs/wingc/src/jsify/snapshots/reference_preflight_field.snap index bd5e7edfaea..5d940e0c108 100644 --- a/libs/wingc/src/jsify/snapshots/reference_preflight_field.snap +++ b/libs/wingc/src/jsify/snapshots/reference_preflight_field.snap @@ -39,6 +39,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/reference_preflight_field_call_independent_method.snap b/libs/wingc/src/jsify/snapshots/reference_preflight_field_call_independent_method.snap index e6a997fd0fd..f911f421b6a 100644 --- a/libs/wingc/src/jsify/snapshots/reference_preflight_field_call_independent_method.snap +++ b/libs/wingc/src/jsify/snapshots/reference_preflight_field_call_independent_method.snap @@ -39,6 +39,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/reference_preflight_fields.snap b/libs/wingc/src/jsify/snapshots/reference_preflight_fields.snap index ce1ddedefae..2424d985f79 100644 --- a/libs/wingc/src/jsify/snapshots/reference_preflight_fields.snap +++ b/libs/wingc/src/jsify/snapshots/reference_preflight_fields.snap @@ -55,6 +55,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/reference_preflight_free_variable_with_this_in_the_expression.snap b/libs/wingc/src/jsify/snapshots/reference_preflight_free_variable_with_this_in_the_expression.snap index 77aef0e3983..a93289ad4a8 100644 --- a/libs/wingc/src/jsify/snapshots/reference_preflight_free_variable_with_this_in_the_expression.snap +++ b/libs/wingc/src/jsify/snapshots/reference_preflight_free_variable_with_this_in_the_expression.snap @@ -42,6 +42,7 @@ module.exports = function({ $b }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/reference_preflight_object_from_static_inflight.snap b/libs/wingc/src/jsify/snapshots/reference_preflight_object_from_static_inflight.snap index efdab3f5033..06b278fdfca 100644 --- a/libs/wingc/src/jsify/snapshots/reference_preflight_object_from_static_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/reference_preflight_object_from_static_inflight.snap @@ -36,6 +36,7 @@ module.exports = function({ $q }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/reference_static_inflight.snap b/libs/wingc/src/jsify/snapshots/reference_static_inflight.snap index 76ae3c3e66a..7ca285246ec 100644 --- a/libs/wingc/src/jsify/snapshots/reference_static_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/reference_static_inflight.snap @@ -51,6 +51,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/reference_static_inflight_which_references_preflight_object.snap b/libs/wingc/src/jsify/snapshots/reference_static_inflight_which_references_preflight_object.snap index 18ef92e84a7..ac4fd7c3bef 100644 --- a/libs/wingc/src/jsify/snapshots/reference_static_inflight_which_references_preflight_object.snap +++ b/libs/wingc/src/jsify/snapshots/reference_static_inflight_which_references_preflight_object.snap @@ -60,6 +60,7 @@ module.exports = function({ $b }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/static_external_inflight_class.snap b/libs/wingc/src/jsify/snapshots/static_external_inflight_class.snap index fea740fd5c1..7bbc0b52b86 100644 --- a/libs/wingc/src/jsify/snapshots/static_external_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/static_external_inflight_class.snap @@ -61,6 +61,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/static_external_preflight_class.snap b/libs/wingc/src/jsify/snapshots/static_external_preflight_class.snap index 93435d867c7..6ead7cfac7a 100644 --- a/libs/wingc/src/jsify/snapshots/static_external_preflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/static_external_preflight_class.snap @@ -60,6 +60,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/static_inflight_operation.snap b/libs/wingc/src/jsify/snapshots/static_inflight_operation.snap index fd90f83ada7..a1f195aeac1 100644 --- a/libs/wingc/src/jsify/snapshots/static_inflight_operation.snap +++ b/libs/wingc/src/jsify/snapshots/static_inflight_operation.snap @@ -57,6 +57,7 @@ module.exports = function({ $b }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/static_local_inflight_class.snap b/libs/wingc/src/jsify/snapshots/static_local_inflight_class.snap index 3c95e889d0e..d2a2ff479a5 100644 --- a/libs/wingc/src/jsify/snapshots/static_local_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/static_local_inflight_class.snap @@ -53,6 +53,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/static_on_std_type.snap b/libs/wingc/src/jsify/snapshots/static_on_std_type.snap index 30bd3aa2542..ae5dd161fe3 100644 --- a/libs/wingc/src/jsify/snapshots/static_on_std_type.snap +++ b/libs/wingc/src/jsify/snapshots/static_on_std_type.snap @@ -35,6 +35,7 @@ module.exports = function({ $std_Json, $std_String }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/transitive_reference.snap b/libs/wingc/src/jsify/snapshots/transitive_reference.snap index e43de2e8ad0..bbd93d73e5b 100644 --- a/libs/wingc/src/jsify/snapshots/transitive_reference.snap +++ b/libs/wingc/src/jsify/snapshots/transitive_reference.snap @@ -75,6 +75,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/transitive_reference_via_inflight_class.snap b/libs/wingc/src/jsify/snapshots/transitive_reference_via_inflight_class.snap index 01847a619df..e01e02afe4c 100644 --- a/libs/wingc/src/jsify/snapshots/transitive_reference_via_inflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/transitive_reference_via_inflight_class.snap @@ -58,6 +58,7 @@ module.exports = function({ $b }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/transitive_reference_via_static.snap b/libs/wingc/src/jsify/snapshots/transitive_reference_via_static.snap index b0847c1b0e8..50ac0947cc5 100644 --- a/libs/wingc/src/jsify/snapshots/transitive_reference_via_static.snap +++ b/libs/wingc/src/jsify/snapshots/transitive_reference_via_static.snap @@ -80,6 +80,7 @@ module.exports = function({ $MyType }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/two_identical_lifts.snap b/libs/wingc/src/jsify/snapshots/two_identical_lifts.snap index 5aa56669c9d..2fe4e952a6e 100644 --- a/libs/wingc/src/jsify/snapshots/two_identical_lifts.snap +++ b/libs/wingc/src/jsify/snapshots/two_identical_lifts.snap @@ -44,6 +44,7 @@ module.exports = function({ $b }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/unqualified_lift_of_collection.snap b/libs/wingc/src/jsify/snapshots/unqualified_lift_of_collection.snap index 31fe6ecbb73..28566db7ff7 100644 --- a/libs/wingc/src/jsify/snapshots/unqualified_lift_of_collection.snap +++ b/libs/wingc/src/jsify/snapshots/unqualified_lift_of_collection.snap @@ -35,6 +35,7 @@ module.exports = function({ $a }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/use_util_functions.snap b/libs/wingc/src/jsify/snapshots/use_util_functions.snap index 7b2885f7db8..32d00e742ed 100644 --- a/libs/wingc/src/jsify/snapshots/use_util_functions.snap +++ b/libs/wingc/src/jsify/snapshots/use_util_functions.snap @@ -33,6 +33,7 @@ module.exports = function({ $util_Util }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/var_inflight_field_from_inflight.snap b/libs/wingc/src/jsify/snapshots/var_inflight_field_from_inflight.snap index 6e5332b7e57..49c4ccb1907 100644 --- a/libs/wingc/src/jsify/snapshots/var_inflight_field_from_inflight.snap +++ b/libs/wingc/src/jsify/snapshots/var_inflight_field_from_inflight.snap @@ -41,6 +41,7 @@ module.exports = function({ }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingc/src/jsify/snapshots/wait_util.snap b/libs/wingc/src/jsify/snapshots/wait_util.snap index 45cfbd730dc..eecd4379ffa 100644 --- a/libs/wingc/src/jsify/snapshots/wait_util.snap +++ b/libs/wingc/src/jsify/snapshots/wait_util.snap @@ -41,6 +41,7 @@ module.exports = function({ $util_Util }) { ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/libs/wingcompiler/src/compile.ts b/libs/wingcompiler/src/compile.ts index 4d5d8776909..355f0ecda84 100644 --- a/libs/wingcompiler/src/compile.ts +++ b/libs/wingcompiler/src/compile.ts @@ -101,6 +101,7 @@ export async function compile(entrypoint: string, options: CompileOptions): Prom // in the future we may look for a unified approach process.env["WING_TARGET"] = options.target; process.env["WING_IS_TEST"] = testing.toString(); + process.env["WING_PLUGIN_PATHS"] = resolvePluginPaths(options.plugins ?? []); const tempProcess: { env: Record } = { env: { ...process.env } }; @@ -197,7 +198,6 @@ export async function compile(entrypoint: string, options: CompileOptions): Prom console, __dirname: workDir, __filename: artifactPath, - $plugins: resolvePluginPaths(options.plugins ?? []), // since the SDK is loaded in the outer VM, we need these to be the same class instance, // otherwise "instanceof" won't work between preflight code and the SDK. this is needed e.g. in // `serializeImmutableData` which has special cases for serializing these types. @@ -240,12 +240,12 @@ export async function compile(entrypoint: string, options: CompileOptions): Prom * if absolute path is not provided. * * @param plugins list of plugin paths (absolute or relative) - * @returns list of absolute plugin paths or relative to cwd + * @returns list of absolute plugin paths or relative to cwd, joined by ";" */ -function resolvePluginPaths(plugins: string[]): string[] { +function resolvePluginPaths(plugins: string[]): string { const resolvedPluginPaths: string[] = []; for (const plugin of plugins) { resolvedPluginPaths.push(resolve(process.cwd(), plugin)); } - return resolvedPluginPaths; + return resolvedPluginPaths.join(";"); } diff --git a/tools/hangar/__snapshots__/error.ts.snap b/tools/hangar/__snapshots__/error.ts.snap index 82b26ebdc8e..15a69c86bcd 100644 --- a/tools/hangar/__snapshots__/error.ts.snap +++ b/tools/hangar/__snapshots__/error.ts.snap @@ -3,7 +3,7 @@ exports[`bool_from_json.w 1`] = ` "ERROR: unable to parse number 123 as a boolean -../../../examples/tests/error/target/test/bool_from_json.wsim.[REDACTED].tmp/.wing/preflight.js:8 +../../../examples/tests/error/target/test/bool_from_json.wsim.[REDACTED].tmp/.wing/preflight.js:9 super(scope, id); const j = ({\\"a\\": 123}); >> const a = (std.Boolean.fromJson((j)[\\"a\\"])); @@ -20,7 +20,7 @@ Duration " exports[`num_from_str.w 1`] = ` "ERROR: unable to parse \\"123a\\" as a number -../../../examples/tests/error/target/test/num_from_str.wsim.[REDACTED].tmp/.wing/preflight.js:7 +../../../examples/tests/error/target/test/num_from_str.wsim.[REDACTED].tmp/.wing/preflight.js:8 constructor(scope, id) { super(scope, id); >> const a = ((args) => { if (isNaN(args)) {throw new Error(\\"unable to parse /\\"\\" + args + \\"/\\" as a number\\")}; return parseInt(args) })(\\"123a\\"); @@ -37,7 +37,7 @@ Duration " exports[`number_from_json.w 1`] = ` "ERROR: unable to parse string apples as a number -../../../examples/tests/error/target/test/number_from_json.wsim.[REDACTED].tmp/.wing/preflight.js:8 +../../../examples/tests/error/target/test/number_from_json.wsim.[REDACTED].tmp/.wing/preflight.js:9 super(scope, id); const j = ({\\"a\\": \\"apples\\"}); >> const a = ((args) => { if (typeof args !== \\"number\\") {throw new Error(\\"unable to parse \\" + typeof args + \\" \\" + args + \\" as a number\\")}; return JSON.parse(JSON.stringify(args)) })((j)[\\"a\\"]); @@ -60,7 +60,7 @@ hint: Every preflight object needs a unique identifier within its scope. You can For more information, see https://www.winglang.io/docs/language-guide/language-reference#33-preflight-classes -../../../examples/tests/error/target/test/repeat_construct_id.wsim.[REDACTED].tmp/.wing/preflight.js:9 +../../../examples/tests/error/target/test/repeat_construct_id.wsim.[REDACTED].tmp/.wing/preflight.js:10 super(scope, id); const bucket1 = this.node.root.newAbstract(\\"@winglang/sdk.cloud.Bucket\\",this,\\"cloud.Bucket\\"); >> const bucket2 = this.node.root.newAbstract(\\"@winglang/sdk.cloud.Bucket\\",this,\\"cloud.Bucket\\"); @@ -83,7 +83,7 @@ hint: Every preflight object needs a unique identifier within its scope. You can For more information, see https://www.winglang.io/docs/language-guide/language-reference#33-preflight-classes -../../../examples/tests/error/target/test/repeat_construct_id2.wsim.[REDACTED].tmp/.wing/preflight.js:12 +../../../examples/tests/error/target/test/repeat_construct_id2.wsim.[REDACTED].tmp/.wing/preflight.js:13 }); const bucket1 = this.node.root.newAbstract(\\"@winglang/sdk.cloud.Bucket\\",this,String.raw({ raw: [\\"\\", \\"\\"] }, (make_name()))); >> const bucket2 = this.node.root.newAbstract(\\"@winglang/sdk.cloud.Bucket\\",this,String.raw({ raw: [\\"\\", \\"\\"] }, (make_name()))); @@ -100,7 +100,7 @@ Duration " exports[`string_from_json.w 1`] = ` "ERROR: unable to parse number 123 as a string -../../../examples/tests/error/target/test/string_from_json.wsim.[REDACTED].tmp/.wing/preflight.js:8 +../../../examples/tests/error/target/test/string_from_json.wsim.[REDACTED].tmp/.wing/preflight.js:9 super(scope, id); const j = ({\\"a\\": 123}); >> const a = ((args) => { if (typeof args !== \\"string\\") {throw new Error(\\"unable to parse \\" + typeof args + \\" \\" + args + \\" as a string\\")}; return JSON.parse(JSON.stringify(args)) })((j)[\\"a\\"]); @@ -118,7 +118,7 @@ exports[`struct_from_json_1.w 1`] = ` "ERROR: unable to parse Person: - instance.age is not of a type(s) number -../../../examples/tests/error/target/test/struct_from_json_1.wsim.[REDACTED].tmp/.wing/preflight.js:9 +../../../examples/tests/error/target/test/struct_from_json_1.wsim.[REDACTED].tmp/.wing/preflight.js:10 const Person = require(\\"./Person.Struct.js\\")($stdlib.std.Struct); const j = ({\\"name\\": \\"cool\\",\\"age\\": \\"not a number\\"}); >> (Person.fromJson(j)); @@ -137,7 +137,7 @@ exports[`struct_from_json_2.w 1`] = ` - instance.age is not of a type(s) number - instance requires property \\"advisor\\" -../../../examples/tests/error/target/test/struct_from_json_2.wsim.[REDACTED].tmp/.wing/preflight.js:11 +../../../examples/tests/error/target/test/struct_from_json_2.wsim.[REDACTED].tmp/.wing/preflight.js:12 const Student = require(\\"./Student.Struct.js\\")($stdlib.std.Struct); const missingAdvisor = ({\\"name\\": \\"cool\\",\\"age\\": \\"not a number\\"}); >> (Student.fromJson(missingAdvisor)); @@ -156,7 +156,7 @@ exports[`struct_from_json_3.w 1`] = ` - instance.age is not of a type(s) number - instance.advisors[1].id is not of a type(s) string -../../../examples/tests/error/target/test/struct_from_json_3.wsim.[REDACTED].tmp/.wing/preflight.js:11 +../../../examples/tests/error/target/test/struct_from_json_3.wsim.[REDACTED].tmp/.wing/preflight.js:12 const Student = require(\\"./Student.Struct.js\\")($stdlib.std.Struct); const invalidAdvisorInArray = ({\\"name\\": \\"cool\\",\\"age\\": \\"not a number\\",\\"advisors\\": [({\\"id\\": \\"advisor1\\",\\"name\\": \\"Bob\\",\\"age\\": 34}), ({\\"id\\": 10,\\"name\\": \\"Jacob\\",\\"age\\": 45})]}); >> (Student.fromJson(invalidAdvisorInArray)); @@ -174,7 +174,7 @@ exports[`struct_from_json_4.w 1`] = ` "ERROR: unable to parse Student: - instance.advisors contains duplicate item -../../../examples/tests/error/target/test/struct_from_json_4.wsim.[REDACTED].tmp/.wing/preflight.js:11 +../../../examples/tests/error/target/test/struct_from_json_4.wsim.[REDACTED].tmp/.wing/preflight.js:12 const Student = require(\\"./Student.Struct.js\\")($stdlib.std.Struct); const invalidAdvisorInArray = ({\\"name\\": \\"cool\\",\\"age\\": 22,\\"advisors\\": [({\\"id\\": \\"advisor1\\",\\"name\\": \\"Bob\\",\\"age\\": 34}), ({\\"id\\": \\"advisor1\\",\\"name\\": \\"Bob\\",\\"age\\": 34})]}); >> (Student.fromJson(invalidAdvisorInArray)); @@ -192,7 +192,7 @@ exports[`struct_from_json_5.w 1`] = ` "ERROR: unable to parse Foo: - instance.names.c is not of a type(s) string -../../../examples/tests/error/target/test/struct_from_json_5.wsim.[REDACTED].tmp/.wing/preflight.js:9 +../../../examples/tests/error/target/test/struct_from_json_5.wsim.[REDACTED].tmp/.wing/preflight.js:10 const Foo = require(\\"./Foo.Struct.js\\")($stdlib.std.Struct); const jFoo = ({\\"names\\": ({\\"a\\": \\"Amanda\\",\\"b\\": \\"Barry\\",\\"c\\": 10})}); >> (Foo.fromJson(jFoo)); @@ -209,7 +209,7 @@ Duration " exports[`utilities.w 1`] = ` "ERROR: assertion failed: false -../../../examples/tests/error/target/test/utilities.wsim.[REDACTED].tmp/.wing/preflight.js:7 +../../../examples/tests/error/target/test/utilities.wsim.[REDACTED].tmp/.wing/preflight.js:8 constructor(scope, id) { super(scope, id); >> {((cond) => {if (!cond) throw new Error(\\"assertion failed: false\\")})(false)}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md index 335a6d1c24c..f10d301ba83 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md @@ -314,6 +314,7 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md index 5818b54c3e1..bc2e695b2d7 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md @@ -318,6 +318,7 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md index 4b20ed3078f..99601f3e0d4 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md @@ -512,6 +512,7 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $path }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md index be3cba4e1ae..2afc1588f08 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md @@ -315,6 +315,7 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md index cb811fc0ab7..00aa0e41ce2 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md @@ -314,6 +314,7 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util, $std_ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md index efdb2f7338f..4c3c6600c97 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md @@ -319,6 +319,7 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_file.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_file.w_compile_tf-aws.md index eba835502c9..2f25be6be3a 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_file.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_file.w_compile_tf-aws.md @@ -198,6 +198,7 @@ module.exports = function({ $b }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_object.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_object.w_compile_tf-aws.md index 701f2e3f535..7b87297508a 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_object.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_object.w_compile_tf-aws.md @@ -198,6 +198,7 @@ module.exports = function({ $b, $jsonObj1, $std_Json }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/bucket_list.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/bucket_list.w_compile_tf-aws.md index 19e6a1a8aa4..d906f742bf5 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/bucket_list.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/bucket_list.w_compile_tf-aws.md @@ -201,6 +201,7 @@ module.exports = function({ $b }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md index 67c0f95a53a..3a184f3a604 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md @@ -202,6 +202,7 @@ module.exports = function({ $b }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md index 10e2873e77c..1bf3af84751 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md @@ -1089,6 +1089,7 @@ module.exports = function({ $Source, $b, $checkHitCount, $util_Util, $wait }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/exists.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/exists.w_compile_tf-aws.md index 793de52a4a7..170de2dde04 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/exists.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/exists.w_compile_tf-aws.md @@ -180,6 +180,7 @@ module.exports = function({ $b }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md index 03bf06b5e24..f82023b6115 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md @@ -246,6 +246,7 @@ module.exports = function({ $http_Util, $privateBucket, $publicBucket, $util_Uti ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put.w_compile_tf-aws.md index 2d79779da3b..915fa071bbb 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put.w_compile_tf-aws.md @@ -186,6 +186,7 @@ module.exports = function({ $b }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md index d8de9f8341d..89ca5b98c13 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md @@ -189,6 +189,7 @@ module.exports = function({ $b }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_delete.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_delete.w_compile_tf-aws.md index 4064b1a7aba..5203cbfa670 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_delete.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_delete.w_compile_tf-aws.md @@ -184,6 +184,7 @@ module.exports = function({ $b }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get.w_compile_tf-aws.md index 750f5145f4c..6f626cffd2d 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get.w_compile_tf-aws.md @@ -180,6 +180,7 @@ module.exports = function({ $b }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get_json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get_json.w_compile_tf-aws.md index 7372dcb229f..baef5267885 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get_json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get_json.w_compile_tf-aws.md @@ -184,6 +184,7 @@ module.exports = function({ $b, $std_Json }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/dec.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/dec.w_compile_tf-aws.md index 6fc1094d149..f3563d53649 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/dec.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/dec.w_compile_tf-aws.md @@ -266,6 +266,7 @@ module.exports = function({ $counter }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/inc.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/inc.w_compile_tf-aws.md index c4672f1b330..88cb1755f10 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/inc.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/inc.w_compile_tf-aws.md @@ -276,6 +276,7 @@ module.exports = function({ $counter }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/initial.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/initial.w_compile_tf-aws.md index db376ae9827..f9e15fec18c 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/initial.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/initial.w_compile_tf-aws.md @@ -375,6 +375,7 @@ module.exports = function({ $counterC }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/peek.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/peek.w_compile_tf-aws.md index eadea18a76d..f16ceb4e84f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/peek.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/peek.w_compile_tf-aws.md @@ -260,6 +260,7 @@ module.exports = function({ $c }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/set.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/set.w_compile_tf-aws.md index 32b532e93db..b9749f2f97b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/set.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/set.w_compile_tf-aws.md @@ -270,6 +270,7 @@ module.exports = function({ $counter }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/invoke.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/invoke.w_compile_tf-aws.md index 42127dc1079..d00fb21423f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/invoke.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/invoke.w_compile_tf-aws.md @@ -238,6 +238,7 @@ module.exports = function({ $f }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/logging.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/logging.w_compile_tf-aws.md index ae66d8fa290..256dd8654b3 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/logging.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/logging.w_compile_tf-aws.md @@ -341,6 +341,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/memory_and_env.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/memory_and_env.w_compile_tf-aws.md index 95658a3f07f..3093cc37e9f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/memory_and_env.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/memory_and_env.w_compile_tf-aws.md @@ -379,6 +379,7 @@ module.exports = function({ $c, $f1, $f2 }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/abs.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/abs.w_compile_tf-aws.md index 771f7e08a0d..206383e974a 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/abs.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/abs.w_compile_tf-aws.md @@ -146,6 +146,7 @@ module.exports = function({ $math_Util, $x, $y }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acos.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acos.w_compile_tf-aws.md index 867321f2ac5..9eed3491138 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acos.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acos.w_compile_tf-aws.md @@ -163,6 +163,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acot.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acot.w_compile_tf-aws.md index b56c1c3ee2a..5a88cf64a65 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acot.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acot.w_compile_tf-aws.md @@ -149,6 +149,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acsc.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acsc.w_compile_tf-aws.md index 26da5650a55..b410c0d6ba4 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acsc.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acsc.w_compile_tf-aws.md @@ -156,6 +156,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/angular_conversion.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/angular_conversion.w_compile_tf-aws.md index e6e6e4cb68e..20f0bc6b0df 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/angular_conversion.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/angular_conversion.w_compile_tf-aws.md @@ -156,6 +156,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asec.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asec.w_compile_tf-aws.md index 31cbd1654f4..5906d10c699 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asec.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asec.w_compile_tf-aws.md @@ -157,6 +157,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asin.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asin.w_compile_tf-aws.md index 97f69838e91..e5febf958ee 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asin.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asin.w_compile_tf-aws.md @@ -163,6 +163,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan.w_compile_tf-aws.md index e2e87ce288f..f160c15d462 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan.w_compile_tf-aws.md @@ -148,6 +148,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan2.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan2.w_compile_tf-aws.md index 5170e879159..8c7f9fe803c 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan2.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan2.w_compile_tf-aws.md @@ -151,6 +151,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/combinations.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/combinations.w_compile_tf-aws.md index 80199aa49fd..ed1388d65dd 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/combinations.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/combinations.w_compile_tf-aws.md @@ -145,6 +145,7 @@ module.exports = function({ $math_Util, $population, $subset }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cos.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cos.w_compile_tf-aws.md index 6b810342238..b6775527e36 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cos.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cos.w_compile_tf-aws.md @@ -150,6 +150,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cot.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cot.w_compile_tf-aws.md index ef773d64111..89eb25735bf 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cot.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cot.w_compile_tf-aws.md @@ -148,6 +148,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/csc.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/csc.w_compile_tf-aws.md index 51b68e4b159..a16fdc9d379 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/csc.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/csc.w_compile_tf-aws.md @@ -152,6 +152,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/euler.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/euler.w_compile_tf-aws.md index 8c5ee8ac996..1a87149436d 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/euler.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/euler.w_compile_tf-aws.md @@ -163,6 +163,7 @@ module.exports = function({ $compoundOneYear, $interest, $math_Util, $value }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/factorial.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/factorial.w_compile_tf-aws.md index e499aa1b148..821f58d10ea 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/factorial.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/factorial.w_compile_tf-aws.md @@ -150,6 +150,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/fibonacci.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/fibonacci.w_compile_tf-aws.md index 0d052bb9389..83dc942e550 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/fibonacci.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/fibonacci.w_compile_tf-aws.md @@ -155,6 +155,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/floor_ceil_round.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/floor_ceil_round.w_compile_tf-aws.md index c569a80541d..aa1b9c11c6b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/floor_ceil_round.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/floor_ceil_round.w_compile_tf-aws.md @@ -155,6 +155,7 @@ module.exports = function({ $__x_, $__y_, $math_Util, $x, $y }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/hypot.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/hypot.w_compile_tf-aws.md index 77a62fb0f84..f082f86f4a3 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/hypot.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/hypot.w_compile_tf-aws.md @@ -148,6 +148,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/median_mode_mean.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/median_mode_mean.w_compile_tf-aws.md index 55668d07f49..363122d7305 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/median_mode_mean.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/median_mode_mean.w_compile_tf-aws.md @@ -327,6 +327,7 @@ module.exports = function({ $math_Util, $mean_arr }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/min_max.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/min_max.w_compile_tf-aws.md index 93e6978a5fa..2a57adf094e 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/min_max.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/min_max.w_compile_tf-aws.md @@ -146,6 +146,7 @@ module.exports = function({ $math_Util, $myArray }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/pi.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/pi.w_compile_tf-aws.md index f057e1f1802..4f5eaa2a469 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/pi.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/pi.w_compile_tf-aws.md @@ -163,6 +163,7 @@ module.exports = function({ $circumference, $math_Util, $r }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/prime.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/prime.w_compile_tf-aws.md index 55919c8fe8f..b3f20f5cdaa 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/prime.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/prime.w_compile_tf-aws.md @@ -151,6 +151,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/random.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/random.w_compile_tf-aws.md index 399cae762f6..78351f3a910 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/random.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/random.w_compile_tf-aws.md @@ -146,6 +146,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sec.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sec.w_compile_tf-aws.md index cf0ba5b1cc2..81d3f4524fb 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sec.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sec.w_compile_tf-aws.md @@ -150,6 +150,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sin.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sin.w_compile_tf-aws.md index bf26c9b7744..bd999869ccb 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sin.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sin.w_compile_tf-aws.md @@ -149,6 +149,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sqrt.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sqrt.w_compile_tf-aws.md index 22fbe098cfb..3c982f3d277 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sqrt.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sqrt.w_compile_tf-aws.md @@ -157,6 +157,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tan.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tan.w_compile_tf-aws.md index aec07e7e5ec..1bc9a59fea2 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tan.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tan.w_compile_tf-aws.md @@ -148,6 +148,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tau.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tau.w_compile_tf-aws.md index 8311b24fdf9..73f86639612 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tau.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tau.w_compile_tf-aws.md @@ -148,6 +148,7 @@ module.exports = function({ $math_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/on_deploy/execute_after.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/on_deploy/execute_after.w_compile_tf-aws.md index 59ffae740e4..1f66d348f53 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/on_deploy/execute_after.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/on_deploy/execute_after.w_compile_tf-aws.md @@ -374,6 +374,7 @@ module.exports = function({ $counter }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/pop.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/pop.w_compile_tf-aws.md index 0a8e1db99b1..b1339a07f9c 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/pop.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/pop.w_compile_tf-aws.md @@ -163,6 +163,7 @@ module.exports = function({ $q }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/purge.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/purge.w_compile_tf-aws.md index a030a6076e8..3f97ba69e31 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/purge.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/purge.w_compile_tf-aws.md @@ -180,6 +180,7 @@ module.exports = function({ $q, $std_Duration, $util_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/set_consumer.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/set_consumer.w_compile_tf-aws.md index cfaad2bfdfc..861db1bad6d 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/set_consumer.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/set_consumer.w_compile_tf-aws.md @@ -305,6 +305,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/schedule/on_tick.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/schedule/on_tick.w_compile_tf-aws.md index 616fec90ca8..9d837aabe42 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/schedule/on_tick.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/schedule/on_tick.w_compile_tf-aws.md @@ -435,6 +435,7 @@ module.exports = function({ $c1, $c2, $std_Duration, $util_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md index 14c22e0564b..11b4d755547 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md @@ -1548,6 +1548,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/bool.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/bool.w_compile_tf-aws.md index d2eb1b0fab7..ca2f3290a7b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/bool.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/bool.w_compile_tf-aws.md @@ -155,6 +155,7 @@ module.exports = function({ $PARSE_ERROR, $std_Boolean, $std_Json }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/datetime.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/datetime.w_compile_tf-aws.md index baff0200333..2f943b1e9d7 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/datetime.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/datetime.w_compile_tf-aws.md @@ -166,6 +166,7 @@ module.exports = function({ $_d4_toUtc____hours, $d4_hours, $d4_timezone, $math_ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/duration.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/duration.w_compile_tf-aws.md index 2c882bee5aa..c0ffaf00871 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/duration.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/duration.w_compile_tf-aws.md @@ -164,6 +164,7 @@ module.exports = function({ $std_Duration }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md index 3590b41a4d4..737f96fa22e 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md @@ -330,6 +330,7 @@ module.exports = function({ $std_Json }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/map.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/map.w_compile_tf-aws.md index 4b99859a5cb..ec7118beb18 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/map.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/map.w_compile_tf-aws.md @@ -35,6 +35,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/number.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/number.w_compile_tf-aws.md index eae3c68673a..71df21b3263 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/number.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/number.w_compile_tf-aws.md @@ -232,6 +232,7 @@ module.exports = function({ $std_Number }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/range.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/range.w_compile_tf-aws.md index fdec6398963..1b9ab4c256e 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/range.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/range.w_compile_tf-aws.md @@ -35,6 +35,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/set.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/set.w_compile_tf-aws.md index 809a6fc8e5a..fc99b0258ac 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/set.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/set.w_compile_tf-aws.md @@ -35,6 +35,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/string.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/string.w_compile_tf-aws.md index 8596c92aad3..88c0120a097 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/string.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/string.w_compile_tf-aws.md @@ -1326,6 +1326,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md index 19d032232fd..c4037389b26 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md @@ -196,6 +196,7 @@ module.exports = function({ $_marioInfo___gender__, $_marioInfo___role__, $_peac ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md index 7799f58d5f5..0403086b49d 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md @@ -178,6 +178,7 @@ module.exports = function({ $std_String, $table }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/topic/on_message.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/topic/on_message.w_compile_tf-aws.md index 5a30e24d52a..d547c7bc674 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/topic/on_message.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/topic/on_message.w_compile_tf-aws.md @@ -431,6 +431,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/base64.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/base64.w_compile_tf-aws.md index 8ad1cb25a80..ffed4cfec60 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/base64.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/base64.w_compile_tf-aws.md @@ -153,6 +153,7 @@ module.exports = function({ $util_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/env.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/env.w_compile_tf-aws.md index c778ddcf9c2..b26dc78c689 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/env.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/env.w_compile_tf-aws.md @@ -147,6 +147,7 @@ module.exports = function({ $NIL, $RANDOM, $util_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/nanoid.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/nanoid.w_compile_tf-aws.md index f6ba4dbeef7..ee498a4479e 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/nanoid.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/nanoid.w_compile_tf-aws.md @@ -158,6 +158,7 @@ module.exports = function({ $util_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sha256.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sha256.w_compile_tf-aws.md index 2b56ad8fa47..3d28993286b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sha256.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sha256.w_compile_tf-aws.md @@ -146,6 +146,7 @@ module.exports = function({ $util_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sleep.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sleep.w_compile_tf-aws.md index ba4d7d4dc3e..b13831fc730 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sleep.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sleep.w_compile_tf-aws.md @@ -164,6 +164,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/uuidv4.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/uuidv4.w_compile_tf-aws.md index 58684f11e59..010f2d39e65 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/uuidv4.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/uuidv4.w_compile_tf-aws.md @@ -173,6 +173,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md index 2ef82ed6d82..935ccb02947 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md @@ -582,6 +582,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/two_websites.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/two_websites.w_compile_tf-aws.md index 19b0d4ce031..a85b8e23cde 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/two_websites.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/two_websites.w_compile_tf-aws.md @@ -514,6 +514,7 @@ module.exports = function({ $http_Util, $w1_url, $w2_url }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/website.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/website.w_compile_tf-aws.md index 02bca8431ac..5bb3105cf17 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/website.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/website.w_compile_tf-aws.md @@ -365,6 +365,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/anon_function.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/anon_function.w_compile_tf-aws.md index 035e2f3d12a..d807085c8be 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/anon_function.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/anon_function.w_compile_tf-aws.md @@ -35,6 +35,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md index 8b23a1e46da..c2f2801ab06 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md @@ -476,6 +476,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md index 1d408d20842..0dd4bcfab02 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md @@ -305,6 +305,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md index 692f349b52f..226fd4c1c42 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md @@ -266,6 +266,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/assert.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/assert.w_compile_tf-aws.md index 7ac37edfd5c..94e399ee765 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/assert.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/assert.w_compile_tf-aws.md @@ -159,6 +159,7 @@ module.exports = function({ $s1, $s2 }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/asynchronous_model_implicit_await_in_functions.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/asynchronous_model_implicit_await_in_functions.w_compile_tf-aws.md index 5e378540b7a..c11f7e7534e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/asynchronous_model_implicit_await_in_functions.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/asynchronous_model_implicit_await_in_functions.w_compile_tf-aws.md @@ -244,6 +244,7 @@ module.exports = function({ $strToStr }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/baz.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/baz.w_compile_tf-aws.md index d60fff4ee13..e5096976b94 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/baz.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/baz.w_compile_tf-aws.md @@ -47,6 +47,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_awscdk.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_awscdk.w_compile_tf-aws.md index 9e5a27d50d6..e0cd9e808a2 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_awscdk.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_awscdk.w_compile_tf-aws.md @@ -47,6 +47,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_cdktf.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_cdktf.w_compile_tf-aws.md index e9e392f221b..1431be051cd 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_cdktf.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_cdktf.w_compile_tf-aws.md @@ -64,6 +64,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii.w_compile_tf-aws.md index 51f1b7c5191..a2c0487ca5a 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii.w_compile_tf-aws.md @@ -145,6 +145,7 @@ module.exports = function({ $greeting }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii_path.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii_path.w_compile_tf-aws.md index 6073027472f..85bb480651e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii_path.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii_path.w_compile_tf-aws.md @@ -145,6 +145,7 @@ module.exports = function({ $greeting }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md index 48307aa2cc8..9eedae9d178 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md @@ -382,6 +382,7 @@ module.exports = function({ $stdlib }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_local_normalization.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_local_normalization.w_compile_tf-aws.md index 340260912e9..454bd9449d5 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_local_normalization.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_local_normalization.w_compile_tf-aws.md @@ -190,6 +190,7 @@ module.exports = function({ $stdlib }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_projen.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_projen.w_compile_tf-aws.md index efb0e108d3e..101d3b48178 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_projen.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_projen.w_compile_tf-aws.md @@ -35,6 +35,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bucket_events.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bucket_events.w_compile_tf-aws.md index 922e5ea2ac0..d8d01f39e0e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bucket_events.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bucket_events.w_compile_tf-aws.md @@ -1323,6 +1323,7 @@ module.exports = function({ $b }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bucket_keys.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bucket_keys.w_compile_tf-aws.md index 0184448ea87..a884f59c0d6 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bucket_keys.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bucket_keys.w_compile_tf-aws.md @@ -184,6 +184,7 @@ module.exports = function({ $b }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md index 30c783cb0b6..0cafda8e3e0 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md @@ -192,6 +192,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md index 8241b751c2e..90e3ac6798d 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md @@ -204,6 +204,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md index 1a37cb45cf6..848d5e1b022 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md @@ -153,6 +153,7 @@ module.exports = function({ $Object_keys_myMap__length, $__bang__in___arrOfMap_a ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_in_binary.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_in_binary.w_compile_tf-aws.md index a4ef9337aef..ed826309036 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_in_binary.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_in_binary.w_compile_tf-aws.md @@ -176,6 +176,7 @@ module.exports = function({ $b, $x }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md index ce2b816910f..e4c74ddaf59 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md @@ -166,6 +166,7 @@ module.exports = function({ $handler }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_primitives.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_primitives.w_compile_tf-aws.md index e05626a1971..11146c7d333 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_primitives.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_primitives.w_compile_tf-aws.md @@ -159,6 +159,7 @@ module.exports = function({ $myBool, $myDur_hours, $myDur_minutes, $myDur_second ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_reassigable_class_field.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_reassigable_class_field.w_compile_tf-aws.md index 5f4450dff22..eeec284046d 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_reassigable_class_field.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_reassigable_class_field.w_compile_tf-aws.md @@ -262,6 +262,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_reassignable.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_reassignable.w_compile_tf-aws.md index cda5ac85f2c..922fc0f3ce2 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_reassignable.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_reassignable.w_compile_tf-aws.md @@ -163,6 +163,7 @@ module.exports = function({ $handler }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_and_data.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_and_data.w_compile_tf-aws.md index f7305c0fecb..a33df762484 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_and_data.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_and_data.w_compile_tf-aws.md @@ -189,6 +189,7 @@ module.exports = function({ $data_size, $queue, $res }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_with_no_inflight.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_with_no_inflight.w_compile_tf-aws.md index ce8b39b5769..97b4d11b7ac 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_with_no_inflight.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_with_no_inflight.w_compile_tf-aws.md @@ -184,6 +184,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md index 80ac4b9c51e..bb1d0070e2f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md @@ -346,6 +346,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md index 35b710e96e3..53606201b98 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md @@ -596,6 +596,7 @@ module.exports = function({ $headers }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/class.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/class.w_compile_tf-aws.md index 00a508bcae8..b423cfe8b82 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/class.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/class.w_compile_tf-aws.md @@ -621,6 +621,7 @@ module.exports = function({ $PaidStudent }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/closure_class.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/closure_class.w_compile_tf-aws.md index aef512e9d3b..72da1b5af27 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/closure_class.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/closure_class.w_compile_tf-aws.md @@ -167,6 +167,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/construct-base.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/construct-base.w_compile_tf-aws.md index 39acde82ee4..eabf02b0ca4 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/construct-base.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/construct-base.w_compile_tf-aws.md @@ -59,6 +59,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/container_types.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/container_types.w_compile_tf-aws.md index cda7fb0258b..bfd54179179 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/container_types.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/container_types.w_compile_tf-aws.md @@ -119,6 +119,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/custom_obj_id.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/custom_obj_id.w_compile_tf-aws.md index b3293c4502b..00d7255af50 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/custom_obj_id.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/custom_obj_id.w_compile_tf-aws.md @@ -47,6 +47,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/debug_env.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/debug_env.w_compile_tf-aws.md index d0f3691e536..614acaf4327 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/debug_env.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/debug_env.w_compile_tf-aws.md @@ -47,6 +47,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/deep_equality.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/deep_equality.w_compile_tf-aws.md index 025cda772e9..272f3db2b4d 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/deep_equality.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/deep_equality.w_compile_tf-aws.md @@ -1148,6 +1148,7 @@ module.exports = function({ $arrayA, $arrayB }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/double_reference.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/double_reference.w_compile_tf-aws.md index 0dfd5425de9..2b19817c032 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/double_reference.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/double_reference.w_compile_tf-aws.md @@ -200,6 +200,7 @@ module.exports = function({ $initCount }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/doubler.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/doubler.w_compile_tf-aws.md index e14f1485058..bcca563ad66 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/doubler.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/doubler.w_compile_tf-aws.md @@ -302,6 +302,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/enums.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/enums.w_compile_tf-aws.md index 393cee9118a..0ed939988d8 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/enums.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/enums.w_compile_tf-aws.md @@ -146,6 +146,7 @@ module.exports = function({ $SomeEnum, $one, $two }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/expressions_binary_operators.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/expressions_binary_operators.w_compile_tf-aws.md index 97c90de553a..781745fe53b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/expressions_binary_operators.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/expressions_binary_operators.w_compile_tf-aws.md @@ -35,6 +35,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/expressions_string_interpolation.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/expressions_string_interpolation.w_compile_tf-aws.md index 4d0aa647ae8..badd923b5fc 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/expressions_string_interpolation.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/expressions_string_interpolation.w_compile_tf-aws.md @@ -35,6 +35,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md index 03f930063b1..4e9fed02d6a 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md @@ -262,6 +262,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/file_counter.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/file_counter.w_compile_tf-aws.md index d4a1ab16c9f..57c2e8494e7 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/file_counter.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/file_counter.w_compile_tf-aws.md @@ -221,6 +221,7 @@ module.exports = function({ $bucket, $counter }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/for_loop.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/for_loop.w_compile_tf-aws.md index 21269b6a117..8ee67ec2bbf 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/for_loop.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/for_loop.w_compile_tf-aws.md @@ -166,6 +166,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/forward_decl.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/forward_decl.w_compile_tf-aws.md index 16394d2384f..4ef7826ea45 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/forward_decl.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/forward_decl.w_compile_tf-aws.md @@ -47,6 +47,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/function_returns_function.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/function_returns_function.w_compile_tf-aws.md index e4bcc7f383a..516583eb529 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/function_returns_function.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/function_returns_function.w_compile_tf-aws.md @@ -155,6 +155,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/function_type.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/function_type.w_compile_tf-aws.md index e60e4bae976..76b9332e756 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/function_type.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/function_type.w_compile_tf-aws.md @@ -85,6 +85,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/function_variadic_arguments.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/function_variadic_arguments.w_compile_tf-aws.md index aafa45171e5..9759610614c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/function_variadic_arguments.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/function_variadic_arguments.w_compile_tf-aws.md @@ -119,6 +119,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/hello.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/hello.w_compile_tf-aws.md index 9b9fb4edc96..2dd275a31a7 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/hello.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/hello.w_compile_tf-aws.md @@ -198,6 +198,7 @@ module.exports = function({ $bucket }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/identical_inflights.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/identical_inflights.w_compile_tf-aws.md index 622b7ed89fd..2c66bb99430 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/identical_inflights.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/identical_inflights.w_compile_tf-aws.md @@ -69,6 +69,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/impl_interface.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/impl_interface.w_compile_tf-aws.md index f894b85854d..fb2f0597520 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/impl_interface.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/impl_interface.w_compile_tf-aws.md @@ -117,6 +117,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/implicit_std.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/implicit_std.w_compile_tf-aws.md index 5940a644e18..1725ab26d0c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/implicit_std.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/implicit_std.w_compile_tf-aws.md @@ -35,6 +35,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md index b2a7fa6340f..43c332f8f67 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md @@ -214,6 +214,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight-subscribers.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight-subscribers.w_compile_tf-aws.md index 033daa79d43..6462eed3d8f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight-subscribers.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight-subscribers.w_compile_tf-aws.md @@ -294,6 +294,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md index f8ab6d0666e..2454182260f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md @@ -448,6 +448,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_as_struct_members.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_as_struct_members.w_compile_tf-aws.md index e4b38c3dcf6..53025596fb4 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_as_struct_members.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_as_struct_members.w_compile_tf-aws.md @@ -208,6 +208,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_const.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_const.w_compile_tf-aws.md index ca254f1bab1..0fc5f10af3f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_const.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_const.w_compile_tf-aws.md @@ -159,6 +159,7 @@ module.exports = function({ $myConst }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_preflight_object.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_preflight_object.w_compile_tf-aws.md index 44444ece19e..39f7f507449 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_preflight_object.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_preflight_object.w_compile_tf-aws.md @@ -35,6 +35,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_definitions.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_definitions.w_compile_tf-aws.md index ac5ced691c1..a18e3ee251f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_definitions.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_definitions.w_compile_tf-aws.md @@ -261,6 +261,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inner_capture_mutable.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inner_capture_mutable.w_compile_tf-aws.md index 6bae67ddc15..6428870090f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inner_capture_mutable.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inner_capture_mutable.w_compile_tf-aws.md @@ -156,6 +156,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inside_inflight_closure.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inside_inflight_closure.w_compile_tf-aws.md index f6b4f203704..a32686deac1 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inside_inflight_closure.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inside_inflight_closure.w_compile_tf-aws.md @@ -379,6 +379,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_modifiers.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_modifiers.w_compile_tf-aws.md index d1ca8f30ef7..7f048de425b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_modifiers.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_modifiers.w_compile_tf-aws.md @@ -50,6 +50,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_outside_inflight_closure.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_outside_inflight_closure.w_compile_tf-aws.md index cd8354cc440..2afbab3cf9f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_outside_inflight_closure.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_outside_inflight_closure.w_compile_tf-aws.md @@ -163,6 +163,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_structural_interace_handler.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_structural_interace_handler.w_compile_tf-aws.md index 2a98ec0ed59..724e254091a 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_structural_interace_handler.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_structural_interace_handler.w_compile_tf-aws.md @@ -169,6 +169,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_without_init.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_without_init.w_compile_tf-aws.md index 28c12f0ac60..02262ecf1a4 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_without_init.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_without_init.w_compile_tf-aws.md @@ -155,6 +155,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_concat.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_concat.w_compile_tf-aws.md index 46b6de10648..71767dc4e0e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_concat.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_concat.w_compile_tf-aws.md @@ -51,6 +51,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflights_calling_inflights.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflights_calling_inflights.w_compile_tf-aws.md index 9eec43bcca0..d4f206ab7f5 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflights_calling_inflights.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflights_calling_inflights.w_compile_tf-aws.md @@ -406,6 +406,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/interface.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/interface.w_compile_tf-aws.md index 071a20e7301..1a6e6f10a01 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/interface.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/interface.w_compile_tf-aws.md @@ -35,6 +35,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md index 726f6081ded..92901fd9228 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md @@ -306,6 +306,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json.w_compile_tf-aws.md index 4102fdc19ff..067b8800741 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json.w_compile_tf-aws.md @@ -271,6 +271,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md index a00fe034016..6e8f7fde046 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md @@ -265,6 +265,7 @@ module.exports = function({ $b, $fileName, $getJson, $j }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md index c7b04646202..45c705c680c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md @@ -235,6 +235,7 @@ module.exports = function({ $std_Json }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json_string_interpolation.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json_string_interpolation.w_compile_tf-aws.md index bbff1b5f481..06646c8db7d 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json_string_interpolation.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json_string_interpolation.w_compile_tf-aws.md @@ -35,6 +35,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_expr_with_this.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_expr_with_this.w_compile_tf-aws.md index b0d924ca70c..9533d3389c0 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_expr_with_this.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_expr_with_this.w_compile_tf-aws.md @@ -158,6 +158,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_redefinition.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_redefinition.w_compile_tf-aws.md index 3a769c0479a..b319f3781d0 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_redefinition.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_redefinition.w_compile_tf-aws.md @@ -147,6 +147,7 @@ module.exports = function({ $y }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_this.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_this.w_compile_tf-aws.md index 551c7ecfa07..26e8accc873 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_this.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_this.w_compile_tf-aws.md @@ -166,6 +166,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure.w_compile_tf-aws.md index 1fef377074c..00d7268b02c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure.w_compile_tf-aws.md @@ -338,6 +338,7 @@ module.exports = function({ $bucket2 }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure_explicit.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure_explicit.w_compile_tf-aws.md index 06a623093d3..081bfcdc06c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure_explicit.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure_explicit.w_compile_tf-aws.md @@ -176,6 +176,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/mut_container_types.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/mut_container_types.w_compile_tf-aws.md index 454fa1cc1e1..26c0a54aa5a 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/mut_container_types.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/mut_container_types.w_compile_tf-aws.md @@ -119,6 +119,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/nil.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/nil.w_compile_tf-aws.md index 47116339c7c..9a4cf40a78d 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/nil.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/nil.w_compile_tf-aws.md @@ -266,6 +266,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md index 7b01a79ca31..34db0068be0 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md @@ -291,6 +291,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/primitive_methods.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/primitive_methods.w_compile_tf-aws.md index c95bfda6d3b..097d6929258 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/primitive_methods.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/primitive_methods.w_compile_tf-aws.md @@ -35,6 +35,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/print.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/print.w_compile_tf-aws.md index 0b22cc73cdc..4627e706598 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/print.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/print.w_compile_tf-aws.md @@ -234,6 +234,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/reassignment.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/reassignment.w_compile_tf-aws.md index 574a86b0357..26d0408d65e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/reassignment.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/reassignment.w_compile_tf-aws.md @@ -47,6 +47,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/redis.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/redis.w_compile_tf-aws.md index fb403510060..995fcd28188 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/redis.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/redis.w_compile_tf-aws.md @@ -597,6 +597,7 @@ module.exports = function({ $queue, $r, $r2, $util_Util }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md index 5ea05264681..ed59edee046 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md @@ -842,6 +842,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_as_inflight_literal.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_as_inflight_literal.w_compile_tf-aws.md index 19280889453..732846c3593 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_as_inflight_literal.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_as_inflight_literal.w_compile_tf-aws.md @@ -233,6 +233,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_call_static.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_call_static.w_compile_tf-aws.md index 2564ad6ee8f..19ecdbb0750 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_call_static.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_call_static.w_compile_tf-aws.md @@ -180,6 +180,7 @@ module.exports = function({ $globalCounter }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures.w_compile_tf-aws.md index 36007829c12..1141ce6705b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures.w_compile_tf-aws.md @@ -384,6 +384,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md index 689c0e6beef..fa7bcb4660f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md @@ -516,6 +516,7 @@ module.exports = function({ $_parentThis_localCounter, $globalCounter }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/service.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/service.w_compile_tf-aws.md index d847916fefa..98d1b33c3a5 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/service.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/service.w_compile_tf-aws.md @@ -35,6 +35,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/shadowing.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/shadowing.w_compile_tf-aws.md index 9bda77a428d..62b6339908a 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/shadowing.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/shadowing.w_compile_tf-aws.md @@ -175,6 +175,7 @@ module.exports = function({ $fn }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/statements_if.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/statements_if.w_compile_tf-aws.md index 5f731dd497d..4185a82859c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/statements_if.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/statements_if.w_compile_tf-aws.md @@ -164,6 +164,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/statements_variable_declarations.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/statements_variable_declarations.w_compile_tf-aws.md index c0e539cd724..bd7c04a108b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/statements_variable_declarations.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/statements_variable_declarations.w_compile_tf-aws.md @@ -35,6 +35,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/static_members.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/static_members.w_compile_tf-aws.md index 7564d6aa868..81eef5564a5 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/static_members.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/static_members.w_compile_tf-aws.md @@ -170,6 +170,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/std_containers.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/std_containers.w_compile_tf-aws.md index 2610edf6c74..bc4a1e77a6b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/std_containers.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/std_containers.w_compile_tf-aws.md @@ -73,6 +73,7 @@ module.exports = function({ $Animal }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/std_string.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/std_string.w_compile_tf-aws.md index 0a45a587895..1b38050966b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/std_string.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/std_string.w_compile_tf-aws.md @@ -147,6 +147,7 @@ module.exports = function({ $__s1_split_______at_1__, $_s1_concat_s2__, $s1_inde ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/store.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/store.w_compile_tf-aws.md index 627684bf1bf..5e78e48ab09 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/store.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/store.w_compile_tf-aws.md @@ -122,6 +122,7 @@ module.exports = function({ $stdlib }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md index 0e44de21773..1e71508334b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md @@ -625,6 +625,7 @@ module.exports = function({ $Student, $jStudent1 }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/structs.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/structs.w_compile_tf-aws.md index 07256fc6178..7f7670eb191 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/structs.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/structs.w_compile_tf-aws.md @@ -367,6 +367,7 @@ module.exports = function(stdStruct) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/super_call.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/super_call.w_compile_tf-aws.md index 8685ed7b56f..512aab2c956 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/super_call.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/super_call.w_compile_tf-aws.md @@ -384,6 +384,7 @@ module.exports = function({ $InflightA }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/symbol_shadow.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/symbol_shadow.w_compile_tf-aws.md index 44235dc2f2e..4e20e984c0f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/symbol_shadow.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/symbol_shadow.w_compile_tf-aws.md @@ -419,6 +419,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/table.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/table.w_compile_tf-aws.md index 5b86ba98e7b..743e999aee7 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/table.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/table.w_compile_tf-aws.md @@ -56,6 +56,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/test_bucket.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/test_bucket.w_compile_tf-aws.md index 21048fb7bbe..5da2834ed20 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/test_bucket.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/test_bucket.w_compile_tf-aws.md @@ -265,6 +265,7 @@ module.exports = function({ $b }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/test_without_bring.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/test_without_bring.w_compile_tf-aws.md index 54a6a41966b..36d40bb1e56 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/test_without_bring.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/test_without_bring.w_compile_tf-aws.md @@ -145,6 +145,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/try_catch.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/try_catch.w_compile_tf-aws.md index 893ea7a3ae6..7d7c371b5e0 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/try_catch.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/try_catch.w_compile_tf-aws.md @@ -35,6 +35,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/use_inflight_method_inside_init_closure.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/use_inflight_method_inside_init_closure.w_compile_tf-aws.md index 7faab539bb4..ad8a3916130 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/use_inflight_method_inside_init_closure.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/use_inflight_method_inside_init_closure.w_compile_tf-aws.md @@ -159,6 +159,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md index 9865b1a9975..8a89ff5380c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md @@ -631,6 +631,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/while.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/while.w_compile_tf-aws.md index 11d449b7ffe..462e5c4ac20 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/while.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/while.w_compile_tf-aws.md @@ -35,6 +35,7 @@ ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/while_loop_await.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/while_loop_await.w_compile_tf-aws.md index 250a6503c56..d2eda44c634 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/while_loop_await.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/while_loop_await.w_compile_tf-aws.md @@ -176,6 +176,7 @@ module.exports = function({ }) { ## preflight.js ```js const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); const $outdir = process.env.WING_SYNTH_DIR ?? "."; const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; diff --git a/tools/hangar/src/unsupported.test.ts b/tools/hangar/src/unsupported.test.ts index e2a51b9947a..233a805efee 100644 --- a/tools/hangar/src/unsupported.test.ts +++ b/tools/hangar/src/unsupported.test.ts @@ -32,7 +32,7 @@ test("unsupported resource in target", async ({ expect }) => { expect(sanitizeOutput(result.stderr)).toMatchInlineSnapshot(` "ERROR: Unable to create an instance of abstract type \\"@winglang/sdk.cloud.Schedule\\" for this target - target/test.tfgcp.[REDACTED].tmp/.wing/preflight.js:8 + target/test.tfgcp.[REDACTED].tmp/.wing/preflight.js:9 constructor(scope, id) { super(scope, id); >> this.node.root.newAbstract(\\"@winglang/sdk.cloud.Schedule\\",this,\\"cloud.Schedule\\"); From 2c27b8621325189baeaac25cd1b3aa3d75d47e04 Mon Sep 17 00:00:00 2001 From: Sebastian Korfmann Date: Sat, 26 Aug 2023 17:21:05 +0200 Subject: [PATCH 14/48] fix(sdk): defer hash calculation of api spec to terraform (#3974) Makes the code simpler and doesn't require to build keep two identical versions of the openapi spec ## Checklist - [ ] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [ ] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- libs/wingsdk/src/target-tf-aws/api.ts | 11 ++--------- .../__snapshots__/tokens.test.ts.snap | 14 +++++++------- .../sdk_tests/api/delete.w_compile_tf-aws.md | 4 ++-- .../sdk_tests/api/get.w_compile_tf-aws.md | 4 ++-- .../sdk_tests/api/options.w_compile_tf-aws.md | 4 ++-- .../sdk_tests/api/patch.w_compile_tf-aws.md | 4 ++-- .../sdk_tests/api/post.w_compile_tf-aws.md | 4 ++-- .../sdk_tests/api/put.w_compile_tf-aws.md | 4 ++-- .../test_corpus/valid/api.w_compile_tf-aws.md | 8 ++++---- .../valid/api_path_vars.w_compile_tf-aws.md | 4 ++-- .../valid/api_valid_path.w_compile_tf-aws.md | 2 +- .../valid/capture_tokens.w_compile_tf-aws.md | 8 ++++---- .../test_corpus/valid/captures.w_compile_tf-aws.md | 2 +- .../valid/inference.w_compile_tf-aws.md | 2 +- .../valid/issue_2889.w_compile_tf-aws.md | 4 ++-- .../valid/website_with_api.w_compile_tf-aws.md | 2 +- 16 files changed, 37 insertions(+), 44 deletions(-) diff --git a/libs/wingsdk/src/target-tf-aws/api.ts b/libs/wingsdk/src/target-tf-aws/api.ts index c8680e38936..23b9b3617a8 100644 --- a/libs/wingsdk/src/target-tf-aws/api.ts +++ b/libs/wingsdk/src/target-tf-aws/api.ts @@ -1,7 +1,7 @@ import { createHash } from "crypto"; import { join } from "path"; -import { Lazy } from "cdktf/lib/tokens"; +import { Fn, Lazy } from "cdktf"; import { Construct } from "constructs"; import { App } from "./app"; import { Function } from "./function"; @@ -398,14 +398,7 @@ class WingRestApi extends Construct { }, triggers: { // Trigger redeployment when the api spec changes - redeployment: Lazy.stringValue({ - produce: () => { - const value = createHash("sha1") - .update(JSON.stringify(props.apiSpec)) - .digest("hex"); - return value; - }, - }), + redeployment: Fn.sha256(this.api.body), }, }); diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/tokens.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/tokens.test.ts.snap index dea6594c468..9b74cdb321d 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/tokens.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/tokens.test.ts.snap @@ -13,9 +13,9 @@ return class Handler { } }; })())({ -str: JSON.parse(process.env[\\"WING_TOKEN_TFTOKEN_TOKEN_7\\"]), -num: JSON.parse(process.env[\\"WING_TOKEN_8_109562212591386E_298\\"]), -list: JSON.parse(process.env[\\"WING_TOKEN_TFTOKEN_TOKEN_9\\"]) +str: JSON.parse(process.env[\\"WING_TOKEN_TFTOKEN_TOKEN_8\\"]), +num: JSON.parse(process.env[\\"WING_TOKEN_8_109562212591387E_298\\"]), +list: JSON.parse(process.env[\\"WING_TOKEN_TFTOKEN_TOKEN_10\\"]) })" `; @@ -39,7 +39,7 @@ exports[`captures tokens 2`] = ` }, "rest_api_id": "\${aws_api_gateway_rest_api.Api_api_91C07D84.id}", "triggers": { - "redeployment": "5c0f11f0478884e3d7859fa987b8b7ecf8f2f6bc", + "redeployment": "\${sha256(aws_api_gateway_rest_api.Api_api_91C07D84.body)}", }, }, }, @@ -81,9 +81,9 @@ exports[`captures tokens 2`] = ` "environment": { "variables": { "WING_FUNCTION_NAME": "Api-OnRequest-c5395e41-c8f26cae", - "WING_TOKEN_8_109562212591386E_298": "\${jsonencode(var.Number)}", - "WING_TOKEN_TFTOKEN_TOKEN_7": "\${jsonencode(aws_api_gateway_stage.Api_api_stage_E0FA39D6.invoke_url)}", - "WING_TOKEN_TFTOKEN_TOKEN_9": "\${jsonencode(var.List)}", + "WING_TOKEN_8_109562212591387E_298": "\${jsonencode(var.Number)}", + "WING_TOKEN_TFTOKEN_TOKEN_10": "\${jsonencode(var.List)}", + "WING_TOKEN_TFTOKEN_TOKEN_8": "\${jsonencode(aws_api_gateway_stage.Api_api_stage_E0FA39D6.invoke_url)}", }, }, "function_name": "Api-OnRequest-c5395e41-c8f26cae", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md index f10d301ba83..cd5f6150650 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md @@ -103,7 +103,7 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util }) { }, "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", "triggers": { - "redeployment": "3f2ed3e388571f5b15cbc06ba1b47979abe75776" + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" } } }, @@ -240,7 +240,7 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util }) { "variables": { "WING_FUNCTION_NAME": "Handler-c897cd38", "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_7": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" } }, "function_name": "Handler-c897cd38", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md index bc2e695b2d7..c8b2a2eb2c3 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md @@ -107,7 +107,7 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util }) { }, "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", "triggers": { - "redeployment": "10bb301799b13187f97edf464edbfe465c48a11e" + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" } } }, @@ -244,7 +244,7 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util }) { "variables": { "WING_FUNCTION_NAME": "Handler-c838ce37", "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_7": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" } }, "function_name": "Handler-c838ce37", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md index 99601f3e0d4..4d58794546a 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md @@ -137,7 +137,7 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $path }) { }, "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", "triggers": { - "redeployment": "9bcd95d1a951f5b01da431cbc7b3eb0ab691fdeb" + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" } } }, @@ -390,7 +390,7 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $path }) { "variables": { "WING_FUNCTION_NAME": "Handler-c8f5c667", "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_7": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" } }, "function_name": "Handler-c8f5c667", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md index 2afc1588f08..264da21e4d8 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md @@ -104,7 +104,7 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, }, "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", "triggers": { - "redeployment": "2afd05beaf27bcecd099e20f65c2990011bdae48" + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" } } }, @@ -241,7 +241,7 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, "variables": { "WING_FUNCTION_NAME": "Handler-c89df580", "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_7": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" } }, "function_name": "Handler-c89df580", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md index 00aa0e41ce2..00bacf6c3c5 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md @@ -103,7 +103,7 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util, $std_ }, "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", "triggers": { - "redeployment": "afb250682538f14812af9e01ecd4d6310c8cfb87" + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" } } }, @@ -240,7 +240,7 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util, $std_ "variables": { "WING_FUNCTION_NAME": "Handler-c88947b5", "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_7": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" } }, "function_name": "Handler-c88947b5", diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md index 4c3c6600c97..e3178302df0 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md @@ -108,7 +108,7 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, }, "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", "triggers": { - "redeployment": "4c47cf4383648e8878b273255efa16fb8e65ec18" + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" } } }, @@ -245,7 +245,7 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, "variables": { "WING_FUNCTION_NAME": "Handler-c8e4b12f", "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_7": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" } }, "function_name": "Handler-c8e4b12f", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md index c2f2801ab06..5c934216aad 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md @@ -126,7 +126,7 @@ module.exports = function({ }) { }, "rest_api_id": "${aws_api_gateway_rest_api.A_cloudApi_api_37FCEF91.id}", "triggers": { - "redeployment": "66f9e4b69146527e1951e6308dc9128a3ca41abb" + "redeployment": "${sha256(aws_api_gateway_rest_api.A_cloudApi_api_37FCEF91.body)}" } }, "cloudApi_api_deployment_545514BF": { @@ -141,7 +141,7 @@ module.exports = function({ }) { }, "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", "triggers": { - "redeployment": "d4a66f49086c55ef3890317ca607c501380327bb" + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" } } }, @@ -318,7 +318,7 @@ module.exports = function({ }) { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-73c5308f-c85168bb", "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_41": "${jsonencode(aws_api_gateway_stage.A_cloudApi_api_stage_6D822CCE.invoke_url)}" + "WING_TOKEN_TFTOKEN_TOKEN_43": "${jsonencode(aws_api_gateway_stage.A_cloudApi_api_stage_6D822CCE.invoke_url)}" } }, "function_name": "cloud-Api-OnRequest-73c5308f-c85168bb", @@ -378,7 +378,7 @@ module.exports = function({ }) { "variables": { "WING_FUNCTION_NAME": "Handler-c8315524", "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_7": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" } }, "function_name": "Handler-c8315524", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md index 0dd4bcfab02..8519c94f17b 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md @@ -94,7 +94,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { }, "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", "triggers": { - "redeployment": "4ae1656762ef65f98b4b2e240588f473cd4e9469" + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" } } }, @@ -231,7 +231,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "variables": { "WING_FUNCTION_NAME": "Handler-c8f4f2a1", "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_7": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" } }, "function_name": "Handler-c8f4f2a1", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md index 226fd4c1c42..27ff5d8ccf9 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md @@ -73,7 +73,7 @@ module.exports = function({ }) { }, "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", "triggers": { - "redeployment": "ca397382abb9ec6fa6cdfa8a96c26d44013057ba" + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" } } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md index bb1d0070e2f..ac529b918f2 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md @@ -113,7 +113,7 @@ module.exports = function({ }) { }, "rest_api_id": "${aws_api_gateway_rest_api.MyResource_cloudApi_api_4CB9B8E3.id}", "triggers": { - "redeployment": "6eb5a41974a89ebc5d63af9e7fe3ce6e1d6619c7" + "redeployment": "${sha256(aws_api_gateway_rest_api.MyResource_cloudApi_api_4CB9B8E3.body)}" } }, "cloudApi_api_deployment_545514BF": { @@ -128,7 +128,7 @@ module.exports = function({ }) { }, "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", "triggers": { - "redeployment": "6eb5a41974a89ebc5d63af9e7fe3ce6e1d6619c7" + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" } } }, @@ -257,7 +257,7 @@ module.exports = function({ }) { "variables": { "WING_FUNCTION_NAME": "Handler-c8ed8f29", "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_7": "${jsonencode(aws_api_gateway_stage.MyResource_cloudApi_api_stage_A26656F9.invoke_url)}" + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.MyResource_cloudApi_api_stage_A26656F9.invoke_url)}" } }, "function_name": "Handler-c8ed8f29", @@ -287,7 +287,7 @@ module.exports = function({ }) { "variables": { "WING_FUNCTION_NAME": "Handler-c8ecc6d5", "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_30": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + "WING_TOKEN_TFTOKEN_TOKEN_32": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" } }, "function_name": "Handler-c8ecc6d5", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md index 53606201b98..47d5c8e51d4 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md @@ -105,7 +105,7 @@ module.exports = function({ $headers }) { }, "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", "triggers": { - "redeployment": "273d559c5171243e931678d9387d60465c3b99de" + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" } } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md index 43c332f8f67..6ddf59a309e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md @@ -73,7 +73,7 @@ module.exports = function({ }) { }, "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", "triggers": { - "redeployment": "d4a66f49086c55ef3890317ca607c501380327bb" + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" } } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md index 92901fd9228..0c2f88c4f4d 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md @@ -95,7 +95,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { }, "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", "triggers": { - "redeployment": "ca2771f24c2978f810a5a1a5c3373f4ac9d7d88c" + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" } } }, @@ -232,7 +232,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "variables": { "WING_FUNCTION_NAME": "Handler-c88c3aa2", "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_7": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" } }, "function_name": "Handler-c88c3aa2", diff --git a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md index 8a89ff5380c..7df57dcc139 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md @@ -151,7 +151,7 @@ module.exports = function({ }) { }, "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", "triggers": { - "redeployment": "53d34a77ebc006529cbee88240e663619396c753" + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" } } }, From 5d5d46ee60ed948cdfa2e3de40cd1ec080418e21 Mon Sep 17 00:00:00 2001 From: yoav-steinberg Date: Sun, 27 Aug 2023 12:49:41 +0300 Subject: [PATCH 15/48] fix(compiler): capture and lifting cleanups and fixes (#3899) * Types aren't expressions anymore. This reverts a change in #3213. Back then we turned all user defined types into expressions so we can lift/capture them the same way we handle expressions. The downside was that the type system didn't make sense anymore (we added a type variable kind and the symbol env wasn't normalized). A side effect is better error spans on unknown type errors. * To handle capturing/lifting of Types I created a `Liftable` enum that represents AST elements that can be lifted. A lift token now points to a `Liftable` and not to an expression. Currently a `Liftable` can be either an expression or a `UserDefinedType`. * Simplified and normalized the `Lifts` data structure stored per class. It now contains: * `lifts_qualifications` - Stores information for each class inflight method which preflight code it lifts and for that code which ops are performed on it. It's a map of map: "method" -> "preflight js code" -> "set of ops". This data structure is used for generating the lift bindings. * `captures` - Stores capture tokens and for each token the preflight js code used for capture and also whether this is a free capture or an object field. This is used to initialize the tokens in preflight. * `token_for_liftable` - Maps capturable AST elements (`Liftable`s) to a capture token. This is used for generating inflight code when we encounter a captured type or expression during jsification. * Fixed a bug where a type referencing itself but calling an inflight static method wasn't properly lifted. No bindings were generated for it leading to potential permission issues. Added a snapshot test. * Fixed bug parsing static method calls on json `Json.something()` generated a wrong AST expression where we wrapped a `TypeMember` reference inside a `InstanceMemeber` reference (instead of just being a `TypeMemeber` reference). So the end jsification result was `Json.something().something()`?? * Fixed visitor type annotation's default implementation to call `visit_user_defined_type` for user defined types. ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- libs/wingc/src/ast.rs | 62 ++-- libs/wingc/src/closure_transform.rs | 19 +- libs/wingc/src/fold.rs | 9 +- libs/wingc/src/jsify.rs | 115 ++++--- ...class_tries_to_extend_preflight_class.snap | 1 + .../jsify/snapshots/lift_self_reference.snap | 82 +++++ libs/wingc/src/jsify/tests.rs | 15 + libs/wingc/src/lifting.rs | 280 +++++++++++------- libs/wingc/src/lsp/completions.rs | 6 +- libs/wingc/src/lsp/hover.rs | 115 ++++--- libs/wingc/src/lsp/signature.rs | 5 +- .../hovers/static_stdtype_method.snap | 2 +- .../hovers/user_defined_type_annotation.snap | 14 + .../user_defined_type_reference_property.snap | 14 + .../user_defined_type_reference_type.snap | 14 + libs/wingc/src/parser.rs | 73 ++--- libs/wingc/src/type_check.rs | 139 ++++----- libs/wingc/src/type_check/lifts.rs | 167 ++++------- libs/wingc/src/type_check_assert.rs | 2 +- libs/wingc/src/valid_json_visitor.rs | 2 +- libs/wingc/src/visit.rs | 18 +- libs/wingc/src/visit_context.rs | 52 +++- tools/hangar/__snapshots__/invalid.ts.snap | 42 ++- .../call_static_of_myself.w_compile_tf-aws.md | 12 + ...ling_inflight_variants.w_compile_tf-aws.md | 6 +- .../capture_containers.w_compile_tf-aws.md | 2 +- .../capture_mutables.w_compile_tf-aws.md | 2 +- .../valid/capture_tokens.w_compile_tf-aws.md | 1 + .../extern_implementation.w_compile_tf-aws.md | 6 + .../valid/resource.w_compile_tf-aws.md | 1 + ...ource_captures_globals.w_compile_tf-aws.md | 2 +- 31 files changed, 737 insertions(+), 543 deletions(-) create mode 100644 libs/wingc/src/jsify/snapshots/lift_self_reference.snap create mode 100644 libs/wingc/src/lsp/snapshots/hovers/user_defined_type_annotation.snap create mode 100644 libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_property.snap create mode 100644 libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_type.snap diff --git a/libs/wingc/src/ast.rs b/libs/wingc/src/ast.rs index 3c0046ecd7a..2ee52902908 100644 --- a/libs/wingc/src/ast.rs +++ b/libs/wingc/src/ast.rs @@ -148,13 +148,26 @@ pub enum TypeAnnotationKind { // In the future this may be an enum for type-alias, class, etc. For now its just a nested name. // Also this root,fields thing isn't really useful, should just turn in to a Vec. -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Eq)] pub struct UserDefinedType { pub root: Symbol, pub fields: Vec, pub span: WingSpan, } +impl Hash for UserDefinedType { + fn hash(&self, state: &mut H) { + self.root.hash(state); + self.fields.hash(state); + } +} + +impl PartialEq for UserDefinedType { + fn eq(&self, other: &Self) -> bool { + self.root == other.root && self.fields == other.fields + } +} + impl UserDefinedType { pub fn for_class(class: &Class) -> Self { Self { @@ -173,13 +186,6 @@ impl UserDefinedType { pub fn full_path_str(&self) -> String { self.full_path().iter().join(".") } - - pub fn to_expression(&self) -> Expr { - Expr::new( - ExprKind::Reference(Reference::TypeReference(self.clone())), - self.span.clone(), - ) - } } impl Display for UserDefinedType { @@ -346,21 +352,12 @@ pub struct Class { pub methods: Vec<(Symbol, FunctionDefinition)>, pub initializer: FunctionDefinition, pub inflight_initializer: FunctionDefinition, - pub parent: Option, // base class (the expression is a reference to a user defined type) + pub parent: Option, // base class (the expression is a reference to a user defined type) pub implements: Vec, pub phase: Phase, } impl Class { - /// Returns the `UserDefinedType` of the parent class, if any. - pub fn parent_udt(&self) -> Option<&UserDefinedType> { - let Some(expr) = &self.parent else { - return None; - }; - - expr.as_type_reference() - } - /// Returns all methods, including the initializer and inflight initializer. pub fn all_methods(&self, include_initializers: bool) -> Vec<&FunctionDefinition> { let mut methods: Vec<&FunctionDefinition> = vec![]; @@ -606,19 +603,11 @@ impl Expr { let id = EXPR_COUNTER.fetch_add(1, Ordering::SeqCst); Self { id, kind, span } } - - /// Returns the user defined type if the expression is a reference to a type. - pub fn as_type_reference(&self) -> Option<&UserDefinedType> { - match &self.kind { - ExprKind::Reference(Reference::TypeReference(t)) => Some(t), - _ => None, - } - } } #[derive(Debug)] pub struct NewExpr { - pub class: Box, // expression must be a reference to a user defined type + pub class: UserDefinedType, // expression must be a reference to a user defined type pub obj_id: Option>, pub obj_scope: Option>, pub arg_list: ArgList, @@ -724,10 +713,11 @@ pub enum Reference { property: Symbol, optional_accessor: bool, }, - /// A reference to a type (e.g. `std.Json` or `MyResource` or `aws.s3.Bucket`) - TypeReference(UserDefinedType), /// A reference to a member inside a type: `MyType.x` or `MyEnum.A` - TypeMember { typeobject: Box, property: Symbol }, + TypeMember { + type_name: UserDefinedType, + property: Symbol, + }, } impl Spanned for Reference { @@ -739,8 +729,7 @@ impl Spanned for Reference { property, optional_accessor: _, } => object.span().merge(&property.span()), - Reference::TypeReference(type_) => type_.span(), - Reference::TypeMember { typeobject, property } => typeobject.span().merge(&property.span()), + Reference::TypeMember { type_name, property } => type_name.span().merge(&property.span()), } } } @@ -760,13 +749,8 @@ impl Display for Reference { }; write!(f, "{}.{}", obj_str, property.name) } - Reference::TypeReference(type_) => write!(f, "{}", type_), - Reference::TypeMember { typeobject, property } => { - let ExprKind::Reference(ref r) = typeobject.kind else { - return write!(f, ".{}", property.name); - }; - - write!(f, "{}.{}", r, property.name) + Reference::TypeMember { type_name, property } => { + write!(f, "{}.{}", type_name, property.name) } } } diff --git a/libs/wingc/src/closure_transform.rs b/libs/wingc/src/closure_transform.rs index bbb32b85440..34b1516c220 100644 --- a/libs/wingc/src/closure_transform.rs +++ b/libs/wingc/src/closure_transform.rs @@ -190,14 +190,11 @@ impl Fold for ClosureTransformer { ExprKind::Call { callee: CalleeKind::Expr(Box::new(Expr::new( ExprKind::Reference(Reference::TypeMember { - typeobject: Box::new(Expr::new( - ExprKind::Reference(Reference::TypeReference(UserDefinedType { - root: Symbol::new("std", WingSpan::for_file(file_id)), - fields: vec![Symbol::new("Node", WingSpan::for_file(file_id))], - span: WingSpan::for_file(file_id), - })), - WingSpan::for_file(file_id), - )), + type_name: UserDefinedType { + root: Symbol::new("std", WingSpan::for_file(file_id)), + fields: vec![Symbol::new("Node", WingSpan::for_file(file_id))], + span: WingSpan::for_file(file_id), + }, property: Symbol::new("of", WingSpan::for_file(file_id)), }), WingSpan::for_file(file_id), @@ -304,7 +301,7 @@ impl Fold for ClosureTransformer { // ``` let new_class_instance = Expr::new( ExprKind::New(NewExpr { - class: Box::new(class_udt.to_expression()), + class: class_udt, arg_list: ArgList { named_args: IndexMap::new(), pos_args: vec![], @@ -365,9 +362,7 @@ impl<'a> Fold for RenameThisTransformer<'a> { Reference::Identifier(ident) } } - Reference::InstanceMember { .. } | Reference::TypeMember { .. } | Reference::TypeReference(_) => { - fold::fold_reference(self, node) - } + Reference::InstanceMember { .. } | Reference::TypeMember { .. } => fold::fold_reference(self, node), } } } diff --git a/libs/wingc/src/fold.rs b/libs/wingc/src/fold.rs index 9264ae7e934..92df85e9cd2 100644 --- a/libs/wingc/src/fold.rs +++ b/libs/wingc/src/fold.rs @@ -210,7 +210,7 @@ where .map(|(name, def)| (f.fold_symbol(name), f.fold_function_definition(def))) .collect(), initializer: f.fold_function_definition(node.initializer), - parent: node.parent.map(|parent| f.fold_expr(parent)), + parent: node.parent.map(|parent| f.fold_user_defined_type(parent)), implements: node .implements .into_iter() @@ -342,7 +342,7 @@ where F: Fold + ?Sized, { NewExpr { - class: Box::new(f.fold_expr(*node.class)), + class: f.fold_user_defined_type(node.class), obj_id: node.obj_id, arg_list: f.fold_args(node.arg_list), obj_scope: node.obj_scope, @@ -386,9 +386,8 @@ where property: f.fold_symbol(property), optional_accessor, }, - Reference::TypeReference(udt) => Reference::TypeReference(f.fold_user_defined_type(udt)), - Reference::TypeMember { typeobject, property } => Reference::TypeMember { - typeobject: Box::new(f.fold_expr(*typeobject)), + Reference::TypeMember { type_name, property } => Reference::TypeMember { + type_name: f.fold_user_defined_type(type_name), property: f.fold_symbol(property), }, } diff --git a/libs/wingc/src/jsify.rs b/libs/wingc/src/jsify.rs index 57474367b1a..9d72fb7264f 100644 --- a/libs/wingc/src/jsify.rs +++ b/libs/wingc/src/jsify.rs @@ -9,7 +9,6 @@ use std::{ borrow::Borrow, cell::RefCell, cmp::Ordering, - collections::BTreeMap, path::{Path, PathBuf}, vec, }; @@ -25,8 +24,10 @@ use crate::{ diagnostic::{report_diagnostic, Diagnostic, WingSpan}, files::Files, type_check::{ - lifts::Lifts, resolve_super_method, symbol_env::SymbolEnv, ClassLike, Type, TypeRef, Types, VariableKind, - CLASS_INFLIGHT_INIT_NAME, + lifts::{Liftable, Lifts}, + resolve_super_method, resolve_user_defined_type, + symbol_env::SymbolEnv, + ClassLike, Type, TypeRef, Types, VariableKind, CLASS_INFLIGHT_INIT_NAME, }, visit_context::VisitContext, MACRO_REPLACE_ARGS, MACRO_REPLACE_ARGS_TEXT, MACRO_REPLACE_SELF, WINGSDK_ASSEMBLY_NAME, WINGSDK_RESOURCE, @@ -243,9 +244,8 @@ impl<'a> JSifier<'a> { property, optional_accessor, } => self.jsify_expression(object, ctx) + (if *optional_accessor { "?." } else { "." }) + &property.to_string(), - Reference::TypeReference(udt) => self.jsify_user_defined_type(&udt), - Reference::TypeMember { typeobject, property } => { - let typename = self.jsify_expression(typeobject, ctx); + Reference::TypeMember { type_name, property } => { + let typename = self.jsify_user_defined_type(type_name, ctx); typename + "." + &property.to_string() } } @@ -288,21 +288,21 @@ impl<'a> JSifier<'a> { } } - fn jsify_type(&self, typ: &TypeAnnotationKind) -> Option { + fn jsify_type(&self, typ: &TypeAnnotationKind, ctx: &mut JSifyContext) -> Option { match typ { - TypeAnnotationKind::UserDefined(t) => Some(self.jsify_user_defined_type(&t)), + TypeAnnotationKind::UserDefined(t) => Some(self.jsify_user_defined_type(&t, ctx)), TypeAnnotationKind::String => Some("string".to_string()), TypeAnnotationKind::Number => Some("number".to_string()), TypeAnnotationKind::Bool => Some("boolean".to_string()), TypeAnnotationKind::Array(t) => { - if let Some(inner) = self.jsify_type(&t.kind) { + if let Some(inner) = self.jsify_type(&t.kind, ctx) { Some(format!("{}[]", inner)) } else { None } } TypeAnnotationKind::Optional(t) => { - if let Some(inner) = self.jsify_type(&t.kind) { + if let Some(inner) = self.jsify_type(&t.kind, ctx) { Some(format!("{}?", inner)) } else { None @@ -312,17 +312,17 @@ impl<'a> JSifier<'a> { } } - fn jsify_struct_field_to_json_schema_type(&self, typ: &TypeAnnotationKind) -> String { + fn jsify_struct_field_to_json_schema_type(&self, typ: &TypeAnnotationKind, ctx: &mut JSifyContext) -> String { match typ { TypeAnnotationKind::Bool | TypeAnnotationKind::Number | TypeAnnotationKind::String => { - format!("type: \"{}\"", self.jsify_type(typ).unwrap()) + format!("type: \"{}\"", self.jsify_type(typ, ctx).unwrap()) } TypeAnnotationKind::UserDefined(udt) => { format!("\"$ref\": \"#/$defs/{}\"", udt.root.name) } TypeAnnotationKind::Json => "type: \"object\"".to_string(), TypeAnnotationKind::Map(t) => { - let map_type = self.jsify_type(&t.kind); + let map_type = self.jsify_type(&t.kind, ctx); // Ensure all keys are of some type format!( "type: \"object\", patternProperties: {{ \".*\": {{ type: \"{}\" }} }}", @@ -336,15 +336,22 @@ impl<'a> JSifier<'a> { TypeAnnotationKind::Set(_) => "uniqueItems: true,".to_string(), _ => "".to_string(), }, - self.jsify_struct_field_to_json_schema_type(&t.kind) + self.jsify_struct_field_to_json_schema_type(&t.kind, ctx) ) } - TypeAnnotationKind::Optional(t) => self.jsify_struct_field_to_json_schema_type(&t.kind), + TypeAnnotationKind::Optional(t) => self.jsify_struct_field_to_json_schema_type(&t.kind, ctx), _ => "type: \"null\"".to_string(), } } - fn jsify_user_defined_type(&self, udt: &UserDefinedType) -> String { + pub fn jsify_user_defined_type(&self, udt: &UserDefinedType, ctx: &mut JSifyContext) -> String { + if ctx.visit_ctx.current_phase() == Phase::Inflight { + if let Some(lifts) = &ctx.lifts { + if let Some(t) = lifts.token_for_liftable(&Liftable::Type(udt.clone())) { + return t.clone(); + } + } + } udt.full_path_str() } @@ -355,7 +362,7 @@ impl<'a> JSifier<'a> { // then emit the token instead of the expression. if ctx.visit_ctx.current_phase() == Phase::Inflight { if let Some(lifts) = &ctx.lifts { - if let Some(t) = lifts.token_for_expr(&expression.id) { + if let Some(t) = lifts.token_for_liftable(&Liftable::Expr(expression.id)) { return t.clone(); } } @@ -399,7 +406,7 @@ impl<'a> JSifier<'a> { // user-defined types), we simply instantiate the type directly (maybe in the future we will // allow customizations of user-defined types as well, but for now we don't). - let ctor = self.jsify_expression(class, ctx); + let ctor = self.jsify_user_defined_type(class, ctx); let scope = if is_preflight_class && class_type.std_construct_args { if let Some(scope) = obj_scope { @@ -654,7 +661,12 @@ impl<'a> JSifier<'a> { } } - pub fn jsify_struct_properties(&self, fields: &Vec, extends: &Vec) -> CodeMaker { + pub fn jsify_struct_properties( + &self, + fields: &Vec, + extends: &Vec, + ctx: &mut JSifyContext, + ) -> CodeMaker { let mut code = CodeMaker::default(); // Any parents we need to get their properties @@ -669,7 +681,7 @@ impl<'a> JSifier<'a> { code.line(format!( "{}: {{ {} }},", field.name.name, - self.jsify_struct_field_to_json_schema_type(&field.member_type.kind) + self.jsify_struct_field_to_json_schema_type(&field.member_type.kind, ctx) )); } @@ -682,6 +694,7 @@ impl<'a> JSifier<'a> { fields: &Vec, extends: &Vec, _env: &SymbolEnv, + ctx: &mut JSifyContext, ) -> CodeMaker { // To allow for struct validation at runtime this will generate a JS class that has a static // getValidator method that will create a json schema validator. @@ -701,7 +714,7 @@ impl<'a> JSifier<'a> { code.open("properties: {"); - code.add_code(self.jsify_struct_properties(fields, extends)); + code.add_code(self.jsify_struct_properties(fields, extends, ctx)); // determine which fields are required, and which schemas need to be added to validator for field in fields { @@ -844,7 +857,8 @@ impl<'a> JSifier<'a> { fn jsify_statement(&self, env: &SymbolEnv, statement: &Stmt, ctx: &mut JSifyContext) -> CodeMaker { CompilationContext::set(CompilationPhase::Jsifying, &statement.span); - match &statement.kind { + ctx.visit_ctx.push_stmt(statement.idx); + let code = match &statement.kind { StmtKind::Bring { source, identifier } => match source { BringSource::BuiltinModule(name) => CodeMaker::one_line(format!("const {} = {}.{};", name, STDLIB, name)), BringSource::JsiiModule(name) => CodeMaker::one_line(format!( @@ -879,11 +893,11 @@ impl<'a> JSifier<'a> { type_: _, } => { let initial_value = self.jsify_expression(initial_value, ctx); - return if *reassignable { + if *reassignable { CodeMaker::one_line(format!("let {var_name} = {initial_value};")) } else { CodeMaker::one_line(format!("const {var_name} = {initial_value};")) - }; + } } StmtKind::ForLoop { iterator, @@ -1031,7 +1045,7 @@ impl<'a> JSifier<'a> { CodeMaker::default() } StmtKind::Struct { name, fields, extends } => { - let mut code = self.jsify_struct(name, fields, extends, env); + let mut code = self.jsify_struct(name, fields, extends, env, ctx); // Emits struct class file self.emit_struct_file(name, code, ctx); @@ -1086,7 +1100,9 @@ impl<'a> JSifier<'a> { code } StmtKind::CompilerDebugEnv => CodeMaker::default(), - } + }; + ctx.visit_ctx.pop_stmt(); + code } fn jsify_enum(&self, values: &IndexSet) -> CodeMaker { @@ -1231,13 +1247,12 @@ impl<'a> JSifier<'a> { self.emit_inflight_file(&class, inflight_class_code, ctx); // lets write the code for the preflight side of the class + // TODO: why would we want to do this for inflight classes?? maybe return here in that case? let mut code = CodeMaker::default(); // default base class for preflight classes is `core.Resource` let extends = if let Some(parent) = &class.parent { - let base = parent.as_type_reference().expect("resolve parent type"); - - format!(" extends {}", base) + format!(" extends {}", self.jsify_user_defined_type(parent, ctx)) } else { format!(" extends {}", STDLIB_CORE_RESOURCE) }; @@ -1337,10 +1352,9 @@ impl<'a> JSifier<'a> { code.open(format!("require(\"{client_path}\")({{")); if let Some(lifts) = &ctx.lifts { - for capture in lifts.captures() { - let preflight = capture.code.clone(); - let lift_type = format!("context._lift({})", preflight); - code.line(format!("{}: ${{{}}},", capture.token, lift_type)); + for (token, capture) in lifts.captures.iter().filter(|(_, cap)| !cap.is_field) { + let lift_type = format!("context._lift({})", capture.code); + code.line(format!("{}: ${{{}}},", token, lift_type)); } } @@ -1399,7 +1413,7 @@ impl<'a> JSifier<'a> { class_code.open(format!( "class {name}{} {{", if let Some(parent) = &class.parent { - format!(" extends {}", self.jsify_expression(&parent, &mut ctx)) + format!(" extends {}", self.jsify_user_defined_type(&parent, ctx)) } else { "".to_string() } @@ -1444,7 +1458,11 @@ impl<'a> JSifier<'a> { let mut code = CodeMaker::default(); let inputs = if let Some(lifts) = &ctx.lifts { - lifts.captures().iter().map(|c| c.token.clone()).join(", ") + lifts + .captures + .iter() + .filter_map(|(token, cap)| if !cap.is_field { Some(token) } else { None }) + .join(", ") } else { Default::default() }; @@ -1475,7 +1493,12 @@ impl<'a> JSifier<'a> { }; let parent_fields = if let Some(parent) = &class.parent { - let parent_type = self.types.get_expr_type(parent); + let parent_type = resolve_user_defined_type( + parent, + ctx.visit_ctx.current_env().expect("an env"), + ctx.visit_ctx.current_stmt_idx(), + ) + .expect("resolved type"); if let Some(parent_lifts) = &parent_type.as_class().unwrap().lifts { parent_lifts.lifted_fields().keys().map(|f| f.clone()).collect_vec() } else { @@ -1532,13 +1555,12 @@ impl<'a> JSifier<'a> { let class_name = class.name.to_string(); - let lifts_per_method = if let Some(lifts) = &ctx.lifts { - lifts.lifts_per_method() - } else { - BTreeMap::default() + let Some(lifts) = ctx.lifts else { + return bind_method; }; - let lifts = lifts_per_method + let lift_qualifications = lifts + .lifts_qualifications .iter() .filter(|(m, _)| { let var_kind = &class_type @@ -1554,19 +1576,18 @@ impl<'a> JSifier<'a> { .collect_vec(); // Skip jsifying this method if there are no lifts (in this case we'll use super's register bind method) - if lifts.is_empty() { + if lift_qualifications.is_empty() { return bind_method; } bind_method.open(format!("{modifier}{bind_method_name}(host, ops) {{")); - for (method_name, method_lifts) in lifts { + for (method_name, method_qual) in lift_qualifications { bind_method.open(format!("if (ops.includes(\"{method_name}\")) {{")); - for lift in method_lifts { - let ops_strings = lift.ops.iter().map(|op| format!("\"{}\"", op)).join(", "); - let field = lift.code.clone(); + for (code, method_lift_qual) in method_qual { + let ops_strings = method_lift_qual.ops.iter().map(|op| format!("\"{}\"", op)).join(", "); bind_method.line(format!( - "{class_name}._registerBindObject({field}, host, [{ops_strings}]);", + "{class_name}._registerBindObject({code}, host, [{ops_strings}]);", )); } bind_method.close("}"); diff --git a/libs/wingc/src/jsify/snapshots/fails_when_inflight_class_tries_to_extend_preflight_class.snap b/libs/wingc/src/jsify/snapshots/fails_when_inflight_class_tries_to_extend_preflight_class.snap index 67184370974..e8403443f54 100644 --- a/libs/wingc/src/jsify/snapshots/fails_when_inflight_class_tries_to_extend_preflight_class.snap +++ b/libs/wingc/src/jsify/snapshots/fails_when_inflight_class_tries_to_extend_preflight_class.snap @@ -3,3 +3,4 @@ source: libs/wingc/src/jsify/tests.rs --- ## Errors Class "Derived" is an inflight class and cannot extend preflight class "Base" 2:35 +Cannot qualify access to a lifted type "Base" (see https://github.com/winglang/wing/issues/76 for more details) 2:35 diff --git a/libs/wingc/src/jsify/snapshots/lift_self_reference.snap b/libs/wingc/src/jsify/snapshots/lift_self_reference.snap new file mode 100644 index 00000000000..ab70ce1363f --- /dev/null +++ b/libs/wingc/src/jsify/snapshots/lift_self_reference.snap @@ -0,0 +1,82 @@ +--- +source: libs/wingc/src/jsify/tests.rs +--- +## Code + +```w + + class Foo { + static inflight static_method() {} + + inflight bar() { + Foo.static_method(); + } + } + +``` + +## inflight.Foo-1.js + +```js +module.exports = function({ }) { + class Foo { + constructor({ }) { + } + static async static_method() { + } + async bar() { + (await Foo.static_method()); + } + } + return Foo; +} +``` + +## preflight.js + +```js +const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); +const $outdir = process.env.WING_SYNTH_DIR ?? "."; +const $wing_is_test = process.env.WING_IS_TEST === "true"; +const std = $stdlib.std; +class $Root extends $stdlib.std.Resource { + constructor(scope, id) { + super(scope, id); + class Foo extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + } + static _toInflightType(context) { + return ` + require("./inflight.Foo-1.js")({ + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const FooClient = ${Foo._toInflightType(this)}; + const client = new FooClient({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["static_method", "bar", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("bar")) { + Foo._registerBindObject(Foo, host, ["static_method"]); + } + super._registerBind(host, ops); + } + } + } +} +const $App = $stdlib.core.App.for(process.env.WING_TARGET); +new $App({ outdir: $outdir, name: "main", rootConstruct: $Root, plugins: $plugins, isTestEnvironment: $wing_is_test, entrypointDir: process.env['WING_SOURCE_DIR'], rootId: process.env['WING_ROOT_ID'] }).synth(); +``` + diff --git a/libs/wingc/src/jsify/tests.rs b/libs/wingc/src/jsify/tests.rs index 4d7d6bc1991..bd496b91158 100644 --- a/libs/wingc/src/jsify/tests.rs +++ b/libs/wingc/src/jsify/tests.rs @@ -1992,3 +1992,18 @@ fn implicit_lift_inflight_init() { "# ); } + +#[test] +fn lift_self_reference() { + assert_compile_ok!( + r#" + class Foo { + static inflight static_method() {} + + inflight bar() { + Foo.static_method(); + } + } + "# + ); +} diff --git a/libs/wingc/src/lifting.rs b/libs/wingc/src/lifting.rs index 69cfce91b93..5e131ab4bc3 100644 --- a/libs/wingc/src/lifting.rs +++ b/libs/wingc/src/lifting.rs @@ -1,13 +1,18 @@ use crate::{ - ast::{Class, Expr, ExprKind, FunctionBody, FunctionDefinition, Phase, Reference, Scope, Stmt, UserDefinedType}, + ast::{ + Class, Expr, ExprKind, FunctionBody, FunctionDefinition, Phase, Reference, Scope, Stmt, Symbol, UserDefinedType, + }, comp_ctx::{CompilationContext, CompilationPhase}, - diagnostic::{report_diagnostic, Diagnostic, WingSpan}, + diagnostic::{report_diagnostic, Diagnostic}, jsify::{JSifier, JSifyContext}, type_check::{ - lifts::Lifts, resolve_user_defined_type, symbol_env::LookupResult, TypeRef, CLOSURE_CLASS_HANDLE_METHOD, + lifts::{Liftable, Lifts}, + resolve_user_defined_type, + symbol_env::LookupResult, + ClassLike, TypeRef, CLOSURE_CLASS_HANDLE_METHOD, }, visit::{self, Visit}, - visit_context::VisitContext, + visit_context::{VisitContext, VisitorWithContext}, }; pub struct LiftVisitor<'a> { @@ -25,69 +30,47 @@ impl<'a> LiftVisitor<'a> { } } - fn is_self_type_reference(&self, node: &Expr) -> bool { + fn is_self_type_reference(&self, udt: &UserDefinedType) -> bool { let Some(current_class_udt) = self.ctx.current_class() else { return false; }; - let Some(udt) = node.as_type_reference() else { - return false; - }; - udt.full_path_str() == current_class_udt.full_path_str() } - fn is_defined_in_current_env(&self, fullname: &str, span: &WingSpan) -> bool { - // if the symbol is defined later in the current environment, it means we can't capture a - // reference to a symbol with the same name from a parent so bail out. - // notice that here we are looking in the current environment and not in the method's environment - if let Some(env) = self.ctx.current_env() { - let lookup = env.lookup_nested_str(&fullname, Some(self.ctx.current_stmt_idx())); - - match lookup { - LookupResult::Found(_, e) => { - // if we found the symbol in the current environment, it means we don't need to capture it at all - if e.env.is_same(env) { - return true; - } - } - LookupResult::DefinedLater => { - report_diagnostic(Diagnostic { - span: Some(span.clone()), - message: format!( - "Cannot capture symbol \"{fullname}\" because it is shadowed by another symbol with the same name" - ), - }); - return true; - } - LookupResult::NotFound(_) | LookupResult::ExpectedNamespace(_) => {} + fn verify_defined_in_current_env(&mut self, symbol: &Symbol) { + // Skip this check if we're in an "unresolved" expression (e.g. type errors) to avoid cascading errors + if let Some(expr_id) = self.ctx().current_expr() { + if self.jsify.types.get_expr_id_type(expr_id).is_unresolved() { + return; } } - return false; + // If the symbol is defined later in the current environment, it means we can't reference an identicatl symbol + // from an outter scope (and we can't capture it either). In that case we'll report and error. + // Note: + // In theory this can be supported, but it'll fail later on when running the JS code because of how + // JS creates all symbols *before* running the code of the current scope (https://tc39.es/ecma262/#sec-let-and-const-declarations). + // Solving this will require renaming the symbols in the current scope to avoid the conflict, so the east way is just to adopt + // the JS limitation. Will be good to improve on this in the future. + if let Some(env) = self.ctx.current_env() { + if matches!( + env.lookup_ext(symbol, Some(self.ctx.current_stmt_idx())), + LookupResult::DefinedLater + ) { + report_diagnostic(Diagnostic { + span: Some(symbol.span.clone()), + message: format!("Cannot access \"{symbol}\" because it is shadowed by another symbol with the same name"), + }); + } + } } - fn should_capture_expr(&self, node: &Expr) -> bool { - let ExprKind::Reference(ref r) = node.kind else { - return false; - }; - - let (fullname, span) = match r { - Reference::Identifier(ref symb) => (symb.name.clone(), symb.span.clone()), - Reference::TypeReference(ref t) => (t.full_path_str(), t.span.clone()), - _ => return false, - }; + fn should_capture_type(&self, node: &UserDefinedType) -> bool { + let fullname = node.full_path_str(); // skip "This" (which is the type of "this") - if let Some(class) = &self.ctx.current_class() { - if class.full_path_str() == fullname { - return false; - } - } - - // if the symbol is defined in the *current* environment (which could also be a nested scope - // inside the current method), we don't need to capture it - if self.is_defined_in_current_env(&fullname, &span) { + if self.is_self_type_reference(node) { return false; } @@ -126,8 +109,8 @@ impl<'a> LiftVisitor<'a> { return true; } - fn jsify_expr(&mut self, node: &Expr, phase: Phase) -> String { - self.ctx.push_phase(phase); + fn jsify_expr(&mut self, node: &Expr) -> String { + self.ctx.push_phase(Phase::Preflight); let res = self.jsify.jsify_expression( &node, &mut JSifyContext { @@ -138,101 +121,176 @@ impl<'a> LiftVisitor<'a> { self.ctx.pop_phase(); res } + + fn jsify_udt(&mut self, node: &UserDefinedType) -> String { + let res = self.jsify.jsify_user_defined_type( + &node, + &mut JSifyContext { + lifts: None, + visit_ctx: &mut self.ctx, + }, + ); + res + } } impl<'a> Visit<'a> for LiftVisitor<'a> { fn visit_reference(&mut self, node: &'a Reference) { match node { Reference::InstanceMember { property, .. } => { - self.ctx.push_property(property.name.clone()); + self.ctx.push_property(property); visit::visit_reference(self, &node); self.ctx.pop_property(); } Reference::TypeMember { property, .. } => { - self.ctx.push_property(property.name.clone()); + self.ctx.push_property(property); visit::visit_reference(self, &node); self.ctx.pop_property(); } - _ => visit::visit_reference(self, &node), + Reference::Identifier(symb) => { + self.verify_defined_in_current_env(symb); + visit::visit_reference(self, &node); + } } } + fn visit_type_annotation(&mut self, node: &'a crate::ast::TypeAnnotation) { + self.ctx.push_type_annotation(); + visit::visit_type_annotation(self, node); + self.ctx.pop_type_annotation(); + } + fn visit_expr(&mut self, node: &'a Expr) { CompilationContext::set(CompilationPhase::Lifting, &node.span); + self.with_expr(node.id, |v| { + let expr_phase = self.jsify.types.get_expr_phase(&node).unwrap(); + let expr_type = v.jsify.types.get_expr_type(&node); - let expr_phase = self.jsify.types.get_expr_phase(&node).unwrap(); - let expr_type = self.jsify.types.get_expr_type(&node); + // Skip expressions of an unresoved type (type errors) + if expr_type.is_unresolved() { + visit::visit_expr(v, node); + return; + } + + // this whole thing only applies to inflight code + if v.ctx.current_phase() == Phase::Preflight { + visit::visit_expr(v, node); + return; + } + + //--------------- + // LIFT + if expr_phase == Phase::Preflight { + // jsify the expression so we can get the preflight code + let code = v.jsify_expr(&node); + + let property = if let Some(property) = v.ctx.current_property() { + Some(property) + } else if expr_type.is_closure() { + // this is the case where we are lifting a "closure class" (e.g. a class that has a "handle" + // method) the reason we might not have "property" set is because closure classes might be + // syntheticaly generated by the compiler from closures. + Some(Symbol::global(CLOSURE_CLASS_HANDLE_METHOD)) + } else { + None + }; + + // check that we can qualify the lift (e.g. determine which property is being accessed) + if property.is_none() && expr_type.is_preflight_class() { + report_diagnostic(Diagnostic { + message: format!( + "Cannot qualify access to a lifted object of type \"{}\" (see https://github.com/winglang/wing/issues/76 for more details)", + expr_type.to_string() + ), + span: Some(node.span.clone()), + }); + + return; + } + + // if this is an inflight field of "this" no need to lift it + if is_inflight_field(&node, expr_type, &property) { + return; + } + + let mut lifts = v.lifts_stack.pop().unwrap(); + let is_field = code.contains("this."); // TODO: starts_with? + lifts.lift(v.ctx.current_method(), property, &code, is_field); + lifts.capture(&Liftable::Expr(node.id), &code, is_field); + v.lifts_stack.push(lifts); + return; + } + + visit::visit_expr(v, node); + }); + } + + fn visit_user_defined_type(&mut self, node: &'a UserDefinedType) { + // If we're inside a type annotation we currently don't need to capture type since our target compilation + // is typeless (javascript). For typed targes we may need to also capture the types used in annotations. + if self.ctx.in_type_annotation() { + visit::visit_user_defined_type(self, node); + return; + } - // this whole thing only applies to inflight expressions + // this whole thing only applies to inflight code if self.ctx.current_phase() == Phase::Preflight { - visit::visit_expr(self, node); + visit::visit_user_defined_type(self, node); return; } - // if this expression represents the current class, no need to capture it (it is by definition - // available in the current scope) - if self.is_self_type_reference(&node) { - visit::visit_expr(self, node); + // Get the type of the udt + let udt_type = resolve_user_defined_type( + node, + self.ctx.current_env().expect("an env"), + self.ctx.current_stmt_idx(), + ) + .unwrap_or(self.jsify.types.error()); + + // Since our target languages is isn't statically typed, we don't need to capture interfaces + if udt_type.as_interface().is_some() { + visit::visit_user_defined_type(self, node); return; } //--------------- // LIFT - if expr_phase == Phase::Preflight { + if udt_type.is_preflight_class() { // jsify the expression so we can get the preflight code - let code = self.jsify_expr(&node, Phase::Preflight); - - let property = if let Some(property) = self.ctx.current_property() { - Some(property) - } else if expr_type.is_closure() { - // this is the case where we are lifting a "closure class" (e.g. a class that has a "handle" - // method) the reason we might not have "property" set is because closure classes might be - // syntheticaly generated by the compiler from closures. - Some(CLOSURE_CLASS_HANDLE_METHOD.to_string()) - } else { - None - }; + let code = self.jsify_udt(&node); + + let property = self.ctx.current_property(); // check that we can qualify the lift (e.g. determine which property is being accessed) - if property.is_none() && expr_type.as_preflight_class().is_some() { + if property.is_none() { report_diagnostic(Diagnostic { message: format!( - "Cannot qualify access to a lifted object of type \"{}\" (see https://github.com/winglang/wing/issues/76 for more details)", - expr_type.to_string() - ), + "Cannot qualify access to a lifted type \"{udt_type}\" (see https://github.com/winglang/wing/issues/76 for more details)"), span: Some(node.span.clone()), }); return; } - // if this is an inflight property, no need to lift it - if is_inflight_field(&node, expr_type, &property) { - return; - } - let mut lifts = self.lifts_stack.pop().unwrap(); - lifts.lift(node.id, self.ctx.current_method(), property, &code); + lifts.lift(self.ctx.current_method(), property, &code, false); self.lifts_stack.push(lifts); - - return; } //--------------- // CAPTURE - - if self.should_capture_expr(&node) { - // jsify the expression so we can get the preflight code - let code = self.jsify_expr(&node, Phase::Inflight); + if self.should_capture_type(&node) { + // jsify the type so we can get the preflight code + let code = self.jsify_udt(&node); let mut lifts = self.lifts_stack.pop().unwrap(); - lifts.capture(&node.id, &code); + lifts.capture(&Liftable::Type(node.clone()), &code, false); self.lifts_stack.push(lifts); return; } - visit::visit_expr(self, node); + visit::visit_user_defined_type(self, node); } // State Tracking @@ -257,6 +315,10 @@ impl<'a> Visit<'a> for LiftVisitor<'a> { // nothing to do if we are emitting an inflight class from within an inflight scope if self.ctx.current_phase() == Phase::Inflight && node.phase == Phase::Inflight { self.visit_symbol(&node.name); + + visit::visit_function_definition(self, &node.initializer); + visit::visit_function_definition(self, &node.inflight_initializer); + for field in node.fields.iter() { self.visit_symbol(&field.name); self.visit_type_annotation(&field.member_type); @@ -265,14 +327,12 @@ impl<'a> Visit<'a> for LiftVisitor<'a> { self.visit_symbol(&name); visit::visit_function_definition(self, &def); } - visit::visit_function_definition(self, &node.initializer); if let Some(parent) = &node.parent { - self.visit_expr(&parent); + self.visit_user_defined_type(&parent); } for interface in node.implements.iter() { self.visit_user_defined_type(&interface); } - visit::visit_function_definition(self, &node.inflight_initializer); return; } @@ -297,7 +357,7 @@ impl<'a> Visit<'a> for LiftVisitor<'a> { if let Some(parent) = &node.parent { let mut lifts = self.lifts_stack.pop().unwrap(); - lifts.capture(&parent.id, &self.jsify_expr(&parent, Phase::Inflight)); + lifts.capture(&Liftable::Type(parent.clone()), &self.jsify_udt(&parent), false); self.lifts_stack.push(lifts); } @@ -332,17 +392,13 @@ impl<'a> Visit<'a> for LiftVisitor<'a> { /// Check if an expression is a reference to an inflight field (`this.`). /// in this case, we don't need to lift the field because it is already available -fn is_inflight_field(expr: &Expr, expr_type: TypeRef, property: &Option) -> bool { +fn is_inflight_field(expr: &Expr, expr_type: TypeRef, property: &Option) -> bool { if let ExprKind::Reference(Reference::Identifier(symb)) = &expr.kind { if symb.name == "this" { if let (Some(cls), Some(property)) = (expr_type.as_preflight_class(), property) { - if let LookupResult::Found(kind, _) = cls.env.lookup_nested_str(&property, None) { - if let Some(var) = kind.as_variable() { - if !var.type_.is_closure() { - if var.phase != Phase::Preflight { - return true; - } - } + if let Some(var) = cls.get_field(&property) { + if var.phase != Phase::Preflight { + return true; } } } @@ -351,3 +407,9 @@ fn is_inflight_field(expr: &Expr, expr_type: TypeRef, property: &Option) return false; } + +impl VisitorWithContext for LiftVisitor<'_> { + fn ctx(&mut self) -> &mut VisitContext { + &mut self.ctx + } +} diff --git a/libs/wingc/src/lsp/completions.rs b/libs/wingc/src/lsp/completions.rs index 7d09bd0ac70..4b86d819fdd 100644 --- a/libs/wingc/src/lsp/completions.rs +++ b/libs/wingc/src/lsp/completions.rs @@ -16,7 +16,7 @@ use crate::lsp::sync::{JSII_TYPES, PROJECT_DATA, WING_TYPES}; use crate::type_check::symbol_env::{LookupResult, StatementIdx}; use crate::type_check::{ fully_qualify_std_type, import_udt_from_jsii, resolve_super_method, resolve_user_defined_type, ClassLike, Namespace, - Struct, SymbolKind, Type, Types, UnsafeRef, VariableKind, CLASS_INFLIGHT_INIT_NAME, CLASS_INIT_NAME, + Struct, SymbolKind, Type, TypeRef, Types, UnsafeRef, VariableKind, CLASS_INFLIGHT_INIT_NAME, CLASS_INIT_NAME, }; use crate::visit::{visit_expr, visit_type_annotation, Visit}; use crate::wasm_util::{ptr_to_string, string_to_combined_ptr, WASM_RETURN_ERROR}; @@ -309,7 +309,7 @@ pub fn on_completion(params: lsp_types::CompletionParams) -> CompletionResponse }, arg_list, )), - ExprKind::New(new_expr) => Some((types.get_expr_type(&new_expr.class), &new_expr.arg_list)), + ExprKind::New(new_expr) => Some((types.get_expr_type(&e), &new_expr.arg_list)), _ => None, }) { let mut completions = @@ -646,7 +646,7 @@ fn get_inner_struct_completions(struct_: &Struct, existing_fields: &Vec) /// Gets accessible properties on a type as a list of CompletionItems fn get_completions_from_type( - type_: &UnsafeRef, + type_: &TypeRef, types: &Types, current_phase: Option, is_instance: bool, diff --git a/libs/wingc/src/lsp/hover.rs b/libs/wingc/src/lsp/hover.rs index b41df8cc23a..b6cf333bf26 100644 --- a/libs/wingc/src/lsp/hover.rs +++ b/libs/wingc/src/lsp/hover.rs @@ -1,12 +1,15 @@ use crate::ast::{ CalleeKind, Class, Expr, ExprKind, FunctionBody, FunctionDefinition, Phase, Reference, Scope, Stmt, StmtKind, Symbol, - TypeAnnotation, TypeAnnotationKind, + UserDefinedType, }; use crate::diagnostic::WingSpan; use crate::docs::Documented; use crate::lsp::sync::PROJECT_DATA; use crate::type_check::symbol_env::LookupResult; -use crate::type_check::{resolve_super_method, ClassLike, Type, Types, CLASS_INFLIGHT_INIT_NAME, CLASS_INIT_NAME}; +use crate::type_check::{ + resolve_super_method, resolve_user_defined_type, ClassLike, Type, TypeRef, Types, CLASS_INFLIGHT_INIT_NAME, + CLASS_INIT_NAME, +}; use crate::visit::{self, Visit}; use crate::wasm_util::WASM_RETURN_ERROR; use crate::wasm_util::{ptr_to_string, string_to_combined_ptr}; @@ -74,12 +77,7 @@ impl<'a> HoverVisitor<'a> { } } - fn visit_reference_with_member(&mut self, object: &'a Expr, property: &'a Symbol) { - if object.span.contains(&self.position) { - self.visit_expr(object); - return; - } - let obj_type = self.types.get_expr_type(object); + fn visit_type_with_member(&mut self, obj_type: TypeRef, property: &'a Symbol) { if property.span.contains(&self.position) { let new_span = self.current_expr.unwrap().span.clone(); match &**obj_type.maybe_unwrap_option() { @@ -204,20 +202,6 @@ impl<'a> Visit<'a> for HoverVisitor<'a> { }); } - fn visit_type_annotation(&mut self, node: &'a TypeAnnotation) { - if self.found.is_some() { - return; - } - - if let TypeAnnotationKind::UserDefined(t) = &node.kind { - if t.span.contains(&self.position) { - self.found = Some((t.span.clone(), self.lookup_docs(&t.full_path_str(), None))); - } - } - - visit::visit_type_annotation(self, node); - } - fn visit_symbol(&mut self, node: &'a Symbol) { if self.found.is_some() { return; @@ -371,6 +355,26 @@ impl<'a> Visit<'a> for HoverVisitor<'a> { } } + fn visit_user_defined_type(&mut self, node: &'a UserDefinedType) { + if self.found.is_some() { + return; + } + + if node.span.contains(&self.position) { + // Only lookup string up to the position + let mut partial_path = vec![]; + node.full_path().iter().for_each(|p| { + if p.span.start <= self.position.into() { + partial_path.push(p.name.clone()); + } + }); + let lookup_str = partial_path.join("."); + self.found = Some((node.span.clone(), self.lookup_docs(&lookup_str, None))); + } + + visit::visit_user_defined_type(self, node); + } + fn visit_reference(&mut self, node: &'a Reference) { if self.found.is_some() { return; @@ -382,23 +386,29 @@ impl<'a> Visit<'a> for HoverVisitor<'a> { self.found = Some((sym.span.clone(), self.lookup_docs(&sym.name, None))); } } - Reference::TypeReference(t) => { - if t.span.contains(&self.position) { - // Only lookup string up to the position - let mut partial_path = vec![]; - t.full_path().iter().for_each(|p| { - if p.span.start <= self.position.into() { - partial_path.push(p.name.clone()); - } - }); - let lookup_str = partial_path.join("."); - self.found = Some((t.span.clone(), self.lookup_docs(&lookup_str, None))); + Reference::InstanceMember { object, property, .. } => { + if object.span.contains(&self.position) { + self.visit_expr(object) + } else { + self.visit_type_with_member(self.types.get_expr_type(object), property) + } + } + Reference::TypeMember { type_name, property } => { + if type_name.span.contains(&self.position) { + self.visit_user_defined_type(type_name) + } else { + self.visit_type_with_member( + resolve_user_defined_type( + type_name, + &self.types.get_scope_env(self.current_scope), + self.current_statement_index, + ) + .unwrap_or(self.types.error()), + property, + ) } } - Reference::InstanceMember { object, property, .. } => self.visit_reference_with_member(object, property), - Reference::TypeMember { typeobject, property } => self.visit_reference_with_member(&typeobject, property), } - visit::visit_reference(self, node); } } @@ -602,11 +612,42 @@ new cloud.Bucket(); test_hover_list!( user_defined_types, r#" -class Foo { }; +class Foo { } //^ "# ); + test_hover_list!( + user_defined_type_annotation, + r#" +class Foo { } +let a: Foo = new Foo(); + //^ +"# + ); + + test_hover_list!( + user_defined_type_reference_property, + r#" +class Foo { + static static_method() { } +} +Foo.static_method(); + //^ +"# + ); + + test_hover_list!( + user_defined_type_reference_type, + r#" +class Foo { + static static_method() { } +} +Foo.static_method(); +//^ +"# + ); + test_hover_list!( static_method, r#" diff --git a/libs/wingc/src/lsp/signature.rs b/libs/wingc/src/lsp/signature.rs index 736a8cafedd..22ee19e6656 100644 --- a/libs/wingc/src/lsp/signature.rs +++ b/libs/wingc/src/lsp/signature.rs @@ -48,11 +48,8 @@ pub fn on_signature_help(params: lsp_types::SignatureHelpParams) -> Option { let NewExpr { class, arg_list, .. } = new_expr; - let Some(udt) = class.as_type_reference() else { - return None; - }; - let Some(t) = resolve_user_defined_type(&udt, &types.get_scope_env(&root_scope), 0).ok() else { + let Some(t) = resolve_user_defined_type(class, &types.get_scope_env(&root_scope), 0).ok() else { return None; }; diff --git a/libs/wingc/src/lsp/snapshots/hovers/static_stdtype_method.snap b/libs/wingc/src/lsp/snapshots/hovers/static_stdtype_method.snap index d457f74d5ed..98cf7181825 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/static_stdtype_method.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/static_stdtype_method.snap @@ -10,5 +10,5 @@ range: character: 0 end: line: 1 - character: 14 + character: 4 diff --git a/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_annotation.snap b/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_annotation.snap new file mode 100644 index 00000000000..07461b084da --- /dev/null +++ b/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_annotation.snap @@ -0,0 +1,14 @@ +--- +source: libs/wingc/src/lsp/hover.rs +--- +contents: + kind: markdown + value: "```wing\nclass Foo\n```\n---" +range: + start: + line: 2 + character: 7 + end: + line: 2 + character: 10 + diff --git a/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_property.snap b/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_property.snap new file mode 100644 index 00000000000..fe9305daba1 --- /dev/null +++ b/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_property.snap @@ -0,0 +1,14 @@ +--- +source: libs/wingc/src/lsp/hover.rs +--- +contents: + kind: markdown + value: "```wing\nstatic preflight static_method: preflight (): void\n```" +range: + start: + line: 4 + character: 0 + end: + line: 4 + character: 17 + diff --git a/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_type.snap b/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_type.snap new file mode 100644 index 00000000000..c081d40d46b --- /dev/null +++ b/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_type.snap @@ -0,0 +1,14 @@ +--- +source: libs/wingc/src/lsp/hover.rs +--- +contents: + kind: markdown + value: "```wing\nclass Foo\n```\n---" +range: + start: + line: 4 + character: 0 + end: + line: 4 + character: 3 + diff --git a/libs/wingc/src/parser.rs b/libs/wingc/src/parser.rs index d509522d234..9d038ae6c72 100644 --- a/libs/wingc/src/parser.rs +++ b/libs/wingc/src/parser.rs @@ -1015,10 +1015,7 @@ impl<'s> Parser<'s> { let parent = if let Some(parent_node) = statement_node.child_by_field_name("parent") { let parent_type = self.build_type_annotation(Some(parent_node), class_phase)?; match parent_type.kind { - TypeAnnotationKind::UserDefined(parent_type) => Some(Expr::new( - ExprKind::Reference(Reference::TypeReference(parent_type)), - self.node_span(&parent_node), - )), + TypeAnnotationKind::UserDefined(parent_type) => Some(parent_type), _ => { self.with_error::( format!("Parent type must be a user defined type, found {}", parent_type), @@ -1411,37 +1408,34 @@ impl<'s> Parser<'s> { let object_expr = self.get_child_field(nested_node, "object")?; if let Some(property) = nested_node.child_by_field_name("property") { - let object_expr = if object_expr.kind() == "json_container_type" { - Expr::new( + if object_expr.kind() == "json_container_type" { + Ok(Expr::new( ExprKind::Reference(Reference::TypeMember { - typeobject: Box::new( - UserDefinedType { - root: Symbol::global(WINGSDK_STD_MODULE), - fields: vec![self.node_symbol(&object_expr)?], - span: self.node_span(&object_expr), - } - .to_expression(), - ), + type_name: UserDefinedType { + root: Symbol::global(WINGSDK_STD_MODULE), + fields: vec![self.node_symbol(&object_expr)?], + span: self.node_span(&object_expr), + }, property: self.node_symbol(&property)?, }), self.node_span(&object_expr), - ) + )) } else { - self.build_expression(&object_expr, phase)? - }; - let accessor_sym = self.node_symbol(&self.get_child_field(nested_node, "accessor_type")?)?; - let optional_accessor = match accessor_sym.name.as_str() { - "?." => true, - _ => false, - }; - Ok(Expr::new( - ExprKind::Reference(Reference::InstanceMember { - object: Box::new(object_expr), - property: self.node_symbol(&property)?, - optional_accessor, - }), - self.node_span(&nested_node), - )) + let object_expr = self.build_expression(&object_expr, phase)?; + let accessor_sym = self.node_symbol(&self.get_child_field(nested_node, "accessor_type")?)?; + let optional_accessor = match accessor_sym.name.as_str() { + "?." => true, + _ => false, + }; + Ok(Expr::new( + ExprKind::Reference(Reference::InstanceMember { + object: Box::new(object_expr), + property: self.node_symbol(&property)?, + optional_accessor, + }), + self.node_span(&nested_node), + )) + } } else { // we are missing the last property, but we can still parse the rest of the expression self.add_error( @@ -1544,10 +1538,6 @@ impl<'s> Parser<'s> { match expression_node.kind() { "new_expression" => { let class_udt = self.build_udt(&expression_node.child_by_field_name("class").unwrap())?; - let class_udt_exp = Expr::new( - ExprKind::Reference(Reference::TypeReference(class_udt)), - expression_span.clone(), - ); let arg_list = if let Ok(args_node) = self.get_child_field(expression_node, "args") { self.build_arg_list(&args_node, phase) @@ -1568,7 +1558,7 @@ impl<'s> Parser<'s> { Ok(Expr::new( ExprKind::New(NewExpr { - class: Box::new(class_udt_exp), + class: class_udt, obj_id, arg_list: arg_list?, obj_scope, @@ -2098,14 +2088,11 @@ impl<'s> Parser<'s> { let type_span = self.node_span(&statement_node.child(0).unwrap()); Ok(StmtKind::Expression(Expr::new( ExprKind::New(NewExpr { - class: Box::new(Expr::new( - ExprKind::Reference(Reference::TypeReference(UserDefinedType { - root: Symbol::global(WINGSDK_STD_MODULE), - fields: vec![Symbol::global(WINGSDK_TEST_CLASS_NAME)], - span: type_span.clone(), - })), - type_span.clone(), - )), + class: UserDefinedType { + root: Symbol::global(WINGSDK_STD_MODULE), + fields: vec![Symbol::global(WINGSDK_TEST_CLASS_NAME)], + span: type_span.clone(), + }, obj_id: Some(test_id), obj_scope: None, arg_list: ArgList { diff --git a/libs/wingc/src/type_check.rs b/libs/wingc/src/type_check.rs index 3108b103ee0..4f77f87ffde 100644 --- a/libs/wingc/src/type_check.rs +++ b/libs/wingc/src/type_check.rs @@ -91,12 +91,6 @@ pub enum VariableKind { /// a class member (or an enum member) StaticMember, - /// a type (e.g. `std.Json`) - Type, - - /// a namespace (e.g. `cloud`) - Namespace, - /// an error placeholder Error, } @@ -388,7 +382,7 @@ pub trait ClassLike { .0 .as_variable() .expect("class env should only contain variables"); - if v.type_.as_function_sig().is_some() { + if v.type_.is_closure() { Some(v) } else { None @@ -396,7 +390,18 @@ pub trait ClassLike { } fn get_field(&self, name: &Symbol) -> Option<&VariableInfo> { - self.get_env().lookup_ext(name, None).ok()?.0.as_variable() + let v = self + .get_env() + .lookup_ext(name, None) + .ok()? + .0 + .as_variable() + .expect("class env should only contain variables"); + if !v.type_.is_closure() { + Some(v) + } else { + None + } } } @@ -1499,8 +1504,13 @@ impl Types { /// Obtain the type of a given expression node. Will panic if the expression has not been type checked yet. pub fn get_expr_type(&self, expr: &Expr) -> TypeRef { + self.get_expr_id_type(expr.id) + } + + /// Obtain the type of a given expression id. Will panic if the expression has not been type checked yet. + pub fn get_expr_id_type(&self, expr_id: ExprId) -> TypeRef { self - .try_get_expr_type(expr) + .try_get_expr_type(expr_id) .expect("All expressions should have a type") } @@ -1527,12 +1537,12 @@ impl Types { } } - /// Obtain the type of a given expression node. Returns None if the expression has not been type checked yet. If + /// Obtain the type of a given expression id. Returns None if the expression has not been type checked yet. If /// this is called after type checking, it should always return Some. - pub fn try_get_expr_type(&self, expr: &Expr) -> Option { + pub fn try_get_expr_type(&self, expr_id: ExprId) -> Option { self .type_for_expr - .get(expr.id) + .get(expr_id) .and_then(|t| t.as_ref().map(|t| t.type_)) } @@ -1856,21 +1866,13 @@ impl<'a> TypeChecker<'a> { obj_scope, } = new_expr; // Type check everything - let class_type = self.type_check_exp(&class, env).0; + let class_type = self + .resolve_user_defined_type(class, env, self.statement_idx) + .unwrap_or_else(|e| self.type_error(e)); let obj_scope_type = obj_scope.as_ref().map(|x| self.type_check_exp(x, env).0); let obj_id_type = obj_id.as_ref().map(|x| self.type_check_exp(x, env).0); let arg_list_types = self.type_check_arg_list(arg_list, env); - let ExprKind::Reference(ref r) = class.kind else { - self.spanned_error(exp,"Must be a reference to a class"); - return (self.types.error(), Phase::Independent); - }; - - let Reference::TypeReference(_) = r else { - self.spanned_error(exp,"Must be a type reference to a class"); - return (self.types.error(), Phase::Independent); - }; - // Lookup the class's type in the env let (class_env, class_symbol) = match *class_type { Type::Class(ref class) => { @@ -2371,7 +2373,7 @@ impl<'a> TypeChecker<'a> { } } - fn resolved_error(&mut self) -> (UnsafeRef, Phase) { + fn resolved_error(&mut self) -> (TypeRef, Phase) { (self.types.error(), Phase::Independent) } @@ -2381,7 +2383,7 @@ impl<'a> TypeChecker<'a> { func_sig: &FunctionSignature, exp: &impl Spanned, arg_list_types: ArgListTypes, - ) -> Option> { + ) -> Option { // Verify arity let pos_args_count = arg_list.pos_args.len(); let min_args = func_sig.min_parameters(); @@ -2491,7 +2493,7 @@ impl<'a> TypeChecker<'a> { None } - fn type_check_closure(&mut self, func_def: &ast::FunctionDefinition, env: &SymbolEnv) -> (UnsafeRef, Phase) { + fn type_check_closure(&mut self, func_def: &ast::FunctionDefinition, env: &SymbolEnv) -> (TypeRef, Phase) { // TODO: make sure this function returns on all control paths when there's a return type (can be done by recursively traversing the statements and making sure there's a "return" statements in all control paths) // https://github.com/winglang/wing/issues/457 // Create a type_checker function signature from the AST function definition @@ -3770,7 +3772,7 @@ impl<'a> TypeChecker<'a> { fn type_check_super_constructor_against_parent_initializer( &mut self, scope: &Scope, - class_type: UnsafeRef, + class_type: TypeRef, class_env: &mut SymbolEnv, init_name: &str, ) { @@ -4361,15 +4363,11 @@ impl<'a> TypeChecker<'a> { _ => return None, } } - Reference::TypeReference(type_) => { - return Some(type_.clone()); - } - Reference::TypeMember { typeobject, property } => { + Reference::TypeMember { type_name, property } => { path.push(property.clone()); - current_reference = match &typeobject.kind { - ExprKind::Reference(r) => r, - _ => return None, - } + type_name.fields.iter().rev().for_each(|f| path.push(f.clone())); + path.push(type_name.root.clone()); + break; } } } @@ -4466,7 +4464,7 @@ impl<'a> TypeChecker<'a> { // We can't get here twice, we can safely assume that if we're here the `object` part of the reference doesn't have and evaluated type yet. // Create a type reference out of this nested reference and call ourselves again let new_ref = Reference::TypeMember { - typeobject: Box::new(user_type_annotation.to_expression()), + type_name: user_type_annotation, property: property.clone(), }; // Replace the reference with the new one, this is unsafe because `reference` isn't mutable and theoretically someone may @@ -4533,42 +4531,10 @@ impl<'a> TypeChecker<'a> { (property_variable, property_phase) } - Reference::TypeReference(udt) => { - let result = self.resolve_user_defined_type(udt, env, self.statement_idx); - let t = match result { - Err(e) => return self.spanned_error_with_var(udt, e.message), - Ok(t) => t, - }; - - let phase = if let Some(c) = t.as_class() { - c.phase - } else { - Phase::Independent - }; - - ( - VariableInfo { - name: Symbol::global(udt.full_path_str()), - type_: t, - reassignable: false, - phase, - kind: VariableKind::Type, - docs: None, - }, - phase, - ) - } - Reference::TypeMember { typeobject, property } => { - let (type_, _) = self.type_check_exp(typeobject, env); - - let ExprKind::Reference(typeref) = &typeobject.kind else { - return self.spanned_error_with_var(typeobject, "Expecting a reference"); - }; - - let Reference::TypeReference(_) = typeref else { - return self.spanned_error_with_var(typeobject, "Expecting a reference to a type"); - }; - + Reference::TypeMember { type_name, property } => { + let type_ = self + .resolve_user_defined_type(type_name, env, self.statement_idx) + .unwrap_or_else(|e| self.type_error(e)); match *type_ { Type::Enum(ref e) => { if e.values.contains(property) { @@ -4641,7 +4607,7 @@ impl<'a> TypeChecker<'a> { fn resolve_variable_from_instance_type( &mut self, - instance_type: UnsafeRef, + instance_type: TypeRef, property: &Symbol, env: &SymbolEnv, // only used for recursion @@ -4796,12 +4762,12 @@ impl<'a> TypeChecker<'a> { fn extract_parent_class( &mut self, - parent_expr: Option<&Expr>, + parent: Option<&UserDefinedType>, phase: Phase, name: &Symbol, env: &mut SymbolEnv, ) -> (Option, Option) { - let Some(parent_expr) = parent_expr else { + let Some(parent) = parent else { if phase == Phase::Preflight { // if this is a preflight and we don't have a parent, then we implicitly set it to `std.Resource` let t = self.types.resource_base_type(); @@ -4812,19 +4778,20 @@ impl<'a> TypeChecker<'a> { } }; - let (parent_type, _) = self.type_check_exp(&parent_expr, env); + let parent_type = self + .resolve_user_defined_type(parent, env, self.statement_idx) + .unwrap_or_else(|e| { + self.type_error(e); + self.types.error() + }); // bail out if we could not resolve the parent type if parent_type.is_unresolved() { return (None, None); } - // Safety: we return from the function above so parent_udt cannot be None - let parent_udt = parent_expr.as_type_reference().unwrap(); - - if &parent_udt.root == name && parent_udt.fields.is_empty() { - self.spanned_error(parent_udt, "Class cannot extend itself".to_string()); - self.types.assign_type_to_expr(parent_expr, self.types.error(), phase); + if &parent.root == name && parent.fields.is_empty() { + self.spanned_error(parent, "Class cannot extend itself".to_string()); return (None, None); } @@ -4837,17 +4804,15 @@ impl<'a> TypeChecker<'a> { "Class \"{}\" is an {} class and cannot extend {} class \"{}\"", name, phase, parent_class.phase, parent_class.name ), - span: Some(parent_expr.span.clone()), + span: Some(parent.span.clone()), }); - self.types.assign_type_to_expr(parent_expr, self.types.error(), phase); (None, None) } } else { report_diagnostic(Diagnostic { - message: format!("Expected \"{}\" to be a class", parent_udt), - span: Some(parent_expr.span.clone()), + message: format!("Expected \"{}\" to be a class", parent), + span: Some(parent.span.clone()), }); - self.types.assign_type_to_expr(parent_expr, self.types.error(), phase); (None, None) } } diff --git a/libs/wingc/src/type_check/lifts.rs b/libs/wingc/src/type_check/lifts.rs index 84fb0658765..f5f2f4c824c 100644 --- a/libs/wingc/src/type_check/lifts.rs +++ b/libs/wingc/src/type_check/lifts.rs @@ -1,140 +1,93 @@ -use std::collections::{BTreeMap, BTreeSet}; +use std::collections::{BTreeMap, BTreeSet, HashMap}; -use itertools::Itertools; - -use crate::ast::Symbol; +use crate::ast::{Symbol, UserDefinedType}; use super::{ExprId, CLASS_INFLIGHT_INIT_NAME}; /// A repository of lifts and captures at the class level. #[derive(Debug)] pub struct Lifts { - /// All the lifts. The key is "/" - lifts: BTreeMap, - - /// All the captures. The key is token. - captures: BTreeMap, + // TODO: make all these private and add accessors+helper logic + /// All the lifts. Map from method to a map from inflight code to lift qualifications. + pub lifts_qualifications: BTreeMap>, - /// Map from token to lift - lift_by_token: BTreeMap, + /// All the captures. The key is token the value is the preflight code. + /// Used for preflight setup of inflight captures. + pub captures: BTreeMap, - /// Map between expression id and a lift token. - token_by_expr_id: BTreeMap, + /// Map between liftable AST element and a lift token (used for inflight jsification of captures) + pub token_for_liftable: HashMap, } -/// A record that describes a capture. -#[derive(Debug, Clone)] -pub struct Capture { - /// Lifting token (the symbol used in inflight code) - pub token: String, - - /// The javascript code to capture - pub code: String, +/// Ast elements that may be lifted +#[derive(Debug, PartialEq, Eq, Hash, Clone)] +pub enum Liftable { + Expr(ExprId), + Type(UserDefinedType), } /// A record that describes a single lift from a method. #[derive(Debug)] -pub struct MethodLift { - /// The method name - pub method: String, - - /// Lifting token (the symbol used in inflight code) - pub token: String, - - /// The javascript code to lift (preflight) - pub code: String, - +pub struct LiftQualification { /// The operations that qualify the lift (the property names) pub ops: BTreeSet, - - /// Indicates if this is a lift for a field or a free variable - pub is_field: bool, } /// A record that describes a lift from a class. #[derive(Debug)] -pub struct Lift { - /// Lifting token (the symbol used in inflight code) - pub token: String, +pub struct Capture { + /// Whether this is a field capture (`this.foo`) + pub is_field: bool, - /// The javascript code to lift (preflight) + /// The javascript code to capture (preflight) pub code: String, - - /// Whether this is a field lift (`this.foo`) - pub is_field: bool, } impl Lifts { pub fn new() -> Self { Self { - lifts: BTreeMap::new(), - lift_by_token: BTreeMap::new(), + lifts_qualifications: BTreeMap::new(), captures: BTreeMap::new(), - token_by_expr_id: BTreeMap::new(), + token_for_liftable: HashMap::new(), } } - /// Returns the list of all lifts from this class. - pub fn lifts(&self) -> Vec<&Lift> { - self.lift_by_token.values().collect_vec() - } - fn render_token(&self, code: &str) -> String { - if code == "this" { - return code.to_string(); - } - format!("${}", replace_non_alphanumeric(code)) } /// Adds a lift for an expression. - pub fn lift(&mut self, expr_id: ExprId, method: Option, property: Option, code: &str) { - let is_field = code.contains("this."); - - let token = self.render_token(code); - - self.token_by_expr_id.entry(expr_id).or_insert(token.clone()); - - self.lift_by_token.entry(token.clone()).or_insert(Lift { - token: token.clone(), - is_field, - code: code.to_string(), - }); - + pub fn lift(&mut self, method: Option, property: Option, code: &str, is_field: bool) { let method = method.map(|m| m.name).unwrap_or(Default::default()); - self.add_lift(method, token.clone(), code, property, is_field); + self.add_lift(method, code, property.as_ref().map(|s| s.name.clone())); // add a lift to the inflight initializer or capture it if its not a field if is_field { - self.add_lift(CLASS_INFLIGHT_INIT_NAME.to_string(), token, code, None, true); - } else { - self.capture(&expr_id, code); + self.add_lift(CLASS_INFLIGHT_INIT_NAME.to_string(), code, None); } } - fn add_lift(&mut self, method: String, token: String, code: &str, property: Option, is_field: bool) { - let key = format!("{}/{}", method.clone(), token); - let lift = self.lifts.entry(key).or_insert(MethodLift { - code: code.to_string(), - token: token.clone(), - method: method.clone(), - ops: BTreeSet::new(), - is_field, - }); + fn add_lift(&mut self, method: String, code: &str, property: Option) { + let lift = self + .lifts_qualifications + .entry(method) + .or_default() + .entry(code.to_string()) + .or_insert(LiftQualification { ops: BTreeSet::new() }); if let Some(op) = &property { lift.ops.insert(op.clone()); } } - /// Returns the token for an expression. Called by the jsifier when emitting inflight code. - pub fn token_for_expr(&self, expr_id: &ExprId) -> Option { - let Some(token) = self.token_by_expr_id.get(expr_id) else { + /// Returns the token for a liftable. Called by the jsifier when emitting inflight code. + pub fn token_for_liftable(&self, lifted_thing: &Liftable) -> Option { + let Some(token) = self.token_for_liftable.get(lifted_thing) else { return None; }; - let is_field = if let Some(lift) = self.lift_by_token.get(token) { + let is_field = if let Some(lift) = self.captures.get(token) { lift.is_field } else { false @@ -147,8 +100,8 @@ impl Lifts { } } - /// Captures an expression. - pub fn capture(&mut self, expr_id: &ExprId, code: &str) { + /// Captures a liftable piece of code. + pub fn capture(&mut self, lifted_thing: &Liftable, code: &str, is_field: bool) { // no need to capture this (it's already in scope) if code == "this" { return; @@ -156,46 +109,28 @@ impl Lifts { let token = self.render_token(code); - self.token_by_expr_id.entry(*expr_id).or_insert(token.clone()); + self + .token_for_liftable + .entry(lifted_thing.clone()) + .or_insert(token.clone()); self.captures.entry(token.clone()).or_insert(Capture { - token: token.to_string(), + is_field, code: code.to_string(), }); } - /// The list of captures. - pub fn captures(&self) -> Vec<&Capture> { - self.captures.values().collect_vec() - } - - /// List of all lifted fields in the class. + /// List of all lifted fields in the class. (map from lift token to preflight code) pub fn lifted_fields(&self) -> BTreeMap { let mut result: BTreeMap = BTreeMap::new(); - for (_, lift) in &self.lifts { - if !lift.is_field { - continue; - } - - result.insert(lift.token.clone(), lift.code.clone()); - } - - // self.lifted_fields_by_token.clone() - result - } - - /// List of all lifts per method. Key is the method name and the value is a list of lifts. - pub fn lifts_per_method(&self) -> BTreeMap> { - let mut result: BTreeMap> = BTreeMap::new(); - - for (_, method_lift) in &self.lifts { - if method_lift.method.is_empty() { - continue; - } - result.entry(method_lift.method.clone()).or_default().push(method_lift); - } - + self + .captures + .iter() + .filter(|(_, lift)| lift.is_field) + .for_each(|(token, lift)| { + result.insert(token.clone(), lift.code.clone()); + }); result } } diff --git a/libs/wingc/src/type_check_assert.rs b/libs/wingc/src/type_check_assert.rs index a1315dd4208..d29c06b5512 100644 --- a/libs/wingc/src/type_check_assert.rs +++ b/libs/wingc/src/type_check_assert.rs @@ -25,7 +25,7 @@ impl<'a> TypeCheckAssert<'a> { impl<'a> Visit<'_> for TypeCheckAssert<'a> { fn visit_expr(&mut self, expr: &Expr) { - if let Some(t) = self.types.try_get_expr_type(expr) { + if let Some(t) = self.types.try_get_expr_type(expr.id) { assert!( self.tc_found_errors || !t.is_unresolved(), "Expr's type was not resolved: {:?}", diff --git a/libs/wingc/src/valid_json_visitor.rs b/libs/wingc/src/valid_json_visitor.rs index fbbf5794107..e62fda9e3e6 100644 --- a/libs/wingc/src/valid_json_visitor.rs +++ b/libs/wingc/src/valid_json_visitor.rs @@ -26,7 +26,7 @@ impl<'a> ValidJsonVisitor<'a> { impl<'a> Visit<'_> for ValidJsonVisitor<'a> { fn visit_expr(&mut self, expr: &Expr) { - if let Some(t) = self.types.try_get_expr_type(expr) { + if let Some(t) = self.types.try_get_expr_type(expr.id) { // if the type is json with known values, then we may need to validate that the values are legal json values if let Type::Json(Some(JsonData { kind, expression_id })) = &*t { // if this json expr is not being cast to something else, then it must be a legal json value diff --git a/libs/wingc/src/visit.rs b/libs/wingc/src/visit.rs index 57c00e0e171..95bc7117385 100644 --- a/libs/wingc/src/visit.rs +++ b/libs/wingc/src/visit.rs @@ -248,7 +248,7 @@ where } if let Some(extend) = &node.parent { - v.visit_expr(&extend); + v.visit_user_defined_type(extend); } for implement in &node.implements { @@ -276,7 +276,7 @@ pub fn visit_new_expr<'ast, V>(v: &mut V, node: &'ast NewExpr) where V: Visit<'ast> + ?Sized, { - v.visit_expr(&node.class); + v.visit_user_defined_type(&node.class); v.visit_args(&node.arg_list); if let Some(id) = &node.obj_id { v.visit_expr(&id); @@ -408,11 +408,8 @@ where v.visit_expr(object); v.visit_symbol(property); } - Reference::TypeReference(type_) => { - v.visit_user_defined_type(type_); - } - Reference::TypeMember { typeobject, property } => { - v.visit_expr(typeobject); + Reference::TypeMember { type_name, property } => { + v.visit_user_defined_type(type_name); v.visit_symbol(property); } } @@ -487,12 +484,7 @@ where } v.visit_type_annotation(&f.return_type); } - TypeAnnotationKind::UserDefined(t) => { - v.visit_symbol(&t.root); - for field in &t.fields { - v.visit_symbol(field); - } - } + TypeAnnotationKind::UserDefined(t) => v.visit_user_defined_type(t), } } diff --git a/libs/wingc/src/visit_context.rs b/libs/wingc/src/visit_context.rs index c95abf41000..2ea815724b5 100644 --- a/libs/wingc/src/visit_context.rs +++ b/libs/wingc/src/visit_context.rs @@ -1,5 +1,5 @@ use crate::{ - ast::{Phase, Symbol, UserDefinedType}, + ast::{ExprId, Phase, Symbol, UserDefinedType}, type_check::symbol_env::SymbolEnvRef, }; @@ -7,11 +7,13 @@ pub struct VisitContext { phase: Vec, env: Vec, method_env: Vec>, - property: Vec, + property: Vec, method: Vec>, class: Vec, statement: Vec, in_json: Vec, + in_type_annotation: Vec, + expression: Vec, } impl VisitContext { @@ -25,11 +27,27 @@ impl VisitContext { statement: vec![], method: vec![], in_json: vec![], + in_type_annotation: vec![], + expression: vec![], } } } impl VisitContext { + pub fn push_type_annotation(&mut self) { + self.in_type_annotation.push(true); + } + + pub fn pop_type_annotation(&mut self) { + self.in_type_annotation.pop(); + } + + pub fn in_type_annotation(&self) -> bool { + *self.in_type_annotation.last().unwrap_or(&false) + } + + // -- + pub fn push_stmt(&mut self, stmt: usize) { self.statement.push(stmt); } @@ -44,6 +62,20 @@ impl VisitContext { // -- + fn push_expr(&mut self, expr: ExprId) { + self.expression.push(expr); + } + + fn pop_expr(&mut self) { + self.expression.pop(); + } + + pub fn current_expr(&self) -> Option { + self.expression.last().map(|id| *id) + } + + // -- + pub fn push_class(&mut self, class: UserDefinedType, phase: &Phase, initializer_env: Option) { self.class.push(class); self.push_phase(*phase); @@ -93,15 +125,15 @@ impl VisitContext { // -- - pub fn push_property(&mut self, property: String) { - self.property.push(property); + pub fn push_property(&mut self, property: &Symbol) { + self.property.push(property.clone()); } pub fn pop_property(&mut self) { self.property.pop(); } - pub fn current_property(&self) -> Option { + pub fn current_property(&self) -> Option { self.property.last().cloned() } @@ -143,3 +175,13 @@ impl VisitContext { self.phase.pop(); } } + +pub trait VisitorWithContext { + fn ctx(&mut self) -> &mut VisitContext; + + fn with_expr(&mut self, expr: usize, f: impl FnOnce(&mut Self)) { + self.ctx().push_expr(expr); + f(self); + self.ctx().pop_expr(); + } +} diff --git a/tools/hangar/__snapshots__/invalid.ts.snap b/tools/hangar/__snapshots__/invalid.ts.snap index 7676d6d9de0..d53ba19c913 100644 --- a/tools/hangar/__snapshots__/invalid.ts.snap +++ b/tools/hangar/__snapshots__/invalid.ts.snap @@ -5,7 +5,7 @@ exports[`access_hidden_namespace.w 1`] = ` --> ../../../examples/tests/invalid/access_hidden_namespace.w:7:5 | 7 | new core.NodeJsCode(\\"/tmp/test.txt\\"); // This should fail even though \`fs.TextFile\` extends \`core.FileBase\` because we didn't bring in \`core\` explicitly. - | ^^^^^^^^^^^^^^^ Unknown symbol \\"core\\" + | ^^^^ Unknown symbol \\"core\\" @@ -150,7 +150,7 @@ error: Unknown symbol \\"stuff\\" --> ../../../examples/tests/invalid/bring_local_variables.w:3:5 | 3 | new stuff.Bar(); - | ^^^^^^^^^ Unknown symbol \\"stuff\\" + | ^^^^^ Unknown symbol \\"stuff\\" @@ -212,11 +212,25 @@ Duration " `; exports[`capture_redefinition.w 1`] = ` -"error: Cannot capture symbol \\"y\\" because it is shadowed by another symbol with the same name +"error: Cannot access \\"y\\" because it is shadowed by another symbol with the same name + --> ../../../examples/tests/invalid/capture_redefinition.w:5:7 + | +5 | log(y); + | ^ Cannot access \\"y\\" because it is shadowed by another symbol with the same name + + +error: Cannot access \\"y\\" because it is shadowed by another symbol with the same name --> ../../../examples/tests/invalid/capture_redefinition.w:14:9 | 14 | log(y); - | ^ Cannot capture symbol \\"y\\" because it is shadowed by another symbol with the same name + | ^ Cannot access \\"y\\" because it is shadowed by another symbol with the same name + + +error: Cannot access \\"x\\" because it is shadowed by another symbol with the same name + --> ../../../examples/tests/invalid/capture_redefinition.w:22:7 + | +22 | log(x); + | ^ Cannot access \\"x\\" because it is shadowed by another symbol with the same name @@ -1112,11 +1126,11 @@ error: Cannot create inflight class \\"Foo\\" in preflight phase | ^^^^^^^^^ Cannot create inflight class \\"Foo\\" in preflight phase -error: Cannot qualify access to a lifted object of type \\"PreflightClass\\" (see https://github.com/winglang/wing/issues/76 for more details) - --> ../../../examples/tests/invalid/inflight_class_created_in_preflight.w:19:3 +error: Cannot qualify access to a lifted type \\"PreflightClass\\" (see https://github.com/winglang/wing/issues/76 for more details) + --> ../../../examples/tests/invalid/inflight_class_created_in_preflight.w:19:7 | 19 | new PreflightClass(); - | ^^^^^^^^^^^^^^^^^^^^ Cannot qualify access to a lifted object of type \\"PreflightClass\\" (see https://github.com/winglang/wing/issues/76 for more details) + | ^^^^^^^^^^^^^^ Cannot qualify access to a lifted type \\"PreflightClass\\" (see https://github.com/winglang/wing/issues/76 for more details) @@ -1919,11 +1933,11 @@ exports[`resource_inflight.w 1`] = ` | ^^^^^^^^^^^^^^^^^^ Cannot create preflight class \\"Bucket\\" in inflight phase -error: Cannot qualify access to a lifted object of type \\"Bucket\\" (see https://github.com/winglang/wing/issues/76 for more details) - --> ../../../examples/tests/invalid/resource_inflight.w:4:3 +error: Cannot qualify access to a lifted type \\"Bucket\\" (see https://github.com/winglang/wing/issues/76 for more details) + --> ../../../examples/tests/invalid/resource_inflight.w:4:7 | 4 | new cloud.Bucket(); // Should fail because we can't create resources inflight - | ^^^^^^^^^^^^^^^^^^ Cannot qualify access to a lifted object of type \\"Bucket\\" (see https://github.com/winglang/wing/issues/76 for more details) + | ^^^^^^^^^^^^ Cannot qualify access to a lifted type \\"Bucket\\" (see https://github.com/winglang/wing/issues/76 for more details) @@ -2309,10 +2323,10 @@ error: Struct \\"Showtime\\" extends \\"Dazzle\\" which introduces a conflicting error: Cannot instantiate type \\"BucketProps\\" because it is a struct and not a class. Use struct instantiation instead. - --> ../../../examples/tests/invalid/structs.w:47:9 + --> ../../../examples/tests/invalid/structs.w:47:13 | 47 | let x = new cloud.BucketProps(1); - | ^^^^^^^^^^^^^^^^^^^^^^^^ Cannot instantiate type \\"BucketProps\\" because it is a struct and not a class. Use struct instantiation instead. + | ^^^^^^^^^^^^^^^^^ Cannot instantiate type \\"BucketProps\\" because it is a struct and not a class. Use struct instantiation instead. @@ -2503,14 +2517,14 @@ error: Unknown symbol \\"clod\\" --> ../../../examples/tests/invalid/unknown_symbol.w:3:18 | 3 | let bucket = new clod.Bucket(); - | ^^^^^^^^^^^ Unknown symbol \\"clod\\" + | ^^^^ Unknown symbol \\"clod\\" error: Unknown symbol \\"cloudy\\" --> ../../../examples/tests/invalid/unknown_symbol.w:6:17 | 6 | let funky = new cloudy.Funktion(inflight () => { }); - | ^^^^^^^^^^^^^^^ Unknown symbol \\"cloudy\\" + | ^^^^^^ Unknown symbol \\"cloudy\\" error: Unknown symbol \\"y\\" diff --git a/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md index 0cafda8e3e0..ab82616d342 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md @@ -223,6 +223,18 @@ class $Root extends $stdlib.std.Resource { _getInflightOps() { return ["foo", "bar", "callThis", "$inflight_init"]; } + _registerBind(host, ops) { + if (ops.includes("callThis")) { + Foo._registerBindObject(Foo, host, ["bar"]); + } + super._registerBind(host, ops); + } + static _registerTypeBind(host, ops) { + if (ops.includes("bar")) { + Foo._registerBindObject(Foo, host, ["foo"]); + } + super._registerTypeBind(host, ops); + } } class Bar extends $stdlib.std.Resource { constructor(scope, id, ) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md index 90e3ac6798d..32509e0f39c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md @@ -266,19 +266,19 @@ class $Root extends $stdlib.std.Resource { } _registerBind(host, ops) { if (ops.includes("$inflight_init")) { - Foo._registerBindObject(this.inflight1, host, []); Foo._registerBindObject(this, host, ["inflight2"]); + Foo._registerBindObject(this.inflight1, host, []); } if (ops.includes("callFn")) { Foo._registerBindObject(this, host, ["makeFn"]); } if (ops.includes("callFn2")) { - Foo._registerBindObject(this.inflight1, host, ["handle"]); Foo._registerBindObject(this, host, ["inflight2"]); + Foo._registerBindObject(this.inflight1, host, ["handle"]); } if (ops.includes("makeFn")) { - Foo._registerBindObject(this.inflight1, host, ["handle"]); Foo._registerBindObject(this, host, ["inflight2"]); + Foo._registerBindObject(this.inflight1, host, ["handle"]); } super._registerBind(host, ops); } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md index 848d5e1b022..bd1c6dfc691 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md @@ -197,13 +197,13 @@ class $Root extends $stdlib.std.Resource { } _registerBind(host, ops) { if (ops.includes("handle")) { - $Closure1._registerBindObject(Object.keys(myMap).length, host, []); $Closure1._registerBindObject(("bang" in ((arrOfMap.at(0)))), host, []); $Closure1._registerBindObject(("world" in (myMap)), host, []); $Closure1._registerBindObject((arr.at(0)), host, []); $Closure1._registerBindObject((arr.at(1)), host, []); $Closure1._registerBindObject((j)["b"], host, []); $Closure1._registerBindObject((mySet.has("my")), host, []); + $Closure1._registerBindObject(Object.keys(myMap).length, host, []); $Closure1._registerBindObject(arr.length, host, []); $Closure1._registerBindObject(mySet.size, host, []); } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md index e4c74ddaf59..1bbb98c7945 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md @@ -205,8 +205,8 @@ class $Root extends $stdlib.std.Resource { _registerBind(host, ops) { if (ops.includes("handle")) { $Closure1._registerBindObject(Object.keys(m).length, host, []); - $Closure1._registerBindObject(aCloned.length, host, []); $Closure1._registerBindObject(a.length, host, []); + $Closure1._registerBindObject(aCloned.length, host, []); $Closure1._registerBindObject(s.size, host, []); } super._registerBind(host, ops); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md index ac529b918f2..96046af2514 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md @@ -388,6 +388,7 @@ class $Root extends $stdlib.std.Resource { MyResource._registerBindObject(this.url, host, []); } if (ops.includes("foo")) { + MyResource._registerBindObject(MyResource, host, ["isValidUrl"]); MyResource._registerBindObject(this.api.url, host, []); MyResource._registerBindObject(this.url, host, []); } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md index 4e9fed02d6a..e3f59932f67 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md @@ -300,6 +300,12 @@ class $Root extends $stdlib.std.Resource { _getInflightOps() { return ["regexInflight", "getUuid", "getData", "print", "call", "$inflight_init"]; } + _registerBind(host, ops) { + if (ops.includes("call")) { + Foo._registerBindObject(Foo, host, ["getData", "getUuid", "regexInflight"]); + } + super._registerBind(host, ops); + } } class $Closure1 extends $stdlib.std.Resource { constructor(scope, id, ) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md index ed59edee046..e4edf2f63a2 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md @@ -934,6 +934,7 @@ class $Root extends $stdlib.std.Resource { Bar._registerBindObject(this.foo, host, ["fooGet", "fooInc"]); } if (ops.includes("testTypeAccess")) { + Bar._registerBindObject(Bar, host, ["barStatic"]); Bar._registerBindObject(Foo, host, ["fooStatic"]); Bar._registerBindObject(this.e, host, []); } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md index fa7bcb4660f..42bfe43527d 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md @@ -672,10 +672,10 @@ class $Root extends $stdlib.std.Resource { MyResource._registerBindObject(this.localTopic, host, []); } if (ops.includes("myPut")) { - MyResource._registerBindObject(Another, host, ["myStaticMethod"]); MyResource._registerBindObject((globalArrayOfStr.at(0)), host, []); MyResource._registerBindObject((globalMapOfNum)["a"], host, []); MyResource._registerBindObject((globalSetOfStr.has("a")), host, []); + MyResource._registerBindObject(Another, host, ["myStaticMethod"]); MyResource._registerBindObject(globalAnother, host, ["myMethod"]); MyResource._registerBindObject(globalAnother.first.myResource, host, ["put"]); MyResource._registerBindObject(globalAnother.myField, host, []); From cec09971e8f845de2eae8b20f14a4b49d5ba7c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pol=20Amor=C3=B3s?= Date: Mon, 28 Aug 2023 14:56:02 +0200 Subject: [PATCH 16/48] feat(console): improve console loading ux (#3964) * Don't show the loading if it takes less than 500ms to load. * Revert rounded corners for sections * Reduce separation between sections image *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .../src/left-resizable-widget.tsx | 2 +- .../src/right-resizable-widget.tsx | 2 +- .../src/top-resizable-widget.tsx | 2 +- .../console/ui/src/features/map-view.tsx | 15 +++- .../console/ui/src/layout/default-layout.tsx | 68 +++++++++++-------- .../console/ui/src/layout/layout-provider.tsx | 9 --- 6 files changed, 58 insertions(+), 40 deletions(-) diff --git a/apps/wing-console/console/design-system/src/left-resizable-widget.tsx b/apps/wing-console/console/design-system/src/left-resizable-widget.tsx index 74d659a8074..565090330f8 100644 --- a/apps/wing-console/console/design-system/src/left-resizable-widget.tsx +++ b/apps/wing-console/console/design-system/src/left-resizable-widget.tsx @@ -17,7 +17,7 @@ export function LeftResizableWidget(props: LeftResizableWidgetProps) {
{ diff --git a/apps/wing-console/console/design-system/src/right-resizable-widget.tsx b/apps/wing-console/console/design-system/src/right-resizable-widget.tsx index 69f855e008c..d3decd5fb40 100644 --- a/apps/wing-console/console/design-system/src/right-resizable-widget.tsx +++ b/apps/wing-console/console/design-system/src/right-resizable-widget.tsx @@ -17,7 +17,7 @@ export function RightResizableWidget(props: RightResizableWidgetProps) {
{ diff --git a/apps/wing-console/console/design-system/src/top-resizable-widget.tsx b/apps/wing-console/console/design-system/src/top-resizable-widget.tsx index 70cd9e67614..3c780edbfea 100644 --- a/apps/wing-console/console/design-system/src/top-resizable-widget.tsx +++ b/apps/wing-console/console/design-system/src/top-resizable-widget.tsx @@ -17,7 +17,7 @@ export function TopResizableWidget(props: TopResizableWidgetProps) {
{ diff --git a/apps/wing-console/console/ui/src/features/map-view.tsx b/apps/wing-console/console/ui/src/features/map-view.tsx index 6e079e4f685..06466be2e8c 100644 --- a/apps/wing-console/console/ui/src/features/map-view.tsx +++ b/apps/wing-console/console/ui/src/features/map-view.tsx @@ -2,6 +2,7 @@ import { useTheme, ResourceIcon, USE_EXTERNAL_THEME_COLOR, + SpinnerLoader, } from "@wingconsole/design-system"; import classNames from "classnames"; import { useState } from "react"; @@ -30,7 +31,6 @@ export const MapView = ({ onSelectedEdgeIdChange, }: MapViewProps) => { const { mapData } = useMap({ showTests: showTests ?? false }); - const { theme } = useTheme(); const [hoverMapControls, setHoverMapControls] = useState(false); @@ -62,6 +62,19 @@ export const MapView = ({
)} +
+
+ +
+
+
{ + setDeferredLoading(loading); + }, [loading, setDeferredLoading]); + const showTerms = useMemo(() => { if (!termsConfig.data) { return false; @@ -167,14 +177,16 @@ export const DefaultLayout = ({ )} >
- {loading && ( -
- )} +
+ -
+
@@ -264,26 +277,27 @@ export const DefaultLayout = ({ {renderApp && ( <> -
- {loading && ( -
-
- -
+
+
+
+
- )} +
{!layout.leftPanel?.hide && layout.leftPanel?.components?.length && ( {layout.leftPanel?.components.map( @@ -329,7 +343,7 @@ export const DefaultLayout = ({ )}
-
+
Date: Mon, 28 Aug 2023 16:34:23 -0400 Subject: [PATCH 17/48] fix(sdk): connections are kept alive in api/website simulator (#3986) Fixes #3709 `.close()` keeps existing connections alive, and those connections prevent the node process from closing. Misc: - https://github.com/winglang/wing/pull/3964 Caused a failure in the playwright tests. I'm not sure why it would only fail sometimes, but I don't think there's a need to wait for the loading animation, regardless. *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- apps/wing-console/console/app/test/describe.ts | 2 -- libs/wingsdk/src/target-sim/api.inflight.ts | 1 + libs/wingsdk/src/target-sim/website.inflight.ts | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/wing-console/console/app/test/describe.ts b/apps/wing-console/console/app/test/describe.ts index d2c33c0cf93..0342aa1a11f 100644 --- a/apps/wing-console/console/app/test/describe.ts +++ b/apps/wing-console/console/app/test/describe.ts @@ -36,8 +36,6 @@ export const describe = (wingfile: string, callback: () => void) => { await page.goto(`http://localhost:${server.port}/`); - await page.getByTestId("loading-overlay").waitFor({ state: "hidden" }); - await page.waitForLoadState("domcontentloaded"); }); diff --git a/libs/wingsdk/src/target-sim/api.inflight.ts b/libs/wingsdk/src/target-sim/api.inflight.ts index d312c60339f..7f805c44bb8 100644 --- a/libs/wingsdk/src/target-sim/api.inflight.ts +++ b/libs/wingsdk/src/target-sim/api.inflight.ts @@ -155,6 +155,7 @@ export class Api public async cleanup(): Promise { this.addTrace(`Closing server on ${this.url}`); this.server?.close(); + this.server?.closeAllConnections(); } private addTrace(message: string): void { diff --git a/libs/wingsdk/src/target-sim/website.inflight.ts b/libs/wingsdk/src/target-sim/website.inflight.ts index 1c69a0bc2f2..79608c3216a 100644 --- a/libs/wingsdk/src/target-sim/website.inflight.ts +++ b/libs/wingsdk/src/target-sim/website.inflight.ts @@ -62,6 +62,7 @@ export class Website implements IWebsiteClient, ISimulatorResourceInstance { public async cleanup(): Promise { this.addTrace(`Closing server on ${this.url}`); this.server?.close(); + this.server?.closeAllConnections(); } private addTrace(message: string): void { From 353b660b4be2b0e8cd6ac3f06344eaa968be7da8 Mon Sep 17 00:00:00 2001 From: Mark McCulloh Date: Mon, 28 Aug 2023 16:55:30 -0400 Subject: [PATCH 18/48] fix(compiler): missing extended struct fields for some imported JSII interfaces (#3982) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #3716 The core of this change is to make sure that when importing an interface, the type itself is registered before importing the types that it extends. Previously it was the opposite way. I will say that I'm not sure why this works, the previous implementation makes more sense to me 🤷 No tests were added because I was not able to replicate the issue in other JSII libs other than `cdk8s-plus-27` so I wasn't sure that it's worthwhile to add an additional package just to test this. We also don't have a fixture system for JSII testing. Misc: - Made sure the imported (actual) interfaces also get their extended properties. Not sure if this was intentionally left out before *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- examples/tests/valid/bring_cdk8s.w | 17 + examples/tests/valid/package.json | 2 + .../incomplete_inflight_namespace.snap | 16 +- .../completions/namespace_middle_dot.snap | 16 +- .../completions/util_static_methods.snap | 2 +- .../variable_type_annotation_namespace.snap | 16 +- libs/wingc/src/type_check/jsii_importer.rs | 79 ++-- pnpm-lock.yaml | 446 +++++++++++++++++- .../valid/bring_cdk8s.w_compile_tf-aws.md | 57 +++ .../valid/bring_cdk8s.w_test_sim.md | 12 + 10 files changed, 583 insertions(+), 80 deletions(-) create mode 100644 examples/tests/valid/bring_cdk8s.w create mode 100644 tools/hangar/__snapshots__/test_corpus/valid/bring_cdk8s.w_compile_tf-aws.md create mode 100644 tools/hangar/__snapshots__/test_corpus/valid/bring_cdk8s.w_test_sim.md diff --git a/examples/tests/valid/bring_cdk8s.w b/examples/tests/valid/bring_cdk8s.w new file mode 100644 index 00000000000..cfe3faefb6d --- /dev/null +++ b/examples/tests/valid/bring_cdk8s.w @@ -0,0 +1,17 @@ +bring "cdk8s" as cdk8s; +bring "cdk8s-plus-27" as kplus; + +// our cdk app +let app = new cdk8s.App(); + +// our kubernetes chart +let chart = new cdk8s.Chart(); + +let deploy = new kplus.Deployment() in chart; + +// https://github.com/winglang/wing/issues/3716 +deploy.addContainer({ + image: "hashicorp/http-echo", + args: ["-text", "text"], + portNumber: 5678 +}); diff --git a/examples/tests/valid/package.json b/examples/tests/valid/package.json index d6e026edef0..20fb0bc1b4b 100644 --- a/examples/tests/valid/package.json +++ b/examples/tests/valid/package.json @@ -7,6 +7,8 @@ "@aws-sdk/client-dynamodb": "^3.344.0", "@cdktf/provider-aws": "^15.0.0", "aws-cdk-lib": "^2.64.0", + "cdk8s": "^2.60.0", + "cdk8s-plus-27": "^2.7.0", "cdktf": "0.17.0", "constructs": "^10", "jsii-code-samples": "1.7.0", diff --git a/libs/wingc/src/lsp/snapshots/completions/incomplete_inflight_namespace.snap b/libs/wingc/src/lsp/snapshots/completions/incomplete_inflight_namespace.snap index b63d35d2642..e2e85c6bb64 100644 --- a/libs/wingc/src/lsp/snapshots/completions/incomplete_inflight_namespace.snap +++ b/libs/wingc/src/lsp/snapshots/completions/incomplete_inflight_namespace.snap @@ -269,7 +269,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods.\n### Methods\n- `handle` — Inflight that will be called when a request is made to the endpoint." + value: "```wing\ninterface IApiEndpointHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Inflight that will be called when a request is made to the endpoint.\n- `node` — `Node`" sortText: ii|IApiEndpointHandler - label: IApiEndpointHandlerClient kind: 8 @@ -287,7 +287,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — Function that will be called when an event notification is fired." + value: "```wing\ninterface IBucketEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when an event notification is fired.\n- `node` — `Node`" sortText: ii|IBucketEventHandler - label: IBucketEventHandlerClient kind: 8 @@ -311,7 +311,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`.\n### Methods\n- `handle` — Entrypoint function that will be called when the cloud function is invoked." + value: "```wing\ninterface IFunctionHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Entrypoint function that will be called when the cloud function is invoked.\n- `node` — `Node`" sortText: ii|IFunctionHandler - label: IFunctionHandlerClient kind: 8 @@ -329,7 +329,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`.\n### Methods\n- `handle` — Entrypoint function that will be called when the app is deployed." + value: "```wing\ninterface IOnDeployHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Entrypoint function that will be called when the app is deployed.\n- `node` — `Node`" sortText: ii|IOnDeployHandler - label: IOnDeployHandlerClient kind: 8 @@ -347,7 +347,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`.\n### Methods\n- `handle` — Function that will be called when a message is received from the queue." + value: "```wing\ninterface IQueueSetConsumerHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the queue.\n- `node` — `Node`" sortText: ii|IQueueSetConsumerHandler - label: IQueueSetConsumerHandlerClient kind: 8 @@ -365,7 +365,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`.\n### Methods\n- `handle` — Function that will be called when a message is received from the schedule." + value: "```wing\ninterface IScheduleOnTickHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the schedule.\n- `node` — `Node`" sortText: ii|IScheduleOnTickHandler - label: IScheduleOnTickHandlerClient kind: 8 @@ -395,7 +395,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceOnEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `ServiceProps.on_start` || `ServiceProps.on_stop`.\n### Methods\n- `handle` — Function that will be called for service events." + value: "```wing\ninterface IServiceOnEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `ServiceProps.on_start` || `ServiceProps.on_stop`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called for service events.\n- `node` — `Node`" sortText: ii|IServiceOnEventHandler - label: ITopicClient kind: 8 @@ -407,7 +407,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`.\n### Methods\n- `handle` — Function that will be called when a message is received from the topic." + value: "```wing\ninterface ITopicOnMessageHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the topic.\n- `node` — `Node`" sortText: ii|ITopicOnMessageHandler - label: ITopicOnMessageHandlerClient kind: 8 diff --git a/libs/wingc/src/lsp/snapshots/completions/namespace_middle_dot.snap b/libs/wingc/src/lsp/snapshots/completions/namespace_middle_dot.snap index b63d35d2642..e2e85c6bb64 100644 --- a/libs/wingc/src/lsp/snapshots/completions/namespace_middle_dot.snap +++ b/libs/wingc/src/lsp/snapshots/completions/namespace_middle_dot.snap @@ -269,7 +269,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods.\n### Methods\n- `handle` — Inflight that will be called when a request is made to the endpoint." + value: "```wing\ninterface IApiEndpointHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Inflight that will be called when a request is made to the endpoint.\n- `node` — `Node`" sortText: ii|IApiEndpointHandler - label: IApiEndpointHandlerClient kind: 8 @@ -287,7 +287,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — Function that will be called when an event notification is fired." + value: "```wing\ninterface IBucketEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when an event notification is fired.\n- `node` — `Node`" sortText: ii|IBucketEventHandler - label: IBucketEventHandlerClient kind: 8 @@ -311,7 +311,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`.\n### Methods\n- `handle` — Entrypoint function that will be called when the cloud function is invoked." + value: "```wing\ninterface IFunctionHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Entrypoint function that will be called when the cloud function is invoked.\n- `node` — `Node`" sortText: ii|IFunctionHandler - label: IFunctionHandlerClient kind: 8 @@ -329,7 +329,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`.\n### Methods\n- `handle` — Entrypoint function that will be called when the app is deployed." + value: "```wing\ninterface IOnDeployHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Entrypoint function that will be called when the app is deployed.\n- `node` — `Node`" sortText: ii|IOnDeployHandler - label: IOnDeployHandlerClient kind: 8 @@ -347,7 +347,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`.\n### Methods\n- `handle` — Function that will be called when a message is received from the queue." + value: "```wing\ninterface IQueueSetConsumerHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the queue.\n- `node` — `Node`" sortText: ii|IQueueSetConsumerHandler - label: IQueueSetConsumerHandlerClient kind: 8 @@ -365,7 +365,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`.\n### Methods\n- `handle` — Function that will be called when a message is received from the schedule." + value: "```wing\ninterface IScheduleOnTickHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the schedule.\n- `node` — `Node`" sortText: ii|IScheduleOnTickHandler - label: IScheduleOnTickHandlerClient kind: 8 @@ -395,7 +395,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceOnEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `ServiceProps.on_start` || `ServiceProps.on_stop`.\n### Methods\n- `handle` — Function that will be called for service events." + value: "```wing\ninterface IServiceOnEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `ServiceProps.on_start` || `ServiceProps.on_stop`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called for service events.\n- `node` — `Node`" sortText: ii|IServiceOnEventHandler - label: ITopicClient kind: 8 @@ -407,7 +407,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`.\n### Methods\n- `handle` — Function that will be called when a message is received from the topic." + value: "```wing\ninterface ITopicOnMessageHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the topic.\n- `node` — `Node`" sortText: ii|ITopicOnMessageHandler - label: ITopicOnMessageHandlerClient kind: 8 diff --git a/libs/wingc/src/lsp/snapshots/completions/util_static_methods.snap b/libs/wingc/src/lsp/snapshots/completions/util_static_methods.snap index 64dd9ba3511..5c5698467b4 100644 --- a/libs/wingc/src/lsp/snapshots/completions/util_static_methods.snap +++ b/libs/wingc/src/lsp/snapshots/completions/util_static_methods.snap @@ -103,7 +103,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IPredicateHandler extends IResource\n```\n---\nA predicate with an inflight \"handle\" method that can be passed to `util.busyWait`.\n### Methods\n- `handle` — The Predicate function that is called." + value: "```wing\ninterface IPredicateHandler extends IResource\n```\n---\nA predicate with an inflight \"handle\" method that can be passed to `util.busyWait`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — The Predicate function that is called.\n- `node` — `Node`" sortText: ii|IPredicateHandler - label: IPredicateHandlerClient kind: 8 diff --git a/libs/wingc/src/lsp/snapshots/completions/variable_type_annotation_namespace.snap b/libs/wingc/src/lsp/snapshots/completions/variable_type_annotation_namespace.snap index b63d35d2642..e2e85c6bb64 100644 --- a/libs/wingc/src/lsp/snapshots/completions/variable_type_annotation_namespace.snap +++ b/libs/wingc/src/lsp/snapshots/completions/variable_type_annotation_namespace.snap @@ -269,7 +269,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods.\n### Methods\n- `handle` — Inflight that will be called when a request is made to the endpoint." + value: "```wing\ninterface IApiEndpointHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Inflight that will be called when a request is made to the endpoint.\n- `node` — `Node`" sortText: ii|IApiEndpointHandler - label: IApiEndpointHandlerClient kind: 8 @@ -287,7 +287,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — Function that will be called when an event notification is fired." + value: "```wing\ninterface IBucketEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when an event notification is fired.\n- `node` — `Node`" sortText: ii|IBucketEventHandler - label: IBucketEventHandlerClient kind: 8 @@ -311,7 +311,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`.\n### Methods\n- `handle` — Entrypoint function that will be called when the cloud function is invoked." + value: "```wing\ninterface IFunctionHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Entrypoint function that will be called when the cloud function is invoked.\n- `node` — `Node`" sortText: ii|IFunctionHandler - label: IFunctionHandlerClient kind: 8 @@ -329,7 +329,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`.\n### Methods\n- `handle` — Entrypoint function that will be called when the app is deployed." + value: "```wing\ninterface IOnDeployHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Entrypoint function that will be called when the app is deployed.\n- `node` — `Node`" sortText: ii|IOnDeployHandler - label: IOnDeployHandlerClient kind: 8 @@ -347,7 +347,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`.\n### Methods\n- `handle` — Function that will be called when a message is received from the queue." + value: "```wing\ninterface IQueueSetConsumerHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the queue.\n- `node` — `Node`" sortText: ii|IQueueSetConsumerHandler - label: IQueueSetConsumerHandlerClient kind: 8 @@ -365,7 +365,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`.\n### Methods\n- `handle` — Function that will be called when a message is received from the schedule." + value: "```wing\ninterface IScheduleOnTickHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the schedule.\n- `node` — `Node`" sortText: ii|IScheduleOnTickHandler - label: IScheduleOnTickHandlerClient kind: 8 @@ -395,7 +395,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceOnEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `ServiceProps.on_start` || `ServiceProps.on_stop`.\n### Methods\n- `handle` — Function that will be called for service events." + value: "```wing\ninterface IServiceOnEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `ServiceProps.on_start` || `ServiceProps.on_stop`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called for service events.\n- `node` — `Node`" sortText: ii|IServiceOnEventHandler - label: ITopicClient kind: 8 @@ -407,7 +407,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`.\n### Methods\n- `handle` — Function that will be called when a message is received from the topic." + value: "```wing\ninterface ITopicOnMessageHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the topic.\n- `node` — `Node`" sortText: ii|ITopicOnMessageHandler - label: ITopicOnMessageHandlerClient kind: 8 diff --git a/libs/wingc/src/type_check/jsii_importer.rs b/libs/wingc/src/type_check/jsii_importer.rs index 2b891d3290a..bf4c801a96b 100644 --- a/libs/wingc/src/type_check/jsii_importer.rs +++ b/libs/wingc/src/type_check/jsii_importer.rs @@ -301,15 +301,6 @@ impl<'a> JsiiImporter<'a> { _ => false, }; - let extends = if let Some(interfaces) = &jsii_interface.interfaces { - interfaces - .iter() - .map(|fqn| self.lookup_or_create_type(&FQN::from(fqn.as_str()))) - .collect::>() - } else { - vec![] - }; - let mut iface_env = SymbolEnv::new( None, self.wing_types.void(), @@ -326,8 +317,10 @@ impl<'a> JsiiImporter<'a> { let mut wing_type = match is_struct { true => self.wing_types.add_type(Type::Struct(Struct { name: new_type_symbol.clone(), - extends: extends.clone(), + // Will be replaced below + extends: vec![], docs: Docs::from(&jsii_interface.docs), + // Will be replaced below env: SymbolEnv::new( None, self.wing_types.void(), @@ -335,12 +328,14 @@ impl<'a> JsiiImporter<'a> { false, Phase::Independent, // structs are phase-independent self.jsii_spec.import_statement_idx, - ), // Dummy env, will be replaced below + ), })), false => self.wing_types.add_type(Type::Interface(Interface { name: new_type_symbol.clone(), - extends: extends.clone(), + // Will be replaced below + extends: vec![], docs: Docs::from(&jsii_interface.docs), + // Will be replaced below env: SymbolEnv::new( None, self.wing_types.void(), @@ -348,12 +343,23 @@ impl<'a> JsiiImporter<'a> { false, iface_env.phase, self.jsii_spec.import_statement_idx, - ), // Dummy env, will be replaced below + ), })), }; self.register_jsii_type(&jsii_interface_fqn, &new_type_symbol, wing_type); + if let Some(interfaces) = &jsii_interface.interfaces { + if let Type::Struct(Struct { ref mut extends, .. }) | Type::Interface(Interface { ref mut extends, .. }) = + *wing_type + { + *extends = interfaces + .iter() + .map(|fqn| self.lookup_or_create_type(&FQN::from(fqn.as_str()))) + .collect::>() + } + }; + self.add_members_to_class_env( jsii_interface, Phase::Inflight, @@ -364,17 +370,31 @@ impl<'a> JsiiImporter<'a> { // Add properties from our parents to the new structs env if is_struct { - type_check::add_parent_members_to_struct_env(&extends, &new_type_symbol, &mut iface_env).expect(&format!( + type_check::add_parent_members_to_struct_env( + &wing_type.as_struct().expect("Expected struct").extends, + &new_type_symbol, + &mut iface_env, + ) + .expect(&format!( "Invalid JSII library: failed to add parent members to struct {}", type_name )); } - // Add inflight methods from any docstring-linked interfaces to the new interface's env // For example, `IBucket` could contain all of the preflight methods of a bucket, and // contain docstring tag of "@inflight IBucketClient" where `IBucketClient` is an interface // that contains all of the inflight methods of a bucket. - if !is_struct { + else { + type_check::add_parent_members_to_iface_env( + &wing_type.as_interface().expect("Expected interface").extends, + &new_type_symbol, + &mut iface_env, + ) + .expect(&format!( + "Invalid JSII library: failed to add parent members to struct {}", + type_name + )); + // Look for a client interface for this resource let inflight_tag: Option<&str> = extract_docstring_tag(&jsii_interface.docs, "inflight"); @@ -647,24 +667,13 @@ impl<'a> JsiiImporter<'a> { }) }); - let implements = if let Some(interface_fqns) = &jsii_class.interfaces { - interface_fqns - .iter() - .map(|i| { - let fqn = FQN::from(i.as_str()); - self.lookup_or_create_type(&fqn) - }) - .collect::>() - } else { - vec![] - }; - let class_spec = Class { name: new_type_symbol.clone(), env: dummy_env, fqn: Some(jsii_class_fqn.to_string()), parent: base_class_type, - implements, + // Will be replaced below + implements: vec![], is_abstract: jsii_class.abstract_.unwrap_or(false), type_parameters: type_params, phase: class_phase, @@ -675,6 +684,18 @@ impl<'a> JsiiImporter<'a> { let mut new_type = self.wing_types.add_type(Type::Class(class_spec)); self.register_jsii_type(&jsii_class_fqn, &new_type_symbol, new_type); + if let Some(interface_fqns) = &jsii_class.interfaces { + // mutate the class's implements field to point to the actual interfaces + let mut_type = new_type.as_class_mut().unwrap(); + mut_type.implements = interface_fqns + .iter() + .map(|i| { + let fqn = FQN::from(i.as_str()); + self.lookup_or_create_type(&fqn) + }) + .collect::>() + }; + // Create class's actual environment before we add properties and methods to it let mut class_env = SymbolEnv::new(base_class_env, self.wing_types.void(), false, false, class_phase, 0); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aa2b869c25f..eb1901b06ce 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -996,6 +996,12 @@ importers: aws-cdk-lib: specifier: ^2.64.0 version: 2.64.0(constructs@10.2.51) + cdk8s: + specifier: ^2.60.0 + version: 2.60.0(constructs@10.2.51) + cdk8s-plus-27: + specifier: ^2.7.0 + version: 2.7.0(cdk8s@2.60.0)(constructs@10.2.51) cdktf: specifier: 0.17.0 version: 0.17.0(constructs@10.2.51) @@ -5539,7 +5545,6 @@ packages: resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} requiresBuild: true - dev: true optional: true /@cowasm/memfs@3.5.1: @@ -5556,6 +5561,15 @@ packages: '@jridgewell/trace-mapping': 0.3.9 dev: true + /@dabh/diagnostics@2.0.3: + resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} + dependencies: + colorspace: 1.1.4 + enabled: 2.0.0 + kuler: 2.0.0 + dev: false + optional: true + /@discoveryjs/json-ext@0.5.7: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} @@ -6890,6 +6904,125 @@ packages: - supports-color dev: true + /@octokit/auth-token@2.5.0: + resolution: {integrity: sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==} + dependencies: + '@octokit/types': 6.41.0 + dev: false + optional: true + + /@octokit/core@3.6.0: + resolution: {integrity: sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==} + dependencies: + '@octokit/auth-token': 2.5.0 + '@octokit/graphql': 4.8.0 + '@octokit/request': 5.6.3 + '@octokit/request-error': 2.1.0 + '@octokit/types': 6.41.0 + before-after-hook: 2.2.3 + universal-user-agent: 6.0.0 + transitivePeerDependencies: + - encoding + dev: false + optional: true + + /@octokit/endpoint@6.0.12: + resolution: {integrity: sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==} + dependencies: + '@octokit/types': 6.41.0 + is-plain-object: 5.0.0 + universal-user-agent: 6.0.0 + dev: false + optional: true + + /@octokit/graphql@4.8.0: + resolution: {integrity: sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==} + dependencies: + '@octokit/request': 5.6.3 + '@octokit/types': 6.41.0 + universal-user-agent: 6.0.0 + transitivePeerDependencies: + - encoding + dev: false + optional: true + + /@octokit/openapi-types@12.11.0: + resolution: {integrity: sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==} + dev: false + optional: true + + /@octokit/plugin-paginate-rest@2.21.3(@octokit/core@3.6.0): + resolution: {integrity: sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==} + peerDependencies: + '@octokit/core': '>=2' + dependencies: + '@octokit/core': 3.6.0 + '@octokit/types': 6.41.0 + dev: false + optional: true + + /@octokit/plugin-request-log@1.0.4(@octokit/core@3.6.0): + resolution: {integrity: sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==} + peerDependencies: + '@octokit/core': '>=3' + dependencies: + '@octokit/core': 3.6.0 + dev: false + optional: true + + /@octokit/plugin-rest-endpoint-methods@5.16.2(@octokit/core@3.6.0): + resolution: {integrity: sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==} + peerDependencies: + '@octokit/core': '>=3' + dependencies: + '@octokit/core': 3.6.0 + '@octokit/types': 6.41.0 + deprecation: 2.3.1 + dev: false + optional: true + + /@octokit/request-error@2.1.0: + resolution: {integrity: sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==} + dependencies: + '@octokit/types': 6.41.0 + deprecation: 2.3.1 + once: 1.4.0 + dev: false + optional: true + + /@octokit/request@5.6.3: + resolution: {integrity: sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==} + dependencies: + '@octokit/endpoint': 6.0.12 + '@octokit/request-error': 2.1.0 + '@octokit/types': 6.41.0 + is-plain-object: 5.0.0 + node-fetch: 2.6.12 + universal-user-agent: 6.0.0 + transitivePeerDependencies: + - encoding + dev: false + optional: true + + /@octokit/rest@18.12.0: + resolution: {integrity: sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q==} + dependencies: + '@octokit/core': 3.6.0 + '@octokit/plugin-paginate-rest': 2.21.3(@octokit/core@3.6.0) + '@octokit/plugin-request-log': 1.0.4(@octokit/core@3.6.0) + '@octokit/plugin-rest-endpoint-methods': 5.16.2(@octokit/core@3.6.0) + transitivePeerDependencies: + - encoding + dev: false + optional: true + + /@octokit/types@6.41.0: + resolution: {integrity: sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==} + dependencies: + '@octokit/openapi-types': 12.11.0 + dev: false + optional: true + /@oozcitak/dom@1.15.10: resolution: {integrity: sha512-0JT29/LaxVgRcGKvHmSrUTEvZ8BXvZhGl2LASRUgHqDTC1M5g1pLmVv56IYNyt3bG2CUjDkc67wnyZC14pbQrQ==} engines: {node: '>=8.0'} @@ -9240,6 +9373,11 @@ packages: resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} dev: true + /@types/triple-beam@1.3.2: + resolution: {integrity: sha512-txGIh+0eDFzKGC25zORnswy+br1Ha7hj5cMVwKIU7+s0U2AxxJru/jZSMU6OC9MJWP6+pc/hc6ZjyZShpsyY2g==} + dev: false + optional: true + /@types/tunnel@0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: @@ -10037,7 +10175,6 @@ packages: dependencies: clean-stack: 2.2.0 indent-string: 4.0.0 - dev: true /ajv-formats@2.1.1(ajv@8.12.0): resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} @@ -10090,7 +10227,6 @@ packages: engines: {node: '>=8'} dependencies: type-fest: 0.21.3 - dev: true /ansi-regex@3.0.1: resolution: {integrity: sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==} @@ -10477,6 +10613,16 @@ packages: engines: {node: '>=4'} dev: false + /axios@0.27.2: + resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} + dependencies: + follow-redirects: 1.15.2 + form-data: 4.0.0 + transitivePeerDependencies: + - debug + dev: false + optional: true + /axobject-query@3.2.1: resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} dependencies: @@ -10682,6 +10828,37 @@ packages: babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.5) dev: true + /backport@8.5.0: + resolution: {integrity: sha512-gX8v+l+BTue2lmmqD/yQiR6JUUY+5OWNZTI1qyusViqC9R2iv4YFPqT23IcJfpYqlYb3DOiwunfVjKLickdQ6g==} + engines: {node: '>=16.0.0'} + hasBin: true + requiresBuild: true + dependencies: + '@octokit/rest': 18.12.0 + axios: 0.27.2 + dedent: 0.7.0 + del: 6.1.1 + dotenv: 16.3.1 + find-up: 5.0.0 + graphql: 16.8.0 + graphql-tag: 2.12.6(graphql@16.8.0) + inquirer: 8.2.6 + lodash: 4.17.21 + make-dir: 3.1.0 + ora: 5.4.1 + safe-json-stringify: 1.2.0 + strip-json-comments: 3.1.1 + terminal-link: 2.1.1 + utility-types: 3.10.0 + winston: 3.10.0 + yargs: 17.7.2 + yargs-parser: 21.1.1 + transitivePeerDependencies: + - debug + - encoding + dev: false + optional: true + /bail@2.0.2: resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} dev: true @@ -10692,6 +10869,11 @@ packages: /base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + /before-after-hook@2.2.3: + resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} + dev: false + optional: true + /better-opn@2.1.1: resolution: {integrity: sha512-kIPXZS5qwyKiX/HcRvDYfmBQUa8XP17I0mYZZ0y4UhpYOSvtsLHDYqmomS+Mj20aDvD3knEiQ0ecQy2nhio3yA==} engines: {node: '>8.0.0'} @@ -11083,6 +11265,46 @@ packages: resolution: {integrity: sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==} engines: {node: '>= 0.8.0'} + /cdk8s-plus-27@2.7.0(cdk8s@2.60.0)(constructs@10.2.51): + resolution: {integrity: sha512-Ii6XKP88+IkARCfecKAimWwrDTK4cSrUylxQAvbQ40Mbro82GqlITyGPVbBjToOc9753dTJUHziwGEp30YIJSQ==} + engines: {node: '>= 16.20.0'} + peerDependencies: + cdk8s: ^2.30.0 + constructs: ^10.2.69 + dependencies: + cdk8s: 2.60.0(constructs@10.2.51) + constructs: 10.2.51 + minimatch: 3.1.2 + optionalDependencies: + backport: 8.5.0 + transitivePeerDependencies: + - debug + - encoding + dev: false + bundledDependencies: + - minimatch + + /cdk8s@2.60.0(constructs@10.2.51): + resolution: {integrity: sha512-65hp3sjf61zvBo9r3pna/ed1wIodXa9FynOELwyTYBsVez4jfwI0B8gWNngB16GtklBJ/PKI0DWvJVB0IFE9Kw==} + engines: {node: '>= 16.20.0'} + peerDependencies: + constructs: ^10 + dependencies: + constructs: 10.2.51 + fast-json-patch: 3.1.1 + follow-redirects: 1.15.2 + yaml: 2.3.1 + optionalDependencies: + backport: 8.5.0 + transitivePeerDependencies: + - debug + - encoding + dev: false + bundledDependencies: + - fast-json-patch + - follow-redirects + - yaml + /cdktf-cli@0.17.0(ink@3.2.0)(react@17.0.2): resolution: {integrity: sha512-D2vZRtmFenYLDLUXF+uxuxUkJM3uYNce7Jn7/nWk/+qlcH/3n7TOEqV9UAgZFvjMLotGrA5/FIEDv4xse7sKRg==} hasBin: true @@ -11215,7 +11437,6 @@ packages: /chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} - dev: true /check-error@1.0.2: resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} @@ -11298,7 +11519,6 @@ packages: /clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} - dev: true /cli-boxes@2.2.1: resolution: {integrity: sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==} @@ -11355,6 +11575,12 @@ packages: slice-ansi: 3.0.0 string-width: 4.2.3 + /cli-width@3.0.0: + resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} + engines: {node: '>= 10'} + dev: false + optional: true + /cli-width@4.0.0: resolution: {integrity: sha512-ZksGS2xpa/bYkNzN3BAw1wEjsLV/ZKOf/CCrJ/QOBsxx6fOARIkwTutxp1XIOIohi6HKmOFjMoK/XaqDVUpEEw==} engines: {node: '>= 12'} @@ -11459,11 +11685,27 @@ packages: /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + /color-string@1.9.1: + resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} + dependencies: + color-name: 1.1.4 + simple-swizzle: 0.2.2 + dev: false + optional: true + /color-support@1.1.3: resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} hasBin: true dev: true + /color@3.2.1: + resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==} + dependencies: + color-convert: 1.9.3 + color-string: 1.9.1 + dev: false + optional: true + /colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} @@ -11472,6 +11714,14 @@ packages: engines: {node: '>=0.1.90'} dev: true + /colorspace@1.1.4: + resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==} + dependencies: + color: 3.2.1 + text-hex: 1.0.0 + dev: false + optional: true + /combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -12173,7 +12423,6 @@ packages: /dedent@0.7.0: resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} - dev: true /deep-eql@4.1.3: resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} @@ -12274,7 +12523,6 @@ packages: p-map: 4.0.0 rimraf: 3.0.2 slash: 3.0.0 - dev: true /delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} @@ -12293,6 +12541,11 @@ packages: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} + /deprecation@2.3.1: + resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==} + dev: false + optional: true + /dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} @@ -12474,7 +12727,7 @@ packages: dependencies: semver: 7.5.3 shelljs: 0.8.5 - typescript: 5.3.0-dev.20230824 + typescript: 5.3.0-dev.20230828 dev: true /dset@3.1.2: @@ -12541,6 +12794,11 @@ packages: /emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + /enabled@2.0.0: + resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} + dev: false + optional: true + /encode-registry@3.0.0: resolution: {integrity: sha512-2fRYji8K6FwYuQ6EPBKR/J9mcqb7kIoNqt1vGvJr3NrvKfncRiNm00Oxo6gi/YJF8R5Sp2bNFSFdGKTG0rje1Q==} engines: {node: '>=10'} @@ -13487,7 +13745,6 @@ packages: chardet: 0.7.0 iconv-lite: 0.4.24 tmp: 0.0.33 - dev: true /extract-zip@1.7.0: resolution: {integrity: sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==} @@ -13572,6 +13829,11 @@ packages: pend: 1.2.0 dev: true + /fecha@4.2.3: + resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==} + dev: false + optional: true + /fetch-blob@3.2.0: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} @@ -13593,7 +13855,6 @@ packages: engines: {node: '>=8'} dependencies: escape-string-regexp: 1.0.5 - dev: true /file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} @@ -13706,6 +13967,11 @@ packages: engines: {node: '>=0.4.0'} dev: true + /fn.name@1.1.0: + resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==} + dev: false + optional: true + /follow-redirects@1.15.2: resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==} engines: {node: '>=4.0'} @@ -13714,7 +13980,6 @@ packages: peerDependenciesMeta: debug: optional: true - dev: true /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} @@ -14245,6 +14510,23 @@ packages: obliterator: 2.0.4 dev: true + /graphql-tag@2.12.6(graphql@16.8.0): + resolution: {integrity: sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==} + engines: {node: '>=10'} + peerDependencies: + graphql: ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + graphql: 16.8.0 + tslib: 2.6.0 + dev: false + optional: true + + /graphql@16.8.0: + resolution: {integrity: sha512-0oKGaR+y3qcS5mCu1vb7KG+a89vjn06C7Ihq/dDl3jA+A8B3TKomvi3CiEcVLJQGalbu8F52LxkOym7U5sSfbg==} + engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} + dev: false + optional: true + /gunzip-maybe@1.4.2: resolution: {integrity: sha512-4haO1M4mLO91PW57BMsDFf75UmwoRX0GkdD+Faw+Lr+r/OZrOCS0pIBwOL1xCKQqnQzbNFGgK2V2CpBUPeFNTw==} hasBin: true @@ -14662,6 +14944,28 @@ packages: resolution: {integrity: sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==} dev: true + /inquirer@8.2.6: + resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==} + engines: {node: '>=12.0.0'} + dependencies: + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + external-editor: 3.1.0 + figures: 3.2.0 + lodash: 4.17.21 + mute-stream: 0.0.8 + ora: 5.4.1 + run-async: 2.4.1 + rxjs: 7.8.1 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + wrap-ansi: 6.2.0 + dev: false + optional: true + /internal-slot@1.0.5: resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} engines: {node: '>= 0.4'} @@ -14722,6 +15026,11 @@ packages: /is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + /is-arrayish@0.3.2: + resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + dev: false + optional: true + /is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} dependencies: @@ -14888,7 +15197,6 @@ packages: /is-path-cwd@2.2.0: resolution: {integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==} engines: {node: '>=6'} - dev: true /is-path-inside@3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} @@ -14919,7 +15227,6 @@ packages: /is-plain-object@5.0.0: resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} engines: {node: '>=0.10.0'} - dev: true /is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} @@ -16668,6 +16975,11 @@ packages: engines: {node: '>=6'} dev: true + /kuler@2.0.0: + resolution: {integrity: sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==} + dev: false + optional: true + /language-subtag-registry@0.3.22: resolution: {integrity: sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==} dev: false @@ -16889,6 +17201,18 @@ packages: transitivePeerDependencies: - supports-color + /logform@2.5.1: + resolution: {integrity: sha512-9FyqAm9o9NKKfiAKfZoYo9bGXXuwMkxQiQttkT4YjjVtQVIQtK6LmVtlxmCaFswo6N4AfEkHqZTV0taDtPotNg==} + dependencies: + '@colors/colors': 1.5.0 + '@types/triple-beam': 1.3.2 + fecha: 4.2.3 + ms: 2.1.3 + safe-stable-stringify: 2.4.3 + triple-beam: 1.4.1 + dev: false + optional: true + /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -16976,7 +17300,6 @@ packages: engines: {node: '>=8'} dependencies: semver: 6.3.0 - dev: true /make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} @@ -17650,7 +17973,6 @@ packages: /mute-stream@0.0.8: resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} - dev: true /mute-stream@1.0.0: resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} @@ -18250,6 +18572,13 @@ packages: dependencies: wrappy: 1.0.2 + /one-time@1.0.0: + resolution: {integrity: sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==} + dependencies: + fn.name: 1.1.0 + dev: false + optional: true + /onetime@5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} @@ -18319,7 +18648,6 @@ packages: /os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} - dev: true /p-cancelable@3.0.0: resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} @@ -18400,7 +18728,6 @@ packages: engines: {node: '>=10'} dependencies: aggregate-error: 3.1.0 - dev: true /p-try@1.0.0: resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} @@ -18784,7 +19111,7 @@ packages: dependencies: lilconfig: 2.1.0 postcss: 8.4.24 - yaml: 2.2.1 + yaml: 2.3.1 /postcss-nested@6.0.1(postcss@8.4.24): resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} @@ -19777,6 +20104,12 @@ packages: dependencies: execa: 5.1.1 + /run-async@2.4.1: + resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} + engines: {node: '>=0.12.0'} + dev: false + optional: true + /run-async@3.0.0: resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==} engines: {node: '>=0.12.0'} @@ -19819,6 +20152,11 @@ packages: path-name: 1.0.0 dev: false + /safe-json-stringify@1.2.0: + resolution: {integrity: sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==} + dev: false + optional: true + /safe-regex-test@1.0.0: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: @@ -20044,6 +20382,13 @@ packages: simple-concat: 1.0.1 dev: true + /simple-swizzle@0.2.2: + resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + dependencies: + is-arrayish: 0.3.2 + dev: false + optional: true + /simple-update-notifier@1.1.0: resolution: {integrity: sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==} engines: {node: '>=8.10.0'} @@ -20228,6 +20573,11 @@ packages: minipass: 3.3.6 dev: true + /stack-trace@0.0.10: + resolution: {integrity: sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==} + dev: false + optional: true + /stack-utils@2.0.6: resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} engines: {node: '>=10'} @@ -20525,7 +20875,6 @@ packages: dependencies: has-flag: 4.0.0 supports-color: 7.2.0 - dev: true /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} @@ -20646,7 +20995,6 @@ packages: dependencies: ansi-escapes: 4.3.2 supports-hyperlinks: 2.3.0 - dev: true /terser-webpack-plugin@5.3.9(esbuild@0.17.19)(webpack@5.86.0): resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} @@ -20723,6 +21071,11 @@ packages: engines: {node: '>=0.10'} dev: true + /text-hex@1.0.0: + resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==} + dev: false + optional: true + /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} @@ -20755,7 +21108,6 @@ packages: /through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - dev: true /time-zone@1.0.0: resolution: {integrity: sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==} @@ -20802,7 +21154,6 @@ packages: engines: {node: '>=0.6.0'} dependencies: os-tmpdir: 1.0.2 - dev: true /tmp@0.2.1: resolution: {integrity: sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==} @@ -20888,6 +21239,12 @@ packages: engines: {node: '>=8'} dev: true + /triple-beam@1.4.1: + resolution: {integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==} + engines: {node: '>= 14.0.0'} + dev: false + optional: true + /trough@2.1.0: resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} dev: true @@ -21316,7 +21673,6 @@ packages: /type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} - dev: true /type-fest@0.6.0: resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} @@ -21393,8 +21749,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - /typescript@5.3.0-dev.20230824: - resolution: {integrity: sha512-iiUWxGibzrRHEBLDJfVymsvpPKflf3cMrw0oQTMQoguFS2ikNlVlfQWAsYeHqGpRQc77nSQkzsE9rAHNHqvIjw==} + /typescript@5.3.0-dev.20230828: + resolution: {integrity: sha512-uBVHpn+yxJsHMANa01Fn1Ni/3v4HzKcZbbzsbLYxgPKNJTAWQM8FoZWOFh5mrjZmpJcpGtPBcwbeuTUDOCD6QA==} engines: {node: '>=14.17'} hasBin: true dev: true @@ -21566,6 +21922,11 @@ packages: unist-util-visit-parents: 5.1.3 dev: true + /universal-user-agent@6.0.0: + resolution: {integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==} + dev: false + optional: true + /universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} @@ -21675,6 +22036,12 @@ packages: which-typed-array: 1.1.9 dev: true + /utility-types@3.10.0: + resolution: {integrity: sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg==} + engines: {node: '>= 4'} + dev: false + optional: true + /utils-merge@1.0.1: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} @@ -22382,6 +22749,34 @@ packages: string-width: 5.1.2 dev: true + /winston-transport@4.5.0: + resolution: {integrity: sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q==} + engines: {node: '>= 6.4.0'} + dependencies: + logform: 2.5.1 + readable-stream: 3.6.2 + triple-beam: 1.4.1 + dev: false + optional: true + + /winston@3.10.0: + resolution: {integrity: sha512-nT6SIDaE9B7ZRO0u3UvdrimG0HkB7dSTAgInQnNR2SOPJ4bvq5q79+pXLftKmP52lJGW15+H5MCK0nM9D3KB/g==} + engines: {node: '>= 12.0.0'} + dependencies: + '@colors/colors': 1.5.0 + '@dabh/diagnostics': 2.0.3 + async: 3.2.4 + is-stream: 2.0.1 + logform: 2.5.1 + one-time: 1.0.0 + readable-stream: 3.6.2 + safe-stable-stringify: 2.4.3 + stack-trace: 0.0.10 + triple-beam: 1.4.1 + winston-transport: 4.5.0 + dev: false + optional: true + /wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} dev: true @@ -22396,7 +22791,6 @@ packages: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 - dev: true /wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_cdk8s.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_cdk8s.w_compile_tf-aws.md new file mode 100644 index 00000000000..c1b49ca62ca --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_cdk8s.w_compile_tf-aws.md @@ -0,0 +1,57 @@ +# [bring_cdk8s.w](../../../../../examples/tests/valid/bring_cdk8s.w) | compile | tf-aws + +## main.tf.json +```json +{ + "//": { + "metadata": { + "backend": "local", + "stackName": "root", + "version": "0.17.0" + }, + "outputs": { + "root": { + "Default": { + "cloud.TestRunner": { + "TestFunctionArns": "WING_TEST_RUNNER_FUNCTION_ARNS" + } + } + } + } + }, + "output": { + "WING_TEST_RUNNER_FUNCTION_ARNS": { + "value": "[]" + } + }, + "provider": { + "aws": [ + {} + ] + } +} +``` + +## preflight.js +```js +const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); +const $outdir = process.env.WING_SYNTH_DIR ?? "."; +const $wing_is_test = process.env.WING_IS_TEST === "true"; +const std = $stdlib.std; +const cdk8s = require("cdk8s"); +const kplus = require("cdk8s-plus-27"); +class $Root extends $stdlib.std.Resource { + constructor(scope, id) { + super(scope, id); + const app = this.node.root.new("cdk8s.App",cdk8s.App,); + const chart = this.node.root.new("cdk8s.Chart",cdk8s.Chart,this,"cdk8s.Chart"); + const deploy = this.node.root.new("cdk8s-plus-27.Deployment",kplus.Deployment,chart,"kplus.Deployment"); + (deploy.addContainer(({"image": "hashicorp/http-echo","args": ["-text", "text"],"portNumber": 5678}))); + } +} +const $App = $stdlib.core.App.for(process.env.WING_TARGET); +new $App({ outdir: $outdir, name: "bring_cdk8s", rootConstruct: $Root, plugins: $plugins, isTestEnvironment: $wing_is_test, entrypointDir: process.env['WING_SOURCE_DIR'], rootId: process.env['WING_ROOT_ID'] }).synth(); + +``` + diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_cdk8s.w_test_sim.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_cdk8s.w_test_sim.md new file mode 100644 index 00000000000..adc9f6cf2e0 --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_cdk8s.w_test_sim.md @@ -0,0 +1,12 @@ +# [bring_cdk8s.w](../../../../../examples/tests/valid/bring_cdk8s.w) | test | sim + +## stdout.log +```log +pass ─ bring_cdk8s.wsim (no tests) + + +Tests 1 passed (1) +Test Files 1 passed (1) +Duration +``` + From 881653e1f5614e09f8b8240ce2763d210cf2cfa7 Mon Sep 17 00:00:00 2001 From: Sebastian Korfmann Date: Tue, 29 Aug 2023 14:22:19 +0200 Subject: [PATCH 19/48] fix(sdk): align 404 status across cloud.Api targets (#3973) **Issue:** When an inexistent resource path is provided, AWS Rest API Gateway currently returns a 403 - Forbidden response with the message `Missing Authentication Token`. This is the default behavior of AWS Rest API Gateway. However, it's misleading and differs semantically from the local simulator's response. **Previous Behavior:** - Local simulator: `curl ./not-existing -> 404` - tf-aws: `curl ./not-existing -> 403` **Proposed Change:** - Local simulator: `curl ./not-existing -> 404` - tf-aws: `curl ./not-existing -> 404` My intention was also to synchronize the response bodies. However, I struggled to find the appropriate way to integrate an expressjs middleware as the final handler to modify the 404 response. An attempt was made [here](https://github.com/winglang/wing/blob/2b2aa817bef5f56c56c8a0d02961858dd47c5860/libs/wingsdk/src/target-sim/api.inflight.ts#L132-L135) without success. Suggestions on how to achieve this are welcome. **Solution Considerations:** Two general solutions were explored: 1. Modify the [Api Gateway Response](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-gatewayResponse-definition.html) This would likely override actual 403 responses, see details [here](https://dev.to/aws-builders/better-error-messages-for-non-existing-api-resources-with-amazon-api-gateway-50pb). Hence, it doesn't seem like a good approach. 2. Implement a Greedy Handler I opted for the greedy mock handler method as it appeared to be the more straightforward solution. As long as there's no such option on the `cloud.API` it's seems safe to do so. Once something like this would be implemented, this will have to be adapted accordingly. ## Checklist - [ ] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [ ] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .github/workflows/build.yml | 2 +- examples/tests/sdk_tests/api/404.w | 19 + libs/wingsdk/src/target-tf-aws/api.ts | 54 +- libs/wingsdk/test/target-sim/api.test.ts | 28 + .../__snapshots__/api.test.ts.snap | 555 ++++++++++++++++++ .../__snapshots__/tokens.test.ts.snap | 2 +- .../sdk_tests/api/404.w_compile_tf-aws.md | 386 ++++++++++++ .../sdk_tests/api/404.w_test_sim.md | 12 + .../sdk_tests/api/delete.w_compile_tf-aws.md | 2 +- .../sdk_tests/api/get.w_compile_tf-aws.md | 2 +- .../sdk_tests/api/options.w_compile_tf-aws.md | 2 +- .../sdk_tests/api/patch.w_compile_tf-aws.md | 2 +- .../sdk_tests/api/post.w_compile_tf-aws.md | 2 +- .../sdk_tests/api/put.w_compile_tf-aws.md | 2 +- .../test_corpus/valid/api.w_compile_tf-aws.md | 4 +- .../valid/api_path_vars.w_compile_tf-aws.md | 2 +- .../valid/api_valid_path.w_compile_tf-aws.md | 2 +- .../valid/capture_tokens.w_compile_tf-aws.md | 4 +- .../valid/captures.w_compile_tf-aws.md | 2 +- .../valid/inference.w_compile_tf-aws.md | 2 +- .../valid/issue_2889.w_compile_tf-aws.md | 2 +- .../website_with_api.w_compile_tf-aws.md | 2 +- 22 files changed, 1071 insertions(+), 19 deletions(-) create mode 100644 examples/tests/sdk_tests/api/404.w create mode 100644 tools/hangar/__snapshots__/test_corpus/sdk_tests/api/404.w_compile_tf-aws.md create mode 100644 tools/hangar/__snapshots__/test_corpus/sdk_tests/api/404.w_test_sim.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ffd302b784a..e44d5542c31 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -104,7 +104,7 @@ jobs: test: name: Test - timeout-minutes: 30 + timeout-minutes: 60 runs-on: ubuntu-latest steps: - name: Checkout diff --git a/examples/tests/sdk_tests/api/404.w b/examples/tests/sdk_tests/api/404.w new file mode 100644 index 00000000000..e0f97e6105f --- /dev/null +++ b/examples/tests/sdk_tests/api/404.w @@ -0,0 +1,19 @@ +bring cloud; +bring http; + +let api = new cloud.Api(); + +api.get("/hello", inflight (req) => { + return { + status: 200, + body: "world" + }; +}); + +test "it responds with 404" { + let url = "${api.url}/does-not-exists"; + let response = http.get(url); + + assert(response.status == 404); + assert(response.body?.contains("Error") == true); +} diff --git a/libs/wingsdk/src/target-tf-aws/api.ts b/libs/wingsdk/src/target-tf-aws/api.ts index 23b9b3617a8..8207ef9f9ab 100644 --- a/libs/wingsdk/src/target-tf-aws/api.ts +++ b/libs/wingsdk/src/target-tf-aws/api.ts @@ -362,6 +362,50 @@ export class Api extends cloud.Api { } } +/** + * DEFAULT_404_RESPONSE is a constant that defines the default response when a 404 error occurs. + * It is used to handle all requests that do not match any defined routes in the API Gateway. + * The response is a mock integration type, which means it returns a mocked response without + * forwarding the request to any backend. The response status code is set to 404 and the + * Content-Type header is set to 'application/json'. + */ +const DEFAULT_404_RESPONSE = { + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + produces: ["application/json"], + consumes: ["application/json"], + "x-amazon-apigateway-integration": { + type: "mock", + requestTemplates: { + "application/json": '{"statusCode": 404}', + }, + responses: { + default: { + statusCode: "404", + responseParameters: { + "method.response.header.Content-Type": "'application/json'", + }, + responseTemplates: { + "application/json": + '{"statusCode: 404, "message": "Error: Resource not found"}', + }, + }, + }, + }, + responses: { + 404: { + description: "404 response", + headers: { + "Content-Type": { + type: "string", + }, + }, + }, + }, + }, + }, +}; + /** * Encapsulates the API Gateway REST API as a abstraction for Terraform. */ @@ -381,12 +425,20 @@ class WingRestApi extends Construct { super(scope, id); this.region = (App.of(this) as App).region; + this.api = new ApiGatewayRestApi(this, "api", { name: ResourceNames.generateName(this, NAME_OPTS), // Lazy generation of the api spec because routes can be added after the API is created body: Lazy.stringValue({ produce: () => { - return JSON.stringify(props.apiSpec); + const injectGreedy404Handler = (openApiSpec: OpenApiSpec) => { + openApiSpec.paths = { + ...openApiSpec.paths, + ...DEFAULT_404_RESPONSE, + }; + return openApiSpec; + }; + return JSON.stringify(injectGreedy404Handler(props.apiSpec)); }, }), }); diff --git a/libs/wingsdk/test/target-sim/api.test.ts b/libs/wingsdk/test/target-sim/api.test.ts index c9501304304..c57cd5d295a 100644 --- a/libs/wingsdk/test/target-sim/api.test.ts +++ b/libs/wingsdk/test/target-sim/api.test.ts @@ -513,3 +513,31 @@ test("no response body", async () => { expect(response.status).toEqual(200); expect(response.bodyUsed).toBeFalsy(); }); + +test("404 handler", async () => { + const RESPONSE = "boom"; + // GIVEN + const app = new SimApp(); + const api = cloud.Api._newApi(app, "Api"); + api.post( + "/test", + Testing.makeHandler(app, "Handler", INFLIGHT_CODE(RESPONSE)) + ); + + // WHEN + const s = await app.startSimulator(); + + const apiUrl = getApiUrl(s, "/Api"); + const response = await fetch(apiUrl + "/does-not-exist", { + method: "POST", + body: "hello world, this is a string", + }); + + // THEN + await s.stop(); + + const body = await response.text(); + + expect(response.status).toEqual(404); + expect(body).toContain("Error"); +}); diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/api.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/api.test.ts.snap index efcff9a9242..db5970b4911 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/api.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/api.test.ts.snap @@ -28,6 +28,43 @@ exports[`api with CONNECT route 1`] = ` }, }, }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, }, } `; @@ -60,6 +97,43 @@ exports[`api with DELETE route 1`] = ` }, }, }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, }, } `; @@ -92,6 +166,43 @@ exports[`api with GET route at root 1`] = ` }, }, }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, }, } `; @@ -148,6 +259,43 @@ exports[`api with GET routes with common prefix 1`] = ` }, }, }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, }, } `; @@ -204,6 +352,43 @@ exports[`api with GET routes with different prefix 1`] = ` }, }, }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, }, } `; @@ -236,6 +421,43 @@ exports[`api with HEAD route 1`] = ` }, }, }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, }, } `; @@ -268,6 +490,43 @@ exports[`api with OPTIONS route 1`] = ` }, }, }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, }, } `; @@ -300,6 +559,43 @@ exports[`api with PATCH route 1`] = ` }, }, }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, }, } `; @@ -332,6 +628,43 @@ exports[`api with POST route 1`] = ` }, }, }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, }, } `; @@ -364,6 +697,43 @@ exports[`api with PUT route 1`] = ` }, }, }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, }, } `; @@ -420,6 +790,43 @@ exports[`api with multiple GET route and one lambda 1`] = ` }, }, }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, }, } `; @@ -476,6 +883,43 @@ exports[`api with multiple methods and multiple lambda 1`] = ` }, }, }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, }, } `; @@ -532,6 +976,43 @@ exports[`api with multiple methods and one lambda 1`] = ` }, }, }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, }, } `; @@ -586,6 +1067,43 @@ exports[`api with multiple methods on same route 1`] = ` }, }, }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, }, } `; @@ -627,6 +1145,43 @@ exports[`api with path parameter 1`] = ` }, }, }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, }, } `; diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/tokens.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/tokens.test.ts.snap index 9b74cdb321d..9016b32324f 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/tokens.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/tokens.test.ts.snap @@ -45,7 +45,7 @@ exports[`captures tokens 2`] = ` }, "aws_api_gateway_rest_api": { "Api_api_91C07D84": { - "body": "{\\"openapi\\":\\"3.0.3\\",\\"paths\\":{\\"/\\":{\\"get\\":{\\"operationId\\":\\"get\\",\\"responses\\":{\\"200\\":{\\"description\\":\\"200 response\\",\\"content\\":{}}},\\"parameters\\":[],\\"x-amazon-apigateway-integration\\":{\\"uri\\":\\"arn:aws:apigateway:\${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/\${aws_lambda_function.Api_Api-OnRequest-c5395e41_37F21C2B.arn}/invocations\\",\\"type\\":\\"aws_proxy\\",\\"httpMethod\\":\\"POST\\",\\"responses\\":{\\"default\\":{\\"statusCode\\":\\"200\\"}},\\"passthroughBehavior\\":\\"when_no_match\\",\\"contentHandling\\":\\"CONVERT_TO_TEXT\\"}}}}}", + "body": "{\\"openapi\\":\\"3.0.3\\",\\"paths\\":{\\"/\\":{\\"get\\":{\\"operationId\\":\\"get\\",\\"responses\\":{\\"200\\":{\\"description\\":\\"200 response\\",\\"content\\":{}}},\\"parameters\\":[],\\"x-amazon-apigateway-integration\\":{\\"uri\\":\\"arn:aws:apigateway:\${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/\${aws_lambda_function.Api_Api-OnRequest-c5395e41_37F21C2B.arn}/invocations\\",\\"type\\":\\"aws_proxy\\",\\"httpMethod\\":\\"POST\\",\\"responses\\":{\\"default\\":{\\"statusCode\\":\\"200\\"}},\\"passthroughBehavior\\":\\"when_no_match\\",\\"contentHandling\\":\\"CONVERT_TO_TEXT\\"}}},\\"/{proxy+}\\":{\\"x-amazon-apigateway-any-method\\":{\\"produces\\":[\\"application/json\\"],\\"consumes\\":[\\"application/json\\"],\\"x-amazon-apigateway-integration\\":{\\"type\\":\\"mock\\",\\"requestTemplates\\":{\\"application/json\\":\\"{\\\\\\"statusCode\\\\\\": 404}\\"},\\"responses\\":{\\"default\\":{\\"statusCode\\":\\"404\\",\\"responseParameters\\":{\\"method.response.header.Content-Type\\":\\"'application/json'\\"},\\"responseTemplates\\":{\\"application/json\\":\\"{\\\\\\"statusCode: 404, \\\\\\"message\\\\\\": \\\\\\"Error: Resource not found\\\\\\"}\\"}}}},\\"responses\\":{\\"404\\":{\\"description\\":\\"404 response\\",\\"headers\\":{\\"Content-Type\\":{\\"type\\":\\"string\\"}}}}}}}}", "name": "api-c8f613f0", }, }, diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/404.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/404.w_compile_tf-aws.md new file mode 100644 index 00000000000..895cd5b7a46 --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/404.w_compile_tf-aws.md @@ -0,0 +1,386 @@ +# [404.w](../../../../../../examples/tests/sdk_tests/api/404.w) | compile | tf-aws + +## inflight.$Closure1-1.js +```js +module.exports = function({ }) { + class $Closure1 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle(req) { + return ({"status": 200,"body": "world"}); + } + } + return $Closure1; +} + +``` + +## inflight.$Closure2-1.js +```js +module.exports = function({ $api_url, $http_Util }) { + class $Closure2 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const url = String.raw({ raw: ["", "/does-not-exists"] }, $api_url); + const response = (await $http_Util.get(url)); + {((cond) => {if (!cond) throw new Error("assertion failed: response.status == 404")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(response.status,404)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: response.body?.contains(\"Error\") == true")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(response.body.includes("Error"),true)))}; + } + } + return $Closure2; +} + +``` + +## main.tf.json +```json +{ + "//": { + "metadata": { + "backend": "local", + "stackName": "root", + "version": "0.17.0" + }, + "outputs": { + "root": { + "Default": { + "cloud.TestRunner": { + "TestFunctionArns": "WING_TEST_RUNNER_FUNCTION_ARNS" + } + } + } + } + }, + "data": { + "aws_region": { + "Region": { + "//": { + "metadata": { + "path": "root/Default/Region", + "uniqueId": "Region" + } + } + } + } + }, + "output": { + "WING_TEST_RUNNER_FUNCTION_ARNS": { + "value": "[[\"root/Default/Default/test:it responds with 404\",\"${aws_lambda_function.testitrespondswith404_Handler_2D34428F.arn}\"]]" + } + }, + "provider": { + "aws": [ + {} + ] + }, + "resource": { + "aws_api_gateway_deployment": { + "cloudApi_api_deployment_545514BF": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/deployment", + "uniqueId": "cloudApi_api_deployment_545514BF" + } + }, + "lifecycle": { + "create_before_destroy": true + }, + "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", + "triggers": { + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" + } + } + }, + "aws_api_gateway_rest_api": { + "cloudApi_api_2B334D75": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/api", + "uniqueId": "cloudApi_api_2B334D75" + } + }, + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/hello\":{\"get\":{\"operationId\":\"get-hello\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "name": "api-c895068c" + } + }, + "aws_api_gateway_stage": { + "cloudApi_api_stage_BBB283E4": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/stage", + "uniqueId": "cloudApi_api_stage_BBB283E4" + } + }, + "deployment_id": "${aws_api_gateway_deployment.cloudApi_api_deployment_545514BF.id}", + "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", + "stage_name": "prod" + } + }, + "aws_iam_role": { + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRole", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testitrespondswith404_Handler_IamRole_E0973EE8": { + "//": { + "metadata": { + "path": "root/Default/Default/test:it responds with 404/Handler/IamRole", + "uniqueId": "testitrespondswith404_Handler_IamRole_E0973EE8" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + } + }, + "aws_iam_role_policy": { + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicy_8BF9C89F": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRolePolicy", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicy_8BF9C89F" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" + }, + "testitrespondswith404_Handler_IamRolePolicy_4E2D3D6D": { + "//": { + "metadata": { + "path": "root/Default/Default/test:it responds with 404/Handler/IamRolePolicy", + "uniqueId": "testitrespondswith404_Handler_IamRolePolicy_4E2D3D6D" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testitrespondswith404_Handler_IamRole_E0973EE8.name}" + } + }, + "aws_iam_role_policy_attachment": { + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicyAttachment_5383D6A2": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRolePolicyAttachment", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicyAttachment_5383D6A2" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" + }, + "testitrespondswith404_Handler_IamRolePolicyAttachment_943423A4": { + "//": { + "metadata": { + "path": "root/Default/Default/test:it responds with 404/Handler/IamRolePolicyAttachment", + "uniqueId": "testitrespondswith404_Handler_IamRolePolicyAttachment_943423A4" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testitrespondswith404_Handler_IamRole_E0973EE8.name}" + } + }, + "aws_lambda_function": { + "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/Default", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", + "WING_TARGET": "tf-aws" + } + }, + "function_name": "cloud-Api-OnRequest-cdafee6e-c8147384", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testitrespondswith404_Handler_2D34428F": { + "//": { + "metadata": { + "path": "root/Default/Default/test:it responds with 404/Handler/Default", + "uniqueId": "testitrespondswith404_Handler_2D34428F" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c83f9661", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c83f9661", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testitrespondswith404_Handler_IamRole_E0973EE8.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testitrespondswith404_Handler_S3Object_7180AA4B.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + } + }, + "aws_lambda_permission": { + "cloudApi_api_permission-GET-df16733f_0EEF8FF5": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-df16733f", + "uniqueId": "cloudApi_api_permission-GET-df16733f_0EEF8FF5" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/hello", + "statement_id": "AllowExecutionFromAPIGateway-GET-df16733f" + } + }, + "aws_s3_bucket": { + "Code": { + "//": { + "metadata": { + "path": "root/Default/Code", + "uniqueId": "Code" + } + }, + "bucket_prefix": "code-c84a50b1-" + } + }, + "aws_s3_object": { + "cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/S3Object", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testitrespondswith404_Handler_S3Object_7180AA4B": { + "//": { + "metadata": { + "path": "root/Default/Default/test:it responds with 404/Handler/S3Object", + "uniqueId": "testitrespondswith404_Handler_S3Object_7180AA4B" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + } + } + } +} +``` + +## preflight.js +```js +const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); +const $outdir = process.env.WING_SYNTH_DIR ?? "."; +const $wing_is_test = process.env.WING_IS_TEST === "true"; +const std = $stdlib.std; +const cloud = $stdlib.cloud; +const http = $stdlib.http; +class $Root extends $stdlib.std.Resource { + constructor(scope, id) { + super(scope, id); + class $Closure1 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure1-1.js")({ + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure1Client = ${$Closure1._toInflightType(this)}; + const client = new $Closure1Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + } + class $Closure2 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure2-1.js")({ + $api_url: ${context._lift(api.url)}, + $http_Util: ${context._lift(http.Util)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure2Client = ${$Closure2._toInflightType(this)}; + const client = new $Closure2Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure2._registerBindObject(api.url, host, []); + } + super._registerBind(host, ops); + } + } + const api = this.node.root.newAbstract("@winglang/sdk.cloud.Api",this,"cloud.Api"); + (api.get("/hello",new $Closure1(this,"$Closure1"))); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:it responds with 404",new $Closure2(this,"$Closure2")); + } +} +const $App = $stdlib.core.App.for(process.env.WING_TARGET); +new $App({ outdir: $outdir, name: "404", rootConstruct: $Root, plugins: $plugins, isTestEnvironment: $wing_is_test, entrypointDir: process.env['WING_SOURCE_DIR'], rootId: process.env['WING_ROOT_ID'] }).synth(); + +``` + diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/404.w_test_sim.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/404.w_test_sim.md new file mode 100644 index 00000000000..9c69b87eb78 --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/404.w_test_sim.md @@ -0,0 +1,12 @@ +# [404.w](../../../../../../examples/tests/sdk_tests/api/404.w) | test | sim + +## stdout.log +```log +pass ─ 404.wsim » root/env0/test:it responds with 404 + + +Tests 1 passed (1) +Test Files 1 passed (1) +Duration +``` + diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md index cd5f6150650..ad5a0098c83 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md @@ -115,7 +115,7 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"delete\":{\"operationId\":\"delete-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"delete\":{\"operationId\":\"delete-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md index c8b2a2eb2c3..bb7275b8ec8 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md @@ -119,7 +119,7 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"get\":{\"operationId\":\"get-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"get\":{\"operationId\":\"get-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md index 4d58794546a..eb752661186 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md @@ -149,7 +149,7 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $path }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"options\":{\"operationId\":\"options-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}},\"head\":{\"operationId\":\"head-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}},\"connect\":{\"operationId\":\"connect-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-3fc9280c_5DA20E7A.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"options\":{\"operationId\":\"options-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}},\"head\":{\"operationId\":\"head-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}},\"connect\":{\"operationId\":\"connect-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-3fc9280c_5DA20E7A.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md index 264da21e4d8..471345931da 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md @@ -116,7 +116,7 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path/{id}\":{\"patch\":{\"operationId\":\"patch-path/{id}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"id\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path/{id}\":{\"patch\":{\"operationId\":\"patch-path/{id}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"id\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md index 00bacf6c3c5..5c3c2344a04 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md @@ -115,7 +115,7 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util, $std_ "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"post\":{\"operationId\":\"post-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"post\":{\"operationId\":\"post-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md index e3178302df0..72852cd405d 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md @@ -120,7 +120,7 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path/{id}/nn/{user}\":{\"put\":{\"operationId\":\"put-path/{id}/nn/{user}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"id\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"user\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path/{id}/nn/{user}\":{\"put\":{\"operationId\":\"put-path/{id}/nn/{user}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"id\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"user\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md index 5c934216aad..f8ec9aef635 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md @@ -153,7 +153,7 @@ module.exports = function({ }) { "uniqueId": "A_cloudApi_api_37FCEF91" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/endpoint1\":{\"get\":{\"operationId\":\"get-endpoint1\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.A_cloudApi_cloudApi-OnRequest-73c5308f_E645B0BE.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/endpoint1\":{\"get\":{\"operationId\":\"get-endpoint1\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.A_cloudApi_cloudApi-OnRequest-73c5308f_E645B0BE.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c8c7a7a3" }, "cloudApi_api_2B334D75": { @@ -163,7 +163,7 @@ module.exports = function({ }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/hello/world\":{\"get\":{\"operationId\":\"get-hello/world\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/hello/world\":{\"get\":{\"operationId\":\"get-hello/world\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md index 8519c94f17b..93573fab137 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md @@ -106,7 +106,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users/{name}\":{\"get\":{\"operationId\":\"get-users/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users/{name}\":{\"get\":{\"operationId\":\"get-users/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md index 27ff5d8ccf9..a227839df51 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md @@ -85,7 +85,7 @@ module.exports = function({ }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/test\":{\"get\":{\"operationId\":\"get-test\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/alphanumer1cPa_th\":{\"get\":{\"operationId\":\"get-test/alphanumer1cPa_th\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/regular/path\":{\"get\":{\"operationId\":\"get-test/regular/path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/pa-th/{with}/two/{variable_s}/f?bla=5&b=6\":{\"get\":{\"operationId\":\"get-test/pa-th/{with}/two/{variable_s}/f?bla=5&b=6\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"with\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"variable_s\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/param/is/{last}\":{\"get\":{\"operationId\":\"get-test/param/is/{last}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"last\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/test\":{\"get\":{\"operationId\":\"get-test\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/alphanumer1cPa_th\":{\"get\":{\"operationId\":\"get-test/alphanumer1cPa_th\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/regular/path\":{\"get\":{\"operationId\":\"get-test/regular/path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/pa-th/{with}/two/{variable_s}/f?bla=5&b=6\":{\"get\":{\"operationId\":\"get-test/pa-th/{with}/two/{variable_s}/f?bla=5&b=6\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"with\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"variable_s\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/param/is/{last}\":{\"get\":{\"operationId\":\"get-test/param/is/{last}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"last\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md index 96046af2514..ad5d79e6fd6 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md @@ -140,7 +140,7 @@ module.exports = function({ }) { "uniqueId": "MyResource_cloudApi_api_4CB9B8E3" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c8ef4b64" }, "cloudApi_api_2B334D75": { @@ -150,7 +150,7 @@ module.exports = function({ }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md index 47d5c8e51d4..de168c05e50 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md @@ -117,7 +117,7 @@ module.exports = function({ $headers }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/hello\":{\"get\":{\"operationId\":\"get-hello\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/hello\":{\"get\":{\"operationId\":\"get-hello\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md index 6ddf59a309e..f86901b1d16 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md @@ -85,7 +85,7 @@ module.exports = function({ }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/hello/world\":{\"get\":{\"operationId\":\"get-hello/world\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/hello/world\":{\"get\":{\"operationId\":\"get-hello/world\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md index 0c2f88c4f4d..5811c8e0916 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md @@ -107,7 +107,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/foo\":{\"get\":{\"operationId\":\"get-foo\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/foo\":{\"get\":{\"operationId\":\"get-foo\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md index 7df57dcc139..451cb823a60 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md @@ -163,7 +163,7 @@ module.exports = function({ }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users\":{\"get\":{\"operationId\":\"get-users\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}},\"post\":{\"operationId\":\"post-users\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}},\"options\":{\"operationId\":\"options-users\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-3fc9280c_5DA20E7A.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users\":{\"get\":{\"operationId\":\"get-users\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}},\"post\":{\"operationId\":\"post-users\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}},\"options\":{\"operationId\":\"options-users\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-3fc9280c_5DA20E7A.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, From 7723b066f905d5085735170f76364f6fd1f370cb Mon Sep 17 00:00:00 2001 From: Chris Rybicki Date: Tue, 29 Aug 2023 19:04:47 -0400 Subject: [PATCH 20/48] feat(compiler)!: `throw` becomes a keyword (#4008) Changes the built-in function "throw" into a dedicated keyword. The rationale for this change (described in #2150) is that throwing is a primary operation that changes the control flow of your program - just like `if`, `while`, `return`, or `try`/`catch` - so it's more natural to have it as a dedicated statement. This means it will receive the same syntax highlighting treatment as `return` and `while` etc. Closes #2150. BREAKING CHANGE: `throw` is now a built-in keyword, instead of a global function. Use `throw "blah"` instead of `throw("blah")` ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [x] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- apps/vscode-wing/syntaxes/wing.tmLanguage.json | 2 +- docs/docs/03-language-reference.md | 18 +++++++++++++++--- examples/proposed/counting-semaphore.w | 6 +++--- examples/proposed/task-manager.w | 4 ++-- examples/tests/error/utilities.w | 2 +- examples/tests/invalid/throw_non_string.w | 3 +++ examples/tests/sdk_tests/util/wait-until.w | 4 ++-- examples/tests/valid/dynamo.w | 2 +- examples/tests/valid/dynamo_awscdk.w | 4 ++-- examples/tests/valid/try_catch.w | 6 +++--- libs/tree-sitter-wing/grammar.js | 6 +++++- libs/wingc/src/ast.rs | 1 + libs/wingc/src/fold.rs | 1 + libs/wingc/src/jsify.rs | 2 ++ libs/wingc/src/lib.rs | 18 ------------------ libs/wingc/src/lsp/hover.rs | 2 +- .../completions/call_struct_expansion.snap | 12 ------------ .../call_struct_expansion_partial.snap | 12 ------------ .../src/lsp/snapshots/completions/empty.snap | 12 ------------ .../only_show_symbols_in_scope.snap | 12 ------------ .../completions/struct_literal_value.snap | 12 ------------ .../snapshots/hovers/builtin_in_inflight.snap | 4 ++-- libs/wingc/src/parser.rs | 6 ++++++ libs/wingc/src/type_check.rs | 5 +++++ libs/wingc/src/visit.rs | 3 +++ tools/hangar/__snapshots__/error.ts.snap | 2 +- tools/hangar/__snapshots__/invalid.ts.snap | 15 +++++++++++++++ .../util/wait-until.w_compile_tf-aws.md | 2 +- .../test_corpus/valid/debug_env.w_test_sim.md | 2 +- .../valid/try_catch.w_compile_tf-aws.md | 8 ++++---- 30 files changed, 81 insertions(+), 107 deletions(-) create mode 100644 examples/tests/invalid/throw_non_string.w diff --git a/apps/vscode-wing/syntaxes/wing.tmLanguage.json b/apps/vscode-wing/syntaxes/wing.tmLanguage.json index de73bc41a79..376a3fbd9e1 100644 --- a/apps/vscode-wing/syntaxes/wing.tmLanguage.json +++ b/apps/vscode-wing/syntaxes/wing.tmLanguage.json @@ -109,7 +109,7 @@ "patterns": [ { "name": "keyword.control.flow.wing", - "match": "\\b(else|elif|if|return|try|catch|finally|bring|as)\\b" + "match": "\\b(else|elif|if|return|throw|try|catch|finally|bring|as)\\b" }, { "name": "keyword.control.loop.wing", diff --git a/docs/docs/03-language-reference.md b/docs/docs/03-language-reference.md index 69fc22a739e..6f944506455 100644 --- a/docs/docs/03-language-reference.md +++ b/docs/docs/03-language-reference.md @@ -516,12 +516,10 @@ log("UTC: ${t1.utc.toIso())}"); // output: 2023-02-09T06:21:03.000Z | Name | Extra information | | -------- | -------------------------------------------------------- | | `log` | logs str | -| `throw` | creates and throws an instance of an exception | | `assert` | checks a condition and _throws_ if evaluated to false | > ```TS > log("Hello ${name}"); -> throw("a recoverable error occurred"); > assert(x > 0); > ``` @@ -1173,7 +1171,7 @@ The loop invariant in for loops is implicitly re-assignable (`var`). ### 2.7 while -**while** statement is used to execute a block of code while a condition is true. +The **while** statement evaluates a condition, and if it is true, a set of statements is repeated until the condition is false. > ```TS > // Wing program: @@ -1186,6 +1184,20 @@ The loop invariant in for loops is implicitly re-assignable (`var`). --- +### 2.8 throw + +The **throw** statement raises a user-defined exception, which must be a string expression. +Execution of the current function will stop (the statements after throw won't be executed), and control will be passed to the first catch block in the call stack. +If no catch block exists among caller functions, the program will terminate. +(An uncaught exception in preflight causes a compilation error, while an uncaught exception in inflight causes a runtime error.) + +> ```TS +> // Wing program: +> throw "Username must be at least 3 characters long."; +> ``` + +[`▲ top`][top] + ## 3. Declarations ### 3.1 Structs diff --git a/examples/proposed/counting-semaphore.w b/examples/proposed/counting-semaphore.w index 54485b570bf..b73f2e18da7 100644 --- a/examples/proposed/counting-semaphore.w +++ b/examples/proposed/counting-semaphore.w @@ -59,13 +59,13 @@ queue.add_consumer(inflight (message: str) => { let is_resource_1_acquired = resource_1.try_acquire(); if !is_resource_1_acquired { // brutally error out to re-enqueue - throw("Failed to acquire resource 1"); + throw "Failed to acquire resource 1"; } let is_resource_2_acquired = resource_2.try_acquire(); if !is_resource_2_acquired { resource_1.release(); // brutally error out to re-enqueue - throw("Failed to acquire resource 2"); + throw "Failed to acquire resource 2"; } // real work @@ -73,4 +73,4 @@ queue.add_consumer(inflight (message: str) => { resource_1.release(); resource_2.release(); -}); \ No newline at end of file +}); diff --git a/examples/proposed/task-manager.w b/examples/proposed/task-manager.w index 9e5ac191be1..f863c0e6180 100644 --- a/examples/proposed/task-manager.w +++ b/examples/proposed/task-manager.w @@ -54,7 +54,7 @@ resource TaskManager { try { return this.bucket.get("${id}/status"); } catch e { - throw("no such key: ${id}"); + throw "no such key: ${id}"; } } @@ -65,7 +65,7 @@ resource TaskManager { try { return this.bucket.get("${id}/result"); } catch e { - throw("no such id: ${id}"); + throw "no such id: ${id}"; } } diff --git a/examples/tests/error/utilities.w b/examples/tests/error/utilities.w index 6c324a4ee97..ea8f49b4c99 100644 --- a/examples/tests/error/utilities.w +++ b/examples/tests/error/utilities.w @@ -1,3 +1,3 @@ assert(false); log("W"); -throw("me"); \ No newline at end of file +throw "me"; diff --git a/examples/tests/invalid/throw_non_string.w b/examples/tests/invalid/throw_non_string.w new file mode 100644 index 00000000000..9d503d88155 --- /dev/null +++ b/examples/tests/invalid/throw_non_string.w @@ -0,0 +1,3 @@ +throw 42; + //^ error: expected expression of type str, but received num + \ No newline at end of file diff --git a/examples/tests/sdk_tests/util/wait-until.w b/examples/tests/sdk_tests/util/wait-until.w index a0fc59fc12f..73e5bbee064 100644 --- a/examples/tests/sdk_tests/util/wait-until.w +++ b/examples/tests/sdk_tests/util/wait-until.w @@ -63,10 +63,10 @@ test "throwing exception from predicate should throw immediately" { try { util.waitUntil((): bool => { invokeCounter.inc(); - throw("ERROR"); + throw "ERROR"; }); assert(false); } catch { assert(invokeCounter.peek() == 1); } -} \ No newline at end of file +} diff --git a/examples/tests/valid/dynamo.w b/examples/tests/valid/dynamo.w index 14574ba9790..be442dca6e9 100644 --- a/examples/tests/valid/dynamo.w +++ b/examples/tests/valid/dynamo.w @@ -25,7 +25,7 @@ class DynamoTable { init() { let target = util.env("WING_TARGET"); if target != "tf-aws" { - throw("Unsupported target: ${target} (expected 'tf-aws')"); + throw "Unsupported target: ${target} (expected 'tf-aws')"; } this.table = new tfaws.dynamodbTable.DynamodbTable( diff --git a/examples/tests/valid/dynamo_awscdk.w b/examples/tests/valid/dynamo_awscdk.w index f140f6a4e0d..af609b94a7a 100644 --- a/examples/tests/valid/dynamo_awscdk.w +++ b/examples/tests/valid/dynamo_awscdk.w @@ -25,7 +25,7 @@ class DynamoTable { init() { let target = util.env("WING_TARGET"); if target != "awscdk" { - throw("Unsupported target: ${target} (expected 'awscdk')"); + throw "Unsupported target: ${target} (expected 'awscdk')"; } this.table = new awscdk.aws_dynamodb.Table( @@ -120,4 +120,4 @@ test "cdk table" { }); assert(c.get("Item").get("Flavor").get("S").asStr() == "Chocolate"); assert(c.get("Item").get("Quantity").get("S").asStr() == "20Kg"); -} \ No newline at end of file +} diff --git a/examples/tests/valid/try_catch.w b/examples/tests/valid/try_catch.w index e28c553ed45..ce0a7e4a86c 100644 --- a/examples/tests/valid/try_catch.w +++ b/examples/tests/valid/try_catch.w @@ -2,7 +2,7 @@ let var x = ""; // Verify throw works and both catch and finally are executed. try { - throw("hello"); + throw "hello"; x = "no way I got here"; } catch e { assert(e == "hello"); @@ -27,7 +27,7 @@ assert(x == "finally"); // Verify that finally is executed even if there's no catch block. try { try { - throw("hello"); + throw "hello"; } finally { x = "finally with no catch"; } @@ -46,6 +46,6 @@ assert(x == "finally with no catch and no exception"); // Verify we can return from a closure in a finally block. assert((():num => { try {} finally {return 1;}})() == 1); // Verify we can return from a closure in a catch block. -assert((():num => { try {throw("");} catch {return 2;}})() == 2); +assert((():num => { try {throw "";} catch {return 2;}})() == 2); // Verify we can return from a closure in a try block. assert((():num => { try {return 3;} finally {}})() == 3); diff --git a/libs/tree-sitter-wing/grammar.js b/libs/tree-sitter-wing/grammar.js index d9cf896193c..eb0f96f0d4c 100644 --- a/libs/tree-sitter-wing/grammar.js +++ b/libs/tree-sitter-wing/grammar.js @@ -117,7 +117,8 @@ module.exports = grammar({ $.enum_definition, $.try_catch_statement, $.compiler_dbg_env, - $.super_constructor_statement + $.super_constructor_statement, + $.throw_statement, ), import_statement: ($) => @@ -148,6 +149,9 @@ module.exports = grammar({ return_statement: ($) => seq("return", optional(field("expression", $.expression)), $._semicolon), + throw_statement: ($) => + seq("throw", optional(field("expression", $.expression)), $._semicolon), + variable_assignment_statement: ($) => seq( field("name", alias($.reference, $.lvalue)), diff --git a/libs/wingc/src/ast.rs b/libs/wingc/src/ast.rs index 2ee52902908..18ea51bc429 100644 --- a/libs/wingc/src/ast.rs +++ b/libs/wingc/src/ast.rs @@ -466,6 +466,7 @@ pub enum StmtKind { Break, Continue, Return(Option), + Throw(Expr), Expression(Expr), Assignment { variable: Reference, diff --git a/libs/wingc/src/fold.rs b/libs/wingc/src/fold.rs index 92df85e9cd2..788370cac36 100644 --- a/libs/wingc/src/fold.rs +++ b/libs/wingc/src/fold.rs @@ -156,6 +156,7 @@ where StmtKind::Break => StmtKind::Break, StmtKind::Continue => StmtKind::Continue, StmtKind::Return(value) => StmtKind::Return(value.map(|value| f.fold_expr(value))), + StmtKind::Throw(value) => StmtKind::Throw(f.fold_expr(value)), StmtKind::Expression(expr) => StmtKind::Expression(f.fold_expr(expr)), StmtKind::Assignment { variable, value } => StmtKind::Assignment { variable: f.fold_reference(variable), diff --git a/libs/wingc/src/jsify.rs b/libs/wingc/src/jsify.rs index 9d72fb7264f..47484c042ce 100644 --- a/libs/wingc/src/jsify.rs +++ b/libs/wingc/src/jsify.rs @@ -1039,6 +1039,7 @@ impl<'a> JSifier<'a> { CodeMaker::one_line("return;") } } + StmtKind::Throw(exp) => CodeMaker::one_line(format!("throw new Error({});", self.jsify_expression(exp, ctx))), StmtKind::Class(class) => self.jsify_class(env, class, ctx), StmtKind::Interface { .. } => { // This is a no-op in JS @@ -1649,6 +1650,7 @@ fn get_public_symbols(scope: &Scope) -> Vec { StmtKind::Break => {} StmtKind::Continue => {} StmtKind::Return(_) => {} + StmtKind::Throw(_) => {} StmtKind::Expression(_) => {} StmtKind::Assignment { .. } => {} StmtKind::Scope(_) => {} diff --git a/libs/wingc/src/lib.rs b/libs/wingc/src/lib.rs index 8dedec5ab1c..bef628d1306 100644 --- a/libs/wingc/src/lib.rs +++ b/libs/wingc/src/lib.rs @@ -242,24 +242,6 @@ pub fn type_check( scope, types, ); - add_builtin( - UtilityFunctions::Throw.to_string().as_str(), - Type::Function(FunctionSignature { - this_type: None, - parameters: vec![FunctionParameter { - typeref: types.string(), - name: "message".into(), - docs: Docs::with_summary("The message to throw"), - variadic: false, - }], - return_type: types.void(), - phase: Phase::Independent, - js_override: Some("{((msg) => {throw new Error(msg)})($args$)}".to_string()), - docs: Docs::with_summary("throws an error"), - }), - scope, - types, - ); let mut scope_env = types.get_scope_env(&scope); let mut tc = TypeChecker::new(types, file_path, jsii_types, jsii_imports); diff --git a/libs/wingc/src/lsp/hover.rs b/libs/wingc/src/lsp/hover.rs index b6cf333bf26..5ebadc533c9 100644 --- a/libs/wingc/src/lsp/hover.rs +++ b/libs/wingc/src/lsp/hover.rs @@ -673,7 +673,7 @@ assert(true); r#" class Foo { inflight bar() { - throw("hello"); + assert(true); //^ } } diff --git a/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion.snap b/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion.snap index eaec35e6afc..d244cb0fe84 100644 --- a/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion.snap +++ b/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion.snap @@ -37,18 +37,6 @@ source: libs/wingc/src/lsp/completions.rs command: title: triggerParameterHints command: editor.action.triggerParameterHints -- label: throw - kind: 3 - detail: "(message: str): void" - documentation: - kind: markdown - value: "```wing\nthrow: (message: str): void\n```\n---\nthrows an error\n\n### Parameters\n- `message` — The message to throw" - sortText: cc|throw - insertText: throw($0) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints - label: x kind: 3 detail: "preflight (arg1: A): void" diff --git a/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion_partial.snap b/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion_partial.snap index 2fa5ecc4b5f..cda29aaba92 100644 --- a/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion_partial.snap +++ b/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion_partial.snap @@ -37,18 +37,6 @@ source: libs/wingc/src/lsp/completions.rs command: title: triggerParameterHints command: editor.action.triggerParameterHints -- label: throw - kind: 3 - detail: "(message: str): void" - documentation: - kind: markdown - value: "```wing\nthrow: (message: str): void\n```\n---\nthrows an error\n\n### Parameters\n- `message` — The message to throw" - sortText: cc|throw - insertText: throw($0) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints - label: x kind: 3 detail: "preflight (arg1: A): void" diff --git a/libs/wingc/src/lsp/snapshots/completions/empty.snap b/libs/wingc/src/lsp/snapshots/completions/empty.snap index a16c46c8443..5308742eb14 100644 --- a/libs/wingc/src/lsp/snapshots/completions/empty.snap +++ b/libs/wingc/src/lsp/snapshots/completions/empty.snap @@ -25,18 +25,6 @@ source: libs/wingc/src/lsp/completions.rs command: title: triggerParameterHints command: editor.action.triggerParameterHints -- label: throw - kind: 3 - detail: "(message: str): void" - documentation: - kind: markdown - value: "```wing\nthrow: (message: str): void\n```\n---\nthrows an error\n\n### Parameters\n- `message` — The message to throw" - sortText: cc|throw - insertText: throw($0) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints - label: "inflight () => {}" kind: 15 sortText: "ll|inflight () => {}" diff --git a/libs/wingc/src/lsp/snapshots/completions/only_show_symbols_in_scope.snap b/libs/wingc/src/lsp/snapshots/completions/only_show_symbols_in_scope.snap index 9bb6c11d82a..06371d98006 100644 --- a/libs/wingc/src/lsp/snapshots/completions/only_show_symbols_in_scope.snap +++ b/libs/wingc/src/lsp/snapshots/completions/only_show_symbols_in_scope.snap @@ -39,18 +39,6 @@ source: libs/wingc/src/lsp/completions.rs command: title: triggerParameterHints command: editor.action.triggerParameterHints -- label: throw - kind: 3 - detail: "(message: str): void" - documentation: - kind: markdown - value: "```wing\nthrow: (message: str): void\n```\n---\nthrows an error\n\n### Parameters\n- `message` — The message to throw" - sortText: cc|throw - insertText: throw($0) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints - label: "inflight () => {}" kind: 15 sortText: "ll|inflight () => {}" diff --git a/libs/wingc/src/lsp/snapshots/completions/struct_literal_value.snap b/libs/wingc/src/lsp/snapshots/completions/struct_literal_value.snap index 61505c5c11d..c80fc34772f 100644 --- a/libs/wingc/src/lsp/snapshots/completions/struct_literal_value.snap +++ b/libs/wingc/src/lsp/snapshots/completions/struct_literal_value.snap @@ -25,18 +25,6 @@ source: libs/wingc/src/lsp/completions.rs command: title: triggerParameterHints command: editor.action.triggerParameterHints -- label: throw - kind: 3 - detail: "(message: str): void" - documentation: - kind: markdown - value: "```wing\nthrow: (message: str): void\n```\n---\nthrows an error\n\n### Parameters\n- `message` — The message to throw" - sortText: cc|throw - insertText: throw($0) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints - label: Foo kind: 22 documentation: diff --git a/libs/wingc/src/lsp/snapshots/hovers/builtin_in_inflight.snap b/libs/wingc/src/lsp/snapshots/hovers/builtin_in_inflight.snap index 31989fd4a03..081f59044d1 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/builtin_in_inflight.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/builtin_in_inflight.snap @@ -3,12 +3,12 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nthrow: (message: str): void\n```\n---\nthrows an error\n\n### Parameters\n- `message` — The message to throw" + value: "```wing\nassert: (condition: bool): void\n```\n---\nAsserts that a condition is true\n\n### Parameters\n- `condition` — The condition to assert" range: start: line: 3 character: 4 end: line: 3 - character: 9 + character: 10 diff --git a/libs/wingc/src/parser.rs b/libs/wingc/src/parser.rs index 9d038ae6c72..79735ead4e8 100644 --- a/libs/wingc/src/parser.rs +++ b/libs/wingc/src/parser.rs @@ -454,6 +454,7 @@ impl<'s> Parser<'s> { "break_statement" => self.build_break_statement(statement_node)?, "continue_statement" => self.build_continue_statement(statement_node)?, "return_statement" => self.build_return_statement(statement_node, phase)?, + "throw_statement" => self.build_throw_statement(statement_node, phase)?, "class_definition" => self.build_class_statement(statement_node, Phase::Inflight)?, // `inflight class` is always "inflight" "resource_definition" => self.build_class_statement(statement_node, phase)?, // `class` without a modifier inherits from scope "interface_definition" => self.build_interface_statement(statement_node, phase)?, @@ -520,6 +521,11 @@ impl<'s> Parser<'s> { )) } + fn build_throw_statement(&self, statement_node: &Node, phase: Phase) -> DiagnosticResult { + let expr = self.build_expression(&statement_node.child_by_field_name("expression").unwrap(), phase)?; + Ok(StmtKind::Throw(expr)) + } + /// Builds scope statements for a loop (while/for), and maintains the is_in_loop flag /// for the duration of the loop. So that later break statements inside can be validated /// without traversing the AST. diff --git a/libs/wingc/src/type_check.rs b/libs/wingc/src/type_check.rs index 4f77f87ffde..bd6e792c9b7 100644 --- a/libs/wingc/src/type_check.rs +++ b/libs/wingc/src/type_check.rs @@ -3235,6 +3235,10 @@ impl<'a> TypeChecker<'a> { self.types.set_scope_env(scope, scope_env); self.inner_scopes.push(scope) } + StmtKind::Throw(exp) => { + let (exp_type, _) = self.type_check_exp(exp, env); + self.validate_type(exp_type, self.types.string(), exp); + } StmtKind::Return(exp) => { let return_type_inferred = self.update_known_inferences(&mut env.return_type, &stmt.span); if let Some(return_expression) = exp { @@ -5109,6 +5113,7 @@ fn check_is_bringable(scope: &Scope) -> bool { StmtKind::Break => false, StmtKind::Continue => false, StmtKind::Return(_) => false, + StmtKind::Throw(_) => false, StmtKind::Expression(_) => false, StmtKind::Assignment { .. } => false, StmtKind::Scope(_) => false, diff --git a/libs/wingc/src/visit.rs b/libs/wingc/src/visit.rs index 95bc7117385..d10447d5a65 100644 --- a/libs/wingc/src/visit.rs +++ b/libs/wingc/src/visit.rs @@ -179,6 +179,9 @@ where v.visit_expr(expr); } } + StmtKind::Throw(expr) => { + v.visit_expr(expr); + } StmtKind::Scope(scope) => { v.visit_scope(scope); } diff --git a/tools/hangar/__snapshots__/error.ts.snap b/tools/hangar/__snapshots__/error.ts.snap index 15a69c86bcd..9c56a21c136 100644 --- a/tools/hangar/__snapshots__/error.ts.snap +++ b/tools/hangar/__snapshots__/error.ts.snap @@ -214,7 +214,7 @@ exports[`utilities.w 1`] = ` super(scope, id); >> {((cond) => {if (!cond) throw new Error(\\"assertion failed: false\\")})(false)}; {console.log(\\"W\\")}; - {((msg) => {throw new Error(msg)})(\\"me\\")}; + throw new Error(\\"me\\"); diff --git a/tools/hangar/__snapshots__/invalid.ts.snap b/tools/hangar/__snapshots__/invalid.ts.snap index d53ba19c913..e8b14a2625d 100644 --- a/tools/hangar/__snapshots__/invalid.ts.snap +++ b/tools/hangar/__snapshots__/invalid.ts.snap @@ -2381,6 +2381,21 @@ error: Cannot call super method because class A has no parent +Tests 1 failed (1) +Test Files 1 failed (1) +Duration " +`; + +exports[`throw_non_string.w 1`] = ` +"error: Expected type to be \\"str\\", but got \\"num\\" instead + --> ../../../examples/tests/invalid/throw_non_string.w:1:7 + | +1 | throw 42; + | ^^ Expected type to be \\"str\\", but got \\"num\\" instead + + + + Tests 1 failed (1) Test Files 1 failed (1) Duration " diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md index 935ccb02947..1b904bda376 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md @@ -127,7 +127,7 @@ module.exports = function({ $invokeCounter, $util_Util }) { try { (await $util_Util.waitUntil(async () => { (await $invokeCounter.inc()); - {((msg) => {throw new Error(msg)})("ERROR")}; + throw new Error("ERROR"); } )); {((cond) => {if (!cond) throw new Error("assertion failed: false")})(false)}; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/debug_env.w_test_sim.md b/tools/hangar/__snapshots__/test_corpus/valid/debug_env.w_test_sim.md index 15946e9ff87..63f0d221b27 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/debug_env.w_test_sim.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/debug_env.w_test_sim.md @@ -4,7 +4,7 @@ ```log [symbol environment at ../../../../examples/tests/valid/debug_env.w:7:5] level 0: { this => A } -level 1: { A => A [type], assert => (condition: bool): void, cloud => cloud [namespace], log => (message: str): void, std => std [namespace], throw => (message: str): void } +level 1: { A => A [type], assert => (condition: bool): void, cloud => cloud [namespace], log => (message: str): void, std => std [namespace] } pass ─ debug_env.wsim (no tests) diff --git a/tools/hangar/__snapshots__/test_corpus/valid/try_catch.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/try_catch.w_compile_tf-aws.md index 7d7c371b5e0..8bb88dc8650 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/try_catch.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/try_catch.w_compile_tf-aws.md @@ -44,7 +44,7 @@ class $Root extends $stdlib.std.Resource { super(scope, id); let x = ""; try { - {((msg) => {throw new Error(msg)})("hello")}; + throw new Error("hello"); x = "no way I got here"; } catch ($error_e) { @@ -71,7 +71,7 @@ class $Root extends $stdlib.std.Resource { {((cond) => {if (!cond) throw new Error("assertion failed: x == \"finally\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(x,"finally")))}; try { try { - {((msg) => {throw new Error(msg)})("hello")}; + throw new Error("hello"); } finally { x = "finally with no catch"; @@ -93,9 +93,9 @@ class $Root extends $stdlib.std.Resource { return 1; } })()),1)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: (():num => { try {throw(\"\");} catch {return 2;}})() == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((() => { + {((cond) => {if (!cond) throw new Error("assertion failed: (():num => { try {throw \"\";} catch {return 2;}})() == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((() => { try { - {((msg) => {throw new Error(msg)})("")}; + throw new Error(""); } catch { return 2; From 915f263722a6a74e5a30be82310d3843ed203058 Mon Sep 17 00:00:00 2001 From: Chris Rybicki Date: Tue, 29 Aug 2023 22:55:25 -0400 Subject: [PATCH 21/48] chore(compiler): store paths with Utf8PathBuf (#4009) A `str` or `String` in Rust represents a sequence of Unicode characters, while a `Path` or `PathBuf` in Rust represents a sequence of any bytes that represents a path. In practice though, non-Unicode paths are vanishingly uncommon, and there isn't a strong need to support them in Wing. (https://crates.io/crates/camino has some more details) In this PR I've updated our Rust crates to use the `Utf8PathBuf` and `Utf8Path` types throughout. By doing so we're able to check that our paths are UTF-8 once, and then manipulate them as valid UTF-8 from there on, avoiding repeated lossy and confusing conversions like `path.to_str().unwrap()` and `path.display()`. ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [x] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- Cargo.lock | 8 ++ libs/wingc/Cargo.toml | 1 + libs/wingc/examples/compile.rs | 15 +-- libs/wingc/src/file_graph.rs | 149 ++++++++++--------------- libs/wingc/src/files.rs | 23 ++-- libs/wingc/src/jsify.rs | 36 +++--- libs/wingc/src/lib.rs | 67 +++++------ libs/wingc/src/lsp/completions.rs | 9 +- libs/wingc/src/lsp/document_symbols.rs | 4 +- libs/wingc/src/lsp/goto_definition.rs | 4 +- libs/wingc/src/lsp/hover.rs | 5 +- libs/wingc/src/lsp/signature.rs | 4 +- libs/wingc/src/lsp/sync.rs | 11 +- libs/wingc/src/parser.rs | 122 ++++++++++---------- libs/wingc/src/test_utils.rs | 10 +- libs/wingc/src/type_check.rs | 16 +-- libs/wingii/Cargo.toml | 1 + libs/wingii/src/lib.rs | 37 +++--- libs/wingii/src/node_resolve.rs | 24 ++-- libs/wingii/src/test.rs | 50 +++++---- libs/wingii/src/util.rs | 18 ++- 21 files changed, 290 insertions(+), 324 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 801e7812fc1..af7e617453b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -133,6 +133,12 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +[[package]] +name = "camino" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" + [[package]] name = "cc" version = "1.0.81" @@ -1667,6 +1673,7 @@ name = "wingc" version = "0.1.0" dependencies = [ "aho-corasick 0.7.20", + "camino", "colored", "const_format", "derivative", @@ -1696,6 +1703,7 @@ name = "wingii" version = "0.1.0" dependencies = [ "blake3", + "camino", "filetime", "flate2", "rand", diff --git a/libs/wingc/Cargo.toml b/libs/wingc/Cargo.toml index 5ddf2eced5a..9ef8167c491 100644 --- a/libs/wingc/Cargo.toml +++ b/libs/wingc/Cargo.toml @@ -24,6 +24,7 @@ const_format = "0.2.30" duplicate = "1.0.0" strum = { version = "0.24", features = ["derive"] } petgraph = "0.6.3" +camino = "1.1.6" [lib] crate-type = ["rlib", "cdylib"] diff --git a/libs/wingc/examples/compile.rs b/libs/wingc/examples/compile.rs index dec5d082c11..6887d3725ef 100644 --- a/libs/wingc/examples/compile.rs +++ b/libs/wingc/examples/compile.rs @@ -1,7 +1,8 @@ // Compiles a source file and prints any errors to stderr. // This should only be used for testing wingc directly. -use std::{env, fs, path::Path, process}; +use camino::{Utf8Path, Utf8PathBuf}; +use std::{env, fs, process}; use wingc::{compile, diagnostic::get_diagnostics}; pub fn main() { @@ -11,15 +12,15 @@ pub fn main() { panic!("Usage: cargo run --example compile "); } - let source_path = &args[1]; - let source_path = Path::new(source_path); - let source_text = fs::read_to_string(source_path).unwrap(); + let source_path = Utf8Path::new(&args[1]).canonicalize_utf8().unwrap(); + let source_text = fs::read_to_string(&source_path).unwrap(); + let target_dir: Utf8PathBuf = env::current_dir().unwrap().join("target").try_into().unwrap(); let results = compile( - source_path, + &source_path, source_text, - Some(env::current_dir().unwrap().join("target").as_path()), - Some(source_path.canonicalize().unwrap().parent().unwrap()), + Some(&target_dir), + Some(source_path.parent().unwrap()), ); if results.is_err() { let mut diags = get_diagnostics(); diff --git a/libs/wingc/src/file_graph.rs b/libs/wingc/src/file_graph.rs index 9fb7cd29c2a..a2836c7ea73 100644 --- a/libs/wingc/src/file_graph.rs +++ b/libs/wingc/src/file_graph.rs @@ -1,8 +1,6 @@ -use std::{ - fmt::Display, - path::{Path, PathBuf}, -}; +use std::fmt::Display; +use camino::{Utf8Path, Utf8PathBuf}; use indexmap::IndexMap; use petgraph::visit::EdgeRef; @@ -11,8 +9,8 @@ use petgraph::visit::EdgeRef; /// TODO: support removing files from the graph #[derive(Default)] pub struct FileGraph { - graph: petgraph::stable_graph::StableDiGraph, - path_to_node_index: IndexMap, + graph: petgraph::stable_graph::StableDiGraph, + path_to_node_index: IndexMap, } impl FileGraph { @@ -21,7 +19,7 @@ impl FileGraph { /// For example, if the current graph has file A depending on B, and /// `update_file(pathA, &[pathC])` was called, then this function will remove the edge /// from A to B, and add an edge from A to C. - pub fn update_file(&mut self, from_path: &Path, to_paths: &[PathBuf]) { + pub fn update_file(&mut self, from_path: &Utf8Path, to_paths: &[Utf8PathBuf]) { let from_node_index = self.get_or_insert_node_index(from_path); // remove all current outcoming edges from this node @@ -42,13 +40,13 @@ impl FileGraph { } /// Returns true if the given file is in the graph - pub fn contains_file(&mut self, path: &Path) -> bool { + pub fn contains_file(&mut self, path: &Utf8Path) -> bool { self.path_to_node_index.contains_key(path) } /// Returns a list of files in the order they should be compiled /// Or a list of files that are part of a cycle, if one exists - pub fn toposort(&self) -> Result, Vec> { + pub fn toposort(&self) -> Result, Vec> { match petgraph::algo::toposort(&self.graph, None) { Ok(indices) => Ok( indices @@ -73,7 +71,7 @@ impl FileGraph { } } - fn get_or_insert_node_index(&mut self, path: &Path) -> petgraph::graph::NodeIndex { + fn get_or_insert_node_index(&mut self, path: &Utf8Path) -> petgraph::graph::NodeIndex { if let Some(node_index) = self.path_to_node_index.get(path) { return *node_index; } @@ -88,10 +86,10 @@ impl Display for FileGraph { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { for node_index in self.graph.node_indices() { let node = &self.graph[node_index]; - write!(f, "{{{} -> [", node.display())?; + write!(f, "{{{} -> [", node)?; for edge in self.graph.edges(node_index) { let target = &self.graph[edge.target()]; - write!(f, "{} ", target.display())?; + write!(f, "{} ", target)?; } writeln!(f, "]}}")?; } @@ -107,139 +105,110 @@ mod tests { fn toposort_simple() { // graph with two nodes, A and B, where A depends on B let mut graph = FileGraph::default(); - graph.update_file(Path::new("a"), &[PathBuf::from("b")]); - graph.update_file(Path::new("b"), &[]); - assert_eq!(graph.toposort().unwrap(), vec![PathBuf::from("b"), PathBuf::from("a")]); + graph.update_file("a".into(), &["b".into()]); + graph.update_file("b".into(), &[]); + assert_eq!(graph.toposort().unwrap(), make_paths(&["b", "a"])); } #[test] fn toposort_complex() { // graph with 5 nodes, A, B, C, D, and E, where A depends on B and C, B depends on C and D, C depends on D, and D depends on E let mut graph = FileGraph::default(); - graph.update_file(Path::new("a"), &[PathBuf::from("b"), PathBuf::from("c")]); - graph.update_file(Path::new("b"), &[PathBuf::from("c"), PathBuf::from("d")]); - graph.update_file(Path::new("c"), &[PathBuf::from("d")]); - graph.update_file(Path::new("d"), &[PathBuf::from("e")]); - graph.update_file(Path::new("e"), &[]); - assert_eq!( - graph.toposort().unwrap(), - vec![ - PathBuf::from("e"), - PathBuf::from("d"), - PathBuf::from("c"), - PathBuf::from("b"), - PathBuf::from("a") - ] - ); + graph.update_file("a".into(), &["b".into(), "c".into()]); + graph.update_file("b".into(), &["c".into(), "d".into()]); + graph.update_file("c".into(), &["d".into()]); + graph.update_file("d".into(), &["e".into()]); + graph.update_file("e".into(), &[]); + assert_eq!(graph.toposort().unwrap(), make_paths(&["e", "d", "c", "b", "a"])); // create the same graph in a different order as a sanity check let mut graph = FileGraph::default(); - graph.update_file(Path::new("e"), &[]); - graph.update_file(Path::new("d"), &[PathBuf::from("e")]); - graph.update_file(Path::new("c"), &[PathBuf::from("d")]); - graph.update_file(Path::new("b"), &[PathBuf::from("c"), PathBuf::from("d")]); - graph.update_file(Path::new("a"), &[PathBuf::from("b"), PathBuf::from("c")]); - assert_eq!( - graph.toposort().unwrap(), - vec![ - PathBuf::from("e"), - PathBuf::from("d"), - PathBuf::from("c"), - PathBuf::from("b"), - PathBuf::from("a") - ] - ); + graph.update_file("e".into(), &[]); + graph.update_file("d".into(), &["e".into()]); + graph.update_file("c".into(), &["d".into()]); + graph.update_file("b".into(), &["c".into(), "d".into()]); + graph.update_file("a".into(), &["b".into(), "c".into()]); + assert_eq!(graph.toposort().unwrap(), make_paths(&["e", "d", "c", "b", "a"])); } #[test] fn toposort_cycle() { // graph with 3 nodes, A, B, and C, where A depends on B, B depends on C, and C depends on A let mut graph = FileGraph::default(); - graph.update_file(Path::new("a"), &[PathBuf::from("b")]); - graph.update_file(Path::new("b"), &[PathBuf::from("c")]); - graph.update_file(Path::new("c"), &[PathBuf::from("a")]); + graph.update_file("a".into(), &["b".into()]); + graph.update_file("b".into(), &["c".into()]); + graph.update_file("c".into(), &["a".into()]); let mut err = graph.toposort().unwrap_err(); err.sort(); - assert_eq!(err, vec![PathBuf::from("a"), PathBuf::from("b"), PathBuf::from("c")]); + assert_eq!(err, make_paths(&["a", "b", "c"])); } #[test] fn toposort_two_cycles_with_shared_node() { // graph where A is part of two cycles, {A,B,C} and {A,X,Y} let mut graph = FileGraph::default(); - graph.update_file(Path::new("a"), &[PathBuf::from("b"), PathBuf::from("x")]); - graph.update_file(Path::new("b"), &[PathBuf::from("c")]); - graph.update_file(Path::new("c"), &[PathBuf::from("a")]); - graph.update_file(Path::new("x"), &[PathBuf::from("y")]); - graph.update_file(Path::new("y"), &[PathBuf::from("a")]); + graph.update_file("a".into(), &["b".into(), "x".into()]); + graph.update_file("b".into(), &["c".into()]); + graph.update_file("c".into(), &["a".into()]); + graph.update_file("x".into(), &["y".into()]); + graph.update_file("y".into(), &["a".into()]); let mut err = graph.toposort().unwrap_err(); err.sort(); - assert_eq!( - err, - vec![ - PathBuf::from("a"), - PathBuf::from("b"), - PathBuf::from("c"), - PathBuf::from("x"), - PathBuf::from("y") - ] - ); + assert_eq!(err, make_paths(&["a", "b", "c", "x", "y"])); } #[test] fn toposort_two_distinct_cycles() { // graph with six nodes, where {A,B,C} form a cycle and {D,E,F} form a cycle let mut graph = FileGraph::default(); - graph.update_file(Path::new("a"), &[PathBuf::from("b")]); - graph.update_file(Path::new("b"), &[PathBuf::from("c")]); - graph.update_file(Path::new("c"), &[PathBuf::from("a")]); - graph.update_file(Path::new("d"), &[PathBuf::from("e")]); - graph.update_file(Path::new("e"), &[PathBuf::from("f")]); - graph.update_file(Path::new("f"), &[PathBuf::from("d")]); + graph.update_file("a".into(), &["b".into()]); + graph.update_file("b".into(), &["c".into()]); + graph.update_file("c".into(), &["a".into()]); + graph.update_file("d".into(), &["e".into()]); + graph.update_file("e".into(), &["f".into()]); + graph.update_file("f".into(), &["d".into()]); let mut err = graph.toposort().unwrap_err(); err.sort(); // note: if we returned the cycle {D,E,F} that would also be valid - assert_eq!(err, vec![PathBuf::from("a"), PathBuf::from("b"), PathBuf::from("c"),]); + assert_eq!(err, make_paths(&["a", "b", "c"])); } #[test] fn toposort_cycle_and_unrelated_component() { // graph with 5 nodes, where A depends on B, and {C,D,E} form a cycle let mut graph = FileGraph::default(); - graph.update_file(Path::new("a"), &[PathBuf::from("b")]); - graph.update_file(Path::new("b"), &[]); - graph.update_file(Path::new("c"), &[PathBuf::from("d")]); - graph.update_file(Path::new("d"), &[PathBuf::from("e")]); - graph.update_file(Path::new("e"), &[PathBuf::from("c")]); + graph.update_file("a".into(), &["b".into()]); + graph.update_file("b".into(), &[]); + graph.update_file("c".into(), &["d".into()]); + graph.update_file("d".into(), &["e".into()]); + graph.update_file("e".into(), &["c".into()]); // we don't care about where the cycle starts, so we sort the list let mut err = graph.toposort().unwrap_err(); err.sort(); - assert_eq!(err, vec![PathBuf::from("c"), PathBuf::from("d"), PathBuf::from("e")]); + assert_eq!(err, make_paths(&["c", "d", "e"])); } #[test] fn toposort_update_edges() { // graph with 3 nodes, A, B, and C, where A depends on B and C, and B depends on C let mut graph = FileGraph::default(); - graph.update_file(Path::new("a"), &[PathBuf::from("b"), PathBuf::from("c")]); - graph.update_file(Path::new("b"), &[PathBuf::from("c")]); - graph.update_file(Path::new("c"), &[]); - assert_eq!( - graph.toposort().unwrap(), - vec![PathBuf::from("c"), PathBuf::from("b"), PathBuf::from("a")] - ); + graph.update_file("a".into(), &["b".into(), "c".into()]); + graph.update_file("b".into(), &["c".into()]); + graph.update_file("c".into(), &[]); + assert_eq!(graph.toposort().unwrap(), ["c", "b", "a"]); // update the edges so that A depends on C and B depends on A - graph.update_file(Path::new("a"), &[PathBuf::from("c")]); - graph.update_file(Path::new("b"), &[PathBuf::from("a")]); - assert_eq!( - graph.toposort().unwrap(), - vec![PathBuf::from("c"), PathBuf::from("a"), PathBuf::from("b")] - ); + graph.update_file("a".into(), &["c".into()]); + graph.update_file("b".into(), &["a".into()]); + assert_eq!(graph.toposort().unwrap(), make_paths(&["c", "a", "b"])); + } + + fn make_paths(paths: &[&str]) -> Vec { + paths.iter().map(|p| p.into()).collect::>() } } diff --git a/libs/wingc/src/files.rs b/libs/wingc/src/files.rs index ce1a4f55ab4..8b4877d8fc9 100644 --- a/libs/wingc/src/files.rs +++ b/libs/wingc/src/files.rs @@ -4,21 +4,22 @@ use std::{ fmt::{self, Display}, fs::{self, File}, io::Write, - path::{Path, PathBuf}, }; +use camino::{Utf8Path, Utf8PathBuf}; + use crate::diagnostic::Diagnostic; #[derive(Debug)] pub enum FilesError { - DuplicateFile(PathBuf), + DuplicateFile(Utf8PathBuf), IoError(std::io::Error), } impl Display for FilesError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { - FilesError::DuplicateFile(path) => write!(f, "Cannot add two files with the same name: {}", path.display()), + FilesError::DuplicateFile(path) => write!(f, "Cannot add two files with the same name: {}", path), FilesError::IoError(err) => write!(f, "I/O error: {}", err), } } @@ -37,7 +38,7 @@ impl Error for FilesError {} #[derive(Default)] pub struct Files { - data: HashMap, + data: HashMap, } impl Files { @@ -46,7 +47,7 @@ impl Files { } /// Add a file, returning an error if a file with the same name already exists. - pub fn add_file>(&mut self, path: S, content: String) -> Result<(), FilesError> { + pub fn add_file>(&mut self, path: S, content: String) -> Result<(), FilesError> { let path = path.into(); if self.data.contains_key(&path) { return Err(FilesError::DuplicateFile(path)); @@ -56,23 +57,23 @@ impl Files { } /// Update a file, overwriting the previous contents if it already exists. - pub fn update_file>(&mut self, path: S, content: String) { + pub fn update_file>(&mut self, path: S, content: String) { let path = path.into(); self.data.insert(path, content); } /// Get a file's contents, if it exists. - pub fn get_file>(&self, path: S) -> Option<&String> { + pub fn get_file>(&self, path: S) -> Option<&String> { self.data.get(path.as_ref()) } /// Check if a file exists. - pub fn contains_file>(&self, path: S) -> bool { + pub fn contains_file>(&self, path: S) -> bool { self.data.contains_key(path.as_ref()) } /// Write all files to the given directory. - pub fn emit_files(&self, out_dir: &Path) -> Result<(), FilesError> { + pub fn emit_files(&self, out_dir: &Utf8Path) -> Result<(), FilesError> { for (path, content) in &self.data { let full_path = out_dir.join(path); @@ -119,7 +120,7 @@ mod tests { #[test] fn test_emit_files() { let temp_dir = tempfile::tempdir().expect("Failed to create temporary directory"); - let out_dir = temp_dir.path(); + let out_dir = Utf8Path::from_path(temp_dir.path()).expect("invalid unicode path"); let mut files = Files::new(); files @@ -146,7 +147,7 @@ mod tests { #[test] fn test_emit_files_creates_intermediate_directories() { let temp_dir = tempfile::tempdir().expect("Failed to create temporary directory"); - let out_dir = temp_dir.path(); + let out_dir = Utf8Path::from_path(temp_dir.path()).expect("invalid unicode path"); let mut files = Files::new(); files diff --git a/libs/wingc/src/jsify.rs b/libs/wingc/src/jsify.rs index 47484c042ce..7960c542648 100644 --- a/libs/wingc/src/jsify.rs +++ b/libs/wingc/src/jsify.rs @@ -1,17 +1,12 @@ pub mod codemaker; mod tests; use aho_corasick::AhoCorasick; +use camino::{Utf8Path, Utf8PathBuf}; use const_format::formatcp; use indexmap::{IndexMap, IndexSet}; use itertools::Itertools; -use std::{ - borrow::Borrow, - cell::RefCell, - cmp::Ordering, - path::{Path, PathBuf}, - vec, -}; +use std::{borrow::Borrow, cell::RefCell, cmp::Ordering, vec}; use crate::{ ast::{ @@ -68,12 +63,12 @@ pub struct JSifier<'a> { /// Map from source file paths to the JS file names they are emitted to. /// e.g. "bucket.w" -> "preflight.bucket-1.js" - preflight_file_map: RefCell>, + preflight_file_map: RefCell>, source_files: &'a Files, /// Root of the project, used for resolving extern modules - absolute_project_root: &'a Path, + absolute_project_root: &'a Utf8Path, /// The entrypoint file of the Wing application. - entrypoint_file_path: &'a Path, + entrypoint_file_path: &'a Utf8Path, } /// Preflight classes have two types of host binding methods: @@ -88,8 +83,8 @@ impl<'a> JSifier<'a> { pub fn new( types: &'a mut Types, source_files: &'a Files, - entrypoint_file_path: &'a Path, - absolute_project_root: &'a Path, + entrypoint_file_path: &'a Utf8Path, + absolute_project_root: &'a Utf8Path, ) -> Self { let output_files = Files::default(); Self { @@ -105,7 +100,7 @@ impl<'a> JSifier<'a> { } } - pub fn jsify(&mut self, source_path: &Path, scope: &Scope) { + pub fn jsify(&mut self, source_path: &Utf8Path, scope: &Scope) { CompilationContext::set(CompilationPhase::Jsifying, &scope.span); let mut js = CodeMaker::default(); let mut imports = CodeMaker::default(); @@ -170,7 +165,7 @@ impl<'a> JSifier<'a> { output.add_code(root_class); output.line("const $App = $stdlib.core.App.for(process.env.WING_TARGET);".to_string()); - let app_name = self.entrypoint_file_path.file_stem().unwrap().to_string_lossy(); + let app_name = self.entrypoint_file_path.file_stem().unwrap(); output.line(format!( "new $App({{ outdir: {}, name: \"{}\", rootConstruct: {}, plugins: {}, isTestEnvironment: {}, entrypointDir: process.env['WING_SOURCE_DIR'], rootId: process.env['WING_ROOT_ID'] }}).synth();", OUTDIR_VAR, app_name, ROOT_CLASS, PLUGINS_VAR, ENV_WING_IS_TEST @@ -193,7 +188,6 @@ impl<'a> JSifier<'a> { let sanitized_name = source_path .file_stem() .unwrap() - .to_string_lossy() .chars() .filter(|c| c.is_alphanumeric()) .collect::(); @@ -869,7 +863,7 @@ impl<'a> JSifier<'a> { )), BringSource::WingFile(name) => { let preflight_file_map = self.preflight_file_map.borrow(); - let preflight_file_name = preflight_file_map.get(Path::new(&name.name)).unwrap(); + let preflight_file_name = preflight_file_map.get(Utf8Path::new(&name.name)).unwrap(); CodeMaker::one_line(format!( "const {} = require(\"./{}\")({{ {} }});", // checked during type checking @@ -1166,15 +1160,11 @@ impl<'a> JSifier<'a> { FunctionBody::External(external_spec) => { debug!( "Resolving extern \"{}\" from \"{}\"", - external_spec, - self.absolute_project_root.display() + external_spec, self.absolute_project_root ); let resolved_path = - match wingii::node_resolve::resolve_from(&external_spec, Path::new(&self.absolute_project_root)) { - Ok(resolved_path) => resolved_path - .to_str() - .expect("Converting extern path to string") - .replace("\\", "/"), + match wingii::node_resolve::resolve_from(&external_spec, Utf8Path::new(&self.absolute_project_root)) { + Ok(resolved_path) => resolved_path.to_string().replace("\\", "/"), Err(err) => { report_diagnostic(Diagnostic { message: format!("Failed to resolve extern \"{external_spec}\": {err}"), diff --git a/libs/wingc/src/lib.rs b/libs/wingc/src/lib.rs index bef628d1306..5846a13f48c 100644 --- a/libs/wingc/src/lib.rs +++ b/libs/wingc/src/lib.rs @@ -8,6 +8,7 @@ extern crate lazy_static; use ast::{Scope, Symbol, UtilityFunctions}; +use camino::{Utf8Path, Utf8PathBuf}; use closure_transform::ClosureTransformer; use comp_ctx::set_custom_panic_hook; use diagnostic::{found_errors, report_diagnostic, Diagnostic}; @@ -30,7 +31,6 @@ use wingii::type_system::TypeSystem; use crate::docs::Docs; use std::alloc::{alloc, dealloc, Layout}; -use std::path::{Path, PathBuf}; use std::{fs, mem}; use crate::ast::Phase; @@ -150,13 +150,13 @@ pub unsafe extern "C" fn wingc_compile(ptr: u32, len: u32) -> u64 { let args = ptr_to_string(ptr, len); let split = args.split(";").collect::>(); - let source_file = Path::new(split[0]); - let output_dir = split.get(1).map(|s| Path::new(s)); - let absolute_project_dir = split.get(2).map(|s| Path::new(s)); + let source_file = Utf8Path::new(split[0]); + let output_dir = split.get(1).map(|s| Utf8Path::new(s)); + let absolute_project_dir = split.get(2).map(|s| Utf8Path::new(s)); if !source_file.exists() { report_diagnostic(Diagnostic { - message: format!("Source file cannot be found: {}", source_file.display()), + message: format!("Source file cannot be found: {}", source_file), span: None, }); return WASM_RETURN_ERROR; @@ -164,10 +164,7 @@ pub unsafe extern "C" fn wingc_compile(ptr: u32, len: u32) -> u64 { if source_file.is_dir() { report_diagnostic(Diagnostic { - message: format!( - "Source path must be a file (not a directory): {}", - source_file.display() - ), + message: format!("Source path must be a file (not a directory): {}", source_file), span: None, }); return WASM_RETURN_ERROR; @@ -177,7 +174,7 @@ pub unsafe extern "C" fn wingc_compile(ptr: u32, len: u32) -> u64 { Ok(text) => text, Err(e) => { report_diagnostic(Diagnostic { - message: format!("Could not read file \"{}\": {}", source_file.display(), e), + message: format!("Could not read file \"{}\": {}", source_file, e), span: None, }); return WASM_RETURN_ERROR; @@ -195,7 +192,7 @@ pub unsafe extern "C" fn wingc_compile(ptr: u32, len: u32) -> u64 { pub fn type_check( scope: &mut Scope, types: &mut Types, - file_path: &Path, + file_path: &Utf8Path, jsii_types: &mut TypeSystem, jsii_imports: &mut Vec, ) { @@ -270,13 +267,13 @@ fn add_builtin(name: &str, typ: Type, scope: &mut Scope, types: &mut Types) { } pub fn compile( - source_path: &Path, + source_path: &Utf8Path, source_text: String, - out_dir: Option<&Path>, - absolute_project_root: Option<&Path>, + out_dir: Option<&Utf8Path>, + absolute_project_root: Option<&Utf8Path>, ) -> Result { - let file_name = source_path.file_name().unwrap().to_str().unwrap(); - let default_out_dir = PathBuf::from(format!("{}.out", file_name)); + let file_name = source_path.file_name().unwrap(); + let default_out_dir = Utf8PathBuf::from(format!("{}.out", file_name)); let out_dir = out_dir.unwrap_or(default_out_dir.as_ref()); // -- PARSING PHASE -- @@ -303,7 +300,7 @@ pub fn compile( let scope = inflight_transformer.fold_scope(scope); (path, scope) }) - .collect::>(); + .collect::>(); // -- TYPECHECKING PHASE -- @@ -336,7 +333,7 @@ pub fn compile( // Verify that the project dir is absolute if !is_project_dir_absolute(&project_dir) { report_diagnostic(Diagnostic { - message: format!("Project directory must be absolute: {}", project_dir.display()), + message: format!("Project directory must be absolute: {}", project_dir), span: None, }); return Err(()); @@ -353,7 +350,7 @@ pub fn compile( lift.visit_scope(&scope); (path, scope) }) - .collect::>(); + .collect::>(); // bail out now (before jsification) if there are errors (no point in jsifying) if found_errors() { @@ -380,15 +377,15 @@ pub fn compile( return Ok(CompilerOutput {}); } -fn is_project_dir_absolute(project_dir: &PathBuf) -> bool { +fn is_project_dir_absolute(project_dir: &Utf8PathBuf) -> bool { if project_dir.starts_with("/") { return true; } - let dir_str = project_dir.to_str().expect("Project dir is valid UTF-8"); + let project_dir = project_dir.as_str(); // Check if this is a Windows path instead by checking if the second char is a colon - // Note: Cannot use Path::is_absolute() because it doesn't work with Windows paths on WASI - if dir_str.len() < 2 || dir_str.chars().nth(1).expect("Project dir has second character") != ':' { + // Note: Cannot use Utf8Path::is_absolute() because it doesn't work with Windows paths on WASI + if project_dir.len() < 2 || project_dir.chars().nth(1).expect("Project dir has second character") != ':' { return false; } @@ -397,31 +394,27 @@ fn is_project_dir_absolute(project_dir: &PathBuf) -> bool { #[cfg(test)] mod sanity { + use camino::Utf8PathBuf; + use crate::{compile, diagnostic::assert_no_panics}; - use std::{ - fs, - path::{Path, PathBuf}, - }; + use std::{fs, path::Path}; - fn get_wing_files

(dir: P) -> impl Iterator + fn get_wing_files

(dir: P) -> impl Iterator where P: AsRef, { fs::read_dir(dir) .unwrap() - .map(|entry| entry.unwrap().path()) + .map(|entry| Utf8PathBuf::from_path_buf(entry.unwrap().path()).expect("invalid unicode path")) .filter(|path| path.is_file() && path.extension().map(|ext| ext == "w").unwrap_or(false)) } fn compile_test(test_dir: &str, expect_failure: bool) { for test_file in get_wing_files(test_dir) { - println!("\n=== {} ===\n", test_file.display()); + println!("\n=== {} ===\n", test_file); let mut out_dir = test_file.parent().unwrap().to_path_buf(); - out_dir.push(format!( - "target/wingc/{}.out", - test_file.file_name().unwrap().to_str().unwrap() - )); + out_dir.push(format!("target/wingc/{}.out", test_file.file_name().unwrap())); // reset out_dir if out_dir.exists() { @@ -434,14 +427,14 @@ mod sanity { &test_file, test_text, Some(&out_dir), - Some(test_file.canonicalize().unwrap().parent().unwrap()), + Some(test_file.canonicalize_utf8().unwrap().parent().unwrap()), ); if result.is_err() { assert!( expect_failure, "{}: Expected compilation success, but failed: {:#?}", - test_file.display(), + test_file, result.err().unwrap() ); @@ -451,7 +444,7 @@ mod sanity { assert!( !expect_failure, "{}: Expected compilation failure, but succeeded", - test_file.display() + test_file, ); } } diff --git a/libs/wingc/src/lsp/completions.rs b/libs/wingc/src/lsp/completions.rs index 4b86d819fdd..e0e79ab8154 100644 --- a/libs/wingc/src/lsp/completions.rs +++ b/libs/wingc/src/lsp/completions.rs @@ -22,6 +22,8 @@ use crate::visit::{visit_expr, visit_type_annotation, Visit}; use crate::wasm_util::{ptr_to_string, string_to_combined_ptr, WASM_RETURN_ERROR}; use crate::{WINGSDK_ASSEMBLY_NAME, WINGSDK_STD_MODULE}; +use super::sync::check_utf8; + #[no_mangle] pub unsafe extern "C" fn wingc_on_completion(ptr: u32, len: u32) -> u64 { let parse_string = ptr_to_string(ptr, len); @@ -42,8 +44,7 @@ pub fn on_completion(params: lsp_types::CompletionParams) -> CompletionResponse let mut final_completions = PROJECT_DATA.with(|project_data| { let project_data = project_data.borrow(); let uri = params.text_document_position.text_document.uri; - let file = uri.to_file_path().ok().expect("LSP only works on real filesystems"); - let file_id = file.to_str().expect("File path must be valid utf8"); + let file = check_utf8(uri.to_file_path().expect("LSP only works on real filesystems")); let root_ts_node = project_data.trees.get(&file).expect("tree not found").root_node(); let root_scope = project_data.asts.get(&file).expect("ast not found"); let root_env = types.get_scope_env(root_scope); @@ -89,12 +90,12 @@ pub fn on_completion(params: lsp_types::CompletionParams) -> CompletionResponse node_to_complete.parent().map(|parent| WingSpan { start: parent.start_position().into(), end: parent.end_position().into(), - file_id: file_id.to_string(), + file_id: file.to_string(), }), WingSpan { start: node_to_complete.start_position().into(), end: node_to_complete.end_position().into(), - file_id: file_id.to_string(), + file_id: file.to_string(), }, params.text_document_position.position.into(), &root_scope, diff --git a/libs/wingc/src/lsp/document_symbols.rs b/libs/wingc/src/lsp/document_symbols.rs index db15ef00772..1564c57d9f4 100644 --- a/libs/wingc/src/lsp/document_symbols.rs +++ b/libs/wingc/src/lsp/document_symbols.rs @@ -5,6 +5,8 @@ use crate::visit::Visit; use crate::wasm_util::{ptr_to_string, string_to_combined_ptr, WASM_RETURN_ERROR}; use lsp_types::{DocumentSymbol, SymbolKind}; +use super::sync::check_utf8; + pub struct DocumentSymbolVisitor { pub document_symbols: Vec, } @@ -93,7 +95,7 @@ pub fn on_document_symbols(params: lsp_types::DocumentSymbolParams) -> Vec u64 { let parse_string = ptr_to_string(ptr, len); @@ -19,7 +21,7 @@ pub fn on_goto_definition(params: lsp_types::GotoDefinitionParams) -> Vec { position: Position, @@ -435,8 +435,7 @@ pub fn on_hover(params: lsp_types::HoverParams) -> Option { PROJECT_DATA.with(|project_data| { let project_data = project_data.borrow(); let uri = params.text_document_position_params.text_document.uri.clone(); - let file = uri.to_file_path().ok().expect("LSP only works on real filesystems"); - + let file = check_utf8(uri.to_file_path().expect("LSP only works on real filesystems")); let root_scope = &project_data.asts.get(&file).unwrap(); let mut hover_visitor = HoverVisitor::new(params.text_document_position_params.position, &root_scope, &types); diff --git a/libs/wingc/src/lsp/signature.rs b/libs/wingc/src/lsp/signature.rs index 22ee19e6656..c174c00ea25 100644 --- a/libs/wingc/src/lsp/signature.rs +++ b/libs/wingc/src/lsp/signature.rs @@ -14,6 +14,8 @@ use crate::type_check::{resolve_super_method, resolve_user_defined_type, Types, use crate::visit::{visit_expr, visit_scope, Visit}; use crate::wasm_util::{ptr_to_string, string_to_combined_ptr, WASM_RETURN_ERROR}; +use super::sync::check_utf8; + #[no_mangle] pub unsafe extern "C" fn wingc_on_signature_help(ptr: u32, len: u32) -> u64 { let parse_string = ptr_to_string(ptr, len); @@ -34,7 +36,7 @@ pub fn on_signature_help(params: lsp_types::SignatureHelpParams) -> Option, + pub trees: IndexMap, /// AST for each file - pub asts: IndexMap, + pub asts: IndexMap, /// The JSII imports for the file. This is saved so we can load JSII types (for autocompletion for example) /// which don't exist explicitly in the source. pub jsii_imports: Vec, @@ -134,6 +135,8 @@ fn partial_compile( // Reset diagnostics before new compilation (`partial_compile` can be called multiple times) reset_diagnostics(); + let source_path = Utf8Path::from_path(source_path).expect("invalid unicide path"); + let topo_sorted_files = parse_wing_project( &source_path, source_text, @@ -191,6 +194,10 @@ fn partial_compile( // no need to JSify in the LSP } +pub fn check_utf8(path: PathBuf) -> Utf8PathBuf { + path.try_into().expect("invalid unicode path") +} + #[cfg(test)] pub mod test_utils { use std::{fs, str::FromStr}; diff --git a/libs/wingc/src/parser.rs b/libs/wingc/src/parser.rs index 79735ead4e8..10b34e97274 100644 --- a/libs/wingc/src/parser.rs +++ b/libs/wingc/src/parser.rs @@ -1,8 +1,8 @@ +use camino::{Utf8Component, Utf8Path, Utf8PathBuf}; use indexmap::{IndexMap, IndexSet}; use phf::{phf_map, phf_set}; use std::cell::RefCell; use std::collections::HashSet; -use std::path::{Component as PathComponent, Path, PathBuf}; use std::{fs, str, vec}; use tree_sitter::Node; use tree_sitter_traversal::{traverse, Order}; @@ -144,13 +144,13 @@ static RESERVED_WORDS: phf::Set<&'static str> = phf_set! { /// Returns a topological ordering of all known Wing files, where each file only depends on /// files that come before it in the ordering. pub fn parse_wing_project( - init_path: &Path, + init_path: &Utf8Path, init_text: String, files: &mut Files, file_graph: &mut FileGraph, - tree_sitter_trees: &mut IndexMap, - asts: &mut IndexMap, -) -> Vec { + tree_sitter_trees: &mut IndexMap, + asts: &mut IndexMap, +) -> Vec { // Parse the initial file (even if we have already seen it before) let (tree_sitter_tree, ast, dependent_wing_files) = parse_wing_file(init_path, &init_text); @@ -203,15 +203,12 @@ pub fn parse_wing_project( match file_graph.toposort() { Ok(files) => files, Err(cycle) => { - let formatted_cycle = cycle - .iter() - .map(|path| format!("- {}\n", path.to_str().unwrap())) - .collect::(); + let formatted_cycle = cycle.iter().map(|path| format!("- {}\n", path)).collect::(); report_diagnostic(Diagnostic { message: format!( "Could not compile \"{}\" due to cyclic bring statements:\n{}", - init_path.display(), + init_path, formatted_cycle.trim_end() ), span: None, @@ -223,7 +220,7 @@ pub fn parse_wing_project( } } -fn parse_wing_file(source_path: &Path, source_text: &str) -> (tree_sitter::Tree, Scope, Vec) { +fn parse_wing_file(source_path: &Utf8Path, source_text: &str) -> (tree_sitter::Tree, Scope, Vec) { let language = tree_sitter_wing::language(); let mut tree_sitter_parser = tree_sitter::Parser::new(); tree_sitter_parser.set_language(language).unwrap(); @@ -231,13 +228,13 @@ fn parse_wing_file(source_path: &Path, source_text: &str) -> (tree_sitter::Tree, let tree_sitter_tree = match tree_sitter_parser.parse(&source_text.as_bytes(), None) { Some(tree) => tree, None => { - panic!("Error parsing source file with tree-sitter: {}", source_path.display()); + panic!("Error parsing source file with tree-sitter: {}", source_path); } }; let tree_sitter_root = tree_sitter_tree.root_node(); - let parser = Parser::new(&source_text.as_bytes(), source_path.to_string_lossy().to_string()); + let parser = Parser::new(&source_text.as_bytes(), source_path.to_string()); let (scope, dependent_wing_files) = parser.parse(&tree_sitter_root); (tree_sitter_tree, scope, dependent_wing_files) } @@ -254,7 +251,7 @@ pub struct Parser<'a> { is_in_loop: RefCell, /// Track all file paths that have been found while parsing the current file /// These will need to be eventually parsed (or diagnostics will be reported if they don't exist) - referenced_wing_files: RefCell>, + referenced_wing_files: RefCell>, } impl<'s> Parser<'s> { @@ -274,7 +271,7 @@ impl<'s> Parser<'s> { } } - pub fn parse(self, root: &Node) -> (Scope, Vec) { + pub fn parse(self, root: &Node) -> (Scope, Vec) { let scope = match root.kind() { "source" => self.build_scope(&root, Phase::Preflight), _ => Scope::empty(), @@ -416,7 +413,7 @@ impl<'s> Parser<'s> { WingSpan { start: node_range.start_point.into(), end: node_range.end_point.into(), - file_id: self.source_name.to_string(), + file_id: self.source_name.clone(), } } @@ -713,20 +710,17 @@ impl<'s> Parser<'s> { // if the module name is a path ending in .w, create a new Parser to parse it as a new Scope, // and create a StmtKind::Module instead if module_name.name.starts_with("\"") && module_name.name.ends_with(".w\"") { - let module_path = Path::new(&module_name.name[1..module_name.name.len() - 1]); - let source_path = normalize_path(module_path, Some(&Path::new(&self.source_name))); - if source_path == Path::new(&self.source_name) { + let module_path = Utf8Path::new(&module_name.name[1..module_name.name.len() - 1]); + let source_path = normalize_path(module_path, Some(&Utf8Path::new(&self.source_name))); + if source_path == Utf8Path::new(&self.source_name) { return self.with_error("Cannot bring a module into itself", statement_node); } if !source_path.exists() { - return self.with_error( - format!("Cannot find module \"{}\"", source_path.display()), - statement_node, - ); + return self.with_error(format!("Cannot find module \"{}\"", source_path), statement_node); } if !source_path.is_file() { return self.with_error( - format!("Cannot bring module \"{}\": not a file", source_path.display()), + format!("Cannot bring module \"{}\": not a file", source_path), statement_node, ); } @@ -736,7 +730,7 @@ impl<'s> Parser<'s> { let module = if let Some(alias) = alias { Ok(StmtKind::Bring { source: BringSource::WingFile(Symbol { - name: source_path.to_string_lossy().to_string(), + name: source_path.to_string(), span: module_name.span, }), identifier: Some(alias), @@ -2114,13 +2108,13 @@ impl<'s> Parser<'s> { // TODO: this function seems fragile // use inodes as source of truth instead https://github.com/winglang/wing/issues/3627 -pub fn normalize_path(path: &Path, relative_to: Option<&Path>) -> PathBuf { +pub fn normalize_path(path: &Utf8Path, relative_to: Option<&Utf8Path>) -> Utf8PathBuf { let path = if path.is_absolute() { // if the path is absolute, we ignore "relative_to" path.to_path_buf() } else { relative_to - .map(|p| p.parent().unwrap_or_else(|| Path::new(".")).join(path)) + .map(|p| p.parent().unwrap_or_else(|| Utf8Path::new(".")).join(path)) .unwrap_or_else(|| path.to_path_buf()) }; @@ -2128,29 +2122,29 @@ pub fn normalize_path(path: &Path, relative_to: Option<&Path>) -> PathBuf { // This is tricky because ".." usually means we pop the last component // but if a path starts with ".." or looks like "a/../../b" we need to track // how many components we've popped and add them later. - let mut normalized = PathBuf::new(); - let mut extra_pops = PathBuf::new(); + let mut normalized = Utf8PathBuf::new(); + let mut extra_pops = Utf8PathBuf::new(); for part in path.components() { match part { - PathComponent::Prefix(ref prefix) => { - normalized.push(prefix.as_os_str()); + Utf8Component::Prefix(ref prefix) => { + normalized.push(prefix.as_str()); } - PathComponent::RootDir => { + Utf8Component::RootDir => { normalized.push("/"); } - PathComponent::ParentDir => { + Utf8Component::ParentDir => { let popped = normalized.pop(); if !popped { extra_pops.push(".."); } } - PathComponent::CurDir => { + Utf8Component::CurDir => { // Nothing } - PathComponent::Normal(name) => { + Utf8Component::Normal(name) => { if extra_pops.components().next().is_some() { normalized = extra_pops; - extra_pops = PathBuf::new(); + extra_pops = Utf8PathBuf::new(); normalized.push(name); } else { normalized.push(name); @@ -2168,57 +2162,57 @@ mod tests { #[test] fn normalize_path_relative_to_nothing() { - let file_path = Path::new("/a/b/c/d/e.f"); + let file_path = Utf8Path::new("/a/b/c/d/e.f"); assert_eq!(normalize_path(file_path, None), file_path); - let file_path = Path::new("/a/b/./c/../d/e.f"); - assert_eq!(normalize_path(file_path, None), Path::new("/a/b/d/e.f")); + let file_path = Utf8Path::new("/a/b/./c/../d/e.f"); + assert_eq!(normalize_path(file_path, None), Utf8Path::new("/a/b/d/e.f")); - let file_path = Path::new("a/b/c/d/e.f"); - assert_eq!(normalize_path(file_path, None), Path::new("a/b/c/d/e.f")); + let file_path = Utf8Path::new("a/b/c/d/e.f"); + assert_eq!(normalize_path(file_path, None), Utf8Path::new("a/b/c/d/e.f")); - let file_path = Path::new("a/b/./c/../d/e.f"); - assert_eq!(normalize_path(file_path, None), Path::new("a/b/d/e.f")); + let file_path = Utf8Path::new("a/b/./c/../d/e.f"); + assert_eq!(normalize_path(file_path, None), Utf8Path::new("a/b/d/e.f")); - let file_path = Path::new("a/../e.f"); - assert_eq!(normalize_path(file_path, None), Path::new("e.f")); + let file_path = Utf8Path::new("a/../e.f"); + assert_eq!(normalize_path(file_path, None), Utf8Path::new("e.f")); - let file_path = Path::new("a/../../../e.f"); - assert_eq!(normalize_path(file_path, None), Path::new("../../e.f")); + let file_path = Utf8Path::new("a/../../../e.f"); + assert_eq!(normalize_path(file_path, None), Utf8Path::new("../../e.f")); - let file_path = Path::new("./e.f"); - assert_eq!(normalize_path(file_path, None), Path::new("e.f")); + let file_path = Utf8Path::new("./e.f"); + assert_eq!(normalize_path(file_path, None), Utf8Path::new("e.f")); - let file_path = Path::new("../e.f"); - assert_eq!(normalize_path(file_path, None), Path::new("../e.f")); + let file_path = Utf8Path::new("../e.f"); + assert_eq!(normalize_path(file_path, None), Utf8Path::new("../e.f")); - let file_path = Path::new("../foo/.././e.f"); - assert_eq!(normalize_path(file_path, None), Path::new("../e.f")); + let file_path = Utf8Path::new("../foo/.././e.f"); + assert_eq!(normalize_path(file_path, None), Utf8Path::new("../e.f")); } #[test] fn normalize_path_relative_to_something() { // If the path is absolute, we ignore "relative_to" - let file_path = Path::new("/a/b/c/d/e.f"); - let relative_to = Path::new("/g/h/i"); + let file_path = Utf8Path::new("/a/b/c/d/e.f"); + let relative_to = Utf8Path::new("/g/h/i"); assert_eq!(normalize_path(file_path, Some(relative_to)), file_path); - let file_path = Path::new("a/b/c/d/e.f"); - let relative_to = Path::new("/g/h/i"); + let file_path = Utf8Path::new("a/b/c/d/e.f"); + let relative_to = Utf8Path::new("/g/h/i"); assert_eq!( normalize_path(file_path, Some(relative_to)), - Path::new("/g/h/a/b/c/d/e.f") + Utf8Path::new("/g/h/a/b/c/d/e.f") ); - let file_path = Path::new("a/b/c/d/e.f"); - let relative_to = Path::new("g/h/i"); + let file_path = Utf8Path::new("a/b/c/d/e.f"); + let relative_to = Utf8Path::new("g/h/i"); assert_eq!( normalize_path(file_path, Some(relative_to)), - Path::new("g/h/a/b/c/d/e.f") + Utf8Path::new("g/h/a/b/c/d/e.f") ); - let file_path = Path::new("../foo.w"); - let relative_to = Path::new("subdir/bar.w"); - assert_eq!(normalize_path(file_path, Some(relative_to)), Path::new("foo.w")); + let file_path = Utf8Path::new("../foo.w"); + let relative_to = Utf8Path::new("subdir/bar.w"); + assert_eq!(normalize_path(file_path, Some(relative_to)), Utf8Path::new("foo.w")); } } diff --git a/libs/wingc/src/test_utils.rs b/libs/wingc/src/test_utils.rs index 54e6aaeff49..92868446e80 100644 --- a/libs/wingc/src/test_utils.rs +++ b/libs/wingc/src/test_utils.rs @@ -1,7 +1,8 @@ -use itertools::Itertools; use std::env; use std::fs::read_dir; -use std::path::Path; + +use camino::Utf8Path; +use itertools::Itertools; use tempfile; use crate::{ @@ -51,8 +52,9 @@ pub fn compile_fail(code: &str) -> String { /// Compiles `code` and returns the capture scanner results as a string that can be snapshotted fn compile_code(code: &str) -> String { let outdir = tempfile::tempdir().unwrap(); + let outdir_path = Utf8Path::from_path(outdir.path()).unwrap(); - let source_path = Path::new("main.w"); + let source_path = Utf8Path::new("main.w"); // NOTE: this is needed for debugging to work regardless of where you run the test env::set_current_dir(env!("CARGO_MANIFEST_DIR")).unwrap(); @@ -60,7 +62,7 @@ fn compile_code(code: &str) -> String { // convert tabs to 2 spaces let code = code.replace("\t", " "); - let result = compile(source_path, code.clone(), Some(outdir.path()), Some(outdir.path())); + let result = compile(source_path, code.clone(), Some(outdir_path), Some(outdir_path)); let mut snap = vec![]; diff --git a/libs/wingc/src/type_check.rs b/libs/wingc/src/type_check.rs index bd6e792c9b7..e5a31414d8d 100644 --- a/libs/wingc/src/type_check.rs +++ b/libs/wingc/src/type_check.rs @@ -19,6 +19,7 @@ use crate::{ WINGSDK_MAP, WINGSDK_MUT_ARRAY, WINGSDK_MUT_JSON, WINGSDK_MUT_MAP, WINGSDK_MUT_SET, WINGSDK_RESOURCE, WINGSDK_SET, WINGSDK_STD_MODULE, WINGSDK_STRING, WINGSDK_STRUCT, }; +use camino::{Utf8Path, Utf8PathBuf}; use derivative::Derivative; use duplicate::duplicate_item; use indexmap::{IndexMap, IndexSet}; @@ -28,7 +29,6 @@ use jsii_importer::JsiiImporter; use std::collections::HashMap; use std::fmt::{Debug, Display}; use std::iter::FilterMap; -use std::path::{Path, PathBuf}; use symbol_env::{StatementIdx, SymbolEnv}; use wingii::fqn::FQN; use wingii::type_system::TypeSystem; @@ -1234,7 +1234,7 @@ pub struct Types { namespaces: Vec>, symbol_envs: Vec>, /// A map from source file name to the symbol environment for that file (and whether that file is safe to bring) - source_file_envs: IndexMap, + source_file_envs: IndexMap, pub libraries: SymbolEnv, numeric_idx: usize, string_idx: usize, @@ -1595,7 +1595,7 @@ pub struct TypeChecker<'a> { inner_scopes: Vec<*const Scope>, /// The path to the source file being type checked. - source_path: &'a Path, + source_path: &'a Utf8Path, /// JSII Manifest descriptions to be imported. /// May be reused between compilations @@ -1616,7 +1616,7 @@ pub struct TypeChecker<'a> { impl<'a> TypeChecker<'a> { pub fn new( types: &'a mut Types, - source_path: &'a Path, + source_path: &'a Utf8Path, jsii_types: &'a mut TypeSystem, jsii_imports: &'a mut Vec, ) -> Self { @@ -2770,7 +2770,7 @@ impl<'a> TypeChecker<'a> { first_expected_type } - pub fn type_check_file(&mut self, source_path: &Path, scope: &Scope) { + pub fn type_check_file(&mut self, source_path: &Utf8Path, scope: &Scope) { CompilationContext::set(CompilationPhase::TypeChecking, &scope.span); self.type_check_scope(scope); @@ -3178,7 +3178,7 @@ impl<'a> TypeChecker<'a> { alias = identifier.as_ref().unwrap(); } BringSource::WingFile(name) => { - let (brought_env, is_bringable) = match self.types.source_file_envs.get(Path::new(&name.name)) { + let (brought_env, is_bringable) = match self.types.source_file_envs.get(Utf8Path::new(&name.name)) { Some((env, is_bringable)) => (*env, *is_bringable), None => { self.spanned_error( @@ -3999,7 +3999,7 @@ impl<'a> TypeChecker<'a> { let assembly_name = if library_name == WINGSDK_ASSEMBLY_NAME { // in runtime, if "WINGSDK_MANIFEST_ROOT" env var is set, read it. otherwise set to "../wingsdk" for dev let manifest_root = std::env::var("WINGSDK_MANIFEST_ROOT").unwrap_or_else(|_| "../wingsdk".to_string()); - let assembly_name = match self.jsii_types.load_module(manifest_root.as_str()) { + let assembly_name = match self.jsii_types.load_module(&Utf8Path::new(&manifest_root)) { Ok(name) => name, Err(type_error) => { self.spanned_error( @@ -4015,7 +4015,7 @@ impl<'a> TypeChecker<'a> { assembly_name } else { - let source_dir = self.source_path.parent().unwrap().to_str().unwrap(); + let source_dir = self.source_path.parent().unwrap(); let assembly_name = match self.jsii_types.load_dep(library_name.as_str(), source_dir) { Ok(name) => name, Err(type_error) => { diff --git a/libs/wingii/Cargo.toml b/libs/wingii/Cargo.toml index 5e6090c48c1..afac2f4c645 100644 --- a/libs/wingii/Cargo.toml +++ b/libs/wingii/Cargo.toml @@ -11,6 +11,7 @@ serde_json = "1.0" flate2 = "1.0.25" blake3 = "1.4.1" speedy = "0.8.6" +camino = "1.1.6" [dev-dependencies] rand = "0.8.5" diff --git a/libs/wingii/src/lib.rs b/libs/wingii/src/lib.rs index 000a8d1deb2..c96e40ab6dc 100644 --- a/libs/wingii/src/lib.rs +++ b/libs/wingii/src/lib.rs @@ -21,25 +21,24 @@ mod util; pub type Result = std::result::Result>; pub mod spec { + use camino::{Utf8Path, Utf8PathBuf}; use flate2::read::GzDecoder; use speedy::{Readable, Writable}; + use std::fs; use std::io::Read; - use std::path::PathBuf; use std::time::SystemTime; use crate::jsii::{Assembly, JsiiFile}; use crate::Result; - use std::fs; - use std::path::Path; pub const SPEC_FILE_NAME: &str = ".jsii"; pub const REDIRECT_FIELD: &str = "jsii/file-redirect"; pub(crate) const CACHE_FILE_EXT: &str = ".jsii.speedy"; - pub fn find_assembly_file(directory: &str) -> Result { - let dot_jsii_file = Path::new(directory).join(SPEC_FILE_NAME); + pub fn find_assembly_file(directory: &Utf8Path) -> Result { + let dot_jsii_file = Utf8Path::new(directory).join(SPEC_FILE_NAME); if dot_jsii_file.exists() { - Ok(dot_jsii_file.to_str().unwrap().to_string()) + Ok(dot_jsii_file) } else { Err( format!( @@ -51,7 +50,7 @@ pub mod spec { } } - pub(crate) fn get_cache_file_path(manifest_path: &Path, hash: &str) -> PathBuf { + pub(crate) fn get_cache_file_path(manifest_path: &Utf8Path, hash: &str) -> Utf8PathBuf { manifest_path .parent() .unwrap() @@ -59,7 +58,7 @@ pub mod spec { .join(format!("{hash}{CACHE_FILE_EXT}")) } - pub(crate) fn try_load_from_cache(manifest_path: &Path, hash: &str) -> Option { + pub(crate) fn try_load_from_cache(manifest_path: &Utf8Path, hash: &str) -> Option { let path = get_cache_file_path(manifest_path, hash); let data = fs::read(path).ok()?; let asm = Assembly::read_from_buffer(&data).ok()?; @@ -68,12 +67,10 @@ pub mod spec { pub fn load_assembly_from_file( name: &str, - path_to_file: &str, + assembly_path: &Utf8Path, compression: Option<&str>, module_version: &Option, ) -> Result { - let assembly_path = Path::new(path_to_file); - // First try loading the manifest from the cache let fingerprint = get_manifest_fingerprint(name, assembly_path, module_version); let maybe_manifest = fingerprint @@ -111,19 +108,14 @@ pub mod spec { .parent() .expect("Assembly path has no parent") .join(&asm_redirect.filename); - load_assembly_from_file( - name, - path.to_str().expect("JSII redirect path invalid"), - Some(&asm_redirect.compression), - module_version, - ) + load_assembly_from_file(name, &path, Some(&asm_redirect.compression), module_version) } } } pub(crate) fn get_manifest_fingerprint( name: &str, - assembly_path: &Path, + assembly_path: &Utf8Path, module_version: &Option, ) -> Option { let module_version = module_version.as_ref()?; @@ -142,7 +134,7 @@ pub mod spec { Some(blake3::hash(&fp_raw_str.as_bytes()).to_string()) } - fn cache_manifest(manifest_path: &Path, manifest: &Assembly, hash: &str) -> Result<()> { + fn cache_manifest(manifest_path: &Utf8Path, manifest: &Assembly, hash: &str) -> Result<()> { let cache_file_dir = manifest_path.parent().unwrap().to_path_buf(); let cache_file_name = format!("{hash}{CACHE_FILE_EXT}"); @@ -169,6 +161,7 @@ pub mod spec { pub mod type_system { type AssemblyName = String; + use camino::Utf8Path; use serde_json::Value; use crate::fqn::FQN; @@ -240,7 +233,7 @@ pub mod type_system { Ok(name) } - pub fn load_dep(&mut self, dep: &str, search_start: &str) -> Result { + pub fn load_dep(&mut self, dep: &str, search_start: &Utf8Path) -> Result { let module_dir = package_json::find_dependency_directory(dep, search_start).ok_or(format!( "Unable to load \"{}\": Module not found in \"{}\"", dep, search_start @@ -248,8 +241,8 @@ pub mod type_system { self.load_module(&module_dir) } - pub fn load_module(&mut self, module_directory: &str) -> Result { - let file_path = std::path::Path::new(module_directory).join("package.json"); + pub fn load_module(&mut self, module_directory: &Utf8Path) -> Result { + let file_path = Utf8Path::new(module_directory).join("package.json"); let package_json = std::fs::read_to_string(file_path)?; let package: serde_json::Value = serde_json::from_str(&package_json)?; let _ = package diff --git a/libs/wingii/src/node_resolve.rs b/libs/wingii/src/node_resolve.rs index 48c3ff3815d..e63067c751e 100644 --- a/libs/wingii/src/node_resolve.rs +++ b/libs/wingii/src/node_resolve.rs @@ -6,9 +6,9 @@ use std::{ error::Error, fs::{self}, - path::{Path, PathBuf}, }; +use camino::{Utf8Path, Utf8PathBuf}; use serde_json::Value; static ROOT: &str = "/"; @@ -52,17 +52,17 @@ static NODE_BUILTINS: [&str; 33] = [ /// Resolve a node.js module path relative to `basedir`. /// Returns the path to the module, or an error. -pub fn resolve_from(target: &str, basedir: &Path) -> Result> { +pub fn resolve_from(target: &str, basedir: &Utf8Path) -> Result> { // 1. If X is a core module if is_core_module(target) { // 1.a. Return the core module - return Ok(PathBuf::from(target)); + return Ok(Utf8PathBuf::from(target)); } // 2. If X begins with '/' - let basedir: &Path = if target.starts_with('/') { + let basedir: &Utf8Path = if target.starts_with('/') { // 2.a. Set Y to be the filesystem root - Path::new(ROOT) + Utf8Path::new(ROOT) } else { basedir }; @@ -78,7 +78,7 @@ pub fn resolve_from(target: &str, basedir: &Path) -> Result Result> { +fn resolve_as_file(path: &Utf8Path) -> Result> { // 1. If X is a file, load X as JavaScript text. if path.is_file() { return Ok(path.to_path_buf()); @@ -88,7 +88,7 @@ fn resolve_as_file(path: &Path) -> Result> { // 2. If X.json is a file, parse X.json to a JavaScript object. // 3. If X.node is a file, load X.node as binary addon. let mut ext_path = path.to_path_buf(); - if let Some(file_name) = ext_path.file_name().and_then(|name| name.to_str()).map(String::from) { + if let Some(file_name) = ext_path.file_name().map(String::from) { for ext in NODE_EXTENSIONS { ext_path.set_file_name(format!("{}{}", file_name, ext)); if ext_path.is_file() { @@ -101,7 +101,7 @@ fn resolve_as_file(path: &Path) -> Result> { } /// Resolve by walking up node_modules folders. -fn resolve_node_modules(target: &str, basedir: &Path) -> Result> { +fn resolve_node_modules(target: &str, basedir: &Utf8Path) -> Result> { let node_modules = basedir.join("node_modules"); if node_modules.is_dir() { let path = node_modules.join(target); @@ -119,7 +119,7 @@ fn resolve_node_modules(target: &str, basedir: &Path) -> Result Result> { +fn resolve_as_directory(path: &Utf8Path) -> Result> { if !path.is_dir() { return Err(String::from("Not Found").into()); } @@ -138,8 +138,8 @@ fn resolve_as_directory(path: &Path) -> Result> { } /// Resolve using the package.json "main" key. -fn resolve_package_main(pkg_path: &Path) -> Result> { - let pkg_dir = pkg_path.parent().unwrap_or_else(|| Path::new(ROOT)); +fn resolve_package_main(pkg_path: &Utf8Path) -> Result> { + let pkg_dir = pkg_path.parent().unwrap_or_else(|| Utf8Path::new(ROOT)); let pkg: Value = serde_json::from_slice(&fs::read(pkg_path)?)?; if !pkg.is_object() { return Err(String::from("package.json is not an object").into()); @@ -159,7 +159,7 @@ fn resolve_package_main(pkg_path: &Path) -> Result> { } /// Resolve a directory to its index.EXT. -fn resolve_index(path: &Path) -> Result> { +fn resolve_index(path: &Utf8Path) -> Result> { // 1. If X/index.js is a file, load X/index.js as JavaScript text. // 2. If X/index.json is a file, parse X/index.json to a JavaScript object. // 3. If X/index.node is a file, load X/index.node as binary addon. diff --git a/libs/wingii/src/test.rs b/libs/wingii/src/test.rs index c1529feff29..7de32972082 100644 --- a/libs/wingii/src/test.rs +++ b/libs/wingii/src/test.rs @@ -1,10 +1,12 @@ use super::*; -use rand::Rng; -use serde_json::json; + use std::env; use std::fs; use std::fs::File; -use std::path::PathBuf; + +use camino::Utf8PathBuf; +use rand::Rng; +use serde_json::json; #[cfg(test)] mod tests { @@ -35,7 +37,7 @@ mod tests { #[test] fn can_load_assembly_from_single_file() { let (name, assembly_path) = create_temp_assembly(); - let assembly = spec::load_assembly_from_file(&name, assembly_path.to_str().unwrap(), None, &None).unwrap(); + let assembly = spec::load_assembly_from_file(&name, &assembly_path, None, &None).unwrap(); assert_eq!(assembly.name, "jsii-test-dep"); remove_temp_assembly(assembly_path); } @@ -44,7 +46,7 @@ mod tests { fn can_load_assembly_from_single_file_compressed() { let (name, assembly_path) = create_temp_gz_assembly(); - let assembly = spec::load_assembly_from_file(&name, assembly_path.to_str().unwrap(), Some("gzip"), &None).unwrap(); + let assembly = spec::load_assembly_from_file(&name, &assembly_path, Some("gzip"), &None).unwrap(); assert_eq!(assembly.name, "jsii-test-dep"); remove_temp_assembly(assembly_path); } @@ -53,7 +55,7 @@ mod tests { fn can_load_assembly_from_redirect_manifest() { let (name, assembly_path) = create_temp_redirect_assembly(); - let assembly = spec::load_assembly_from_file(&name, assembly_path.to_str().unwrap(), None, &None).unwrap(); + let assembly = spec::load_assembly_from_file(&name, &assembly_path, None, &None).unwrap(); assert_eq!(assembly.name, "jsii-test-dep"); remove_temp_assembly(assembly_path); } @@ -65,7 +67,7 @@ mod tests { // Load the assembly and verify a cache file was created let dummy_version = Some("1.2.3".to_string()); - let assembly = spec::load_assembly_from_file(&name, assembly_path.to_str().unwrap(), None, &dummy_version).unwrap(); + let assembly = spec::load_assembly_from_file(&name, &assembly_path, None, &dummy_version).unwrap(); let fingerprint = spec::get_manifest_fingerprint(&name, &assembly_path, &dummy_version).unwrap(); let cached_assembly = spec::try_load_from_cache(&assembly_path, &fingerprint).unwrap(); assert_eq!(assembly, cached_assembly); @@ -77,7 +79,7 @@ mod tests { // Wait a bit and load the assembly again std::thread::sleep(std::time::Duration::from_millis(2)); - _ = spec::load_assembly_from_file(&name, assembly_path.to_str().unwrap(), None, &dummy_version).unwrap(); + _ = spec::load_assembly_from_file(&name, &assembly_path, None, &dummy_version).unwrap(); // Verify there's only a single cache file in the directory let cache_files = fs::read_dir(assembly_path.parent().unwrap()) @@ -96,7 +98,7 @@ mod tests { std::thread::sleep(std::time::Duration::from_millis(2)); filetime::set_file_mtime(&assembly_path, filetime::FileTime::now()).unwrap(); - _ = spec::load_assembly_from_file(&name, assembly_path.to_str().unwrap(), None, &dummy_version).unwrap(); + _ = spec::load_assembly_from_file(&name, &assembly_path, None, &dummy_version).unwrap(); // Verify there's still only a single cache file in the directory but it has a different timestamp let cache_files = fs::read_dir(assembly_path.parent().unwrap()) @@ -127,7 +129,7 @@ mod tests { // Load the assembly and verify a cache file was created let dummy_version = Some("1.2.3".to_string()); - let assembly = spec::load_assembly_from_file(&name, assembly_path.to_str().unwrap(), None, &dummy_version).unwrap(); + let assembly = spec::load_assembly_from_file(&name, &assembly_path, None, &dummy_version).unwrap(); let fingerprint = spec::get_manifest_fingerprint(&name, &target_assembly_path, &dummy_version).unwrap(); let cached_assembly = spec::try_load_from_cache(&target_assembly_path, &fingerprint).unwrap(); assert_eq!(assembly, cached_assembly); @@ -135,7 +137,7 @@ mod tests { remove_temp_assembly(assembly_path); } - fn create_temp_gz_assembly() -> (String, PathBuf) { + fn create_temp_gz_assembly() -> (String, Utf8PathBuf) { let (name, assembly_path_pre) = create_temp_assembly(); // gzip the file @@ -149,11 +151,11 @@ mod tests { (name, assembly_path) } - fn create_temp_redirect_assembly() -> (String, PathBuf) { + fn create_temp_redirect_assembly() -> (String, Utf8PathBuf) { // Create the actual gzipped assembly let (name, assembly_path) = create_temp_gz_assembly(); // Create the redirect manifest - let target_file = assembly_path.file_name().unwrap().to_str().unwrap(); + let target_file = assembly_path.file_name().unwrap(); let redirect_assembly = json!({ "schema": "jsii/file-redirect", "compression": "gzip", @@ -168,7 +170,7 @@ mod tests { #[test] fn can_load_assembly_from_file() { let (name, assembly_path) = create_temp_assembly(); - let assembly = spec::load_assembly_from_file(&name, &assembly_path.to_str().unwrap(), None, &None).unwrap(); + let assembly = spec::load_assembly_from_file(&name, &assembly_path, None, &None).unwrap(); assert_eq!(assembly.name, "jsii-test-dep"); remove_temp_assembly(assembly_path); } @@ -176,11 +178,11 @@ mod tests { #[test] fn can_load_constructs_assembly_with_type_system() { let mut type_system = TypeSystem::new(); - let fixture_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")) + let fixture_path = Utf8PathBuf::from(env!("CARGO_MANIFEST_DIR")) .join("src") .join("fixtures") .join("constructs"); - let name = type_system.load_module(fixture_path.to_str().unwrap()).unwrap(); + let name = type_system.load_module(&fixture_path).unwrap(); assert_eq!(name, "constructs"); let assembly = type_system.find_assembly(&name).unwrap(); assert_eq!(assembly.name, "constructs"); @@ -189,11 +191,11 @@ mod tests { #[test] fn can_query_basic_types() { let mut type_system = TypeSystem::new(); - let fixture_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")) + let fixture_path = Utf8PathBuf::from(env!("CARGO_MANIFEST_DIR")) .join("src") .join("fixtures") .join("constructs"); - let name = type_system.load_module(fixture_path.to_str().unwrap()).unwrap(); + let name = type_system.load_module(&fixture_path).unwrap(); assert_eq!(name, "constructs"); // find class with fqn "constructs.Construct" let construct = type_system.find_class(&FQN::from("constructs.Construct")).unwrap(); @@ -210,13 +212,13 @@ mod tests { } } -fn create_temp_assembly() -> (String, PathBuf) { +fn create_temp_assembly() -> (String, Utf8PathBuf) { let temp_dir = env::temp_dir(); - let mut temp_assembly_dir = temp_dir.clone(); + let mut temp_dir = Utf8PathBuf::from_path_buf(temp_dir).expect("invalid unicode path"); let mut rng = rand::thread_rng(); - temp_assembly_dir.push(format!("ass-{}", rng.gen::())); - fs::create_dir(&temp_assembly_dir).unwrap(); - let assembly_path = temp_assembly_dir.join(spec::SPEC_FILE_NAME); + temp_dir.push(format!("ass-{}", rng.gen::())); + fs::create_dir(&temp_dir).unwrap(); + let assembly_path = temp_dir.join(spec::SPEC_FILE_NAME); let name = "jsii-test-dep".to_string(); let assembly = json!({ "schema": "jsii/0.10.0", @@ -243,6 +245,6 @@ fn create_temp_assembly() -> (String, PathBuf) { (name, assembly_path) } -fn remove_temp_assembly(assembly_path: PathBuf) { +fn remove_temp_assembly(assembly_path: Utf8PathBuf) { fs::remove_dir_all(assembly_path.parent().unwrap()).unwrap(); } diff --git a/libs/wingii/src/util.rs b/libs/wingii/src/util.rs index fc4b5153873..3061b117904 100644 --- a/libs/wingii/src/util.rs +++ b/libs/wingii/src/util.rs @@ -2,11 +2,9 @@ extern crate serde; extern crate serde_json; pub mod package_json { - use std::{ - collections::HashSet, - fs, - path::{Path, PathBuf}, - }; + use std::{collections::HashSet, fs}; + + use camino::{Utf8Path, Utf8PathBuf}; use crate::node_resolve::{is_path_dependency, resolve_from}; @@ -46,7 +44,7 @@ pub mod package_json { deps } - pub fn find_up(mut directory: PathBuf, predicate: impl Fn(&PathBuf) -> bool) -> Option { + pub fn find_up(mut directory: Utf8PathBuf, predicate: impl Fn(&Utf8PathBuf) -> bool) -> Option { loop { if predicate(&directory) { return Some(directory); @@ -60,7 +58,7 @@ pub mod package_json { } } - pub fn find_package_json_up(package_name: &str, directory: PathBuf) -> Option { + pub fn find_package_json_up(package_name: &str, directory: Utf8PathBuf) -> Option { find_up(directory, |dir| { let package_json = dir.join("package.json"); if package_json.exists() { @@ -76,13 +74,13 @@ pub mod package_json { }) } - pub fn find_dependency_directory(dependency_name: &str, search_start: &str) -> Option { - let entrypoint = resolve_from(dependency_name, Path::new(search_start)); + pub fn find_dependency_directory(dependency_name: &str, search_start: &Utf8Path) -> Option { + let entrypoint = resolve_from(dependency_name, search_start); let entrypoint = entrypoint.ok()?; let dep_pkg_json_path = find_package_json_up(dependency_name, entrypoint); let dep_pkg_json_path = dep_pkg_json_path?; if dep_pkg_json_path.exists() { - Some(dep_pkg_json_path.to_str().unwrap().to_string()) + Some(dep_pkg_json_path) } else { None } From 27aa72506dedb2f2cd09c553ccd712397e1b6f6c Mon Sep 17 00:00:00 2001 From: eladcon Date: Wed, 30 Aug 2023 16:45:01 +0300 Subject: [PATCH 22/48] chore(console): console preview environment (#3891) Builds the console (`@wingconsole/app`) and deploys it to fly.io on every pr (if its not from a fork). ## Checklist - [X] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [X] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .github/workflows/build.yml | 49 +++++++++++++++++++ .github/workflows/delete-console-preview.yml | 28 +++++++++++ .../console/app/preview/Dockerfile | 11 +++++ .../wing-console/console/app/preview/fly.toml | 25 ++++++++++ .../console/app/preview/index.mjs | 7 +++ apps/wing-console/console/app/web/index.tsx | 4 +- 6 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/delete-console-preview.yml create mode 100644 apps/wing-console/console/app/preview/Dockerfile create mode 100644 apps/wing-console/console/app/preview/fly.toml create mode 100644 apps/wing-console/console/app/preview/index.mjs diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e44d5542c31..89055ff5823 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -278,6 +278,55 @@ jobs: name: ${{ steps.diff.outputs.diff_name }} path: ${{ steps.diff.outputs.diff_name }} + console-preview: + name: "Console Preview" + runs-on: ubuntu-latest + needs: + - build + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} + FLY_VERSION: "0.1.80" + APP_NAME: wing-console-pr-${{github.event.number}} + if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && !startsWith(github.head_ref, 'mergify/merge-queue/') }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 1 + + - name: Download Dist Artifacts + uses: actions/download-artifact@v3 + with: + name: dist + path: dist + + - name: Install flyctl + uses: superfly/flyctl-actions/setup-flyctl@1.4 + with: + version: ${{env.FLY_VERSION}} + + - name: Deploy to Fly.io + id: deploy-fly + run: | + if ! flyctl status --app "$APP_NAME"; then + pushd ./apps/wing-console/console/app/preview + flyctl launch --no-deploy --copy-config --name "$APP_NAME" --image-label latest + popd + fi + flyctl deploy . --config ./apps/wing-console/console/app/preview/fly.toml --app "$APP_NAME" --image-label latest --vm-memory 512 --strategy immediate + flyctl scale count 1 --yes --app "$APP_NAME" + echo "deploytime=$(TZ=UTC date +'%Y-%m-%d %H:%M')" >> $GITHUB_OUTPUT + + - name: Post preview comment + uses: thollander/actions-comment-pull-request@v2 + with: + message: | + Console preview environment is available at https://${{env.APP_NAME}}.fly.dev :rocket: + + *Updated (UTC): ${{steps.deploy-fly.outputs.deploytime }}* + comment_tag: Console preview environment + GITHUB_TOKEN: ${{secrets.PROJEN_GITHUB_TOKEN}} + quality-gate: name: Quality Gate runs-on: ubuntu-latest diff --git a/.github/workflows/delete-console-preview.yml b/.github/workflows/delete-console-preview.yml new file mode 100644 index 00000000000..6e21b6d6d1c --- /dev/null +++ b/.github/workflows/delete-console-preview.yml @@ -0,0 +1,28 @@ +name: Delete Console Preview + +on: + pull_request: + types: + - closed + +env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} + FLY_VERSION: "0.1.80" + APP_NAME: wing-console-pr-${{github.event.number}} + +jobs: + destroy: + name: "Destroy" + runs-on: ubuntu-latest + if: ${{ github.event.pull_request.head.repo.full_name == github.repository && !startsWith(github.head_ref, 'mergify/merge-queue/') }} + steps: + - name: Install flyctl + uses: superfly/flyctl-actions/setup-flyctl@1.4 + with: + version: ${{env.FLY_VERSION}} + + - name: Delete preview environment + run: | + if flyctl status --app "$APP_NAME"; then + flyctl apps destroy "$APP_NAME" -y + fi diff --git a/apps/wing-console/console/app/preview/Dockerfile b/apps/wing-console/console/app/preview/Dockerfile new file mode 100644 index 00000000000..ddd95c512a1 --- /dev/null +++ b/apps/wing-console/console/app/preview/Dockerfile @@ -0,0 +1,11 @@ +FROM node:18.16.0-alpine + +WORKDIR /app + +COPY dist dist +COPY apps/wing-console/console/app/preview/index.mjs dist/ +COPY apps/wing-console/console/app/demo demo + +RUN npm init -y && npm install --no-package-lock ./dist/*-[0-9]*.[0-9]*.[0-9]*.tgz + +ENTRYPOINT ["node", "dist/index.mjs"] diff --git a/apps/wing-console/console/app/preview/fly.toml b/apps/wing-console/console/app/preview/fly.toml new file mode 100644 index 00000000000..22195ea18cc --- /dev/null +++ b/apps/wing-console/console/app/preview/fly.toml @@ -0,0 +1,25 @@ +primary_region = "lhr" + +[build] + dockerfile = "Dockerfile" + ignorefile = ".dockerignore" + +[[services]] + protocol = "tcp" + internal_port = 3000 + auto_stop_machines = false + auto_start_machines = false + min_machines_running = 1 + + [services.concurrency] + hard_limit = 250 + soft_limit = 200 + type = "connections" + + [[services.ports]] + port = 80 + handlers = ["http"] + + [[services.ports]] + port = 443 + handlers = ["tls", "http"] diff --git a/apps/wing-console/console/app/preview/index.mjs b/apps/wing-console/console/app/preview/index.mjs new file mode 100644 index 00000000000..daa95a0b8c1 --- /dev/null +++ b/apps/wing-console/console/app/preview/index.mjs @@ -0,0 +1,7 @@ +import { fileURLToPath } from "node:url"; +import { createConsoleApp } from "@wingconsole/app"; + +await createConsoleApp({ + wingfile: fileURLToPath(new URL("../demo/index.w", import.meta.url)), + requestedPort: 3000, +}); diff --git a/apps/wing-console/console/app/web/index.tsx b/apps/wing-console/console/app/web/index.tsx index 37cd6e0f0af..3786d2399e3 100644 --- a/apps/wing-console/console/app/web/index.tsx +++ b/apps/wing-console/console/app/web/index.tsx @@ -8,7 +8,9 @@ ReactDOM.createRoot(document.querySelector("#root")!).render( Date: Wed, 30 Aug 2023 10:30:25 -0400 Subject: [PATCH 23/48] chore(repo): skip hangar when not needed (#3791) ### Goal Skip e2e tests when the changes in the PR don't effect it. Notably, this usually means unit tests, README, or anything in the console. "changes" here means one of 2 things: - **If non-pr:** Last successful build workflow on the same branch - **If pr:** git diff of the PR compared to the base, ignoring any commits from upstream This high-level logic is the same that we've been using to determine whether or not we deploy the vscode extension, so this extends it to the e2e and benchmarking tests as well. Unfortunately turbo itself was not sufficient for this goal (see note at the top of `tools/bump-pack/src/turbo-diff.ts`), so I had to write some junk to properly determine "what changed". I swear I've had to write something like this like 9 times already at various points in my life. #### Limitations The "Last successful build workflow on the same branch" does not apply to PRs, even though I wish it did. Implementing this safely is more difficult than it seems. ### The future of bump-pack Part of the this PR is also effectively turning "bump-pack" into a general-purpose toolkit. In a followup PR I plan to simply turn the entire package into a full CLI to serve misc repo development purposes. My hope is that this will make it easier to actually add testing to it with a fixture based on https://github.com/kiegroup/mock-github and https://github.com/kiegroup/act-js ### Misc - Added a script for the git patching stuff, didn't like so much repetitious bash in the workflow - ~Effectively forked `nrwl/nx-set-shas` since it was not sufficient for the workflow I wanted here (It always assumed you wanted to compare against `main` in a PR)~ Nevermind, it turns out that the original action is actually good enough *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .github/workflows/build.yml | 53 +++---- apps/vscode-wing/turbo.json | 4 +- libs/wingc/turbo.json | 5 +- package.json | 3 - pnpm-lock.yaml | 49 ++++-- scripts/create_patch.sh | 31 ++++ scripts/docsite.sh | 3 +- tools/bump-pack/bin/bump-pack.cjs | 2 +- tools/bump-pack/bin/turbo-diff.cjs | 10 ++ tools/bump-pack/package.json | 5 +- tools/bump-pack/src/{cli.ts => bump-pack.ts} | 0 tools/bump-pack/src/bundle-link.ts | 2 - tools/bump-pack/src/turbo-diff.ts | 152 +++++++++++++++++++ turbo.json | 10 +- 14 files changed, 269 insertions(+), 60 deletions(-) create mode 100755 scripts/create_patch.sh create mode 100755 tools/bump-pack/bin/turbo-diff.cjs rename tools/bump-pack/src/{cli.ts => bump-pack.ts} (100%) create mode 100644 tools/bump-pack/src/turbo-diff.ts diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 89055ff5823..7bda633d3a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,8 +35,9 @@ jobs: version: ${{ fromJson(steps.changelog.outputs.data).newVersion }} last-version: ${{ fromJson(steps.changelog.outputs.data).lastVersion }} changelog: ${{ fromJson(steps.changelog.outputs.data).changelog }} - vscode-wing-changed: ${{ steps.git-diff-vscode-wing.outputs.diff }} - + vscode-wing-changed: ${{ fromJson(steps.turbo-diff.outputs.data)['vscode-wing#compile'].changes }} + e2e-changed: ${{ fromJson(steps.turbo-diff.outputs.data)['hangar#test'].changes }} + bench-changed: ${{ fromJson(steps.turbo-diff.outputs.data)['hangar#bench'].changes }} steps: - name: Checkout uses: actions/checkout@v3 @@ -72,30 +73,25 @@ jobs: - name: Install Dependencies run: pnpm install --frozen-lockfile + - name: Derive appropriate SHAs for base and head + id: shas + uses: nrwl/nx-set-shas@v3 + + - name: Figure out what projects changed + id: turbo-diff + run: pnpm turbo-diff --startRef ${{ steps.shas.outputs.base }} --endRef ${{ steps.shas.outputs.head }} + - name: Changelog Generation id: changelog env: GENERATE_VERSION: ${{ github.event_name != 'push' || github.repository != 'winglang/wing' }} - run: pnpm changelog + run: pnpm bump-pack - name: Build and Package run: pnpm package:ci env: SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }} - - name: Derive appropriate SHAs for base and head - id: setSHAs - uses: nrwl/nx-set-shas@v3 - - - name: Check git diff of VSCode Extension - id: git-diff-vscode-wing - run: | - if git diff --quiet ${{ steps.setSHAs.outputs.base }} ${{ github.sha }} -- apps/vscode-wing; then - echo "diff=false" >> "$GITHUB_OUTPUT" - else - echo "diff=true" >> "$GITHUB_OUTPUT" - fi - - name: Upload Artifacts uses: actions/upload-artifact@v3 with: @@ -145,14 +141,7 @@ jobs: - name: Create git patch id: diff - run: | - git add --all - git diff --staged --binary --patch > build.diff - if [ -s build.diff ]; then - echo "Diff found, creating a patch to apply later" - cat build.diff - echo "diff=true" >> $GITHUB_OUTPUT - fi + run: scripts/create_patch.sh build.diff - name: Upload patch if: steps.diff.outputs.diff == 'true' @@ -163,6 +152,7 @@ jobs: benchmark: name: Benchmark + if: needs.build.outputs.bench-changed == 'true' || contains(github.event.pull_request.labels.*.name, '🧪 pr/e2e-full') runs-on: ubuntu-latest needs: - build @@ -208,6 +198,7 @@ jobs: runs-on: "${{ matrix.runner }}-latest" needs: - build + if: needs.build.outputs.e2e-changed == 'true' || contains(github.event.pull_request.labels.*.name, '🧪 pr/e2e-full') strategy: fail-fast: true matrix: @@ -263,13 +254,7 @@ jobs: RAW_SHARD: ${{ matrix.shard }} run: | SHARD=$(echo $RAW_SHARD | sed 's/\//of/g') - DIFF_NAME="e2e-$SHARD.diff" - git add --all - git diff --staged --binary --patch > $DIFF_NAME - if [ -s $DIFF_NAME ]; then - echo "diff=true" >> $GITHUB_OUTPUT - echo "diff_name=$DIFF_NAME" >> $GITHUB_OUTPUT - fi + scripts/create_patch.sh "e2e-$SHARD.diff" - name: Upload mutation if: matrix.runner == 'ubuntu' && matrix.node == '18' && steps.diff.outputs.diff == 'true' @@ -401,7 +386,11 @@ jobs: - name: Compute Checksums run: | - mv ./benchmarks/* ./dist + # if there is a ./benchmarks/report.json, move it to ./dist + if [ -f ./benchmarks/report.json ]; then + mv ./benchmarks/report.json ./dist + fi + cd dist echo '' >> ../CHANGELOG.md diff --git a/apps/vscode-wing/turbo.json b/apps/vscode-wing/turbo.json index 1dd1dd3b453..d081804a948 100644 --- a/apps/vscode-wing/turbo.json +++ b/apps/vscode-wing/turbo.json @@ -6,9 +6,7 @@ "outputs": ["lib/**"] }, "dev": { - "dependsOn": ["compile"], - "cache": false, - "persistent": true + "dependsOn": ["compile"] }, "package": { "inputs": ["syntaxes/**", "resources/**"], diff --git a/libs/wingc/turbo.json b/libs/wingc/turbo.json index ca7310fdc45..37f630ba201 100644 --- a/libs/wingc/turbo.json +++ b/libs/wingc/turbo.json @@ -3,16 +3,17 @@ "extends": ["//"], "pipeline": { "compile": { + "dependsOn": ["@winglang/wingii#compile", "@winglang/tree-sitter-wing#compile"], "outputs": [ "../../target/wasm32-wasi/release/wingc.wasm", "../../target/wasm32-wasi/release/libwingc.*" ] }, "test": { - "dependsOn": ["compile", "examples-valid#topo", "examples-invalid#topo"] + "dependsOn": ["compile", "@winglang/sdk#compile", "examples-valid#topo", "examples-invalid#topo"] }, "dev": { - "cache": false + "dependsOn": ["@winglang/sdk#compile"] } } } diff --git a/package.json b/package.json index ae8c658877a..93f93476d2c 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,6 @@ "private": true, "devDependencies": { "bump-pack": "workspace:^", - "changelogen": "^0.5.3", - "semver": "^7.3.8", "turbo": "^1.10.12" }, "scripts": { @@ -15,7 +13,6 @@ "package:ci": "turbo package --color && tar -czvf dist/docs.tgz docs/*", "test:ci": "turbo default --color --concurrency 1 && turbo compile post-compile lint eslint test test:playwright --color --filter=!hangar", "docs": "./scripts/docsite.sh", - "changelog": "bump-pack", "install": "bash scripts/setup_wasi.sh", "postinstall": "link-bundles", "wing": "turbo compile --filter=winglang --output-logs=errors-only && ./apps/wing/bin/wing" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eb1901b06ce..ab31c751c46 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,12 +34,6 @@ importers: bump-pack: specifier: workspace:^ version: link:tools/bump-pack - changelogen: - specifier: ^0.5.3 - version: 0.5.3 - semver: - specifier: ^7.3.8 - version: 7.5.2 turbo: specifier: ^1.10.12 version: 1.10.12 @@ -1268,6 +1262,9 @@ importers: tools/bump-pack: dependencies: + '@actions/core': + specifier: ^1.10.0 + version: 1.10.0 '@pnpm/find-workspace-dir': specifier: ^6.0.2 version: 6.0.2 @@ -1283,6 +1280,9 @@ importers: fs-extra: specifier: ^11 version: 11.1.1 + minimatch: + specifier: ^9.0.3 + version: 9.0.3 npm-which: specifier: ^3.0.1 version: 3.0.1 @@ -1354,6 +1354,19 @@ packages: resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} + /@actions/core@1.10.0: + resolution: {integrity: sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==} + dependencies: + '@actions/http-client': 2.1.1 + uuid: 8.3.2 + dev: false + + /@actions/http-client@2.1.1: + resolution: {integrity: sha512-qhrkRMB40bbbLo7gF+0vu+X+UawOvQQqNAA/5Unx774RS8poaOhThDOG6BGmxvAnxhQnDp2BG/ZUm65xZILTpw==} + dependencies: + tunnel: 0.0.6 + dev: false + /@alloc/quick-lru@5.2.0: resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} @@ -11114,6 +11127,7 @@ packages: rc9: 2.1.1 transitivePeerDependencies: - supports-color + dev: false /c8@7.14.0: resolution: {integrity: sha512-i04rtkkcNcCf7zsQcSv/T9EbUn4RXQ6mropeMcjFOsQXQ0iGLAr/xT6TImQg4+U9hmNpN9XdvPkjUL1IzbgxJw==} @@ -11426,6 +11440,7 @@ packages: yaml: 2.2.1 transitivePeerDependencies: - supports-color + dev: false /char-regex@1.0.2: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} @@ -11895,6 +11910,7 @@ packages: /consola@3.2.2: resolution: {integrity: sha512-r921u0vbF4lQsoIqYvSSER+yZLPQGijOHrYcWoCNVNBZmn/bRR+xT/DgerTze/nLD9TTGzdDa378TVhx7RDOYg==} engines: {node: ^14.18.0 || >=16.10.0} + dev: false /console-control-strings@1.1.0: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} @@ -12090,6 +12106,7 @@ packages: /convert-gitmoji@0.1.3: resolution: {integrity: sha512-t5yxPyI8h8KPvRwrS/sRrfIpT2gJbmBAY0TFokyUBy3PM44RuFRpZwHdACz+GTSPLRLo3s4qsscOMLjHiXBwzw==} + dev: false /convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} @@ -12552,6 +12569,7 @@ packages: /destr@2.0.0: resolution: {integrity: sha512-FJ9RDpf3GicEBvzI3jxc2XhHzbqD8p4ANw/1kPsFBfTvP1b7Gn/Lg1vO7R9J4IVgoMbyUmFrFGZafJ1hPZpvlg==} + dev: false /destroy@1.2.0: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} @@ -12727,7 +12745,7 @@ packages: dependencies: semver: 7.5.3 shelljs: 0.8.5 - typescript: 5.3.0-dev.20230828 + typescript: 5.3.0-dev.20230829 dev: true /dset@3.1.2: @@ -13958,6 +13976,7 @@ packages: /flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true + dev: false /flatted@3.2.7: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} @@ -14382,7 +14401,7 @@ packages: dependencies: foreground-child: 3.1.1 jackspeak: 2.2.1 - minimatch: 9.0.2 + minimatch: 9.0.3 minipass: 6.0.2 path-scurry: 1.10.0 dev: true @@ -17808,12 +17827,11 @@ packages: dependencies: brace-expansion: 2.0.1 - /minimatch@9.0.2: - resolution: {integrity: sha512-PZOT9g5v2ojiTL7r1xF6plNHLtOeTpSlDI007As2NlA2aYBMfVom17yqa6QzhmDP8QOhn7LjHTg7DFCVSSa6yg==} + /minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} dependencies: brace-expansion: 2.0.1 - dev: true /minimist-options@3.0.2: resolution: {integrity: sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==} @@ -18552,9 +18570,11 @@ packages: destr: 2.0.0 node-fetch-native: 1.2.0 ufo: 1.1.2 + dev: false /ohash@1.1.2: resolution: {integrity: sha512-9CIOSq5945rI045GFtcO3uudyOkYVY1nyfFxVQp+9BRgslr8jPNiSSrsFGg/BNTUFOLqx0P5tng6G32brIPw0w==} + dev: false /on-finished@2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} @@ -18951,6 +18971,7 @@ packages: /perfect-debounce@1.0.0: resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} + dev: false /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} @@ -19481,6 +19502,7 @@ packages: defu: 6.1.2 destr: 2.0.0 flat: 5.0.2 + dev: false /rc@1.2.8: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} @@ -20211,6 +20233,7 @@ packages: /scule@1.0.0: resolution: {integrity: sha512-4AsO/FrViE/iDNEPaAQlb77tf0csuq27EsVpy6ett584EcRTp6pTDLoGWVxCD77y5iU5FauOvhsI4o1APwPoSQ==} + dev: false /semver-diff@4.0.0: resolution: {integrity: sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==} @@ -21749,8 +21772,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - /typescript@5.3.0-dev.20230828: - resolution: {integrity: sha512-uBVHpn+yxJsHMANa01Fn1Ni/3v4HzKcZbbzsbLYxgPKNJTAWQM8FoZWOFh5mrjZmpJcpGtPBcwbeuTUDOCD6QA==} + /typescript@5.3.0-dev.20230829: + resolution: {integrity: sha512-2bsH+jTfOtehS2ZMI6RteCCRFk2QTUUY3BijvnyS0+o0CB/xWJDu7+WRbpt/XEZgOcoTLf9evRm/tyGSlPyNgA==} engines: {node: '>=14.17'} hasBin: true dev: true diff --git a/scripts/create_patch.sh b/scripts/create_patch.sh new file mode 100755 index 00000000000..876fda6ef27 --- /dev/null +++ b/scripts/create_patch.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# Check if running in GitHub Actions +if [ -z "$GITHUB_ACTIONS" ]; then + echo "Not running in GitHub Actions, skipping patch creation" + exit 0 +fi + +# Get patch name from args +if [ -z "$1" ]; then + echo "No patch name specified, skipping patch creation" + exit 1 +fi + +PATCH_NAME=$1 +START_SHA=$2 +END_SHA=$3 + +git add --all +if [ -z "$START_SHA" ]; then + git diff --staged --binary --patch > $1 +else + git diff --staged --binary --patch $START_SHA $END_SHA > $1 +fi + +if [ -s $1 ]; then + echo "Diff found, creating a patch to apply later" + cat $1 + echo "diff=true" >> $GITHUB_OUTPUT + echo "diff_name=$1" >> $GITHUB_OUTPUT +fi diff --git a/scripts/docsite.sh b/scripts/docsite.sh index c0e3e3be8ce..1c02131ce20 100755 --- a/scripts/docsite.sh +++ b/scripts/docsite.sh @@ -1,4 +1,5 @@ -#!/bin/sh +#!/usr/bin/env bash + scriptdir=$(cd $(dirname $0) && pwd) workdir="$HOME/.winglang-docsite" docsdir=$(cd $scriptdir/../docs && pwd) diff --git a/tools/bump-pack/bin/bump-pack.cjs b/tools/bump-pack/bin/bump-pack.cjs index 5be1bffa694..2ad8719b440 100755 --- a/tools/bump-pack/bin/bump-pack.cjs +++ b/tools/bump-pack/bin/bump-pack.cjs @@ -4,7 +4,7 @@ const { resolve, relative } = require("node:path"); const which = require("npm-which")(__dirname); const tsx = relative(process.cwd(), which.sync("tsx")); -const cliSource = relative(process.cwd(), resolve(__dirname, "../src/cli.ts")); +const cliSource = relative(process.cwd(), resolve(__dirname, "../src/bump-pack.ts")); execSync(`${tsx} ${cliSource} ${process.argv.slice(2).join(" ")}`, { stdio: "inherit", }); diff --git a/tools/bump-pack/bin/turbo-diff.cjs b/tools/bump-pack/bin/turbo-diff.cjs new file mode 100755 index 00000000000..4baa41d10f1 --- /dev/null +++ b/tools/bump-pack/bin/turbo-diff.cjs @@ -0,0 +1,10 @@ +#!/usr/bin/env -S node +const { execSync } = require("node:child_process"); +const { resolve, relative } = require("node:path"); + +const which = require("npm-which")(__dirname); +const tsx = relative(process.cwd(), which.sync("tsx")); +const cliSource = relative(process.cwd(), resolve(__dirname, "../src/turbo-diff.ts")); +execSync(`${tsx} ${cliSource} ${process.argv.slice(2).join(" ")}`, { + stdio: "inherit", +}); diff --git a/tools/bump-pack/package.json b/tools/bump-pack/package.json index 95b5a8e7778..11d47d6f724 100644 --- a/tools/bump-pack/package.json +++ b/tools/bump-pack/package.json @@ -4,7 +4,8 @@ "private": true, "bin": { "bump-pack": "./bin/bump-pack.cjs", - "link-bundles": "./bin/link-bundles.cjs" + "link-bundles": "./bin/link-bundles.cjs", + "turbo-diff": "./bin/turbo-diff.cjs" }, "exports": null, "sideEffects": false, @@ -20,11 +21,13 @@ "typescript": "^5.1.3" }, "dependencies": { + "@actions/core": "^1.10.0", "@pnpm/find-workspace-dir": "^6.0.2", "@pnpm/reviewing.dependencies-hierarchy": "^2.0.8", "@pnpm/workspace.find-packages": "^1.0.1", "changelogen": "^0.5.3", "fs-extra": "^11", + "minimatch": "^9.0.3", "npm-which": "^3.0.1", "semver": "^7.5.2", "tsx": "^3.12.7" diff --git a/tools/bump-pack/src/cli.ts b/tools/bump-pack/src/bump-pack.ts similarity index 100% rename from tools/bump-pack/src/cli.ts rename to tools/bump-pack/src/bump-pack.ts diff --git a/tools/bump-pack/src/bundle-link.ts b/tools/bump-pack/src/bundle-link.ts index cc5db9c7235..55e6de8b315 100644 --- a/tools/bump-pack/src/bundle-link.ts +++ b/tools/bump-pack/src/bundle-link.ts @@ -1,5 +1,3 @@ -#!/usr/bin/env tsx - // Based on logic found here: // https://github.com/aws/aws-prototyping-sdk/blob/63a5a3127ad69fc0dfca7173dc1f877ea98cc072/packages/nx-monorepo/scripts/pnpm/link-bundled-transitive-deps.ts diff --git a/tools/bump-pack/src/turbo-diff.ts b/tools/bump-pack/src/turbo-diff.ts new file mode 100644 index 00000000000..60e4e4cf6a5 --- /dev/null +++ b/tools/bump-pack/src/turbo-diff.ts @@ -0,0 +1,152 @@ +/* +Usage: turbo-diff [options] + +Summary: + turbo-diff is a tool that can be used to determine which turbo tasks changed based on a git diff. + +Output: + The output is a JSON object with the following structure: + { + "": { + "cached": , + "changes": + } + } + + The "cached" field indicates whether or not the task is cached based on the info that turbo has locally (or remotely if using a turbo remote cache). + The "changes" field indicates whether or not the task has changes based on the git diff. + +Expectations: + - The winglang monorepo this is contained in must have a enough history to covert startRef and EndRef. + +Remarks: + Why can't we just use turbo's built in diffing? + In turbo, you can use `-F=...[startRef..endRef]` to filter tasks based on a git diff. This method has two major issues: + 1. See this issue: https://github.com/vercel/turbo/issues/4678. + Basically, it does not actually use task inputs to determine if a task changed, it uses the entire project dir + 2. It only tells you if a project changed, not a specific task. + +Options: + --start-ref The start ref to use for the git diff (default: "HEAD") + --end-ref The end ref to use for the git diff (default: "", current working tree) +*/ + +import { join } from "node:path"; +import { execSync } from "node:child_process"; +import { parseArgs } from "node:util"; +import { setOutput } from "@actions/core"; +import { minimatch } from "minimatch"; +import { fileURLToPath } from "node:url"; + +const currentFile = fileURLToPath(import.meta.url); +const rootDir = join(currentFile, "..", "..", "..", ".."); +function betterExec(command: string) { + return execSync(command, { + cwd: rootDir, + encoding: "utf8", + maxBuffer: 1024 * 1024 * 1024, + }).trim(); +} + +const args = parseArgs({ + options: { + startRef: { + type: "string", + default: "HEAD", + }, + endRef: { + type: "string", + default: "", + }, + }, +}); + +let relativeChangedFiles = betterExec( + `git diff --name-only ${args.values.startRef} ${args.values.endRef}` +).split("\n"); + +if (args.values.endRef === "") { + // include untracked files + const OtherChangedFiles = betterExec( + `git ls-files --other --exclude-standard` + ).split("\n"); + + relativeChangedFiles = relativeChangedFiles.concat(OtherChangedFiles); +} + +// resolve to absolute paths +const absoluteChangedFiles = relativeChangedFiles.map((file) => + join(rootDir, file) +); + +console.log(absoluteChangedFiles) + +const turboArgs = [ + "pnpm", + "turbo", + "run", + "compile", + "test", + "package", + "bench", + "--dry-run=json", +]; + +const turboOutput = JSON.parse(betterExec(turboArgs.join(" "))); + +const taskData: { [key: string]: { cached: boolean; changes: boolean } } = {}; + +for (const task of turboOutput.tasks) { + // double check that all the changes files based on git are actually included in all these tasks + const absoluteTaskRoot = join(rootDir, task.directory); + const changesRelativeToTask = absoluteChangedFiles + .map((file) => file.replace(absoluteTaskRoot + "/", "")) + .filter((file) => !file.startsWith("/")); + + const anyChanges = changesRelativeToTask.some((file) => + Object.keys(task.inputs).includes(file) + ); + taskData[task.taskId] = { + cached: task.cache.status === "HIT", + changes: anyChanges, + }; +} + +const globalDeps = Object.keys(turboOutput.globalCacheInputs.files); +const globalPattern = `{${globalDeps.join(",")}}`; +for (const changedFile of relativeChangedFiles) { + if (minimatch(changedFile, globalPattern)) { + for (const taskId in taskData) { + taskData[taskId].changes = true; + } + break; + } +} + +for (const task of turboOutput.tasks) { + const dataEntry = taskData[task.taskId]; + if (dataEntry.changes) { + continue; + } + let dependencies = task.dependencies; + if (task.package === "hangar") { + /* + The wing console is a transitive dependency of hangar (hangar->winglang->@console/*). + Because of that, turbo knows that hangar itself also depends on it. + However, hangar doesn't actually interact with the console at all so it's functionally not a real dependency. + There is no way to denote this in turbo configuration so we have to do it manually here. + */ + dependencies = dependencies.filter( + (dependency: string) => !dependency.startsWith("@wingconsole") + ); + } + for (const dependency of dependencies) { + dataEntry.changes = dataEntry.changes || taskData[dependency].changes; + } +} + +console.log(taskData); + +if (process.env.GITHUB_ACTIONS) { + setOutput("data", taskData); +} diff --git a/turbo.json b/turbo.json index 29cb9ec5149..e864d9e279d 100644 --- a/turbo.json +++ b/turbo.json @@ -7,7 +7,9 @@ "insta.yaml", ".github/workflows/build.yml", "scripts/*", - "patches/*" + "patches/*", + "tools/bump-pack/**", + "!tools/bump-pack/node_modules/**" ], "pipeline": { "default": { @@ -90,10 +92,14 @@ "package": { "dependsOn": ["compile", "post-compile"], "env": ["PROJEN_BUMP_VERSION"], - "inputs": [""] + "inputs": ["*.md", "LICENSE"] }, "topo": { "dependsOn": ["^topo"] + }, + "dev": { + "cache": false, + "persistent": true } } } From 3721e515773a97efa2b4af9451fbdff2999cc8ab Mon Sep 17 00:00:00 2001 From: Mark McCulloh Date: Wed, 30 Aug 2023 11:40:54 -0400 Subject: [PATCH 24/48] chore(repo): skip console preview if not needed (#4016) *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .github/workflows/build.yml | 7 +++---- apps/wing-console/console/app/turbo.json | 4 ++++ tools/bump-pack/src/turbo-diff.ts | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7bda633d3a3..fc22b077f19 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,6 +36,7 @@ jobs: last-version: ${{ fromJson(steps.changelog.outputs.data).lastVersion }} changelog: ${{ fromJson(steps.changelog.outputs.data).changelog }} vscode-wing-changed: ${{ fromJson(steps.turbo-diff.outputs.data)['vscode-wing#compile'].changes }} + console-changed: ${{ fromJson(steps.turbo-diff.outputs.data)['@wingconsole/app#preview:fly'].changes }} e2e-changed: ${{ fromJson(steps.turbo-diff.outputs.data)['hangar#test'].changes }} bench-changed: ${{ fromJson(steps.turbo-diff.outputs.data)['hangar#bench'].changes }} steps: @@ -272,12 +273,10 @@ jobs: FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} FLY_VERSION: "0.1.80" APP_NAME: wing-console-pr-${{github.event.number}} - if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && !startsWith(github.head_ref, 'mergify/merge-queue/') }} + if: ${{ needs.build.outputs.console-changed == 'true' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && !startsWith(github.head_ref, 'mergify/merge-queue/') }} steps: - name: Checkout uses: actions/checkout@v3 - with: - fetch-depth: 1 - name: Download Dist Artifacts uses: actions/download-artifact@v3 @@ -288,7 +287,7 @@ jobs: - name: Install flyctl uses: superfly/flyctl-actions/setup-flyctl@1.4 with: - version: ${{env.FLY_VERSION}} + version: ${{ env.FLY_VERSION }} - name: Deploy to Fly.io id: deploy-fly diff --git a/apps/wing-console/console/app/turbo.json b/apps/wing-console/console/app/turbo.json index 25400ee13dc..475d88883d9 100644 --- a/apps/wing-console/console/app/turbo.json +++ b/apps/wing-console/console/app/turbo.json @@ -8,6 +8,10 @@ }, "package": { "outputs": ["../../../../dist/wingconsole-app-*.tgz"] + }, + "preview:fly": { + "dependsOn": ["compile"], + "inputs": ["demo/*", "preview/*"] } } } diff --git a/tools/bump-pack/src/turbo-diff.ts b/tools/bump-pack/src/turbo-diff.ts index 60e4e4cf6a5..24baae136b8 100644 --- a/tools/bump-pack/src/turbo-diff.ts +++ b/tools/bump-pack/src/turbo-diff.ts @@ -89,6 +89,7 @@ const turboArgs = [ "test", "package", "bench", + "preview:fly", "--dry-run=json", ]; From 95d0396d2cc3955afba7c91b18973a3aac7820b7 Mon Sep 17 00:00:00 2001 From: Gary Sassano <10464497+garysassano@users.noreply.github.com> Date: Wed, 30 Aug 2023 18:20:27 +0200 Subject: [PATCH 25/48] feat(sdk): add `MutArray.popAt()` and `MutArray.removeFirst()` to std library (#3925) Closes #3833 - [X] `MutArray.popAt()` - [x] `MutArray.removeFirst()` *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .../02-std/api-reference.md | 34 ++ examples/tests/sdk_tests/std/array.w | 51 +++ libs/wingsdk/src/std/array.ts | 27 ++ .../sdk_tests/std/array.w_compile_tf-aws.md | 373 +++++++++++++++--- .../sdk_tests/std/array.w_test_sim.md | 34 +- 5 files changed, 447 insertions(+), 72 deletions(-) diff --git a/docs/docs/04-standard-library/02-std/api-reference.md b/docs/docs/04-standard-library/02-std/api-reference.md index e1ce2b51dc8..46aa7a6ed45 100644 --- a/docs/docs/04-standard-library/02-std/api-reference.md +++ b/docs/docs/04-standard-library/02-std/api-reference.md @@ -1099,7 +1099,9 @@ Mutable Array. | join | Returns a new string containing the concatenated values in this array, separated by commas or a specified separator string. | | lastIndexOf | Returns the index of the last occurrence of searchElement found. | | pop | Remove value from end of array. | +| popAt | Removes value from the given index of an array. | | push | Add value to end of array. | +| removeFirst | Removes first occurence of a given value in an array. | | set | Sets a new value at the given index of an array. | --- @@ -1241,6 +1243,22 @@ pop(): Remove value from end of array. +##### `popAt` + +```wing +popAt(index: num): +``` + +Removes value from the given index of an array. + +###### `index`Required + +- *Type:* num + +the index to remove the value at. + +--- + ##### `push` ```wing @@ -1257,6 +1275,22 @@ value to add. --- +##### `removeFirst` + +```wing +removeFirst(value: ): bool +``` + +Removes first occurence of a given value in an array. + +###### `value`Required + +- *Type:* <T> + +the value to remove. + +--- + ##### `set` ```wing diff --git a/examples/tests/sdk_tests/std/array.w b/examples/tests/sdk_tests/std/array.w index d8a171d5c84..4f383927293 100644 --- a/examples/tests/sdk_tests/std/array.w +++ b/examples/tests/sdk_tests/std/array.w @@ -59,6 +59,39 @@ test "pushAndPop()" { assert(a.at(0) == "hello"); } +//----------------------------------------------------------------------------- +// popAt() + +test "popAt()" { + let assertThrows = (expected: str, block: (): void) => { + let var error = false; + try { + block(); + } catch actual { + assert(actual == expected); + error = true; + } + assert(error); + }; + + let INDEX_OUT_OF_BOUNDS_ERROR = "Index out of bounds"; + let mutArr = MutArray["hello", "world"]; + + let item = mutArr.popAt(0); + + assert(item == "hello"); + assert(mutArr.length == 1); + assert(mutArr.at(0) == "world"); + + assertThrows(INDEX_OUT_OF_BOUNDS_ERROR, () => { + mutArr.popAt(-3); + }); + + assertThrows(INDEX_OUT_OF_BOUNDS_ERROR, () => { + mutArr.popAt(3); + }); +} + //----------------------------------------------------------------------------- // concat() let array = Array["hello"]; @@ -307,4 +340,22 @@ test "insert()" { assert(mutArr.length == 5); assert(mutArr.at(4) == 25); +} + +//----------------------------------------------------------------------------- +// removeFirst() + +test "removeFirst()" { + let mutArr = MutArray[3, 6, 9, 3]; + + let r1 = mutArr.removeFirst(3); + + assert(r1 == true); + assert(mutArr.length == 3); + assert(mutArr == MutArray [6, 9, 3]); + + let r2 = mutArr.removeFirst(-42); + + assert(r2 == false); + assert(mutArr.length == 3); } \ No newline at end of file diff --git a/libs/wingsdk/src/std/array.ts b/libs/wingsdk/src/std/array.ts index 077d797df4f..7a347e918e4 100644 --- a/libs/wingsdk/src/std/array.ts +++ b/libs/wingsdk/src/std/array.ts @@ -250,6 +250,20 @@ export class MutArray { throw new Error("Abstract"); } + /** + * Removes value from the given index of an array + * + * @macro ((obj, args) => { if (args[0] < 0 || args[0] >= $self$.length) throw new Error("Index out of bounds"); return obj.splice(args[0], 1)[0]; })($self$, [$args$]) + * + * @param index the index to remove the value at + * @returns the value removed + * @throws index out of bounds error if the given index does not exist for the array + */ + public popAt(index: number): T1 { + index; + throw new Error("Macro"); + } + /** * Sets a new value at the given index of an array * @@ -279,4 +293,17 @@ export class MutArray { value; throw new Error("Macro"); } + + /** + * Removes first occurence of a given value in an array + * + * @macro ((obj, args) => { if (obj.indexOf(args[0]) !== -1) { obj.splice(obj.indexOf(args[0]), 1); return true; } return false; })($self$, [$args$]) + * + * @param value the value to remove + * @returns true if value was removed + */ + public removeFirst(value: T1): boolean { + value; + throw new Error("Macro"); + } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md index 11b4d755547..b55cf8f7ab8 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md @@ -30,8 +30,8 @@ module.exports = function({ }) { } async handle() { const i = ["hello", "wing"]; - const separator = ","; - const joinedString = (await i.join()); + const separator = ";"; + const joinedString = (await i.join(separator)); const expectedString = (((await i.at(0)) + separator) + (await i.at(1))); {((cond) => {if (!cond) throw new Error("assertion failed: joinedString == expectedString")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(joinedString,expectedString)))}; } @@ -45,6 +45,28 @@ module.exports = function({ }) { ```js module.exports = function({ }) { class $Closure11 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const i = ["hello", "wing"]; + const separator = ","; + const joinedString = (await i.join()); + const expectedString = (((await i.at(0)) + separator) + (await i.at(1))); + {((cond) => {if (!cond) throw new Error("assertion failed: joinedString == expectedString")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(joinedString,expectedString)))}; + } + } + return $Closure11; +} + +``` + +## inflight.$Closure12-1.js +```js +module.exports = function({ }) { + class $Closure12 { constructor({ }) { const $obj = (...args) => this.handle(...args); Object.setPrototypeOf($obj, this); @@ -57,15 +79,15 @@ module.exports = function({ }) { {((cond) => {if (!cond) throw new Error("assertion failed: o.at(0) == p.at(0)")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((await o.at(0)),(await p.at(0)))))}; } } - return $Closure11; + return $Closure12; } ``` -## inflight.$Closure12-1.js +## inflight.$Closure13-1.js ```js module.exports = function({ }) { - class $Closure12 { + class $Closure13 { constructor({ }) { const $obj = (...args) => this.handle(...args); Object.setPrototypeOf($obj, this); @@ -78,15 +100,15 @@ module.exports = function({ }) { {((cond) => {if (!cond) throw new Error("assertion failed: q.at(0) == r.at(0)")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((await q.at(0)),(await r.at(0)))))}; } } - return $Closure12; + return $Closure13; } ``` -## inflight.$Closure13-1.js +## inflight.$Closure14-1.js ```js module.exports = function({ }) { - class $Closure13 { + class $Closure14 { constructor({ }) { const $obj = (...args) => this.handle(...args); Object.setPrototypeOf($obj, this); @@ -99,15 +121,15 @@ module.exports = function({ }) { {((cond) => {if (!cond) throw new Error("assertion failed: s.lastIndexOf(\"something\") == -1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(s.lastIndexOf("something"),(-1))))}; } } - return $Closure13; + return $Closure14; } ``` -## inflight.$Closure14-1.js +## inflight.$Closure15-1.js ```js module.exports = function({ }) { - class $Closure14 { + class $Closure15 { constructor({ }) { const $obj = (...args) => this.handle(...args); Object.setPrototypeOf($obj, this); @@ -142,15 +164,15 @@ module.exports = function({ }) { )); } } - return $Closure14; + return $Closure15; } ``` -## inflight.$Closure15-1.js +## inflight.$Closure16-1.js ```js module.exports = function({ }) { - class $Closure15 { + class $Closure16 { constructor({ }) { const $obj = (...args) => this.handle(...args); Object.setPrototypeOf($obj, this); @@ -191,7 +213,32 @@ module.exports = function({ }) { {((cond) => {if (!cond) throw new Error("assertion failed: mutArr.at(4) == 25")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((await mutArr.at(4)),25)))}; } } - return $Closure15; + return $Closure16; +} + +``` + +## inflight.$Closure17-1.js +```js +module.exports = function({ }) { + class $Closure17 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const mutArr = [3, 6, 9, 3]; + const r1 = ((obj, args) => { if (obj.indexOf(args[0]) !== -1) { obj.splice(obj.indexOf(args[0]), 1); return true; } return false; })(mutArr, [3]); + {((cond) => {if (!cond) throw new Error("assertion failed: r1 == true")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(r1,true)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: mutArr.length == 3")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(mutArr.length,3)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: mutArr == MutArray [6, 9, 3]")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(mutArr,[6, 9, 3])))}; + const r2 = ((obj, args) => { if (obj.indexOf(args[0]) !== -1) { obj.splice(obj.indexOf(args[0]), 1); return true; } return false; })(mutArr, [(-42)]); + {((cond) => {if (!cond) throw new Error("assertion failed: r2 == false")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(r2,false)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: mutArr.length == 3")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(mutArr.length,3)))}; + } + } + return $Closure17; } ``` @@ -252,12 +299,33 @@ module.exports = function({ }) { return $obj; } async handle() { - const b = ["hello"]; - {((cond) => {if (!cond) throw new Error("assertion failed: b.length == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(b.length,1)))}; - const d = (await b.concat(["wing"])); - {((cond) => {if (!cond) throw new Error("assertion failed: d.length == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(d.length,2)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: d.at(0) == \"hello\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((await d.at(0)),"hello")))}; - {((cond) => {if (!cond) throw new Error("assertion failed: d.at(1) == \"wing\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((await d.at(1)),"wing")))}; + const assertThrows = async (expected, block) => { + let error = false; + try { + (await block()); + } + catch ($error_actual) { + const actual = $error_actual.message; + {((cond) => {if (!cond) throw new Error("assertion failed: actual == expected")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(actual,expected)))}; + error = true; + } + {((cond) => {if (!cond) throw new Error("assertion failed: error")})(error)}; + } + ; + const INDEX_OUT_OF_BOUNDS_ERROR = "Index out of bounds"; + const mutArr = ["hello", "world"]; + const item = ((obj, args) => { if (args[0] < 0 || args[0] >= mutArr.length) throw new Error("Index out of bounds"); return obj.splice(args[0], 1)[0]; })(mutArr, [0]); + {((cond) => {if (!cond) throw new Error("assertion failed: item == \"hello\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(item,"hello")))}; + {((cond) => {if (!cond) throw new Error("assertion failed: mutArr.length == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(mutArr.length,1)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: mutArr.at(0) == \"world\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((await mutArr.at(0)),"world")))}; + (await assertThrows(INDEX_OUT_OF_BOUNDS_ERROR,async () => { + ((obj, args) => { if (args[0] < 0 || args[0] >= mutArr.length) throw new Error("Index out of bounds"); return obj.splice(args[0], 1)[0]; })(mutArr, [(-3)]); + } + )); + (await assertThrows(INDEX_OUT_OF_BOUNDS_ERROR,async () => { + ((obj, args) => { if (args[0] < 0 || args[0] >= mutArr.length) throw new Error("Index out of bounds"); return obj.splice(args[0], 1)[0]; })(mutArr, [3]); + } + )); } } return $Closure4; @@ -275,14 +343,12 @@ module.exports = function({ }) { return $obj; } async handle() { - const array = ["hello"]; - {((cond) => {if (!cond) throw new Error("assertion failed: array.length == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(array.length,1)))}; - const anotherArray = ["wing"]; - {((cond) => {if (!cond) throw new Error("assertion failed: anotherArray.length == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(anotherArray.length,1)))}; - const mergedArray = (await array.concat(anotherArray)); - {((cond) => {if (!cond) throw new Error("assertion failed: mergedArray.length == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(mergedArray.length,2)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: mergedArray.at(0) == \"hello\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((await mergedArray.at(0)),"hello")))}; - {((cond) => {if (!cond) throw new Error("assertion failed: mergedArray.at(1) == \"wing\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((await mergedArray.at(1)),"wing")))}; + const b = ["hello"]; + {((cond) => {if (!cond) throw new Error("assertion failed: b.length == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(b.length,1)))}; + const d = (await b.concat(["wing"])); + {((cond) => {if (!cond) throw new Error("assertion failed: d.length == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(d.length,2)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: d.at(0) == \"hello\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((await d.at(0)),"hello")))}; + {((cond) => {if (!cond) throw new Error("assertion failed: d.at(1) == \"wing\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((await d.at(1)),"wing")))}; } } return $Closure5; @@ -300,12 +366,14 @@ module.exports = function({ }) { return $obj; } async handle() { - const e = ["hello", "wing"]; - {((cond) => {if (!cond) throw new Error("assertion failed: e.contains(\"wing\")")})(e.includes("wing"))}; - {((cond) => {if (!cond) throw new Error("assertion failed: !e.contains(\"NotThere\")")})((!e.includes("NotThere")))}; - const h = ["hello", "wing"]; - {((cond) => {if (!cond) throw new Error("assertion failed: h.contains(\"wing\")")})(h.includes("wing"))}; - {((cond) => {if (!cond) throw new Error("assertion failed: !h.contains(\"NotThere\")")})((!h.includes("NotThere")))}; + const array = ["hello"]; + {((cond) => {if (!cond) throw new Error("assertion failed: array.length == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(array.length,1)))}; + const anotherArray = ["wing"]; + {((cond) => {if (!cond) throw new Error("assertion failed: anotherArray.length == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(anotherArray.length,1)))}; + const mergedArray = (await array.concat(anotherArray)); + {((cond) => {if (!cond) throw new Error("assertion failed: mergedArray.length == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(mergedArray.length,2)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: mergedArray.at(0) == \"hello\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((await mergedArray.at(0)),"hello")))}; + {((cond) => {if (!cond) throw new Error("assertion failed: mergedArray.at(1) == \"wing\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((await mergedArray.at(1)),"wing")))}; } } return $Closure6; @@ -323,9 +391,12 @@ module.exports = function({ }) { return $obj; } async handle() { - const g = ["hello", "wing"]; - {((cond) => {if (!cond) throw new Error("assertion failed: g.indexOf(\"wing\") == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(g.indexOf("wing"),1)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: g.indexOf(\"notThere\") == -1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(g.indexOf("notThere"),(-1))))}; + const e = ["hello", "wing"]; + {((cond) => {if (!cond) throw new Error("assertion failed: e.contains(\"wing\")")})(e.includes("wing"))}; + {((cond) => {if (!cond) throw new Error("assertion failed: !e.contains(\"NotThere\")")})((!e.includes("NotThere")))}; + const h = ["hello", "wing"]; + {((cond) => {if (!cond) throw new Error("assertion failed: h.contains(\"wing\")")})(h.includes("wing"))}; + {((cond) => {if (!cond) throw new Error("assertion failed: !h.contains(\"NotThere\")")})((!h.includes("NotThere")))}; } } return $Closure7; @@ -363,11 +434,9 @@ module.exports = function({ }) { return $obj; } async handle() { - const i = ["hello", "wing"]; - const separator = ";"; - const joinedString = (await i.join(separator)); - const expectedString = (((await i.at(0)) + separator) + (await i.at(1))); - {((cond) => {if (!cond) throw new Error("assertion failed: joinedString == expectedString")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(joinedString,expectedString)))}; + const g = ["hello", "wing"]; + {((cond) => {if (!cond) throw new Error("assertion failed: g.indexOf(\"wing\") == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(g.indexOf("wing"),1)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: g.indexOf(\"notThere\") == -1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(g.indexOf("notThere"),(-1))))}; } } return $Closure9; @@ -396,7 +465,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:length\",\"${aws_lambda_function.testlength_Handler_BFD8933F.arn}\"],[\"root/Default/Default/test:at()\",\"${aws_lambda_function.testat_Handler_E4F013BC.arn}\"],[\"root/Default/Default/test:pushAndPop()\",\"${aws_lambda_function.testpushAndPop_Handler_EAC0C8FF.arn}\"],[\"root/Default/Default/test:concatMutArray()\",\"${aws_lambda_function.testconcatMutArray_Handler_40D88E89.arn}\"],[\"root/Default/Default/test:concatArray()\",\"${aws_lambda_function.testconcatArray_Handler_F66848AE.arn}\"],[\"root/Default/Default/test:contains()\",\"${aws_lambda_function.testcontains_Handler_F60865D9.arn}\"],[\"root/Default/Default/test:indexOf()\",\"${aws_lambda_function.testindexOf_Handler_BD91EA6F.arn}\"],[\"root/Default/Default/test:indexOfArray()\",\"${aws_lambda_function.testindexOfArray_Handler_DB3A81F5.arn}\"],[\"root/Default/Default/test:join()\",\"${aws_lambda_function.testjoin_Handler_6AC62A8E.arn}\"],[\"root/Default/Default/test:joinWithDefaultSeparator()\",\"${aws_lambda_function.testjoinWithDefaultSeparator_Handler_7AE1258D.arn}\"],[\"root/Default/Default/test:copy()\",\"${aws_lambda_function.testcopy_Handler_27A14A0E.arn}\"],[\"root/Default/Default/test:copyMut()\",\"${aws_lambda_function.testcopyMut_Handler_851E24B4.arn}\"],[\"root/Default/Default/test:lastIndexOf()\",\"${aws_lambda_function.testlastIndexOf_Handler_FFB2061F.arn}\"],[\"root/Default/Default/test:set()\",\"${aws_lambda_function.testset_Handler_ADDF1A01.arn}\"],[\"root/Default/Default/test:insert()\",\"${aws_lambda_function.testinsert_Handler_20BB87F8.arn}\"]]" + "value": "[[\"root/Default/Default/test:length\",\"${aws_lambda_function.testlength_Handler_BFD8933F.arn}\"],[\"root/Default/Default/test:at()\",\"${aws_lambda_function.testat_Handler_E4F013BC.arn}\"],[\"root/Default/Default/test:pushAndPop()\",\"${aws_lambda_function.testpushAndPop_Handler_EAC0C8FF.arn}\"],[\"root/Default/Default/test:popAt()\",\"${aws_lambda_function.testpopAt_Handler_A6739840.arn}\"],[\"root/Default/Default/test:concatMutArray()\",\"${aws_lambda_function.testconcatMutArray_Handler_40D88E89.arn}\"],[\"root/Default/Default/test:concatArray()\",\"${aws_lambda_function.testconcatArray_Handler_F66848AE.arn}\"],[\"root/Default/Default/test:contains()\",\"${aws_lambda_function.testcontains_Handler_F60865D9.arn}\"],[\"root/Default/Default/test:indexOf()\",\"${aws_lambda_function.testindexOf_Handler_BD91EA6F.arn}\"],[\"root/Default/Default/test:indexOfArray()\",\"${aws_lambda_function.testindexOfArray_Handler_DB3A81F5.arn}\"],[\"root/Default/Default/test:join()\",\"${aws_lambda_function.testjoin_Handler_6AC62A8E.arn}\"],[\"root/Default/Default/test:joinWithDefaultSeparator()\",\"${aws_lambda_function.testjoinWithDefaultSeparator_Handler_7AE1258D.arn}\"],[\"root/Default/Default/test:copy()\",\"${aws_lambda_function.testcopy_Handler_27A14A0E.arn}\"],[\"root/Default/Default/test:copyMut()\",\"${aws_lambda_function.testcopyMut_Handler_851E24B4.arn}\"],[\"root/Default/Default/test:lastIndexOf()\",\"${aws_lambda_function.testlastIndexOf_Handler_FFB2061F.arn}\"],[\"root/Default/Default/test:set()\",\"${aws_lambda_function.testset_Handler_ADDF1A01.arn}\"],[\"root/Default/Default/test:insert()\",\"${aws_lambda_function.testinsert_Handler_20BB87F8.arn}\"],[\"root/Default/Default/test:removeFirst()\",\"${aws_lambda_function.testremoveFirst_Handler_4D1D9086.arn}\"]]" } }, "provider": { @@ -523,6 +592,15 @@ module.exports = function({ }) { }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" }, + "testpopAt_Handler_IamRole_D00C1FE4": { + "//": { + "metadata": { + "path": "root/Default/Default/test:popAt()/Handler/IamRole", + "uniqueId": "testpopAt_Handler_IamRole_D00C1FE4" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, "testpushAndPop_Handler_IamRole_5F6E6E00": { "//": { "metadata": { @@ -532,6 +610,15 @@ module.exports = function({ }) { }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" }, + "testremoveFirst_Handler_IamRole_A9164B23": { + "//": { + "metadata": { + "path": "root/Default/Default/test:removeFirst()/Handler/IamRole", + "uniqueId": "testremoveFirst_Handler_IamRole_A9164B23" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, "testset_Handler_IamRole_B9B79227": { "//": { "metadata": { @@ -673,6 +760,16 @@ module.exports = function({ }) { "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.testlength_Handler_IamRole_0AFDC7CB.name}" }, + "testpopAt_Handler_IamRolePolicy_9E762AA5": { + "//": { + "metadata": { + "path": "root/Default/Default/test:popAt()/Handler/IamRolePolicy", + "uniqueId": "testpopAt_Handler_IamRolePolicy_9E762AA5" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testpopAt_Handler_IamRole_D00C1FE4.name}" + }, "testpushAndPop_Handler_IamRolePolicy_7A2A0323": { "//": { "metadata": { @@ -683,6 +780,16 @@ module.exports = function({ }) { "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.testpushAndPop_Handler_IamRole_5F6E6E00.name}" }, + "testremoveFirst_Handler_IamRolePolicy_878A7F57": { + "//": { + "metadata": { + "path": "root/Default/Default/test:removeFirst()/Handler/IamRolePolicy", + "uniqueId": "testremoveFirst_Handler_IamRolePolicy_878A7F57" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testremoveFirst_Handler_IamRole_A9164B23.name}" + }, "testset_Handler_IamRolePolicy_ADE48415": { "//": { "metadata": { @@ -825,6 +932,16 @@ module.exports = function({ }) { "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.testlength_Handler_IamRole_0AFDC7CB.name}" }, + "testpopAt_Handler_IamRolePolicyAttachment_11532865": { + "//": { + "metadata": { + "path": "root/Default/Default/test:popAt()/Handler/IamRolePolicyAttachment", + "uniqueId": "testpopAt_Handler_IamRolePolicyAttachment_11532865" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testpopAt_Handler_IamRole_D00C1FE4.name}" + }, "testpushAndPop_Handler_IamRolePolicyAttachment_D18E216F": { "//": { "metadata": { @@ -835,6 +952,16 @@ module.exports = function({ }) { "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.testpushAndPop_Handler_IamRole_5F6E6E00.name}" }, + "testremoveFirst_Handler_IamRolePolicyAttachment_511FE450": { + "//": { + "metadata": { + "path": "root/Default/Default/test:removeFirst()/Handler/IamRolePolicyAttachment", + "uniqueId": "testremoveFirst_Handler_IamRolePolicyAttachment_511FE450" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testremoveFirst_Handler_IamRole_A9164B23.name}" + }, "testset_Handler_IamRolePolicyAttachment_58805670": { "//": { "metadata": { @@ -1224,6 +1351,35 @@ module.exports = function({ }) { "subnet_ids": [] } }, + "testpopAt_Handler_A6739840": { + "//": { + "metadata": { + "path": "root/Default/Default/test:popAt()/Handler/Default", + "uniqueId": "testpopAt_Handler_A6739840" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c817e47d", + "WING_TARGET": "tf-aws" + } + }, + "function_name": "Handler-c817e47d", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testpopAt_Handler_IamRole_D00C1FE4.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testpopAt_Handler_S3Object_0EEB898A.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, "testpushAndPop_Handler_EAC0C8FF": { "//": { "metadata": { @@ -1253,6 +1409,35 @@ module.exports = function({ }) { "subnet_ids": [] } }, + "testremoveFirst_Handler_4D1D9086": { + "//": { + "metadata": { + "path": "root/Default/Default/test:removeFirst()/Handler/Default", + "uniqueId": "testremoveFirst_Handler_4D1D9086" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c8d404f0", + "WING_TARGET": "tf-aws" + } + }, + "function_name": "Handler-c8d404f0", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testremoveFirst_Handler_IamRole_A9164B23.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testremoveFirst_Handler_S3Object_9034C8E7.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, "testset_Handler_ADDF1A01": { "//": { "metadata": { @@ -1518,6 +1703,17 @@ module.exports = function({ }) { "key": "", "source": "" }, + "testpopAt_Handler_S3Object_0EEB898A": { + "//": { + "metadata": { + "path": "root/Default/Default/test:popAt()/Handler/S3Object", + "uniqueId": "testpopAt_Handler_S3Object_0EEB898A" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, "testpushAndPop_Handler_S3Object_3F93E368": { "//": { "metadata": { @@ -1529,6 +1725,17 @@ module.exports = function({ }) { "key": "", "source": "" }, + "testremoveFirst_Handler_S3Object_9034C8E7": { + "//": { + "metadata": { + "path": "root/Default/Default/test:removeFirst()/Handler/S3Object", + "uniqueId": "testremoveFirst_Handler_S3Object_9034C8E7" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, "testset_Handler_S3Object_A8FBF518": { "//": { "metadata": { @@ -1946,6 +2153,58 @@ class $Root extends $stdlib.std.Resource { return ["handle", "$inflight_init"]; } } + class $Closure16 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure16-1.js")({ + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure16Client = ${$Closure16._toInflightType(this)}; + const client = new $Closure16Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + } + class $Closure17 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure17-1.js")({ + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure17Client = ${$Closure17._toInflightType(this)}; + const client = new $Closure17Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + } const bucket = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"myBucket"); const buckets = [bucket]; const anotherBucket = this.node.root.newAbstract("@winglang/sdk.cloud.Bucket",this,"mySecondBucket"); @@ -1969,6 +2228,7 @@ class $Root extends $stdlib.std.Resource { {((cond) => {if (!cond) throw new Error("assertion failed: a.length == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(a.length,1)))}; {((cond) => {if (!cond) throw new Error("assertion failed: a.at(0) == \"hello\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((a.at(0)),"hello")))}; this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:pushAndPop()",new $Closure3(this,"$Closure3")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:popAt()",new $Closure4(this,"$Closure4")); const array = ["hello"]; {((cond) => {if (!cond) throw new Error("assertion failed: array.length == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(array.length,1)))}; const mergedArray = (array.concat(["wing"])); @@ -1985,8 +2245,8 @@ class $Root extends $stdlib.std.Resource { {((cond) => {if (!cond) throw new Error("assertion failed: mergedBuckets.length == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(mergedBuckets.length,2)))}; {((cond) => {if (!cond) throw new Error("assertion failed: mergedBuckets.at(0).node.id == \"myBucket\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((mergedBuckets.at(0)).node.id,"myBucket")))}; {((cond) => {if (!cond) throw new Error("assertion failed: mergedBuckets.at(1).node.id == \"mySecondBucket\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((mergedBuckets.at(1)).node.id,"mySecondBucket")))}; - this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:concatMutArray()",new $Closure4(this,"$Closure4")); - this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:concatArray()",new $Closure5(this,"$Closure5")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:concatMutArray()",new $Closure5(this,"$Closure5")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:concatArray()",new $Closure6(this,"$Closure6")); const e = ["hello", "wing"]; {((cond) => {if (!cond) throw new Error("assertion failed: e.contains(\"wing\")")})(e.includes("wing"))}; {((cond) => {if (!cond) throw new Error("assertion failed: !e.contains(\"NotThere\")")})((!e.includes("NotThere")))}; @@ -1996,17 +2256,17 @@ class $Root extends $stdlib.std.Resource { const h = ["hello", "wing"]; {((cond) => {if (!cond) throw new Error("assertion failed: h.contains(\"wing\")")})(h.includes("wing"))}; {((cond) => {if (!cond) throw new Error("assertion failed: !h.contains(\"NotThere\")")})((!h.includes("NotThere")))}; - this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:contains()",new $Closure6(this,"$Closure6")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:contains()",new $Closure7(this,"$Closure7")); const g = ["hello", "wing"]; {((cond) => {if (!cond) throw new Error("assertion failed: g.indexOf(\"wing\") == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(g.indexOf("wing"),1)))}; {((cond) => {if (!cond) throw new Error("assertion failed: g.indexOf(\"notThere\") == -1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(g.indexOf("notThere"),(-1))))}; {((cond) => {if (!cond) throw new Error("assertion failed: buckets.indexOf(bucket) == 0")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(buckets.indexOf(bucket),0)))}; {((cond) => {if (!cond) throw new Error("assertion failed: buckets.indexOf(dummyBucket) == -1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(buckets.indexOf(dummyBucket),(-1))))}; - this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:indexOf()",new $Closure7(this,"$Closure7")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:indexOf()",new $Closure8(this,"$Closure8")); const q = ["hello", "wing"]; {((cond) => {if (!cond) throw new Error("assertion failed: q.indexOf(\"wing\") == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(q.indexOf("wing"),1)))}; {((cond) => {if (!cond) throw new Error("assertion failed: q.indexOf(\"notThere\") == -1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(q.indexOf("notThere"),(-1))))}; - this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:indexOfArray()",new $Closure8(this,"$Closure8")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:indexOfArray()",new $Closure9(this,"$Closure9")); const m = ["hello", "wing"]; const delimeter = ";"; const joinedString = (m.join(delimeter)); @@ -2017,8 +2277,8 @@ class $Root extends $stdlib.std.Resource { const joinedStringWithDefault = (m.join()); const expectedStringWithDefault = (((m.at(0)) + separator) + (m.at(1))); {((cond) => {if (!cond) throw new Error("assertion failed: joinedStringWithDefault == expectedStringWithDefault")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(joinedStringWithDefault,expectedStringWithDefault)))}; - this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:join()",new $Closure9(this,"$Closure9")); - this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:joinWithDefaultSeparator()",new $Closure10(this,"$Closure10")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:join()",new $Closure10(this,"$Closure10")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:joinWithDefaultSeparator()",new $Closure11(this,"$Closure11")); const o = ["hello", "wing"]; const p = [...(o)]; {((cond) => {if (!cond) throw new Error("assertion failed: o.length == p.length")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(o.length,p.length)))}; @@ -2026,12 +2286,12 @@ class $Root extends $stdlib.std.Resource { const copiedBuckets = [...(buckets)]; {((cond) => {if (!cond) throw new Error("assertion failed: copiedBuckets.length == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(copiedBuckets.length,1)))}; {((cond) => {if (!cond) throw new Error("assertion failed: copiedBuckets.at(0).node.id == \"myBucket\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((copiedBuckets.at(0)).node.id,"myBucket")))}; - this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:copy()",new $Closure11(this,"$Closure11")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:copy()",new $Closure12(this,"$Closure12")); const v = ["hello", "wing"]; const r = [...(v)]; {((cond) => {if (!cond) throw new Error("assertion failed: q.length == r.length")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(q.length,r.length)))}; {((cond) => {if (!cond) throw new Error("assertion failed: q.at(0) == r.at(0)")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((q.at(0)),(r.at(0)))))}; - this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:copyMut()",new $Closure12(this,"$Closure12")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:copyMut()",new $Closure13(this,"$Closure13")); const lastStr = "wing"; const s = ["hello", lastStr, lastStr]; {((cond) => {if (!cond) throw new Error("assertion failed: s.lastIndexOf(lastStr) == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(s.lastIndexOf(lastStr),2)))}; @@ -2039,9 +2299,10 @@ class $Root extends $stdlib.std.Resource { const multipleBuckets = [bucket, bucket, anotherBucket]; {((cond) => {if (!cond) throw new Error("assertion failed: multipleBuckets.lastIndexOf(bucket) == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(multipleBuckets.lastIndexOf(bucket),1)))}; {((cond) => {if (!cond) throw new Error("assertion failed: multipleBuckets.lastIndexOf(dummyBucket) == -1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(multipleBuckets.lastIndexOf(dummyBucket),(-1))))}; - this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:lastIndexOf()",new $Closure13(this,"$Closure13")); - this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:set()",new $Closure14(this,"$Closure14")); - this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:insert()",new $Closure15(this,"$Closure15")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:lastIndexOf()",new $Closure14(this,"$Closure14")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:set()",new $Closure15(this,"$Closure15")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:insert()",new $Closure16(this,"$Closure16")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:removeFirst()",new $Closure17(this,"$Closure17")); } } const $App = $stdlib.core.App.for(process.env.WING_TARGET); diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_test_sim.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_test_sim.md index 9e06a26a976..5b43eaca61c 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_test_sim.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_test_sim.md @@ -2,24 +2,26 @@ ## stdout.log ```log -pass ─ array.wsim » root/env0/test:length -pass ─ array.wsim » root/env1/test:at() -pass ─ array.wsim » root/env10/test:copy() -pass ─ array.wsim » root/env11/test:copyMut() -pass ─ array.wsim » root/env12/test:lastIndexOf() -pass ─ array.wsim » root/env13/test:set() -pass ─ array.wsim » root/env14/test:insert() -pass ─ array.wsim » root/env2/test:pushAndPop() -pass ─ array.wsim » root/env3/test:concatMutArray() -pass ─ array.wsim » root/env4/test:concatArray() -pass ─ array.wsim » root/env5/test:contains() -pass ─ array.wsim » root/env6/test:indexOf() -pass ─ array.wsim » root/env7/test:indexOfArray() -pass ─ array.wsim » root/env8/test:join() -pass ─ array.wsim » root/env9/test:joinWithDefaultSeparator() +pass ─ array.wsim » root/env0/test:length +pass ─ array.wsim » root/env1/test:at() +pass ─ array.wsim » root/env10/test:joinWithDefaultSeparator() +pass ─ array.wsim » root/env11/test:copy() +pass ─ array.wsim » root/env12/test:copyMut() +pass ─ array.wsim » root/env13/test:lastIndexOf() +pass ─ array.wsim » root/env14/test:set() +pass ─ array.wsim » root/env15/test:insert() +pass ─ array.wsim » root/env16/test:removeFirst() +pass ─ array.wsim » root/env2/test:pushAndPop() +pass ─ array.wsim » root/env3/test:popAt() +pass ─ array.wsim » root/env4/test:concatMutArray() +pass ─ array.wsim » root/env5/test:concatArray() +pass ─ array.wsim » root/env6/test:contains() +pass ─ array.wsim » root/env7/test:indexOf() +pass ─ array.wsim » root/env8/test:indexOfArray() +pass ─ array.wsim » root/env9/test:join() -Tests 15 passed (15) +Tests 17 passed (17) Test Files 1 passed (1) Duration ``` From babdb53e514798e741ed9a9f12a61affd682572f Mon Sep 17 00:00:00 2001 From: Mark McCulloh Date: Wed, 30 Aug 2023 12:55:46 -0400 Subject: [PATCH 26/48] chore(repo): quality gate must run even if e2e tests are skipped (#4019) A regression from https://github.com/winglang/wing/pull/3791 *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc22b077f19..5269f964192 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -314,12 +314,16 @@ jobs: quality-gate: name: Quality Gate runs-on: ubuntu-latest + if: ${{ !cancelled() }} needs: - build - e2e-test - benchmark - test steps: + - name: Check failure + if: failure() + run: exit 1 - name: Download patches uses: actions/download-artifact@v3 - name: Check patches From 87edd508cfb6593778bd166eede72a4bc2bbd422 Mon Sep 17 00:00:00 2001 From: Mark McCulloh Date: Wed, 30 Aug 2023 13:57:27 -0400 Subject: [PATCH 27/48] chore(repo): quality gate must fail if preceding jobs fail (#4023) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `failure()` checks for failed steps within a job, not jobs within a workflow. Sorry for testing in prod, workflows are hard 😢 *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5269f964192..64e953bb668 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -322,7 +322,7 @@ jobs: - test steps: - name: Check failure - if: failure() + if: needs.build.result == 'failure' || needs.e2e-test.result == 'failure' || needs.benchmark.result == 'failure' || needs.test.result == 'failure' run: exit 1 - name: Download patches uses: actions/download-artifact@v3 From 60ae42223eda5d67117888a8bad60f7a7522f4c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wiktor=20Zaj=C4=85c?= Date: Wed, 30 Aug 2023 22:34:53 +0200 Subject: [PATCH 28/48] feat(docs): add note about variable mutability (#4024) It took me a while to realise how to create a mutable variable - I feel like `let [var] [: ] = [] ;` is not enough, it is easy to not notice the `[var]`. I added a small note about it. ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [ ] Tests added (always) - [x] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- docs/docs/03-language-reference.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/docs/03-language-reference.md b/docs/docs/03-language-reference.md index 6f944506455..71d40890090 100644 --- a/docs/docs/03-language-reference.md +++ b/docs/docs/03-language-reference.md @@ -1523,10 +1523,17 @@ let [var] [: ] = [] ; Assignment operator is `=`. Assignment declaration keyword is `let`. Type annotation is optional if a default value is given. +`var` keyword after `let` makes a variable mutable. > ```TS > let n = 10; > let s: str = "hello"; +> s = "world"; // error: Variable is not reassignable +> ``` + +> ```TS +> let var s = "hello"; +> s = "hello world"; // compiles > ``` [`▲ top`][top] From 33165cf561269a57a6d77e22709287abee1f97f7 Mon Sep 17 00:00:00 2001 From: Chris Rybicki Date: Wed, 30 Aug 2023 21:29:40 -0400 Subject: [PATCH 29/48] fix(docs): broken link in strings section (#4028) Closes https://github.com/winglang/docsite/issues/586 ## Checklist - [ ] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [ ] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- docs/docs/03-language-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/03-language-reference.md b/docs/docs/03-language-reference.md index 71d40890090..95a1b77c1b0 100644 --- a/docs/docs/03-language-reference.md +++ b/docs/docs/03-language-reference.md @@ -1964,7 +1964,7 @@ assert(cat1 != dog); // compile time error (can't compare different types) ### 6.2 Strings -String reference doc is available [here](https://www.winglang.io/docs/language-guide/language-reference#61-strings). +String reference doc is available [here](https://www.winglang.io/docs/standard-library/std/api-reference#string-). Type of string is UTF-16 internally. All string declaration variants are multi-line. From 8cad1fa867afcded368db915c54cd4634cfc694a Mon Sep 17 00:00:00 2001 From: Harsh Date: Fri, 1 Sep 2023 02:02:43 +0530 Subject: [PATCH 30/48] feat(sdk): regex.match (#4039) An implementation to have regex introduced into Winglang Motivation [first step to Add Regex type to String.replace() #3644 ] Solution I have implemented regex match function by using the match in Javascript. It takes in the userString and regexPattern string (example below) and returns a true if they match ; false otherwise. ``` let userString = "peach"; let regexPattern = "p[a-z]+h"; let matches = userString.match(regexPattern); assert(matches == true); ``` It returns a boolean value of true or false. ## Checklist - [ ] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [ ] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- examples/tests/sdk_tests/regex/match.w | 62 +++++ libs/wingc/src/lib.rs | 4 +- libs/wingsdk/src/index.ts | 1 + libs/wingsdk/src/regex/index.ts | 1 + libs/wingsdk/src/regex/regex.ts | 28 +++ .../sdk_tests/regex/match.w_compile_tf-aws.md | 229 ++++++++++++++++++ .../sdk_tests/regex/match.w_test_sim.md | 12 + 7 files changed, 336 insertions(+), 1 deletion(-) create mode 100644 examples/tests/sdk_tests/regex/match.w create mode 100644 libs/wingsdk/src/regex/index.ts create mode 100644 libs/wingsdk/src/regex/regex.ts create mode 100644 tools/hangar/__snapshots__/test_corpus/sdk_tests/regex/match.w_compile_tf-aws.md create mode 100644 tools/hangar/__snapshots__/test_corpus/sdk_tests/regex/match.w_test_sim.md diff --git a/examples/tests/sdk_tests/regex/match.w b/examples/tests/sdk_tests/regex/match.w new file mode 100644 index 00000000000..9b508b1aa19 --- /dev/null +++ b/examples/tests/sdk_tests/regex/match.w @@ -0,0 +1,62 @@ +bring regex; + +let matches1 = regex.match("p[a-z]+ch" , "peach"); +let matches2 = regex.match("[0-9]+" , "0923"); +let matches3 = regex.match("[0-9]+" , "0a923"); +let matches4 = regex.match("^([a-zA-Z0-9_.-]+)@[a-z]+.[a-z]+\$" , "james_bond007@wing.com"); + +let matches5 = regex.match("p([a-z]+)ch" , "leach"); +let matches6 = regex.match("^([a-zA-Z0-9_.-]+)@[a-z]+.[a-z]+" , "@james_bond007@gmail.com"); + +let matches7 = regex.match("^Mary" , "Mary had a little lamb"); +let matches8 = regex.match("lamb\$" , "Mary had a little lamb"); + +let matches9 = regex.match("lamb\$" , "Mary had a little hamb"); +let matches10 = regex.match("^([a-zA-Z0-9_.-]+)@[a-z]+.[a-z]+\$" , "james_bond007@gmail.com123"); + +assert(matches1 == true ); +assert(matches2 == true ); +assert(matches3 == true ); +assert(matches4 == true ); + +assert(matches5 == false); +assert(matches6 == false); + +assert(matches7 == true ); +assert(matches8 == true ); + +assert(matches9 == false); +assert(matches10 == false); + +test "inflight match" { + + let matches1 = regex.match("p[a-z]+ch" , "peach"); + let matches2 = regex.match("[0-9]+" , "0923"); + let matches3 = regex.match("[0-9]+" , "0a923"); + let matches4 = regex.match("^([a-zA-Z0-9_.-]+)@[a-z]+.[a-z]+\$" , "james_bond007@wing.com"); + + let matches5 = regex.match("p([a-z]+)ch" , "leach"); + let matches6 = regex.match("^([a-zA-Z0-9_.-]+)@[a-z]+.[a-z]+" , "@james_bond007@gmail.com"); + + let matches7 = regex.match("^Mary" , "Mary had a little lamb"); + let matches8 = regex.match("lamb\$" , "Mary had a little lamb"); + + let matches9 = regex.match("lamb\$" , "Mary had a little hamb"); + let matches10 = regex.match("^([a-zA-Z0-9_.-]+)@[a-z]+.[a-z]+\$" , "james_bond007@gmail.com123"); + + + assert(matches1 == true ); + assert(matches2 == true ); + assert(matches3 == true ); + assert(matches4 == true ); + + assert(matches5 == false); + assert(matches6 == false); + + assert(matches7 == true ); + assert(matches8 == true ); + + assert(matches9 == false); + assert(matches10 == false); + +} diff --git a/libs/wingc/src/lib.rs b/libs/wingc/src/lib.rs index 5846a13f48c..1d9075316eb 100644 --- a/libs/wingc/src/lib.rs +++ b/libs/wingc/src/lib.rs @@ -71,14 +71,16 @@ const WINGSDK_HTTP_MODULE: &'static str = "http"; const WINGSDK_MATH_MODULE: &'static str = "math"; const WINGSDK_AWS_MODULE: &'static str = "aws"; const WINGSDK_EX_MODULE: &'static str = "ex"; +const WINGSDK_REGEX_MODULE: &'static str = "regex"; -const WINGSDK_BRINGABLE_MODULES: [&'static str; 6] = [ +const WINGSDK_BRINGABLE_MODULES: [&'static str; 7] = [ WINGSDK_CLOUD_MODULE, WINGSDK_UTIL_MODULE, WINGSDK_HTTP_MODULE, WINGSDK_MATH_MODULE, WINGSDK_AWS_MODULE, WINGSDK_EX_MODULE, + WINGSDK_REGEX_MODULE, ]; const WINGSDK_DURATION: &'static str = "std.Duration"; diff --git a/libs/wingsdk/src/index.ts b/libs/wingsdk/src/index.ts index 20aed240ddf..bcb3a10115b 100644 --- a/libs/wingsdk/src/index.ts +++ b/libs/wingsdk/src/index.ts @@ -4,6 +4,7 @@ export * as core from "./core"; export * as ex from "./ex"; export * as http from "./http"; export * as math from "./math"; +export * as regex from "./regex"; export * as aws from "./shared-aws"; export * as std from "./std"; export * as testing from "./testing"; diff --git a/libs/wingsdk/src/regex/index.ts b/libs/wingsdk/src/regex/index.ts new file mode 100644 index 00000000000..b37fc67da44 --- /dev/null +++ b/libs/wingsdk/src/regex/index.ts @@ -0,0 +1 @@ +export * from "./regex"; diff --git a/libs/wingsdk/src/regex/regex.ts b/libs/wingsdk/src/regex/regex.ts new file mode 100644 index 00000000000..da8227cc074 --- /dev/null +++ b/libs/wingsdk/src/regex/regex.ts @@ -0,0 +1,28 @@ +import { InflightClient } from "../core"; + +/** + * Regex utilities and functions + */ +export class Util { + /** + * Check if a regex pattern is matched by a given string + * @param pattern - regex pattern + * @param text - given input string + * @returns true if it matches the pattern, false otherwise + */ + public static match(pattern: string, text: string): boolean { + const regex = new RegExp(pattern); + if (text.match(regex) === null) { + return false; + } + return true; + } + + /** + * @internal + */ + public static _toInflightType(): string { + return InflightClient.forType(__filename, this.name); + } + private constructor() {} +} diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/regex/match.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/regex/match.w_compile_tf-aws.md new file mode 100644 index 00000000000..51405e27007 --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/regex/match.w_compile_tf-aws.md @@ -0,0 +1,229 @@ +# [match.w](../../../../../../examples/tests/sdk_tests/regex/match.w) | compile | tf-aws + +## inflight.$Closure1-1.js +```js +module.exports = function({ $regex_Util }) { + class $Closure1 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const matches1 = (await $regex_Util.match("p[a-z]+ch","peach")); + const matches2 = (await $regex_Util.match("[0-9]+","0923")); + const matches3 = (await $regex_Util.match("[0-9]+","0a923")); + const matches4 = (await $regex_Util.match("^([a-zA-Z0-9_.-]+)@[a-z]+.[a-z]+\$","james_bond007@wing.com")); + const matches5 = (await $regex_Util.match("p([a-z]+)ch","leach")); + const matches6 = (await $regex_Util.match("^([a-zA-Z0-9_.-]+)@[a-z]+.[a-z]+","@james_bond007@gmail.com")); + const matches7 = (await $regex_Util.match("^Mary","Mary had a little lamb")); + const matches8 = (await $regex_Util.match("lamb\$","Mary had a little lamb")); + const matches9 = (await $regex_Util.match("lamb\$","Mary had a little hamb")); + const matches10 = (await $regex_Util.match("^([a-zA-Z0-9_.-]+)@[a-z]+.[a-z]+\$","james_bond007@gmail.com123")); + {((cond) => {if (!cond) throw new Error("assertion failed: matches1 == true ")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches1,true)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches2 == true ")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches2,true)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches3 == true ")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches3,true)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches4 == true ")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches4,true)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches5 == false")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches5,false)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches6 == false")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches6,false)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches7 == true ")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches7,true)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches8 == true ")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches8,true)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches9 == false")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches9,false)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches10 == false")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches10,false)))}; + } + } + return $Closure1; +} + +``` + +## main.tf.json +```json +{ + "//": { + "metadata": { + "backend": "local", + "stackName": "root", + "version": "0.17.0" + }, + "outputs": { + "root": { + "Default": { + "cloud.TestRunner": { + "TestFunctionArns": "WING_TEST_RUNNER_FUNCTION_ARNS" + } + } + } + } + }, + "output": { + "WING_TEST_RUNNER_FUNCTION_ARNS": { + "value": "[[\"root/Default/Default/test:inflight match\",\"${aws_lambda_function.testinflightmatch_Handler_91AFEF4E.arn}\"]]" + } + }, + "provider": { + "aws": [ + {} + ] + }, + "resource": { + "aws_iam_role": { + "testinflightmatch_Handler_IamRole_DA813D38": { + "//": { + "metadata": { + "path": "root/Default/Default/test:inflight match/Handler/IamRole", + "uniqueId": "testinflightmatch_Handler_IamRole_DA813D38" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + } + }, + "aws_iam_role_policy": { + "testinflightmatch_Handler_IamRolePolicy_B7F9EB14": { + "//": { + "metadata": { + "path": "root/Default/Default/test:inflight match/Handler/IamRolePolicy", + "uniqueId": "testinflightmatch_Handler_IamRolePolicy_B7F9EB14" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testinflightmatch_Handler_IamRole_DA813D38.name}" + } + }, + "aws_iam_role_policy_attachment": { + "testinflightmatch_Handler_IamRolePolicyAttachment_B8D01B6A": { + "//": { + "metadata": { + "path": "root/Default/Default/test:inflight match/Handler/IamRolePolicyAttachment", + "uniqueId": "testinflightmatch_Handler_IamRolePolicyAttachment_B8D01B6A" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testinflightmatch_Handler_IamRole_DA813D38.name}" + } + }, + "aws_lambda_function": { + "testinflightmatch_Handler_91AFEF4E": { + "//": { + "metadata": { + "path": "root/Default/Default/test:inflight match/Handler/Default", + "uniqueId": "testinflightmatch_Handler_91AFEF4E" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c8aa61ca", + "WING_TARGET": "tf-aws" + } + }, + "function_name": "Handler-c8aa61ca", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testinflightmatch_Handler_IamRole_DA813D38.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testinflightmatch_Handler_S3Object_2184865C.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + } + }, + "aws_s3_bucket": { + "Code": { + "//": { + "metadata": { + "path": "root/Default/Code", + "uniqueId": "Code" + } + }, + "bucket_prefix": "code-c84a50b1-" + } + }, + "aws_s3_object": { + "testinflightmatch_Handler_S3Object_2184865C": { + "//": { + "metadata": { + "path": "root/Default/Default/test:inflight match/Handler/S3Object", + "uniqueId": "testinflightmatch_Handler_S3Object_2184865C" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + } + } + } +} +``` + +## preflight.js +```js +const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); +const $outdir = process.env.WING_SYNTH_DIR ?? "."; +const $wing_is_test = process.env.WING_IS_TEST === "true"; +const std = $stdlib.std; +const regex = $stdlib.regex; +class $Root extends $stdlib.std.Resource { + constructor(scope, id) { + super(scope, id); + class $Closure1 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure1-1.js")({ + $regex_Util: ${context._lift(regex.Util)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure1Client = ${$Closure1._toInflightType(this)}; + const client = new $Closure1Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + } + const matches1 = (regex.Util.match("p[a-z]+ch","peach")); + const matches2 = (regex.Util.match("[0-9]+","0923")); + const matches3 = (regex.Util.match("[0-9]+","0a923")); + const matches4 = (regex.Util.match("^([a-zA-Z0-9_.-]+)@[a-z]+.[a-z]+\$","james_bond007@wing.com")); + const matches5 = (regex.Util.match("p([a-z]+)ch","leach")); + const matches6 = (regex.Util.match("^([a-zA-Z0-9_.-]+)@[a-z]+.[a-z]+","@james_bond007@gmail.com")); + const matches7 = (regex.Util.match("^Mary","Mary had a little lamb")); + const matches8 = (regex.Util.match("lamb\$","Mary had a little lamb")); + const matches9 = (regex.Util.match("lamb\$","Mary had a little hamb")); + const matches10 = (regex.Util.match("^([a-zA-Z0-9_.-]+)@[a-z]+.[a-z]+\$","james_bond007@gmail.com123")); + {((cond) => {if (!cond) throw new Error("assertion failed: matches1 == true ")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches1,true)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches2 == true ")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches2,true)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches3 == true ")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches3,true)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches4 == true ")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches4,true)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches5 == false")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches5,false)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches6 == false")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches6,false)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches7 == true ")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches7,true)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches8 == true ")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches8,true)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches9 == false")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches9,false)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: matches10 == false")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(matches10,false)))}; + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:inflight match",new $Closure1(this,"$Closure1")); + } +} +const $App = $stdlib.core.App.for(process.env.WING_TARGET); +new $App({ outdir: $outdir, name: "match", rootConstruct: $Root, plugins: $plugins, isTestEnvironment: $wing_is_test, entrypointDir: process.env['WING_SOURCE_DIR'], rootId: process.env['WING_ROOT_ID'] }).synth(); + +``` + diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/regex/match.w_test_sim.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/regex/match.w_test_sim.md new file mode 100644 index 00000000000..72cac6f2158 --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/regex/match.w_test_sim.md @@ -0,0 +1,12 @@ +# [match.w](../../../../../../examples/tests/sdk_tests/regex/match.w) | test | sim + +## stdout.log +```log +pass ─ match.wsim » root/env0/test:inflight match + + +Tests 1 passed (1) +Test Files 1 passed (1) +Duration +``` + From ca6d5bea6c7cf5d16ca65f9ee223d2d3457ab2ec Mon Sep 17 00:00:00 2001 From: Chris Rybicki Date: Thu, 31 Aug 2023 17:26:32 -0400 Subject: [PATCH 31/48] fix(compiler)!: non-static extern methods are not supported (#4027) It's not currently possible for extern method implementations to access class members (like fields, or other instance methods), yet it has still been possible to declare them both ways. This PR introduces an error message if you attempt to add a non-static extern method. In the future, this restriction can be lifted if the capability is supported through a new calling convention with extern JavaScript files or something like that. ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- docs/docs/03-language-reference.md | 2 ++ examples/tests/invalid/extern.w | 3 +-- examples/tests/invalid/extern_static.w | 4 ++++ examples/tests/valid/dynamo.w | 4 ++-- examples/tests/valid/dynamo_awscdk.w | 8 ++++---- examples/tests/valid/extern_implementation.w | 4 ++-- libs/wingc/src/type_check.rs | 9 +++++++++ tools/hangar/__snapshots__/invalid.ts.snap | 15 +++++++++++++++ .../extern_implementation.w_compile_tf-aws.md | 10 +++++----- 9 files changed, 44 insertions(+), 15 deletions(-) create mode 100644 examples/tests/invalid/extern_static.w diff --git a/docs/docs/03-language-reference.md b/docs/docs/03-language-reference.md index 95a1b77c1b0..8b33020cb30 100644 --- a/docs/docs/03-language-reference.md +++ b/docs/docs/03-language-reference.md @@ -1762,6 +1762,8 @@ exports.makeId = function () { Given a method of name X, the compiler will map the method to the JavaScript export with the matching name (without any case conversion). +Extern methods do not support access to class's members through `this`, so they must be declared `static`. + ### 5.2.1 TypeScript It is possible to use TypeScript to write helpers, but at the moment this is not diff --git a/examples/tests/invalid/extern.w b/examples/tests/invalid/extern.w index 3f8e333e8ef..5094dd32f60 100644 --- a/examples/tests/invalid/extern.w +++ b/examples/tests/invalid/extern.w @@ -2,5 +2,4 @@ class Foo { extern "./sad.js" static getNum(): num; //^ "./sad.js" not found extern "not-installed" static tooBad(): bool; -//^ "not-installed" not found -} \ No newline at end of file +} diff --git a/examples/tests/invalid/extern_static.w b/examples/tests/invalid/extern_static.w new file mode 100644 index 00000000000..8c59090ea22 --- /dev/null +++ b/examples/tests/invalid/extern_static.w @@ -0,0 +1,4 @@ +class Foo { + extern "../external_js.js" inflight getGreeting(name: str): str; + //^ Error: extern methods must be declared "static" +} diff --git a/examples/tests/valid/dynamo.w b/examples/tests/valid/dynamo.w index be442dca6e9..e235cf44c06 100644 --- a/examples/tests/valid/dynamo.w +++ b/examples/tests/valid/dynamo.w @@ -54,11 +54,11 @@ class DynamoTable { } } - extern "./dynamo.js" inflight _putItem(tableName: str, item: Json): void; + extern "./dynamo.js" static inflight _putItem(tableName: str, item: Json): void; inflight putItem(item: Map) { let json = this._itemToJson(item); - this._putItem(this.tableName, json); + DynamoTable._putItem(this.tableName, json); } inflight _itemToJson(item: Map): Json { diff --git a/examples/tests/valid/dynamo_awscdk.w b/examples/tests/valid/dynamo_awscdk.w index af609b94a7a..8c5f2c92959 100644 --- a/examples/tests/valid/dynamo_awscdk.w +++ b/examples/tests/valid/dynamo_awscdk.w @@ -60,16 +60,16 @@ class DynamoTable { } } - extern "./dynamo.js" inflight _putItem(tableName: str, item: Json): void; + extern "./dynamo.js" static inflight _putItem(tableName: str, item: Json): void; inflight putItem(item: Map) { let json = this._itemToJson(item); - this._putItem(this.tableName, json); + DynamoTable._putItem(this.tableName, json); } - extern "./dynamo.js" inflight _getItem(tableName: str, key: Json): Json; + extern "./dynamo.js" static inflight _getItem(tableName: str, key: Json): Json; inflight getItem(key: Map): Json { let json = this._itemToJson(key); - return this._getItem(this.tableName, json); + return DynamoTable._getItem(this.tableName, json); } inflight _itemToJson(item: Map): Json { diff --git a/examples/tests/valid/extern_implementation.w b/examples/tests/valid/extern_implementation.w index ca6e42f5354..b5fac4684dd 100644 --- a/examples/tests/valid/extern_implementation.w +++ b/examples/tests/valid/extern_implementation.w @@ -5,7 +5,7 @@ class Foo { extern "./external_js.js" static inflight regexInflight(pattern: str, text: str): bool; extern "./external_js.js" static inflight getUuid(): str; extern "./external_js.js" static inflight getData(): str; - extern "./external_js.js" inflight print(msg: str); + extern "./external_js.js" static inflight print(msg: str); extern "uuid" static v4(): str; inflight call() { @@ -27,5 +27,5 @@ test "call" { } test "console" { - f.print("hey there"); + Foo.print("hey there"); } diff --git a/libs/wingc/src/type_check.rs b/libs/wingc/src/type_check.rs index e5a31414d8d..e3052f3f921 100644 --- a/libs/wingc/src/type_check.rs +++ b/libs/wingc/src/type_check.rs @@ -3941,6 +3941,15 @@ impl<'a> TypeChecker<'a> { self.types.set_scope_env(scope, method_env); self.inner_scopes.push(scope); } + + if let FunctionBody::External(_) = &method_def.body { + if !method_def.is_static { + self.spanned_error( + method_name, + "Extern methods must be declared \"static\" (they cannot access instance members)", + ); + } + } } fn add_method_to_class_env( diff --git a/tools/hangar/__snapshots__/invalid.ts.snap b/tools/hangar/__snapshots__/invalid.ts.snap index e8b14a2625d..35674fef90b 100644 --- a/tools/hangar/__snapshots__/invalid.ts.snap +++ b/tools/hangar/__snapshots__/invalid.ts.snap @@ -752,6 +752,21 @@ error: Failed to resolve extern \\"not-installed\\": Not Found +Tests 1 failed (1) +Test Files 1 failed (1) +Duration " +`; + +exports[`extern_static.w 1`] = ` +"error: Extern methods must be declared \\"static\\" (they cannot access instance members) + --> ../../../examples/tests/invalid/extern_static.w:2:39 + | +2 | extern \\"../external_js.js\\" inflight getGreeting(name: str): str; + | ^^^^^^^^^^^ Extern methods must be declared \\"static\\" (they cannot access instance members) + + + + Tests 1 failed (1) Test Files 1 failed (1) Duration " diff --git a/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md index e3f59932f67..b536e130438 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md @@ -20,7 +20,7 @@ module.exports = function({ $f }) { ## inflight.$Closure2-1.js ```js -module.exports = function({ $f }) { +module.exports = function({ $Foo }) { class $Closure2 { constructor({ }) { const $obj = (...args) => this.handle(...args); @@ -28,7 +28,7 @@ module.exports = function({ $f }) { return $obj; } async handle() { - (await $f.print("hey there")); + (await $Foo.print("hey there")); } } return $Closure2; @@ -51,7 +51,7 @@ module.exports = function({ }) { static async getData() { return (require("/external_js.js")["getData"])() } - async print(msg) { + static async print(msg) { return (require("/external_js.js")["print"])(msg) } async call() { @@ -348,7 +348,7 @@ class $Root extends $stdlib.std.Resource { static _toInflightType(context) { return ` require("./inflight.$Closure2-1.js")({ - $f: ${context._lift(f)}, + $Foo: ${context._lift(Foo)}, }) `; } @@ -368,7 +368,7 @@ class $Root extends $stdlib.std.Resource { } _registerBind(host, ops) { if (ops.includes("handle")) { - $Closure2._registerBindObject(f, host, ["print"]); + $Closure2._registerBindObject(Foo, host, ["print"]); } super._registerBind(host, ops); } From 0858dd856a006533c6257f0d75ce520539e4fd8b Mon Sep 17 00:00:00 2001 From: Mark McCulloh Date: Fri, 1 Sep 2023 09:54:53 -0400 Subject: [PATCH 32/48] chore(build): no need to generate tree-sitter wasm as part of build (#4041) Generating the .wasm for the grammar is only needed when running the tree-sitter playground, otherwise the rust build handles consuming the C files when targeting wasm32-wasi. Skipping this unnecessary work is much faster and removes a pretty big dependency from our core build path (docker, although it's still used in tests) *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- libs/tree-sitter-wing/turbo.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/tree-sitter-wing/turbo.json b/libs/tree-sitter-wing/turbo.json index c17a742995c..a25f0ff3470 100644 --- a/libs/tree-sitter-wing/turbo.json +++ b/libs/tree-sitter-wing/turbo.json @@ -3,7 +3,7 @@ "extends": ["//"], "pipeline": { "build:generate": { - "inputs": ["grammar.js", "src/scanner.c"], + "inputs": ["!*.wasm", "*", "grammar.js", "src/scanner.c"], "outputs": ["src/**", "!src/scanner.c", "bindings/**", "binding.gyp"] }, "build:wasm": { @@ -11,7 +11,8 @@ "outputs": ["tree-sitter-wing.wasm"] }, "compile": { - "dependsOn": ["build:wasm"] + "dependsOn": ["build:generate"], + "inputs": [""] }, "test": { "inputs": ["test/**"], From 7f2871822417d61b7fb35c1db02c93f4a67615b7 Mon Sep 17 00:00:00 2001 From: Chris Rybicki Date: Fri, 1 Sep 2023 15:54:02 -0400 Subject: [PATCH 33/48] fix(compiler): string interpolation of Json is inconsistent (#4044) Fixes #3088 Fixes #3987 Fixes #3988 ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- examples/tests/valid/json_string_interpolation.w | 9 ++++++++- libs/wingc/src/jsify.rs | 2 +- .../json_string_interpolation.w_compile_tf-aws.md | 10 +++++++--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/examples/tests/valid/json_string_interpolation.w b/examples/tests/valid/json_string_interpolation.w index 66f4f6abfa4..697d8bea1b7 100644 --- a/examples/tests/valid/json_string_interpolation.w +++ b/examples/tests/valid/json_string_interpolation.w @@ -4,6 +4,13 @@ let obj = Json { }; let notStringifyStrValue = "string: ${obj.get("strValue")}"; -assert(notStringifyStrValue == "string: test"); +assert(notStringifyStrValue == "string: \"test\""); let stringifyNumValue = "number: ${obj.get("numValue")}"; assert(stringifyNumValue == "number: 1"); + +// string interpolation of Json is equivalent to calling Json.stringify +assert("${obj}" == Json.stringify(obj)); +assert("${obj.get("strValue")}" == Json.stringify(obj.get("strValue"))); + +assert(obj.get("strValue") == Json.parse(Json.stringify(obj.get("strValue")))); +assert(obj.get("strValue") == Json.parse("${obj.get("strValue")}")); diff --git a/libs/wingc/src/jsify.rs b/libs/wingc/src/jsify.rs index 7960c542648..eaef10f1df2 100644 --- a/libs/wingc/src/jsify.rs +++ b/libs/wingc/src/jsify.rs @@ -462,7 +462,7 @@ impl<'a> JSifier<'a> { InterpolatedStringPart::Static(_) => None, InterpolatedStringPart::Expr(e) => Some(match *self.types.get_expr_type(e) { Type::Json(_) | Type::MutJson => { - format!("((e) => typeof e === 'string' ? e : JSON.stringify(e, null, 2))({})", self.jsify_expression(e, ctx)) + format!("JSON.stringify({})", self.jsify_expression(e, ctx)) } _ => self.jsify_expression(e, ctx), }) diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json_string_interpolation.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json_string_interpolation.w_compile_tf-aws.md index 06646c8db7d..6fad7e1558f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json_string_interpolation.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json_string_interpolation.w_compile_tf-aws.md @@ -43,10 +43,14 @@ class $Root extends $stdlib.std.Resource { constructor(scope, id) { super(scope, id); const obj = ({"strValue": "test","numValue": 1}); - const notStringifyStrValue = String.raw({ raw: ["string: ", ""] }, ((e) => typeof e === 'string' ? e : JSON.stringify(e, null, 2))((obj)["strValue"])); - {((cond) => {if (!cond) throw new Error("assertion failed: notStringifyStrValue == \"string: test\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(notStringifyStrValue,"string: test")))}; - const stringifyNumValue = String.raw({ raw: ["number: ", ""] }, ((e) => typeof e === 'string' ? e : JSON.stringify(e, null, 2))((obj)["numValue"])); + const notStringifyStrValue = String.raw({ raw: ["string: ", ""] }, JSON.stringify((obj)["strValue"])); + {((cond) => {if (!cond) throw new Error("assertion failed: notStringifyStrValue == \"string: \\\"test\\\"\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(notStringifyStrValue,"string: \"test\"")))}; + const stringifyNumValue = String.raw({ raw: ["number: ", ""] }, JSON.stringify((obj)["numValue"])); {((cond) => {if (!cond) throw new Error("assertion failed: stringifyNumValue == \"number: 1\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(stringifyNumValue,"number: 1")))}; + {((cond) => {if (!cond) throw new Error("assertion failed: \"${obj}\" == Json.stringify(obj)")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(String.raw({ raw: ["", ""] }, JSON.stringify(obj)),((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([obj]))))}; + {((cond) => {if (!cond) throw new Error("assertion failed: \"${obj.get(\"strValue\")}\" == Json.stringify(obj.get(\"strValue\"))")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(String.raw({ raw: ["", ""] }, JSON.stringify((obj)["strValue"])),((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([(obj)["strValue"]]))))}; + {((cond) => {if (!cond) throw new Error("assertion failed: obj.get(\"strValue\") == Json.parse(Json.stringify(obj.get(\"strValue\")))")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((obj)["strValue"],(JSON.parse(((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([(obj)["strValue"]]))))))}; + {((cond) => {if (!cond) throw new Error("assertion failed: obj.get(\"strValue\") == Json.parse(\"${obj.get(\"strValue\")}\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((obj)["strValue"],(JSON.parse(String.raw({ raw: ["", ""] }, JSON.stringify((obj)["strValue"])))))))}; } } const $App = $stdlib.core.App.for(process.env.WING_TARGET); From f12373996937aa3a90390a97b9943bbe285ca721 Mon Sep 17 00:00:00 2001 From: Narayandas Akhil Achary <62931444+0018akhil@users.noreply.github.com> Date: Sun, 3 Sep 2023 13:17:37 +0530 Subject: [PATCH 34/48] fix(sdk): unable to use path variables in cloud.Api (#3931) Fixes #3919 ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [ ] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- examples/tests/sdk_tests/api/path_vars.w | 64 ++ examples/tests/valid/api_path_vars.w | 25 - examples/tests/valid/api_valid_path.w | 18 +- libs/wingsdk/src/cloud/api.ts | 6 +- .../target-sim/__snapshots__/api.test.ts.snap | 404 ++++++++ libs/wingsdk/test/target-sim/api.test.ts | 56 ++ .../__snapshots__/api.test.ts.snap | 164 ++++ libs/wingsdk/test/target-tf-aws/api.test.ts | 34 + .../api/path_vars.w_compile_tf-aws.md | 929 ++++++++++++++++++ .../sdk_tests/api/path_vars.w_test_sim.md | 15 + .../valid/api_path_vars.w_compile_tf-aws.md | 556 ++++++++++- .../valid/api_path_vars.w_test_sim.md | 7 +- .../valid/api_valid_path.w_compile_tf-aws.md | 96 +- 13 files changed, 2336 insertions(+), 38 deletions(-) create mode 100644 examples/tests/sdk_tests/api/path_vars.w delete mode 100644 examples/tests/valid/api_path_vars.w create mode 100644 tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md create mode 100644 tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_test_sim.md diff --git a/examples/tests/sdk_tests/api/path_vars.w b/examples/tests/sdk_tests/api/path_vars.w new file mode 100644 index 00000000000..8544b0b0b13 --- /dev/null +++ b/examples/tests/sdk_tests/api/path_vars.w @@ -0,0 +1,64 @@ +bring cloud; +bring http; + +let api = new cloud.Api(); + + +let handler = inflight (req: cloud.ApiRequest): cloud.ApiResponse => { + return cloud.ApiResponse { + body: Json.stringify({ user: req.vars.get("name") }), + headers: { "content-type" => "application/json" }, + status: 200 + }; +}; + +let handler_two = inflight (req: cloud.ApiRequest): cloud.ApiResponse => { + return cloud.ApiResponse { + body: Json.stringify({ user: req.vars.get("name"), age: req.vars.get("age") }), + headers: { "content-type" => "application/json" }, + status: 200 + }; +}; + +api.get("/users/{name}", handler); +api.get("/{name}", handler); +api.get("/users/permission/{name}", handler); +api.get("/{name}/{age}", handler_two); + +test "test" { + let username = "tsuf"; + let res: http.Response = http.get("${api.url}/users/${username}"); + + + assert(res.status == 200); + assert(Json.parse(res.body ?? "").get("user") == username); +} + +test "test2" { + let username = "akhil"; + let res: http.Response = http.get("${api.url}/${username}"); + + + assert(res.status == 200); + assert(Json.parse(res.body ?? "").get("user") == username); +} + +test "test3" { + let username = "akhil"; + let res: http.Response = http.get("${api.url}/users/permission/${username}"); + + + assert(res.status == 200); + assert(Json.parse(res.body ?? "").get("user") == username); +} + +test "test4" { + let username = "akhil"; + let age = "23"; + let res: http.Response = http.get("${api.url}/${username}/${age}"); + + + assert(res.status == 200); + assert(Json.parse(res.body ?? "").get("user") == username); + assert(Json.parse(res.body ?? "").get("age") == age); +} diff --git a/examples/tests/valid/api_path_vars.w b/examples/tests/valid/api_path_vars.w deleted file mode 100644 index ea8c4c63273..00000000000 --- a/examples/tests/valid/api_path_vars.w +++ /dev/null @@ -1,25 +0,0 @@ -bring cloud; -bring http; - -let api = new cloud.Api(); - - -let handler = inflight (req: cloud.ApiRequest): cloud.ApiResponse => { - return cloud.ApiResponse { - body: Json.stringify({ user: req.vars.get("name") }), - headers: { "content-type" => "application/json" }, - status: 200 - }; -}; - -api.get("/users/{name}", handler); - - -test "test" { - let username = "tsuf"; - let res: http.Response = http.get("${api.url}/users/${username}"); - - - assert(res.status == 200); - assert(Json.parse(res.body ?? "").get("user") == username); -} diff --git a/examples/tests/valid/api_valid_path.w b/examples/tests/valid/api_valid_path.w index cdeeb6df8ff..8ea9a668d5e 100644 --- a/examples/tests/valid/api_valid_path.w +++ b/examples/tests/valid/api_valid_path.w @@ -40,7 +40,17 @@ testInvalidPath("/test/path/{unclosed"); testInvalidPath("/test/m{issplaced}"); testInvalidPath("/test/{misspla}ced"); testInvalidPath("/test/{}/empty"); - +testInvalidPath("/{sup:er/:annoying//path}"); +testInvalidPath("/{::another:annoying:path}"); +testInvalidPath("/n0t_alphanumer1cPa:th"); +testInvalidPath("/{with}/{two:invali4d#}/variables"); +testInvalidPath("/{unclosed"); +testInvalidPath("/m{issplaced}"); +testInvalidPath("/{misspla}ced"); +testInvalidPath("test"); +testInvalidPath("/{}/empty"); +testInvalidPath("/{}"); + // valid paths testValidPath("/test"); @@ -48,3 +58,9 @@ testValidPath("/test/alphanumer1cPa_th"); testValidPath("/test/regular/path"); testValidPath("/test/pa-th/{with}/two/{variable_s}/f?bla=5&b=6"); testValidPath("/test/param/is/{last}"); +testValidPath("/test/{param}"); +testValidPath("/{param}"); +testValidPath("/t/{param}"); +testValidPath("/test/regular/path/{param}"); +testValidPath("/test/segment1/{param1}/segment2?query1=value1?query2=value2"); +testValidPath("/test/segment1/segment2?query=value1&query2=value2"); diff --git a/libs/wingsdk/src/cloud/api.ts b/libs/wingsdk/src/cloud/api.ts index d1bd395f397..f839f51f7a7 100644 --- a/libs/wingsdk/src/cloud/api.ts +++ b/libs/wingsdk/src/cloud/api.ts @@ -172,7 +172,11 @@ export abstract class Api extends Resource { * @internal */ protected _validatePath(path: string) { - if (!/^([^\{\}\:\n]|.+\/\{\w+\}(\/|$))*$/g.test(path)) { + if ( + !/^(\/[a-zA-Z0-9_\-]+(\/\{[a-zA-Z0-9_\-]+\}|\/[a-zA-Z0-9_\-]+)*(?:\?[^#]*)?)?$|^(\/\{[a-zA-Z0-9_\-]+\})*\/?$/g.test( + path + ) + ) { throw new Error( `Invalid path ${path}. Url cannot contain ":", params contains only alpha-numeric chars or "_".` ); diff --git a/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap index b5fb8f6d08e..66c8ee9c55d 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap @@ -1266,6 +1266,410 @@ return class Handler { } `; +exports[`api with 'name' & 'age' parameter 1`] = ` +[ + "wingsdk.cloud.TestRunner created.", + "wingsdk.cloud.Function created.", + "Server listening on http://127.0.0.1:", + "wingsdk.cloud.Api created.", + "wingsdk.sim.EventMapping created.", + "Processing \\"GET /{name}/{age}\\" params={\\"name\\":\\"akhil\\",\\"age\\":\\"23\\"}).", + "Invoke (payload={\\"headers\\":{\\"host\\":\\"127.0.0.1:\\",\\"connection\\":\\"keep-alive\\",\\"accept\\":\\"*/*\\",\\"accept-language\\":\\"*\\",\\"sec-fetch-mode\\":\\"cors\\",\\"user-agent\\":\\"undici\\",\\"accept-encoding\\":\\"gzip, deflate\\"},\\"body\\":\\"\\",\\"method\\":\\"GET\\",\\"path\\":\\"/akhil/23\\",\\"query\\":{},\\"vars\\":{\\"name\\":\\"akhil\\",\\"age\\":\\"23\\"}}).", + "GET /{name}/{age} - 200.", + "wingsdk.sim.EventMapping deleted.", + "Closing server on http://127.0.0.1:", + "wingsdk.cloud.Api deleted.", + "wingsdk.cloud.Function deleted.", + "wingsdk.cloud.TestRunner deleted.", +] +`; + +exports[`api with 'name' & 'age' parameter 2`] = ` +{ + ".wing/onrequesthandler-e645076f_c887c38c.js": "exports.handler = async function(event) { + return await (new ((function(){ +return class Handler { + constructor(clients) { + for (const [name, client] of Object.entries(clients)) { + this[name] = client; + } + } + async handle(req) { return { status: 200, body: req.vars ?? {} }; } +}; +})())({ + +})).handle(event); +};", + "connections.json": { + "connections": [ + { + "name": "get()", + "source": "root/my_api", + "target": "root/my_api/OnRequestHandler-e645076f", + }, + ], + "version": "connections-0.1", + }, + "simulator.json": { + "resources": [ + { + "attrs": {}, + "path": "root/cloud.TestRunner", + "props": { + "tests": {}, + }, + "type": "wingsdk.cloud.TestRunner", + }, + { + "attrs": {}, + "path": "root/my_api/OnRequestHandler-e645076f", + "props": { + "environmentVariables": {}, + "sourceCodeFile": ".wing/onrequesthandler-e645076f_c887c38c.js", + "sourceCodeLanguage": "javascript", + "timeout": 60000, + }, + "type": "wingsdk.cloud.Function", + }, + { + "attrs": {}, + "path": "root/my_api", + "props": { + "openApiSpec": { + "openapi": "3.0.3", + "paths": { + "/{name}/{age}": { + "get": { + "operationId": "get-{name}/{age}", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string", + }, + }, + { + "in": "path", + "name": "age", + "required": true, + "schema": { + "type": "string", + }, + }, + ], + "responses": { + "200": { + "content": {}, + "description": "200 response", + }, + }, + }, + }, + }, + }, + }, + "type": "wingsdk.cloud.Api", + }, + { + "attrs": {}, + "path": "root/my_api/ApiEventMapping-e645076f", + "props": { + "publisher": "\${root/my_api#attrs.handle}", + "subscriber": "\${root/my_api/OnRequestHandler-e645076f#attrs.handle}", + "subscriptionProps": { + "routes": [ + { + "method": "GET", + "path": "/{name}/{age}", + }, + ], + }, + }, + "type": "wingsdk.sim.EventMapping", + }, + ], + "sdkVersion": "0.0.0", + }, + "tree.json": { + "tree": { + "children": { + "Handler": { + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69", + }, + "display": { + "description": "An inflight resource", + "hidden": true, + "title": "Inflight", + }, + "id": "Handler", + "path": "root/Handler", + }, + "cloud.TestRunner": { + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69", + }, + "display": { + "description": "A suite of APIs for running tests and collecting results.", + "hidden": true, + "title": "TestRunner", + }, + "id": "cloud.TestRunner", + "path": "root/cloud.TestRunner", + }, + "my_api": { + "children": { + "ApiEventMapping-e645076f": { + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69", + }, + "display": { + "hidden": true, + }, + "id": "ApiEventMapping-e645076f", + "path": "root/my_api/ApiEventMapping-e645076f", + }, + "OnRequestHandler-e645076f": { + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69", + }, + "display": { + "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", + "title": "get()", + }, + "id": "OnRequestHandler-e645076f", + "path": "root/my_api/OnRequestHandler-e645076f", + }, + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69", + }, + "display": { + "description": "A REST API endpoint", + "title": "Api", + }, + "id": "my_api", + "path": "root/my_api", + }, + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69", + }, + "id": "root", + "path": "root", + }, + "version": "tree-0.1", + }, +} +`; + +exports[`api with 'name' parameter 1`] = ` +[ + "wingsdk.cloud.TestRunner created.", + "wingsdk.cloud.Function created.", + "Server listening on http://127.0.0.1:", + "wingsdk.cloud.Api created.", + "wingsdk.sim.EventMapping created.", + "Processing \\"GET /{name}\\" params={\\"name\\":\\"akhil\\"}).", + "Invoke (payload={\\"headers\\":{\\"host\\":\\"127.0.0.1:\\",\\"connection\\":\\"keep-alive\\",\\"accept\\":\\"*/*\\",\\"accept-language\\":\\"*\\",\\"sec-fetch-mode\\":\\"cors\\",\\"user-agent\\":\\"undici\\",\\"accept-encoding\\":\\"gzip, deflate\\"},\\"body\\":\\"\\",\\"method\\":\\"GET\\",\\"path\\":\\"/akhil\\",\\"query\\":{},\\"vars\\":{\\"name\\":\\"akhil\\"}}).", + "GET /{name} - 200.", + "wingsdk.sim.EventMapping deleted.", + "Closing server on http://127.0.0.1:", + "wingsdk.cloud.Api deleted.", + "wingsdk.cloud.Function deleted.", + "wingsdk.cloud.TestRunner deleted.", +] +`; + +exports[`api with 'name' parameter 2`] = ` +{ + ".wing/onrequesthandler-e645076f_c887c38c.js": "exports.handler = async function(event) { + return await (new ((function(){ +return class Handler { + constructor(clients) { + for (const [name, client] of Object.entries(clients)) { + this[name] = client; + } + } + async handle(req) { return { status: 200, body: req.vars ?? {} }; } +}; +})())({ + +})).handle(event); +};", + "connections.json": { + "connections": [ + { + "name": "get()", + "source": "root/my_api", + "target": "root/my_api/OnRequestHandler-e645076f", + }, + ], + "version": "connections-0.1", + }, + "simulator.json": { + "resources": [ + { + "attrs": {}, + "path": "root/cloud.TestRunner", + "props": { + "tests": {}, + }, + "type": "wingsdk.cloud.TestRunner", + }, + { + "attrs": {}, + "path": "root/my_api/OnRequestHandler-e645076f", + "props": { + "environmentVariables": {}, + "sourceCodeFile": ".wing/onrequesthandler-e645076f_c887c38c.js", + "sourceCodeLanguage": "javascript", + "timeout": 60000, + }, + "type": "wingsdk.cloud.Function", + }, + { + "attrs": {}, + "path": "root/my_api", + "props": { + "openApiSpec": { + "openapi": "3.0.3", + "paths": { + "/{name}": { + "get": { + "operationId": "get-{name}", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string", + }, + }, + ], + "responses": { + "200": { + "content": {}, + "description": "200 response", + }, + }, + }, + }, + }, + }, + }, + "type": "wingsdk.cloud.Api", + }, + { + "attrs": {}, + "path": "root/my_api/ApiEventMapping-e645076f", + "props": { + "publisher": "\${root/my_api#attrs.handle}", + "subscriber": "\${root/my_api/OnRequestHandler-e645076f#attrs.handle}", + "subscriptionProps": { + "routes": [ + { + "method": "GET", + "path": "/{name}", + }, + ], + }, + }, + "type": "wingsdk.sim.EventMapping", + }, + ], + "sdkVersion": "0.0.0", + }, + "tree.json": { + "tree": { + "children": { + "Handler": { + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69", + }, + "display": { + "description": "An inflight resource", + "hidden": true, + "title": "Inflight", + }, + "id": "Handler", + "path": "root/Handler", + }, + "cloud.TestRunner": { + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69", + }, + "display": { + "description": "A suite of APIs for running tests and collecting results.", + "hidden": true, + "title": "TestRunner", + }, + "id": "cloud.TestRunner", + "path": "root/cloud.TestRunner", + }, + "my_api": { + "children": { + "ApiEventMapping-e645076f": { + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69", + }, + "display": { + "hidden": true, + }, + "id": "ApiEventMapping-e645076f", + "path": "root/my_api/ApiEventMapping-e645076f", + }, + "OnRequestHandler-e645076f": { + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69", + }, + "display": { + "description": "A cloud function (FaaS)", + "sourceModule": "@winglang/sdk", + "title": "get()", + }, + "id": "OnRequestHandler-e645076f", + "path": "root/my_api/OnRequestHandler-e645076f", + }, + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69", + }, + "display": { + "description": "A REST API endpoint", + "title": "Api", + }, + "id": "my_api", + "path": "root/my_api", + }, + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.2.69", + }, + "id": "root", + "path": "root", + }, + "version": "tree-0.1", + }, +} +`; + exports[`api with multiple GET routes and one lambda 1`] = ` { ".wing/onrequesthandler-e645076f_c887c38c.js": "exports.handler = async function(event) { diff --git a/libs/wingsdk/test/target-sim/api.test.ts b/libs/wingsdk/test/target-sim/api.test.ts index c57cd5d295a..daccf9da22f 100644 --- a/libs/wingsdk/test/target-sim/api.test.ts +++ b/libs/wingsdk/test/target-sim/api.test.ts @@ -104,6 +104,62 @@ test("api with one GET route with request params", async () => { expect(app.snapshot()).toMatchSnapshot(); }); +test("api with 'name' parameter", async () => { + // GIVEN + const ROUTE = "/{name}"; + + const app = new SimApp(); + const api = cloud.Api._newApi(app, "my_api"); + const inflight = Testing.makeHandler( + app, + "Handler", + INFLIGHT_CODE_ECHO_PARAMS + ); + api.get(ROUTE, inflight); + + // WHEN + const s = await app.startSimulator(); + const apiUrl = getApiUrl(s, "/my_api"); + const response = await fetch(`${apiUrl}/akhil`, { method: "GET" }); + + // THEN + await s.stop(); + + expect(response.status).toEqual(200); + expect(await response.json()).toEqual({ name: "akhil" }); + + expect(listMessages(s)).toMatchSnapshot(); + expect(app.snapshot()).toMatchSnapshot(); +}); + +test("api with 'name' & 'age' parameter", async () => { + // GIVEN + const ROUTE = "/{name}/{age}"; + + const app = new SimApp(); + const api = cloud.Api._newApi(app, "my_api"); + const inflight = Testing.makeHandler( + app, + "Handler", + INFLIGHT_CODE_ECHO_PARAMS + ); + api.get(ROUTE, inflight); + + // WHEN + const s = await app.startSimulator(); + const apiUrl = getApiUrl(s, "/my_api"); + const response = await fetch(`${apiUrl}/akhil/23`, { method: "GET" }); + + // THEN + await s.stop(); + + expect(response.status).toEqual(200); + expect(await response.json()).toEqual({ name: "akhil", age: "23" }); + + expect(listMessages(s)).toMatchSnapshot(); + expect(app.snapshot()).toMatchSnapshot(); +}); + test("api with multiple GET routes and one lambda", () => { // GIVEN const app = new SimApp(); diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/api.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/api.test.ts.snap index db5970b4911..3dd2d4d766d 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/api.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/api.test.ts.snap @@ -1,5 +1,169 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html +exports[`api with 'name' & 'age' parameter 1`] = ` +{ + "openapi": "3.0.3", + "paths": { + "/{name}/{age}": { + "get": { + "operationId": "get-{name}/{age}", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string", + }, + }, + { + "in": "path", + "name": "age", + "required": true, + "schema": { + "type": "string", + }, + }, + ], + "responses": { + "200": { + "content": {}, + "description": "200 response", + }, + }, + "x-amazon-apigateway-integration": { + "contentHandling": "CONVERT_TO_TEXT", + "httpMethod": "POST", + "passthroughBehavior": "when_no_match", + "responses": { + "default": { + "statusCode": "200", + }, + }, + "type": "aws_proxy", + "uri": "arn:aws:apigateway:\${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/\${aws_lambda_function.Api_Api-OnRequest-c5395e41_37F21C2B.arn}/invocations", + }, + }, + }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, + }, +} +`; + +exports[`api with 'name' parameter 1`] = ` +{ + "openapi": "3.0.3", + "paths": { + "/{name}": { + "get": { + "operationId": "get-{name}", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string", + }, + }, + ], + "responses": { + "200": { + "content": {}, + "description": "200 response", + }, + }, + "x-amazon-apigateway-integration": { + "contentHandling": "CONVERT_TO_TEXT", + "httpMethod": "POST", + "passthroughBehavior": "when_no_match", + "responses": { + "default": { + "statusCode": "200", + }, + }, + "type": "aws_proxy", + "uri": "arn:aws:apigateway:\${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/\${aws_lambda_function.Api_Api-OnRequest-c5395e41_37F21C2B.arn}/invocations", + }, + }, + }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "consumes": [ + "application/json", + ], + "produces": [ + "application/json", + ], + "responses": { + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\\"statusCode\\": 404}", + }, + "responses": { + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, + }, +} +`; + exports[`api with CONNECT route 1`] = ` { "openapi": "3.0.3", diff --git a/libs/wingsdk/test/target-tf-aws/api.test.ts b/libs/wingsdk/test/target-tf-aws/api.test.ts index 5a362fb1ee5..97556cfe2d3 100644 --- a/libs/wingsdk/test/target-tf-aws/api.test.ts +++ b/libs/wingsdk/test/target-tf-aws/api.test.ts @@ -164,6 +164,40 @@ test("api with path parameter", () => { expect(extractApiSpec(output)).toMatchSnapshot(); }); +test("api with 'name' parameter", () => { + // GIVEN + const app = new tfaws.App({ outdir: mkdtemp() }); + const api = new Api(app, "Api"); + + const inflight = Testing.makeHandler(app, "Handler", INFLIGHT_CODE); + + api.get("/{name}", inflight); + + const output = app.synth(); + + // THEN + expect(tfResourcesOfCount(output, "aws_api_gateway_rest_api")).toEqual(1); + expect(tfResourcesOfCount(output, "aws_lambda_function")).toEqual(1); + expect(extractApiSpec(output)).toMatchSnapshot(); +}); + +test("api with 'name' & 'age' parameter", () => { + // GIVEN + const app = new tfaws.App({ outdir: mkdtemp() }); + const api = new Api(app, "Api"); + + const inflight = Testing.makeHandler(app, "Handler", INFLIGHT_CODE); + + api.get("/{name}/{age}", inflight); + + const output = app.synth(); + + // THEN + expect(tfResourcesOfCount(output, "aws_api_gateway_rest_api")).toEqual(1); + expect(tfResourcesOfCount(output, "aws_lambda_function")).toEqual(1); + expect(extractApiSpec(output)).toMatchSnapshot(); +}); + test("api with POST route", () => { // GIVEN const app = new tfaws.App({ outdir: mkdtemp() }); diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md new file mode 100644 index 00000000000..77922c0d393 --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md @@ -0,0 +1,929 @@ +# [path_vars.w](../../../../../../examples/tests/sdk_tests/api/path_vars.w) | compile | tf-aws + +## inflight.$Closure1-1.js +```js +module.exports = function({ $std_Json }) { + class $Closure1 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle(req) { + return ({"body": ((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([({"user": (req.vars)["name"]})]),"headers": ({"content-type": "application/json"}),"status": 200}); + } + } + return $Closure1; +} + +``` + +## inflight.$Closure2-1.js +```js +module.exports = function({ $std_Json }) { + class $Closure2 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle(req) { + return ({"body": ((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([({"user": (req.vars)["name"],"age": (req.vars)["age"]})]),"headers": ({"content-type": "application/json"}),"status": 200}); + } + } + return $Closure2; +} + +``` + +## inflight.$Closure3-1.js +```js +module.exports = function({ $api_url, $http_Util, $std_Json }) { + class $Closure3 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const username = "tsuf"; + const res = (await $http_Util.get(String.raw({ raw: ["", "/users/", ""] }, $api_url, username))); + {((cond) => {if (!cond) throw new Error("assertion failed: res.status == 200")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(res.status,200)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["user"],username)))}; + } + } + return $Closure3; +} + +``` + +## inflight.$Closure4-1.js +```js +module.exports = function({ $api_url, $http_Util, $std_Json }) { + class $Closure4 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const username = "akhil"; + const res = (await $http_Util.get(String.raw({ raw: ["", "/", ""] }, $api_url, username))); + {((cond) => {if (!cond) throw new Error("assertion failed: res.status == 200")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(res.status,200)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["user"],username)))}; + } + } + return $Closure4; +} + +``` + +## inflight.$Closure5-1.js +```js +module.exports = function({ $api_url, $http_Util, $std_Json }) { + class $Closure5 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const username = "akhil"; + const res = (await $http_Util.get(String.raw({ raw: ["", "/users/permission/", ""] }, $api_url, username))); + {((cond) => {if (!cond) throw new Error("assertion failed: res.status == 200")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(res.status,200)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["user"],username)))}; + } + } + return $Closure5; +} + +``` + +## inflight.$Closure6-1.js +```js +module.exports = function({ $api_url, $http_Util, $std_Json }) { + class $Closure6 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const username = "akhil"; + const age = "23"; + const res = (await $http_Util.get(String.raw({ raw: ["", "/", "/", ""] }, $api_url, username, age))); + {((cond) => {if (!cond) throw new Error("assertion failed: res.status == 200")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(res.status,200)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["user"],username)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"age\") == age")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["age"],age)))}; + } + } + return $Closure6; +} + +``` + +## main.tf.json +```json +{ + "//": { + "metadata": { + "backend": "local", + "stackName": "root", + "version": "0.17.0" + }, + "outputs": { + "root": { + "Default": { + "cloud.TestRunner": { + "TestFunctionArns": "WING_TEST_RUNNER_FUNCTION_ARNS" + } + } + } + } + }, + "data": { + "aws_region": { + "Region": { + "//": { + "metadata": { + "path": "root/Default/Region", + "uniqueId": "Region" + } + } + } + } + }, + "output": { + "WING_TEST_RUNNER_FUNCTION_ARNS": { + "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"],[\"root/Default/Default/test:test2\",\"${aws_lambda_function.testtest2_Handler_EB79E487.arn}\"],[\"root/Default/Default/test:test3\",\"${aws_lambda_function.testtest3_Handler_A2A8E3A1.arn}\"],[\"root/Default/Default/test:test4\",\"${aws_lambda_function.testtest4_Handler_4B54514B.arn}\"]]" + } + }, + "provider": { + "aws": [ + {} + ] + }, + "resource": { + "aws_api_gateway_deployment": { + "cloudApi_api_deployment_545514BF": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/deployment", + "uniqueId": "cloudApi_api_deployment_545514BF" + } + }, + "lifecycle": { + "create_before_destroy": true + }, + "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", + "triggers": { + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" + } + } + }, + "aws_api_gateway_rest_api": { + "cloudApi_api_2B334D75": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/api", + "uniqueId": "cloudApi_api_2B334D75" + } + }, + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users/{name}\":{\"get\":{\"operationId\":\"get-users/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{name}\":{\"get\":{\"operationId\":\"get-{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/users/permission/{name}\":{\"get\":{\"operationId\":\"get-users/permission/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{name}/{age}\":{\"get\":{\"operationId\":\"get-{name}/{age}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"age\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "name": "api-c895068c" + } + }, + "aws_api_gateway_stage": { + "cloudApi_api_stage_BBB283E4": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/stage", + "uniqueId": "cloudApi_api_stage_BBB283E4" + } + }, + "deployment_id": "${aws_api_gateway_deployment.cloudApi_api_deployment_545514BF.id}", + "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", + "stage_name": "prod" + } + }, + "aws_iam_role": { + "cloudApi_cloudApi-OnRequest-86898773_IamRole_6300C24F": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-86898773/IamRole", + "uniqueId": "cloudApi_cloudApi-OnRequest-86898773_IamRole_6300C24F" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRole", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testtest2_Handler_IamRole_9304BBE5": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test2/Handler/IamRole", + "uniqueId": "testtest2_Handler_IamRole_9304BBE5" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testtest3_Handler_IamRole_6E5F9CB2": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test3/Handler/IamRole", + "uniqueId": "testtest3_Handler_IamRole_6E5F9CB2" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testtest4_Handler_IamRole_F3E77BF2": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test4/Handler/IamRole", + "uniqueId": "testtest4_Handler_IamRole_F3E77BF2" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testtest_Handler_IamRole_15693C93": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test/Handler/IamRole", + "uniqueId": "testtest_Handler_IamRole_15693C93" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + } + }, + "aws_iam_role_policy": { + "cloudApi_cloudApi-OnRequest-86898773_IamRolePolicy_DAC639E5": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-86898773/IamRolePolicy", + "uniqueId": "cloudApi_cloudApi-OnRequest-86898773_IamRolePolicy_DAC639E5" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-86898773_IamRole_6300C24F.name}" + }, + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicy_8BF9C89F": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRolePolicy", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicy_8BF9C89F" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" + }, + "testtest2_Handler_IamRolePolicy_77807769": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test2/Handler/IamRolePolicy", + "uniqueId": "testtest2_Handler_IamRolePolicy_77807769" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testtest2_Handler_IamRole_9304BBE5.name}" + }, + "testtest3_Handler_IamRolePolicy_CD8584B9": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test3/Handler/IamRolePolicy", + "uniqueId": "testtest3_Handler_IamRolePolicy_CD8584B9" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testtest3_Handler_IamRole_6E5F9CB2.name}" + }, + "testtest4_Handler_IamRolePolicy_92DB0F08": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test4/Handler/IamRolePolicy", + "uniqueId": "testtest4_Handler_IamRolePolicy_92DB0F08" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testtest4_Handler_IamRole_F3E77BF2.name}" + }, + "testtest_Handler_IamRolePolicy_AF0279BD": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test/Handler/IamRolePolicy", + "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" + } + }, + "aws_iam_role_policy_attachment": { + "cloudApi_cloudApi-OnRequest-86898773_IamRolePolicyAttachment_6E485A17": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-86898773/IamRolePolicyAttachment", + "uniqueId": "cloudApi_cloudApi-OnRequest-86898773_IamRolePolicyAttachment_6E485A17" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-86898773_IamRole_6300C24F.name}" + }, + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicyAttachment_5383D6A2": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRolePolicyAttachment", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicyAttachment_5383D6A2" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" + }, + "testtest2_Handler_IamRolePolicyAttachment_57665B6F": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test2/Handler/IamRolePolicyAttachment", + "uniqueId": "testtest2_Handler_IamRolePolicyAttachment_57665B6F" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testtest2_Handler_IamRole_9304BBE5.name}" + }, + "testtest3_Handler_IamRolePolicyAttachment_EA1CC147": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test3/Handler/IamRolePolicyAttachment", + "uniqueId": "testtest3_Handler_IamRolePolicyAttachment_EA1CC147" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testtest3_Handler_IamRole_6E5F9CB2.name}" + }, + "testtest4_Handler_IamRolePolicyAttachment_AC735E44": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test4/Handler/IamRolePolicyAttachment", + "uniqueId": "testtest4_Handler_IamRolePolicyAttachment_AC735E44" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testtest4_Handler_IamRole_F3E77BF2.name}" + }, + "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", + "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" + } + }, + "aws_lambda_function": { + "cloudApi_cloudApi-OnRequest-86898773_701F5CA7": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-86898773/Default", + "uniqueId": "cloudApi_cloudApi-OnRequest-86898773_701F5CA7" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "cloud-Api-OnRequest-86898773-c8ed6547", + "WING_TARGET": "tf-aws" + } + }, + "function_name": "cloud-Api-OnRequest-86898773-c8ed6547", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-86898773_IamRole_6300C24F.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.cloudApi_cloudApi-OnRequest-86898773_S3Object_12D28469.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/Default", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", + "WING_TARGET": "tf-aws" + } + }, + "function_name": "cloud-Api-OnRequest-cdafee6e-c8147384", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testtest2_Handler_EB79E487": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test2/Handler/Default", + "uniqueId": "testtest2_Handler_EB79E487" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c89fe587", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c89fe587", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testtest2_Handler_IamRole_9304BBE5.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testtest2_Handler_S3Object_21FCD712.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testtest3_Handler_A2A8E3A1": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test3/Handler/Default", + "uniqueId": "testtest3_Handler_A2A8E3A1" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c8445457", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c8445457", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testtest3_Handler_IamRole_6E5F9CB2.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testtest3_Handler_S3Object_417A3842.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testtest4_Handler_4B54514B": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test4/Handler/Default", + "uniqueId": "testtest4_Handler_4B54514B" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c82aef8d", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c82aef8d", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testtest4_Handler_IamRole_F3E77BF2.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testtest4_Handler_S3Object_7A3CDC0E.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testtest_Handler_295107CC": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test/Handler/Default", + "uniqueId": "testtest_Handler_295107CC" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c8f4f2a1", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c8f4f2a1", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + } + }, + "aws_lambda_permission": { + "cloudApi_api_permission-GET-2e836e2d_1D868589": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-2e836e2d", + "uniqueId": "cloudApi_api_permission-GET-2e836e2d_1D868589" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/users/permission/{name}", + "statement_id": "AllowExecutionFromAPIGateway-GET-2e836e2d" + }, + "cloudApi_api_permission-GET-9f89597e_FFBE5338": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-9f89597e", + "uniqueId": "cloudApi_api_permission-GET-9f89597e_FFBE5338" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/users/{name}", + "statement_id": "AllowExecutionFromAPIGateway-GET-9f89597e" + }, + "cloudApi_api_permission-GET-da43a2f2_1CE7916D": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-da43a2f2", + "uniqueId": "cloudApi_api_permission-GET-da43a2f2_1CE7916D" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/{name}", + "statement_id": "AllowExecutionFromAPIGateway-GET-da43a2f2" + }, + "cloudApi_api_permission-GET-e6c024e8_94CCF201": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-e6c024e8", + "uniqueId": "cloudApi_api_permission-GET-e6c024e8_94CCF201" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/{name}/{age}", + "statement_id": "AllowExecutionFromAPIGateway-GET-e6c024e8" + } + }, + "aws_s3_bucket": { + "Code": { + "//": { + "metadata": { + "path": "root/Default/Code", + "uniqueId": "Code" + } + }, + "bucket_prefix": "code-c84a50b1-" + } + }, + "aws_s3_object": { + "cloudApi_cloudApi-OnRequest-86898773_S3Object_12D28469": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-86898773/S3Object", + "uniqueId": "cloudApi_cloudApi-OnRequest-86898773_S3Object_12D28469" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/S3Object", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testtest2_Handler_S3Object_21FCD712": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test2/Handler/S3Object", + "uniqueId": "testtest2_Handler_S3Object_21FCD712" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testtest3_Handler_S3Object_417A3842": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test3/Handler/S3Object", + "uniqueId": "testtest3_Handler_S3Object_417A3842" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testtest4_Handler_S3Object_7A3CDC0E": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test4/Handler/S3Object", + "uniqueId": "testtest4_Handler_S3Object_7A3CDC0E" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testtest_Handler_S3Object_9F4E28A7": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test/Handler/S3Object", + "uniqueId": "testtest_Handler_S3Object_9F4E28A7" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + } + } + } +} +``` + +## preflight.js +```js +const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); +const $outdir = process.env.WING_SYNTH_DIR ?? "."; +const $wing_is_test = process.env.WING_IS_TEST === "true"; +const std = $stdlib.std; +const cloud = $stdlib.cloud; +const http = $stdlib.http; +class $Root extends $stdlib.std.Resource { + constructor(scope, id) { + super(scope, id); + class $Closure1 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure1-1.js")({ + $std_Json: ${context._lift(std.Json)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure1Client = ${$Closure1._toInflightType(this)}; + const client = new $Closure1Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + } + class $Closure2 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure2-1.js")({ + $std_Json: ${context._lift(std.Json)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure2Client = ${$Closure2._toInflightType(this)}; + const client = new $Closure2Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + } + class $Closure3 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure3-1.js")({ + $api_url: ${context._lift(api.url)}, + $http_Util: ${context._lift(http.Util)}, + $std_Json: ${context._lift(std.Json)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure3Client = ${$Closure3._toInflightType(this)}; + const client = new $Closure3Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure3._registerBindObject(api.url, host, []); + } + super._registerBind(host, ops); + } + } + class $Closure4 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure4-1.js")({ + $api_url: ${context._lift(api.url)}, + $http_Util: ${context._lift(http.Util)}, + $std_Json: ${context._lift(std.Json)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure4Client = ${$Closure4._toInflightType(this)}; + const client = new $Closure4Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure4._registerBindObject(api.url, host, []); + } + super._registerBind(host, ops); + } + } + class $Closure5 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure5-1.js")({ + $api_url: ${context._lift(api.url)}, + $http_Util: ${context._lift(http.Util)}, + $std_Json: ${context._lift(std.Json)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure5Client = ${$Closure5._toInflightType(this)}; + const client = new $Closure5Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure5._registerBindObject(api.url, host, []); + } + super._registerBind(host, ops); + } + } + class $Closure6 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure6-1.js")({ + $api_url: ${context._lift(api.url)}, + $http_Util: ${context._lift(http.Util)}, + $std_Json: ${context._lift(std.Json)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure6Client = ${$Closure6._toInflightType(this)}; + const client = new $Closure6Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure6._registerBindObject(api.url, host, []); + } + super._registerBind(host, ops); + } + } + const api = this.node.root.newAbstract("@winglang/sdk.cloud.Api",this,"cloud.Api"); + const handler = new $Closure1(this,"$Closure1"); + const handler_two = new $Closure2(this,"$Closure2"); + (api.get("/users/{name}",handler)); + (api.get("/{name}",handler)); + (api.get("/users/permission/{name}",handler)); + (api.get("/{name}/{age}",handler_two)); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure3(this,"$Closure3")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test2",new $Closure4(this,"$Closure4")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test3",new $Closure5(this,"$Closure5")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test4",new $Closure6(this,"$Closure6")); + } +} +const $App = $stdlib.core.App.for(process.env.WING_TARGET); +new $App({ outdir: $outdir, name: "path_vars", rootConstruct: $Root, plugins: $plugins, isTestEnvironment: $wing_is_test, entrypointDir: process.env['WING_SOURCE_DIR'], rootId: process.env['WING_ROOT_ID'] }).synth(); + +``` + diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_test_sim.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_test_sim.md new file mode 100644 index 00000000000..d8c0e957f2a --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_test_sim.md @@ -0,0 +1,15 @@ +# [path_vars.w](../../../../../../examples/tests/sdk_tests/api/path_vars.w) | test | sim + +## stdout.log +```log +pass ─ path_vars.wsim » root/env0/test:test +pass ─ path_vars.wsim » root/env1/test:test2 +pass ─ path_vars.wsim » root/env2/test:test3 +pass ─ path_vars.wsim » root/env3/test:test4 + + +Tests 4 passed (4) +Test Files 1 passed (1) +Duration +``` + diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md index 93573fab137..c32ae02d8e9 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md @@ -20,8 +20,26 @@ module.exports = function({ $std_Json }) { ## inflight.$Closure2-1.js ```js -module.exports = function({ $api_url, $http_Util, $std_Json }) { +module.exports = function({ $std_Json }) { class $Closure2 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle(req) { + return ({"body": ((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([({"user": (req.vars)["name"],"age": (req.vars)["age"]})]),"headers": ({"content-type": "application/json"}),"status": 200}); + } + } + return $Closure2; +} + +``` + +## inflight.$Closure3-1.js +```js +module.exports = function({ $api_url, $http_Util, $std_Json }) { + class $Closure3 { constructor({ }) { const $obj = (...args) => this.handle(...args); Object.setPrototypeOf($obj, this); @@ -34,7 +52,72 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["user"],username)))}; } } - return $Closure2; + return $Closure3; +} + +``` + +## inflight.$Closure4-1.js +```js +module.exports = function({ $api_url, $http_Util, $std_Json }) { + class $Closure4 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const username = "akhil"; + const res = (await $http_Util.get(String.raw({ raw: ["", "/", ""] }, $api_url, username))); + {((cond) => {if (!cond) throw new Error("assertion failed: res.status == 200")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(res.status,200)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["user"],username)))}; + } + } + return $Closure4; +} + +``` + +## inflight.$Closure5-1.js +```js +module.exports = function({ $api_url, $http_Util, $std_Json }) { + class $Closure5 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const username = "akhil"; + const res = (await $http_Util.get(String.raw({ raw: ["", "/users/permission/", ""] }, $api_url, username))); + {((cond) => {if (!cond) throw new Error("assertion failed: res.status == 200")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(res.status,200)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["user"],username)))}; + } + } + return $Closure5; +} + +``` + +## inflight.$Closure6-1.js +```js +module.exports = function({ $api_url, $http_Util, $std_Json }) { + class $Closure6 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const username = "akhil"; + const age = "23"; + const res = (await $http_Util.get(String.raw({ raw: ["", "/", "/", ""] }, $api_url, username, age))); + {((cond) => {if (!cond) throw new Error("assertion failed: res.status == 200")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(res.status,200)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["user"],username)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"age\") == age")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["age"],age)))}; + } + } + return $Closure6; } ``` @@ -72,7 +155,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"]]" + "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"],[\"root/Default/Default/test:test2\",\"${aws_lambda_function.testtest2_Handler_EB79E487.arn}\"],[\"root/Default/Default/test:test3\",\"${aws_lambda_function.testtest3_Handler_A2A8E3A1.arn}\"],[\"root/Default/Default/test:test4\",\"${aws_lambda_function.testtest4_Handler_4B54514B.arn}\"]]" } }, "provider": { @@ -106,7 +189,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users/{name}\":{\"get\":{\"operationId\":\"get-users/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users/{name}\":{\"get\":{\"operationId\":\"get-users/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{name}\":{\"get\":{\"operationId\":\"get-{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/users/permission/{name}\":{\"get\":{\"operationId\":\"get-users/permission/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{name}/{age}\":{\"get\":{\"operationId\":\"get-{name}/{age}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"age\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, @@ -124,6 +207,15 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { } }, "aws_iam_role": { + "cloudApi_cloudApi-OnRequest-86898773_IamRole_6300C24F": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-86898773/IamRole", + "uniqueId": "cloudApi_cloudApi-OnRequest-86898773_IamRole_6300C24F" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, "cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442": { "//": { "metadata": { @@ -133,6 +225,33 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" }, + "testtest2_Handler_IamRole_9304BBE5": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test2/Handler/IamRole", + "uniqueId": "testtest2_Handler_IamRole_9304BBE5" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testtest3_Handler_IamRole_6E5F9CB2": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test3/Handler/IamRole", + "uniqueId": "testtest3_Handler_IamRole_6E5F9CB2" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testtest4_Handler_IamRole_F3E77BF2": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test4/Handler/IamRole", + "uniqueId": "testtest4_Handler_IamRole_F3E77BF2" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, "testtest_Handler_IamRole_15693C93": { "//": { "metadata": { @@ -144,6 +263,16 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { } }, "aws_iam_role_policy": { + "cloudApi_cloudApi-OnRequest-86898773_IamRolePolicy_DAC639E5": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-86898773/IamRolePolicy", + "uniqueId": "cloudApi_cloudApi-OnRequest-86898773_IamRolePolicy_DAC639E5" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-86898773_IamRole_6300C24F.name}" + }, "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicy_8BF9C89F": { "//": { "metadata": { @@ -154,6 +283,36 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" }, + "testtest2_Handler_IamRolePolicy_77807769": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test2/Handler/IamRolePolicy", + "uniqueId": "testtest2_Handler_IamRolePolicy_77807769" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testtest2_Handler_IamRole_9304BBE5.name}" + }, + "testtest3_Handler_IamRolePolicy_CD8584B9": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test3/Handler/IamRolePolicy", + "uniqueId": "testtest3_Handler_IamRolePolicy_CD8584B9" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testtest3_Handler_IamRole_6E5F9CB2.name}" + }, + "testtest4_Handler_IamRolePolicy_92DB0F08": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test4/Handler/IamRolePolicy", + "uniqueId": "testtest4_Handler_IamRolePolicy_92DB0F08" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testtest4_Handler_IamRole_F3E77BF2.name}" + }, "testtest_Handler_IamRolePolicy_AF0279BD": { "//": { "metadata": { @@ -166,6 +325,16 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { } }, "aws_iam_role_policy_attachment": { + "cloudApi_cloudApi-OnRequest-86898773_IamRolePolicyAttachment_6E485A17": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-86898773/IamRolePolicyAttachment", + "uniqueId": "cloudApi_cloudApi-OnRequest-86898773_IamRolePolicyAttachment_6E485A17" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-86898773_IamRole_6300C24F.name}" + }, "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicyAttachment_5383D6A2": { "//": { "metadata": { @@ -176,6 +345,36 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" }, + "testtest2_Handler_IamRolePolicyAttachment_57665B6F": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test2/Handler/IamRolePolicyAttachment", + "uniqueId": "testtest2_Handler_IamRolePolicyAttachment_57665B6F" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testtest2_Handler_IamRole_9304BBE5.name}" + }, + "testtest3_Handler_IamRolePolicyAttachment_EA1CC147": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test3/Handler/IamRolePolicyAttachment", + "uniqueId": "testtest3_Handler_IamRolePolicyAttachment_EA1CC147" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testtest3_Handler_IamRole_6E5F9CB2.name}" + }, + "testtest4_Handler_IamRolePolicyAttachment_AC735E44": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test4/Handler/IamRolePolicyAttachment", + "uniqueId": "testtest4_Handler_IamRolePolicyAttachment_AC735E44" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testtest4_Handler_IamRole_F3E77BF2.name}" + }, "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { "//": { "metadata": { @@ -188,6 +387,35 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { } }, "aws_lambda_function": { + "cloudApi_cloudApi-OnRequest-86898773_701F5CA7": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-86898773/Default", + "uniqueId": "cloudApi_cloudApi-OnRequest-86898773_701F5CA7" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "cloud-Api-OnRequest-86898773-c8ed6547", + "WING_TARGET": "tf-aws" + } + }, + "function_name": "cloud-Api-OnRequest-86898773-c8ed6547", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-86898773_IamRole_6300C24F.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.cloudApi_cloudApi-OnRequest-86898773_S3Object_12D28469.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F": { "//": { "metadata": { @@ -217,6 +445,96 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "subnet_ids": [] } }, + "testtest2_Handler_EB79E487": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test2/Handler/Default", + "uniqueId": "testtest2_Handler_EB79E487" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c89fe587", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c89fe587", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testtest2_Handler_IamRole_9304BBE5.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testtest2_Handler_S3Object_21FCD712.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testtest3_Handler_A2A8E3A1": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test3/Handler/Default", + "uniqueId": "testtest3_Handler_A2A8E3A1" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c8445457", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c8445457", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testtest3_Handler_IamRole_6E5F9CB2.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testtest3_Handler_S3Object_417A3842.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testtest4_Handler_4B54514B": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test4/Handler/Default", + "uniqueId": "testtest4_Handler_4B54514B" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c82aef8d", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c82aef8d", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testtest4_Handler_IamRole_F3E77BF2.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testtest4_Handler_S3Object_7A3CDC0E.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, "testtest_Handler_295107CC": { "//": { "metadata": { @@ -249,6 +567,19 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { } }, "aws_lambda_permission": { + "cloudApi_api_permission-GET-2e836e2d_1D868589": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-2e836e2d", + "uniqueId": "cloudApi_api_permission-GET-2e836e2d_1D868589" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/users/permission/{name}", + "statement_id": "AllowExecutionFromAPIGateway-GET-2e836e2d" + }, "cloudApi_api_permission-GET-9f89597e_FFBE5338": { "//": { "metadata": { @@ -261,6 +592,32 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "principal": "apigateway.amazonaws.com", "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/users/{name}", "statement_id": "AllowExecutionFromAPIGateway-GET-9f89597e" + }, + "cloudApi_api_permission-GET-da43a2f2_1CE7916D": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-da43a2f2", + "uniqueId": "cloudApi_api_permission-GET-da43a2f2_1CE7916D" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/{name}", + "statement_id": "AllowExecutionFromAPIGateway-GET-da43a2f2" + }, + "cloudApi_api_permission-GET-e6c024e8_94CCF201": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-e6c024e8", + "uniqueId": "cloudApi_api_permission-GET-e6c024e8_94CCF201" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/{name}/{age}", + "statement_id": "AllowExecutionFromAPIGateway-GET-e6c024e8" } }, "aws_s3_bucket": { @@ -275,6 +632,17 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { } }, "aws_s3_object": { + "cloudApi_cloudApi-OnRequest-86898773_S3Object_12D28469": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-86898773/S3Object", + "uniqueId": "cloudApi_cloudApi-OnRequest-86898773_S3Object_12D28469" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, "cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF": { "//": { "metadata": { @@ -286,6 +654,39 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "key": "", "source": "" }, + "testtest2_Handler_S3Object_21FCD712": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test2/Handler/S3Object", + "uniqueId": "testtest2_Handler_S3Object_21FCD712" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testtest3_Handler_S3Object_417A3842": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test3/Handler/S3Object", + "uniqueId": "testtest3_Handler_S3Object_417A3842" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testtest4_Handler_S3Object_7A3CDC0E": { + "//": { + "metadata": { + "path": "root/Default/Default/test:test4/Handler/S3Object", + "uniqueId": "testtest4_Handler_S3Object_7A3CDC0E" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, "testtest_Handler_S3Object_9F4E28A7": { "//": { "metadata": { @@ -349,8 +750,6 @@ class $Root extends $stdlib.std.Resource { static _toInflightType(context) { return ` require("./inflight.$Closure2-1.js")({ - $api_url: ${context._lift(api.url)}, - $http_Util: ${context._lift(http.Util)}, $std_Json: ${context._lift(std.Json)}, }) `; @@ -369,17 +768,158 @@ class $Root extends $stdlib.std.Resource { _getInflightOps() { return ["handle", "$inflight_init"]; } + } + class $Closure3 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure3-1.js")({ + $api_url: ${context._lift(api.url)}, + $http_Util: ${context._lift(http.Util)}, + $std_Json: ${context._lift(std.Json)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure3Client = ${$Closure3._toInflightType(this)}; + const client = new $Closure3Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure3._registerBindObject(api.url, host, []); + } + super._registerBind(host, ops); + } + } + class $Closure4 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure4-1.js")({ + $api_url: ${context._lift(api.url)}, + $http_Util: ${context._lift(http.Util)}, + $std_Json: ${context._lift(std.Json)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure4Client = ${$Closure4._toInflightType(this)}; + const client = new $Closure4Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure4._registerBindObject(api.url, host, []); + } + super._registerBind(host, ops); + } + } + class $Closure5 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure5-1.js")({ + $api_url: ${context._lift(api.url)}, + $http_Util: ${context._lift(http.Util)}, + $std_Json: ${context._lift(std.Json)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure5Client = ${$Closure5._toInflightType(this)}; + const client = new $Closure5Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure5._registerBindObject(api.url, host, []); + } + super._registerBind(host, ops); + } + } + class $Closure6 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure6-1.js")({ + $api_url: ${context._lift(api.url)}, + $http_Util: ${context._lift(http.Util)}, + $std_Json: ${context._lift(std.Json)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure6Client = ${$Closure6._toInflightType(this)}; + const client = new $Closure6Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } _registerBind(host, ops) { if (ops.includes("handle")) { - $Closure2._registerBindObject(api.url, host, []); + $Closure6._registerBindObject(api.url, host, []); } super._registerBind(host, ops); } } const api = this.node.root.newAbstract("@winglang/sdk.cloud.Api",this,"cloud.Api"); const handler = new $Closure1(this,"$Closure1"); + const handler_two = new $Closure2(this,"$Closure2"); (api.get("/users/{name}",handler)); - this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure2(this,"$Closure2")); + (api.get("/{name}",handler)); + (api.get("/users/permission/{name}",handler)); + (api.get("/{name}/{age}",handler_two)); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure3(this,"$Closure3")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test2",new $Closure4(this,"$Closure4")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test3",new $Closure5(this,"$Closure5")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test4",new $Closure6(this,"$Closure6")); } } const $App = $stdlib.core.App.for(process.env.WING_TARGET); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_test_sim.md b/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_test_sim.md index 6fa31afb5eb..c404af2b4d1 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_test_sim.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_test_sim.md @@ -2,10 +2,13 @@ ## stdout.log ```log -pass ─ api_path_vars.wsim » root/env0/test:test +pass ─ api_path_vars.wsim » root/env0/test:test +pass ─ api_path_vars.wsim » root/env1/test:test2 +pass ─ api_path_vars.wsim » root/env2/test:test3 +pass ─ api_path_vars.wsim » root/env3/test:test4 -Tests 1 passed (1) +Tests 4 passed (4) Test Files 1 passed (1) Duration ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md index a227839df51..c2902ae8fbd 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md @@ -85,7 +85,7 @@ module.exports = function({ }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/test\":{\"get\":{\"operationId\":\"get-test\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/alphanumer1cPa_th\":{\"get\":{\"operationId\":\"get-test/alphanumer1cPa_th\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/regular/path\":{\"get\":{\"operationId\":\"get-test/regular/path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/pa-th/{with}/two/{variable_s}/f?bla=5&b=6\":{\"get\":{\"operationId\":\"get-test/pa-th/{with}/two/{variable_s}/f?bla=5&b=6\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"with\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"variable_s\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/param/is/{last}\":{\"get\":{\"operationId\":\"get-test/param/is/{last}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"last\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/test\":{\"get\":{\"operationId\":\"get-test\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/alphanumer1cPa_th\":{\"get\":{\"operationId\":\"get-test/alphanumer1cPa_th\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/regular/path\":{\"get\":{\"operationId\":\"get-test/regular/path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/pa-th/{with}/two/{variable_s}/f?bla=5&b=6\":{\"get\":{\"operationId\":\"get-test/pa-th/{with}/two/{variable_s}/f?bla=5&b=6\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"with\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"variable_s\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/param/is/{last}\":{\"get\":{\"operationId\":\"get-test/param/is/{last}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"last\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/{param}\":{\"get\":{\"operationId\":\"get-test/{param}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"param\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{param}\":{\"get\":{\"operationId\":\"get-{param}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"param\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/t/{param}\":{\"get\":{\"operationId\":\"get-t/{param}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"param\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/regular/path/{param}\":{\"get\":{\"operationId\":\"get-test/regular/path/{param}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"param\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/segment1/{param1}/segment2?query1=value1?query2=value2\":{\"get\":{\"operationId\":\"get-test/segment1/{param1}/segment2?query1=value1?query2=value2\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"param1\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/segment1/segment2?query=value1&query2=value2\":{\"get\":{\"operationId\":\"get-test/segment1/segment2?query=value1&query2=value2\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, @@ -182,6 +182,32 @@ module.exports = function({ }) { "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/test/pa-th/{with}/two/{variable_s}/f?bla=5&b=6", "statement_id": "AllowExecutionFromAPIGateway-GET-08e6e523" }, + "cloudApi_api_permission-GET-28ae85ef_1688C1E0": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-28ae85ef", + "uniqueId": "cloudApi_api_permission-GET-28ae85ef_1688C1E0" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/test/regular/path/{param}", + "statement_id": "AllowExecutionFromAPIGateway-GET-28ae85ef" + }, + "cloudApi_api_permission-GET-43f8ccb9_8100AD68": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-43f8ccb9", + "uniqueId": "cloudApi_api_permission-GET-43f8ccb9_8100AD68" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/t/{param}", + "statement_id": "AllowExecutionFromAPIGateway-GET-43f8ccb9" + }, "cloudApi_api_permission-GET-8d6a8a39_7FDACFF5": { "//": { "metadata": { @@ -208,6 +234,58 @@ module.exports = function({ }) { "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/test/alphanumer1cPa_th", "statement_id": "AllowExecutionFromAPIGateway-GET-8dfdf611" }, + "cloudApi_api_permission-GET-a7795791_E2DC1B63": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-a7795791", + "uniqueId": "cloudApi_api_permission-GET-a7795791_E2DC1B63" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/test/segment1/{param1}/segment2?query1=value1?query2=value2", + "statement_id": "AllowExecutionFromAPIGateway-GET-a7795791" + }, + "cloudApi_api_permission-GET-b171b58d_9FC71DD1": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-b171b58d", + "uniqueId": "cloudApi_api_permission-GET-b171b58d_9FC71DD1" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/test/segment1/segment2?query=value1&query2=value2", + "statement_id": "AllowExecutionFromAPIGateway-GET-b171b58d" + }, + "cloudApi_api_permission-GET-b1b0106b_07B1AED7": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-b1b0106b", + "uniqueId": "cloudApi_api_permission-GET-b1b0106b_07B1AED7" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/test/{param}", + "statement_id": "AllowExecutionFromAPIGateway-GET-b1b0106b" + }, + "cloudApi_api_permission-GET-b49a0d1b_4BF20C26": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-b49a0d1b", + "uniqueId": "cloudApi_api_permission-GET-b49a0d1b_4BF20C26" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/{param}", + "statement_id": "AllowExecutionFromAPIGateway-GET-b49a0d1b" + }, "cloudApi_api_permission-GET-b53ce5f6_5CFB8031": { "//": { "metadata": { @@ -333,11 +411,27 @@ class $Root extends $stdlib.std.Resource { (testInvalidPath("/test/m{issplaced}")); (testInvalidPath("/test/{misspla}ced")); (testInvalidPath("/test/{}/empty")); + (testInvalidPath("/{sup:er/:annoying//path}")); + (testInvalidPath("/{::another:annoying:path}")); + (testInvalidPath("/n0t_alphanumer1cPa:th")); + (testInvalidPath("/{with}/{two:invali4d#}/variables")); + (testInvalidPath("/{unclosed")); + (testInvalidPath("/m{issplaced}")); + (testInvalidPath("/{misspla}ced")); + (testInvalidPath("test")); + (testInvalidPath("/{}/empty")); + (testInvalidPath("/{}")); (testValidPath("/test")); (testValidPath("/test/alphanumer1cPa_th")); (testValidPath("/test/regular/path")); (testValidPath("/test/pa-th/{with}/two/{variable_s}/f?bla=5&b=6")); (testValidPath("/test/param/is/{last}")); + (testValidPath("/test/{param}")); + (testValidPath("/{param}")); + (testValidPath("/t/{param}")); + (testValidPath("/test/regular/path/{param}")); + (testValidPath("/test/segment1/{param1}/segment2?query1=value1?query2=value2")); + (testValidPath("/test/segment1/segment2?query=value1&query2=value2")); } } const $App = $stdlib.core.App.for(process.env.WING_TARGET); From 8e8771fd522d254c5ab89a91f97850a12733956f Mon Sep 17 00:00:00 2001 From: Tsuf Cohen <39455181+tsuf239@users.noreply.github.com> Date: Sun, 3 Sep 2023 12:58:02 +0300 Subject: [PATCH 35/48] fix(sdk): fixing api tests (#4050) Fixes prod sdk tests failure ## Checklist - [ ] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [ ] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- examples/tests/sdk_tests/api/path_vars.w | 8 ++-- .../api/path_vars.w_compile_tf-aws.md | 40 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/examples/tests/sdk_tests/api/path_vars.w b/examples/tests/sdk_tests/api/path_vars.w index 8544b0b0b13..913585f65f9 100644 --- a/examples/tests/sdk_tests/api/path_vars.w +++ b/examples/tests/sdk_tests/api/path_vars.w @@ -21,9 +21,9 @@ let handler_two = inflight (req: cloud.ApiRequest): cloud.ApiResponse => { }; api.get("/users/{name}", handler); -api.get("/{name}", handler); +api.get("/path/{name}", handler); api.get("/users/permission/{name}", handler); -api.get("/{name}/{age}", handler_two); +api.get("/path/{name}/{age}", handler_two); test "test" { let username = "tsuf"; @@ -36,7 +36,7 @@ test "test" { test "test2" { let username = "akhil"; - let res: http.Response = http.get("${api.url}/${username}"); + let res: http.Response = http.get("${api.url}/path/${username}"); assert(res.status == 200); @@ -55,7 +55,7 @@ test "test3" { test "test4" { let username = "akhil"; let age = "23"; - let res: http.Response = http.get("${api.url}/${username}/${age}"); + let res: http.Response = http.get("${api.url}/path/${username}/${age}"); assert(res.status == 200); diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md index 77922c0d393..2867d4f3bf5 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md @@ -68,7 +68,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { } async handle() { const username = "akhil"; - const res = (await $http_Util.get(String.raw({ raw: ["", "/", ""] }, $api_url, username))); + const res = (await $http_Util.get(String.raw({ raw: ["", "/path/", ""] }, $api_url, username))); {((cond) => {if (!cond) throw new Error("assertion failed: res.status == 200")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(res.status,200)))}; {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["user"],username)))}; } @@ -111,7 +111,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { async handle() { const username = "akhil"; const age = "23"; - const res = (await $http_Util.get(String.raw({ raw: ["", "/", "/", ""] }, $api_url, username, age))); + const res = (await $http_Util.get(String.raw({ raw: ["", "/path/", "/", ""] }, $api_url, username, age))); {((cond) => {if (!cond) throw new Error("assertion failed: res.status == 200")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(res.status,200)))}; {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["user"],username)))}; {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"age\") == age")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["age"],age)))}; @@ -189,7 +189,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users/{name}\":{\"get\":{\"operationId\":\"get-users/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{name}\":{\"get\":{\"operationId\":\"get-{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/users/permission/{name}\":{\"get\":{\"operationId\":\"get-users/permission/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{name}/{age}\":{\"get\":{\"operationId\":\"get-{name}/{age}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"age\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users/{name}\":{\"get\":{\"operationId\":\"get-users/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/path/{name}\":{\"get\":{\"operationId\":\"get-path/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/users/permission/{name}\":{\"get\":{\"operationId\":\"get-users/permission/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/path/{name}/{age}\":{\"get\":{\"operationId\":\"get-path/{name}/{age}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"age\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, @@ -580,44 +580,44 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/users/permission/{name}", "statement_id": "AllowExecutionFromAPIGateway-GET-2e836e2d" }, - "cloudApi_api_permission-GET-9f89597e_FFBE5338": { + "cloudApi_api_permission-GET-4dd27486_DC8C045A": { "//": { "metadata": { - "path": "root/Default/Default/cloud.Api/api/permission-GET-9f89597e", - "uniqueId": "cloudApi_api_permission-GET-9f89597e_FFBE5338" + "path": "root/Default/Default/cloud.Api/api/permission-GET-4dd27486", + "uniqueId": "cloudApi_api_permission-GET-4dd27486_DC8C045A" } }, "action": "lambda:InvokeFunction", "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", "principal": "apigateway.amazonaws.com", - "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/users/{name}", - "statement_id": "AllowExecutionFromAPIGateway-GET-9f89597e" + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/path/{name}", + "statement_id": "AllowExecutionFromAPIGateway-GET-4dd27486" }, - "cloudApi_api_permission-GET-da43a2f2_1CE7916D": { + "cloudApi_api_permission-GET-9f89597e_FFBE5338": { "//": { "metadata": { - "path": "root/Default/Default/cloud.Api/api/permission-GET-da43a2f2", - "uniqueId": "cloudApi_api_permission-GET-da43a2f2_1CE7916D" + "path": "root/Default/Default/cloud.Api/api/permission-GET-9f89597e", + "uniqueId": "cloudApi_api_permission-GET-9f89597e_FFBE5338" } }, "action": "lambda:InvokeFunction", "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", "principal": "apigateway.amazonaws.com", - "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/{name}", - "statement_id": "AllowExecutionFromAPIGateway-GET-da43a2f2" + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/users/{name}", + "statement_id": "AllowExecutionFromAPIGateway-GET-9f89597e" }, - "cloudApi_api_permission-GET-e6c024e8_94CCF201": { + "cloudApi_api_permission-GET-f3087603_89DE0E1C": { "//": { "metadata": { - "path": "root/Default/Default/cloud.Api/api/permission-GET-e6c024e8", - "uniqueId": "cloudApi_api_permission-GET-e6c024e8_94CCF201" + "path": "root/Default/Default/cloud.Api/api/permission-GET-f3087603", + "uniqueId": "cloudApi_api_permission-GET-f3087603_89DE0E1C" } }, "action": "lambda:InvokeFunction", "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.function_name}", "principal": "apigateway.amazonaws.com", - "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/{name}/{age}", - "statement_id": "AllowExecutionFromAPIGateway-GET-e6c024e8" + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/path/{name}/{age}", + "statement_id": "AllowExecutionFromAPIGateway-GET-f3087603" } }, "aws_s3_bucket": { @@ -913,9 +913,9 @@ class $Root extends $stdlib.std.Resource { const handler = new $Closure1(this,"$Closure1"); const handler_two = new $Closure2(this,"$Closure2"); (api.get("/users/{name}",handler)); - (api.get("/{name}",handler)); + (api.get("/path/{name}",handler)); (api.get("/users/permission/{name}",handler)); - (api.get("/{name}/{age}",handler_two)); + (api.get("/path/{name}/{age}",handler_two)); this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test",new $Closure3(this,"$Closure3")); this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test2",new $Closure4(this,"$Closure4")); this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:test3",new $Closure5(this,"$Closure5")); From 8efa0bb79ecf3c4b7763d1da57811b06059ae35d Mon Sep 17 00:00:00 2001 From: Subhodip Roy <75121304+subh-cs@users.noreply.github.com> Date: Sun, 3 Sep 2023 15:55:13 +0530 Subject: [PATCH 36/48] fix(docs): broken links fixed (#4054) ## Checklist fixes #4046 - [ ] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [ ] Description explains motivation and solution - [ ] Tests added (always) - [x] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- docs/contributing/01-start-here/01-contributing-to-wing.md | 2 +- docs/docs/02-concepts/03-compile-targets.md | 2 +- .../022-supported-services.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/contributing/01-start-here/01-contributing-to-wing.md b/docs/contributing/01-start-here/01-contributing-to-wing.md index e09a066c477..439df56684c 100644 --- a/docs/contributing/01-start-here/01-contributing-to-wing.md +++ b/docs/contributing/01-start-here/01-contributing-to-wing.md @@ -11,7 +11,7 @@ to know to help out with the Wing project. There are many ways to contribute to Wing: * Reporting bugs through a [GitHub issue](https://github.com/winglang/wing/issues) -* Writing [documentation and guides](https://github.com/winglang/wing/issues?q=is:issue+is:open+sort:updated-desc+label:documentation) or adding [examples](/contributing/start-here/docs#%EF%B8%8F-how-do-i-add-an-example) +* Writing [documentation and guides](https://github.com/winglang/wing/issues?q=is%3Aissue+is%3Aopen+label%3A%22%F0%9F%93%9A+documentation%22) or adding [examples](/contributing/start-here/docs#%EF%B8%8F-how-do-i-add-an-example) * Setting up your [development environment](/contributing/start-here/development) and working on the code * Submitting [pull requests](/contributing/start-here/pull_requests) for new features or helping with [reviews](https://github.com/winglang/wing/pulls) * Picking up a [good first issue](https://github.com/winglang/wing/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+no%3Aassignee+sort%3Aupdated-desc+) to work on diff --git a/docs/docs/02-concepts/03-compile-targets.md b/docs/docs/02-concepts/03-compile-targets.md index 5256e76f21b..6c1da4fbaf5 100644 --- a/docs/docs/02-concepts/03-compile-targets.md +++ b/docs/docs/02-concepts/03-compile-targets.md @@ -33,7 +33,7 @@ These targets contain a combination of provisioning engine and cloud environment ## Portability -The [Wing Cloud Library](/docs/category/cloud-resources) has several classes representing abstracted cloud resources, whose APIs are not specific to a single cloud provider. +The [Wing Cloud Library](/docs/category/cloud-library) has several classes representing abstracted cloud resources, whose APIs are not specific to a single cloud provider. This allows you to write code that can be deployed to any supported cloud environment or provisioning engine. Here's an example of a portable code snippet: diff --git a/docs/docs/999-faq/020-supported-clouds-services-and-engines/022-supported-services.md b/docs/docs/999-faq/020-supported-clouds-services-and-engines/022-supported-services.md index 7a5cd4aaa08..4a9aeb1d728 100644 --- a/docs/docs/999-faq/020-supported-clouds-services-and-engines/022-supported-services.md +++ b/docs/docs/999-faq/020-supported-clouds-services-and-engines/022-supported-services.md @@ -19,5 +19,5 @@ You can also check out our [roadmap](https://www.winglang.io/contributing/status If there are other services you would like to see supported, please let us know through our GitHub or Slack! ## You can use any Terraform resource -Beyond the built-in set of resources in the [Wing Cloud Library](../../standard-library/cloud), you can use any Terraform resource by importing a [CDKTF](https://github.com/hashicorp/terraform-cdk) library corresponding to any given Terraform provider. +Beyond the built-in set of resources in the [Wing Cloud Library](../../category/cloud-library), you can use any Terraform resource by importing a [CDKTF](https://github.com/hashicorp/terraform-cdk) library corresponding to any given Terraform provider. From cd3651fda6b09320d8e0eb96f81facb931373ca3 Mon Sep 17 00:00:00 2001 From: Gary Sassano <10464497+garysassano@users.noreply.github.com> Date: Sun, 3 Sep 2023 16:09:45 +0200 Subject: [PATCH 37/48] fix(sdk)!: change Json.get() and Json.getAt() to throw (#4034) Currently `Json.get()` and `Json.getAt()` don't throw any error if the JSON property you are accessing doesn't exist. Besides, the descriptions of the methods say that they can return `undefined`, which is not true: it's not specified in the return values and that's actually the scope of `Json.tryGet()` and `Json.tryGetAt()`. - [x] Fix `Json.get()` - [x] Fix `Json.getAt()` *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .../02-std/api-reference.md | 12 +- examples/tests/sdk_tests/std/json.w | 111 ++++-- .../completions/mut_json_methods.snap | 4 +- .../completions/optional_chaining.snap | 4 +- .../completions/optional_chaining_auto.snap | 4 +- .../completions/parentheses_expression.snap | 4 +- .../multipart_reference_hover_middle.snap | 2 +- libs/wingsdk/src/std/json.ts | 28 +- tools/hangar/__snapshots__/error.ts.snap | 6 +- .../api/path_vars.w_compile_tf-aws.md | 10 +- .../bucket/events.w_compile_tf-aws.md | 2 +- .../bucket/put_json.w_compile_tf-aws.md | 6 +- .../sdk_tests/std/json.w_compile_tf-aws.md | 317 ++++++++++++++++-- .../sdk_tests/std/json.w_test_sim.md | 10 +- .../table/add_row.w_compile_tf-aws.md | 30 +- .../sdk_tests/table/list.w_compile_tf-aws.md | 14 +- .../valid/api_path_vars.w_compile_tf-aws.md | 2 +- .../capture_containers.w_compile_tf-aws.md | 8 +- .../valid/issue_2889.w_compile_tf-aws.md | 4 +- .../valid/json.w_compile_tf-aws.md | 30 +- .../valid/json_bucket.w_compile_tf-aws.md | 2 +- .../valid/json_static.w_compile_tf-aws.md | 10 +- ...n_string_interpolation.w_compile_tf-aws.md | 10 +- .../valid/std_containers.w_compile_tf-aws.md | 2 +- .../struct_from_json.w_compile_tf-aws.md | 2 +- .../website_with_api.w_compile_tf-aws.md | 6 +- 26 files changed, 476 insertions(+), 164 deletions(-) diff --git a/docs/docs/04-standard-library/02-std/api-reference.md b/docs/docs/04-standard-library/02-std/api-reference.md index 46aa7a6ed45..2b54032ac6f 100644 --- a/docs/docs/04-standard-library/02-std/api-reference.md +++ b/docs/docs/04-standard-library/02-std/api-reference.md @@ -687,7 +687,7 @@ Immutable Json. | asBool | Convert Json element to boolean if possible. | | asNum | Convert Json element to number if possible. | | asStr | Convert Json element to string if possible. | -| get | Returns a specified element from the Json. | +| get | Returns the value associated with the specified Json key. | | getAt | Returns a specified element at a given index from Json Array. | | tryAsBool | Convert Json element to boolean if possible. | | tryAsNum | Convert Json element to number if possible. | @@ -727,13 +727,13 @@ Convert Json element to string if possible. get(key: str): Json ``` -Returns a specified element from the Json. +Returns the value associated with the specified Json key. ###### `key`Required - *Type:* str -The key of the element to return. +The key of the Json property. --- @@ -1348,7 +1348,7 @@ Mutable Json. | asBool | Convert Json element to boolean if possible. | | asNum | Convert Json element to number if possible. | | asStr | Convert Json element to string if possible. | -| get | Returns a specified element from the Json. | +| get | Returns the value associated with the specified Json key. | | getAt | Returns a specified element at a given index from MutJson Array. | | set | Adds or updates an element in MutJson with a specific key and value. | | setAt | Set element in MutJson Array with a specific key and value. | @@ -1390,13 +1390,13 @@ Convert Json element to string if possible. get(key: str): MutJson ``` -Returns a specified element from the Json. +Returns the value associated with the specified Json key. ###### `key`Required - *Type:* str -The key of the element to return. +The key of the Json property. --- diff --git a/examples/tests/sdk_tests/std/json.w b/examples/tests/sdk_tests/std/json.w index 22b4c99f6d0..6d57a24db06 100644 --- a/examples/tests/sdk_tests/std/json.w +++ b/examples/tests/sdk_tests/std/json.w @@ -3,34 +3,86 @@ //----------------------------------------------------------------------------- bring cloud; -// set() & get() -let a = MutJson { a: 1 }; -let b = MutJson { b: 2 }; -a.set("c", b); +test "get()" { + let assertThrows = (expected: str, block: (): void) => { + let var error = false; + try { + block(); + } catch actual { + assert(actual == expected); + error = true; + } + assert(error); + }; -let c = a.get("c"); -assert(c.get("b") == 2); + let JSON_PROPERTY_DOES_NOT_EXIST_ERROR = "Json property \"c\" does not exist"; + let obj = Json { a: 1, b: 2 }; + let mutObj = MutJson { a: 1, b: 2 }; -test "set()" { - let x = MutJson { a: 1 }; - x.set("b", 2); - let y = x.get("b"); - assert(y == 2); + assert(obj.get("b") == 2); + assert(mutObj.get("b") == 2); + + assertThrows(JSON_PROPERTY_DOES_NOT_EXIST_ERROR, () => { + obj.get("c"); + }); + assertThrows(JSON_PROPERTY_DOES_NOT_EXIST_ERROR, () => { + mutObj.get("c"); + }); } -//----------------------------------------------------------------------------- -// setAt() & getAt() -let d = MutJson { d: 3 }; -a.setAt(2, d); -let e = a.getAt(2); -assert(e.get("d") == 3); +test "getAt()" { + let assertThrows = (expected: str, block: (): void) => { + let var error = false; + try { + block(); + } catch actual { + assert(actual == expected); + error = true; + } + assert(error); + }; + + let INDEX_OUT_OF_BOUNDS_ERROR = "Index out of bounds"; + let jsonArray = Json ["foo", "bar", "baz"]; + let mutJsonArray = MutJson [1, 2, 3]; + + assert(jsonArray.getAt(2) == "baz"); + assert(mutJsonArray.getAt(2) == 3); + + assertThrows(INDEX_OUT_OF_BOUNDS_ERROR, () => { + jsonArray.getAt(3); + mutJsonArray.getAt(3); + }); +} + +test "set()" { + let mutObj = MutJson { x: 1, y: 2 }; + + mutObj.set("x", -1); + mutObj.set("z", 3); + + assert(mutObj.get("x") == -1); + assert(mutObj.get("z") == 3); +} test "setAt()" { - let x = MutJson { a: 1 }; - let a = MutJson { c: 3 }; - x.setAt(2, a); - let d = x.getAt(2); - assert(d.get("c") == 3); + let mutJsonArray = MutJson [1, 2, 3]; + + mutJsonArray.setAt(0, -1); + mutJsonArray.setAt(3, 3); + + assert(mutJsonArray.getAt(0) == -1); + assert(mutJsonArray.getAt(3) == 3); +} + +test "stringify()" { + let obj = Json { a: 1, b: 2 }; + + let stringified = Json.stringify(obj); + let stringifiedIndent = Json.stringify(obj, indent: 2); + + assert(stringified == "{\"a\":1,\"b\":2}"); + assert(stringifiedIndent == "{\n \"a\": 1,\n \"b\": 2\n}"); } //----------------------------------------------------------------------------- @@ -53,17 +105,4 @@ try { log(error); assert(error == ""); } -*/ - -//----------------------------------------------------------------------------- -// stringify() - -test "stringify()" { - let obj = Json { a: 1, b: 2 }; - - let stringified = Json.stringify(obj); - let stringifiedIndent = Json.stringify(obj, indent: 2); - - assert(stringified == "{\"a\":1,\"b\":2}"); - assert(stringifiedIndent == "{\n \"a\": 1,\n \"b\": 2\n}"); -} \ No newline at end of file +*/ \ No newline at end of file diff --git a/libs/wingc/src/lsp/snapshots/completions/mut_json_methods.snap b/libs/wingc/src/lsp/snapshots/completions/mut_json_methods.snap index dc937d632b8..9837555d6ce 100644 --- a/libs/wingc/src/lsp/snapshots/completions/mut_json_methods.snap +++ b/libs/wingc/src/lsp/snapshots/completions/mut_json_methods.snap @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): MutJson" documentation: kind: markdown - value: "```wing\nget: (key: str): MutJson\n```\n---\nReturns a specified element from the Json.\n\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" + value: "```wing\nget: (key: str): MutJson\n```\n---\nReturns the value associated with the specified Json key.\n\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" sortText: ff|get insertText: get($0) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): MutJson" documentation: kind: markdown - value: "```wing\ngetAt: (index: num): MutJson\n```\n---\nReturns a specified element at a given index from MutJson Array.\n\n\n### Returns\nThe element at given index in MutJson Array, or undefined if index is not valid" + value: "```wing\ngetAt: (index: num): MutJson\n```\n---\nReturns a specified element at a given index from MutJson Array.\n\n\n### Returns\nThe element at given index in MutJson Array\n\n*@throws* *index out of bounds error if the given index does not exist for the MutJson Array*" sortText: ff|getAt insertText: getAt($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/optional_chaining.snap b/libs/wingc/src/lsp/snapshots/completions/optional_chaining.snap index 17401ea88a5..ecb1f8b952d 100644 --- a/libs/wingc/src/lsp/snapshots/completions/optional_chaining.snap +++ b/libs/wingc/src/lsp/snapshots/completions/optional_chaining.snap @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): Json" documentation: kind: markdown - value: "```wing\nget: (key: str): Json\n```\n---\nReturns a specified element from the Json.\n\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" + value: "```wing\nget: (key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" sortText: ff|get insertText: get($0) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): Json" documentation: kind: markdown - value: "```wing\ngetAt: (index: num): Json\n```\n---\nReturns a specified element at a given index from Json Array.\n\n\n### Returns\nThe element at given index in Json Array, or undefined if index is not valid" + value: "```wing\ngetAt: (index: num): Json\n```\n---\nReturns a specified element at a given index from Json Array.\n\n\n### Returns\nThe element at given index in Json Array\n\n*@throws* *index out of bounds error if the given index does not exist for the Json Array*" sortText: ff|getAt insertText: getAt($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/optional_chaining_auto.snap b/libs/wingc/src/lsp/snapshots/completions/optional_chaining_auto.snap index 1d86421459f..b346a58a3e7 100644 --- a/libs/wingc/src/lsp/snapshots/completions/optional_chaining_auto.snap +++ b/libs/wingc/src/lsp/snapshots/completions/optional_chaining_auto.snap @@ -57,7 +57,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): Json" documentation: kind: markdown - value: "```wing\nget: (key: str): Json\n```\n---\nReturns a specified element from the Json.\n\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" + value: "```wing\nget: (key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" sortText: ff|get insertText: get($0) insertTextFormat: 2 @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): Json" documentation: kind: markdown - value: "```wing\ngetAt: (index: num): Json\n```\n---\nReturns a specified element at a given index from Json Array.\n\n\n### Returns\nThe element at given index in Json Array, or undefined if index is not valid" + value: "```wing\ngetAt: (index: num): Json\n```\n---\nReturns a specified element at a given index from Json Array.\n\n\n### Returns\nThe element at given index in Json Array\n\n*@throws* *index out of bounds error if the given index does not exist for the Json Array*" sortText: ff|getAt insertText: getAt($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/parentheses_expression.snap b/libs/wingc/src/lsp/snapshots/completions/parentheses_expression.snap index 17401ea88a5..ecb1f8b952d 100644 --- a/libs/wingc/src/lsp/snapshots/completions/parentheses_expression.snap +++ b/libs/wingc/src/lsp/snapshots/completions/parentheses_expression.snap @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): Json" documentation: kind: markdown - value: "```wing\nget: (key: str): Json\n```\n---\nReturns a specified element from the Json.\n\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" + value: "```wing\nget: (key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" sortText: ff|get insertText: get($0) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): Json" documentation: kind: markdown - value: "```wing\ngetAt: (index: num): Json\n```\n---\nReturns a specified element at a given index from Json Array.\n\n\n### Returns\nThe element at given index in Json Array, or undefined if index is not valid" + value: "```wing\ngetAt: (index: num): Json\n```\n---\nReturns a specified element at a given index from Json Array.\n\n\n### Returns\nThe element at given index in Json Array\n\n*@throws* *index out of bounds error if the given index does not exist for the Json Array*" sortText: ff|getAt insertText: getAt($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/hovers/multipart_reference_hover_middle.snap b/libs/wingc/src/lsp/snapshots/hovers/multipart_reference_hover_middle.snap index c37c3a0861d..3514adc9ac5 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/multipart_reference_hover_middle.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/multipart_reference_hover_middle.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nget: (key: str): Json\n```\n---\nReturns a specified element from the Json.\n\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" + value: "```wing\nget: (key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" range: start: line: 2 diff --git a/libs/wingsdk/src/std/json.ts b/libs/wingsdk/src/std/json.ts index 6d39d704df8..0ae6496fbbd 100644 --- a/libs/wingsdk/src/std/json.ts +++ b/libs/wingsdk/src/std/json.ts @@ -146,12 +146,13 @@ export class Json { private constructor() {} /** - * Returns a specified element from the Json. + * Returns the value associated with the specified Json key * - * @macro ($self$)[$args$] + * @macro ((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })($self$, $args$) * - * @param key The key of the element to return - * @returns The element associated with the specified key, or undefined if the key can't be found + * @param key The key of the Json property + * @returns The value associated with the specified Json key + * @throws Json property does not exist if the given key is not part of an existing property */ public get(key: string): Json { key; @@ -161,10 +162,11 @@ export class Json { /** * Returns a specified element at a given index from Json Array * - * @macro ($self$)[$args$] + * @macro ((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })($self$, $args$) * * @param index The index of the element in the Json Array to return - * @returns The element at given index in Json Array, or undefined if index is not valid + * @returns The element at given index in Json Array + * @throws index out of bounds error if the given index does not exist for the Json Array */ public getAt(index: number): Json { index; @@ -278,12 +280,13 @@ export class MutJson { private constructor() {} /** - * Returns a specified element from the Json. + * Returns the value associated with the specified Json key * - * @macro ($self$)[$args$] + * @macro ((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })($self$, $args$) * - * @param key The key of the element to return - * @returns The element associated with the specified key, or undefined if the key can't be found + * @param key The key of the Json property + * @returns The value associated with the specified Json key + * @throws Json property does not exist if the given key is not part of an existing property */ public get(key: string): MutJson { key; @@ -293,10 +296,11 @@ export class MutJson { /** * Returns a specified element at a given index from MutJson Array * - * @macro ($self$)[$args$] + * @macro ((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })($self$, $args$) * * @param index The index of the element in the MutJson Array to return - * @returns The element at given index in MutJson Array, or undefined if index is not valid + * @returns The element at given index in MutJson Array + * @throws index out of bounds error if the given index does not exist for the MutJson Array */ public getAt(index: number): MutJson { index; diff --git a/tools/hangar/__snapshots__/error.ts.snap b/tools/hangar/__snapshots__/error.ts.snap index 9c56a21c136..080e3627f22 100644 --- a/tools/hangar/__snapshots__/error.ts.snap +++ b/tools/hangar/__snapshots__/error.ts.snap @@ -6,7 +6,7 @@ exports[`bool_from_json.w 1`] = ` ../../../examples/tests/error/target/test/bool_from_json.wsim.[REDACTED].tmp/.wing/preflight.js:9 super(scope, id); const j = ({\\"a\\": 123}); ->> const a = (std.Boolean.fromJson((j)[\\"a\\"])); +>> const a = (std.Boolean.fromJson(((obj, args) => { if (obj[args] === undefined) throw new Error(\`Json property \\"\${args}\\" does not exist\`); return obj[args] })(j, \\"a\\"))); } } @@ -40,7 +40,7 @@ exports[`number_from_json.w 1`] = ` ../../../examples/tests/error/target/test/number_from_json.wsim.[REDACTED].tmp/.wing/preflight.js:9 super(scope, id); const j = ({\\"a\\": \\"apples\\"}); ->> const a = ((args) => { if (typeof args !== \\"number\\") {throw new Error(\\"unable to parse \\" + typeof args + \\" \\" + args + \\" as a number\\")}; return JSON.parse(JSON.stringify(args)) })((j)[\\"a\\"]); +>> const a = ((args) => { if (typeof args !== \\"number\\") {throw new Error(\\"unable to parse \\" + typeof args + \\" \\" + args + \\" as a number\\")}; return JSON.parse(JSON.stringify(args)) })(((obj, args) => { if (obj[args] === undefined) throw new Error(\`Json property \\"\${args}\\" does not exist\`); return obj[args] })(j, \\"a\\")); } } @@ -103,7 +103,7 @@ exports[`string_from_json.w 1`] = ` ../../../examples/tests/error/target/test/string_from_json.wsim.[REDACTED].tmp/.wing/preflight.js:9 super(scope, id); const j = ({\\"a\\": 123}); ->> const a = ((args) => { if (typeof args !== \\"string\\") {throw new Error(\\"unable to parse \\" + typeof args + \\" \\" + args + \\" as a string\\")}; return JSON.parse(JSON.stringify(args)) })((j)[\\"a\\"]); +>> const a = ((args) => { if (typeof args !== \\"string\\") {throw new Error(\\"unable to parse \\" + typeof args + \\" \\" + args + \\" as a string\\")}; return JSON.parse(JSON.stringify(args)) })(((obj, args) => { if (obj[args] === undefined) throw new Error(\`Json property \\"\${args}\\" does not exist\`); return obj[args] })(j, \\"a\\")); } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md index 2867d4f3bf5..9ca1e985925 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md @@ -49,7 +49,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { const username = "tsuf"; const res = (await $http_Util.get(String.raw({ raw: ["", "/users/", ""] }, $api_url, username))); {((cond) => {if (!cond) throw new Error("assertion failed: res.status == 200")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(res.status,200)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["user"],username)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })((JSON.parse((res.body ?? ""))), "user"),username)))}; } } return $Closure3; @@ -70,7 +70,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { const username = "akhil"; const res = (await $http_Util.get(String.raw({ raw: ["", "/path/", ""] }, $api_url, username))); {((cond) => {if (!cond) throw new Error("assertion failed: res.status == 200")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(res.status,200)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["user"],username)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })((JSON.parse((res.body ?? ""))), "user"),username)))}; } } return $Closure4; @@ -91,7 +91,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { const username = "akhil"; const res = (await $http_Util.get(String.raw({ raw: ["", "/users/permission/", ""] }, $api_url, username))); {((cond) => {if (!cond) throw new Error("assertion failed: res.status == 200")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(res.status,200)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["user"],username)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })((JSON.parse((res.body ?? ""))), "user"),username)))}; } } return $Closure5; @@ -113,8 +113,8 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { const age = "23"; const res = (await $http_Util.get(String.raw({ raw: ["", "/path/", "/", ""] }, $api_url, username, age))); {((cond) => {if (!cond) throw new Error("assertion failed: res.status == 200")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(res.status,200)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["user"],username)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"age\") == age")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["age"],age)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })((JSON.parse((res.body ?? ""))), "user"),username)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"age\") == age")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })((JSON.parse((res.body ?? ""))), "age"),age)))}; } } return $Closure6; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md index 1bf3af84751..a112394970e 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md @@ -166,7 +166,7 @@ module.exports = function({ $table }) { return async () => { let count = 0; for (const u of (await $table.list())) { - if ((((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((u)["key"],opts.key)) && (((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((u)["operation"],opts.type))) && (((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((u)["source"],String.raw({ raw: ["", ""] }, opts.source))))) { + if ((((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(u, "key"),opts.key)) && (((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(u, "operation"),opts.type))) && (((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(u, "source"),String.raw({ raw: ["", ""] }, opts.source))))) { count = (count + 1); } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md index 89ca5b98c13..9348600b7cd 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md @@ -16,12 +16,12 @@ module.exports = function({ $b }) { (await $b.putJson("test2.txt",jsonObj2)); const testJson1 = (await $b.getJson("test1.txt")); const testJson2 = (await $b.getJson("test2.txt")); - {((cond) => {if (!cond) throw new Error("assertion failed: testJson1.get(\"test\") == jsonObj1.get(\"test\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((testJson1)["test"],(jsonObj1)["test"])))}; - {((cond) => {if (!cond) throw new Error("assertion failed: testJson2.get(\"test\") == jsonObj2.get(\"test\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((testJson2)["test"],(jsonObj2)["test"])))}; + {((cond) => {if (!cond) throw new Error("assertion failed: testJson1.get(\"test\") == jsonObj1.get(\"test\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(testJson1, "test"),((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(jsonObj1, "test"))))}; + {((cond) => {if (!cond) throw new Error("assertion failed: testJson2.get(\"test\") == jsonObj2.get(\"test\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(testJson2, "test"),((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(jsonObj2, "test"))))}; const jsonObj3 = ({"test": "test3"}); (await $b.putJson("test3.txt",jsonObj3)); const testJson3 = (await $b.getJson("test3.txt")); - {((cond) => {if (!cond) throw new Error("assertion failed: testJson3.get(\"test\") == jsonObj3.get(\"test\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((testJson3)["test"],(jsonObj3)["test"])))}; + {((cond) => {if (!cond) throw new Error("assertion failed: testJson3.get(\"test\") == jsonObj3.get(\"test\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(testJson3, "test"),((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(jsonObj3, "test"))))}; (await $b.delete("test1.txt")); const files = (await $b.list()); {((cond) => {if (!cond) throw new Error("assertion failed: files.contains(\"test1.txt\") == false")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(files.includes("test1.txt"),false)))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md index 737f96fa22e..ecf6c4202a4 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md @@ -10,10 +10,32 @@ module.exports = function({ }) { return $obj; } async handle() { - const x = ({"a": 1}); - ((obj, args) => { obj[args[0]] = args[1]; })(x, ["b",2]); - const y = (x)["b"]; - {((cond) => {if (!cond) throw new Error("assertion failed: y == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(y,2)))}; + const assertThrows = async (expected, block) => { + let error = false; + try { + (await block()); + } + catch ($error_actual) { + const actual = $error_actual.message; + {((cond) => {if (!cond) throw new Error("assertion failed: actual == expected")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(actual,expected)))}; + error = true; + } + {((cond) => {if (!cond) throw new Error("assertion failed: error")})(error)}; + } + ; + const JSON_PROPERTY_DOES_NOT_EXIST_ERROR = "Json property \"c\" does not exist"; + const obj = ({"a": 1,"b": 2}); + const mutObj = ({"a": 1,"b": 2}); + {((cond) => {if (!cond) throw new Error("assertion failed: obj.get(\"b\") == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(obj, "b"),2)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: mutObj.get(\"b\") == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(mutObj, "b"),2)))}; + (await assertThrows(JSON_PROPERTY_DOES_NOT_EXIST_ERROR,async () => { + ((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(obj, "c"); + } + )); + (await assertThrows(JSON_PROPERTY_DOES_NOT_EXIST_ERROR,async () => { + ((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(mutObj, "c"); + } + )); } } return $Closure1; @@ -31,11 +53,29 @@ module.exports = function({ }) { return $obj; } async handle() { - const x = ({"a": 1}); - const a = ({"c": 3}); - ((obj, args) => { obj[args[0]] = args[1]; })(x, [2,a]); - const d = (x)[2]; - {((cond) => {if (!cond) throw new Error("assertion failed: d.get(\"c\") == 3")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((d)["c"],3)))}; + const assertThrows = async (expected, block) => { + let error = false; + try { + (await block()); + } + catch ($error_actual) { + const actual = $error_actual.message; + {((cond) => {if (!cond) throw new Error("assertion failed: actual == expected")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(actual,expected)))}; + error = true; + } + {((cond) => {if (!cond) throw new Error("assertion failed: error")})(error)}; + } + ; + const INDEX_OUT_OF_BOUNDS_ERROR = "Index out of bounds"; + const jsonArray = ["foo", "bar", "baz"]; + const mutJsonArray = [1, 2, 3]; + {((cond) => {if (!cond) throw new Error("assertion failed: jsonArray.getAt(2) == \"baz\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(jsonArray, 2),"baz")))}; + {((cond) => {if (!cond) throw new Error("assertion failed: mutJsonArray.getAt(2) == 3")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(mutJsonArray, 2),3)))}; + (await assertThrows(INDEX_OUT_OF_BOUNDS_ERROR,async () => { + ((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(jsonArray, 3); + ((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(mutJsonArray, 3); + } + )); } } return $Closure2; @@ -45,8 +85,52 @@ module.exports = function({ }) { ## inflight.$Closure3-1.js ```js -module.exports = function({ $std_Json }) { +module.exports = function({ }) { class $Closure3 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const mutObj = ({"x": 1,"y": 2}); + ((obj, args) => { obj[args[0]] = args[1]; })(mutObj, ["x",(-1)]); + ((obj, args) => { obj[args[0]] = args[1]; })(mutObj, ["z",3]); + {((cond) => {if (!cond) throw new Error("assertion failed: mutObj.get(\"x\") == -1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(mutObj, "x"),(-1))))}; + {((cond) => {if (!cond) throw new Error("assertion failed: mutObj.get(\"z\") == 3")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(mutObj, "z"),3)))}; + } + } + return $Closure3; +} + +``` + +## inflight.$Closure4-1.js +```js +module.exports = function({ }) { + class $Closure4 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const mutJsonArray = [1, 2, 3]; + ((obj, args) => { obj[args[0]] = args[1]; })(mutJsonArray, [0,(-1)]); + ((obj, args) => { obj[args[0]] = args[1]; })(mutJsonArray, [3,3]); + {((cond) => {if (!cond) throw new Error("assertion failed: mutJsonArray.getAt(0) == -1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(mutJsonArray, 0),(-1))))}; + {((cond) => {if (!cond) throw new Error("assertion failed: mutJsonArray.getAt(3) == 3")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(mutJsonArray, 3),3)))}; + } + } + return $Closure4; +} + +``` + +## inflight.$Closure5-1.js +```js +module.exports = function({ $std_Json }) { + class $Closure5 { constructor({ }) { const $obj = (...args) => this.handle(...args); Object.setPrototypeOf($obj, this); @@ -60,7 +144,7 @@ module.exports = function({ $std_Json }) { {((cond) => {if (!cond) throw new Error("assertion failed: stringifiedIndent == \"{\\n \\\"a\\\": 1,\\n \\\"b\\\": 2\\n}\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(stringifiedIndent,"{\n \"a\": 1,\n \"b\": 2\n}")))}; } } - return $Closure3; + return $Closure5; } ``` @@ -86,7 +170,7 @@ module.exports = function({ $std_Json }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:set()\",\"${aws_lambda_function.testset_Handler_ADDF1A01.arn}\"],[\"root/Default/Default/test:setAt()\",\"${aws_lambda_function.testsetAt_Handler_51015029.arn}\"],[\"root/Default/Default/test:stringify()\",\"${aws_lambda_function.teststringify_Handler_2E93A8A7.arn}\"]]" + "value": "[[\"root/Default/Default/test:get()\",\"${aws_lambda_function.testget_Handler_A37EBFC3.arn}\"],[\"root/Default/Default/test:getAt()\",\"${aws_lambda_function.testgetAt_Handler_44D7BE7A.arn}\"],[\"root/Default/Default/test:set()\",\"${aws_lambda_function.testset_Handler_ADDF1A01.arn}\"],[\"root/Default/Default/test:setAt()\",\"${aws_lambda_function.testsetAt_Handler_51015029.arn}\"],[\"root/Default/Default/test:stringify()\",\"${aws_lambda_function.teststringify_Handler_2E93A8A7.arn}\"]]" } }, "provider": { @@ -96,6 +180,24 @@ module.exports = function({ $std_Json }) { }, "resource": { "aws_iam_role": { + "testgetAt_Handler_IamRole_915EA920": { + "//": { + "metadata": { + "path": "root/Default/Default/test:getAt()/Handler/IamRole", + "uniqueId": "testgetAt_Handler_IamRole_915EA920" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testget_Handler_IamRole_7FCA766F": { + "//": { + "metadata": { + "path": "root/Default/Default/test:get()/Handler/IamRole", + "uniqueId": "testget_Handler_IamRole_7FCA766F" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, "testsetAt_Handler_IamRole_C36C780A": { "//": { "metadata": { @@ -125,6 +227,26 @@ module.exports = function({ $std_Json }) { } }, "aws_iam_role_policy": { + "testgetAt_Handler_IamRolePolicy_0F6A0772": { + "//": { + "metadata": { + "path": "root/Default/Default/test:getAt()/Handler/IamRolePolicy", + "uniqueId": "testgetAt_Handler_IamRolePolicy_0F6A0772" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testgetAt_Handler_IamRole_915EA920.name}" + }, + "testget_Handler_IamRolePolicy_B215A072": { + "//": { + "metadata": { + "path": "root/Default/Default/test:get()/Handler/IamRolePolicy", + "uniqueId": "testget_Handler_IamRolePolicy_B215A072" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testget_Handler_IamRole_7FCA766F.name}" + }, "testsetAt_Handler_IamRolePolicy_24EE9CC0": { "//": { "metadata": { @@ -157,6 +279,26 @@ module.exports = function({ $std_Json }) { } }, "aws_iam_role_policy_attachment": { + "testgetAt_Handler_IamRolePolicyAttachment_4D020DB9": { + "//": { + "metadata": { + "path": "root/Default/Default/test:getAt()/Handler/IamRolePolicyAttachment", + "uniqueId": "testgetAt_Handler_IamRolePolicyAttachment_4D020DB9" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testgetAt_Handler_IamRole_915EA920.name}" + }, + "testget_Handler_IamRolePolicyAttachment_63E5FC9C": { + "//": { + "metadata": { + "path": "root/Default/Default/test:get()/Handler/IamRolePolicyAttachment", + "uniqueId": "testget_Handler_IamRolePolicyAttachment_63E5FC9C" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testget_Handler_IamRole_7FCA766F.name}" + }, "testsetAt_Handler_IamRolePolicyAttachment_764BF14B": { "//": { "metadata": { @@ -189,6 +331,64 @@ module.exports = function({ $std_Json }) { } }, "aws_lambda_function": { + "testgetAt_Handler_44D7BE7A": { + "//": { + "metadata": { + "path": "root/Default/Default/test:getAt()/Handler/Default", + "uniqueId": "testgetAt_Handler_44D7BE7A" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c8b9b051", + "WING_TARGET": "tf-aws" + } + }, + "function_name": "Handler-c8b9b051", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testgetAt_Handler_IamRole_915EA920.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testgetAt_Handler_S3Object_AE45FDF0.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testget_Handler_A37EBFC3": { + "//": { + "metadata": { + "path": "root/Default/Default/test:get()/Handler/Default", + "uniqueId": "testget_Handler_A37EBFC3" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c8b799d4", + "WING_TARGET": "tf-aws" + } + }, + "function_name": "Handler-c8b799d4", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testget_Handler_IamRole_7FCA766F.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testget_Handler_S3Object_27E25F7F.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, "testsetAt_Handler_51015029": { "//": { "metadata": { @@ -289,6 +489,28 @@ module.exports = function({ $std_Json }) { } }, "aws_s3_object": { + "testgetAt_Handler_S3Object_AE45FDF0": { + "//": { + "metadata": { + "path": "root/Default/Default/test:getAt()/Handler/S3Object", + "uniqueId": "testgetAt_Handler_S3Object_AE45FDF0" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testget_Handler_S3Object_27E25F7F": { + "//": { + "metadata": { + "path": "root/Default/Default/test:get()/Handler/S3Object", + "uniqueId": "testget_Handler_S3Object_27E25F7F" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, "testsetAt_Handler_S3Object_FE28177A": { "//": { "metadata": { @@ -398,7 +620,6 @@ class $Root extends $stdlib.std.Resource { static _toInflightType(context) { return ` require("./inflight.$Closure3-1.js")({ - $std_Json: ${context._lift(std.Json)}, }) `; } @@ -417,21 +638,67 @@ class $Root extends $stdlib.std.Resource { return ["handle", "$inflight_init"]; } } - const a = ({"a": 1}); - const b = ({"b": 2}); - ((obj, args) => { obj[args[0]] = args[1]; })(a, ["c",b]); - const c = (a)["c"]; - {((cond) => {if (!cond) throw new Error("assertion failed: c.get(\"b\") == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((c)["b"],2)))}; - this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:set()",new $Closure1(this,"$Closure1")); - const d = ({"d": 3}); - ((obj, args) => { obj[args[0]] = args[1]; })(a, [2,d]); - const e = (a)[2]; - {((cond) => {if (!cond) throw new Error("assertion failed: e.get(\"d\") == 3")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((e)["d"],3)))}; - this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:setAt()",new $Closure2(this,"$Closure2")); + class $Closure4 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure4-1.js")({ + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure4Client = ${$Closure4._toInflightType(this)}; + const client = new $Closure4Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + } + class $Closure5 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure5-1.js")({ + $std_Json: ${context._lift(std.Json)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure5Client = ${$Closure5._toInflightType(this)}; + const client = new $Closure5Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + } + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:get()",new $Closure1(this,"$Closure1")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:getAt()",new $Closure2(this,"$Closure2")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:set()",new $Closure3(this,"$Closure3")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:setAt()",new $Closure4(this,"$Closure4")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:stringify()",new $Closure5(this,"$Closure5")); {((cond) => {if (!cond) throw new Error("assertion failed: Json.tryParse(nil) == nil")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((args) => { try { return (args === undefined) ? undefined : JSON.parse(args); } catch (err) { return undefined; } })(undefined),undefined)))}; {((cond) => {if (!cond) throw new Error("assertion failed: Json.tryParse(\"boom\") == nil")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((args) => { try { return (args === undefined) ? undefined : JSON.parse(args); } catch (err) { return undefined; } })("boom"),undefined)))}; {((cond) => {if (!cond) throw new Error("assertion failed: Json.tryParse(\"\") == nil")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((args) => { try { return (args === undefined) ? undefined : JSON.parse(args); } catch (err) { return undefined; } })(""),undefined)))}; - this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:stringify()",new $Closure3(this,"$Closure3")); } } const $App = $stdlib.core.App.for(process.env.WING_TARGET); diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_test_sim.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_test_sim.md index 81f62e88c02..9f8b8b3e1df 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_test_sim.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_test_sim.md @@ -2,12 +2,14 @@ ## stdout.log ```log -pass ─ json.wsim » root/env0/test:set() -pass ─ json.wsim » root/env1/test:setAt() -pass ─ json.wsim » root/env2/test:stringify() +pass ─ json.wsim » root/env0/test:get() +pass ─ json.wsim » root/env1/test:getAt() +pass ─ json.wsim » root/env2/test:set() +pass ─ json.wsim » root/env3/test:setAt() +pass ─ json.wsim » root/env4/test:stringify() -Tests 3 passed (3) +Tests 5 passed (5) Test Files 1 passed (1) Duration ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md index c4037389b26..6fe9a46a22d 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md @@ -2,7 +2,7 @@ ## inflight.$Closure1-1.js ```js -module.exports = function({ $_marioInfo___gender__, $_marioInfo___role__, $_peachInfo___gender__, $_peachInfo___role__, $table }) { +module.exports = function({ $__obj__args_______if__obj_args______undefined__throw_new_Error__Json_property____args___does_not_exist____return_obj_args_____marioInfo___gender__, $__obj__args_______if__obj_args______undefined__throw_new_Error__Json_property____args___does_not_exist____return_obj_args_____marioInfo___role__, $__obj__args_______if__obj_args______undefined__throw_new_Error__Json_property____args___does_not_exist____return_obj_args_____peachInfo___gender__, $__obj__args_______if__obj_args______undefined__throw_new_Error__Json_property____args___does_not_exist____return_obj_args_____peachInfo___role__, $table }) { class $Closure1 { constructor({ }) { const $obj = (...args) => this.handle(...args); @@ -10,12 +10,12 @@ module.exports = function({ $_marioInfo___gender__, $_marioInfo___role__, $_peac return $obj; } async handle() { - {((cond) => {if (!cond) throw new Error("assertion failed: table.get(\"mario\").get(\"name\") == \"mario\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((await $table.get("mario")))["name"],"mario")))}; - {((cond) => {if (!cond) throw new Error("assertion failed: table.get(\"mario\").get(\"role\") == marioInfo.get(\"role\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((await $table.get("mario")))["role"],$_marioInfo___role__)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: table.get(\"mario\").get(\"gender\") == marioInfo.get(\"gender\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((await $table.get("mario")))["gender"],$_marioInfo___gender__)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: table.get(\"peach\").get(\"name\") == \"peach\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((await $table.get("peach")))["name"],"peach")))}; - {((cond) => {if (!cond) throw new Error("assertion failed: table.get(\"peach\").get(\"role\") == peachInfo.get(\"role\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((await $table.get("peach")))["role"],$_peachInfo___role__)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: table.get(\"peach\").get(\"gender\") == peachInfo.get(\"gender\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((await $table.get("peach")))["gender"],$_peachInfo___gender__)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: table.get(\"mario\").get(\"name\") == \"mario\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })((await $table.get("mario")), "name"),"mario")))}; + {((cond) => {if (!cond) throw new Error("assertion failed: table.get(\"mario\").get(\"role\") == marioInfo.get(\"role\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })((await $table.get("mario")), "role"),$__obj__args_______if__obj_args______undefined__throw_new_Error__Json_property____args___does_not_exist____return_obj_args_____marioInfo___role__)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: table.get(\"mario\").get(\"gender\") == marioInfo.get(\"gender\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })((await $table.get("mario")), "gender"),$__obj__args_______if__obj_args______undefined__throw_new_Error__Json_property____args___does_not_exist____return_obj_args_____marioInfo___gender__)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: table.get(\"peach\").get(\"name\") == \"peach\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })((await $table.get("peach")), "name"),"peach")))}; + {((cond) => {if (!cond) throw new Error("assertion failed: table.get(\"peach\").get(\"role\") == peachInfo.get(\"role\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })((await $table.get("peach")), "role"),$__obj__args_______if__obj_args______undefined__throw_new_Error__Json_property____args___does_not_exist____return_obj_args_____peachInfo___role__)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: table.get(\"peach\").get(\"gender\") == peachInfo.get(\"gender\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })((await $table.get("peach")), "gender"),$__obj__args_______if__obj_args______undefined__throw_new_Error__Json_property____args___does_not_exist____return_obj_args_____peachInfo___gender__)))}; } } return $Closure1; @@ -213,10 +213,10 @@ class $Root extends $stdlib.std.Resource { static _toInflightType(context) { return ` require("./inflight.$Closure1-1.js")({ - $_marioInfo___gender__: ${context._lift((marioInfo)["gender"])}, - $_marioInfo___role__: ${context._lift((marioInfo)["role"])}, - $_peachInfo___gender__: ${context._lift((peachInfo)["gender"])}, - $_peachInfo___role__: ${context._lift((peachInfo)["role"])}, + $__obj__args_______if__obj_args______undefined__throw_new_Error__Json_property____args___does_not_exist____return_obj_args_____marioInfo___gender__: ${context._lift(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(marioInfo, "gender"))}, + $__obj__args_______if__obj_args______undefined__throw_new_Error__Json_property____args___does_not_exist____return_obj_args_____marioInfo___role__: ${context._lift(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(marioInfo, "role"))}, + $__obj__args_______if__obj_args______undefined__throw_new_Error__Json_property____args___does_not_exist____return_obj_args_____peachInfo___gender__: ${context._lift(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(peachInfo, "gender"))}, + $__obj__args_______if__obj_args______undefined__throw_new_Error__Json_property____args___does_not_exist____return_obj_args_____peachInfo___role__: ${context._lift(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(peachInfo, "role"))}, $table: ${context._lift(table)}, }) `; @@ -237,10 +237,10 @@ class $Root extends $stdlib.std.Resource { } _registerBind(host, ops) { if (ops.includes("handle")) { - $Closure1._registerBindObject((marioInfo)["gender"], host, []); - $Closure1._registerBindObject((marioInfo)["role"], host, []); - $Closure1._registerBindObject((peachInfo)["gender"], host, []); - $Closure1._registerBindObject((peachInfo)["role"], host, []); + $Closure1._registerBindObject(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(marioInfo, "gender"), host, []); + $Closure1._registerBindObject(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(marioInfo, "role"), host, []); + $Closure1._registerBindObject(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(peachInfo, "gender"), host, []); + $Closure1._registerBindObject(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(peachInfo, "role"), host, []); $Closure1._registerBindObject(table, host, ["get"]); } super._registerBind(host, ops); diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md index 0403086b49d..a4b3f46825d 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md @@ -14,14 +14,14 @@ module.exports = function({ $std_String, $table }) { (await $table.insert("revital",({"gender": "female"}))); const unorderded = ({}); for (const u of (await $table.list())) { - ((obj, args) => { obj[args[0]] = args[1]; })(unorderded, [((args) => { if (typeof args !== "string") {throw new Error("unable to parse " + typeof args + " " + args + " as a string")}; return JSON.parse(JSON.stringify(args)) })((u)["name"]),u]); + ((obj, args) => { obj[args[0]] = args[1]; })(unorderded, [((args) => { if (typeof args !== "string") {throw new Error("unable to parse " + typeof args + " " + args + " as a string")}; return JSON.parse(JSON.stringify(args)) })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(u, "name")),u]); } - const revital = (unorderded)["revital"]; - const eyal = (unorderded)["eyal"]; - {((cond) => {if (!cond) throw new Error("assertion failed: \"eyal\" == str.fromJson(eyal.get(\"name\"))")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })("eyal",((args) => { if (typeof args !== "string") {throw new Error("unable to parse " + typeof args + " " + args + " as a string")}; return JSON.parse(JSON.stringify(args)) })((eyal)["name"]))))}; - {((cond) => {if (!cond) throw new Error("assertion failed: \"male\" == str.fromJson(eyal.get(\"gender\"))")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })("male",((args) => { if (typeof args !== "string") {throw new Error("unable to parse " + typeof args + " " + args + " as a string")}; return JSON.parse(JSON.stringify(args)) })((eyal)["gender"]))))}; - {((cond) => {if (!cond) throw new Error("assertion failed: \"revital\" == str.fromJson(revital.get(\"name\"))")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })("revital",((args) => { if (typeof args !== "string") {throw new Error("unable to parse " + typeof args + " " + args + " as a string")}; return JSON.parse(JSON.stringify(args)) })((revital)["name"]))))}; - {((cond) => {if (!cond) throw new Error("assertion failed: \"female\" == str.fromJson(revital.get(\"gender\"))")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })("female",((args) => { if (typeof args !== "string") {throw new Error("unable to parse " + typeof args + " " + args + " as a string")}; return JSON.parse(JSON.stringify(args)) })((revital)["gender"]))))}; + const revital = ((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(unorderded, "revital"); + const eyal = ((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(unorderded, "eyal"); + {((cond) => {if (!cond) throw new Error("assertion failed: \"eyal\" == str.fromJson(eyal.get(\"name\"))")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })("eyal",((args) => { if (typeof args !== "string") {throw new Error("unable to parse " + typeof args + " " + args + " as a string")}; return JSON.parse(JSON.stringify(args)) })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(eyal, "name")))))}; + {((cond) => {if (!cond) throw new Error("assertion failed: \"male\" == str.fromJson(eyal.get(\"gender\"))")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })("male",((args) => { if (typeof args !== "string") {throw new Error("unable to parse " + typeof args + " " + args + " as a string")}; return JSON.parse(JSON.stringify(args)) })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(eyal, "gender")))))}; + {((cond) => {if (!cond) throw new Error("assertion failed: \"revital\" == str.fromJson(revital.get(\"name\"))")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })("revital",((args) => { if (typeof args !== "string") {throw new Error("unable to parse " + typeof args + " " + args + " as a string")}; return JSON.parse(JSON.stringify(args)) })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(revital, "name")))))}; + {((cond) => {if (!cond) throw new Error("assertion failed: \"female\" == str.fromJson(revital.get(\"gender\"))")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })("female",((args) => { if (typeof args !== "string") {throw new Error("unable to parse " + typeof args + " " + args + " as a string")}; return JSON.parse(JSON.stringify(args)) })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(revital, "gender")))))}; } } return $Closure1; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md index c32ae02d8e9..0da60ef7550 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_path_vars.w_compile_tf-aws.md @@ -49,7 +49,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { const username = "tsuf"; const res = (await $http_Util.get(String.raw({ raw: ["", "/users/", ""] }, $api_url, username))); {((cond) => {if (!cond) throw new Error("assertion failed: res.status == 200")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(res.status,200)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((JSON.parse((res.body ?? ""))))["user"],username)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: Json.parse(res.body ?? \"\").get(\"user\") == username")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })((JSON.parse((res.body ?? ""))), "user"),username)))}; } } return $Closure3; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md index bd1c6dfc691..18393a10947 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md @@ -2,7 +2,7 @@ ## inflight.$Closure1-1.js ```js -module.exports = function({ $Object_keys_myMap__length, $__bang__in___arrOfMap_at_0____, $__world__in__myMap__, $_arr_at_0__, $_arr_at_1__, $_j___b__, $_mySet_has__my___, $arr_length, $mySet_size }) { +module.exports = function({ $Object_keys_myMap__length, $__bang__in___arrOfMap_at_0____, $__obj__args_______if__obj_args______undefined__throw_new_Error__Json_property____args___does_not_exist____return_obj_args_____j___b__, $__world__in__myMap__, $_arr_at_0__, $_arr_at_1__, $_mySet_has__my___, $arr_length, $mySet_size }) { class $Closure1 { constructor({ }) { const $obj = (...args) => this.handle(...args); @@ -18,7 +18,7 @@ module.exports = function({ $Object_keys_myMap__length, $__bang__in___arrOfMap_a {((cond) => {if (!cond) throw new Error("assertion failed: myMap.has(\"world\")")})($__world__in__myMap__)}; {((cond) => {if (!cond) throw new Error("assertion failed: myMap.size() == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })($Object_keys_myMap__length,2)))}; {((cond) => {if (!cond) throw new Error("assertion failed: arrOfMap.at(0).has(\"bang\")")})($__bang__in___arrOfMap_at_0____)}; - {((cond) => {if (!cond) throw new Error("assertion failed: j.get(\"b\") == \"world\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })($_j___b__,"world")))}; + {((cond) => {if (!cond) throw new Error("assertion failed: j.get(\"b\") == \"world\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })($__obj__args_______if__obj_args______undefined__throw_new_Error__Json_property____args___does_not_exist____return_obj_args_____j___b__,"world")))}; } } return $Closure1; @@ -171,10 +171,10 @@ class $Root extends $stdlib.std.Resource { require("./inflight.$Closure1-1.js")({ $Object_keys_myMap__length: ${context._lift(Object.keys(myMap).length)}, $__bang__in___arrOfMap_at_0____: ${context._lift(("bang" in ((arrOfMap.at(0)))))}, + $__obj__args_______if__obj_args______undefined__throw_new_Error__Json_property____args___does_not_exist____return_obj_args_____j___b__: ${context._lift(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(j, "b"))}, $__world__in__myMap__: ${context._lift(("world" in (myMap)))}, $_arr_at_0__: ${context._lift((arr.at(0)))}, $_arr_at_1__: ${context._lift((arr.at(1)))}, - $_j___b__: ${context._lift((j)["b"])}, $_mySet_has__my___: ${context._lift((mySet.has("my")))}, $arr_length: ${context._lift(arr.length)}, $mySet_size: ${context._lift(mySet.size)}, @@ -199,9 +199,9 @@ class $Root extends $stdlib.std.Resource { if (ops.includes("handle")) { $Closure1._registerBindObject(("bang" in ((arrOfMap.at(0)))), host, []); $Closure1._registerBindObject(("world" in (myMap)), host, []); + $Closure1._registerBindObject(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(j, "b"), host, []); $Closure1._registerBindObject((arr.at(0)), host, []); $Closure1._registerBindObject((arr.at(1)), host, []); - $Closure1._registerBindObject((j)["b"], host, []); $Closure1._registerBindObject((mySet.has("my")), host, []); $Closure1._registerBindObject(Object.keys(myMap).length, host, []); $Closure1._registerBindObject(arr.length, host, []); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md index 5811c8e0916..1941063f61e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md @@ -31,8 +31,8 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { async handle() { const res = (await $http_Util.get(($api_url + "/foo"))); const body = (JSON.parse((res.body ?? ""))); - const a1 = (body)[0]; - {((cond) => {if (!cond) throw new Error("assertion failed: a1.get(\"foo\") == \"bar\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((a1)["foo"],"bar")))}; + const a1 = ((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(body, 0); + {((cond) => {if (!cond) throw new Error("assertion failed: a1.get(\"foo\") == \"bar\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(a1, "foo"),"bar")))}; } } return $Closure2; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json.w_compile_tf-aws.md index 067b8800741..5feb4c357b1 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json.w_compile_tf-aws.md @@ -312,7 +312,7 @@ class $Root extends $stdlib.std.Resource { const jsonMutObj = ({"hello": 123,"world": [1, "cat", 3],"boom boom": ({"hello": 1233})}); const message = "Coolness"; ((obj, args) => { obj[args[0]] = args[1]; })(jsonMutObj, ["hello",message]); - {((cond) => {if (!cond) throw new Error("assertion failed: jsonMutObj.get(\"hello\") == message")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((jsonMutObj)["hello"],message)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: jsonMutObj.get(\"hello\") == message")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(jsonMutObj, "hello"),message)))}; const someNumber = 999; const jj = someNumber; const jj1 = ({"foo": someNumber}); @@ -326,34 +326,34 @@ class $Root extends $stdlib.std.Resource { const jj4 = f.SumStr; {((cond) => {if (!cond) throw new Error("assertion failed: jj4 == Json \"wow!\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(jj4,"wow!")))}; const someJson = ({"x": someNumber}); - {((cond) => {if (!cond) throw new Error("assertion failed: someJson.get(\"x\") == someNumber")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((someJson)["x"],someNumber)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: someJson.get(\"x\") == someNumber")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(someJson, "x"),someNumber)))}; ((obj, args) => { obj[args[0]] = args[1]; })(someJson, ["x",111]); - {((cond) => {if (!cond) throw new Error("assertion failed: someJson.get(\"x\") == 111")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((someJson)["x"],111)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: someJson.get(\"x\") == 111")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(someJson, "x"),111)))}; const x = ({"cool": "beans"}); const nestedJson = ({"a": "hello","b": ({"c": "world","d": ({"foo": "foo","bar": 123})})}); - ((obj, args) => { obj[args[0]] = args[1]; })(((nestedJson)["b"])["d"], ["foo","tastic"]); - {((cond) => {if (!cond) throw new Error("assertion failed: nestedJson.get(\"b\").get(\"d\").get(\"foo\") == \"tastic\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((((nestedJson)["b"])["d"])["foo"],"tastic")))}; - {((cond) => {if (!cond) throw new Error("assertion failed: nestedJson.get(\"b\").get(\"d\").get(\"bar\") == 123")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((((nestedJson)["b"])["d"])["bar"],123)))}; + ((obj, args) => { obj[args[0]] = args[1]; })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(nestedJson, "b"), "d"), ["foo","tastic"]); + {((cond) => {if (!cond) throw new Error("assertion failed: nestedJson.get(\"b\").get(\"d\").get(\"foo\") == \"tastic\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(nestedJson, "b"), "d"), "foo"),"tastic")))}; + {((cond) => {if (!cond) throw new Error("assertion failed: nestedJson.get(\"b\").get(\"d\").get(\"bar\") == 123")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(nestedJson, "b"), "d"), "bar"),123)))}; const b = "buckle"; const arr = [1, 2, b, "my", "shoe", 3, 4, ["shut", "the", "door"]]; - {((cond) => {if (!cond) throw new Error("assertion failed: arr.getAt(0) == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((arr)[0],1)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: arr.getAt(2) == b")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((arr)[2],b)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: arr.getAt(7).getAt(0) == \"shut\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((arr)[7])[0],"shut")))}; + {((cond) => {if (!cond) throw new Error("assertion failed: arr.getAt(0) == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(arr, 0),1)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: arr.getAt(2) == b")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(arr, 2),b)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: arr.getAt(7).getAt(0) == \"shut\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(arr, 7), 0),"shut")))}; ({"a": [1, 2, "world"],"b": [1, 2, "world"]}); const emptyJson = ({}); const emptyJsonArr = []; const emptyMutJson = ({}); const emptyMutJsonArr = []; ((obj, args) => { obj[args[0]] = args[1]; })(emptyMutJson, ["cool",({"a": 1,"b": 2})]); - ((obj, args) => { obj[args[0]] = args[1]; })((emptyMutJson)["cool"], ["a",3]); + ((obj, args) => { obj[args[0]] = args[1]; })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(emptyMutJson, "cool"), ["a",3]); ((obj, args) => { obj[args[0]] = args[1]; })(emptyMutJsonArr, [0,({"a": 1,"b": 2})]); - ((obj, args) => { obj[args[0]] = args[1]; })((emptyMutJsonArr)[0], ["a",3]); + ((obj, args) => { obj[args[0]] = args[1]; })(((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(emptyMutJsonArr, 0), ["a",3]); const theTowerOfJson = ({"a": ({}),"b": ({"c": ({}),"d": [[[({})]]]}),"e": ({"f": ({"g": ({}),"h": [({}), []]})})}); - ((obj, args) => { obj[args[0]] = args[1]; })(((((theTowerOfJson)["e"])["f"])["h"])[0], ["a",1]); - const thatSuperNestedValue = (((((theTowerOfJson)["e"])["f"])["h"])[0])["a"]; + ((obj, args) => { obj[args[0]] = args[1]; })(((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(theTowerOfJson, "e"), "f"), "h"), 0), ["a",1]); + const thatSuperNestedValue = ((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(theTowerOfJson, "e"), "f"), "h"), 0), "a"); {((cond) => {if (!cond) throw new Error("assertion failed: num.fromJson(thatSuperNestedValue) == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((args) => { if (typeof args !== "number") {throw new Error("unable to parse " + typeof args + " " + args + " as a number")}; return JSON.parse(JSON.stringify(args)) })(thatSuperNestedValue),1)))}; const unestedJsonArr = [1, 2, 3]; - {((cond) => {if (!cond) throw new Error("assertion failed: unestedJsonArr.getAt(0) == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((unestedJsonArr)[0],1)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: unestedJsonArr.getAt(0) == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(unestedJsonArr, 0),1)))}; const jsonElements = ({"strings": ({"single": "Hello","array": ["Hello", "World", "!"]}),"numbers": ({"one": 1,"two": 2,"three": 3}),"bools": ({"t": true,"f": false})}); { const $if_let_value = ((arg) => { if (typeof arg !== "string") {throw new Error("unable to parse " + typeof arg + " " + arg + " as a string")}; return JSON.parse(JSON.stringify(arg)) })(((jsonElements)?.["strings"])?.["single"]); @@ -419,7 +419,7 @@ class $Root extends $stdlib.std.Resource { } } const notSpecified = ({"foo": "bar"}); - {((cond) => {if (!cond) throw new Error("assertion failed: notSpecified.get(\"foo\") == \"bar\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((notSpecified)["foo"],"bar")))}; + {((cond) => {if (!cond) throw new Error("assertion failed: notSpecified.get(\"foo\") == \"bar\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(notSpecified, "foo"),"bar")))}; const empty = ({}); {((cond) => {if (!cond) throw new Error("assertion failed: Json.has(empty, \"something\") == false")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((args) => { return args[0].hasOwnProperty(args[1]); })([empty,"something"]),false)))}; const Base = require("./Base.Struct.js")($stdlib.std.Struct); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md index 6e8f7fde046..e8811603a2e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md @@ -11,7 +11,7 @@ module.exports = function({ $b, $fileName }) { } async handle(msg) { const x = (await $b.getJson($fileName)); - {((cond) => {if (!cond) throw new Error("assertion failed: x.get(\"persons\").getAt(0).get(\"fears\").getAt(1) == \"failure\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((((x)["persons"])[0])["fears"])[1],"failure")))}; + {((cond) => {if (!cond) throw new Error("assertion failed: x.get(\"persons\").getAt(0).get(\"fears\").getAt(1) == \"failure\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(((obj, args) => { if (obj[args] === undefined) throw new Error("Index out of bounds"); return obj[args] })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(x, "persons"), 0), "fears"), 1),"failure")))}; } } return $Closure1; diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md index 45c705c680c..16ff988fae8 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md @@ -311,7 +311,7 @@ class $Root extends $stdlib.std.Resource { {((cond) => {if (!cond) throw new Error("assertion failed: v.at(0) == 123")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((v.at(0)),123)))}; const m = (JSON.parse(JSON.stringify(x))); ((obj, args) => { obj[args[0]] = args[1]; })(m, ["a",321]); - {((cond) => {if (!cond) throw new Error("assertion failed: m.get(\"a\") == 321")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((m)["a"],321)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: m.get(\"a\") == 321")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(m, "a"),321)))}; const n = JSON.parse(JSON.stringify(m)); {((cond) => {if (!cond) throw new Error("assertion failed: m == n")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(m,n)))}; let k2 = (Object.keys(m)); @@ -324,16 +324,16 @@ class $Root extends $stdlib.std.Resource { {((cond) => {if (!cond) throw new Error("assertion failed: Json.keys(j).length == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((Object.keys(j)).length,2)))}; const invalidJson = "invalid"; const tryParsed = (((args) => { try { return (args === undefined) ? undefined : JSON.parse(args); } catch (err) { return undefined; } })(invalidJson) ?? ({"key": "value"})); - {((cond) => {if (!cond) throw new Error("assertion failed: tryParsed.get(\"key\") == \"value\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((tryParsed)["key"],"value")))}; + {((cond) => {if (!cond) throw new Error("assertion failed: tryParsed.get(\"key\") == \"value\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(tryParsed, "key"),"value")))}; const jj = ({"a": 123,"b": ({"c": 456,"d": 789})}); const ss = ((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([jj]); {((cond) => {if (!cond) throw new Error("assertion failed: ss == \"{\\\"a\\\":123,\\\"b\\\":{\\\"c\\\":456,\\\"d\\\":789}}\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(ss,"{\"a\":123,\"b\":{\"c\":456,\"d\":789}}")))}; const ss2 = ((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([jj,{ indent: 2 }]); {((cond) => {if (!cond) throw new Error("assertion failed: ss2 == \"{\\n \\\"a\\\": 123,\\n \\\"b\\\": {\\n \\\"c\\\": 456,\\n \\\"d\\\": 789\\n }\\n}\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(ss2,"{\n \"a\": 123,\n \"b\": {\n \"c\": 456,\n \"d\": 789\n }\n}")))}; const jsonOfMany = ({"a": 123,"b": "hello","c": true}); - {((cond) => {if (!cond) throw new Error("assertion failed: str.fromJson(jsonOfMany.get(\"b\")) == \"hello\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((args) => { if (typeof args !== "string") {throw new Error("unable to parse " + typeof args + " " + args + " as a string")}; return JSON.parse(JSON.stringify(args)) })((jsonOfMany)["b"]),"hello")))}; - {((cond) => {if (!cond) throw new Error("assertion failed: num.fromJson(jsonOfMany.get(\"a\")) == 123")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((args) => { if (typeof args !== "number") {throw new Error("unable to parse " + typeof args + " " + args + " as a number")}; return JSON.parse(JSON.stringify(args)) })((jsonOfMany)["a"]),123)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: bool.fromJson(jsonOfMany.get(\"c\"))")})((std.Boolean.fromJson((jsonOfMany)["c"])))}; + {((cond) => {if (!cond) throw new Error("assertion failed: str.fromJson(jsonOfMany.get(\"b\")) == \"hello\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((args) => { if (typeof args !== "string") {throw new Error("unable to parse " + typeof args + " " + args + " as a string")}; return JSON.parse(JSON.stringify(args)) })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(jsonOfMany, "b")),"hello")))}; + {((cond) => {if (!cond) throw new Error("assertion failed: num.fromJson(jsonOfMany.get(\"a\")) == 123")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((args) => { if (typeof args !== "number") {throw new Error("unable to parse " + typeof args + " " + args + " as a number")}; return JSON.parse(JSON.stringify(args)) })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(jsonOfMany, "a")),123)))}; + {((cond) => {if (!cond) throw new Error("assertion failed: bool.fromJson(jsonOfMany.get(\"c\"))")})((std.Boolean.fromJson(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(jsonOfMany, "c"))))}; this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:Access Json static inflight",new $Closure1(this,"$Closure1")); this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:has key or not",new $Closure2(this,"$Closure2")); } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json_string_interpolation.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json_string_interpolation.w_compile_tf-aws.md index 6fad7e1558f..5ea7edd0f11 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json_string_interpolation.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json_string_interpolation.w_compile_tf-aws.md @@ -43,14 +43,14 @@ class $Root extends $stdlib.std.Resource { constructor(scope, id) { super(scope, id); const obj = ({"strValue": "test","numValue": 1}); - const notStringifyStrValue = String.raw({ raw: ["string: ", ""] }, JSON.stringify((obj)["strValue"])); + const notStringifyStrValue = String.raw({ raw: ["string: ", ""] }, JSON.stringify(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(obj, "strValue"))); {((cond) => {if (!cond) throw new Error("assertion failed: notStringifyStrValue == \"string: \\\"test\\\"\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(notStringifyStrValue,"string: \"test\"")))}; - const stringifyNumValue = String.raw({ raw: ["number: ", ""] }, JSON.stringify((obj)["numValue"])); + const stringifyNumValue = String.raw({ raw: ["number: ", ""] }, JSON.stringify(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(obj, "numValue"))); {((cond) => {if (!cond) throw new Error("assertion failed: stringifyNumValue == \"number: 1\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(stringifyNumValue,"number: 1")))}; {((cond) => {if (!cond) throw new Error("assertion failed: \"${obj}\" == Json.stringify(obj)")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(String.raw({ raw: ["", ""] }, JSON.stringify(obj)),((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([obj]))))}; - {((cond) => {if (!cond) throw new Error("assertion failed: \"${obj.get(\"strValue\")}\" == Json.stringify(obj.get(\"strValue\"))")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(String.raw({ raw: ["", ""] }, JSON.stringify((obj)["strValue"])),((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([(obj)["strValue"]]))))}; - {((cond) => {if (!cond) throw new Error("assertion failed: obj.get(\"strValue\") == Json.parse(Json.stringify(obj.get(\"strValue\")))")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((obj)["strValue"],(JSON.parse(((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([(obj)["strValue"]]))))))}; - {((cond) => {if (!cond) throw new Error("assertion failed: obj.get(\"strValue\") == Json.parse(\"${obj.get(\"strValue\")}\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((obj)["strValue"],(JSON.parse(String.raw({ raw: ["", ""] }, JSON.stringify((obj)["strValue"])))))))}; + {((cond) => {if (!cond) throw new Error("assertion failed: \"${obj.get(\"strValue\")}\" == Json.stringify(obj.get(\"strValue\"))")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(String.raw({ raw: ["", ""] }, JSON.stringify(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(obj, "strValue"))),((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(obj, "strValue")]))))}; + {((cond) => {if (!cond) throw new Error("assertion failed: obj.get(\"strValue\") == Json.parse(Json.stringify(obj.get(\"strValue\")))")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(obj, "strValue"),(JSON.parse(((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(obj, "strValue")]))))))}; + {((cond) => {if (!cond) throw new Error("assertion failed: obj.get(\"strValue\") == Json.parse(\"${obj.get(\"strValue\")}\")")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(obj, "strValue"),(JSON.parse(String.raw({ raw: ["", ""] }, JSON.stringify(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(obj, "strValue"))))))))}; } } const $App = $stdlib.core.App.for(process.env.WING_TARGET); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/std_containers.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/std_containers.w_compile_tf-aws.md index bc4a1e77a6b..c44d1b1d8cb 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/std_containers.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/std_containers.w_compile_tf-aws.md @@ -196,7 +196,7 @@ class $Root extends $stdlib.std.Resource { {((cond) => {if (!cond) throw new Error("assertion failed: sMap.get(\"one\") == 1")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((sMap)["one"],1)))}; {((cond) => {if (!cond) throw new Error("assertion failed: sMap.size() == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(Object.keys(sMap).length,2)))}; {((cond) => {if (!cond) throw new Error("assertion failed: immutMap.size() == 3")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(Object.keys(immutMap).length,3)))}; - {((cond) => {if (!cond) throw new Error("assertion failed: nestedMap.get(\"a\").get(\"b\").get(\"c\") == \"hello\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((((nestedMap)["a"])["b"])["c"],"hello")))}; + {((cond) => {if (!cond) throw new Error("assertion failed: nestedMap.get(\"a\").get(\"b\").get(\"c\") == \"hello\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(((nestedMap)["a"])["b"], "c"),"hello")))}; const heterogeneousArray = [new Cat(this,"C1"), new Dog(this,"D1")]; const heterogeneousDoubleArray = [[new Cat(this,"C2")], [new Cat(this,"C3"), new Dog(this,"D2")], [new Animal(this,"A1")]]; const heterogeneousSet = new Set([new Cat(this,"C4"), new Dog(this,"D3")]); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md index 1e71508334b..e000a2c409d 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md @@ -768,7 +768,7 @@ class $Root extends $stdlib.std.Resource { const $if_let_value = student3.additionalData; if ($if_let_value != undefined) { const additionalData = $if_let_value; - const notes = (additionalData)["notes"]; + const notes = ((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(additionalData, "notes"); {((cond) => {if (!cond) throw new Error("assertion failed: notes == \"wow such notes\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(notes,"wow such notes")))}; } else { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md index 451cb823a60..0db07378045 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md @@ -29,11 +29,11 @@ module.exports = function({ $std_Json, $usersTable }) { } async handle(req) { const body = (JSON.parse((req.body ?? ((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([({"name": "","age": "","id": ""})])))); - if ((((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((body)["name"],"")) || (((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((body)["age"],""))) || (((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((body)["id"],"")))) { + if ((((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(body, "name"),"")) || (((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(body, "age"),""))) || (((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(body, "id"),"")))) { return ({"body": ((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([({"error": "incomplete details"})]),"status": 400}); } - (await $usersTable.insert(((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([(body)["id"]]),body)); - return ({"body": ((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([({"user": (body)["id"]})]),"status": 201}); + (await $usersTable.insert(((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(body, "id")]),body)); + return ({"body": ((args) => { return JSON.stringify(args[0], null, args[1]?.indent) })([({"user": ((obj, args) => { if (obj[args] === undefined) throw new Error(`Json property "${args}" does not exist`); return obj[args] })(body, "id")})]),"status": 201}); } } return $Closure2; From 6dbb1ac0939403f5d8117e6ac0d1f41218ed3652 Mon Sep 17 00:00:00 2001 From: Lance J Date: Sun, 3 Sep 2023 17:58:51 +0200 Subject: [PATCH 38/48] chore(docs): remove double word from tests heading (#4063) Stumbled on it while reading the docs and think it reads a bit better without the additional "a". ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [x] Docs updated (only required for features) - [x] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- docs/docs/02-concepts/04-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/02-concepts/04-tests.md b/docs/docs/02-concepts/04-tests.md index 7bd3b4121c6..6c01427d2ca 100644 --- a/docs/docs/02-concepts/04-tests.md +++ b/docs/docs/02-concepts/04-tests.md @@ -69,7 +69,7 @@ test "bucket starts empty" { In the first test (`bucket list should include created file`), a file is created in the bucket. The second test (`bucket starts empty`) verifies that the bucket is initialized without any file. -### Running tests in a the cloud +### Running tests in the cloud Consider the following example: From a6e41306a669d575caaf38c2393f1e61ce7fb22d Mon Sep 17 00:00:00 2001 From: Gary Sassano <10464497+garysassano@users.noreply.github.com> Date: Mon, 4 Sep 2023 12:22:50 +0200 Subject: [PATCH 39/48] chore(sdk): improve bucket tests readability with `assertThrows` (#3900) Updating the bucket tests following the same standard used in the other resources. *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- examples/tests/sdk_tests/bucket/delete.w | 22 ++++++++++++------ examples/tests/sdk_tests/bucket/public_url.w | 21 ++++++++++++----- .../bucket/delete.w_compile_tf-aws.md | 23 +++++++++++++------ .../bucket/public_url.w_compile_tf-aws.md | 23 +++++++++++++------ 4 files changed, 62 insertions(+), 27 deletions(-) diff --git a/examples/tests/sdk_tests/bucket/delete.w b/examples/tests/sdk_tests/bucket/delete.w index b376cc90603..9572072f123 100644 --- a/examples/tests/sdk_tests/bucket/delete.w +++ b/examples/tests/sdk_tests/bucket/delete.w @@ -4,7 +4,18 @@ let b = new cloud.Bucket(); b.addObject("file2.txt", "Bar"); test "delete" { - let var error = ""; + let assertThrows = (expected: str, block: (): void) => { + let var error = false; + try { + block(); + } catch actual { + assert(actual == expected); + error = true; + } + assert(error); + }; + + let OBJECT_DOES_NOT_EXIST_ERROR = "Object does not exist (key=file1.json)."; let jsonObj1 = Json { key1: "value1" }; b.putJson("file1.json", jsonObj1); @@ -14,13 +25,10 @@ test "delete" { assert(b.exists("file2.txt")); b.delete("file1.json", mustExist: true); - try { - b.delete("file1.json", mustExist: true); - } catch e { - error = e; - } - assert(error == "Object does not exist (key=file1.json)."); + assertThrows(OBJECT_DOES_NOT_EXIST_ERROR, () => { + b.delete("file1.json", mustExist: true); + }); assert(b.exists("file2.txt")); b.delete("file2.txt"); diff --git a/examples/tests/sdk_tests/bucket/public_url.w b/examples/tests/sdk_tests/bucket/public_url.w index 6b1127bedfb..94d8d8d240d 100644 --- a/examples/tests/sdk_tests/bucket/public_url.w +++ b/examples/tests/sdk_tests/bucket/public_url.w @@ -6,7 +6,19 @@ let publicBucket = new cloud.Bucket(public: true) as "publicBucket"; let privateBucket = new cloud.Bucket() as "privateBucket"; test "publicUrl" { - let var error = ""; + let assertThrows = (expected: str, block: (): void) => { + let var error = false; + try { + block(); + } catch actual { + assert(actual == expected); + error = true; + } + assert(error); + }; + + let BUCKET_NOT_PUBLIC_ERROR = "Cannot provide public url for a non-public bucket"; + publicBucket.put("file1.txt", "Foo"); privateBucket.put("file2.txt", "Bar"); @@ -18,10 +30,7 @@ test "publicUrl" { assert(http.get(publicUrl).body == "Foo"); } - try { + assertThrows(BUCKET_NOT_PUBLIC_ERROR, () => { privateBucket.publicUrl("file2.txt"); - } catch e { - error = e; - } - assert(error == "Cannot provide public url for a non-public bucket"); + }); } \ No newline at end of file diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md index 3a184f3a604..7c6c567f64b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md @@ -10,21 +10,30 @@ module.exports = function({ $b }) { return $obj; } async handle() { - let error = ""; + const assertThrows = async (expected, block) => { + let error = false; + try { + (await block()); + } + catch ($error_actual) { + const actual = $error_actual.message; + {((cond) => {if (!cond) throw new Error("assertion failed: actual == expected")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(actual,expected)))}; + error = true; + } + {((cond) => {if (!cond) throw new Error("assertion failed: error")})(error)}; + } + ; + const OBJECT_DOES_NOT_EXIST_ERROR = "Object does not exist (key=file1.json)."; const jsonObj1 = ({"key1": "value1"}); (await $b.putJson("file1.json",jsonObj1)); (await $b.delete("file1.txt")); {((cond) => {if (!cond) throw new Error("assertion failed: b.exists(\"file1.json\")")})((await $b.exists("file1.json")))}; {((cond) => {if (!cond) throw new Error("assertion failed: b.exists(\"file2.txt\")")})((await $b.exists("file2.txt")))}; (await $b.delete("file1.json",{ mustExist: true })); - try { + (await assertThrows(OBJECT_DOES_NOT_EXIST_ERROR,async () => { (await $b.delete("file1.json",{ mustExist: true })); } - catch ($error_e) { - const e = $error_e.message; - error = e; - } - {((cond) => {if (!cond) throw new Error("assertion failed: error == \"Object does not exist (key=file1.json).\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(error,"Object does not exist (key=file1.json).")))}; + )); {((cond) => {if (!cond) throw new Error("assertion failed: b.exists(\"file2.txt\")")})((await $b.exists("file2.txt")))}; (await $b.delete("file2.txt")); {((cond) => {if (!cond) throw new Error("assertion failed: !b.exists(\"file2.txt\")")})((!(await $b.exists("file2.txt"))))}; diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md index f82023b6115..71130c23f21 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md @@ -10,7 +10,20 @@ module.exports = function({ $http_Util, $privateBucket, $publicBucket, $util_Uti return $obj; } async handle() { - let error = ""; + const assertThrows = async (expected, block) => { + let error = false; + try { + (await block()); + } + catch ($error_actual) { + const actual = $error_actual.message; + {((cond) => {if (!cond) throw new Error("assertion failed: actual == expected")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(actual,expected)))}; + error = true; + } + {((cond) => {if (!cond) throw new Error("assertion failed: error")})(error)}; + } + ; + const BUCKET_NOT_PUBLIC_ERROR = "Cannot provide public url for a non-public bucket"; (await $publicBucket.put("file1.txt","Foo")); (await $privateBucket.put("file2.txt","Bar")); const publicUrl = (await $publicBucket.publicUrl("file1.txt")); @@ -18,14 +31,10 @@ module.exports = function({ $http_Util, $privateBucket, $publicBucket, $util_Uti if ((((a,b) => { try { return require('assert').notDeepStrictEqual(a,b) === undefined; } catch { return false; } })((await $util_Util.env("WING_TARGET")),"sim"))) { {((cond) => {if (!cond) throw new Error("assertion failed: http.get(publicUrl).body == \"Foo\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((await $http_Util.get(publicUrl)).body,"Foo")))}; } - try { + (await assertThrows(BUCKET_NOT_PUBLIC_ERROR,async () => { (await $privateBucket.publicUrl("file2.txt")); } - catch ($error_e) { - const e = $error_e.message; - error = e; - } - {((cond) => {if (!cond) throw new Error("assertion failed: error == \"Cannot provide public url for a non-public bucket\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(error,"Cannot provide public url for a non-public bucket")))}; + )); } } return $Closure1; From a621c1c6b13db70292c3d2200bed12d3e4cc9130 Mon Sep 17 00:00:00 2001 From: Chris Rybicki Date: Tue, 5 Sep 2023 11:13:46 +0300 Subject: [PATCH 40/48] chore(docs): update polycons RFC disclaimer (#4076) ## Checklist - [ ] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [ ] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- docs/contributing/999-rfcs/2022-06-14-polycons.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/contributing/999-rfcs/2022-06-14-polycons.md b/docs/contributing/999-rfcs/2022-06-14-polycons.md index 3bfe021809d..0843ddb86bd 100644 --- a/docs/contributing/999-rfcs/2022-06-14-polycons.md +++ b/docs/contributing/999-rfcs/2022-06-14-polycons.md @@ -3,13 +3,13 @@ title: "#3692 Polycons Framework (approved)" description: This document describes a dependency injection meta-framework for polymorphic constructs. --- -> Note: the design of polycons has changed significantly since this was first written! -> Please check out the polycons [README](https://github.com/winglang/polycons) for details about how the current Polycons API works, and check the [SDK Architecture](../start-here/wingsdk#sdk-architecture) to see where many ideas from this RFC were adopted! +> **⚠️ Note:** polycons was an early design for how to support CDK constructs that work across multiple cloud targets. +> It has since been archived to [https://github.com/winglang/polycons], but we've kept the RFC here for historical value. Check out the [SDK Architecture](../start-here/wingsdk#sdk-architecture) to see where many ideas from this RFC were adopted! * **Author(s):**: @MarkMcCulloh * **Submission Date**: 2022-06-14 * **Stage**: Approved -* **Stage Date**: 2022-07-20) +* **Stage Date**: 2022-07-20 * **Implementation**: [Repository](https://github.com/winglang/polycons) This document describes polycons, a dependency injection meta-framework for polymorphic [constructs]. After some initial sections, this is structured as a proposed README to demonstrate the expected usage and general concepts. From 2b6d97634198897e00cb9defa30344e20a67fb5f Mon Sep 17 00:00:00 2001 From: Mark McCulloh Date: Tue, 5 Sep 2023 04:54:03 -0400 Subject: [PATCH 41/48] chore(build): pnpm update and audit (#4045) Ran `pnpm update -r` and then `pnpm audit`, manually tweaked deps until there were no more CVEs *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- apps/jsii-docgen/.projen/tasks.json | 8 +- apps/jsii-docgen/package.json | 32 +- .../libraries/construct-library/package.json | 32 +- .../test/__snapshots__/cli.test.ts.snap | 912 +- .../__snapshots__/documentation.test.ts.snap | 247 +- .../view/__snapshots__/markdown.test.ts.snap | 236 +- apps/vscode-wing/.projen/tasks.json | 8 +- apps/vscode-wing/package.json | 22 +- apps/wing-api-checker/.projen/tasks.json | 8 +- apps/wing-api-checker/package.json | 26 +- apps/wing-console/console/app/package.json | 24 +- .../console/design-system/package.json | 24 +- apps/wing-console/console/server/package.json | 16 +- apps/wing-console/console/ui/package.json | 52 +- .../packages/error-message/package.json | 2 +- .../packages/use-loading/package.json | 4 +- .../tools/eslint-plugin/package.json | 18 +- apps/wing-console/tools/tsconfig/package.json | 2 +- apps/wing/package.json | 22 +- examples/tests/invalid/package.json | 2 +- examples/tests/valid/package.json | 16 +- libs/tree-sitter-wing/package.json | 4 +- libs/wingcompiler/package.json | 4 +- libs/wingsdk/.projen/deps.json | 25 +- libs/wingsdk/.projen/tasks.json | 14 +- libs/wingsdk/.projenrc.ts | 20 +- libs/wingsdk/package.json | 59 +- .../__snapshots__/connections.test.ts.snap | 10 +- .../__snapshots__/bucket.test.ts.snap | 16 +- .../__snapshots__/on-deploy.test.ts.snap | 21 +- .../target-sim/__snapshots__/api.test.ts.snap | 186 +- .../__snapshots__/bucket.test.ts.snap | 30 +- .../__snapshots__/counter.test.ts.snap | 42 +- .../__snapshots__/file-counter.test.ts.snap | 20 +- .../__snapshots__/function.test.ts.snap | 60 +- .../immutable-capture.test.ts.snap | 154 +- .../__snapshots__/on-deploy.test.ts.snap | 10 +- .../__snapshots__/queue.test.ts.snap | 88 +- .../__snapshots__/redis.test.ts.snap | 6 +- .../__snapshots__/schedule.test.ts.snap | 48 +- .../__snapshots__/secret.test.ts.snap | 6 +- .../__snapshots__/service.test.ts.snap | 12 +- .../__snapshots__/table.test.ts.snap | 36 +- .../__snapshots__/test.test.ts.snap | 10 +- .../__snapshots__/topic.test.ts.snap | 6 +- .../__snapshots__/bucket.test.ts.snap | 116 +- .../__snapshots__/counter.test.ts.snap | 68 +- .../__snapshots__/function.test.ts.snap | 48 +- .../__snapshots__/on-deploy.test.ts.snap | 34 +- .../__snapshots__/queue.test.ts.snap | 42 +- .../__snapshots__/schedule.test.ts.snap | 42 +- .../__snapshots__/secret.test.ts.snap | 6 +- .../__snapshots__/table.test.ts.snap | 10 +- .../__snapshots__/topic.test.ts.snap | 30 +- .../__snapshots__/website.test.ts.snap | 12 +- .../__snapshots__/bucket.test.ts.snap | 26 +- .../__snapshots__/function.test.ts.snap | 24 +- .../__snapshots__/bucket.test.ts.snap | 22 +- .../__snapshots__/simulator.test.ts.snap | 10 +- package.json | 6 +- ....18.5.patch => esbuild-wasm@0.18.20.patch} | 8 +- pnpm-lock.yaml | 12734 ++++++++-------- tools/bump-pack/package.json | 20 +- tools/hangar/package.json | 12 +- 64 files changed, 8125 insertions(+), 7745 deletions(-) rename patches/{esbuild-wasm@0.18.5.patch => esbuild-wasm@0.18.20.patch} (73%) diff --git a/apps/jsii-docgen/.projen/tasks.json b/apps/jsii-docgen/.projen/tasks.json index 96f7a5f2fe6..f31cc816fd4 100644 --- a/apps/jsii-docgen/.projen/tasks.json +++ b/apps/jsii-docgen/.projen/tasks.json @@ -165,7 +165,7 @@ "exec": "npm-check-updates --dep dev --upgrade --target=minor --reject='jsii'" }, { - "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='jsii'" + "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='jsii'" }, { "exec": "npm-check-updates --dep peer --upgrade --target=minor --reject='jsii'" @@ -174,13 +174,13 @@ "exec": "npm-check-updates --dep prod --upgrade --target=minor --reject='jsii'" }, { - "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='jsii'" + "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='jsii'" }, { "exec": "pnpm i --no-frozen-lockfile" }, { - "exec": "pnpm update" + "exec": "pnpm update @types/fs-extra @types/jest @types/node @types/semver @types/yargs @typescript-eslint/eslint-plugin @typescript-eslint/parser constructs eslint-config-prettier eslint-import-resolver-node eslint-import-resolver-typescript eslint-plugin-import eslint-plugin-prettier eslint jest jest-junit jsii npm-check-updates prettier projen ts-jest ts-node typescript @jsii/spec case fs-extra glob glob-promise jsii-reflect jsii-rosetta semver yargs" }, { "exec": "pnpm exec projen" @@ -201,7 +201,7 @@ } }, "env": { - "PATH": "$(pnpm -c exec \"node -e \\\"console.log(process.env.PATH)\\\"\")", + "PATH": "$(pnpm -c exec \"node --print process.env.PATH\")", "NODE_OPTIONS": "--max-old-space-size=7168" }, "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." diff --git a/apps/jsii-docgen/package.json b/apps/jsii-docgen/package.json index 71150788d1d..e709d162934 100644 --- a/apps/jsii-docgen/package.json +++ b/apps/jsii-docgen/package.json @@ -35,36 +35,36 @@ "@types/fs-extra": "^9.0.13", "@types/jest": "^27.5.2", "@types/node": "^16", - "@types/semver": "^7.3.13", + "@types/semver": "^7.5.1", "@types/yargs": "^16", "@typescript-eslint/eslint-plugin": "^5", "@typescript-eslint/parser": "^5", - "constructs": "^10.2.5", + "constructs": "^10.2.70", "eslint": "^8", - "eslint-config-prettier": "^8.6.0", - "eslint-import-resolver-node": "^0.3.7", - "eslint-import-resolver-typescript": "^3.5.3", - "eslint-plugin-import": "^2.27.5", + "eslint-config-prettier": "^8.10.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-import-resolver-typescript": "^3.6.0", + "eslint-plugin-import": "^2.28.1", "eslint-plugin-prettier": "^4.2.1", - "jest": "^27", + "jest": "^27.5.1", "jest-junit": "^15", "jsii": "~5.0.0", "npm-check-updates": "^16", - "prettier": "^2.8.3", - "projen": "^0.71.60", - "ts-jest": "^27", + "prettier": "^2.8.8", + "projen": "^0.71.163", + "ts-jest": "^27.1.5", "ts-node": "^10.9.1", - "typescript": "~4.9.4" + "typescript": "~4.9.5" }, "dependencies": { - "@jsii/spec": "^1.73.0", + "@jsii/spec": "^1.88.0", "case": "^1.6.3", "fs-extra": "^10.1.0", "glob": "^8.1.0", - "glob-promise": "^6.0.2", - "jsii-reflect": "^1.73.0", - "jsii-rosetta": "^1.73.0", - "semver": "^7.3.8", + "glob-promise": "^6.0.3", + "jsii-reflect": "^1.88.0", + "jsii-rosetta": "^1.88.0", + "semver": "^7.5.4", "yargs": "^16" }, "main": "lib/index.js", diff --git a/apps/jsii-docgen/test/__fixtures__/libraries/construct-library/package.json b/apps/jsii-docgen/test/__fixtures__/libraries/construct-library/package.json index 5307d8f47ee..3a1dcdfc192 100644 --- a/apps/jsii-docgen/test/__fixtures__/libraries/construct-library/package.json +++ b/apps/jsii-docgen/test/__fixtures__/libraries/construct-library/package.json @@ -25,28 +25,28 @@ "organization": false }, "dependencies": { - "@aws-cdk/aws-s3": "^1.110.1", - "@aws-cdk/core": "^1.110.1", - "@aws-cdk/aws-iam": "^1.110.1", - "@aws-cdk/aws-kms": "^1.110.1", - "@aws-cdk/aws-events": "^1.110.1", - "@aws-cdk/cloud-assembly-schema": "^1.110.1", - "constructs": "^3.3.69" + "@aws-cdk/aws-events": "^1.204.0", + "@aws-cdk/aws-iam": "^1.204.0", + "@aws-cdk/aws-kms": "^1.204.0", + "@aws-cdk/aws-s3": "^1.204.0", + "@aws-cdk/cloud-assembly-schema": "^1.204.0", + "@aws-cdk/core": "^1.204.0", + "constructs": "^3.4.344" }, "peerDependencies": { - "@aws-cdk/aws-s3": "^1.110.1", - "@aws-cdk/core": "^1.110.1", - "@aws-cdk/aws-iam": "^1.110.1", - "@aws-cdk/aws-kms": "^1.110.1", - "@aws-cdk/aws-events": "^1.110.1", - "@aws-cdk/cloud-assembly-schema": "^1.110.1", + "@aws-cdk/aws-events": "^1.204.0", + "@aws-cdk/aws-iam": "^1.204.0", + "@aws-cdk/aws-kms": "^1.204.0", + "@aws-cdk/aws-s3": "^1.204.0", + "@aws-cdk/cloud-assembly-schema": "^1.204.0", + "@aws-cdk/core": "^1.204.0", "constructs": "^3.3.69" }, "devDependencies": { - "@types/node": "^18.0.0", + "@types/node": "^18.17.13", "@types/prettier": "2.6.0", - "jsii": "~5.0.0", - "typescript": "^4.3.4" + "jsii": "~5.0.21", + "typescript": "^4.9.5" }, "license": "Apache-2.0", "version": "0.0.0" diff --git a/apps/jsii-docgen/test/__snapshots__/cli.test.ts.snap b/apps/jsii-docgen/test/__snapshots__/cli.test.ts.snap index ab0997fbc2d..89ae002f2e1 100644 --- a/apps/jsii-docgen/test/__snapshots__/cli.test.ts.snap +++ b/apps/jsii-docgen/test/__snapshots__/cli.test.ts.snap @@ -49,7 +49,7 @@ new submod1.GoodbyeBucket(scope: Construct, id: string, props?: BucketProps) | addEventNotification | Adds a bucket notification event destination. | | addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | | addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | | arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | | grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | | grantPublicAccess | Allows unrestricted access to objects from this bucket. | @@ -61,9 +61,10 @@ new submod1.GoodbyeBucket(scope: Construct, id: string, props?: BucketProps) | onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | | onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | | onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3UrlForObject | The S3 URL of an S3 object. | -| urlForObject | The https URL of an S3 object. | -| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. | +| s3UrlForObject | The S3 URL of an S3 object. For example:. | +| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | +| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | | addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | | addInventory | Add an inventory configuration. | | addLifecycleRule | Add a lifecycle rule to the bucket. | @@ -85,7 +86,7 @@ being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. -The resource can be deleted (\`RemovalPolicy.DELETE\`), or left in your AWS +The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). ###### \`policy\`Required @@ -107,7 +108,9 @@ Adds a bucket notification event destination. *Example* \`\`\`typescript - bucket.addEventNotification(EventType.OnObjectCreated, myLambda, 'home/myusername/*') + declare const myLambda: lambda.Function; + const bucket = new s3.Bucket(this, 'MyBucket'); + bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(myLambda), {prefix: 'home/myusername/*'}); \`\`\` @@ -148,7 +151,7 @@ public addObjectCreatedNotification(dest: IBucketNotificationDestination, filter Subscribes a destination to receive notifications when an object is created in the bucket. This is identical to calling -\`onEvent(EventType.ObjectCreated)\`. +\`onEvent(EventType.OBJECT_CREATED)\`. ###### \`dest\`Required @@ -175,7 +178,7 @@ public addObjectRemovedNotification(dest: IBucketNotificationDestination, filter Subscribes a destination to receive notifications when an object is removed from the bucket. This is identical to calling -\`onEvent(EventType.ObjectRemoved)\`. +\`onEvent(EventType.OBJECT_REMOVED)\`. ###### \`dest\`Required @@ -199,12 +202,20 @@ Filters (see onEvent). public addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult \`\`\` -Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. +Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. + +Note that the policy statement may or may not be added to the policy. +For example, when an \`IBucket\` is created from an existing bucket, +it's not possible to tell whether the bucket already has a policy +attached, let alone to re-use that policy to add more statements to it. +So it's safest to do nothing in these cases. ###### \`permission\`Required - *Type:* @aws-cdk/aws-iam.PolicyStatement +the policy statement to be added to the bucket's policy. + --- ##### \`arnForObjects\` @@ -274,6 +285,10 @@ to an IPv4 range like this: const grant = bucket.grantPublicAccess(); grant.resourceStatement!.addCondition(‘IpAddress’, { “aws:SourceIp”: “54.240.143.0/24” }); +Note that if this \`IBucket\` refers to an existing bucket, possibly not +managed by CloudFormation, this method will have no effect, since it's +impossible to modify the policy of an existing bucket. + ###### \`allowedActions\`Required - *Type:* string @@ -530,45 +545,66 @@ Options for adding the rule. public s3UrlForObject(key?: string): string \`\`\` -The S3 URL of an S3 object. +The S3 URL of an S3 object. For example:. -For example: +\`s3://onlybucket\` +- \`s3://bucket/key\` -*Example* +###### \`key\`Optional + +- *Type:* string + +The S3 key of the object. + +If not specified, the S3 URL of the +bucket is returned. + +--- + +##### \`transferAccelerationUrlForObject\` \`\`\`typescript -s3://bucket/key +public transferAccelerationUrlForObject(key?: string, options?: TransferAccelerationUrlOptions): string \`\`\` +The https Transfer Acceleration URL of an S3 object. -###### \`key\`Optional +Specify \`dualStack: true\` at the options +for dual-stack endpoint (connect to the bucket over IPv6). For example: + +- \`https://bucket.s3-accelerate.amazonaws.com\` +- \`https://bucket.s3-accelerate.amazonaws.com/key\` + +###### \`key\`Optional - *Type:* string The S3 key of the object. -If not specified, the S3 URL of the +If not specified, the URL of the bucket is returned. --- -##### \`urlForObject\` +###### \`options\`Optional -\`\`\`typescript -public urlForObject(key?: string): string -\`\`\` +- *Type:* @aws-cdk/aws-s3.TransferAccelerationUrlOptions -The https URL of an S3 object. +Options for generating URL. -Specify \`regional: false\` at the options -for non-regional URLs. For example: +--- -*Example* +##### \`urlForObject\` \`\`\`typescript -https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey +public urlForObject(key?: string): string \`\`\` +The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. + +\`https://s3.us-west-1.amazonaws.com/onlybucket\` +- \`https://s3.us-west-1.amazonaws.com/bucket/key\` +- \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` ###### \`key\`Optional @@ -587,17 +623,12 @@ bucket is returned. public virtualHostedUrlForObject(key?: string, options?: VirtualHostedStyleUrlOptions): string \`\`\` -The virtual hosted-style URL of an S3 object. - -Specify \`regional: false\` at -the options for non-regional URL. For example: - -*Example* - -\`\`\`typescript -https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey -\`\`\` +The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. +\`https://only-bucket.s3.us-west-1.amazonaws.com\` +- \`https://bucket.s3.us-west-1.amazonaws.com/key\` +- \`https://bucket.s3.amazonaws.com/key\` +- \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` ###### \`key\`Optional @@ -696,6 +727,7 @@ public goodbye(): void | fromBucketArn | *No description.* | | fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | | fromBucketName | *No description.* | +| validateBucketName | Thrown an exception if the given bucket name is not valid. | --- @@ -804,6 +836,24 @@ submod1.GoodbyeBucket.fromBucketName(scope: Construct, id: string, bucketName: s --- +##### \`validateBucketName\` + +\`\`\`typescript +import { submod1 } from 'construct-library' + +submod1.GoodbyeBucket.validateBucketName(physicalName: string) +\`\`\` + +Thrown an exception if the given bucket name is not valid. + +###### \`physicalName\`Required + +- *Type:* string + +name of the bucket. + +--- + #### Properties | **Name** | **Type** | **Description** | @@ -1035,7 +1085,7 @@ new GreeterBucket(scope: Construct, id: string, props?: BucketProps) | addEventNotification | Adds a bucket notification event destination. | | addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | | addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | | arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | | grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | | grantPublicAccess | Allows unrestricted access to objects from this bucket. | @@ -1047,9 +1097,10 @@ new GreeterBucket(scope: Construct, id: string, props?: BucketProps) | onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | | onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | | onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3UrlForObject | The S3 URL of an S3 object. | -| urlForObject | The https URL of an S3 object. | -| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. | +| s3UrlForObject | The S3 URL of an S3 object. For example:. | +| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | +| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | | addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | | addInventory | Add an inventory configuration. | | addLifecycleRule | Add a lifecycle rule to the bucket. | @@ -1071,7 +1122,7 @@ being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. -The resource can be deleted (\`RemovalPolicy.DELETE\`), or left in your AWS +The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). ###### \`policy\`Required @@ -1093,7 +1144,9 @@ Adds a bucket notification event destination. *Example* \`\`\`typescript - bucket.addEventNotification(EventType.OnObjectCreated, myLambda, 'home/myusername/*') + declare const myLambda: lambda.Function; + const bucket = new s3.Bucket(this, 'MyBucket'); + bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(myLambda), {prefix: 'home/myusername/*'}); \`\`\` @@ -1134,7 +1187,7 @@ public addObjectCreatedNotification(dest: IBucketNotificationDestination, filter Subscribes a destination to receive notifications when an object is created in the bucket. This is identical to calling -\`onEvent(EventType.ObjectCreated)\`. +\`onEvent(EventType.OBJECT_CREATED)\`. ###### \`dest\`Required @@ -1161,7 +1214,7 @@ public addObjectRemovedNotification(dest: IBucketNotificationDestination, filter Subscribes a destination to receive notifications when an object is removed from the bucket. This is identical to calling -\`onEvent(EventType.ObjectRemoved)\`. +\`onEvent(EventType.OBJECT_REMOVED)\`. ###### \`dest\`Required @@ -1185,12 +1238,20 @@ Filters (see onEvent). public addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult \`\`\` -Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. +Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. + +Note that the policy statement may or may not be added to the policy. +For example, when an \`IBucket\` is created from an existing bucket, +it's not possible to tell whether the bucket already has a policy +attached, let alone to re-use that policy to add more statements to it. +So it's safest to do nothing in these cases. ###### \`permission\`Required - *Type:* @aws-cdk/aws-iam.PolicyStatement +the policy statement to be added to the bucket's policy. + --- ##### \`arnForObjects\` @@ -1260,6 +1321,10 @@ to an IPv4 range like this: const grant = bucket.grantPublicAccess(); grant.resourceStatement!.addCondition(‘IpAddress’, { “aws:SourceIp”: “54.240.143.0/24” }); +Note that if this \`IBucket\` refers to an existing bucket, possibly not +managed by CloudFormation, this method will have no effect, since it's +impossible to modify the policy of an existing bucket. + ###### \`allowedActions\`Required - *Type:* string @@ -1516,45 +1581,66 @@ Options for adding the rule. public s3UrlForObject(key?: string): string \`\`\` -The S3 URL of an S3 object. +The S3 URL of an S3 object. For example:. -For example: +\`s3://onlybucket\` +- \`s3://bucket/key\` -*Example* +###### \`key\`Optional + +- *Type:* string + +The S3 key of the object. + +If not specified, the S3 URL of the +bucket is returned. + +--- + +##### \`transferAccelerationUrlForObject\` \`\`\`typescript -s3://bucket/key +public transferAccelerationUrlForObject(key?: string, options?: TransferAccelerationUrlOptions): string \`\`\` +The https Transfer Acceleration URL of an S3 object. -###### \`key\`Optional +Specify \`dualStack: true\` at the options +for dual-stack endpoint (connect to the bucket over IPv6). For example: + +- \`https://bucket.s3-accelerate.amazonaws.com\` +- \`https://bucket.s3-accelerate.amazonaws.com/key\` + +###### \`key\`Optional - *Type:* string The S3 key of the object. -If not specified, the S3 URL of the +If not specified, the URL of the bucket is returned. --- -##### \`urlForObject\` +###### \`options\`Optional -\`\`\`typescript -public urlForObject(key?: string): string -\`\`\` +- *Type:* @aws-cdk/aws-s3.TransferAccelerationUrlOptions -The https URL of an S3 object. +Options for generating URL. -Specify \`regional: false\` at the options -for non-regional URLs. For example: +--- -*Example* +##### \`urlForObject\` \`\`\`typescript -https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey +public urlForObject(key?: string): string \`\`\` +The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. + +\`https://s3.us-west-1.amazonaws.com/onlybucket\` +- \`https://s3.us-west-1.amazonaws.com/bucket/key\` +- \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` ###### \`key\`Optional @@ -1573,17 +1659,12 @@ bucket is returned. public virtualHostedUrlForObject(key?: string, options?: VirtualHostedStyleUrlOptions): string \`\`\` -The virtual hosted-style URL of an S3 object. - -Specify \`regional: false\` at -the options for non-regional URL. For example: - -*Example* - -\`\`\`typescript -https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey -\`\`\` +The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. +\`https://only-bucket.s3.us-west-1.amazonaws.com\` +- \`https://bucket.s3.us-west-1.amazonaws.com/key\` +- \`https://bucket.s3.amazonaws.com/key\` +- \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` ###### \`key\`Optional @@ -1682,6 +1763,7 @@ public greet(): void | fromBucketArn | *No description.* | | fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | | fromBucketName | *No description.* | +| validateBucketName | Thrown an exception if the given bucket name is not valid. | --- @@ -1790,6 +1872,24 @@ GreeterBucket.fromBucketName(scope: Construct, id: string, bucketName: string) --- +##### \`validateBucketName\` + +\`\`\`typescript +import { GreeterBucket } from 'construct-library' + +GreeterBucket.validateBucketName(physicalName: string) +\`\`\` + +Thrown an exception if the given bucket name is not valid. + +###### \`physicalName\`Required + +- *Type:* string + +name of the bucket. + +--- + #### Properties | **Name** | **Type** | **Description** | @@ -2007,14 +2107,18 @@ submod1.GoodbyeBucket( encryption: BucketEncryption = None, encryption_key: IKey = None, enforce_ss_l: bool = None, + event_bridge_enabled: bool = None, + intelligent_tiering_configurations: typing.List[IntelligentTieringConfiguration] = None, inventories: typing.List[Inventory] = None, lifecycle_rules: typing.List[LifecycleRule] = None, metrics: typing.List[BucketMetrics] = None, + notifications_handler_role: IRole = None, object_ownership: ObjectOwnership = None, public_read_access: bool = None, removal_policy: RemovalPolicy = None, server_access_logs_bucket: IBucket = None, server_access_logs_prefix: str = None, + transfer_acceleration: bool = None, versioned: bool = None, website_error_document: str = None, website_index_document: str = None, @@ -2036,14 +2140,18 @@ submod1.GoodbyeBucket( | encryption | aws_cdk.aws_s3.BucketEncryption | The kind of server-side encryption to apply to this bucket. | | encryption_key | aws_cdk.aws_kms.IKey | External KMS key to use for bucket encryption. | | enforce_ss_l | bool | Enforces SSL for requests. | +| event_bridge_enabled | bool | Whether this bucket should send notifications to Amazon EventBridge or not. | +| intelligent_tiering_configurations | typing.List[aws_cdk.aws_s3.IntelligentTieringConfiguration] | Inteligent Tiering Configurations. | | inventories | typing.List[aws_cdk.aws_s3.Inventory] | The inventory configuration of the bucket. | | lifecycle_rules | typing.List[aws_cdk.aws_s3.LifecycleRule] | Rules that define how Amazon S3 manages objects during their lifetime. | | metrics | typing.List[aws_cdk.aws_s3.BucketMetrics] | The metrics configuration of this bucket. | +| notifications_handler_role | aws_cdk.aws_iam.IRole | The role to be used by the notifications handler. | | object_ownership | aws_cdk.aws_s3.ObjectOwnership | The objectOwnership of the bucket. | | public_read_access | bool | Grants public read access to all objects in the bucket. | | removal_policy | aws_cdk.core.RemovalPolicy | Policy to apply when the bucket is removed from this stack. | | server_access_logs_bucket | aws_cdk.aws_s3.IBucket | Destination bucket for the server access logs. | | server_access_logs_prefix | str | Optional log file prefix to use for the bucket's access logs. | +| transfer_acceleration | bool | Whether this bucket should have transfer acceleration turned on or not. | | versioned | bool | Whether this bucket should have versioning turned on or not. | | website_error_document | str | The name of the error document (e.g. \\"404.html\\") for the website. \`websiteIndexDocument\` must also be set if this is set. | | website_index_document | str | The name of the index document (e.g. \\"index.html\\") for the website. Enables static website hosting for this bucket. | @@ -2082,6 +2190,11 @@ Whether all objects should be automatically deleted when the bucket is removed f Requires the \`removalPolicy\` to be set to \`RemovalPolicy.DESTROY\`. +**Warning** if you have deployed a bucket with \`autoDeleteObjects: true\`, +switching this to \`false\` in a CDK version *before* \`1.126.0\` will lead to +all objects in the bucket being deleted. Be sure to update your bucket resources +by deploying with CDK version \`1.126.0\` or later **before** switching this value to \`false\`. + --- ##### \`block_public_access\`Optional @@ -2164,6 +2277,26 @@ S3.5 of the AWS Foundational Security Best Practices Regarding S3. --- +##### \`event_bridge_enabled\`Optional + +- *Type:* bool +- *Default:* false + +Whether this bucket should send notifications to Amazon EventBridge or not. + +--- + +##### \`intelligent_tiering_configurations\`Optional + +- *Type:* typing.List[aws_cdk.aws_s3.IntelligentTieringConfiguration] +- *Default:* No Intelligent Tiiering Configurations. + +Inteligent Tiering Configurations. + +> [https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering.html](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering.html) + +--- + ##### \`inventories\`Optional - *Type:* typing.List[aws_cdk.aws_s3.Inventory] @@ -2195,6 +2328,15 @@ The metrics configuration of this bucket. --- +##### \`notifications_handler_role\`Optional + +- *Type:* aws_cdk.aws_iam.IRole +- *Default:* a new role will be created. + +The role to be used by the notifications handler. + +--- + ##### \`object_ownership\`Optional - *Type:* aws_cdk.aws_s3.ObjectOwnership @@ -2246,6 +2388,15 @@ If defined without \\"serverAccessLogsBucket\\", enables access logs to current --- +##### \`transfer_acceleration\`Optional + +- *Type:* bool +- *Default:* false + +Whether this bucket should have transfer acceleration turned on or not. + +--- + ##### \`versioned\`Optional - *Type:* bool @@ -2301,7 +2452,7 @@ Rules that define when a redirect is applied and the redirect behavior. | add_event_notification | Adds a bucket notification event destination. | | add_object_created_notification | Subscribes a destination to receive notifications when an object is created in the bucket. | | add_object_removed_notification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| add_to_resource_policy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| add_to_resource_policy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | | arn_for_objects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | | grant_delete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | | grant_public_access | Allows unrestricted access to objects from this bucket. | @@ -2313,9 +2464,10 @@ Rules that define when a redirect is applied and the redirect behavior. | on_cloud_trail_event | Define a CloudWatch event that triggers when something happens to this repository. | | on_cloud_trail_put_object | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | | on_cloud_trail_write_object | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3_url_for_object | The S3 URL of an S3 object. | -| url_for_object | The https URL of an S3 object. | -| virtual_hosted_url_for_object | The virtual hosted-style URL of an S3 object. | +| s3_url_for_object | The S3 URL of an S3 object. For example:. | +| transfer_acceleration_url_for_object | The https Transfer Acceleration URL of an S3 object. | +| url_for_object | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtual_hosted_url_for_object | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | | add_cors_rule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | | add_inventory | Add an inventory configuration. | | add_lifecycle_rule | Add a lifecycle rule to the bucket. | @@ -2339,7 +2491,7 @@ being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. -The resource can be deleted (\`RemovalPolicy.DELETE\`), or left in your AWS +The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). ###### \`policy\`Required @@ -2366,7 +2518,9 @@ Adds a bucket notification event destination. *Example* \`\`\`python - bucket.addEventNotification(EventType.OnObjectCreated, myLambda, 'home/myusername/*') + declare const myLambda: lambda.Function; + const bucket = new s3.Bucket(this, 'MyBucket'); + bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(myLambda), {prefix: 'home/myusername/*'}); \`\`\` @@ -2415,7 +2569,7 @@ def add_object_created_notification( Subscribes a destination to receive notifications when an object is created in the bucket. This is identical to calling -\`onEvent(EventType.ObjectCreated)\`. +\`onEvent(EventType.OBJECT_CREATED)\`. ###### \`dest\`Required @@ -2454,7 +2608,7 @@ def add_object_removed_notification( Subscribes a destination to receive notifications when an object is removed from the bucket. This is identical to calling -\`onEvent(EventType.ObjectRemoved)\`. +\`onEvent(EventType.OBJECT_REMOVED)\`. ###### \`dest\`Required @@ -2488,12 +2642,20 @@ def add_to_resource_policy( ) -> AddToResourcePolicyResult \`\`\` -Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. +Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. + +Note that the policy statement may or may not be added to the policy. +For example, when an \`IBucket\` is created from an existing bucket, +it's not possible to tell whether the bucket already has a policy +attached, let alone to re-use that policy to add more statements to it. +So it's safest to do nothing in these cases. ###### \`permission\`Required - *Type:* aws_cdk.aws_iam.PolicyStatement +the policy statement to be added to the bucket's policy. + --- ##### \`arn_for_objects\` @@ -2571,6 +2733,10 @@ to an IPv4 range like this: const grant = bucket.grantPublicAccess(); grant.resourceStatement!.addCondition(‘IpAddress’, { “aws:SourceIp”: “54.240.143.0/24” }); +Note that if this \`IBucket\` refers to an existing bucket, possibly not +managed by CloudFormation, this method will have no effect, since it's +impossible to modify the policy of an existing bucket. + ###### \`allowed_actions\`Required - *Type:* str @@ -2994,28 +3160,59 @@ def s3_url_for_object( ) -> str \`\`\` -The S3 URL of an S3 object. +The S3 URL of an S3 object. For example:. -For example: +\`s3://onlybucket\` +- \`s3://bucket/key\` -*Example* +###### \`key\`Optional + +- *Type:* str + +The S3 key of the object. + +If not specified, the S3 URL of the +bucket is returned. + +--- + +##### \`transfer_acceleration_url_for_object\` \`\`\`python -s3://bucket/key +def transfer_acceleration_url_for_object( + key: str = None, + dual_stack: bool = None +) -> str \`\`\` +The https Transfer Acceleration URL of an S3 object. -###### \`key\`Optional +Specify \`dualStack: true\` at the options +for dual-stack endpoint (connect to the bucket over IPv6). For example: + +- \`https://bucket.s3-accelerate.amazonaws.com\` +- \`https://bucket.s3-accelerate.amazonaws.com/key\` + +###### \`key\`Optional - *Type:* str The S3 key of the object. -If not specified, the S3 URL of the +If not specified, the URL of the bucket is returned. --- +###### \`dual_stack\`Optional + +- *Type:* bool +- *Default:* false + +Dual-stack support to connect to the bucket over IPv6. + +--- + ##### \`url_for_object\` \`\`\`python @@ -3024,17 +3221,11 @@ def url_for_object( ) -> str \`\`\` -The https URL of an S3 object. - -Specify \`regional: false\` at the options -for non-regional URLs. For example: - -*Example* - -\`\`\`python -https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey -\`\`\` +The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. +\`https://s3.us-west-1.amazonaws.com/onlybucket\` +- \`https://s3.us-west-1.amazonaws.com/bucket/key\` +- \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` ###### \`key\`Optional @@ -3056,17 +3247,12 @@ def virtual_hosted_url_for_object( ) -> str \`\`\` -The virtual hosted-style URL of an S3 object. - -Specify \`regional: false\` at -the options for non-regional URL. For example: - -*Example* - -\`\`\`python -https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey -\`\`\` +The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. +\`https://only-bucket.s3.us-west-1.amazonaws.com\` +- \`https://bucket.s3.us-west-1.amazonaws.com/key\` +- \`https://bucket.s3.amazonaws.com/key\` +- \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` ###### \`key\`Optional @@ -3254,7 +3440,10 @@ def add_lifecycle_rule( expired_object_delete_marker: bool = None, id: str = None, noncurrent_version_expiration: Duration = None, + noncurrent_versions_to_retain: typing.Union[int, float] = None, noncurrent_version_transitions: typing.List[NoncurrentVersionTransition] = None, + object_size_greater_than: typing.Union[int, float] = None, + object_size_less_than: typing.Union[int, float] = None, prefix: str = None, tag_filters: typing.Mapping[typing.Any] = None, transitions: typing.List[Transition] = None @@ -3351,6 +3540,18 @@ transition time. --- +###### \`noncurrent_versions_to_retain\`Optional + +- *Type:* typing.Union[int, float] +- *Default:* No noncurrent versions to retain + +Indicates a maximum number of noncurrent versions to retain. + +If there are this many more noncurrent versions, +Amazon S3 permanently deletes them. + +--- + ###### \`noncurrent_version_transitions\`Optional - *Type:* typing.List[aws_cdk.aws_s3.NoncurrentVersionTransition] @@ -3364,6 +3565,24 @@ must be later than the transition time. --- +###### \`object_size_greater_than\`Optional + +- *Type:* typing.Union[int, float] +- *Default:* No rule + +Specifies the minimum object size in bytes for this rule to apply to. + +--- + +###### \`object_size_less_than\`Optional + +- *Type:* typing.Union[int, float] +- *Default:* No rule + +Specifies the maximum object size in bytes for this rule to apply to. + +--- + ###### \`prefix\`Optional - *Type:* str @@ -3447,6 +3666,7 @@ def goodbye() -> None | from_bucket_arn | *No description.* | | from_bucket_attributes | Creates a Bucket construct that represents an external bucket. | | from_bucket_name | *No description.* | +| validate_bucket_name | Thrown an exception if the given bucket name is not valid. | --- @@ -3516,6 +3736,7 @@ submod1.GoodbyeBucket.from_bucket_attributes( bucket_website_url: str = None, encryption_key: IKey = None, is_website: bool = None, + notifications_handler_role: IRole = None, region: str = None ) \`\`\` @@ -3632,6 +3853,15 @@ If this bucket has been configured for static website hosting. --- +###### \`notifications_handler_role\`Optional + +- *Type:* aws_cdk.aws_iam.IRole +- *Default:* a new role will be created. + +The role to be used by the notifications handler. + +--- + ###### \`region\`Optional - *Type:* str @@ -3671,6 +3901,26 @@ submod1.GoodbyeBucket.from_bucket_name( --- +##### \`validate_bucket_name\` + +\`\`\`python +from construct_library import submod1 + +submod1.GoodbyeBucket.validate_bucket_name( + physical_name: str +) +\`\`\` + +Thrown an exception if the given bucket name is not valid. + +###### \`physical_name\`Required + +- *Type:* str + +name of the bucket. + +--- + #### Properties | **Name** | **Type** | **Description** | @@ -3877,14 +4127,18 @@ construct_library.GreeterBucket( encryption: BucketEncryption = None, encryption_key: IKey = None, enforce_ss_l: bool = None, + event_bridge_enabled: bool = None, + intelligent_tiering_configurations: typing.List[IntelligentTieringConfiguration] = None, inventories: typing.List[Inventory] = None, lifecycle_rules: typing.List[LifecycleRule] = None, metrics: typing.List[BucketMetrics] = None, + notifications_handler_role: IRole = None, object_ownership: ObjectOwnership = None, public_read_access: bool = None, removal_policy: RemovalPolicy = None, server_access_logs_bucket: IBucket = None, server_access_logs_prefix: str = None, + transfer_acceleration: bool = None, versioned: bool = None, website_error_document: str = None, website_index_document: str = None, @@ -3906,14 +4160,18 @@ construct_library.GreeterBucket( | encryption | aws_cdk.aws_s3.BucketEncryption | The kind of server-side encryption to apply to this bucket. | | encryption_key | aws_cdk.aws_kms.IKey | External KMS key to use for bucket encryption. | | enforce_ss_l | bool | Enforces SSL for requests. | +| event_bridge_enabled | bool | Whether this bucket should send notifications to Amazon EventBridge or not. | +| intelligent_tiering_configurations | typing.List[aws_cdk.aws_s3.IntelligentTieringConfiguration] | Inteligent Tiering Configurations. | | inventories | typing.List[aws_cdk.aws_s3.Inventory] | The inventory configuration of the bucket. | | lifecycle_rules | typing.List[aws_cdk.aws_s3.LifecycleRule] | Rules that define how Amazon S3 manages objects during their lifetime. | | metrics | typing.List[aws_cdk.aws_s3.BucketMetrics] | The metrics configuration of this bucket. | +| notifications_handler_role | aws_cdk.aws_iam.IRole | The role to be used by the notifications handler. | | object_ownership | aws_cdk.aws_s3.ObjectOwnership | The objectOwnership of the bucket. | | public_read_access | bool | Grants public read access to all objects in the bucket. | | removal_policy | aws_cdk.core.RemovalPolicy | Policy to apply when the bucket is removed from this stack. | | server_access_logs_bucket | aws_cdk.aws_s3.IBucket | Destination bucket for the server access logs. | | server_access_logs_prefix | str | Optional log file prefix to use for the bucket's access logs. | +| transfer_acceleration | bool | Whether this bucket should have transfer acceleration turned on or not. | | versioned | bool | Whether this bucket should have versioning turned on or not. | | website_error_document | str | The name of the error document (e.g. \\"404.html\\") for the website. \`websiteIndexDocument\` must also be set if this is set. | | website_index_document | str | The name of the index document (e.g. \\"index.html\\") for the website. Enables static website hosting for this bucket. | @@ -3952,6 +4210,11 @@ Whether all objects should be automatically deleted when the bucket is removed f Requires the \`removalPolicy\` to be set to \`RemovalPolicy.DESTROY\`. +**Warning** if you have deployed a bucket with \`autoDeleteObjects: true\`, +switching this to \`false\` in a CDK version *before* \`1.126.0\` will lead to +all objects in the bucket being deleted. Be sure to update your bucket resources +by deploying with CDK version \`1.126.0\` or later **before** switching this value to \`false\`. + --- ##### \`block_public_access\`Optional @@ -4034,6 +4297,26 @@ S3.5 of the AWS Foundational Security Best Practices Regarding S3. --- +##### \`event_bridge_enabled\`Optional + +- *Type:* bool +- *Default:* false + +Whether this bucket should send notifications to Amazon EventBridge or not. + +--- + +##### \`intelligent_tiering_configurations\`Optional + +- *Type:* typing.List[aws_cdk.aws_s3.IntelligentTieringConfiguration] +- *Default:* No Intelligent Tiiering Configurations. + +Inteligent Tiering Configurations. + +> [https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering.html](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering.html) + +--- + ##### \`inventories\`Optional - *Type:* typing.List[aws_cdk.aws_s3.Inventory] @@ -4065,6 +4348,15 @@ The metrics configuration of this bucket. --- +##### \`notifications_handler_role\`Optional + +- *Type:* aws_cdk.aws_iam.IRole +- *Default:* a new role will be created. + +The role to be used by the notifications handler. + +--- + ##### \`object_ownership\`Optional - *Type:* aws_cdk.aws_s3.ObjectOwnership @@ -4116,6 +4408,15 @@ If defined without \\"serverAccessLogsBucket\\", enables access logs to current --- +##### \`transfer_acceleration\`Optional + +- *Type:* bool +- *Default:* false + +Whether this bucket should have transfer acceleration turned on or not. + +--- + ##### \`versioned\`Optional - *Type:* bool @@ -4171,7 +4472,7 @@ Rules that define when a redirect is applied and the redirect behavior. | add_event_notification | Adds a bucket notification event destination. | | add_object_created_notification | Subscribes a destination to receive notifications when an object is created in the bucket. | | add_object_removed_notification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| add_to_resource_policy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| add_to_resource_policy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | | arn_for_objects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | | grant_delete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | | grant_public_access | Allows unrestricted access to objects from this bucket. | @@ -4183,9 +4484,10 @@ Rules that define when a redirect is applied and the redirect behavior. | on_cloud_trail_event | Define a CloudWatch event that triggers when something happens to this repository. | | on_cloud_trail_put_object | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | | on_cloud_trail_write_object | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3_url_for_object | The S3 URL of an S3 object. | -| url_for_object | The https URL of an S3 object. | -| virtual_hosted_url_for_object | The virtual hosted-style URL of an S3 object. | +| s3_url_for_object | The S3 URL of an S3 object. For example:. | +| transfer_acceleration_url_for_object | The https Transfer Acceleration URL of an S3 object. | +| url_for_object | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtual_hosted_url_for_object | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | | add_cors_rule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | | add_inventory | Add an inventory configuration. | | add_lifecycle_rule | Add a lifecycle rule to the bucket. | @@ -4209,7 +4511,7 @@ being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. -The resource can be deleted (\`RemovalPolicy.DELETE\`), or left in your AWS +The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). ###### \`policy\`Required @@ -4236,7 +4538,9 @@ Adds a bucket notification event destination. *Example* \`\`\`python - bucket.addEventNotification(EventType.OnObjectCreated, myLambda, 'home/myusername/*') + declare const myLambda: lambda.Function; + const bucket = new s3.Bucket(this, 'MyBucket'); + bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(myLambda), {prefix: 'home/myusername/*'}); \`\`\` @@ -4285,7 +4589,7 @@ def add_object_created_notification( Subscribes a destination to receive notifications when an object is created in the bucket. This is identical to calling -\`onEvent(EventType.ObjectCreated)\`. +\`onEvent(EventType.OBJECT_CREATED)\`. ###### \`dest\`Required @@ -4324,7 +4628,7 @@ def add_object_removed_notification( Subscribes a destination to receive notifications when an object is removed from the bucket. This is identical to calling -\`onEvent(EventType.ObjectRemoved)\`. +\`onEvent(EventType.OBJECT_REMOVED)\`. ###### \`dest\`Required @@ -4358,12 +4662,20 @@ def add_to_resource_policy( ) -> AddToResourcePolicyResult \`\`\` -Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. +Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. + +Note that the policy statement may or may not be added to the policy. +For example, when an \`IBucket\` is created from an existing bucket, +it's not possible to tell whether the bucket already has a policy +attached, let alone to re-use that policy to add more statements to it. +So it's safest to do nothing in these cases. ###### \`permission\`Required - *Type:* aws_cdk.aws_iam.PolicyStatement +the policy statement to be added to the bucket's policy. + --- ##### \`arn_for_objects\` @@ -4441,6 +4753,10 @@ to an IPv4 range like this: const grant = bucket.grantPublicAccess(); grant.resourceStatement!.addCondition(‘IpAddress’, { “aws:SourceIp”: “54.240.143.0/24” }); +Note that if this \`IBucket\` refers to an existing bucket, possibly not +managed by CloudFormation, this method will have no effect, since it's +impossible to modify the policy of an existing bucket. + ###### \`allowed_actions\`Required - *Type:* str @@ -4864,28 +5180,59 @@ def s3_url_for_object( ) -> str \`\`\` -The S3 URL of an S3 object. +The S3 URL of an S3 object. For example:. -For example: +\`s3://onlybucket\` +- \`s3://bucket/key\` -*Example* +###### \`key\`Optional + +- *Type:* str + +The S3 key of the object. + +If not specified, the S3 URL of the +bucket is returned. + +--- + +##### \`transfer_acceleration_url_for_object\` \`\`\`python -s3://bucket/key +def transfer_acceleration_url_for_object( + key: str = None, + dual_stack: bool = None +) -> str \`\`\` +The https Transfer Acceleration URL of an S3 object. -###### \`key\`Optional +Specify \`dualStack: true\` at the options +for dual-stack endpoint (connect to the bucket over IPv6). For example: + +- \`https://bucket.s3-accelerate.amazonaws.com\` +- \`https://bucket.s3-accelerate.amazonaws.com/key\` + +###### \`key\`Optional - *Type:* str The S3 key of the object. -If not specified, the S3 URL of the +If not specified, the URL of the bucket is returned. --- +###### \`dual_stack\`Optional + +- *Type:* bool +- *Default:* false + +Dual-stack support to connect to the bucket over IPv6. + +--- + ##### \`url_for_object\` \`\`\`python @@ -4894,17 +5241,11 @@ def url_for_object( ) -> str \`\`\` -The https URL of an S3 object. - -Specify \`regional: false\` at the options -for non-regional URLs. For example: - -*Example* - -\`\`\`python -https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey -\`\`\` +The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. +\`https://s3.us-west-1.amazonaws.com/onlybucket\` +- \`https://s3.us-west-1.amazonaws.com/bucket/key\` +- \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` ###### \`key\`Optional @@ -4926,17 +5267,12 @@ def virtual_hosted_url_for_object( ) -> str \`\`\` -The virtual hosted-style URL of an S3 object. - -Specify \`regional: false\` at -the options for non-regional URL. For example: - -*Example* - -\`\`\`python -https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey -\`\`\` +The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. +\`https://only-bucket.s3.us-west-1.amazonaws.com\` +- \`https://bucket.s3.us-west-1.amazonaws.com/key\` +- \`https://bucket.s3.amazonaws.com/key\` +- \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` ###### \`key\`Optional @@ -5124,7 +5460,10 @@ def add_lifecycle_rule( expired_object_delete_marker: bool = None, id: str = None, noncurrent_version_expiration: Duration = None, + noncurrent_versions_to_retain: typing.Union[int, float] = None, noncurrent_version_transitions: typing.List[NoncurrentVersionTransition] = None, + object_size_greater_than: typing.Union[int, float] = None, + object_size_less_than: typing.Union[int, float] = None, prefix: str = None, tag_filters: typing.Mapping[typing.Any] = None, transitions: typing.List[Transition] = None @@ -5221,6 +5560,18 @@ transition time. --- +###### \`noncurrent_versions_to_retain\`Optional + +- *Type:* typing.Union[int, float] +- *Default:* No noncurrent versions to retain + +Indicates a maximum number of noncurrent versions to retain. + +If there are this many more noncurrent versions, +Amazon S3 permanently deletes them. + +--- + ###### \`noncurrent_version_transitions\`Optional - *Type:* typing.List[aws_cdk.aws_s3.NoncurrentVersionTransition] @@ -5234,6 +5585,24 @@ must be later than the transition time. --- +###### \`object_size_greater_than\`Optional + +- *Type:* typing.Union[int, float] +- *Default:* No rule + +Specifies the minimum object size in bytes for this rule to apply to. + +--- + +###### \`object_size_less_than\`Optional + +- *Type:* typing.Union[int, float] +- *Default:* No rule + +Specifies the maximum object size in bytes for this rule to apply to. + +--- + ###### \`prefix\`Optional - *Type:* str @@ -5317,6 +5686,7 @@ def greet() -> None | from_bucket_arn | *No description.* | | from_bucket_attributes | Creates a Bucket construct that represents an external bucket. | | from_bucket_name | *No description.* | +| validate_bucket_name | Thrown an exception if the given bucket name is not valid. | --- @@ -5386,6 +5756,7 @@ construct_library.GreeterBucket.from_bucket_attributes( bucket_website_url: str = None, encryption_key: IKey = None, is_website: bool = None, + notifications_handler_role: IRole = None, region: str = None ) \`\`\` @@ -5502,6 +5873,15 @@ If this bucket has been configured for static website hosting. --- +###### \`notifications_handler_role\`Optional + +- *Type:* aws_cdk.aws_iam.IRole +- *Default:* a new role will be created. + +The role to be used by the notifications handler. + +--- + ###### \`region\`Optional - *Type:* str @@ -5541,6 +5921,26 @@ construct_library.GreeterBucket.from_bucket_name( --- +##### \`validate_bucket_name\` + +\`\`\`python +import construct_library + +construct_library.GreeterBucket.validate_bucket_name( + physical_name: str +) +\`\`\` + +Thrown an exception if the given bucket name is not valid. + +###### \`physical_name\`Required + +- *Type:* str + +name of the bucket. + +--- + #### Properties | **Name** | **Type** | **Description** | @@ -5783,7 +6183,7 @@ new GreeterBucket(scope: Construct, id: string, props?: BucketProps) | addEventNotification | Adds a bucket notification event destination. | | addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | | addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | | arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | | grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | | grantPublicAccess | Allows unrestricted access to objects from this bucket. | @@ -5795,9 +6195,10 @@ new GreeterBucket(scope: Construct, id: string, props?: BucketProps) | onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | | onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | | onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3UrlForObject | The S3 URL of an S3 object. | -| urlForObject | The https URL of an S3 object. | -| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. | +| s3UrlForObject | The S3 URL of an S3 object. For example:. | +| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | +| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | | addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | | addInventory | Add an inventory configuration. | | addLifecycleRule | Add a lifecycle rule to the bucket. | @@ -5819,7 +6220,7 @@ being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. -The resource can be deleted (\`RemovalPolicy.DELETE\`), or left in your AWS +The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). ###### \`policy\`Required @@ -5841,7 +6242,9 @@ Adds a bucket notification event destination. *Example* \`\`\`typescript - bucket.addEventNotification(EventType.OnObjectCreated, myLambda, 'home/myusername/*') + declare const myLambda: lambda.Function; + const bucket = new s3.Bucket(this, 'MyBucket'); + bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(myLambda), {prefix: 'home/myusername/*'}); \`\`\` @@ -5882,7 +6285,7 @@ public addObjectCreatedNotification(dest: IBucketNotificationDestination, filter Subscribes a destination to receive notifications when an object is created in the bucket. This is identical to calling -\`onEvent(EventType.ObjectCreated)\`. +\`onEvent(EventType.OBJECT_CREATED)\`. ###### \`dest\`Required @@ -5909,7 +6312,7 @@ public addObjectRemovedNotification(dest: IBucketNotificationDestination, filter Subscribes a destination to receive notifications when an object is removed from the bucket. This is identical to calling -\`onEvent(EventType.ObjectRemoved)\`. +\`onEvent(EventType.OBJECT_REMOVED)\`. ###### \`dest\`Required @@ -5933,12 +6336,20 @@ Filters (see onEvent). public addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult \`\`\` -Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. +Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. + +Note that the policy statement may or may not be added to the policy. +For example, when an \`IBucket\` is created from an existing bucket, +it's not possible to tell whether the bucket already has a policy +attached, let alone to re-use that policy to add more statements to it. +So it's safest to do nothing in these cases. ###### \`permission\`Required - *Type:* @aws-cdk/aws-iam.PolicyStatement +the policy statement to be added to the bucket's policy. + --- ##### \`arnForObjects\` @@ -6008,6 +6419,10 @@ to an IPv4 range like this: const grant = bucket.grantPublicAccess(); grant.resourceStatement!.addCondition(‘IpAddress’, { “aws:SourceIp”: “54.240.143.0/24” }); +Note that if this \`IBucket\` refers to an existing bucket, possibly not +managed by CloudFormation, this method will have no effect, since it's +impossible to modify the policy of an existing bucket. + ###### \`allowedActions\`Required - *Type:* string @@ -6264,45 +6679,66 @@ Options for adding the rule. public s3UrlForObject(key?: string): string \`\`\` -The S3 URL of an S3 object. +The S3 URL of an S3 object. For example:. -For example: +\`s3://onlybucket\` +- \`s3://bucket/key\` -*Example* +###### \`key\`Optional + +- *Type:* string + +The S3 key of the object. + +If not specified, the S3 URL of the +bucket is returned. + +--- + +##### \`transferAccelerationUrlForObject\` \`\`\`typescript -s3://bucket/key +public transferAccelerationUrlForObject(key?: string, options?: TransferAccelerationUrlOptions): string \`\`\` +The https Transfer Acceleration URL of an S3 object. -###### \`key\`Optional +Specify \`dualStack: true\` at the options +for dual-stack endpoint (connect to the bucket over IPv6). For example: + +- \`https://bucket.s3-accelerate.amazonaws.com\` +- \`https://bucket.s3-accelerate.amazonaws.com/key\` + +###### \`key\`Optional - *Type:* string The S3 key of the object. -If not specified, the S3 URL of the +If not specified, the URL of the bucket is returned. --- -##### \`urlForObject\` +###### \`options\`Optional -\`\`\`typescript -public urlForObject(key?: string): string -\`\`\` +- *Type:* @aws-cdk/aws-s3.TransferAccelerationUrlOptions -The https URL of an S3 object. +Options for generating URL. -Specify \`regional: false\` at the options -for non-regional URLs. For example: +--- -*Example* +##### \`urlForObject\` \`\`\`typescript -https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey +public urlForObject(key?: string): string \`\`\` +The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. + +\`https://s3.us-west-1.amazonaws.com/onlybucket\` +- \`https://s3.us-west-1.amazonaws.com/bucket/key\` +- \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` ###### \`key\`Optional @@ -6321,17 +6757,12 @@ bucket is returned. public virtualHostedUrlForObject(key?: string, options?: VirtualHostedStyleUrlOptions): string \`\`\` -The virtual hosted-style URL of an S3 object. - -Specify \`regional: false\` at -the options for non-regional URL. For example: - -*Example* - -\`\`\`typescript -https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey -\`\`\` +The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. +\`https://only-bucket.s3.us-west-1.amazonaws.com\` +- \`https://bucket.s3.us-west-1.amazonaws.com/key\` +- \`https://bucket.s3.amazonaws.com/key\` +- \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` ###### \`key\`Optional @@ -6430,6 +6861,7 @@ public greet(): void | fromBucketArn | *No description.* | | fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | | fromBucketName | *No description.* | +| validateBucketName | Thrown an exception if the given bucket name is not valid. | --- @@ -6538,6 +6970,24 @@ GreeterBucket.fromBucketName(scope: Construct, id: string, bucketName: string) --- +##### \`validateBucketName\` + +\`\`\`typescript +import { GreeterBucket } from 'construct-library' + +GreeterBucket.validateBucketName(physicalName: string) +\`\`\` + +Thrown an exception if the given bucket name is not valid. + +###### \`physicalName\`Required + +- *Type:* string + +name of the bucket. + +--- + #### Properties | **Name** | **Type** | **Description** | @@ -6780,7 +7230,7 @@ new submod1.GoodbyeBucket(scope: Construct, id: string, props?: BucketProps) | addEventNotification | Adds a bucket notification event destination. | | addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | | addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | | arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | | grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | | grantPublicAccess | Allows unrestricted access to objects from this bucket. | @@ -6792,9 +7242,10 @@ new submod1.GoodbyeBucket(scope: Construct, id: string, props?: BucketProps) | onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | | onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | | onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3UrlForObject | The S3 URL of an S3 object. | -| urlForObject | The https URL of an S3 object. | -| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. | +| s3UrlForObject | The S3 URL of an S3 object. For example:. | +| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | +| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | | addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | | addInventory | Add an inventory configuration. | | addLifecycleRule | Add a lifecycle rule to the bucket. | @@ -6816,7 +7267,7 @@ being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. -The resource can be deleted (\`RemovalPolicy.DELETE\`), or left in your AWS +The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). ###### \`policy\`Required @@ -6838,7 +7289,9 @@ Adds a bucket notification event destination. *Example* \`\`\`typescript - bucket.addEventNotification(EventType.OnObjectCreated, myLambda, 'home/myusername/*') + declare const myLambda: lambda.Function; + const bucket = new s3.Bucket(this, 'MyBucket'); + bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(myLambda), {prefix: 'home/myusername/*'}); \`\`\` @@ -6879,7 +7332,7 @@ public addObjectCreatedNotification(dest: IBucketNotificationDestination, filter Subscribes a destination to receive notifications when an object is created in the bucket. This is identical to calling -\`onEvent(EventType.ObjectCreated)\`. +\`onEvent(EventType.OBJECT_CREATED)\`. ###### \`dest\`Required @@ -6906,7 +7359,7 @@ public addObjectRemovedNotification(dest: IBucketNotificationDestination, filter Subscribes a destination to receive notifications when an object is removed from the bucket. This is identical to calling -\`onEvent(EventType.ObjectRemoved)\`. +\`onEvent(EventType.OBJECT_REMOVED)\`. ###### \`dest\`Required @@ -6930,12 +7383,20 @@ Filters (see onEvent). public addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult \`\`\` -Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. +Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. + +Note that the policy statement may or may not be added to the policy. +For example, when an \`IBucket\` is created from an existing bucket, +it's not possible to tell whether the bucket already has a policy +attached, let alone to re-use that policy to add more statements to it. +So it's safest to do nothing in these cases. ###### \`permission\`Required - *Type:* @aws-cdk/aws-iam.PolicyStatement +the policy statement to be added to the bucket's policy. + --- ##### \`arnForObjects\` @@ -7005,6 +7466,10 @@ to an IPv4 range like this: const grant = bucket.grantPublicAccess(); grant.resourceStatement!.addCondition(‘IpAddress’, { “aws:SourceIp”: “54.240.143.0/24” }); +Note that if this \`IBucket\` refers to an existing bucket, possibly not +managed by CloudFormation, this method will have no effect, since it's +impossible to modify the policy of an existing bucket. + ###### \`allowedActions\`Required - *Type:* string @@ -7261,45 +7726,66 @@ Options for adding the rule. public s3UrlForObject(key?: string): string \`\`\` -The S3 URL of an S3 object. +The S3 URL of an S3 object. For example:. -For example: +\`s3://onlybucket\` +- \`s3://bucket/key\` -*Example* +###### \`key\`Optional + +- *Type:* string + +The S3 key of the object. + +If not specified, the S3 URL of the +bucket is returned. + +--- + +##### \`transferAccelerationUrlForObject\` \`\`\`typescript -s3://bucket/key +public transferAccelerationUrlForObject(key?: string, options?: TransferAccelerationUrlOptions): string \`\`\` +The https Transfer Acceleration URL of an S3 object. -###### \`key\`Optional +Specify \`dualStack: true\` at the options +for dual-stack endpoint (connect to the bucket over IPv6). For example: + +- \`https://bucket.s3-accelerate.amazonaws.com\` +- \`https://bucket.s3-accelerate.amazonaws.com/key\` + +###### \`key\`Optional - *Type:* string The S3 key of the object. -If not specified, the S3 URL of the +If not specified, the URL of the bucket is returned. --- -##### \`urlForObject\` +###### \`options\`Optional -\`\`\`typescript -public urlForObject(key?: string): string -\`\`\` +- *Type:* @aws-cdk/aws-s3.TransferAccelerationUrlOptions -The https URL of an S3 object. +Options for generating URL. -Specify \`regional: false\` at the options -for non-regional URLs. For example: +--- -*Example* +##### \`urlForObject\` \`\`\`typescript -https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey +public urlForObject(key?: string): string \`\`\` +The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. + +\`https://s3.us-west-1.amazonaws.com/onlybucket\` +- \`https://s3.us-west-1.amazonaws.com/bucket/key\` +- \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` ###### \`key\`Optional @@ -7318,17 +7804,12 @@ bucket is returned. public virtualHostedUrlForObject(key?: string, options?: VirtualHostedStyleUrlOptions): string \`\`\` -The virtual hosted-style URL of an S3 object. - -Specify \`regional: false\` at -the options for non-regional URL. For example: - -*Example* - -\`\`\`typescript -https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey -\`\`\` +The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. +\`https://only-bucket.s3.us-west-1.amazonaws.com\` +- \`https://bucket.s3.us-west-1.amazonaws.com/key\` +- \`https://bucket.s3.amazonaws.com/key\` +- \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` ###### \`key\`Optional @@ -7427,6 +7908,7 @@ public goodbye(): void | fromBucketArn | *No description.* | | fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | | fromBucketName | *No description.* | +| validateBucketName | Thrown an exception if the given bucket name is not valid. | --- @@ -7535,6 +8017,24 @@ submod1.GoodbyeBucket.fromBucketName(scope: Construct, id: string, bucketName: s --- +##### \`validateBucketName\` + +\`\`\`typescript +import { submod1 } from 'construct-library' + +submod1.GoodbyeBucket.validateBucketName(physicalName: string) +\`\`\` + +Thrown an exception if the given bucket name is not valid. + +###### \`physicalName\`Required + +- *Type:* string + +name of the bucket. + +--- + #### Properties | **Name** | **Type** | **Description** | diff --git a/apps/jsii-docgen/test/docgen/view/__snapshots__/documentation.test.ts.snap b/apps/jsii-docgen/test/docgen/view/__snapshots__/documentation.test.ts.snap index 1d020625cea..cbef7336ede 100644 --- a/apps/jsii-docgen/test/docgen/view/__snapshots__/documentation.test.ts.snap +++ b/apps/jsii-docgen/test/docgen/view/__snapshots__/documentation.test.ts.snap @@ -51,7 +51,7 @@ being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. -The resource can be deleted (\`RemovalPolicy.DELETE\`), or left in your AWS +The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`).", "summary": "Apply the given removal policy to this resource.", }, @@ -84,7 +84,9 @@ account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`).", Object { "displayName": "addEventNotification", "docs": Object { - "example": " bucket.addEventNotification(EventType.OnObjectCreated, myLambda, 'home/myusername/*')", + "example": " declare const myLambda: lambda.Function; + const bucket = new s3.Bucket(this, 'MyBucket'); + bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(myLambda), {prefix: 'home/myusername/*'});", "links": Array [ "https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html", ], @@ -169,7 +171,7 @@ for details about allowed filter rules.", "displayName": "addObjectCreatedNotification", "docs": Object { "remarks": "This is identical to calling -\`onEvent(EventType.ObjectCreated)\`.", +\`onEvent(EventType.OBJECT_CREATED)\`.", "summary": "Subscribes a destination to receive notifications when an object is created in the bucket.", }, "fqn": "construct-library.GreeterBucket.addObjectCreatedNotification", @@ -226,7 +228,7 @@ for details about allowed filter rules.", "displayName": "addObjectRemovedNotification", "docs": Object { "remarks": "This is identical to calling -\`onEvent(EventType.ObjectRemoved)\`.", +\`onEvent(EventType.OBJECT_REMOVED)\`.", "summary": "Subscribes a destination to receive notifications when an object is removed from the bucket.", }, "fqn": "construct-library.GreeterBucket.addObjectRemovedNotification", @@ -282,7 +284,12 @@ for details about allowed filter rules.", Object { "displayName": "addToResourcePolicy", "docs": Object { - "summary": "Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects.", + "remarks": "Note that the policy statement may or may not be added to the policy. +For example, when an \`IBucket\` is created from an existing bucket, +it's not possible to tell whether the bucket already has a policy +attached, let alone to re-use that policy to add more statements to it. +So it's safest to do nothing in these cases.", + "summary": "Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects.", }, "fqn": "construct-library.GreeterBucket.addToResourcePolicy", "id": "construct-library.GreeterBucket.addToResourcePolicy", @@ -290,7 +297,9 @@ for details about allowed filter rules.", Object { "default": undefined, "displayName": "permission", - "docs": Object {}, + "docs": Object { + "summary": "the policy statement to be added to the bucket's policy.", + }, "fqn": "construct-library.GreeterBucket.addToResourcePolicy.parameter.permission", "id": "construct-library.GreeterBucket.addToResourcePolicy.parameter.permission", "optional": undefined, @@ -399,7 +408,11 @@ as needed. For example, you can add a condition that will restrict access only to an IPv4 range like this: const grant = bucket.grantPublicAccess(); - grant.resourceStatement!.addCondition(‘IpAddress’, { “aws:SourceIp”: “54.240.143.0/24” });", + grant.resourceStatement!.addCondition(‘IpAddress’, { “aws:SourceIp”: “54.240.143.0/24” }); + +Note that if this \`IBucket\` refers to an existing bucket, possibly not +managed by CloudFormation, this method will have no effect, since it's +impossible to modify the policy of an existing bucket.", "summary": "Allows unrestricted access to objects from this bucket.", }, "fqn": "construct-library.GreeterBucket.grantPublicAccess", @@ -799,9 +812,9 @@ that captures the event. This method will not create the Trail.", Object { "displayName": "s3UrlForObject", "docs": Object { - "example": "s3://bucket/key", - "remarks": "For example:", - "summary": "The S3 URL of an S3 object.", + "remarks": "- \`s3://onlybucket\` +- \`s3://bucket/key\`", + "summary": "The S3 URL of an S3 object. For example:.", }, "fqn": "construct-library.GreeterBucket.s3UrlForObject", "id": "construct-library.GreeterBucket.s3UrlForObject", @@ -824,13 +837,66 @@ bucket is returned.", ], "usage": "s3UrlForObject(key?: str): str", }, + Object { + "displayName": "transferAccelerationUrlForObject", + "docs": Object { + "remarks": "Specify \`dualStack: true\` at the options +for dual-stack endpoint (connect to the bucket over IPv6). For example: + +- \`https://bucket.s3-accelerate.amazonaws.com\` +- \`https://bucket.s3-accelerate.amazonaws.com/key\`", + "summary": "The https Transfer Acceleration URL of an S3 object.", + }, + "fqn": "construct-library.GreeterBucket.transferAccelerationUrlForObject", + "id": "construct-library.GreeterBucket.transferAccelerationUrlForObject", + "parameters": Array [ + Object { + "default": undefined, + "displayName": "key", + "docs": Object { + "remarks": "If not specified, the URL of the +bucket is returned.", + "summary": "The S3 key of the object.", + }, + "fqn": "construct-library.GreeterBucket.transferAccelerationUrlForObject.parameter.key", + "id": "construct-library.GreeterBucket.transferAccelerationUrlForObject.parameter.key", + "optional": true, + "type": Object { + "formattingPattern": "str", + }, + }, + Object { + "default": undefined, + "displayName": "options", + "docs": Object { + "summary": "Options for generating URL.", + }, + "fqn": "construct-library.GreeterBucket.transferAccelerationUrlForObject.parameter.options", + "id": "construct-library.GreeterBucket.transferAccelerationUrlForObject.parameter.options", + "optional": true, + "type": Object { + "formattingPattern": "%", + "types": Array [ + Object { + "displayName": "TransferAccelerationUrlOptions", + "fqn": "@aws-cdk/aws-s3.TransferAccelerationUrlOptions", + "id": "@aws-cdk/aws-s3.TransferAccelerationUrlOptions", + "packageName": "@aws-cdk/aws-s3", + "packageVersion": "99.99.99", + }, + ], + }, + }, + ], + "usage": "transferAccelerationUrlForObject(key?: str, options?: TransferAccelerationUrlOptions): str", + }, Object { "displayName": "urlForObject", "docs": Object { - "example": "https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey", - "remarks": "Specify \`regional: false\` at the options -for non-regional URLs. For example:", - "summary": "The https URL of an S3 object.", + "remarks": "- \`https://s3.us-west-1.amazonaws.com/onlybucket\` +- \`https://s3.us-west-1.amazonaws.com/bucket/key\` +- \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\`", + "summary": "The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:.", }, "fqn": "construct-library.GreeterBucket.urlForObject", "id": "construct-library.GreeterBucket.urlForObject", @@ -856,10 +922,11 @@ bucket is returned.", Object { "displayName": "virtualHostedUrlForObject", "docs": Object { - "example": "https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey", - "remarks": "Specify \`regional: false\` at -the options for non-regional URL. For example:", - "summary": "The virtual hosted-style URL of an S3 object.", + "remarks": "- \`https://only-bucket.s3.us-west-1.amazonaws.com\` +- \`https://bucket.s3.us-west-1.amazonaws.com/key\` +- \`https://bucket.s3.amazonaws.com/key\` +- \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\`", + "summary": "The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:.", }, "fqn": "construct-library.GreeterBucket.virtualHostedUrlForObject", "id": "construct-library.GreeterBucket.virtualHostedUrlForObject", @@ -1398,6 +1465,32 @@ GreeterBucket.fromBucketAttributes(attrs: BucketAttributes);", GreeterBucket.fromBucketName(bucketName: str);", }, + Object { + "displayName": "validateBucketName", + "docs": Object { + "summary": "Thrown an exception if the given bucket name is not valid.", + }, + "fqn": "construct-library.GreeterBucket.validateBucketName", + "id": "construct-library.GreeterBucket.validateBucketName", + "parameters": Array [ + Object { + "default": undefined, + "displayName": "physicalName", + "docs": Object { + "summary": "name of the bucket.", + }, + "fqn": "construct-library.GreeterBucket.validateBucketName.parameter.physicalName", + "id": "construct-library.GreeterBucket.validateBucketName.parameter.physicalName", + "optional": undefined, + "type": Object { + "formattingPattern": "str", + }, + }, + ], + "usage": "bring { GreeterBucket } from \\"construct-library\\"; + +GreeterBucket.validateBucketName(physicalName: str);", + }, ], }, ], @@ -1458,7 +1551,7 @@ new GreeterBucket(props?: BucketProps); | addEventNotification | Adds a bucket notification event destination. | | addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | | addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | | arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | | grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | | grantPublicAccess | Allows unrestricted access to objects from this bucket. | @@ -1470,9 +1563,10 @@ new GreeterBucket(props?: BucketProps); | onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | | onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | | onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3UrlForObject | The S3 URL of an S3 object. | -| urlForObject | The https URL of an S3 object. | -| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. | +| s3UrlForObject | The S3 URL of an S3 object. For example:. | +| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | +| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | | addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | | addInventory | Add an inventory configuration. | | addLifecycleRule | Add a lifecycle rule to the bucket. | @@ -1494,7 +1588,7 @@ being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. -The resource can be deleted (\`RemovalPolicy.DELETE\`), or left in your AWS +The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). ###### \`policy\`Required @@ -1516,7 +1610,9 @@ Adds a bucket notification event destination. *Example* \`\`\`wing - bucket.addEventNotification(EventType.OnObjectCreated, myLambda, 'home/myusername/*') + declare const myLambda: lambda.Function; + const bucket = new s3.Bucket(this, 'MyBucket'); + bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(myLambda), {prefix: 'home/myusername/*'}); \`\`\` @@ -1557,7 +1653,7 @@ addObjectCreatedNotification(dest: IBucketNotificationDestination, filters: Noti Subscribes a destination to receive notifications when an object is created in the bucket. This is identical to calling -\`onEvent(EventType.ObjectCreated)\`. +\`onEvent(EventType.OBJECT_CREATED)\`. ###### \`dest\`Required @@ -1584,7 +1680,7 @@ addObjectRemovedNotification(dest: IBucketNotificationDestination, filters: Noti Subscribes a destination to receive notifications when an object is removed from the bucket. This is identical to calling -\`onEvent(EventType.ObjectRemoved)\`. +\`onEvent(EventType.OBJECT_REMOVED)\`. ###### \`dest\`Required @@ -1608,12 +1704,20 @@ Filters (see onEvent). addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult \`\`\` -Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. +Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. + +Note that the policy statement may or may not be added to the policy. +For example, when an \`IBucket\` is created from an existing bucket, +it's not possible to tell whether the bucket already has a policy +attached, let alone to re-use that policy to add more statements to it. +So it's safest to do nothing in these cases. ###### \`permission\`Required - *Type:* @aws-cdk/aws-iam.PolicyStatement +the policy statement to be added to the bucket's policy. + --- ##### \`arnForObjects\` @@ -1683,6 +1787,10 @@ to an IPv4 range like this: const grant = bucket.grantPublicAccess(); grant.resourceStatement!.addCondition(‘IpAddress’, { “aws:SourceIp”: “54.240.143.0/24” }); +Note that if this \`IBucket\` refers to an existing bucket, possibly not +managed by CloudFormation, this method will have no effect, since it's +impossible to modify the policy of an existing bucket. + ###### \`allowedActions\`Required - *Type:* str @@ -1915,45 +2023,66 @@ Options for adding the rule. s3UrlForObject(key?: str): str \`\`\` -The S3 URL of an S3 object. +The S3 URL of an S3 object. For example:. -For example: +\`s3://onlybucket\` +- \`s3://bucket/key\` -*Example* +###### \`key\`Optional + +- *Type:* str + +The S3 key of the object. + +If not specified, the S3 URL of the +bucket is returned. + +--- + +##### \`transferAccelerationUrlForObject\` \`\`\`wing -s3://bucket/key +transferAccelerationUrlForObject(key?: str, options?: TransferAccelerationUrlOptions): str \`\`\` +The https Transfer Acceleration URL of an S3 object. -###### \`key\`Optional +Specify \`dualStack: true\` at the options +for dual-stack endpoint (connect to the bucket over IPv6). For example: + +- \`https://bucket.s3-accelerate.amazonaws.com\` +- \`https://bucket.s3-accelerate.amazonaws.com/key\` + +###### \`key\`Optional - *Type:* str The S3 key of the object. -If not specified, the S3 URL of the +If not specified, the URL of the bucket is returned. --- -##### \`urlForObject\` +###### \`options\`Optional -\`\`\`wing -urlForObject(key?: str): str -\`\`\` +- *Type:* @aws-cdk/aws-s3.TransferAccelerationUrlOptions -The https URL of an S3 object. +Options for generating URL. -Specify \`regional: false\` at the options -for non-regional URLs. For example: +--- -*Example* +##### \`urlForObject\` \`\`\`wing -https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey +urlForObject(key?: str): str \`\`\` +The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. + +\`https://s3.us-west-1.amazonaws.com/onlybucket\` +- \`https://s3.us-west-1.amazonaws.com/bucket/key\` +- \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` ###### \`key\`Optional @@ -1972,17 +2101,12 @@ bucket is returned. virtualHostedUrlForObject(key?: str, options?: VirtualHostedStyleUrlOptions): str \`\`\` -The virtual hosted-style URL of an S3 object. - -Specify \`regional: false\` at -the options for non-regional URL. For example: - -*Example* - -\`\`\`wing -https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey -\`\`\` +The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. +\`https://only-bucket.s3.us-west-1.amazonaws.com\` +- \`https://bucket.s3.us-west-1.amazonaws.com/key\` +- \`https://bucket.s3.amazonaws.com/key\` +- \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` ###### \`key\`Optional @@ -2081,6 +2205,7 @@ greet(): void | fromBucketArn | *No description.* | | fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | | fromBucketName | *No description.* | +| validateBucketName | Thrown an exception if the given bucket name is not valid. | --- @@ -2149,6 +2274,24 @@ GreeterBucket.fromBucketName(bucketName: str); --- +##### \`validateBucketName\` + +\`\`\`wing +bring { GreeterBucket } from \\"construct-library\\"; + +GreeterBucket.validateBucketName(physicalName: str); +\`\`\` + +Thrown an exception if the given bucket name is not valid. + +###### \`physicalName\`Required + +- *Type:* str + +name of the bucket. + +--- + #### Properties | **Name** | **Type** | **Description** | diff --git a/apps/jsii-docgen/test/docgen/view/__snapshots__/markdown.test.ts.snap b/apps/jsii-docgen/test/docgen/view/__snapshots__/markdown.test.ts.snap index 9790618904f..75f47151b7c 100644 --- a/apps/jsii-docgen/test/docgen/view/__snapshots__/markdown.test.ts.snap +++ b/apps/jsii-docgen/test/docgen/view/__snapshots__/markdown.test.ts.snap @@ -39,7 +39,7 @@ new GreeterBucket(props?: BucketProps); | addEventNotification | Adds a bucket notification event destination. | | addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | | addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | | arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | | grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | | grantPublicAccess | Allows unrestricted access to objects from this bucket. | @@ -51,9 +51,10 @@ new GreeterBucket(props?: BucketProps); | onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | | onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | | onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3UrlForObject | The S3 URL of an S3 object. | -| urlForObject | The https URL of an S3 object. | -| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. | +| s3UrlForObject | The S3 URL of an S3 object. For example:. | +| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | +| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | | addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | | addInventory | Add an inventory configuration. | | addLifecycleRule | Add a lifecycle rule to the bucket. | @@ -75,7 +76,7 @@ being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. -The resource can be deleted (\`RemovalPolicy.DELETE\`), or left in your AWS +The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). ###### \`policy\`Required @@ -97,7 +98,9 @@ Adds a bucket notification event destination. *Example* \`\`\`wing - bucket.addEventNotification(EventType.OnObjectCreated, myLambda, 'home/myusername/*') + declare const myLambda: lambda.Function; + const bucket = new s3.Bucket(this, 'MyBucket'); + bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(myLambda), {prefix: 'home/myusername/*'}); \`\`\` @@ -138,7 +141,7 @@ addObjectCreatedNotification(dest: IBucketNotificationDestination, filters: Noti Subscribes a destination to receive notifications when an object is created in the bucket. This is identical to calling -\`onEvent(EventType.ObjectCreated)\`. +\`onEvent(EventType.OBJECT_CREATED)\`. ###### \`dest\`Required @@ -165,7 +168,7 @@ addObjectRemovedNotification(dest: IBucketNotificationDestination, filters: Noti Subscribes a destination to receive notifications when an object is removed from the bucket. This is identical to calling -\`onEvent(EventType.ObjectRemoved)\`. +\`onEvent(EventType.OBJECT_REMOVED)\`. ###### \`dest\`Required @@ -189,12 +192,20 @@ Filters (see onEvent). addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult \`\`\` -Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. +Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. + +Note that the policy statement may or may not be added to the policy. +For example, when an \`IBucket\` is created from an existing bucket, +it's not possible to tell whether the bucket already has a policy +attached, let alone to re-use that policy to add more statements to it. +So it's safest to do nothing in these cases. ###### \`permission\`Required - *Type:* PolicyStatement +the policy statement to be added to the bucket's policy. + --- ##### \`arnForObjects\` @@ -264,6 +275,10 @@ to an IPv4 range like this: const grant = bucket.grantPublicAccess(); grant.resourceStatement!.addCondition(‘IpAddress’, { “aws:SourceIp”: “54.240.143.0/24” }); +Note that if this \`IBucket\` refers to an existing bucket, possibly not +managed by CloudFormation, this method will have no effect, since it's +impossible to modify the policy of an existing bucket. + ###### \`allowedActions\`Required - *Type:* str @@ -496,45 +511,66 @@ Options for adding the rule. s3UrlForObject(key?: str): str \`\`\` -The S3 URL of an S3 object. +The S3 URL of an S3 object. For example:. -For example: +\`s3://onlybucket\` +- \`s3://bucket/key\` -*Example* +###### \`key\`Optional + +- *Type:* str + +The S3 key of the object. + +If not specified, the S3 URL of the +bucket is returned. + +--- + +##### \`transferAccelerationUrlForObject\` \`\`\`wing -s3://bucket/key +transferAccelerationUrlForObject(key?: str, options?: TransferAccelerationUrlOptions): str \`\`\` +The https Transfer Acceleration URL of an S3 object. -###### \`key\`Optional +Specify \`dualStack: true\` at the options +for dual-stack endpoint (connect to the bucket over IPv6). For example: + +- \`https://bucket.s3-accelerate.amazonaws.com\` +- \`https://bucket.s3-accelerate.amazonaws.com/key\` + +###### \`key\`Optional - *Type:* str The S3 key of the object. -If not specified, the S3 URL of the +If not specified, the URL of the bucket is returned. --- -##### \`urlForObject\` +###### \`options\`Optional -\`\`\`wing -urlForObject(key?: str): str -\`\`\` +- *Type:* TransferAccelerationUrlOptions -The https URL of an S3 object. +Options for generating URL. -Specify \`regional: false\` at the options -for non-regional URLs. For example: +--- -*Example* +##### \`urlForObject\` \`\`\`wing -https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey +urlForObject(key?: str): str \`\`\` +The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. + +\`https://s3.us-west-1.amazonaws.com/onlybucket\` +- \`https://s3.us-west-1.amazonaws.com/bucket/key\` +- \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` ###### \`key\`Optional @@ -553,17 +589,12 @@ bucket is returned. virtualHostedUrlForObject(key?: str, options?: VirtualHostedStyleUrlOptions): str \`\`\` -The virtual hosted-style URL of an S3 object. - -Specify \`regional: false\` at -the options for non-regional URL. For example: - -*Example* - -\`\`\`wing -https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey -\`\`\` +The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. +\`https://only-bucket.s3.us-west-1.amazonaws.com\` +- \`https://bucket.s3.us-west-1.amazonaws.com/key\` +- \`https://bucket.s3.amazonaws.com/key\` +- \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` ###### \`key\`Optional @@ -662,6 +693,7 @@ greet(): void | fromBucketArn | *No description.* | | fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | | fromBucketName | *No description.* | +| validateBucketName | Thrown an exception if the given bucket name is not valid. | --- @@ -730,6 +762,24 @@ GreeterBucket.fromBucketName(bucketName: str); --- +##### \`validateBucketName\` + +\`\`\`wing +bring { GreeterBucket } from \\"construct-library\\"; + +GreeterBucket.validateBucketName(physicalName: str); +\`\`\` + +Thrown an exception if the given bucket name is not valid. + +###### \`physicalName\`Required + +- *Type:* str + +name of the bucket. + +--- + #### Properties | **Name** | **Type** | **Description** | @@ -962,7 +1012,7 @@ new GreeterBucket(props?: BucketProps); | addEventNotification | Adds a bucket notification event destination. | | addObjectCreatedNotification | Subscribes a destination to receive notifications when an object is created in the bucket. | | addObjectRemovedNotification | Subscribes a destination to receive notifications when an object is removed from the bucket. | -| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | +| addToResourcePolicy | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. | | arnForObjects | Returns an ARN that represents all objects within the bucket that match the key pattern specified. | | grantDelete | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. | | grantPublicAccess | Allows unrestricted access to objects from this bucket. | @@ -974,9 +1024,10 @@ new GreeterBucket(props?: BucketProps); | onCloudTrailEvent | Define a CloudWatch event that triggers when something happens to this repository. | | onCloudTrailPutObject | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. | | onCloudTrailWriteObject | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. | -| s3UrlForObject | The S3 URL of an S3 object. | -| urlForObject | The https URL of an S3 object. | -| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. | +| s3UrlForObject | The S3 URL of an S3 object. For example:. | +| transferAccelerationUrlForObject | The https Transfer Acceleration URL of an S3 object. | +| urlForObject | The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. | +| virtualHostedUrlForObject | The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. | | addCorsRule | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. | | addInventory | Add an inventory configuration. | | addLifecycleRule | Add a lifecycle rule to the bucket. | @@ -998,7 +1049,7 @@ being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. -The resource can be deleted (\`RemovalPolicy.DELETE\`), or left in your AWS +The resource can be deleted (\`RemovalPolicy.DESTROY\`), or left in your AWS account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). ###### \`policy\`Required @@ -1020,7 +1071,9 @@ Adds a bucket notification event destination. *Example* \`\`\`wing - bucket.addEventNotification(EventType.OnObjectCreated, myLambda, 'home/myusername/*') + declare const myLambda: lambda.Function; + const bucket = new s3.Bucket(this, 'MyBucket'); + bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(myLambda), {prefix: 'home/myusername/*'}); \`\`\` @@ -1061,7 +1114,7 @@ addObjectCreatedNotification(dest: IBucketNotificationDestination, filters: Noti Subscribes a destination to receive notifications when an object is created in the bucket. This is identical to calling -\`onEvent(EventType.ObjectCreated)\`. +\`onEvent(EventType.OBJECT_CREATED)\`. ###### \`dest\`Required @@ -1088,7 +1141,7 @@ addObjectRemovedNotification(dest: IBucketNotificationDestination, filters: Noti Subscribes a destination to receive notifications when an object is removed from the bucket. This is identical to calling -\`onEvent(EventType.ObjectRemoved)\`. +\`onEvent(EventType.OBJECT_REMOVED)\`. ###### \`dest\`Required @@ -1112,12 +1165,20 @@ Filters (see onEvent). addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult \`\`\` -Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or it's contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. +Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use \`bucketArn\` and \`arnForObjects(keys)\` to obtain ARNs for this bucket or objects. + +Note that the policy statement may or may not be added to the policy. +For example, when an \`IBucket\` is created from an existing bucket, +it's not possible to tell whether the bucket already has a policy +attached, let alone to re-use that policy to add more statements to it. +So it's safest to do nothing in these cases. ###### \`permission\`Required - *Type:* PolicyStatement +the policy statement to be added to the bucket's policy. + --- ##### \`arnForObjects\` @@ -1187,6 +1248,10 @@ to an IPv4 range like this: const grant = bucket.grantPublicAccess(); grant.resourceStatement!.addCondition(‘IpAddress’, { “aws:SourceIp”: “54.240.143.0/24” }); +Note that if this \`IBucket\` refers to an existing bucket, possibly not +managed by CloudFormation, this method will have no effect, since it's +impossible to modify the policy of an existing bucket. + ###### \`allowedActions\`Required - *Type:* str @@ -1419,45 +1484,66 @@ Options for adding the rule. s3UrlForObject(key?: str): str \`\`\` -The S3 URL of an S3 object. +The S3 URL of an S3 object. For example:. -For example: +\`s3://onlybucket\` +- \`s3://bucket/key\` -*Example* +###### \`key\`Optional + +- *Type:* str + +The S3 key of the object. + +If not specified, the S3 URL of the +bucket is returned. + +--- + +##### \`transferAccelerationUrlForObject\` \`\`\`wing -s3://bucket/key +transferAccelerationUrlForObject(key?: str, options?: TransferAccelerationUrlOptions): str \`\`\` +The https Transfer Acceleration URL of an S3 object. -###### \`key\`Optional +Specify \`dualStack: true\` at the options +for dual-stack endpoint (connect to the bucket over IPv6). For example: + +- \`https://bucket.s3-accelerate.amazonaws.com\` +- \`https://bucket.s3-accelerate.amazonaws.com/key\` + +###### \`key\`Optional - *Type:* str The S3 key of the object. -If not specified, the S3 URL of the +If not specified, the URL of the bucket is returned. --- -##### \`urlForObject\` +###### \`options\`Optional -\`\`\`wing -urlForObject(key?: str): str -\`\`\` +- *Type:* TransferAccelerationUrlOptions -The https URL of an S3 object. +Options for generating URL. -Specify \`regional: false\` at the options -for non-regional URLs. For example: +--- -*Example* +##### \`urlForObject\` \`\`\`wing -https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey +urlForObject(key?: str): str \`\`\` +The https URL of an S3 object. Specify \`regional: false\` at the options for non-regional URLs. For example:. + +\`https://s3.us-west-1.amazonaws.com/onlybucket\` +- \`https://s3.us-west-1.amazonaws.com/bucket/key\` +- \`https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey\` ###### \`key\`Optional @@ -1476,17 +1562,12 @@ bucket is returned. virtualHostedUrlForObject(key?: str, options?: VirtualHostedStyleUrlOptions): str \`\`\` -The virtual hosted-style URL of an S3 object. - -Specify \`regional: false\` at -the options for non-regional URL. For example: - -*Example* - -\`\`\`wing -https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey -\`\`\` +The virtual hosted-style URL of an S3 object. Specify \`regional: false\` at the options for non-regional URL. For example:. +\`https://only-bucket.s3.us-west-1.amazonaws.com\` +- \`https://bucket.s3.us-west-1.amazonaws.com/key\` +- \`https://bucket.s3.amazonaws.com/key\` +- \`https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey\` ###### \`key\`Optional @@ -1585,6 +1666,7 @@ greet(): void | fromBucketArn | *No description.* | | fromBucketAttributes | Creates a Bucket construct that represents an external bucket. | | fromBucketName | *No description.* | +| validateBucketName | Thrown an exception if the given bucket name is not valid. | --- @@ -1653,6 +1735,24 @@ GreeterBucket.fromBucketName(bucketName: str); --- +##### \`validateBucketName\` + +\`\`\`wing +bring { GreeterBucket } from \\"construct-library\\"; + +GreeterBucket.validateBucketName(physicalName: str); +\`\`\` + +Thrown an exception if the given bucket name is not valid. + +###### \`physicalName\`Required + +- *Type:* str + +name of the bucket. + +--- + #### Properties | **Name** | **Type** | **Description** | diff --git a/apps/vscode-wing/.projen/tasks.json b/apps/vscode-wing/.projen/tasks.json index acba9e455ff..38fc8882d7a 100644 --- a/apps/vscode-wing/.projen/tasks.json +++ b/apps/vscode-wing/.projen/tasks.json @@ -168,7 +168,7 @@ "exec": "npm-check-updates --dep dev --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,node-fetch,winglang'" }, { - "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,node-fetch,winglang'" + "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,node-fetch,winglang'" }, { "exec": "npm-check-updates --dep peer --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,node-fetch,winglang'" @@ -177,13 +177,13 @@ "exec": "npm-check-updates --dep prod --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,node-fetch,winglang'" }, { - "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,node-fetch,winglang'" + "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,node-fetch,winglang'" }, { "exec": "pnpm i --no-frozen-lockfile" }, { - "exec": "pnpm update" + "exec": "pnpm update @trpc/client @types/node-fetch @types/node @types/vscode @types/which @types/ws @typescript-eslint/eslint-plugin @typescript-eslint/parser @vscode/vsce @wingconsole/app @wingconsole/server eslint-config-prettier eslint-import-resolver-node eslint-import-resolver-typescript eslint-plugin-import eslint-plugin-prettier eslint node-fetch npm-check-updates open prettier projen ts-node tsup typescript vscode-languageclient which winglang ws" }, { "exec": "pnpm exec projen" @@ -204,7 +204,7 @@ } }, "env": { - "PATH": "$(pnpm -c exec \"node -e \\\"console.log(process.env.PATH)\\\"\")" + "PATH": "$(pnpm -c exec \"node --print process.env.PATH\")" }, "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." } diff --git a/apps/vscode-wing/package.json b/apps/vscode-wing/package.json index da01e355863..7fa9c5f635d 100644 --- a/apps/vscode-wing/package.json +++ b/apps/vscode-wing/package.json @@ -29,7 +29,7 @@ "organization": true }, "devDependencies": { - "@trpc/client": "^10.30.0", + "@trpc/client": "^10.38.1", "@types/node": "^16", "@types/node-fetch": "^2.6.4", "@types/vscode": "^1.70.0", @@ -37,24 +37,24 @@ "@types/ws": "^8.5.5", "@typescript-eslint/eslint-plugin": "^5", "@typescript-eslint/parser": "^5", - "@vscode/vsce": "^2.16.0", + "@vscode/vsce": "^2.21.0", "@wingconsole/app": "workspace:^", "@wingconsole/server": "workspace:^", "eslint": "^8", - "eslint-config-prettier": "^8.6.0", - "eslint-import-resolver-node": "^0.3.7", - "eslint-import-resolver-typescript": "^3.5.3", - "eslint-plugin-import": "^2.27.5", + "eslint-config-prettier": "^8.10.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-import-resolver-typescript": "^3.6.0", + "eslint-plugin-import": "^2.28.1", "eslint-plugin-prettier": "^4.2.1", "node-fetch": "2", "npm-check-updates": "^16", - "open": "^8.4.0", - "prettier": "^2.8.3", - "projen": "^0.71.60", + "open": "^8.4.2", + "prettier": "^2.8.8", + "projen": "^0.71.163", "ts-node": "^10.9.1", "tsup": "^6.7.0", - "typescript": "^4.9.4", - "vscode-languageclient": "^8.0.2", + "typescript": "^4.9.5", + "vscode-languageclient": "^8.1.0", "which": "^1.3.1", "winglang": "workspace:^", "ws": "^8.13.0" diff --git a/apps/wing-api-checker/.projen/tasks.json b/apps/wing-api-checker/.projen/tasks.json index f129c8a33c0..05641fb5850 100644 --- a/apps/wing-api-checker/.projen/tasks.json +++ b/apps/wing-api-checker/.projen/tasks.json @@ -222,7 +222,7 @@ "exec": "npm-check-updates --dep dev --upgrade --target=minor" }, { - "exec": "npm-check-updates --dep optional --upgrade --target=minor" + "exec": "npm-check-updates --dep bundle --upgrade --target=minor" }, { "exec": "npm-check-updates --dep peer --upgrade --target=minor" @@ -231,13 +231,13 @@ "exec": "npm-check-updates --dep prod --upgrade --target=minor" }, { - "exec": "npm-check-updates --dep bundle --upgrade --target=minor" + "exec": "npm-check-updates --dep optional --upgrade --target=minor" }, { "exec": "pnpm i --no-frozen-lockfile" }, { - "exec": "pnpm update" + "exec": "pnpm update @types/jest @types/node @types/yargs @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier eslint-import-resolver-node eslint-import-resolver-typescript eslint-plugin-import eslint-plugin-prettier eslint jest jest-junit npm-check-updates prettier projen standard-version ts-jest ts-node typescript chalk chokidar glob-promise jsii-reflect yargs" }, { "exec": "pnpm exec projen" @@ -258,7 +258,7 @@ } }, "env": { - "PATH": "$(pnpm -c exec \"node -e \\\"console.log(process.env.PATH)\\\"\")" + "PATH": "$(pnpm -c exec \"node --print process.env.PATH\")" }, "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." } diff --git a/apps/wing-api-checker/package.json b/apps/wing-api-checker/package.json index 3920459a1b4..86287db9682 100644 --- a/apps/wing-api-checker/package.json +++ b/apps/wing-api-checker/package.json @@ -34,33 +34,33 @@ "organization": true }, "devDependencies": { - "@types/jest": "^29.2.6", + "@types/jest": "^29.5.4", "@types/node": "^16", "@types/yargs": "^16.0.5", "@typescript-eslint/eslint-plugin": "^5", "@typescript-eslint/parser": "^5", "eslint": "^8", - "eslint-config-prettier": "^8.6.0", - "eslint-import-resolver-node": "^0.3.7", - "eslint-import-resolver-typescript": "^3.5.3", - "eslint-plugin-import": "^2.27.5", + "eslint-config-prettier": "^8.10.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-import-resolver-typescript": "^3.6.0", + "eslint-plugin-import": "^2.28.1", "eslint-plugin-prettier": "^4.2.1", - "jest": "^29.3.1", + "jest": "^29.6.4", "jest-junit": "^15", "npm-check-updates": "^16", - "prettier": "^2.8.3", - "projen": "^0.71.60", + "prettier": "^2.8.8", + "projen": "^0.71.163", "standard-version": "^9", - "ts-jest": "^29.0.5", + "ts-jest": "^29.1.1", "ts-node": "^10.9.1", - "typescript": "^4.9.4" + "typescript": "^4.9.5" }, "dependencies": { "chalk": "^4.1.2", "chokidar": "^3.5.3", - "glob-promise": "^6.0.2", - "jsii-reflect": "^1.73.0", - "yargs": "^17.6.2" + "glob-promise": "^6.0.3", + "jsii-reflect": "^1.88.0", + "yargs": "^17.7.2" }, "main": "lib/index.js", "license": "MIT", diff --git a/apps/wing-console/console/app/package.json b/apps/wing-console/console/app/package.json index 76a915adad8..b809d31e5a8 100644 --- a/apps/wing-console/console/app/package.json +++ b/apps/wing-console/console/app/package.json @@ -18,35 +18,35 @@ "package": "bump-pack -b" }, "dependencies": { - "@segment/analytics-node": "^1.0.0", + "@segment/analytics-node": "^1.1.0", "@wingconsole/server": "workspace:^", "express": "^4.18.2" }, "devDependencies": { "@ibm/plex": "^6.3.0", - "@playwright/test": "^1.35.1", + "@playwright/test": "^1.37.1", "@tailwindcss/forms": "^0.5.3", "@types/express": "^4.17.17", - "@types/react": "^18.2.12", - "@types/react-dom": "^18.2.5", - "@vitejs/plugin-react": "^4.0.0", + "@types/react": "^18.2.21", + "@types/react-dom": "^18.2.7", + "@vitejs/plugin-react": "^4.0.4", "@vitest/coverage-c8": "^0.31.4", "@wingconsole/eslint-plugin": "workspace:^", "@wingconsole/tsconfig": "workspace:^", "@wingconsole/ui": "workspace:^", - "autoprefixer": "^10.4.14", + "autoprefixer": "^10.4.15", "bump-pack": "workspace:^", - "conf": "^11.0.1", - "eslint": "^8.42.0", + "conf": "^11.0.2", + "eslint": "^8.48.0", "nanoid": "^4.0.2", "open": "^9.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "tailwindcss": "^3.3.2", + "tailwindcss": "^3.3.3", "tsup": "^6.7.0", - "tsx": "^3.12.7", - "typescript": "^5.1.3", - "vite": "^4.3.9" + "tsx": "^3.12.8", + "typescript": "^5.2.2", + "vite": "^4.4.9" }, "volta": { "extends": "../../../../package.json" diff --git a/apps/wing-console/console/design-system/package.json b/apps/wing-console/console/design-system/package.json index ec021d6b0b2..10681df0432 100644 --- a/apps/wing-console/console/design-system/package.json +++ b/apps/wing-console/console/design-system/package.json @@ -28,7 +28,7 @@ "package": "bump-pack -b" }, "dependencies": { - "@headlessui/react": "^1.7.15", + "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.0.18", "@popperjs/core": "^2.11.8", "@tailwindcss/forms": "^0.5.3", @@ -38,27 +38,27 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-popper": "^2.3.0", - "tailwindcss": "^3.3.2" + "tailwindcss": "^3.3.3" }, "devDependencies": { - "@babel/core": "^7.22.5", - "@storybook/react": "^7.0.20", + "@babel/core": "^7.22.11", + "@storybook/react": "^7.4.0", "@testing-library/react": "^14.0.0", "@types/lodash.uniq": "^4.5.7", - "@types/react": "^18.2.12", - "@types/react-dom": "^18.2.5", - "@vitejs/plugin-react": "^4.0.0", + "@types/react": "^18.2.21", + "@types/react-dom": "^18.2.7", + "@vitejs/plugin-react": "^4.0.4", "@vitest/coverage-c8": "^0.31.4", "@wingconsole/eslint-plugin": "workspace:^", "@wingconsole/tsconfig": "workspace:^", "bump-pack": "workspace:^", - "eslint": "^8.42.0", + "eslint": "^8.48.0", "happy-dom": "^9.20.3", - "tsup": "^7.1.0", - "typescript": "^5.1.3", - "vite": "^4.3.9", + "tsup": "^7.2.0", + "typescript": "^5.2.2", + "vite": "^4.4.9", "vitest": "^0.31.4", - "webpack": "^5.86.0" + "webpack": "^5.88.2" }, "volta": { "extends": "../../../../package.json" diff --git a/apps/wing-console/console/server/package.json b/apps/wing-console/console/server/package.json index e238a04a682..cba5ca091ef 100644 --- a/apps/wing-console/console/server/package.json +++ b/apps/wing-console/console/server/package.json @@ -25,7 +25,7 @@ "ms": "^2.1.3" }, "devDependencies": { - "@trpc/server": "^10.30.0", + "@trpc/server": "^10.38.1", "@types/cors": "^2.8.13", "@types/express": "^4.17.17", "@types/lodash.uniqby": "^4.7.7", @@ -36,23 +36,23 @@ "@wingconsole/tsconfig": "workspace:^", "bump-pack": "workspace:^", "chokidar": "^3.5.3", - "conf": "^11.0.1", - "constructs": "^10.2.51", + "conf": "^11.0.2", + "constructs": "^10.2.70", "cors": "^2.8.5", "emittery": "^1.0.1", "esbuild-plugin-raw": "^0.1.7", - "eslint": "^8.42.0", + "eslint": "^8.48.0", "express": "^4.18.2", "get-port": "^6.1.2", "lodash.uniqby": "^4.7.0", "nanoid": "^4.0.2", - "node-fetch": "^3.3.1", - "redis": "^4.6.7", + "node-fetch": "^3.3.2", + "redis": "^4.6.8", "tsup": "^6.7.0", - "typescript": "^5.1.3", + "typescript": "^5.2.2", "vitest": "^0.31.4", "ws": "^8.13.0", - "zod": "^3.21.4" + "zod": "^3.22.2" }, "volta": { "extends": "../../../../package.json" diff --git a/apps/wing-console/console/ui/package.json b/apps/wing-console/console/ui/package.json index f52f381660e..87ffd664728 100644 --- a/apps/wing-console/console/ui/package.json +++ b/apps/wing-console/console/ui/package.json @@ -29,19 +29,19 @@ "package": "bump-pack -b" }, "dependencies": { - "@headlessui/react": "^1.7.15", + "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.0.18", "@popperjs/core": "^2.11.8", - "@tanstack/react-query": "^4.29.12", - "@trpc/client": "^10.30.0", - "@trpc/react-query": "^10.30.0", - "@trpc/server": "^10.30.0", + "@tanstack/react-query": "^4.33.0", + "@trpc/client": "^10.38.1", + "@trpc/react-query": "^10.38.1", + "@trpc/server": "^10.38.1", "@wingconsole/design-system": "workspace:^", "classnames": "^2.3.2", "d3-selection": "^3.0.0", "d3-zoom": "^3.0.0", "elkjs": "^0.8.2", - "framer-motion": "^10.12.16", + "framer-motion": "^10.16.2", "jszip": "^3.10.1", "lodash.debounce": "^4.0.8", "lodash.throttle": "^4.1.1", @@ -49,42 +49,42 @@ "nanoid": "^4.0.2", "react": "^18.2.0", "react-dom": "^18.2.0", - "zod": "^3.21.4" + "zod": "^3.22.2" }, "devDependencies": { - "@babel/core": "^7.22.5", - "@storybook/addon-essentials": "^7.0.20", - "@storybook/addon-interactions": "^7.0.20", - "@storybook/addon-links": "^7.0.20", - "@storybook/blocks": "^7.0.20", - "@storybook/react": "^7.0.20", - "@storybook/react-vite": "^7.0.20", + "@babel/core": "^7.22.11", + "@storybook/addon-essentials": "^7.4.0", + "@storybook/addon-interactions": "^7.4.0", + "@storybook/addon-links": "^7.4.0", + "@storybook/blocks": "^7.4.0", + "@storybook/react": "^7.4.0", + "@storybook/react-vite": "^7.4.0", "@storybook/testing-library": "^0.1.0", "@types/cors": "^2.8.13", - "@types/d3-selection": "^3.0.5", - "@types/d3-zoom": "^3.0.3", + "@types/d3-selection": "^3.0.6", + "@types/d3-zoom": "^3.0.4", "@types/lodash.debounce": "^4.0.7", "@types/lodash.throttle": "^4.1.7", "@types/lodash.uniqby": "^4.7.7", - "@types/react": "^18.2.12", - "@types/react-dom": "^18.2.5", + "@types/react": "^18.2.21", + "@types/react-dom": "^18.2.7", "@vitejs/plugin-react-swc": "^3.3.2", "@wingconsole/design-system": "workspace:^", "@wingconsole/eslint-plugin": "workspace:^", + "@wingconsole/server": "workspace:^", "@wingconsole/tsconfig": "workspace:^", "@wingconsole/use-loading": "workspace:^", - "@wingconsole/server": "workspace:^", - "autoprefixer": "^10.4.14", + "autoprefixer": "^10.4.15", "bump-pack": "workspace:^", - "eslint": "^8.42.0", + "eslint": "^8.48.0", "react-markdown": "^8.0.7", - "storybook": "^7.0.20", - "tailwindcss": "^3.3.2", + "storybook": "^7.4.0", + "tailwindcss": "^3.3.3", "tsup": "^6.7.0", - "typescript": "^5.1.3", - "vite": "^4.3.9", + "typescript": "^5.2.2", + "vite": "^4.4.9", "vitest": "^0.31.4", - "webpack": "^5.86.0" + "webpack": "^5.88.2" }, "volta": { "extends": "../../../../package.json" diff --git a/apps/wing-console/packages/error-message/package.json b/apps/wing-console/packages/error-message/package.json index db51f292d0c..21afa19781c 100644 --- a/apps/wing-console/packages/error-message/package.json +++ b/apps/wing-console/packages/error-message/package.json @@ -16,7 +16,7 @@ "devDependencies": { "@wingconsole/eslint-plugin": "workspace:^", "@wingconsole/tsconfig": "workspace:^", - "typescript": "^5.1.3" + "typescript": "^5.2.2" }, "volta": { "extends": "../../../../package.json" diff --git a/apps/wing-console/packages/use-loading/package.json b/apps/wing-console/packages/use-loading/package.json index 8511827690e..4d3af354bce 100644 --- a/apps/wing-console/packages/use-loading/package.json +++ b/apps/wing-console/packages/use-loading/package.json @@ -14,10 +14,10 @@ "eslint": "eslint --ext .js,.cjs,.ts,.cts,.mts,.tsx --no-error-on-unmatched-pattern . --fix" }, "devDependencies": { - "@types/react": "^18.2.12", + "@types/react": "^18.2.21", "@wingconsole/eslint-plugin": "workspace:^", "@wingconsole/tsconfig": "workspace:^", - "typescript": "^5.1.3" + "typescript": "^5.2.2" }, "volta": { "extends": "../../../../package.json" diff --git a/apps/wing-console/tools/eslint-plugin/package.json b/apps/wing-console/tools/eslint-plugin/package.json index b6523e21c3c..014e9026341 100644 --- a/apps/wing-console/tools/eslint-plugin/package.json +++ b/apps/wing-console/tools/eslint-plugin/package.json @@ -12,15 +12,15 @@ }, "dependencies": { "@cloudy-ts/eslint-plugin": "^0.0.260", - "@typescript-eslint/eslint-plugin": "^5.59.11", - "@typescript-eslint/parser": "^5.59.11", - "eslint-config-prettier": "^8.8.0", - "eslint-import-resolver-node": "^0.3.7", - "eslint-import-resolver-typescript": "^3.5.5", - "eslint-plugin-import": "^2.27.5", + "@typescript-eslint/eslint-plugin": "^5.62.0", + "@typescript-eslint/parser": "^5.62.0", + "eslint-config-prettier": "^8.10.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-import-resolver-typescript": "^3.6.0", + "eslint-plugin-import": "^2.28.1", "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-react": "^7.32.2", + "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-unicorn": "^47.0.0" }, @@ -30,9 +30,9 @@ "typescript": "^4.9.4" }, "devDependencies": { - "eslint": "^8.42.0", + "eslint": "^8.48.0", "prettier": "^2.8.8", - "typescript": "^5.1.3" + "typescript": "^5.2.2" }, "volta": { "extends": "../../../../package.json" diff --git a/apps/wing-console/tools/tsconfig/package.json b/apps/wing-console/tools/tsconfig/package.json index c41e6843691..fd4cba9e831 100644 --- a/apps/wing-console/tools/tsconfig/package.json +++ b/apps/wing-console/tools/tsconfig/package.json @@ -11,7 +11,7 @@ "typescript": "^4.9.4" }, "devDependencies": { - "typescript": "^5.1.3" + "typescript": "^5.2.2" }, "volta": { "extends": "../../../../package.json" diff --git a/apps/wing/package.json b/apps/wing/package.json index cca381206e4..30bebcbee8b 100644 --- a/apps/wing/package.json +++ b/apps/wing/package.json @@ -30,32 +30,32 @@ "package": "bump-pack -b" }, "dependencies": { - "@segment/analytics-node": "^1.0.0", + "@segment/analytics-node": "^1.1.0", "@wingconsole/app": "workspace:^", "@wingconsole/server": "workspace:^", "@winglang/compiler": "workspace:^", "@winglang/sdk": "workspace:^", "chalk": "^4.1.2", "codespan-wasm": "0.4.0", - "commander": "^10.0.0", + "commander": "^10.0.1", "compare-versions": "^5.0.3", "debug": "^4.3.4", - "open": "^8.4.0", + "nanoid": "^3.3.6", + "open": "^8.4.2", "ora": "^5.4.1", - "tiny-updater": "^3.4.0", + "tiny-updater": "^3.5.1", "uuid": "^8.3.2", - "nanoid": "^3.3.6", - "vscode-languageserver": "^8.0.2" + "vscode-languageserver": "^8.1.0" }, "devDependencies": { - "@types/debug": "^4.1.7", - "@types/node": "^18.11.18", - "@types/node-persist": "^3.1.3", + "@types/debug": "^4.1.8", + "@types/node": "^18.17.13", + "@types/node-persist": "^3.1.4", "@types/semver-utils": "^1.1.1", - "@types/uuid": "^8.3.2", + "@types/uuid": "^8.3.4", "bump-pack": "workspace:^", "esbuild": "^0.17.19", - "typescript": "^4.9.4", + "typescript": "^4.9.5", "vitest": "^0.30.1" }, "volta": { diff --git a/examples/tests/invalid/package.json b/examples/tests/invalid/package.json index 6693da93372..0cac08025cd 100644 --- a/examples/tests/invalid/package.json +++ b/examples/tests/invalid/package.json @@ -2,7 +2,7 @@ "name": "examples-invalid", "dependencies": { "cdktf": "0.17.0", - "constructs": "^10", + "constructs": "^10.2.70", "jsii-code-samples": "1.7.0" }, "volta": { diff --git a/examples/tests/valid/package.json b/examples/tests/valid/package.json index 20fb0bc1b4b..3b365f5b094 100644 --- a/examples/tests/valid/package.json +++ b/examples/tests/valid/package.json @@ -1,18 +1,18 @@ { "name": "examples-valid", "dependencies": { - "@aws-cdk/asset-awscli-v1": "^2.2.199", + "@aws-cdk/asset-awscli-v1": "^2.2.200", "@aws-cdk/asset-kubectl-v20": "^2.1.2", - "@aws-cdk/asset-node-proxy-agent-v5": "^2.0.165", - "@aws-sdk/client-dynamodb": "^3.344.0", + "@aws-cdk/asset-node-proxy-agent-v6": "^2.0.1", + "@aws-sdk/client-dynamodb": "^3.405.0", "@cdktf/provider-aws": "^15.0.0", - "aws-cdk-lib": "^2.64.0", - "cdk8s": "^2.60.0", - "cdk8s-plus-27": "^2.7.0", + "aws-cdk-lib": "^2.94.0", + "cdk8s": "^2.64.2", + "cdk8s-plus-27": "^2.7.1", "cdktf": "0.17.0", - "constructs": "^10", + "constructs": "^10.2.70", "jsii-code-samples": "1.7.0", - "projen": "^0.71.60", + "projen": "^0.71.163", "uuid": "^9.0.0" }, "volta": { diff --git a/libs/tree-sitter-wing/package.json b/libs/tree-sitter-wing/package.json index 6b86f8f24f7..3b991c96221 100644 --- a/libs/tree-sitter-wing/package.json +++ b/libs/tree-sitter-wing/package.json @@ -16,7 +16,7 @@ } ], "dependencies": { - "nan": "^2.12.1" + "nan": "^2.17.0" }, "scripts": { "test": "tree-sitter test", @@ -33,7 +33,7 @@ "extends": "../../package.json" }, "devDependencies": { - "nodemon": "^2.0.22", + "nodemon": "^3.0.1", "tree-sitter-cli": "0.20.6" } } diff --git a/libs/wingcompiler/package.json b/libs/wingcompiler/package.json index 49c9cd2cc4c..b1e1059251a 100644 --- a/libs/wingcompiler/package.json +++ b/libs/wingcompiler/package.json @@ -31,11 +31,11 @@ "wasi-js" ], "devDependencies": { - "@types/node": "^18.11.18", + "@types/node": "^18.17.13", "@winglang/wingc": "workspace:^", "bump-pack": "workspace:^", "tsup": "^6.7.0", - "typescript": "^4.9.4", + "typescript": "^4.9.5", "vitest": "^0.30.1", "wasi-js": "^1.7.3" }, diff --git a/libs/wingsdk/.projen/deps.json b/libs/wingsdk/.projen/deps.json index 5b87d21c565..1f13e6b01fe 100644 --- a/libs/wingsdk/.projen/deps.json +++ b/libs/wingsdk/.projen/deps.json @@ -111,6 +111,11 @@ "name": "jsii-pacmak", "type": "build" }, + { + "name": "jsii-rosetta", + "version": "5.0.11", + "type": "build" + }, { "name": "jsii", "version": "5.0.11", @@ -156,42 +161,42 @@ }, { "name": "@aws-sdk/client-cloudwatch-logs", - "version": "3.354.0", + "version": "3.405.0", "type": "bundled" }, { "name": "@aws-sdk/client-dynamodb", - "version": "3.354.0", + "version": "3.405.0", "type": "bundled" }, { "name": "@aws-sdk/client-elasticache", - "version": "3.354.0", + "version": "3.405.0", "type": "bundled" }, { "name": "@aws-sdk/client-lambda", - "version": "3.354.0", + "version": "3.405.0", "type": "bundled" }, { "name": "@aws-sdk/client-s3", - "version": "3.354.0", + "version": "3.405.0", "type": "bundled" }, { "name": "@aws-sdk/client-secrets-manager", - "version": "3.354.0", + "version": "3.405.0", "type": "bundled" }, { "name": "@aws-sdk/client-sns", - "version": "3.354.0", + "version": "3.405.0", "type": "bundled" }, { "name": "@aws-sdk/client-sqs", - "version": "3.354.0", + "version": "3.405.0", "type": "bundled" }, { @@ -201,7 +206,7 @@ }, { "name": "@aws-sdk/types", - "version": "3.347.0", + "version": "3.398.0", "type": "bundled" }, { @@ -211,7 +216,7 @@ }, { "name": "@aws-sdk/util-dynamodb", - "version": "3.354.0", + "version": "3.405.0", "type": "bundled" }, { diff --git a/libs/wingsdk/.projen/tasks.json b/libs/wingsdk/.projen/tasks.json index 483ed1e27b8..3b576059ebb 100644 --- a/libs/wingsdk/.projen/tasks.json +++ b/libs/wingsdk/.projen/tasks.json @@ -417,25 +417,25 @@ "exec": "pnpm update npm-check-updates" }, { - "exec": "npm-check-updates --dep dev --upgrade --target=minor --reject='cdktf-cli,constructs,jsii,@aws-sdk/client-cloudwatch-logs,@aws-sdk/client-dynamodb,@aws-sdk/client-elasticache,@aws-sdk/client-lambda,@aws-sdk/client-s3,@aws-sdk/client-secrets-manager,@aws-sdk/client-sns,@aws-sdk/client-sqs,@aws-sdk/is-array-buffer,@aws-sdk/types,@aws-sdk/util-buffer-from,@aws-sdk/util-dynamodb,@aws-sdk/util-stream-node,@aws-sdk/util-utf8-node,@azure/identity,@azure/storage-blob,cdktf'" + "exec": "npm-check-updates --dep dev --upgrade --target=minor --reject='cdktf-cli,constructs,jsii-rosetta,jsii,@aws-sdk/client-cloudwatch-logs,@aws-sdk/client-dynamodb,@aws-sdk/client-elasticache,@aws-sdk/client-lambda,@aws-sdk/client-s3,@aws-sdk/client-secrets-manager,@aws-sdk/client-sns,@aws-sdk/client-sqs,@aws-sdk/is-array-buffer,@aws-sdk/types,@aws-sdk/util-buffer-from,@aws-sdk/util-dynamodb,@aws-sdk/util-stream-node,@aws-sdk/util-utf8-node,@azure/identity,@azure/storage-blob,cdktf'" }, { - "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='cdktf-cli,constructs,jsii,@aws-sdk/client-cloudwatch-logs,@aws-sdk/client-dynamodb,@aws-sdk/client-elasticache,@aws-sdk/client-lambda,@aws-sdk/client-s3,@aws-sdk/client-secrets-manager,@aws-sdk/client-sns,@aws-sdk/client-sqs,@aws-sdk/is-array-buffer,@aws-sdk/types,@aws-sdk/util-buffer-from,@aws-sdk/util-dynamodb,@aws-sdk/util-stream-node,@aws-sdk/util-utf8-node,@azure/identity,@azure/storage-blob,cdktf'" + "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='cdktf-cli,constructs,jsii-rosetta,jsii,@aws-sdk/client-cloudwatch-logs,@aws-sdk/client-dynamodb,@aws-sdk/client-elasticache,@aws-sdk/client-lambda,@aws-sdk/client-s3,@aws-sdk/client-secrets-manager,@aws-sdk/client-sns,@aws-sdk/client-sqs,@aws-sdk/is-array-buffer,@aws-sdk/types,@aws-sdk/util-buffer-from,@aws-sdk/util-dynamodb,@aws-sdk/util-stream-node,@aws-sdk/util-utf8-node,@azure/identity,@azure/storage-blob,cdktf'" }, { - "exec": "npm-check-updates --dep peer --upgrade --target=minor --reject='cdktf-cli,constructs,jsii,@aws-sdk/client-cloudwatch-logs,@aws-sdk/client-dynamodb,@aws-sdk/client-elasticache,@aws-sdk/client-lambda,@aws-sdk/client-s3,@aws-sdk/client-secrets-manager,@aws-sdk/client-sns,@aws-sdk/client-sqs,@aws-sdk/is-array-buffer,@aws-sdk/types,@aws-sdk/util-buffer-from,@aws-sdk/util-dynamodb,@aws-sdk/util-stream-node,@aws-sdk/util-utf8-node,@azure/identity,@azure/storage-blob,cdktf'" + "exec": "npm-check-updates --dep peer --upgrade --target=minor --reject='cdktf-cli,constructs,jsii-rosetta,jsii,@aws-sdk/client-cloudwatch-logs,@aws-sdk/client-dynamodb,@aws-sdk/client-elasticache,@aws-sdk/client-lambda,@aws-sdk/client-s3,@aws-sdk/client-secrets-manager,@aws-sdk/client-sns,@aws-sdk/client-sqs,@aws-sdk/is-array-buffer,@aws-sdk/types,@aws-sdk/util-buffer-from,@aws-sdk/util-dynamodb,@aws-sdk/util-stream-node,@aws-sdk/util-utf8-node,@azure/identity,@azure/storage-blob,cdktf'" }, { - "exec": "npm-check-updates --dep prod --upgrade --target=minor --reject='cdktf-cli,constructs,jsii,@aws-sdk/client-cloudwatch-logs,@aws-sdk/client-dynamodb,@aws-sdk/client-elasticache,@aws-sdk/client-lambda,@aws-sdk/client-s3,@aws-sdk/client-secrets-manager,@aws-sdk/client-sns,@aws-sdk/client-sqs,@aws-sdk/is-array-buffer,@aws-sdk/types,@aws-sdk/util-buffer-from,@aws-sdk/util-dynamodb,@aws-sdk/util-stream-node,@aws-sdk/util-utf8-node,@azure/identity,@azure/storage-blob,cdktf'" + "exec": "npm-check-updates --dep prod --upgrade --target=minor --reject='cdktf-cli,constructs,jsii-rosetta,jsii,@aws-sdk/client-cloudwatch-logs,@aws-sdk/client-dynamodb,@aws-sdk/client-elasticache,@aws-sdk/client-lambda,@aws-sdk/client-s3,@aws-sdk/client-secrets-manager,@aws-sdk/client-sns,@aws-sdk/client-sqs,@aws-sdk/is-array-buffer,@aws-sdk/types,@aws-sdk/util-buffer-from,@aws-sdk/util-dynamodb,@aws-sdk/util-stream-node,@aws-sdk/util-utf8-node,@azure/identity,@azure/storage-blob,cdktf'" }, { - "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='cdktf-cli,constructs,jsii,@aws-sdk/client-cloudwatch-logs,@aws-sdk/client-dynamodb,@aws-sdk/client-elasticache,@aws-sdk/client-lambda,@aws-sdk/client-s3,@aws-sdk/client-secrets-manager,@aws-sdk/client-sns,@aws-sdk/client-sqs,@aws-sdk/is-array-buffer,@aws-sdk/types,@aws-sdk/util-buffer-from,@aws-sdk/util-dynamodb,@aws-sdk/util-stream-node,@aws-sdk/util-utf8-node,@azure/identity,@azure/storage-blob,cdktf'" + "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='cdktf-cli,constructs,jsii-rosetta,jsii,@aws-sdk/client-cloudwatch-logs,@aws-sdk/client-dynamodb,@aws-sdk/client-elasticache,@aws-sdk/client-lambda,@aws-sdk/client-s3,@aws-sdk/client-secrets-manager,@aws-sdk/client-sns,@aws-sdk/client-sqs,@aws-sdk/is-array-buffer,@aws-sdk/types,@aws-sdk/util-buffer-from,@aws-sdk/util-dynamodb,@aws-sdk/util-stream-node,@aws-sdk/util-utf8-node,@azure/identity,@azure/storage-blob,cdktf'" }, { "exec": "pnpm i --no-frozen-lockfile" }, { - "exec": "pnpm update" + "exec": "pnpm update @cdktf/provider-aws @types/aws-lambda @types/express @types/fs-extra @types/mime-types @types/node @types/uuid @typescript-eslint/eslint-plugin @typescript-eslint/parser @vitest/coverage-v8 @winglang/jsii-docgen aws-sdk-client-mock aws-sdk-client-mock-jest bump-pack cdktf-cli constructs eslint-config-prettier eslint-import-resolver-node eslint-import-resolver-typescript eslint-plugin-import eslint-plugin-prettier eslint-plugin-sort-exports eslint fs-extra jsii-diff jsii-pacmak jsii-rosetta jsii nanoid npm-check-updates prettier projen standard-version ts-node typescript vitest wing-api-checker @aws-sdk/client-cloudwatch-logs @aws-sdk/client-dynamodb @aws-sdk/client-elasticache @aws-sdk/client-lambda @aws-sdk/client-s3 @aws-sdk/client-secrets-manager @aws-sdk/client-sns @aws-sdk/client-sqs @aws-sdk/is-array-buffer @aws-sdk/types @aws-sdk/util-buffer-from @aws-sdk/util-dynamodb @aws-sdk/util-stream-node @aws-sdk/util-utf8-node @azure/core-paging @azure/identity @azure/storage-blob @types/aws-lambda aws-cdk-lib cdktf cron-parser esbuild-wasm express ioredis jsonschema mime-types nanoid safe-stable-stringify uuid constructs constructs" }, { "exec": "pnpm exec projen" @@ -456,7 +456,7 @@ } }, "env": { - "PATH": "$(pnpm -c exec \"node -e \\\"console.log(process.env.PATH)\\\"\")" + "PATH": "$(pnpm -c exec \"node --print process.env.PATH\")" }, "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." } diff --git a/libs/wingsdk/.projenrc.ts b/libs/wingsdk/.projenrc.ts index b6c52a838a1..3be8fec3b93 100644 --- a/libs/wingsdk/.projenrc.ts +++ b/libs/wingsdk/.projenrc.ts @@ -74,16 +74,16 @@ const project = new cdk.JsiiProject({ // aws client dependencies // (note: these should always be updated together, otherwise they will // conflict with each other) - "@aws-sdk/client-cloudwatch-logs@3.354.0", - "@aws-sdk/client-dynamodb@3.354.0", - "@aws-sdk/client-elasticache@3.354.0", - "@aws-sdk/util-dynamodb@3.354.0", - "@aws-sdk/client-lambda@3.354.0", - "@aws-sdk/client-s3@3.354.0", - "@aws-sdk/client-secrets-manager@3.354.0", - "@aws-sdk/client-sqs@3.354.0", - "@aws-sdk/client-sns@3.354.0", - "@aws-sdk/types@3.347.0", + "@aws-sdk/client-cloudwatch-logs@3.405.0", + "@aws-sdk/client-dynamodb@3.405.0", + "@aws-sdk/client-elasticache@3.405.0", + "@aws-sdk/util-dynamodb@3.405.0", + "@aws-sdk/client-lambda@3.405.0", + "@aws-sdk/client-s3@3.405.0", + "@aws-sdk/client-secrets-manager@3.405.0", + "@aws-sdk/client-sqs@3.405.0", + "@aws-sdk/client-sns@3.405.0", + "@aws-sdk/types@3.398.0", "@aws-sdk/util-stream-node@3.350.0", "@aws-sdk/util-utf8-node@3.259.0", "@types/aws-lambda", diff --git a/libs/wingsdk/package.json b/libs/wingsdk/package.json index 976e8d19399..3c75b55d444 100644 --- a/libs/wingsdk/package.json +++ b/libs/wingsdk/package.json @@ -43,66 +43,67 @@ "@types/fs-extra": "^11.0.1", "@types/mime-types": "^2.1.1", "@types/node": "^18", - "@types/uuid": "^9.0.1", + "@types/uuid": "^9.0.3", "@typescript-eslint/eslint-plugin": "^5", "@typescript-eslint/parser": "^5", - "@vitest/coverage-v8": "^0.32.2", + "@vitest/coverage-v8": "^0.32.4", "@winglang/jsii-docgen": "workspace:^", - "aws-sdk-client-mock": "^2.0.1", - "aws-sdk-client-mock-jest": "^2.0.1", + "aws-sdk-client-mock": "^2.2.0", + "aws-sdk-client-mock-jest": "^2.2.0", "bump-pack": "workspace:^", "cdktf-cli": "0.17.0", "constructs": "~10.2.69", "eslint": "^8", - "eslint-config-prettier": "^8.6.0", - "eslint-import-resolver-node": "^0.3.7", - "eslint-import-resolver-typescript": "^3.5.3", - "eslint-plugin-import": "^2.27.5", + "eslint-config-prettier": "^8.10.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-import-resolver-typescript": "^3.6.0", + "eslint-plugin-import": "^2.28.1", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-sort-exports": "^0.8.0", "fs-extra": "^10.1.0", "jsii": "5.0.11", - "jsii-diff": "^1.73.0", - "jsii-pacmak": "^1.73.0", + "jsii-diff": "^1.88.0", + "jsii-pacmak": "^1.88.0", + "jsii-rosetta": "5.0.11", "nanoid": "^3.3.4", "npm-check-updates": "^16", - "prettier": "^2.8.3", - "projen": "^0.71.7", + "prettier": "^2.8.8", + "projen": "^0.71.163", "standard-version": "^9", "ts-node": "^10.9.1", - "typescript": "^4.9.4", - "vitest": "^0.32.2", + "typescript": "^4.9.5", + "vitest": "^0.32.4", "wing-api-checker": "workspace:^" }, "peerDependencies": { "constructs": "~10.2.69" }, "dependencies": { - "@aws-sdk/client-cloudwatch-logs": "3.354.0", - "@aws-sdk/client-dynamodb": "3.354.0", - "@aws-sdk/client-elasticache": "3.354.0", - "@aws-sdk/client-lambda": "3.354.0", - "@aws-sdk/client-s3": "3.354.0", - "@aws-sdk/client-secrets-manager": "3.354.0", - "@aws-sdk/client-sns": "3.354.0", - "@aws-sdk/client-sqs": "3.354.0", + "@aws-sdk/client-cloudwatch-logs": "3.405.0", + "@aws-sdk/client-dynamodb": "3.405.0", + "@aws-sdk/client-elasticache": "3.405.0", + "@aws-sdk/client-lambda": "3.405.0", + "@aws-sdk/client-s3": "3.405.0", + "@aws-sdk/client-secrets-manager": "3.405.0", + "@aws-sdk/client-sns": "3.405.0", + "@aws-sdk/client-sqs": "3.405.0", "@aws-sdk/is-array-buffer": "3.201.0", - "@aws-sdk/types": "3.347.0", + "@aws-sdk/types": "3.398.0", "@aws-sdk/util-buffer-from": "3.208.0", - "@aws-sdk/util-dynamodb": "3.354.0", + "@aws-sdk/util-dynamodb": "3.405.0", "@aws-sdk/util-stream-node": "3.350.0", "@aws-sdk/util-utf8-node": "3.259.0", - "@azure/core-paging": "^1.4.0", + "@azure/core-paging": "^1.5.0", "@azure/identity": "3.1.3", "@azure/storage-blob": "12.14.0", - "@types/aws-lambda": "^8.10.109", + "@types/aws-lambda": "^8.10.119", "aws-cdk-lib": "^2.64.0", "cdktf": "0.17.0", "constructs": "~10.2.69", - "cron-parser": "^4.8.1", - "esbuild-wasm": "^0.18.5", + "cron-parser": "^4.9.0", + "esbuild-wasm": "^0.18.20", "express": "^4.18.2", - "ioredis": "^5.3.1", + "ioredis": "^5.3.2", "jsonschema": "^1.4.1", "mime-types": "^2.1.35", "nanoid": "^3.3.6", diff --git a/libs/wingsdk/test/core/__snapshots__/connections.test.ts.snap b/libs/wingsdk/test/core/__snapshots__/connections.test.ts.snap index fa9a64d691d..34d8ce86a53 100644 --- a/libs/wingsdk/test/core/__snapshots__/connections.test.ts.snap +++ b/libs/wingsdk/test/core/__snapshots__/connections.test.ts.snap @@ -66,7 +66,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -79,7 +79,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -92,7 +92,7 @@ return class Handler { "my_bucket": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -104,7 +104,7 @@ return class Handler { "my_function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -116,7 +116,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-awscdk/__snapshots__/bucket.test.ts.snap b/libs/wingsdk/test/target-awscdk/__snapshots__/bucket.test.ts.snap index 4b103cbd384..b934af071b7 100644 --- a/libs/wingsdk/test/target-awscdk/__snapshots__/bucket.test.ts.snap +++ b/libs/wingsdk/test/target-awscdk/__snapshots__/bucket.test.ts.snap @@ -1559,7 +1559,12 @@ exports[`bucket with two preflight files 1`] = ` "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, - "S3Key": "2bc265c5e0569aeb24a6349c15bd54e76e845892376515e036627ab0cc70bb64.zip", + "S3Key": "9eb41a5505d37607ac419321497a4f8c21cf0ee1f9b4a6b29aa04301aea5c7fd.zip", + }, + "Environment": { + "Variables": { + "AWS_CA_BUNDLE": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", + }, }, "Handler": "index.handler", "Layers": [ @@ -1769,7 +1774,7 @@ exports[`bucket with two preflight files 1`] = ` "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, - "S3Key": "f8e422c63159c82c409e8254300a3134e020892c27382902d4c8c0a5b35d0a06.zip", + "S3Key": "e2277687077a2abf9ae1af1cc9565e6715e2ebb62f79ec53aa75a1af9298f642.zip", }, "Description": "/opt/awscli/aws", }, @@ -1809,7 +1814,7 @@ exports[`bucket with two preflight files 1`] = ` "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, - "S3Key": "f8e422c63159c82c409e8254300a3134e020892c27382902d4c8c0a5b35d0a06.zip", + "S3Key": "e2277687077a2abf9ae1af1cc9565e6715e2ebb62f79ec53aa75a1af9298f642.zip", }, "Description": "/opt/awscli/aws", }, @@ -1901,6 +1906,11 @@ exports[`bucket with two preflight objects 1`] = ` }, "S3Key": "", }, + "Environment": { + "Variables": { + "AWS_CA_BUNDLE": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", + }, + }, "Handler": "index.handler", "Layers": [ { diff --git a/libs/wingsdk/test/target-awscdk/__snapshots__/on-deploy.test.ts.snap b/libs/wingsdk/test/target-awscdk/__snapshots__/on-deploy.test.ts.snap index 549e5bc90d8..f56bacd8c09 100644 --- a/libs/wingsdk/test/target-awscdk/__snapshots__/on-deploy.test.ts.snap +++ b/libs/wingsdk/test/target-awscdk/__snapshots__/on-deploy.test.ts.snap @@ -24,7 +24,7 @@ exports[`create an OnDeploy 1`] = ` "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, - "S3Key": "f852bfab94a36947a0c426b4c9aa55f31d1ba844ac1c6c40af84b941fd4ae8bb.zip", + "S3Key": "e62535c1e251fa24f7bee044e96b427fb5e8b87bb32c1c6fe04758589f959275.zip", }, "Handler": "__entrypoint__.handler", "MemorySize": 128, @@ -34,7 +34,7 @@ exports[`create an OnDeploy 1`] = ` "Arn", ], }, - "Runtime": "nodejs14.x", + "Runtime": "nodejs18.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function", @@ -161,15 +161,18 @@ exports[`create an OnDeploy 1`] = ` "myondeployTrigger63552203": { "DeletionPolicy": "Delete", "Properties": { + "ExecuteOnHandlerChange": true, "HandlerArn": { "Ref": "myondeployFunctionCurrentVersion6BC23754495ffbfe7093f6d76e062790f78856b0", }, + "InvocationType": "RequestResponse", "ServiceToken": { "Fn::GetAtt": [ "AWSCDKTriggerCustomResourceProviderCustomResourceProviderHandler97BECD91", "Arn", ], }, + "Timeout": "120000", }, "Type": "Custom::Trigger", "UpdateReplacePolicy": "Delete", @@ -229,7 +232,7 @@ exports[`execute OnDeploy after other resources 1`] = ` "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, - "S3Key": "f852bfab94a36947a0c426b4c9aa55f31d1ba844ac1c6c40af84b941fd4ae8bb.zip", + "S3Key": "e62535c1e251fa24f7bee044e96b427fb5e8b87bb32c1c6fe04758589f959275.zip", }, "Handler": "__entrypoint__.handler", "MemorySize": 128, @@ -239,7 +242,7 @@ exports[`execute OnDeploy after other resources 1`] = ` "Arn", ], }, - "Runtime": "nodejs14.x", + "Runtime": "nodejs18.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function", @@ -391,15 +394,18 @@ exports[`execute OnDeploy after other resources 1`] = ` "mybucketD601CBAA", ], "Properties": { + "ExecuteOnHandlerChange": true, "HandlerArn": { "Ref": "myondeployFunctionCurrentVersion6BC23754495ffbfe7093f6d76e062790f78856b0", }, + "InvocationType": "RequestResponse", "ServiceToken": { "Fn::GetAtt": [ "AWSCDKTriggerCustomResourceProviderCustomResourceProviderHandler97BECD91", "Arn", ], }, + "Timeout": "120000", }, "Type": "Custom::Trigger", "UpdateReplacePolicy": "Delete", @@ -459,7 +465,7 @@ exports[`execute OnDeploy before other resources 1`] = ` "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, - "S3Key": "f852bfab94a36947a0c426b4c9aa55f31d1ba844ac1c6c40af84b941fd4ae8bb.zip", + "S3Key": "e62535c1e251fa24f7bee044e96b427fb5e8b87bb32c1c6fe04758589f959275.zip", }, "Handler": "__entrypoint__.handler", "MemorySize": 128, @@ -469,7 +475,7 @@ exports[`execute OnDeploy before other resources 1`] = ` "Arn", ], }, - "Runtime": "nodejs14.x", + "Runtime": "nodejs18.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function", @@ -621,15 +627,18 @@ exports[`execute OnDeploy before other resources 1`] = ` "myondeployTrigger63552203": { "DeletionPolicy": "Delete", "Properties": { + "ExecuteOnHandlerChange": true, "HandlerArn": { "Ref": "myondeployFunctionCurrentVersion6BC23754495ffbfe7093f6d76e062790f78856b0", }, + "InvocationType": "RequestResponse", "ServiceToken": { "Fn::GetAtt": [ "AWSCDKTriggerCustomResourceProviderCustomResourceProviderHandler97BECD91", "Arn", ], }, + "Timeout": "120000", }, "Type": "Custom::Trigger", "UpdateReplacePolicy": "Delete", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap index 66c8ee9c55d..6267c211d6a 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/api.test.ts.snap @@ -115,7 +115,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -128,7 +128,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -143,7 +143,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -154,7 +154,7 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -167,7 +167,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A REST API endpoint", @@ -179,7 +179,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -304,7 +304,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -317,7 +317,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -332,7 +332,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -343,7 +343,7 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -356,7 +356,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A REST API endpoint", @@ -368,7 +368,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -493,7 +493,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -506,7 +506,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -521,7 +521,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -532,7 +532,7 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -545,7 +545,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A REST API endpoint", @@ -557,7 +557,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -682,7 +682,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -695,7 +695,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -710,7 +710,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -721,7 +721,7 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -734,7 +734,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A REST API endpoint", @@ -746,7 +746,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -871,7 +871,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -884,7 +884,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -899,7 +899,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -910,7 +910,7 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -923,7 +923,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A REST API endpoint", @@ -935,7 +935,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -1192,7 +1192,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1205,7 +1205,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1220,7 +1220,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -1231,7 +1231,7 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1244,7 +1244,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A REST API endpoint", @@ -1256,7 +1256,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -1398,7 +1398,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1411,7 +1411,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1426,7 +1426,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -1437,7 +1437,7 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1450,7 +1450,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A REST API endpoint", @@ -1462,7 +1462,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -1596,7 +1596,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1609,7 +1609,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1624,7 +1624,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -1635,7 +1635,7 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1648,7 +1648,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A REST API endpoint", @@ -1660,7 +1660,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -1783,7 +1783,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1796,7 +1796,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1811,7 +1811,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -1822,7 +1822,7 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1835,7 +1835,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A REST API endpoint", @@ -1847,7 +1847,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -2036,7 +2036,7 @@ return class Handler { "Handler1": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -2049,7 +2049,7 @@ return class Handler { "Handler2": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -2062,7 +2062,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2077,7 +2077,7 @@ return class Handler { "ApiEventMapping-7c48a9f0": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -2088,7 +2088,7 @@ return class Handler { "ApiEventMapping-f6d90a7f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -2099,7 +2099,7 @@ return class Handler { "OnRequestHandler-7c48a9f0": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -2112,7 +2112,7 @@ return class Handler { "OnRequestHandler-f6d90a7f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -2125,7 +2125,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A REST API endpoint", @@ -2137,7 +2137,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -2328,7 +2328,7 @@ return class Handler { "Handler1": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -2341,7 +2341,7 @@ return class Handler { "Handler2": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -2354,7 +2354,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2369,7 +2369,7 @@ return class Handler { "ApiEventMapping-7c48a9f0": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -2380,7 +2380,7 @@ return class Handler { "ApiEventMapping-f6d90a7f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -2391,7 +2391,7 @@ return class Handler { "OnRequestHandler-7c48a9f0": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -2404,7 +2404,7 @@ return class Handler { "OnRequestHandler-f6d90a7f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -2417,7 +2417,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A REST API endpoint", @@ -2429,7 +2429,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -2554,7 +2554,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -2567,7 +2567,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2582,7 +2582,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -2593,7 +2593,7 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -2606,7 +2606,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A REST API endpoint", @@ -2618,7 +2618,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -2752,7 +2752,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -2765,7 +2765,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2780,7 +2780,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -2791,7 +2791,7 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -2804,7 +2804,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A REST API endpoint", @@ -2816,7 +2816,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -2941,7 +2941,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -2954,7 +2954,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2969,7 +2969,7 @@ return class Handler { "ApiEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -2980,7 +2980,7 @@ return class Handler { "OnRequestHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -2993,7 +2993,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A REST API endpoint", @@ -3005,7 +3005,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -3051,7 +3051,7 @@ exports[`create an api 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -3064,7 +3064,7 @@ exports[`create an api 1`] = ` "my_api": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A REST API endpoint", @@ -3076,7 +3076,7 @@ exports[`create an api 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/bucket.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/bucket.test.ts.snap index 71e0b024361..5e0b9ad89cb 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/bucket.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/bucket.test.ts.snap @@ -97,7 +97,7 @@ exports[`can add file in preflight 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -110,7 +110,7 @@ exports[`can add file in preflight 2`] = ` "my_bucket": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -122,7 +122,7 @@ exports[`can add file in preflight 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -182,7 +182,7 @@ exports[`can add object in preflight 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -195,7 +195,7 @@ exports[`can add object in preflight 2`] = ` "my_bucket": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -207,7 +207,7 @@ exports[`can add object in preflight 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -252,7 +252,7 @@ exports[`create a bucket 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -265,7 +265,7 @@ exports[`create a bucket 1`] = ` "my_bucket": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -277,7 +277,7 @@ exports[`create a bucket 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -332,7 +332,7 @@ exports[`get invalid object throws an error 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -345,7 +345,7 @@ exports[`get invalid object throws an error 2`] = ` "my_bucket": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -357,7 +357,7 @@ exports[`get invalid object throws an error 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -448,7 +448,7 @@ exports[`put and get Json object from bucket 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -461,7 +461,7 @@ exports[`put and get Json object from bucket 2`] = ` "my_bucket": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -473,7 +473,7 @@ exports[`put and get Json object from bucket 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/counter.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/counter.test.ts.snap index 018c695b0c4..f68cdc0b6c1 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/counter.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/counter.test.ts.snap @@ -33,7 +33,7 @@ exports[`create a counter 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -46,7 +46,7 @@ exports[`create a counter 1`] = ` "my_counter": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed atomic counter", @@ -58,7 +58,7 @@ exports[`create a counter 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -114,7 +114,7 @@ exports[`dec 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -127,7 +127,7 @@ exports[`dec 2`] = ` "my_counter": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed atomic counter", @@ -139,7 +139,7 @@ exports[`dec 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -195,7 +195,7 @@ exports[`inc 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -208,7 +208,7 @@ exports[`inc 2`] = ` "my_counter": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed atomic counter", @@ -220,7 +220,7 @@ exports[`inc 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -276,7 +276,7 @@ exports[`key dec 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -289,7 +289,7 @@ exports[`key dec 2`] = ` "my_counter": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed atomic counter", @@ -301,7 +301,7 @@ exports[`key dec 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -357,7 +357,7 @@ exports[`key inc 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -370,7 +370,7 @@ exports[`key inc 2`] = ` "my_counter": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed atomic counter", @@ -382,7 +382,7 @@ exports[`key inc 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -436,7 +436,7 @@ exports[`key set to new value 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -449,7 +449,7 @@ exports[`key set to new value 2`] = ` "my_counter": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed atomic counter", @@ -461,7 +461,7 @@ exports[`key set to new value 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -515,7 +515,7 @@ exports[`set to new value 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -528,7 +528,7 @@ exports[`set to new value 2`] = ` "my_counter": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed atomic counter", @@ -540,7 +540,7 @@ exports[`set to new value 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/file-counter.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/file-counter.test.ts.snap index a916baf1a5a..590e445771c 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/file-counter.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/file-counter.test.ts.snap @@ -147,7 +147,7 @@ bucket: (function(env) { "Bucket": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -159,7 +159,7 @@ bucket: (function(env) { "Counter": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed atomic counter", @@ -171,7 +171,7 @@ bucket: (function(env) { "Processor": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -186,7 +186,7 @@ bucket: (function(env) { "Queue-QueueEventMapping-401ee792": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -197,7 +197,7 @@ bucket: (function(env) { "Queue-SetConsumer-401ee792": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -210,7 +210,7 @@ bucket: (function(env) { "Queue-SetConsumerHandler-401ee792": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -221,7 +221,7 @@ bucket: (function(env) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed message queue", @@ -233,7 +233,7 @@ bucket: (function(env) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "HelloWorld", "path": "root/HelloWorld", @@ -241,7 +241,7 @@ bucket: (function(env) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -254,7 +254,7 @@ bucket: (function(env) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/function.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/function.test.ts.snap index aa0e02ad635..f71264f5b37 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/function.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/function.test.ts.snap @@ -65,7 +65,7 @@ async handle(event) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -78,7 +78,7 @@ async handle(event) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -91,7 +91,7 @@ async handle(event) { "my_function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -103,7 +103,7 @@ async handle(event) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -186,7 +186,7 @@ async handle(event) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -199,7 +199,7 @@ async handle(event) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -212,7 +212,7 @@ async handle(event) { "my_function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -224,7 +224,7 @@ async handle(event) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -307,7 +307,7 @@ async handle(event) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -320,7 +320,7 @@ async handle(event) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -333,7 +333,7 @@ async handle(event) { "my_function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -345,7 +345,7 @@ async handle(event) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -430,7 +430,7 @@ async handle(event) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -443,7 +443,7 @@ async handle(event) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -456,7 +456,7 @@ async handle(event) { "my_function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -468,7 +468,7 @@ async handle(event) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -541,7 +541,7 @@ async handle() { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -554,7 +554,7 @@ async handle() { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -567,7 +567,7 @@ async handle() { "my_function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -579,7 +579,7 @@ async handle() { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -734,7 +734,7 @@ return class Handler { "Function.0": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -746,7 +746,7 @@ return class Handler { "Function.0.handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -759,7 +759,7 @@ return class Handler { "Function.1": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -771,7 +771,7 @@ return class Handler { "Function.1.handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -784,7 +784,7 @@ return class Handler { "Function.2": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -796,7 +796,7 @@ return class Handler { "Function.2.handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -809,7 +809,7 @@ return class Handler { "Function.3": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -821,7 +821,7 @@ return class Handler { "Function.3.handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -834,7 +834,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -847,7 +847,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/immutable-capture.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/immutable-capture.test.ts.snap index 3b6b4d27d02..79353dde61c 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/immutable-capture.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/immutable-capture.test.ts.snap @@ -55,7 +55,7 @@ my_capture: [\\"hello\\",\\"dude\\"] "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -67,7 +67,7 @@ my_capture: [\\"hello\\",\\"dude\\"] "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -80,7 +80,7 @@ my_capture: [\\"hello\\",\\"dude\\"] "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -93,7 +93,7 @@ my_capture: [\\"hello\\",\\"dude\\"] }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -207,7 +207,7 @@ my_buckets: [(function(env) { "B1": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -219,7 +219,7 @@ my_buckets: [(function(env) { "B2": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -231,7 +231,7 @@ my_buckets: [(function(env) { "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -243,7 +243,7 @@ my_buckets: [(function(env) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -256,7 +256,7 @@ my_buckets: [(function(env) { "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -269,7 +269,7 @@ my_buckets: [(function(env) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -334,7 +334,7 @@ my_array: [{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": 0.1666666666666666 "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -346,7 +346,7 @@ my_array: [{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": 0.1666666666666666 "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -359,7 +359,7 @@ my_array: [{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": 0.1666666666666666 "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -372,7 +372,7 @@ my_array: [{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": 0.1666666666666666 }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -436,7 +436,7 @@ my_array: [new Map([[\\"foo\\",1],[\\"bar\\",2]]),new Map([[\\"foo\\",3],[\\"bar "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -448,7 +448,7 @@ my_array: [new Map([[\\"foo\\",1],[\\"bar\\",2]]),new Map([[\\"foo\\",3],[\\"bar "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -461,7 +461,7 @@ my_array: [new Map([[\\"foo\\",1],[\\"bar\\",2]]),new Map([[\\"foo\\",3],[\\"bar "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -474,7 +474,7 @@ my_array: [new Map([[\\"foo\\",1],[\\"bar\\",2]]),new Map([[\\"foo\\",3],[\\"bar }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -537,7 +537,7 @@ my_capture: false "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -549,7 +549,7 @@ my_capture: false "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -562,7 +562,7 @@ my_capture: false "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -575,7 +575,7 @@ my_capture: false }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -640,7 +640,7 @@ my_capture: {\\"seconds\\": 7200,\\"minutes\\": 120,\\"hours\\": 2,} "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -652,7 +652,7 @@ my_capture: {\\"seconds\\": 7200,\\"minutes\\": 120,\\"hours\\": 2,} "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -665,7 +665,7 @@ my_capture: {\\"seconds\\": 7200,\\"minutes\\": 120,\\"hours\\": 2,} "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -678,7 +678,7 @@ my_capture: {\\"seconds\\": 7200,\\"minutes\\": 120,\\"hours\\": 2,} }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -745,7 +745,7 @@ my_capture: new Map([[\\"foo\\",123],[\\"bar\\",456]]) "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -757,7 +757,7 @@ my_capture: new Map([[\\"foo\\",123],[\\"bar\\",456]]) "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -770,7 +770,7 @@ my_capture: new Map([[\\"foo\\",123],[\\"bar\\",456]]) "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -783,7 +783,7 @@ my_capture: new Map([[\\"foo\\",123],[\\"bar\\",456]]) }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -852,7 +852,7 @@ my_map: new Map([[\\"foo\\",[1,2]],[\\"bar\\",[3,4]]]) "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -864,7 +864,7 @@ my_map: new Map([[\\"foo\\",[1,2]],[\\"bar\\",[3,4]]]) "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -877,7 +877,7 @@ my_map: new Map([[\\"foo\\",[1,2]],[\\"bar\\",[3,4]]]) "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -890,7 +890,7 @@ my_map: new Map([[\\"foo\\",[1,2]],[\\"bar\\",[3,4]]]) }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -956,7 +956,7 @@ my_map: new Map([[\\"foo\\",[{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -968,7 +968,7 @@ my_map: new Map([[\\"foo\\",[{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -981,7 +981,7 @@ my_map: new Map([[\\"foo\\",[{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -994,7 +994,7 @@ my_map: new Map([[\\"foo\\",[{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -1105,7 +1105,7 @@ my_map: new Map([[\\"foo\\",(function(env) { "B1": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -1117,7 +1117,7 @@ my_map: new Map([[\\"foo\\",(function(env) { "B2": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -1129,7 +1129,7 @@ my_map: new Map([[\\"foo\\",(function(env) { "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1141,7 +1141,7 @@ my_map: new Map([[\\"foo\\",(function(env) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1154,7 +1154,7 @@ my_map: new Map([[\\"foo\\",(function(env) { "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1167,7 +1167,7 @@ my_map: new Map([[\\"foo\\",(function(env) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -1230,7 +1230,7 @@ my_capture: 123 "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1242,7 +1242,7 @@ my_capture: 123 "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1255,7 +1255,7 @@ my_capture: 123 "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1268,7 +1268,7 @@ my_capture: 123 }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -1334,7 +1334,7 @@ my_capture: new Set([\\"boom\\",\\"bam\\",\\"bang\\"]) "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1346,7 +1346,7 @@ my_capture: new Set([\\"boom\\",\\"bam\\",\\"bang\\"]) "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1359,7 +1359,7 @@ my_capture: new Set([\\"boom\\",\\"bam\\",\\"bang\\"]) "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1372,7 +1372,7 @@ my_capture: new Set([\\"boom\\",\\"bam\\",\\"bang\\"]) }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -1437,7 +1437,7 @@ my_set: new Set([{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": 0.1666666666 "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1449,7 +1449,7 @@ my_set: new Set([{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": 0.1666666666 "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1462,7 +1462,7 @@ my_set: new Set([{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": 0.1666666666 "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1475,7 +1475,7 @@ my_set: new Set([{\\"seconds\\": 600,\\"minutes\\": 10,\\"hours\\": 0.1666666666 }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -1539,7 +1539,7 @@ my_capture: \\"bam bam bam\\" "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1551,7 +1551,7 @@ my_capture: \\"bam bam bam\\" "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1564,7 +1564,7 @@ my_capture: \\"bam bam bam\\" "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1577,7 +1577,7 @@ my_capture: \\"bam bam bam\\" }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -1643,7 +1643,7 @@ my_capture: {\\"hello\\": \\"dude\\",\\"world\\": \\"cup\\",\\"foo\\": \\"bar\\" "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1655,7 +1655,7 @@ my_capture: {\\"hello\\": \\"dude\\",\\"world\\": \\"cup\\",\\"foo\\": \\"bar\\" "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1668,7 +1668,7 @@ my_capture: {\\"hello\\": \\"dude\\",\\"world\\": \\"cup\\",\\"foo\\": \\"bar\\" "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1681,7 +1681,7 @@ my_capture: {\\"hello\\": \\"dude\\",\\"world\\": \\"cup\\",\\"foo\\": \\"bar\\" }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -1747,7 +1747,7 @@ my_struct: {\\"foo\\": new Map([[\\"foo\\",1],[\\"bar\\",2]]),\\"bar\\": new Map "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1759,7 +1759,7 @@ my_struct: {\\"foo\\": new Map([[\\"foo\\",1],[\\"bar\\",2]]),\\"bar\\": new Map "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1772,7 +1772,7 @@ my_struct: {\\"foo\\": new Map([[\\"foo\\",1],[\\"bar\\",2]]),\\"bar\\": new Map "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1785,7 +1785,7 @@ my_struct: {\\"foo\\": new Map([[\\"foo\\",1],[\\"bar\\",2]]),\\"bar\\": new Map }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -1967,7 +1967,7 @@ my_struct: {\\"bucky\\": (function(env) { "B1": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -1979,7 +1979,7 @@ my_struct: {\\"bucky\\": (function(env) { "B2": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -1991,7 +1991,7 @@ my_struct: {\\"bucky\\": (function(env) { "B3": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -2003,7 +2003,7 @@ my_struct: {\\"bucky\\": (function(env) { "B4": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -2015,7 +2015,7 @@ my_struct: {\\"bucky\\": (function(env) { "B5": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -2027,7 +2027,7 @@ my_struct: {\\"bucky\\": (function(env) { "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -2039,7 +2039,7 @@ my_struct: {\\"bucky\\": (function(env) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2052,7 +2052,7 @@ my_struct: {\\"bucky\\": (function(env) { "foo": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -2065,7 +2065,7 @@ my_struct: {\\"bucky\\": (function(env) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/on-deploy.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/on-deploy.test.ts.snap index 217b4af668b..c039a46cbcf 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/on-deploy.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/on-deploy.test.ts.snap @@ -58,7 +58,7 @@ return class Handler { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -71,7 +71,7 @@ return class Handler { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -86,7 +86,7 @@ return class Handler { "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -99,7 +99,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "Run code during the app's deployment.", @@ -111,7 +111,7 @@ return class Handler { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/queue.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/queue.test.ts.snap index 69b04c08221..67aeb8e4543 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/queue.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/queue.test.ts.snap @@ -34,7 +34,7 @@ exports[`create a queue 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -47,7 +47,7 @@ exports[`create a queue 2`] = ` "my_queue": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed message queue", @@ -59,7 +59,7 @@ exports[`create a queue 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -178,7 +178,7 @@ async handle(message) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -191,7 +191,7 @@ async handle(message) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -206,7 +206,7 @@ async handle(message) { "my_queue-QueueEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -217,7 +217,7 @@ async handle(message) { "my_queue-SetConsumer-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -230,7 +230,7 @@ async handle(message) { "my_queue-SetConsumerHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -241,7 +241,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed message queue", @@ -253,7 +253,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -372,7 +372,7 @@ async handle(message) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -385,7 +385,7 @@ async handle(message) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -400,7 +400,7 @@ async handle(message) { "my_queue-QueueEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -411,7 +411,7 @@ async handle(message) { "my_queue-SetConsumer-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -424,7 +424,7 @@ async handle(message) { "my_queue-SetConsumerHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -435,7 +435,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed message queue", @@ -447,7 +447,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -567,7 +567,7 @@ async handle(message) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -580,7 +580,7 @@ async handle(message) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -595,7 +595,7 @@ async handle(message) { "my_queue-QueueEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -606,7 +606,7 @@ async handle(message) { "my_queue-SetConsumer-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -619,7 +619,7 @@ async handle(message) { "my_queue-SetConsumerHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -630,7 +630,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed message queue", @@ -642,7 +642,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -700,7 +700,7 @@ exports[`queue batch size of 2, purge the queue 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -713,7 +713,7 @@ exports[`queue batch size of 2, purge the queue 2`] = ` "my_queue": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed message queue", @@ -725,7 +725,7 @@ exports[`queue batch size of 2, purge the queue 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -885,7 +885,7 @@ async handle(message) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -898,7 +898,7 @@ async handle(message) { "OnDeployHandler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -911,7 +911,7 @@ async handle(message) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -926,7 +926,7 @@ async handle(message) { "my_queue-QueueEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -937,7 +937,7 @@ async handle(message) { "my_queue-SetConsumer-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -950,7 +950,7 @@ async handle(message) { "my_queue-SetConsumerHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -961,7 +961,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed message queue", @@ -975,7 +975,7 @@ async handle(message) { "Function": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -988,7 +988,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "Run code during the app's deployment.", @@ -1000,7 +1000,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -1118,7 +1118,7 @@ async handle(message) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1131,7 +1131,7 @@ async handle(message) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1146,7 +1146,7 @@ async handle(message) { "my_queue-QueueEventMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -1157,7 +1157,7 @@ async handle(message) { "my_queue-SetConsumer-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1170,7 +1170,7 @@ async handle(message) { "my_queue-SetConsumerHandler-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -1181,7 +1181,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed message queue", @@ -1193,7 +1193,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/redis.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/redis.test.ts.snap index a5296705978..d2c3da50bd4 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/redis.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/redis.test.ts.snap @@ -31,7 +31,7 @@ exports[`create a Redis resource 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -44,7 +44,7 @@ exports[`create a Redis resource 1`] = ` "my_redis": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A Redis server", @@ -56,7 +56,7 @@ exports[`create a Redis resource 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/schedule.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/schedule.test.ts.snap index a65964f99c6..c67f94be568 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/schedule.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/schedule.test.ts.snap @@ -33,7 +33,7 @@ exports[`create a schedule 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -46,7 +46,7 @@ exports[`create a schedule 1`] = ` "my_schedule": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud schedule to trigger events at regular intervals", @@ -58,7 +58,7 @@ exports[`create a schedule 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -155,7 +155,7 @@ console.log(\\"Hello from schedule!\\"); "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -168,7 +168,7 @@ console.log(\\"Hello from schedule!\\"); "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -183,7 +183,7 @@ console.log(\\"Hello from schedule!\\"); "my_schedule-OnTick-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -196,7 +196,7 @@ console.log(\\"Hello from schedule!\\"); "my_schedule-OnTickMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -207,7 +207,7 @@ console.log(\\"Hello from schedule!\\"); "my_scheduleOnTickHandlere645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -218,7 +218,7 @@ console.log(\\"Hello from schedule!\\"); }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud schedule to trigger events at regular intervals", @@ -230,7 +230,7 @@ console.log(\\"Hello from schedule!\\"); }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -327,7 +327,7 @@ console.log(\\"Hello from schedule!\\"); "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -340,7 +340,7 @@ console.log(\\"Hello from schedule!\\"); "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -355,7 +355,7 @@ console.log(\\"Hello from schedule!\\"); "my_schedule-OnTick-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -368,7 +368,7 @@ console.log(\\"Hello from schedule!\\"); "my_schedule-OnTickMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -379,7 +379,7 @@ console.log(\\"Hello from schedule!\\"); "my_scheduleOnTickHandlere645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -390,7 +390,7 @@ console.log(\\"Hello from schedule!\\"); }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud schedule to trigger events at regular intervals", @@ -402,7 +402,7 @@ console.log(\\"Hello from schedule!\\"); }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -499,7 +499,7 @@ console.log(\\"Hello from schedule!\\"); "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -512,7 +512,7 @@ console.log(\\"Hello from schedule!\\"); "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -527,7 +527,7 @@ console.log(\\"Hello from schedule!\\"); "my_schedule-OnTick-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -540,7 +540,7 @@ console.log(\\"Hello from schedule!\\"); "my_schedule-OnTickMapping-e645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -551,7 +551,7 @@ console.log(\\"Hello from schedule!\\"); "my_scheduleOnTickHandlere645076f": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -562,7 +562,7 @@ console.log(\\"Hello from schedule!\\"); }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud schedule to trigger events at regular intervals", @@ -574,7 +574,7 @@ console.log(\\"Hello from schedule!\\"); }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/secret.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/secret.test.ts.snap index 93891a3e66b..d484129cbd3 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/secret.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/secret.test.ts.snap @@ -33,7 +33,7 @@ exports[`create a secret 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -46,7 +46,7 @@ exports[`create a secret 1`] = ` "my_secret": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud secret", @@ -58,7 +58,7 @@ exports[`create a secret 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/service.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/service.test.ts.snap index 00584b3f08b..6bc9ea732f5 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/service.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/service.test.ts.snap @@ -78,7 +78,7 @@ async handle(message) { "OnStartHandler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -91,7 +91,7 @@ async handle(message) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -106,7 +106,7 @@ async handle(message) { "my_service-ServiceOnStart-ef2b13b9": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -117,7 +117,7 @@ async handle(message) { "my_service-ServiceOnStartef2b13b9": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -130,7 +130,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud service", @@ -142,7 +142,7 @@ async handle(message) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/table.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/table.test.ts.snap index 762d2ca3042..644dfd9c436 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/table.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/table.test.ts.snap @@ -56,7 +56,7 @@ exports[`can add row in preflight 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -69,7 +69,7 @@ exports[`can add row in preflight 2`] = ` "my_table": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud NoSQL database table that can be used to store and query data", @@ -81,7 +81,7 @@ exports[`can add row in preflight 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -130,7 +130,7 @@ exports[`create a table 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -143,7 +143,7 @@ exports[`create a table 1`] = ` "my_table": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud NoSQL database table that can be used to store and query data", @@ -155,7 +155,7 @@ exports[`create a table 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -216,7 +216,7 @@ exports[`get row 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -229,7 +229,7 @@ exports[`get row 2`] = ` "my_table": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud NoSQL database table that can be used to store and query data", @@ -241,7 +241,7 @@ exports[`get row 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -301,7 +301,7 @@ exports[`insert row 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -314,7 +314,7 @@ exports[`insert row 2`] = ` "my_table": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud NoSQL database table that can be used to store and query data", @@ -326,7 +326,7 @@ exports[`insert row 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -389,7 +389,7 @@ exports[`list table 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -402,7 +402,7 @@ exports[`list table 2`] = ` "my_table": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud NoSQL database table that can be used to store and query data", @@ -414,7 +414,7 @@ exports[`list table 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", @@ -478,7 +478,7 @@ exports[`update row 2`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -491,7 +491,7 @@ exports[`update row 2`] = ` "my_table": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud NoSQL database table that can be used to store and query data", @@ -503,7 +503,7 @@ exports[`update row 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/test.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/test.test.ts.snap index 1dff4918f7c..e29abf48377 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/test.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/test.test.ts.snap @@ -55,7 +55,7 @@ async handle(event) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -68,7 +68,7 @@ async handle(event) { "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -83,7 +83,7 @@ async handle(event) { "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -95,7 +95,7 @@ async handle(event) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud unit test.", @@ -107,7 +107,7 @@ async handle(event) { }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-sim/__snapshots__/topic.test.ts.snap b/libs/wingsdk/test/target-sim/__snapshots__/topic.test.ts.snap index 913b72bd215..83e900a0359 100644 --- a/libs/wingsdk/test/target-sim/__snapshots__/topic.test.ts.snap +++ b/libs/wingsdk/test/target-sim/__snapshots__/topic.test.ts.snap @@ -31,7 +31,7 @@ exports[`create a topic 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -44,7 +44,7 @@ exports[`create a topic 1`] = ` "my_topic": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A pub/sub notification topic", @@ -56,7 +56,7 @@ exports[`create a topic 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/bucket.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/bucket.test.ts.snap index efc99ca9fd2..6bd7805ea0b 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/bucket.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/bucket.test.ts.snap @@ -77,7 +77,7 @@ exports[`bucket is public 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -124,7 +124,7 @@ exports[`bucket is public 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -136,7 +136,7 @@ exports[`bucket is public 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -228,7 +228,7 @@ exports[`bucket prefix must be lowercase 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -258,7 +258,7 @@ exports[`bucket prefix must be lowercase 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -271,7 +271,7 @@ exports[`bucket prefix must be lowercase 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -363,7 +363,7 @@ exports[`bucket prefix valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -394,7 +394,7 @@ exports[`bucket prefix valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -406,7 +406,7 @@ exports[`bucket prefix valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -618,7 +618,7 @@ exports[`bucket with onCreate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -631,7 +631,7 @@ exports[`bucket with onCreate method 2`] = ` "inflight": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -712,7 +712,7 @@ exports[`bucket with onCreate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A pub/sub notification topic", @@ -782,7 +782,7 @@ exports[`bucket with onCreate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -794,7 +794,7 @@ exports[`bucket with onCreate method 2`] = ` "my_bucket-oncreate-OnMessageHandler-7b961f4d": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -805,7 +805,7 @@ exports[`bucket with onCreate method 2`] = ` "my_bucket-oncreate-eventHandler-9eade8f6": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -816,7 +816,7 @@ exports[`bucket with onCreate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -828,7 +828,7 @@ exports[`bucket with onCreate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -1040,7 +1040,7 @@ exports[`bucket with onDelete method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1053,7 +1053,7 @@ exports[`bucket with onDelete method 2`] = ` "inflight": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1134,7 +1134,7 @@ exports[`bucket with onDelete method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A pub/sub notification topic", @@ -1204,7 +1204,7 @@ exports[`bucket with onDelete method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1216,7 +1216,7 @@ exports[`bucket with onDelete method 2`] = ` "my_bucket-ondelete-OnMessageHandler-1de1a361": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -1227,7 +1227,7 @@ exports[`bucket with onDelete method 2`] = ` "my_bucket-ondelete-eventHandler-9eade8f6": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -1238,7 +1238,7 @@ exports[`bucket with onDelete method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -1250,7 +1250,7 @@ exports[`bucket with onDelete method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -1590,7 +1590,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1603,7 +1603,7 @@ exports[`bucket with onEvent method 2`] = ` "inflight": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1684,7 +1684,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A pub/sub notification topic", @@ -1754,7 +1754,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1766,7 +1766,7 @@ exports[`bucket with onEvent method 2`] = ` "my_bucket-oncreate-OnMessageHandler-7b961f4d": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -1777,7 +1777,7 @@ exports[`bucket with onEvent method 2`] = ` "my_bucket-oncreate-eventHandler-9eade8f6": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -1814,7 +1814,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A pub/sub notification topic", @@ -1884,7 +1884,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1896,7 +1896,7 @@ exports[`bucket with onEvent method 2`] = ` "my_bucket-ondelete-OnMessageHandler-1de1a361": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -1907,7 +1907,7 @@ exports[`bucket with onEvent method 2`] = ` "my_bucket-ondelete-eventHandler-9eade8f6": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -1944,7 +1944,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A pub/sub notification topic", @@ -2014,7 +2014,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -2026,7 +2026,7 @@ exports[`bucket with onEvent method 2`] = ` "my_bucket-onupdate-OnMessageHandler-46c07356": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -2037,7 +2037,7 @@ exports[`bucket with onEvent method 2`] = ` "my_bucket-onupdate-eventHandler-9eade8f6": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -2048,7 +2048,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -2060,7 +2060,7 @@ exports[`bucket with onEvent method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -2272,7 +2272,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2285,7 +2285,7 @@ exports[`bucket with onUpdate method 2`] = ` "inflight": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -2366,7 +2366,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A pub/sub notification topic", @@ -2436,7 +2436,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -2448,7 +2448,7 @@ exports[`bucket with onUpdate method 2`] = ` "my_bucket-onupdate-OnMessageHandler-46c07356": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -2459,7 +2459,7 @@ exports[`bucket with onUpdate method 2`] = ` "my_bucket-onupdate-eventHandler-9eade8f6": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -2470,7 +2470,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -2482,7 +2482,7 @@ exports[`bucket with onUpdate method 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -2604,7 +2604,7 @@ exports[`bucket with two preflight files 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2667,7 +2667,7 @@ exports[`bucket with two preflight files 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -2679,7 +2679,7 @@ exports[`bucket with two preflight files 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -2801,7 +2801,7 @@ exports[`bucket with two preflight objects 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2864,7 +2864,7 @@ exports[`bucket with two preflight objects 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -2876,7 +2876,7 @@ exports[`bucket with two preflight objects 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -2968,7 +2968,7 @@ exports[`create a bucket 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -2999,7 +2999,7 @@ exports[`create a bucket 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -3011,7 +3011,7 @@ exports[`create a bucket 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/counter.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/counter.test.ts.snap index 5b0ebb3c38e..21d37bab3d9 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/counter.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/counter.test.ts.snap @@ -46,7 +46,7 @@ exports[`counter name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed atomic counter", @@ -76,7 +76,7 @@ exports[`counter name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -89,7 +89,7 @@ exports[`counter name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -168,7 +168,7 @@ exports[`counter with initial value 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed atomic counter", @@ -198,7 +198,7 @@ exports[`counter with initial value 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -211,7 +211,7 @@ exports[`counter with initial value 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -352,7 +352,7 @@ exports[`dec() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed atomic counter", @@ -414,7 +414,7 @@ exports[`dec() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -426,7 +426,7 @@ exports[`dec() policy statement 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -457,7 +457,7 @@ exports[`dec() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -470,7 +470,7 @@ exports[`dec() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -654,7 +654,7 @@ exports[`function with a counter binding 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed atomic counter", @@ -716,7 +716,7 @@ exports[`function with a counter binding 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -728,7 +728,7 @@ exports[`function with a counter binding 3`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -759,7 +759,7 @@ exports[`function with a counter binding 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -772,7 +772,7 @@ exports[`function with a counter binding 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -913,7 +913,7 @@ exports[`inc() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed atomic counter", @@ -975,7 +975,7 @@ exports[`inc() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -987,7 +987,7 @@ exports[`inc() policy statement 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1018,7 +1018,7 @@ exports[`inc() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1031,7 +1031,7 @@ exports[`inc() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -1172,7 +1172,7 @@ exports[`peek() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed atomic counter", @@ -1234,7 +1234,7 @@ exports[`peek() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1246,7 +1246,7 @@ exports[`peek() policy statement 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1277,7 +1277,7 @@ exports[`peek() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1290,7 +1290,7 @@ exports[`peek() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -1369,7 +1369,7 @@ exports[`replace invalid character from counter name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed atomic counter", @@ -1399,7 +1399,7 @@ exports[`replace invalid character from counter name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1412,7 +1412,7 @@ exports[`replace invalid character from counter name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -1553,7 +1553,7 @@ exports[`set() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed atomic counter", @@ -1615,7 +1615,7 @@ exports[`set() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1627,7 +1627,7 @@ exports[`set() policy statement 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1658,7 +1658,7 @@ exports[`set() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1671,7 +1671,7 @@ exports[`set() policy statement 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/function.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/function.test.ts.snap index 37462863bf1..33ff520cb0f 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/function.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/function.test.ts.snap @@ -134,7 +134,7 @@ exports[`basic function 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -146,7 +146,7 @@ exports[`basic function 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -177,7 +177,7 @@ exports[`basic function 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -190,7 +190,7 @@ exports[`basic function 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -359,7 +359,7 @@ exports[`basic function with environment variables 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -371,7 +371,7 @@ exports[`basic function with environment variables 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -402,7 +402,7 @@ exports[`basic function with environment variables 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -415,7 +415,7 @@ exports[`basic function with environment variables 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -583,7 +583,7 @@ exports[`basic function with memory size specified 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -595,7 +595,7 @@ exports[`basic function with memory size specified 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -626,7 +626,7 @@ exports[`basic function with memory size specified 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -639,7 +639,7 @@ exports[`basic function with memory size specified 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -806,7 +806,7 @@ exports[`basic function with timeout explicitly set 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -818,7 +818,7 @@ exports[`basic function with timeout explicitly set 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -849,7 +849,7 @@ exports[`basic function with timeout explicitly set 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -862,7 +862,7 @@ exports[`basic function with timeout explicitly set 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -979,7 +979,7 @@ exports[`function name valid 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1042,7 +1042,7 @@ exports[`function name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1072,7 +1072,7 @@ exports[`function name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1085,7 +1085,7 @@ exports[`function name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -1202,7 +1202,7 @@ exports[`replace invalid character from function name 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -1265,7 +1265,7 @@ exports[`replace invalid character from function name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -1295,7 +1295,7 @@ exports[`replace invalid character from function name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -1308,7 +1308,7 @@ exports[`replace invalid character from function name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/on-deploy.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/on-deploy.test.ts.snap index 4e843f231f2..8d6bd4b3086 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/on-deploy.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/on-deploy.test.ts.snap @@ -93,7 +93,7 @@ exports[`create an OnDeploy 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -124,7 +124,7 @@ exports[`create an OnDeploy 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -189,7 +189,7 @@ exports[`create an OnDeploy 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -209,7 +209,7 @@ exports[`create an OnDeploy 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "Run code during the app's deployment.", @@ -221,7 +221,7 @@ exports[`create an OnDeploy 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -366,7 +366,7 @@ exports[`execute OnDeploy after other resources 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -397,7 +397,7 @@ exports[`execute OnDeploy after other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -428,7 +428,7 @@ exports[`execute OnDeploy after other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -492,7 +492,7 @@ exports[`execute OnDeploy after other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -512,7 +512,7 @@ exports[`execute OnDeploy after other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "Run code during the app's deployment.", @@ -524,7 +524,7 @@ exports[`execute OnDeploy after other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -672,7 +672,7 @@ exports[`execute OnDeploy before other resources 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -703,7 +703,7 @@ exports[`execute OnDeploy before other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -734,7 +734,7 @@ exports[`execute OnDeploy before other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -798,7 +798,7 @@ exports[`execute OnDeploy before other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -818,7 +818,7 @@ exports[`execute OnDeploy before other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "Run code during the app's deployment.", @@ -830,7 +830,7 @@ exports[`execute OnDeploy before other resources 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/queue.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/queue.test.ts.snap index c0745d8fb77..008071ac303 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/queue.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/queue.test.ts.snap @@ -38,7 +38,7 @@ exports[`default queue behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed message queue", @@ -68,7 +68,7 @@ exports[`default queue behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -81,7 +81,7 @@ exports[`default queue behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -152,7 +152,7 @@ exports[`queue name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed message queue", @@ -182,7 +182,7 @@ exports[`queue name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -195,7 +195,7 @@ exports[`queue name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -327,7 +327,7 @@ exports[`queue with a consumer function 3`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -358,7 +358,7 @@ exports[`queue with a consumer function 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed message queue", @@ -420,7 +420,7 @@ exports[`queue with a consumer function 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -432,7 +432,7 @@ exports[`queue with a consumer function 3`] = ` "Queue-SetConsumerHandler-c5395e41": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -461,7 +461,7 @@ exports[`queue with a consumer function 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -474,7 +474,7 @@ exports[`queue with a consumer function 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -546,7 +546,7 @@ exports[`queue with custom retention 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed message queue", @@ -576,7 +576,7 @@ exports[`queue with custom retention 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -589,7 +589,7 @@ exports[`queue with custom retention 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -661,7 +661,7 @@ exports[`queue with custom timeout 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed message queue", @@ -691,7 +691,7 @@ exports[`queue with custom timeout 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -704,7 +704,7 @@ exports[`queue with custom timeout 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -775,7 +775,7 @@ exports[`replace invalid character from queue name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A distributed message queue", @@ -805,7 +805,7 @@ exports[`replace invalid character from queue name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -818,7 +818,7 @@ exports[`replace invalid character from queue name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/schedule.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/schedule.test.ts.snap index ca8105a3f9a..b8d2c527eab 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/schedule.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/schedule.test.ts.snap @@ -105,7 +105,7 @@ exports[`schedule behavior with cron 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -136,7 +136,7 @@ exports[`schedule behavior with cron 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud schedule to trigger events at regular intervals", @@ -206,7 +206,7 @@ exports[`schedule behavior with cron 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -218,7 +218,7 @@ exports[`schedule behavior with cron 2`] = ` "Schedule-OnTickHandler-c5395e41": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -247,7 +247,7 @@ exports[`schedule behavior with cron 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -260,7 +260,7 @@ exports[`schedule behavior with cron 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -398,7 +398,7 @@ exports[`schedule behavior with rate 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -429,7 +429,7 @@ exports[`schedule behavior with rate 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud schedule to trigger events at regular intervals", @@ -499,7 +499,7 @@ exports[`schedule behavior with rate 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -511,7 +511,7 @@ exports[`schedule behavior with rate 2`] = ` "Schedule-OnTickHandler-c5395e41": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -540,7 +540,7 @@ exports[`schedule behavior with rate 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -553,7 +553,7 @@ exports[`schedule behavior with rate 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -740,7 +740,7 @@ exports[`schedule with two functions 2`] = ` "Handler1": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -753,7 +753,7 @@ exports[`schedule with two functions 2`] = ` "Handler2": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -792,7 +792,7 @@ exports[`schedule with two functions 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud schedule to trigger events at regular intervals", @@ -862,7 +862,7 @@ exports[`schedule with two functions 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -932,7 +932,7 @@ exports[`schedule with two functions 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -944,7 +944,7 @@ exports[`schedule with two functions 2`] = ` "Schedule-OnTickHandler-0a615500": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -955,7 +955,7 @@ exports[`schedule with two functions 2`] = ` "Schedule-OnTickHandler-7b33bcba": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -984,7 +984,7 @@ exports[`schedule with two functions 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -997,7 +997,7 @@ exports[`schedule with two functions 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/secret.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/secret.test.ts.snap index 796409f29d7..ce206e7f242 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/secret.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/secret.test.ts.snap @@ -49,7 +49,7 @@ exports[`default secret behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud secret", @@ -79,7 +79,7 @@ exports[`default secret behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -92,7 +92,7 @@ exports[`default secret behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/table.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/table.test.ts.snap index 685d968ba38..eb2e7606ac5 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/table.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/table.test.ts.snap @@ -192,7 +192,7 @@ exports[`function with a table binding 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -204,7 +204,7 @@ exports[`function with a table binding 3`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -227,7 +227,7 @@ exports[`function with a table binding 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud NoSQL database table that can be used to store and query data", @@ -257,7 +257,7 @@ exports[`function with a table binding 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -270,7 +270,7 @@ exports[`function with a table binding 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/topic.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/topic.test.ts.snap index 2dbdc430f66..cecc3be5673 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/topic.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/topic.test.ts.snap @@ -38,7 +38,7 @@ exports[`default topic behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A pub/sub notification topic", @@ -68,7 +68,7 @@ exports[`default topic behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -81,7 +81,7 @@ exports[`default topic behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -152,7 +152,7 @@ exports[`replace invalid character from queue name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A pub/sub notification topic", @@ -182,7 +182,7 @@ exports[`replace invalid character from queue name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -195,7 +195,7 @@ exports[`replace invalid character from queue name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -266,7 +266,7 @@ exports[`topic name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A pub/sub notification topic", @@ -296,7 +296,7 @@ exports[`topic name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -309,7 +309,7 @@ exports[`topic name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -461,7 +461,7 @@ exports[`topic with subscriber function 3`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -492,7 +492,7 @@ exports[`topic with subscriber function 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A pub/sub notification topic", @@ -562,7 +562,7 @@ exports[`topic with subscriber function 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -574,7 +574,7 @@ exports[`topic with subscriber function 3`] = ` "Topic-OnMessageHandler-c5395e41": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "hidden": true, @@ -603,7 +603,7 @@ exports[`topic with subscriber function 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -616,7 +616,7 @@ exports[`topic with subscriber function 3`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/website.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/website.test.ts.snap index 5a4cf47e21e..7e637b44c4a 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/website.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/website.test.ts.snap @@ -237,7 +237,7 @@ exports[`default website behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A static website", @@ -267,7 +267,7 @@ exports[`default website behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -280,7 +280,7 @@ exports[`default website behavior 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -567,7 +567,7 @@ exports[`website with add_json 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A static website", @@ -597,7 +597,7 @@ exports[`website with add_json 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -610,7 +610,7 @@ exports[`website with add_json 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-azure/__snapshots__/bucket.test.ts.snap b/libs/wingsdk/test/target-tf-azure/__snapshots__/bucket.test.ts.snap index 3177d765aa6..9af6b06607c 100644 --- a/libs/wingsdk/test/target-tf-azure/__snapshots__/bucket.test.ts.snap +++ b/libs/wingsdk/test/target-tf-azure/__snapshots__/bucket.test.ts.snap @@ -74,7 +74,7 @@ exports[`bucket is public 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -86,7 +86,7 @@ exports[`bucket is public 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -185,7 +185,7 @@ exports[`bucket name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -205,7 +205,7 @@ exports[`bucket name valid 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -344,7 +344,7 @@ exports[`bucket with two preflight files 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -356,7 +356,7 @@ exports[`bucket with two preflight files 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -495,7 +495,7 @@ exports[`bucket with two preflight objects 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -507,7 +507,7 @@ exports[`bucket with two preflight objects 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -614,7 +614,7 @@ exports[`create a bucket 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -626,7 +626,7 @@ exports[`create a bucket 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -738,7 +738,7 @@ exports[`create multiple buckets 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -760,7 +760,7 @@ exports[`create multiple buckets 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -772,7 +772,7 @@ exports[`create multiple buckets 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-azure/__snapshots__/function.test.ts.snap b/libs/wingsdk/test/target-tf-azure/__snapshots__/function.test.ts.snap index 2d2aad8bc21..8d4083fc52b 100644 --- a/libs/wingsdk/test/target-tf-azure/__snapshots__/function.test.ts.snap +++ b/libs/wingsdk/test/target-tf-azure/__snapshots__/function.test.ts.snap @@ -124,7 +124,7 @@ exports[`basic function 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -144,7 +144,7 @@ exports[`basic function 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -156,7 +156,7 @@ exports[`basic function 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -201,7 +201,7 @@ exports[`basic function 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -360,7 +360,7 @@ exports[`basic function with environment variables 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -380,7 +380,7 @@ exports[`basic function with environment variables 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -392,7 +392,7 @@ exports[`basic function with environment variables 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -437,7 +437,7 @@ exports[`basic function with environment variables 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -558,7 +558,7 @@ exports[`replace invalid character from function name 2`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -639,7 +639,7 @@ exports[`replace invalid character from function name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -659,7 +659,7 @@ exports[`replace invalid character from function name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -671,7 +671,7 @@ exports[`replace invalid character from function name 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/target-tf-gcp/__snapshots__/bucket.test.ts.snap b/libs/wingsdk/test/target-tf-gcp/__snapshots__/bucket.test.ts.snap index bc31f676bfa..72853d9ef9e 100644 --- a/libs/wingsdk/test/target-tf-gcp/__snapshots__/bucket.test.ts.snap +++ b/libs/wingsdk/test/target-tf-gcp/__snapshots__/bucket.test.ts.snap @@ -72,7 +72,7 @@ exports[`bucket is public 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -92,7 +92,7 @@ exports[`bucket is public 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -210,7 +210,7 @@ exports[`bucket with two preflight files 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -230,7 +230,7 @@ exports[`bucket with two preflight files 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -348,7 +348,7 @@ exports[`bucket with two preflight objects 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -368,7 +368,7 @@ exports[`bucket with two preflight objects 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -458,7 +458,7 @@ exports[`create a bucket 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -478,7 +478,7 @@ exports[`create a bucket 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", @@ -577,7 +577,7 @@ exports[`two buckets 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -607,7 +607,7 @@ exports[`two buckets 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud object store", @@ -627,7 +627,7 @@ exports[`two buckets 2`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "Default", "path": "root/Default", diff --git a/libs/wingsdk/test/testing/__snapshots__/simulator.test.ts.snap b/libs/wingsdk/test/testing/__snapshots__/simulator.test.ts.snap index 351b2de2bd9..c0c6b12862f 100644 --- a/libs/wingsdk/test/testing/__snapshots__/simulator.test.ts.snap +++ b/libs/wingsdk/test/testing/__snapshots__/simulator.test.ts.snap @@ -7,7 +7,7 @@ exports[`provides raw tree data 1`] = ` "cloud.TestRunner": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A suite of APIs for running tests and collecting results.", @@ -22,7 +22,7 @@ exports[`provides raw tree data 1`] = ` "Handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud function (FaaS)", @@ -34,7 +34,7 @@ exports[`provides raw tree data 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "A cloud unit test.", @@ -46,7 +46,7 @@ exports[`provides raw tree data 1`] = ` "test.handler": { "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "display": { "description": "An inflight resource", @@ -59,7 +59,7 @@ exports[`provides raw tree data 1`] = ` }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69", + "version": "10.2.70", }, "id": "root", "path": "root", diff --git a/package.json b/package.json index 93f93476d2c..919a2a11d6f 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "private": true, "devDependencies": { "bump-pack": "workspace:^", - "turbo": "^1.10.12" + "turbo": "^1.10.13" }, "scripts": { "build": "turbo compile post-compile lint eslint test package", @@ -27,9 +27,9 @@ "@aws-sdk/is-array-buffer@3.201.0": "patches/@aws-sdk__is-array-buffer@3.201.0.patch", "@aws-sdk/util-buffer-from@3.208.0": "patches/@aws-sdk__util-buffer-from@3.208.0.patch", "jsii@5.0.11": "patches/jsii@5.0.11.patch", - "esbuild-wasm@0.18.5": "patches/esbuild-wasm@0.18.5.patch", "@aws-sdk/util-utf8-node@3.259.0": "patches/@aws-sdk__util-utf8-node@3.259.0.patch", - "@aws-sdk/util-utf8-browser@3.259.0": "patches/@aws-sdk__util-utf8-browser@3.259.0.patch" + "@aws-sdk/util-utf8-browser@3.259.0": "patches/@aws-sdk__util-utf8-browser@3.259.0.patch", + "esbuild-wasm@0.18.20": "patches/esbuild-wasm@0.18.20.patch" } } } diff --git a/patches/esbuild-wasm@0.18.5.patch b/patches/esbuild-wasm@0.18.20.patch similarity index 73% rename from patches/esbuild-wasm@0.18.5.patch rename to patches/esbuild-wasm@0.18.20.patch index db3d960d92c..cbb3d3d7c71 100644 --- a/patches/esbuild-wasm@0.18.5.patch +++ b/patches/esbuild-wasm@0.18.20.patch @@ -1,17 +1,17 @@ diff --git a/lib/main.js b/lib/main.js -index 8e02ab55097228fb228ebf84baa4f2a0a555870c..3e7ac7dcff97b67e8409044f77f627cebd98e871 100644 +index 3001b4dca248b9786aa35b5cbd9589f927758c6d..9cd981adcb53de28d68fcf9d0a1e21a12a168f64 100644 --- a/lib/main.js +++ b/lib/main.js -@@ -1926,7 +1926,7 @@ var ensureServiceIsRunning = () => { +@@ -1940,7 +1940,7 @@ var ensureServiceIsRunning = () => { let [command, args] = esbuildCommandAndArgs(); - let child = child_process.spawn(command, args.concat(`--service=${"0.18.5"}`, "--ping"), { + let child = child_process.spawn(command, args.concat(`--service=${"0.18.20"}`, "--ping"), { windowsHide: true, - stdio: ["pipe", "pipe", "inherit"], + stdio: ["pipe", "pipe", "pipe"], cwd: defaultWD }); let { readFromStdout, afterClose, service } = createChannel({ -@@ -2092,7 +2092,7 @@ error: ${text}`); +@@ -2106,7 +2106,7 @@ error: ${text}`); throw new Error(`Internal error: Expected id ${id} but got id ${id2}`); if (reject) { applyProperties(reject, properties); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ab31c751c46..2c20a43ef5b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,9 +17,9 @@ patchedDependencies: '@aws-sdk/util-utf8-node@3.259.0': hash: ip4wqmy432gtjtcha5gcn4zeu4 path: patches/@aws-sdk__util-utf8-node@3.259.0.patch - esbuild-wasm@0.18.5: - hash: t2ef2z2cxi7d6lxkcfsq2qtq3m - path: patches/esbuild-wasm@0.18.5.patch + esbuild-wasm@0.18.20: + hash: b6w4kbugtl4xi6w24tkr3hfz4y + path: patches/esbuild-wasm@0.18.20.patch jsii@5.0.11: hash: zhi5puwzi5jiulxnmqgkd4wl2a path: patches/jsii@5.0.11.patch @@ -35,14 +35,14 @@ importers: specifier: workspace:^ version: link:tools/bump-pack turbo: - specifier: ^1.10.12 - version: 1.10.12 + specifier: ^1.10.13 + version: 1.10.13 apps/jsii-docgen: dependencies: '@jsii/spec': - specifier: ^1.73.0 - version: 1.73.0 + specifier: ^1.88.0 + version: 1.88.0 case: specifier: ^1.6.3 version: 1.6.3 @@ -53,20 +53,20 @@ importers: specifier: ^8.1.0 version: 8.1.0 glob-promise: - specifier: ^6.0.2 - version: 6.0.2(glob@8.1.0) + specifier: ^6.0.3 + version: 6.0.3(glob@8.1.0) jsii-reflect: - specifier: ^1.73.0 - version: 1.73.0 + specifier: ^1.88.0 + version: 1.88.0 jsii-rosetta: - specifier: ^1.73.0 - version: 1.73.0 + specifier: ^1.88.0 + version: 1.88.0 semver: - specifier: ^7.3.8 - version: 7.5.2 + specifier: ^7.5.4 + version: 7.5.4 yargs: specifier: ^16 - version: 16.0.0 + version: 16.2.0 devDependencies: '@types/fs-extra': specifier: ^9.0.13 @@ -76,119 +76,119 @@ importers: version: 27.5.2 '@types/node': specifier: ^16 - version: 16.0.0 + version: 16.18.47 '@types/semver': - specifier: ^7.3.13 - version: 7.5.0 + specifier: ^7.5.1 + version: 7.5.1 '@types/yargs': specifier: ^16 version: 16.0.5 '@typescript-eslint/eslint-plugin': specifier: ^5 - version: 5.59.11(@typescript-eslint/parser@5.59.11)(eslint@8.42.0)(typescript@4.9.4) + version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.48.0)(typescript@4.9.5) '@typescript-eslint/parser': specifier: ^5 - version: 5.59.11(eslint@8.42.0)(typescript@4.9.4) + version: 5.62.0(eslint@8.48.0)(typescript@4.9.5) constructs: - specifier: ^10.2.5 - version: 10.2.51 + specifier: ^10.2.70 + version: 10.2.70 eslint: specifier: ^8 - version: 8.42.0 + version: 8.48.0 eslint-config-prettier: - specifier: ^8.6.0 - version: 8.8.0(eslint@8.42.0) + specifier: ^8.10.0 + version: 8.10.0(eslint@8.48.0) eslint-import-resolver-node: - specifier: ^0.3.7 - version: 0.3.7 + specifier: ^0.3.9 + version: 0.3.9 eslint-import-resolver-typescript: - specifier: ^3.5.3 - version: 3.5.5(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.42.0) + specifier: ^3.6.0 + version: 3.6.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.48.0) eslint-plugin-import: - specifier: ^2.27.5 - version: 2.27.5(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-typescript@3.5.5)(eslint@8.42.0) + specifier: ^2.28.1 + version: 2.28.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.48.0) eslint-plugin-prettier: specifier: ^4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.42.0)(prettier@2.8.8) + version: 4.2.1(eslint-config-prettier@8.10.0)(eslint@8.48.0)(prettier@2.8.8) jest: - specifier: ^27 - version: 27.0.0(ts-node@10.9.1) + specifier: ^27.5.1 + version: 27.5.1(ts-node@10.9.1) jest-junit: specifier: ^15 version: 15.0.0 jsii: specifier: ~5.0.0 - version: 5.0.11(patch_hash=zhi5puwzi5jiulxnmqgkd4wl2a) + version: 5.0.21 npm-check-updates: specifier: ^16 - version: 16.0.0 + version: 16.13.2 prettier: - specifier: ^2.8.3 + specifier: ^2.8.8 version: 2.8.8 projen: - specifier: ^0.71.60 - version: 0.71.60 + specifier: ^0.71.163 + version: 0.71.163 ts-jest: - specifier: ^27 - version: 27.0.0(jest@27.0.0)(typescript@4.9.4) + specifier: ^27.1.5 + version: 27.1.5(@babel/core@7.22.11)(@types/jest@27.5.2)(jest@27.5.1)(typescript@4.9.5) ts-node: specifier: ^10.9.1 - version: 10.9.1(@types/node@16.0.0)(typescript@4.9.4) + version: 10.9.1(@types/node@16.18.47)(typescript@4.9.5) typescript: - specifier: ~4.9.4 - version: 4.9.4 + specifier: ~4.9.5 + version: 4.9.5 apps/jsii-docgen/test/__fixtures__/libraries/construct-library: dependencies: '@aws-cdk/aws-events': - specifier: ^1.110.1 - version: 1.110.1(@aws-cdk/aws-iam@1.110.1)(@aws-cdk/core@1.110.1)(constructs@3.3.69) + specifier: ^1.204.0 + version: 1.204.0(@aws-cdk/aws-iam@1.204.0)(@aws-cdk/core@1.204.0)(constructs@3.4.344) '@aws-cdk/aws-iam': - specifier: ^1.110.1 - version: 1.110.1(@aws-cdk/core@1.110.1)(@aws-cdk/region-info@1.110.1)(constructs@3.3.69) + specifier: ^1.204.0 + version: 1.204.0(@aws-cdk/cloud-assembly-schema@1.204.0)(@aws-cdk/core@1.204.0)(@aws-cdk/region-info@1.204.0)(constructs@3.4.344) '@aws-cdk/aws-kms': - specifier: ^1.110.1 - version: 1.110.1(@aws-cdk/aws-iam@1.110.1)(@aws-cdk/core@1.110.1)(@aws-cdk/cx-api@1.110.1)(constructs@3.3.69) + specifier: ^1.204.0 + version: 1.204.0(@aws-cdk/aws-iam@1.204.0)(@aws-cdk/cloud-assembly-schema@1.204.0)(@aws-cdk/core@1.204.0)(@aws-cdk/cx-api@1.204.0)(constructs@3.4.344) '@aws-cdk/aws-s3': - specifier: ^1.110.1 - version: 1.110.1(@aws-cdk/aws-events@1.110.1)(@aws-cdk/aws-iam@1.110.1)(@aws-cdk/aws-kms@1.110.1)(@aws-cdk/core@1.110.1)(@aws-cdk/cx-api@1.110.1)(constructs@3.3.69) + specifier: ^1.204.0 + version: 1.204.0(@aws-cdk/aws-events@1.204.0)(@aws-cdk/aws-iam@1.204.0)(@aws-cdk/aws-kms@1.204.0)(@aws-cdk/core@1.204.0)(@aws-cdk/cx-api@1.204.0)(constructs@3.4.344) '@aws-cdk/cloud-assembly-schema': - specifier: ^1.110.1 - version: 1.110.1 + specifier: ^1.204.0 + version: 1.204.0 '@aws-cdk/core': - specifier: ^1.110.1 - version: 1.110.1(@aws-cdk/cloud-assembly-schema@1.110.1)(@aws-cdk/cx-api@1.110.1)(@aws-cdk/region-info@1.110.1)(constructs@3.3.69) + specifier: ^1.204.0 + version: 1.204.0(@aws-cdk/cloud-assembly-schema@1.204.0)(@aws-cdk/cx-api@1.204.0)(@aws-cdk/region-info@1.204.0)(constructs@3.4.344) constructs: - specifier: ^3.3.69 - version: 3.3.69 + specifier: ^3.4.344 + version: 3.4.344 devDependencies: '@types/node': - specifier: ^18.0.0 - version: 18.16.18 + specifier: ^18.17.13 + version: 18.17.13 '@types/prettier': specifier: 2.6.0 version: 2.6.0 jsii: - specifier: ~5.0.0 - version: 5.0.11(patch_hash=zhi5puwzi5jiulxnmqgkd4wl2a) + specifier: ~5.0.21 + version: 5.0.21 typescript: - specifier: ^4.3.4 - version: 4.9.4 + specifier: ^4.9.5 + version: 4.9.5 apps/vscode-wing: devDependencies: '@trpc/client': - specifier: ^10.30.0 - version: 10.30.0(@trpc/server@10.30.0) + specifier: ^10.38.1 + version: 10.38.1(@trpc/server@10.38.1) '@types/node': specifier: ^16 - version: 16.0.0 + version: 16.18.23 '@types/node-fetch': specifier: ^2.6.4 version: 2.6.4 '@types/vscode': specifier: ^1.70.0 - version: 1.70.0 + version: 1.81.0 '@types/which': specifier: ^2.0.2 version: 2.0.2 @@ -197,13 +197,13 @@ importers: version: 8.5.5 '@typescript-eslint/eslint-plugin': specifier: ^5 - version: 5.59.11(@typescript-eslint/parser@5.59.11)(eslint@8.42.0)(typescript@4.9.4) + version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.48.0)(typescript@4.9.5) '@typescript-eslint/parser': specifier: ^5 - version: 5.59.11(eslint@8.42.0)(typescript@4.9.4) + version: 5.62.0(eslint@8.48.0)(typescript@4.9.5) '@vscode/vsce': - specifier: ^2.16.0 - version: 2.16.0 + specifier: ^2.21.0 + version: 2.21.0 '@wingconsole/app': specifier: workspace:^ version: link:../wing-console/console/app @@ -212,49 +212,49 @@ importers: version: link:../wing-console/console/server eslint: specifier: ^8 - version: 8.42.0 + version: 8.48.0 eslint-config-prettier: - specifier: ^8.6.0 - version: 8.8.0(eslint@8.42.0) + specifier: ^8.10.0 + version: 8.10.0(eslint@8.48.0) eslint-import-resolver-node: - specifier: ^0.3.7 - version: 0.3.7 + specifier: ^0.3.9 + version: 0.3.9 eslint-import-resolver-typescript: - specifier: ^3.5.3 - version: 3.5.5(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.42.0) + specifier: ^3.6.0 + version: 3.6.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.48.0) eslint-plugin-import: - specifier: ^2.27.5 - version: 2.27.5(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-typescript@3.5.5)(eslint@8.42.0) + specifier: ^2.28.1 + version: 2.28.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.48.0) eslint-plugin-prettier: specifier: ^4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.42.0)(prettier@2.8.8) + version: 4.2.1(eslint-config-prettier@8.10.0)(eslint@8.48.0)(prettier@2.8.8) node-fetch: specifier: '2' - version: 2.6.12 + version: 2.7.0 npm-check-updates: specifier: ^16 - version: 16.0.0 + version: 16.13.2 open: - specifier: ^8.4.0 - version: 8.4.0 + specifier: ^8.4.2 + version: 8.4.2 prettier: - specifier: ^2.8.3 + specifier: ^2.8.8 version: 2.8.8 projen: - specifier: ^0.71.60 - version: 0.71.60 + specifier: ^0.71.163 + version: 0.71.163 ts-node: specifier: ^10.9.1 - version: 10.9.1(@types/node@16.0.0)(typescript@4.9.4) + version: 10.9.1(@types/node@16.18.23)(typescript@4.9.5) tsup: specifier: ^6.7.0 - version: 6.7.0(ts-node@10.9.1)(typescript@4.9.4) + version: 6.7.0(ts-node@10.9.1)(typescript@4.9.5) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^4.9.5 + version: 4.9.5 vscode-languageclient: - specifier: ^8.0.2 - version: 8.0.2 + specifier: ^8.1.0 + version: 8.1.0 which: specifier: ^1.3.1 version: 1.3.1 @@ -268,8 +268,8 @@ importers: apps/wing: dependencies: '@segment/analytics-node': - specifier: ^1.0.0 - version: 1.0.0 + specifier: ^1.1.0 + version: 1.1.0 '@wingconsole/app': specifier: workspace:^ version: link:../wing-console/console/app @@ -289,8 +289,8 @@ importers: specifier: 0.4.0 version: 0.4.0 commander: - specifier: ^10.0.0 - version: 10.0.0 + specifier: ^10.0.1 + version: 10.0.1 compare-versions: specifier: ^5.0.3 version: 5.0.3 @@ -301,36 +301,36 @@ importers: specifier: ^3.3.6 version: 3.3.6 open: - specifier: ^8.4.0 - version: 8.4.0 + specifier: ^8.4.2 + version: 8.4.2 ora: specifier: ^5.4.1 version: 5.4.1 tiny-updater: - specifier: ^3.4.0 - version: 3.4.0 + specifier: ^3.5.1 + version: 3.5.1 uuid: specifier: ^8.3.2 version: 8.3.2 vscode-languageserver: - specifier: ^8.0.2 - version: 8.0.2 + specifier: ^8.1.0 + version: 8.1.0 devDependencies: '@types/debug': - specifier: ^4.1.7 - version: 4.1.7 + specifier: ^4.1.8 + version: 4.1.8 '@types/node': - specifier: ^18.11.18 - version: 18.16.18 + specifier: ^18.17.13 + version: 18.17.13 '@types/node-persist': - specifier: ^3.1.3 - version: 3.1.3 + specifier: ^3.1.4 + version: 3.1.4 '@types/semver-utils': specifier: ^1.1.1 version: 1.1.1 '@types/uuid': - specifier: ^8.3.2 - version: 8.3.2 + specifier: ^8.3.4 + version: 8.3.4 bump-pack: specifier: workspace:^ version: link:../../tools/bump-pack @@ -338,8 +338,8 @@ importers: specifier: ^0.17.19 version: 0.17.19 typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^4.9.5 + version: 4.9.5 vitest: specifier: ^0.30.1 version: 0.30.1 @@ -353,81 +353,81 @@ importers: specifier: ^3.5.3 version: 3.5.3 glob-promise: - specifier: ^6.0.2 - version: 6.0.2(glob@8.1.0) + specifier: ^6.0.3 + version: 6.0.3(glob@8.1.0) jsii-reflect: - specifier: ^1.73.0 - version: 1.73.0 + specifier: ^1.88.0 + version: 1.88.0 yargs: - specifier: ^17.6.2 - version: 17.6.2 + specifier: ^17.7.2 + version: 17.7.2 devDependencies: '@types/jest': - specifier: ^29.2.6 - version: 29.2.6 + specifier: ^29.5.4 + version: 29.5.4 '@types/node': specifier: ^16 - version: 16.0.0 + version: 16.18.47 '@types/yargs': specifier: ^16.0.5 version: 16.0.5 '@typescript-eslint/eslint-plugin': specifier: ^5 - version: 5.59.11(@typescript-eslint/parser@5.59.11)(eslint@8.42.0)(typescript@4.9.4) + version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.48.0)(typescript@4.9.5) '@typescript-eslint/parser': specifier: ^5 - version: 5.59.11(eslint@8.42.0)(typescript@4.9.4) + version: 5.62.0(eslint@8.48.0)(typescript@4.9.5) eslint: specifier: ^8 - version: 8.42.0 + version: 8.48.0 eslint-config-prettier: - specifier: ^8.6.0 - version: 8.8.0(eslint@8.42.0) + specifier: ^8.10.0 + version: 8.10.0(eslint@8.48.0) eslint-import-resolver-node: - specifier: ^0.3.7 - version: 0.3.7 + specifier: ^0.3.9 + version: 0.3.9 eslint-import-resolver-typescript: - specifier: ^3.5.3 - version: 3.5.5(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.42.0) + specifier: ^3.6.0 + version: 3.6.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.48.0) eslint-plugin-import: - specifier: ^2.27.5 - version: 2.27.5(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-typescript@3.5.5)(eslint@8.42.0) + specifier: ^2.28.1 + version: 2.28.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.48.0) eslint-plugin-prettier: specifier: ^4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.42.0)(prettier@2.8.8) + version: 4.2.1(eslint-config-prettier@8.10.0)(eslint@8.48.0)(prettier@2.8.8) jest: - specifier: ^29.3.1 - version: 29.3.1(@types/node@16.0.0)(ts-node@10.9.1) + specifier: ^29.6.4 + version: 29.6.4(@types/node@16.18.47)(ts-node@10.9.1) jest-junit: specifier: ^15 version: 15.0.0 npm-check-updates: specifier: ^16 - version: 16.0.0 + version: 16.13.2 prettier: - specifier: ^2.8.3 + specifier: ^2.8.8 version: 2.8.8 projen: - specifier: ^0.71.60 - version: 0.71.60 + specifier: ^0.71.163 + version: 0.71.163 standard-version: specifier: ^9 - version: 9.0.0 + version: 9.5.0 ts-jest: - specifier: ^29.0.5 - version: 29.0.5(@babel/core@7.22.5)(jest@29.3.1)(typescript@4.9.4) + specifier: ^29.1.1 + version: 29.1.1(@babel/core@7.22.11)(jest@29.6.4)(typescript@4.9.5) ts-node: specifier: ^10.9.1 - version: 10.9.1(@types/node@16.0.0)(typescript@4.9.4) + version: 10.9.1(@types/node@16.18.47)(typescript@4.9.5) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^4.9.5 + version: 4.9.5 apps/wing-console/console/app: dependencies: '@segment/analytics-node': - specifier: ^1.0.0 - version: 1.0.0 + specifier: ^1.1.0 + version: 1.1.0 '@wingconsole/server': specifier: workspace:^ version: link:../server @@ -439,26 +439,26 @@ importers: specifier: ^6.3.0 version: 6.3.0 '@playwright/test': - specifier: ^1.35.1 - version: 1.35.1 + specifier: ^1.37.1 + version: 1.37.1 '@tailwindcss/forms': specifier: ^0.5.3 - version: 0.5.3(tailwindcss@3.3.2) + version: 0.5.3(tailwindcss@3.3.3) '@types/express': specifier: ^4.17.17 version: 4.17.17 '@types/react': - specifier: ^18.2.12 - version: 18.2.12 + specifier: ^18.2.21 + version: 18.2.21 '@types/react-dom': - specifier: ^18.2.5 - version: 18.2.5 + specifier: ^18.2.7 + version: 18.2.7 '@vitejs/plugin-react': - specifier: ^4.0.0 - version: 4.0.0(vite@4.3.9) + specifier: ^4.0.4 + version: 4.0.4(vite@4.4.9) '@vitest/coverage-c8': specifier: ^0.31.4 - version: 0.31.4(vitest@0.32.2) + version: 0.31.4(vitest@0.32.4) '@wingconsole/eslint-plugin': specifier: workspace:^ version: link:../../tools/eslint-plugin @@ -469,17 +469,17 @@ importers: specifier: workspace:^ version: link:../ui autoprefixer: - specifier: ^10.4.14 - version: 10.4.14(postcss@8.4.24) + specifier: ^10.4.15 + version: 10.4.15(postcss@8.4.29) bump-pack: specifier: workspace:^ version: link:../../../../tools/bump-pack conf: - specifier: ^11.0.1 - version: 11.0.1 + specifier: ^11.0.2 + version: 11.0.2 eslint: - specifier: ^8.42.0 - version: 8.42.0 + specifier: ^8.48.0 + version: 8.48.0 nanoid: specifier: ^4.0.2 version: 4.0.2 @@ -493,26 +493,26 @@ importers: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) tailwindcss: - specifier: ^3.3.2 - version: 3.3.2 + specifier: ^3.3.3 + version: 3.3.3 tsup: specifier: ^6.7.0 - version: 6.7.0(postcss@8.4.24)(typescript@5.1.3) + version: 6.7.0(postcss@8.4.29)(typescript@5.2.2) tsx: - specifier: ^3.12.7 - version: 3.12.7 + specifier: ^3.12.8 + version: 3.12.8 typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 vite: - specifier: ^4.3.9 - version: 4.3.9(@types/node@18.16.18) + specifier: ^4.4.9 + version: 4.4.9(@types/node@18.17.13) apps/wing-console/console/design-system: dependencies: '@headlessui/react': - specifier: ^1.7.15 - version: 1.7.15(react-dom@18.2.0)(react@18.2.0) + specifier: ^1.7.17 + version: 1.7.17(react-dom@18.2.0)(react@18.2.0) '@heroicons/react': specifier: ^2.0.18 version: 2.0.18(react@18.2.0) @@ -521,7 +521,7 @@ importers: version: 2.11.8 '@tailwindcss/forms': specifier: ^0.5.3 - version: 0.5.3(tailwindcss@3.3.2) + version: 0.5.3(tailwindcss@3.3.3) classnames: specifier: ^2.3.2 version: 2.3.2 @@ -541,15 +541,15 @@ importers: specifier: ^2.3.0 version: 2.3.0(@popperjs/core@2.11.8)(react-dom@18.2.0)(react@18.2.0) tailwindcss: - specifier: ^3.3.2 - version: 3.3.2 + specifier: ^3.3.3 + version: 3.3.3 devDependencies: '@babel/core': - specifier: ^7.22.5 - version: 7.22.5 + specifier: ^7.22.11 + version: 7.22.11 '@storybook/react': - specifier: ^7.0.20 - version: 7.0.20(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.3) + specifier: ^7.4.0 + version: 7.4.0(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2) '@testing-library/react': specifier: ^14.0.0 version: 14.0.0(react-dom@18.2.0)(react@18.2.0) @@ -557,14 +557,14 @@ importers: specifier: ^4.5.7 version: 4.5.7 '@types/react': - specifier: ^18.2.12 - version: 18.2.12 + specifier: ^18.2.21 + version: 18.2.21 '@types/react-dom': - specifier: ^18.2.5 - version: 18.2.5 + specifier: ^18.2.7 + version: 18.2.7 '@vitejs/plugin-react': - specifier: ^4.0.0 - version: 4.0.0(vite@4.3.9) + specifier: ^4.0.4 + version: 4.0.4(vite@4.4.9) '@vitest/coverage-c8': specifier: ^0.31.4 version: 0.31.4(vitest@0.31.4) @@ -578,26 +578,26 @@ importers: specifier: workspace:^ version: link:../../../../tools/bump-pack eslint: - specifier: ^8.42.0 - version: 8.42.0 + specifier: ^8.48.0 + version: 8.48.0 happy-dom: specifier: ^9.20.3 version: 9.20.3 tsup: - specifier: ^7.1.0 - version: 7.1.0(postcss@8.4.24)(typescript@5.1.3) + specifier: ^7.2.0 + version: 7.2.0(postcss@8.4.29)(typescript@5.2.2) typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 vite: - specifier: ^4.3.9 - version: 4.3.9(@types/node@18.16.18) + specifier: ^4.4.9 + version: 4.4.9(@types/node@18.17.13) vitest: specifier: ^0.31.4 version: 0.31.4(happy-dom@9.20.3) webpack: - specifier: ^5.86.0 - version: 5.86.0(esbuild@0.18.10) + specifier: ^5.88.2 + version: 5.88.2(esbuild@0.18.20) apps/wing-console/console/server: dependencies: @@ -618,8 +618,8 @@ importers: version: 2.1.3 devDependencies: '@trpc/server': - specifier: ^10.30.0 - version: 10.30.0 + specifier: ^10.38.1 + version: 10.38.1 '@types/cors': specifier: ^2.8.13 version: 2.8.13 @@ -651,11 +651,11 @@ importers: specifier: ^3.5.3 version: 3.5.3 conf: - specifier: ^11.0.1 - version: 11.0.1 + specifier: ^11.0.2 + version: 11.0.2 constructs: - specifier: ^10.2.51 - version: 10.2.51 + specifier: ^10.2.70 + version: 10.2.70 cors: specifier: ^2.8.5 version: 2.8.5 @@ -666,8 +666,8 @@ importers: specifier: ^0.1.7 version: 0.1.7(esbuild@0.15.18) eslint: - specifier: ^8.42.0 - version: 8.42.0 + specifier: ^8.48.0 + version: 8.48.0 express: specifier: ^4.18.2 version: 4.18.2 @@ -681,17 +681,17 @@ importers: specifier: ^4.0.2 version: 4.0.2 node-fetch: - specifier: ^3.3.1 - version: 3.3.1 + specifier: ^3.3.2 + version: 3.3.2 redis: - specifier: ^4.6.7 - version: 4.6.7 + specifier: ^4.6.8 + version: 4.6.8 tsup: specifier: ^6.7.0 - version: 6.7.0(postcss@8.4.24)(typescript@5.1.3) + version: 6.7.0(postcss@8.4.29)(typescript@5.2.2) typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 vitest: specifier: ^0.31.4 version: 0.31.4(happy-dom@9.20.3) @@ -699,14 +699,14 @@ importers: specifier: ^8.13.0 version: 8.13.0 zod: - specifier: ^3.21.4 - version: 3.21.4 + specifier: ^3.22.2 + version: 3.22.2 apps/wing-console/console/ui: dependencies: '@headlessui/react': - specifier: ^1.7.15 - version: 1.7.15(react-dom@18.2.0)(react@18.2.0) + specifier: ^1.7.17 + version: 1.7.17(react-dom@18.2.0)(react@18.2.0) '@heroicons/react': specifier: ^2.0.18 version: 2.0.18(react@18.2.0) @@ -714,17 +714,17 @@ importers: specifier: ^2.11.8 version: 2.11.8 '@tanstack/react-query': - specifier: ^4.29.12 - version: 4.29.12(react-dom@18.2.0)(react@18.2.0) + specifier: ^4.33.0 + version: 4.33.0(react-dom@18.2.0)(react@18.2.0) '@trpc/client': - specifier: ^10.30.0 - version: 10.30.0(@trpc/server@10.30.0) + specifier: ^10.38.1 + version: 10.38.1(@trpc/server@10.38.1) '@trpc/react-query': - specifier: ^10.30.0 - version: 10.30.0(@tanstack/react-query@4.29.12)(@trpc/client@10.30.0)(@trpc/server@10.30.0)(react-dom@18.2.0)(react@18.2.0) + specifier: ^10.38.1 + version: 10.38.1(@tanstack/react-query@4.33.0)(@trpc/client@10.38.1)(@trpc/server@10.38.1)(react-dom@18.2.0)(react@18.2.0) '@trpc/server': - specifier: ^10.30.0 - version: 10.30.0 + specifier: ^10.38.1 + version: 10.38.1 '@wingconsole/design-system': specifier: workspace:^ version: link:../design-system @@ -741,8 +741,8 @@ importers: specifier: ^0.8.2 version: 0.8.2 framer-motion: - specifier: ^10.12.16 - version: 10.12.16(react-dom@18.2.0)(react@18.2.0) + specifier: ^10.16.2 + version: 10.16.2(react-dom@18.2.0)(react@18.2.0) jszip: specifier: ^3.10.1 version: 3.10.1 @@ -765,30 +765,30 @@ importers: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) zod: - specifier: ^3.21.4 - version: 3.21.4 + specifier: ^3.22.2 + version: 3.22.2 devDependencies: '@babel/core': - specifier: ^7.22.5 - version: 7.22.5 + specifier: ^7.22.11 + version: 7.22.11 '@storybook/addon-essentials': - specifier: ^7.0.20 - version: 7.0.20(react-dom@18.2.0)(react@18.2.0) + specifier: ^7.4.0 + version: 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@storybook/addon-interactions': - specifier: ^7.0.20 - version: 7.0.20(react-dom@18.2.0)(react@18.2.0) + specifier: ^7.4.0 + version: 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@storybook/addon-links': - specifier: ^7.0.20 - version: 7.0.20(react-dom@18.2.0)(react@18.2.0) + specifier: ^7.4.0 + version: 7.4.0(react-dom@18.2.0)(react@18.2.0) '@storybook/blocks': - specifier: ^7.0.20 - version: 7.0.20(react-dom@18.2.0)(react@18.2.0) + specifier: ^7.4.0 + version: 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@storybook/react': - specifier: ^7.0.20 - version: 7.0.20(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.3) + specifier: ^7.4.0 + version: 7.4.0(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2) '@storybook/react-vite': - specifier: ^7.0.20 - version: 7.0.20(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.3)(vite@4.3.9) + specifier: ^7.4.0 + version: 7.4.0(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2)(vite@4.4.9) '@storybook/testing-library': specifier: ^0.1.0 version: 0.1.0 @@ -796,11 +796,11 @@ importers: specifier: ^2.8.13 version: 2.8.13 '@types/d3-selection': - specifier: ^3.0.5 - version: 3.0.5 + specifier: ^3.0.6 + version: 3.0.6 '@types/d3-zoom': - specifier: ^3.0.3 - version: 3.0.3 + specifier: ^3.0.4 + version: 3.0.4 '@types/lodash.debounce': specifier: ^4.0.7 version: 4.0.7 @@ -811,14 +811,14 @@ importers: specifier: ^4.7.7 version: 4.7.7 '@types/react': - specifier: ^18.2.12 - version: 18.2.12 + specifier: ^18.2.21 + version: 18.2.21 '@types/react-dom': - specifier: ^18.2.5 - version: 18.2.5 + specifier: ^18.2.7 + version: 18.2.7 '@vitejs/plugin-react-swc': specifier: ^3.3.2 - version: 3.3.2(vite@4.3.9) + version: 3.3.2(vite@4.4.9) '@wingconsole/eslint-plugin': specifier: workspace:^ version: link:../../tools/eslint-plugin @@ -832,38 +832,38 @@ importers: specifier: workspace:^ version: link:../../packages/use-loading autoprefixer: - specifier: ^10.4.14 - version: 10.4.14(postcss@8.4.24) + specifier: ^10.4.15 + version: 10.4.15(postcss@8.4.29) bump-pack: specifier: workspace:^ version: link:../../../../tools/bump-pack eslint: - specifier: ^8.42.0 - version: 8.42.0 + specifier: ^8.48.0 + version: 8.48.0 react-markdown: specifier: ^8.0.7 - version: 8.0.7(@types/react@18.2.12)(react@18.2.0) + version: 8.0.7(@types/react@18.2.21)(react@18.2.0) storybook: - specifier: ^7.0.20 - version: 7.0.20 + specifier: ^7.4.0 + version: 7.4.0 tailwindcss: - specifier: ^3.3.2 - version: 3.3.2 + specifier: ^3.3.3 + version: 3.3.3 tsup: specifier: ^6.7.0 - version: 6.7.0(postcss@8.4.24)(typescript@5.1.3) + version: 6.7.0(postcss@8.4.29)(typescript@5.2.2) typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 vite: - specifier: ^4.3.9 - version: 4.3.9(@types/node@18.16.18) + specifier: ^4.4.9 + version: 4.4.9(@types/node@18.17.13) vitest: specifier: ^0.31.4 version: 0.31.4(happy-dom@9.20.3) webpack: - specifier: ^5.86.0 - version: 5.86.0(esbuild@0.17.19) + specifier: ^5.88.2 + version: 5.88.2(esbuild@0.17.19) apps/wing-console/packages/error-message: devDependencies: @@ -874,14 +874,14 @@ importers: specifier: workspace:^ version: link:../../tools/tsconfig typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 apps/wing-console/packages/use-loading: devDependencies: '@types/react': - specifier: ^18.2.12 - version: 18.2.12 + specifier: ^18.2.21 + version: 18.2.21 '@wingconsole/eslint-plugin': specifier: workspace:^ version: link:../../tools/eslint-plugin @@ -889,63 +889,63 @@ importers: specifier: workspace:^ version: link:../../tools/tsconfig typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 apps/wing-console/tools/eslint-plugin: dependencies: '@cloudy-ts/eslint-plugin': specifier: ^0.0.260 - version: 0.0.260(eslint@8.42.0) + version: 0.0.260(eslint@8.48.0) '@typescript-eslint/eslint-plugin': - specifier: ^5.59.11 - version: 5.59.11(@typescript-eslint/parser@5.59.11)(eslint@8.42.0)(typescript@5.1.3) + specifier: ^5.62.0 + version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.48.0)(typescript@5.2.2) '@typescript-eslint/parser': - specifier: ^5.59.11 - version: 5.59.11(eslint@8.42.0)(typescript@5.1.3) + specifier: ^5.62.0 + version: 5.62.0(eslint@8.48.0)(typescript@5.2.2) eslint-config-prettier: - specifier: ^8.8.0 - version: 8.8.0(eslint@8.42.0) + specifier: ^8.10.0 + version: 8.10.0(eslint@8.48.0) eslint-import-resolver-node: - specifier: ^0.3.7 - version: 0.3.7 + specifier: ^0.3.9 + version: 0.3.9 eslint-import-resolver-typescript: - specifier: ^3.5.5 - version: 3.5.5(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.42.0) + specifier: ^3.6.0 + version: 3.6.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.48.0) eslint-plugin-import: - specifier: ^2.27.5 - version: 2.27.5(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-typescript@3.5.5)(eslint@8.42.0) + specifier: ^2.28.1 + version: 2.28.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.48.0) eslint-plugin-jsx-a11y: specifier: ^6.7.1 - version: 6.7.1(eslint@8.42.0) + version: 6.7.1(eslint@8.48.0) eslint-plugin-prettier: specifier: ^4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.42.0)(prettier@2.8.8) + version: 4.2.1(eslint-config-prettier@8.10.0)(eslint@8.48.0)(prettier@2.8.8) eslint-plugin-react: - specifier: ^7.32.2 - version: 7.32.2(eslint@8.42.0) + specifier: ^7.33.2 + version: 7.33.2(eslint@8.48.0) eslint-plugin-react-hooks: specifier: ^4.6.0 - version: 4.6.0(eslint@8.42.0) + version: 4.6.0(eslint@8.48.0) eslint-plugin-unicorn: specifier: ^47.0.0 - version: 47.0.0(eslint@8.42.0) + version: 47.0.0(eslint@8.48.0) devDependencies: eslint: - specifier: ^8.42.0 - version: 8.42.0 + specifier: ^8.48.0 + version: 8.48.0 prettier: specifier: ^2.8.8 version: 2.8.8 typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 apps/wing-console/tools/tsconfig: devDependencies: typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 examples/tests/error: {} @@ -953,10 +953,10 @@ importers: dependencies: cdktf: specifier: 0.17.0 - version: 0.17.0(constructs@10.2.51) + version: 0.17.0(constructs@10.2.70) constructs: - specifier: ^10 - version: 10.2.51 + specifier: ^10.2.70 + version: 10.2.70 jsii-code-samples: specifier: 1.7.0 version: 1.7.0 @@ -973,41 +973,41 @@ importers: examples/tests/valid: dependencies: '@aws-cdk/asset-awscli-v1': - specifier: ^2.2.199 - version: 2.2.199 + specifier: ^2.2.200 + version: 2.2.200 '@aws-cdk/asset-kubectl-v20': specifier: ^2.1.2 version: 2.1.2 - '@aws-cdk/asset-node-proxy-agent-v5': - specifier: ^2.0.165 - version: 2.0.165 + '@aws-cdk/asset-node-proxy-agent-v6': + specifier: ^2.0.1 + version: 2.0.1 '@aws-sdk/client-dynamodb': - specifier: ^3.344.0 - version: 3.354.0 + specifier: ^3.405.0 + version: 3.405.0 '@cdktf/provider-aws': specifier: ^15.0.0 - version: 15.0.0(cdktf@0.17.0)(constructs@10.2.51) + version: 15.0.0(cdktf@0.17.0)(constructs@10.2.70) aws-cdk-lib: - specifier: ^2.64.0 - version: 2.64.0(constructs@10.2.51) + specifier: ^2.94.0 + version: 2.94.0(constructs@10.2.70) cdk8s: - specifier: ^2.60.0 - version: 2.60.0(constructs@10.2.51) + specifier: ^2.64.2 + version: 2.64.2(constructs@10.2.70) cdk8s-plus-27: - specifier: ^2.7.0 - version: 2.7.0(cdk8s@2.60.0)(constructs@10.2.51) + specifier: ^2.7.1 + version: 2.7.1(cdk8s@2.64.2)(constructs@10.2.70) cdktf: specifier: 0.17.0 - version: 0.17.0(constructs@10.2.51) + version: 0.17.0(constructs@10.2.70) constructs: - specifier: ^10 - version: 10.2.51 + specifier: ^10.2.70 + version: 10.2.70 jsii-code-samples: specifier: 1.7.0 version: 1.7.0 projen: - specifier: ^0.71.60 - version: 0.71.60 + specifier: ^0.71.163 + version: 0.71.163 uuid: specifier: ^9.0.0 version: 9.0.0 @@ -1015,12 +1015,12 @@ importers: libs/tree-sitter-wing: dependencies: nan: - specifier: ^2.12.1 - version: 2.12.1 + specifier: ^2.17.0 + version: 2.17.0 devDependencies: nodemon: - specifier: ^2.0.22 - version: 2.0.22 + specifier: ^3.0.1 + version: 3.0.1 tree-sitter-cli: specifier: 0.20.6 version: 0.20.6 @@ -1047,8 +1047,8 @@ importers: version: 1.7.3(patch_hash=rmwvp46j2ligfusbdx5dzh4a3q) devDependencies: '@types/node': - specifier: ^18.11.18 - version: 18.16.18 + specifier: ^18.17.13 + version: 18.17.13 '@winglang/wingc': specifier: workspace:^ version: link:../wingc @@ -1057,10 +1057,10 @@ importers: version: link:../../tools/bump-pack tsup: specifier: ^6.7.0 - version: 6.7.0(typescript@4.9.4) + version: 6.7.0(typescript@4.9.5) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^4.9.5 + version: 4.9.5 vitest: specifier: ^0.30.1 version: 0.30.1 @@ -1070,41 +1070,41 @@ importers: libs/wingsdk: dependencies: '@aws-sdk/client-cloudwatch-logs': - specifier: 3.354.0 - version: 3.354.0 + specifier: 3.405.0 + version: 3.405.0 '@aws-sdk/client-dynamodb': - specifier: 3.354.0 - version: 3.354.0 + specifier: 3.405.0 + version: 3.405.0 '@aws-sdk/client-elasticache': - specifier: 3.354.0 - version: 3.354.0 + specifier: 3.405.0 + version: 3.405.0 '@aws-sdk/client-lambda': - specifier: 3.354.0 - version: 3.354.0 + specifier: 3.405.0 + version: 3.405.0 '@aws-sdk/client-s3': - specifier: 3.354.0 - version: 3.354.0 + specifier: 3.405.0 + version: 3.405.0 '@aws-sdk/client-secrets-manager': - specifier: 3.354.0 - version: 3.354.0 + specifier: 3.405.0 + version: 3.405.0 '@aws-sdk/client-sns': - specifier: 3.354.0 - version: 3.354.0 + specifier: 3.405.0 + version: 3.405.0 '@aws-sdk/client-sqs': - specifier: 3.354.0 - version: 3.354.0 + specifier: 3.405.0 + version: 3.405.0 '@aws-sdk/is-array-buffer': specifier: 3.201.0 version: 3.201.0(patch_hash=lcduyc25etdvbxthpjpldc7hvu) '@aws-sdk/types': - specifier: 3.347.0 - version: 3.347.0 + specifier: 3.398.0 + version: 3.398.0 '@aws-sdk/util-buffer-from': specifier: 3.208.0 version: 3.208.0(patch_hash=2u2tbs2t5afqejrdyi43ufdqau) '@aws-sdk/util-dynamodb': - specifier: 3.354.0 - version: 3.354.0 + specifier: 3.405.0 + version: 3.405.0 '@aws-sdk/util-stream-node': specifier: 3.350.0 version: 3.350.0 @@ -1112,8 +1112,8 @@ importers: specifier: 3.259.0 version: 3.259.0(patch_hash=ip4wqmy432gtjtcha5gcn4zeu4) '@azure/core-paging': - specifier: ^1.4.0 - version: 1.4.0 + specifier: ^1.5.0 + version: 1.5.0 '@azure/identity': specifier: 3.1.3 version: 3.1.3 @@ -1121,29 +1121,29 @@ importers: specifier: 12.14.0 version: 12.14.0 '@types/aws-lambda': - specifier: ^8.10.109 - version: 8.10.109 + specifier: ^8.10.119 + version: 8.10.119 aws-cdk-lib: specifier: ^2.64.0 - version: 2.64.0(constructs@10.2.69) + version: 2.94.0(constructs@10.2.70) cdktf: specifier: 0.17.0 - version: 0.17.0(constructs@10.2.69) + version: 0.17.0(constructs@10.2.70) constructs: specifier: ~10.2.69 - version: 10.2.69 + version: 10.2.70 cron-parser: - specifier: ^4.8.1 - version: 4.8.1 + specifier: ^4.9.0 + version: 4.9.0 esbuild-wasm: - specifier: ^0.18.5 - version: 0.18.5(patch_hash=t2ef2z2cxi7d6lxkcfsq2qtq3m) + specifier: ^0.18.20 + version: 0.18.20(patch_hash=b6w4kbugtl4xi6w24tkr3hfz4y) express: specifier: ^4.18.2 version: 4.18.2 ioredis: - specifier: ^5.3.1 - version: 5.3.1 + specifier: ^5.3.2 + version: 5.3.2 jsonschema: specifier: ^1.4.1 version: 1.4.1 @@ -1162,7 +1162,7 @@ importers: devDependencies: '@cdktf/provider-aws': specifier: ^15.0.0 - version: 15.0.0(cdktf@0.17.0)(constructs@10.2.69) + version: 15.0.0(cdktf@0.17.0)(constructs@10.2.70) '@types/express': specifier: ^4.17.17 version: 4.17.17 @@ -1174,28 +1174,28 @@ importers: version: 2.1.1 '@types/node': specifier: ^18 - version: 18.16.18 + version: 18.17.13 '@types/uuid': - specifier: ^9.0.1 - version: 9.0.1 + specifier: ^9.0.3 + version: 9.0.3 '@typescript-eslint/eslint-plugin': specifier: ^5 - version: 5.59.11(@typescript-eslint/parser@5.59.11)(eslint@8.42.0)(typescript@4.9.4) + version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.48.0)(typescript@4.9.5) '@typescript-eslint/parser': specifier: ^5 - version: 5.59.11(eslint@8.42.0)(typescript@4.9.4) + version: 5.62.0(eslint@8.48.0)(typescript@4.9.5) '@vitest/coverage-v8': - specifier: ^0.32.2 - version: 0.32.2(vitest@0.32.2) + specifier: ^0.32.4 + version: 0.32.4(vitest@0.32.4) '@winglang/jsii-docgen': specifier: workspace:^ version: link:../../apps/jsii-docgen aws-sdk-client-mock: - specifier: ^2.0.1 - version: 2.0.1 + specifier: ^2.2.0 + version: 2.2.0 aws-sdk-client-mock-jest: - specifier: ^2.0.1 - version: 2.0.1(aws-sdk-client-mock@2.0.1) + specifier: ^2.2.0 + version: 2.2.0(aws-sdk-client-mock@2.2.0) bump-pack: specifier: workspace:^ version: link:../../tools/bump-pack @@ -1204,25 +1204,25 @@ importers: version: 0.17.0(ink@3.2.0)(react@17.0.2) eslint: specifier: ^8 - version: 8.42.0 + version: 8.48.0 eslint-config-prettier: - specifier: ^8.6.0 - version: 8.8.0(eslint@8.42.0) + specifier: ^8.10.0 + version: 8.10.0(eslint@8.48.0) eslint-import-resolver-node: - specifier: ^0.3.7 - version: 0.3.7 + specifier: ^0.3.9 + version: 0.3.9 eslint-import-resolver-typescript: - specifier: ^3.5.3 - version: 3.5.5(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.42.0) + specifier: ^3.6.0 + version: 3.6.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.48.0) eslint-plugin-import: - specifier: ^2.27.5 - version: 2.27.5(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-typescript@3.5.5)(eslint@8.42.0) + specifier: ^2.28.1 + version: 2.28.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.48.0) eslint-plugin-prettier: specifier: ^4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.42.0)(prettier@2.8.8) + version: 4.2.1(eslint-config-prettier@8.10.0)(eslint@8.48.0)(prettier@2.8.8) eslint-plugin-sort-exports: specifier: ^0.8.0 - version: 0.8.0(eslint@8.42.0) + version: 0.8.0(eslint@8.48.0) fs-extra: specifier: ^10.1.0 version: 10.1.0 @@ -1230,32 +1230,35 @@ importers: specifier: 5.0.11 version: 5.0.11(patch_hash=zhi5puwzi5jiulxnmqgkd4wl2a) jsii-diff: - specifier: ^1.73.0 - version: 1.73.0 + specifier: ^1.88.0 + version: 1.88.0 jsii-pacmak: - specifier: ^1.73.0 - version: 1.84.0 + specifier: ^1.88.0 + version: 1.88.0 + jsii-rosetta: + specifier: 5.0.11 + version: 5.0.11 npm-check-updates: specifier: ^16 - version: 16.0.0 + version: 16.13.2 prettier: - specifier: ^2.8.3 + specifier: ^2.8.8 version: 2.8.8 projen: - specifier: ^0.71.7 - version: 0.71.60 + specifier: ^0.71.163 + version: 0.71.163 standard-version: specifier: ^9 - version: 9.0.0 + version: 9.5.0 ts-node: specifier: ^10.9.1 - version: 10.9.1(@types/node@18.16.18)(typescript@4.9.4) + version: 10.9.1(@types/node@18.17.13)(typescript@4.9.5) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^4.9.5 + version: 4.9.5 vitest: - specifier: ^0.32.2 - version: 0.32.2 + specifier: ^0.32.4 + version: 0.32.4 wing-api-checker: specifier: workspace:^ version: link:../../apps/wing-api-checker @@ -1269,16 +1272,16 @@ importers: specifier: ^6.0.2 version: 6.0.2 '@pnpm/reviewing.dependencies-hierarchy': - specifier: ^2.0.8 - version: 2.0.8(@pnpm/logger@5.0.0) + specifier: ^2.0.10 + version: 2.0.10(@pnpm/logger@5.0.0) '@pnpm/workspace.find-packages': - specifier: ^1.0.1 - version: 1.0.1(@pnpm/logger@5.0.0) + specifier: ^1.0.5 + version: 1.0.5(@pnpm/logger@5.0.0) changelogen: - specifier: ^0.5.3 - version: 0.5.3 + specifier: ^0.5.5 + version: 0.5.5 fs-extra: - specifier: ^11 + specifier: ^11.1.1 version: 11.1.1 minimatch: specifier: ^9.0.3 @@ -1287,24 +1290,24 @@ importers: specifier: ^3.0.1 version: 3.0.1 semver: - specifier: ^7.5.2 - version: 7.5.2 + specifier: ^7.5.4 + version: 7.5.4 tsx: - specifier: ^3.12.7 - version: 3.12.7 + specifier: ^3.12.8 + version: 3.12.8 devDependencies: '@types/fs-extra': - specifier: ^11 + specifier: ^11.0.1 version: 11.0.1 '@types/node': - specifier: ^18.16.18 - version: 18.16.18 + specifier: ^18.17.13 + version: 18.17.13 '@types/semver': - specifier: ^7.5.0 - version: 7.5.0 + specifier: ^7.5.1 + version: 7.5.1 typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 tools/hangar: devDependencies: @@ -1327,17 +1330,17 @@ importers: specifier: workspace:^ version: link:../../libs/wingsdk cdktf: - specifier: ^0.17.0 - version: 0.17.0(constructs@10.2.69) + specifier: ^0.17.3 + version: 0.17.3(constructs@10.2.70) execa: - specifier: ^7.1.1 - version: 7.1.1 + specifier: ^7.2.0 + version: 7.2.0 npm: - specifier: ^9.6.4 - version: 9.6.4 + specifier: ^9.8.1 + version: 9.8.1 tsx: - specifier: ^3.12.6 - version: 3.12.7 + specifier: ^3.12.8 + version: 3.12.8 vitest: specifier: ^0.30.1 version: 0.30.1 @@ -1345,8 +1348,8 @@ importers: specifier: workspace:^ version: link:../../apps/wing yaml: - specifier: ^2.2.1 - version: 2.2.1 + specifier: ^2.3.2 + version: 2.3.2 packages: @@ -1376,113 +1379,148 @@ packages: engines: {node: '>=6.0.0'} dependencies: '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 dev: true - /@aw-web-design/x-default-browser@1.4.88: - resolution: {integrity: sha512-AkEmF0wcwYC2QkhK703Y83fxWARttIWXDmQN8+cof8FmFZ5BRhnNXGymeb1S73bOCLfWjYELxtujL56idCN/XA==} + /@aw-web-design/x-default-browser@1.4.126: + resolution: {integrity: sha512-Xk1sIhyNC/esHGGVjL/niHLowM0csl/kFO5uawBy4IrWwy0o1G8LGt3jP6nmWGz+USxeeqbihAmp/oVZju6wug==} hasBin: true dependencies: default-browser-id: 3.0.0 dev: true - /@aws-cdk/asset-awscli-v1@2.2.199: - resolution: {integrity: sha512-zNdD2OxALdsdQaRZBpTfMTuudxV+4jLMznJIvVj6O+OqCru4m5UtgVQmyApW1z2H9s4/06ovVt20aXe2G8Ta+w==} + /@aws-cdk/asset-awscli-v1@2.2.200: + resolution: {integrity: sha512-Kf5J8DfJK4wZFWT2Myca0lhwke7LwHcHBo+4TvWOGJrFVVKVuuiLCkzPPRBQQVDj0Vtn2NBokZAz8pfMpAqAKg==} dev: false /@aws-cdk/asset-kubectl-v20@2.1.2: resolution: {integrity: sha512-3M2tELJOxQv0apCIiuKQ4pAbncz9GuLwnKFqxifWfe77wuMxyTRPmxssYHs42ePqzap1LT6GDcPygGs+hHstLg==} dev: false - /@aws-cdk/asset-node-proxy-agent-v5@2.0.165: - resolution: {integrity: sha512-bsyLQD/vqXQcc9RDmlM1XqiFNO/yewgVFXmkMcQkndJbmE/jgYkzewwYGrBlfL725hGLQipXq19+jwWwdsXQqg==} + /@aws-cdk/asset-node-proxy-agent-v6@2.0.1: + resolution: {integrity: sha512-DDt4SLdLOwWCjGtltH4VCST7hpOI5DzieuhGZsBpZ+AgJdSI2GCjklCXm0GCTwJG/SolkL5dtQXyUKgg9luBDg==} dev: false - /@aws-cdk/aws-events@1.110.1(@aws-cdk/aws-iam@1.110.1)(@aws-cdk/core@1.110.1)(constructs@3.3.69): - resolution: {integrity: sha512-e8jqWZUUqOowvUtbWB4NO+zsiVQBEMbqMobnYFhKFtVXnM5y0jz1ulzvkqhm/w6uEHoCIDwKM4/PPQv8YtwXyA==} - engines: {node: '>= 10.13.0 <13 || >=13.7.0'} + /@aws-cdk/aws-events@1.204.0(@aws-cdk/aws-iam@1.204.0)(@aws-cdk/core@1.204.0)(constructs@3.4.344): + resolution: {integrity: sha512-KnfUmtv+4RhydD9+5CHFxNJxtgn7+Xftwfwg1G7qV/tWYPFHcNIvhlSOgwDrQPa+pTo1MmkiUN0lAR0G8B/cbw==} + engines: {node: '>= 14.15.0'} + deprecated: |- + AWS CDK v1 has reached End-of-Support on 2023-06-01. + This package is no longer being updated, and users should migrate to AWS CDK v2. + + For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html peerDependencies: - '@aws-cdk/aws-iam': 1.110.1 - '@aws-cdk/core': 1.110.1 + '@aws-cdk/aws-iam': 1.204.0 + '@aws-cdk/core': 1.204.0 constructs: ^3.3.69 dependencies: - '@aws-cdk/aws-iam': 1.110.1(@aws-cdk/core@1.110.1)(@aws-cdk/region-info@1.110.1)(constructs@3.3.69) - '@aws-cdk/core': 1.110.1(@aws-cdk/cloud-assembly-schema@1.110.1)(@aws-cdk/cx-api@1.110.1)(@aws-cdk/region-info@1.110.1)(constructs@3.3.69) - constructs: 3.3.69 + '@aws-cdk/aws-iam': 1.204.0(@aws-cdk/cloud-assembly-schema@1.204.0)(@aws-cdk/core@1.204.0)(@aws-cdk/region-info@1.204.0)(constructs@3.4.344) + '@aws-cdk/core': 1.204.0(@aws-cdk/cloud-assembly-schema@1.204.0)(@aws-cdk/cx-api@1.204.0)(@aws-cdk/region-info@1.204.0)(constructs@3.4.344) + constructs: 3.4.344 dev: false - /@aws-cdk/aws-iam@1.110.1(@aws-cdk/core@1.110.1)(@aws-cdk/region-info@1.110.1)(constructs@3.3.69): - resolution: {integrity: sha512-qwhVd1ZUeIIMAUqfZjSB5OfVxe0vr9b+eUW/znuL5QjkSMeVORJW5/OEbI2id1OdnncTczyqo9GSJSIX1ISkcg==} - engines: {node: '>= 10.13.0 <13 || >=13.7.0'} + /@aws-cdk/aws-iam@1.204.0(@aws-cdk/cloud-assembly-schema@1.204.0)(@aws-cdk/core@1.204.0)(@aws-cdk/region-info@1.204.0)(constructs@3.4.344): + resolution: {integrity: sha512-Fh2egW3v/uDdw3m4jvcupS7COL/+sJl2NHjz9l298ddyMxqDwJD2NQwE8mvgPLK4rDtAtDnE0c8RS6d+NWiC+w==} + engines: {node: '>= 14.15.0'} + deprecated: |- + AWS CDK v1 has reached End-of-Support on 2023-06-01. + This package is no longer being updated, and users should migrate to AWS CDK v2. + + For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html peerDependencies: - '@aws-cdk/core': 1.110.1 - '@aws-cdk/region-info': 1.110.1 + '@aws-cdk/core': 1.204.0 + '@aws-cdk/region-info': 1.204.0 constructs: ^3.3.69 dependencies: - '@aws-cdk/core': 1.110.1(@aws-cdk/cloud-assembly-schema@1.110.1)(@aws-cdk/cx-api@1.110.1)(@aws-cdk/region-info@1.110.1)(constructs@3.3.69) - '@aws-cdk/region-info': 1.110.1 - constructs: 3.3.69 + '@aws-cdk/core': 1.204.0(@aws-cdk/cloud-assembly-schema@1.204.0)(@aws-cdk/cx-api@1.204.0)(@aws-cdk/region-info@1.204.0)(constructs@3.4.344) + '@aws-cdk/cx-api': 1.204.0(@aws-cdk/cloud-assembly-schema@1.204.0) + '@aws-cdk/region-info': 1.204.0 + constructs: 3.4.344 + transitivePeerDependencies: + - '@aws-cdk/cloud-assembly-schema' dev: false - /@aws-cdk/aws-kms@1.110.1(@aws-cdk/aws-iam@1.110.1)(@aws-cdk/core@1.110.1)(@aws-cdk/cx-api@1.110.1)(constructs@3.3.69): - resolution: {integrity: sha512-PTkK7iO/RvpRMhb3RdAxXQl/c9xfbXgz/PbuqnpTxwtg2D+WoS2+5XJUr+3UddtUporrriBjhj4NhHkNuaw55w==} - engines: {node: '>= 10.13.0 <13 || >=13.7.0'} + /@aws-cdk/aws-kms@1.204.0(@aws-cdk/aws-iam@1.204.0)(@aws-cdk/cloud-assembly-schema@1.204.0)(@aws-cdk/core@1.204.0)(@aws-cdk/cx-api@1.204.0)(constructs@3.4.344): + resolution: {integrity: sha512-iryZQ428L1VUVQ0zE96XTWWX7ANVtDrb6x+ZXXLTVUEPgjEd/W6zlcp++Qi0A3a9HLNd4PbEhK9rs0UKNTylzw==} + engines: {node: '>= 14.15.0'} + deprecated: |- + AWS CDK v1 has reached End-of-Support on 2023-06-01. + This package is no longer being updated, and users should migrate to AWS CDK v2. + + For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html peerDependencies: - '@aws-cdk/aws-iam': 1.110.1 - '@aws-cdk/core': 1.110.1 - '@aws-cdk/cx-api': 1.110.1 + '@aws-cdk/aws-iam': 1.204.0 + '@aws-cdk/cloud-assembly-schema': 1.204.0 + '@aws-cdk/core': 1.204.0 + '@aws-cdk/cx-api': 1.204.0 constructs: ^3.3.69 dependencies: - '@aws-cdk/aws-iam': 1.110.1(@aws-cdk/core@1.110.1)(@aws-cdk/region-info@1.110.1)(constructs@3.3.69) - '@aws-cdk/core': 1.110.1(@aws-cdk/cloud-assembly-schema@1.110.1)(@aws-cdk/cx-api@1.110.1)(@aws-cdk/region-info@1.110.1)(constructs@3.3.69) - '@aws-cdk/cx-api': 1.110.1(@aws-cdk/cloud-assembly-schema@1.110.1) - constructs: 3.3.69 + '@aws-cdk/aws-iam': 1.204.0(@aws-cdk/cloud-assembly-schema@1.204.0)(@aws-cdk/core@1.204.0)(@aws-cdk/region-info@1.204.0)(constructs@3.4.344) + '@aws-cdk/cloud-assembly-schema': 1.204.0 + '@aws-cdk/core': 1.204.0(@aws-cdk/cloud-assembly-schema@1.204.0)(@aws-cdk/cx-api@1.204.0)(@aws-cdk/region-info@1.204.0)(constructs@3.4.344) + '@aws-cdk/cx-api': 1.204.0(@aws-cdk/cloud-assembly-schema@1.204.0) + constructs: 3.4.344 dev: false - /@aws-cdk/aws-s3@1.110.1(@aws-cdk/aws-events@1.110.1)(@aws-cdk/aws-iam@1.110.1)(@aws-cdk/aws-kms@1.110.1)(@aws-cdk/core@1.110.1)(@aws-cdk/cx-api@1.110.1)(constructs@3.3.69): - resolution: {integrity: sha512-hH/T+wgfriwqG6UEmxT5N9/AEbZiTc6gmpyTlbIhx1u4i9x3Ek/lWYrNcshlaOaYGKaGHcw00frXhudtlIbUsQ==} - engines: {node: '>= 10.13.0 <13 || >=13.7.0'} + /@aws-cdk/aws-s3@1.204.0(@aws-cdk/aws-events@1.204.0)(@aws-cdk/aws-iam@1.204.0)(@aws-cdk/aws-kms@1.204.0)(@aws-cdk/core@1.204.0)(@aws-cdk/cx-api@1.204.0)(constructs@3.4.344): + resolution: {integrity: sha512-jsQ4n1L4MdPYDirBoOYgg7yzSk1TaFYo4dnwDlKiLJ5LcHG3Nai1cHb9XQbCy/9KKqbWsbd3WlkH+vcWEl8EUA==} + engines: {node: '>= 14.15.0'} + deprecated: |- + AWS CDK v1 has reached End-of-Support on 2023-06-01. + This package is no longer being updated, and users should migrate to AWS CDK v2. + + For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html peerDependencies: - '@aws-cdk/aws-events': 1.110.1 - '@aws-cdk/aws-iam': 1.110.1 - '@aws-cdk/aws-kms': 1.110.1 - '@aws-cdk/core': 1.110.1 - '@aws-cdk/cx-api': 1.110.1 + '@aws-cdk/aws-events': 1.204.0 + '@aws-cdk/aws-iam': 1.204.0 + '@aws-cdk/aws-kms': 1.204.0 + '@aws-cdk/core': 1.204.0 + '@aws-cdk/cx-api': 1.204.0 constructs: ^3.3.69 dependencies: - '@aws-cdk/aws-events': 1.110.1(@aws-cdk/aws-iam@1.110.1)(@aws-cdk/core@1.110.1)(constructs@3.3.69) - '@aws-cdk/aws-iam': 1.110.1(@aws-cdk/core@1.110.1)(@aws-cdk/region-info@1.110.1)(constructs@3.3.69) - '@aws-cdk/aws-kms': 1.110.1(@aws-cdk/aws-iam@1.110.1)(@aws-cdk/core@1.110.1)(@aws-cdk/cx-api@1.110.1)(constructs@3.3.69) - '@aws-cdk/core': 1.110.1(@aws-cdk/cloud-assembly-schema@1.110.1)(@aws-cdk/cx-api@1.110.1)(@aws-cdk/region-info@1.110.1)(constructs@3.3.69) - '@aws-cdk/cx-api': 1.110.1(@aws-cdk/cloud-assembly-schema@1.110.1) - constructs: 3.3.69 + '@aws-cdk/aws-events': 1.204.0(@aws-cdk/aws-iam@1.204.0)(@aws-cdk/core@1.204.0)(constructs@3.4.344) + '@aws-cdk/aws-iam': 1.204.0(@aws-cdk/cloud-assembly-schema@1.204.0)(@aws-cdk/core@1.204.0)(@aws-cdk/region-info@1.204.0)(constructs@3.4.344) + '@aws-cdk/aws-kms': 1.204.0(@aws-cdk/aws-iam@1.204.0)(@aws-cdk/cloud-assembly-schema@1.204.0)(@aws-cdk/core@1.204.0)(@aws-cdk/cx-api@1.204.0)(constructs@3.4.344) + '@aws-cdk/core': 1.204.0(@aws-cdk/cloud-assembly-schema@1.204.0)(@aws-cdk/cx-api@1.204.0)(@aws-cdk/region-info@1.204.0)(constructs@3.4.344) + '@aws-cdk/cx-api': 1.204.0(@aws-cdk/cloud-assembly-schema@1.204.0) + constructs: 3.4.344 dev: false - /@aws-cdk/cloud-assembly-schema@1.110.1: - resolution: {integrity: sha512-rsv6yNhRXkqO8UP0UOzRH60Cx89vGSUKcWSzyvvL9VrTpozYCUBMMuTqhZsmArAv82PYzb1pTDcwUnJKDLhWtQ==} - engines: {node: '>= 10.13.0 <13 || >=13.7.0'} + /@aws-cdk/cloud-assembly-schema@1.204.0: + resolution: {integrity: sha512-DMNSR4DNKMNNfhOq1UizwZvesOKdhk3R3gRigrvWBHIkHMQg+W6aZFl7WZLKSBkChAXhIsH///psjhDQ20gl1w==} + engines: {node: '>= 14.15.0'} + deprecated: |- + AWS CDK v1 has reached End-of-Support on 2023-06-01. + This package is no longer being updated, and users should migrate to AWS CDK v2. + + For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html dependencies: jsonschema: 1.4.1 - semver: 7.5.3 + semver: 7.5.4 dev: false bundledDependencies: - jsonschema - semver - /@aws-cdk/core@1.110.1(@aws-cdk/cloud-assembly-schema@1.110.1)(@aws-cdk/cx-api@1.110.1)(@aws-cdk/region-info@1.110.1)(constructs@3.3.69): - resolution: {integrity: sha512-E4+DorhqQ3j0qlz6GZ+v95cXvdsQiuyCjO0yYH5Qk/9X2vaXcJoCrbHYh4+Lx6pbBnAVvFMJXtoNFGoA0m9HpA==} - engines: {node: '>= 10.13.0 <13 || >=13.7.0'} + /@aws-cdk/core@1.204.0(@aws-cdk/cloud-assembly-schema@1.204.0)(@aws-cdk/cx-api@1.204.0)(@aws-cdk/region-info@1.204.0)(constructs@3.4.344): + resolution: {integrity: sha512-yO/flJ9ihpzRhLTEqlbdbuPGtyyghHiiQPkUTLslwUM5vThVTbpgvW4UQHSGqytyst4MYXrN2jQn2RkwIRU57g==} + engines: {node: '>= 14.15.0'} + deprecated: |- + AWS CDK v1 has reached End-of-Support on 2023-06-01. + This package is no longer being updated, and users should migrate to AWS CDK v2. + + For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html peerDependencies: - '@aws-cdk/cloud-assembly-schema': 1.110.1 - '@aws-cdk/cx-api': 1.110.1 - '@aws-cdk/region-info': 1.110.1 + '@aws-cdk/cloud-assembly-schema': 1.204.0 + '@aws-cdk/cx-api': 1.204.0 + '@aws-cdk/region-info': 1.204.0 constructs: ^3.3.69 dependencies: - '@aws-cdk/cloud-assembly-schema': 1.110.1 - '@aws-cdk/cx-api': 1.110.1(@aws-cdk/cloud-assembly-schema@1.110.1) - '@aws-cdk/region-info': 1.110.1 + '@aws-cdk/cloud-assembly-schema': 1.204.0 + '@aws-cdk/cx-api': 1.204.0(@aws-cdk/cloud-assembly-schema@1.204.0) + '@aws-cdk/region-info': 1.204.0 '@balena/dockerignore': 1.0.2 - constructs: 3.3.69 + constructs: 3.4.344 fs-extra: 9.1.0 ignore: 5.2.4 minimatch: 3.1.2 @@ -1493,27 +1531,38 @@ packages: - '@balena/dockerignore' - ignore - /@aws-cdk/cx-api@1.110.1(@aws-cdk/cloud-assembly-schema@1.110.1): - resolution: {integrity: sha512-InY00PETF2wYiRA6SsldsjceIi4uRt5ED0nTNx0fApBr6k4OUfBUV44wUyTm6ZuNzeTU3qxaDKH2APRfiH06yA==} - engines: {node: '>= 10.13.0 <13 || >=13.7.0'} + /@aws-cdk/cx-api@1.204.0(@aws-cdk/cloud-assembly-schema@1.204.0): + resolution: {integrity: sha512-Juh/jL1kFPD5JcI9Uu6X0mM2L6hBCN5grdjSS40F8dThbH25VPzFBejaKjiy5nP1UZB83X+HW3utYOEi97DqxA==} + engines: {node: '>= 14.15.0'} + deprecated: |- + AWS CDK v1 has reached End-of-Support on 2023-06-01. + This package is no longer being updated, and users should migrate to AWS CDK v2. + + For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html peerDependencies: - '@aws-cdk/cloud-assembly-schema': 1.110.1 + '@aws-cdk/cloud-assembly-schema': 1.204.0 dependencies: - '@aws-cdk/cloud-assembly-schema': 1.110.1 + '@aws-cdk/cloud-assembly-schema': 1.204.0 + semver: 7.5.4 dev: false bundledDependencies: - semver - /@aws-cdk/region-info@1.110.1: - resolution: {integrity: sha512-sRRTO2qH8kWsh4s62bKTmk9IU8uXYmRJHkOjWo6RUC/W0sv7S6VeB1XHZ7QReDF3woJ/n3oPJzsf/bu33m4l+g==} - engines: {node: '>= 10.13.0 <13 || >=13.7.0'} + /@aws-cdk/region-info@1.204.0: + resolution: {integrity: sha512-lPkYJNoN4Gjlf0Fdfgcd1RTm5RD9qtfaFMwVvTn2KGTr7ZqmFskGQ9FqIcd5vd6GmsbAL8OrFOToLr1AHDuOiQ==} + engines: {node: '>= 14.15.0'} + deprecated: |- + AWS CDK v1 has reached End-of-Support on 2023-06-01. + This package is no longer being updated, and users should migrate to AWS CDK v2. + + For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html dev: false /@aws-crypto/crc32@3.0.0: resolution: {integrity: sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==} dependencies: '@aws-crypto/util': 3.0.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.398.0 tslib: 1.14.1 dev: false @@ -1521,7 +1570,7 @@ packages: resolution: {integrity: sha512-ENNPPManmnVJ4BTXlOjAgD7URidbAznURqD0KvfREyc4o20DPYdEldU1f5cQ7Jbj0CJJSPaMIk/9ZshdB3210w==} dependencies: '@aws-crypto/util': 3.0.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.398.0 tslib: 1.14.1 dev: false @@ -1537,7 +1586,7 @@ packages: '@aws-crypto/ie11-detection': 3.0.0 '@aws-crypto/supports-web-crypto': 3.0.0 '@aws-crypto/util': 3.0.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.398.0 '@aws-sdk/util-locate-window': 3.310.0 '@aws-sdk/util-utf8-browser': 3.259.0(patch_hash=warwypb2fd3io6vojm27svyrfm) tslib: 1.14.1 @@ -1550,7 +1599,7 @@ packages: '@aws-crypto/sha256-js': 3.0.0 '@aws-crypto/supports-web-crypto': 3.0.0 '@aws-crypto/util': 3.0.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.398.0 '@aws-sdk/util-locate-window': 3.310.0 '@aws-sdk/util-utf8-browser': 3.259.0(patch_hash=warwypb2fd3io6vojm27svyrfm) tslib: 1.14.1 @@ -1560,7 +1609,7 @@ packages: resolution: {integrity: sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==} dependencies: '@aws-crypto/util': 3.0.0 - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.398.0 tslib: 1.14.1 dev: false @@ -1573,7 +1622,7 @@ packages: /@aws-crypto/util@3.0.0: resolution: {integrity: sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==} dependencies: - '@aws-sdk/types': 3.347.0 + '@aws-sdk/types': 3.398.0 '@aws-sdk/util-utf8-browser': 3.259.0(patch_hash=warwypb2fd3io6vojm27svyrfm) tslib: 1.14.1 dev: false @@ -1583,624 +1632,562 @@ packages: engines: {node: '>=14.0.0'} dependencies: '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/chunked-blob-reader@3.310.0: - resolution: {integrity: sha512-CrJS3exo4mWaLnWxfCH+w88Ou0IcAZSIkk4QbmxiHl/5Dq705OLoxf4385MVyExpqpeVJYOYQ2WaD8i/pQZ2fg==} - dependencies: - tslib: 2.6.0 + tslib: 2.6.2 dev: false - /@aws-sdk/client-cloudwatch-logs@3.354.0: - resolution: {integrity: sha512-DvzfQglEhEX/bEa2eWuFyJpADSzTSXNIk97vr8vHooR541c3cA0+zaHAbD0AR18D66Z1uGb95nQ52zHpC8v7QA==} + /@aws-sdk/client-cloudwatch-logs@3.405.0: + resolution: {integrity: sha512-ZQGBjvSetUqbu5wZyV/DZIYjHIPDQNxRNSlYA/MP5KBHnJrMpvG/dttup9+A/ydIgzN1CIvnAo/j35nuNwEDCw==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sts': 3.354.0 - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/credential-provider-node': 3.354.0 - '@aws-sdk/fetch-http-handler': 3.353.0 - '@aws-sdk/hash-node': 3.347.0 - '@aws-sdk/invalid-dependency': 3.347.0 - '@aws-sdk/middleware-content-length': 3.347.0 - '@aws-sdk/middleware-endpoint': 3.347.0 - '@aws-sdk/middleware-host-header': 3.347.0 - '@aws-sdk/middleware-logger': 3.347.0 - '@aws-sdk/middleware-recursion-detection': 3.347.0 - '@aws-sdk/middleware-retry': 3.354.0 - '@aws-sdk/middleware-serde': 3.347.0 - '@aws-sdk/middleware-signing': 3.354.0 - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/middleware-user-agent': 3.352.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/node-http-handler': 3.350.0 - '@aws-sdk/smithy-client': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 - '@aws-sdk/util-base64': 3.310.0 - '@aws-sdk/util-body-length-browser': 3.310.0 - '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.353.0 - '@aws-sdk/util-defaults-mode-node': 3.354.0 - '@aws-sdk/util-endpoints': 3.352.0 - '@aws-sdk/util-retry': 3.347.0 - '@aws-sdk/util-user-agent-browser': 3.347.0 - '@aws-sdk/util-user-agent-node': 3.354.0 - '@aws-sdk/util-utf8': 3.310.0 - '@smithy/protocol-http': 1.1.0 - '@smithy/types': 1.1.0 - tslib: 2.6.0 + '@aws-sdk/client-sts': 3.405.0 + '@aws-sdk/credential-provider-node': 3.405.0 + '@aws-sdk/middleware-host-header': 3.398.0 + '@aws-sdk/middleware-logger': 3.398.0 + '@aws-sdk/middleware-recursion-detection': 3.398.0 + '@aws-sdk/middleware-signing': 3.398.0 + '@aws-sdk/middleware-user-agent': 3.398.0 + '@aws-sdk/types': 3.398.0 + '@aws-sdk/util-endpoints': 3.398.0 + '@aws-sdk/util-user-agent-browser': 3.398.0 + '@aws-sdk/util-user-agent-node': 3.405.0 + '@smithy/config-resolver': 2.0.5 + '@smithy/fetch-http-handler': 2.0.5 + '@smithy/hash-node': 2.0.5 + '@smithy/invalid-dependency': 2.0.5 + '@smithy/middleware-content-length': 2.0.5 + '@smithy/middleware-endpoint': 2.0.5 + '@smithy/middleware-retry': 2.0.5 + '@smithy/middleware-serde': 2.0.5 + '@smithy/middleware-stack': 2.0.0 + '@smithy/node-config-provider': 2.0.7 + '@smithy/node-http-handler': 2.0.5 + '@smithy/protocol-http': 2.0.5 + '@smithy/smithy-client': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/url-parser': 2.0.5 + '@smithy/util-base64': 2.0.0 + '@smithy/util-body-length-browser': 2.0.0 + '@smithy/util-body-length-node': 2.1.0 + '@smithy/util-defaults-mode-browser': 2.0.6 + '@smithy/util-defaults-mode-node': 2.0.7 + '@smithy/util-retry': 2.0.0 + '@smithy/util-utf8': 2.0.0 + tslib: 2.6.2 transitivePeerDependencies: - aws-crt dev: false - /@aws-sdk/client-dynamodb@3.354.0: - resolution: {integrity: sha512-9Ig6Nk7UGrjHNHEadqKapzl6EWviRCRitm8d8s+8fS1VNFKT1jrtDUxD2qKR0hOC0x29pMgbxF8+ZVrOFJGTGA==} + /@aws-sdk/client-dynamodb@3.405.0: + resolution: {integrity: sha512-hBaC5F6M1CMRg7RkVC4xbqT+9CVunxrxeQKZCy4H2iMnOmFyY9InjOqF06rF3dRTTDJl5Ski9AWJrovg29Q+iw==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sts': 3.354.0 - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/credential-provider-node': 3.354.0 - '@aws-sdk/fetch-http-handler': 3.353.0 - '@aws-sdk/hash-node': 3.347.0 - '@aws-sdk/invalid-dependency': 3.347.0 - '@aws-sdk/middleware-content-length': 3.347.0 - '@aws-sdk/middleware-endpoint': 3.347.0 - '@aws-sdk/middleware-endpoint-discovery': 3.354.0 - '@aws-sdk/middleware-host-header': 3.347.0 - '@aws-sdk/middleware-logger': 3.347.0 - '@aws-sdk/middleware-recursion-detection': 3.347.0 - '@aws-sdk/middleware-retry': 3.354.0 - '@aws-sdk/middleware-serde': 3.347.0 - '@aws-sdk/middleware-signing': 3.354.0 - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/middleware-user-agent': 3.352.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/node-http-handler': 3.350.0 - '@aws-sdk/smithy-client': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 - '@aws-sdk/util-base64': 3.310.0 - '@aws-sdk/util-body-length-browser': 3.310.0 - '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.353.0 - '@aws-sdk/util-defaults-mode-node': 3.354.0 - '@aws-sdk/util-endpoints': 3.352.0 - '@aws-sdk/util-retry': 3.347.0 - '@aws-sdk/util-user-agent-browser': 3.347.0 - '@aws-sdk/util-user-agent-node': 3.354.0 - '@aws-sdk/util-utf8': 3.310.0 - '@aws-sdk/util-waiter': 3.347.0 - '@smithy/protocol-http': 1.1.0 - '@smithy/types': 1.1.0 - tslib: 2.6.0 + '@aws-sdk/client-sts': 3.405.0 + '@aws-sdk/credential-provider-node': 3.405.0 + '@aws-sdk/middleware-endpoint-discovery': 3.405.0 + '@aws-sdk/middleware-host-header': 3.398.0 + '@aws-sdk/middleware-logger': 3.398.0 + '@aws-sdk/middleware-recursion-detection': 3.398.0 + '@aws-sdk/middleware-signing': 3.398.0 + '@aws-sdk/middleware-user-agent': 3.398.0 + '@aws-sdk/types': 3.398.0 + '@aws-sdk/util-endpoints': 3.398.0 + '@aws-sdk/util-user-agent-browser': 3.398.0 + '@aws-sdk/util-user-agent-node': 3.405.0 + '@smithy/config-resolver': 2.0.5 + '@smithy/fetch-http-handler': 2.0.5 + '@smithy/hash-node': 2.0.5 + '@smithy/invalid-dependency': 2.0.5 + '@smithy/middleware-content-length': 2.0.5 + '@smithy/middleware-endpoint': 2.0.5 + '@smithy/middleware-retry': 2.0.5 + '@smithy/middleware-serde': 2.0.5 + '@smithy/middleware-stack': 2.0.0 + '@smithy/node-config-provider': 2.0.7 + '@smithy/node-http-handler': 2.0.5 + '@smithy/protocol-http': 2.0.5 + '@smithy/smithy-client': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/url-parser': 2.0.5 + '@smithy/util-base64': 2.0.0 + '@smithy/util-body-length-browser': 2.0.0 + '@smithy/util-body-length-node': 2.1.0 + '@smithy/util-defaults-mode-browser': 2.0.6 + '@smithy/util-defaults-mode-node': 2.0.7 + '@smithy/util-retry': 2.0.0 + '@smithy/util-utf8': 2.0.0 + '@smithy/util-waiter': 2.0.5 + tslib: 2.6.2 uuid: 8.3.2 transitivePeerDependencies: - aws-crt dev: false - /@aws-sdk/client-elasticache@3.354.0: - resolution: {integrity: sha512-gosE7wrV7UKIAF5ynjBmHfEQ4Od0jcsnS/tzCXyVB0OctwYkEXMA/6beiig0nUKsf0DOaYLnHEq+4BeCnM9W6w==} + /@aws-sdk/client-elasticache@3.405.0: + resolution: {integrity: sha512-jKwisFR12oA0zegFFK/63GZa+wqhQA+2MXqy5V80AL09qpEdypM3xXey13W+hMXa9mEmdkok/YEyIZBu59S5jg==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sts': 3.354.0 - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/credential-provider-node': 3.354.0 - '@aws-sdk/fetch-http-handler': 3.353.0 - '@aws-sdk/hash-node': 3.347.0 - '@aws-sdk/invalid-dependency': 3.347.0 - '@aws-sdk/middleware-content-length': 3.347.0 - '@aws-sdk/middleware-endpoint': 3.347.0 - '@aws-sdk/middleware-host-header': 3.347.0 - '@aws-sdk/middleware-logger': 3.347.0 - '@aws-sdk/middleware-recursion-detection': 3.347.0 - '@aws-sdk/middleware-retry': 3.354.0 - '@aws-sdk/middleware-serde': 3.347.0 - '@aws-sdk/middleware-signing': 3.354.0 - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/middleware-user-agent': 3.352.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/node-http-handler': 3.350.0 - '@aws-sdk/smithy-client': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 - '@aws-sdk/util-base64': 3.310.0 - '@aws-sdk/util-body-length-browser': 3.310.0 - '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.353.0 - '@aws-sdk/util-defaults-mode-node': 3.354.0 - '@aws-sdk/util-endpoints': 3.352.0 - '@aws-sdk/util-retry': 3.347.0 - '@aws-sdk/util-user-agent-browser': 3.347.0 - '@aws-sdk/util-user-agent-node': 3.354.0 - '@aws-sdk/util-utf8': 3.310.0 - '@aws-sdk/util-waiter': 3.347.0 - '@smithy/protocol-http': 1.1.0 - '@smithy/types': 1.1.0 - fast-xml-parser: 4.2.4 - tslib: 2.6.0 + '@aws-sdk/client-sts': 3.405.0 + '@aws-sdk/credential-provider-node': 3.405.0 + '@aws-sdk/middleware-host-header': 3.398.0 + '@aws-sdk/middleware-logger': 3.398.0 + '@aws-sdk/middleware-recursion-detection': 3.398.0 + '@aws-sdk/middleware-signing': 3.398.0 + '@aws-sdk/middleware-user-agent': 3.398.0 + '@aws-sdk/types': 3.398.0 + '@aws-sdk/util-endpoints': 3.398.0 + '@aws-sdk/util-user-agent-browser': 3.398.0 + '@aws-sdk/util-user-agent-node': 3.405.0 + '@smithy/config-resolver': 2.0.5 + '@smithy/fetch-http-handler': 2.0.5 + '@smithy/hash-node': 2.0.5 + '@smithy/invalid-dependency': 2.0.5 + '@smithy/middleware-content-length': 2.0.5 + '@smithy/middleware-endpoint': 2.0.5 + '@smithy/middleware-retry': 2.0.5 + '@smithy/middleware-serde': 2.0.5 + '@smithy/middleware-stack': 2.0.0 + '@smithy/node-config-provider': 2.0.7 + '@smithy/node-http-handler': 2.0.5 + '@smithy/protocol-http': 2.0.5 + '@smithy/smithy-client': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/url-parser': 2.0.5 + '@smithy/util-base64': 2.0.0 + '@smithy/util-body-length-browser': 2.0.0 + '@smithy/util-body-length-node': 2.1.0 + '@smithy/util-defaults-mode-browser': 2.0.6 + '@smithy/util-defaults-mode-node': 2.0.7 + '@smithy/util-retry': 2.0.0 + '@smithy/util-utf8': 2.0.0 + '@smithy/util-waiter': 2.0.5 + fast-xml-parser: 4.2.5 + tslib: 2.6.2 transitivePeerDependencies: - aws-crt dev: false - /@aws-sdk/client-lambda@3.354.0: - resolution: {integrity: sha512-7fRXdnBnTSEmvemoA0MfYxa2EaHZXoegt4wZaSxjUTzP9+EQdidESYSgkGB+kDTAg8KDrFCHvtQ2xQBi7dUMhg==} + /@aws-sdk/client-lambda@3.405.0: + resolution: {integrity: sha512-q43LQCllmfIMbA8low6lNIJdD3HxfN08RpB4vIWQhzwHxXrj0GV15pxPQa4SQdzSF6OfKIoW58Z2M/IPYvlQhg==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sts': 3.354.0 - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/credential-provider-node': 3.354.0 - '@aws-sdk/eventstream-serde-browser': 3.347.0 - '@aws-sdk/eventstream-serde-config-resolver': 3.347.0 - '@aws-sdk/eventstream-serde-node': 3.347.0 - '@aws-sdk/fetch-http-handler': 3.353.0 - '@aws-sdk/hash-node': 3.347.0 - '@aws-sdk/invalid-dependency': 3.347.0 - '@aws-sdk/middleware-content-length': 3.347.0 - '@aws-sdk/middleware-endpoint': 3.347.0 - '@aws-sdk/middleware-host-header': 3.347.0 - '@aws-sdk/middleware-logger': 3.347.0 - '@aws-sdk/middleware-recursion-detection': 3.347.0 - '@aws-sdk/middleware-retry': 3.354.0 - '@aws-sdk/middleware-serde': 3.347.0 - '@aws-sdk/middleware-signing': 3.354.0 - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/middleware-user-agent': 3.352.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/node-http-handler': 3.350.0 - '@aws-sdk/smithy-client': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 - '@aws-sdk/util-base64': 3.310.0 - '@aws-sdk/util-body-length-browser': 3.310.0 - '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.353.0 - '@aws-sdk/util-defaults-mode-node': 3.354.0 - '@aws-sdk/util-endpoints': 3.352.0 - '@aws-sdk/util-retry': 3.347.0 - '@aws-sdk/util-user-agent-browser': 3.347.0 - '@aws-sdk/util-user-agent-node': 3.354.0 - '@aws-sdk/util-utf8': 3.310.0 - '@aws-sdk/util-waiter': 3.347.0 - '@smithy/protocol-http': 1.1.0 - '@smithy/types': 1.1.0 - tslib: 2.6.0 + '@aws-sdk/client-sts': 3.405.0 + '@aws-sdk/credential-provider-node': 3.405.0 + '@aws-sdk/middleware-host-header': 3.398.0 + '@aws-sdk/middleware-logger': 3.398.0 + '@aws-sdk/middleware-recursion-detection': 3.398.0 + '@aws-sdk/middleware-signing': 3.398.0 + '@aws-sdk/middleware-user-agent': 3.398.0 + '@aws-sdk/types': 3.398.0 + '@aws-sdk/util-endpoints': 3.398.0 + '@aws-sdk/util-user-agent-browser': 3.398.0 + '@aws-sdk/util-user-agent-node': 3.405.0 + '@smithy/config-resolver': 2.0.5 + '@smithy/eventstream-serde-browser': 2.0.5 + '@smithy/eventstream-serde-config-resolver': 2.0.5 + '@smithy/eventstream-serde-node': 2.0.5 + '@smithy/fetch-http-handler': 2.0.5 + '@smithy/hash-node': 2.0.5 + '@smithy/invalid-dependency': 2.0.5 + '@smithy/middleware-content-length': 2.0.5 + '@smithy/middleware-endpoint': 2.0.5 + '@smithy/middleware-retry': 2.0.5 + '@smithy/middleware-serde': 2.0.5 + '@smithy/middleware-stack': 2.0.0 + '@smithy/node-config-provider': 2.0.7 + '@smithy/node-http-handler': 2.0.5 + '@smithy/protocol-http': 2.0.5 + '@smithy/smithy-client': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/url-parser': 2.0.5 + '@smithy/util-base64': 2.0.0 + '@smithy/util-body-length-browser': 2.0.0 + '@smithy/util-body-length-node': 2.1.0 + '@smithy/util-defaults-mode-browser': 2.0.6 + '@smithy/util-defaults-mode-node': 2.0.7 + '@smithy/util-retry': 2.0.0 + '@smithy/util-stream': 2.0.5 + '@smithy/util-utf8': 2.0.0 + '@smithy/util-waiter': 2.0.5 + tslib: 2.6.2 transitivePeerDependencies: - aws-crt dev: false - /@aws-sdk/client-s3@3.354.0: - resolution: {integrity: sha512-AEvHJipD/YhHRbS3l6uyLc6yNHF7vtmInwlQC+v4r61DeqnkHetboam2lMx5WsEJLBkKwfdsFkIEGVjI6OrjpQ==} + /@aws-sdk/client-s3@3.405.0: + resolution: {integrity: sha512-+LK6OCbKplR51zBZAtK/+RxaPsXcEklsA1+mmUA3M1h4KHl6GMiK5r/D9dlKht5DRntmmjCn3SI99QbfckqKXg==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha1-browser': 3.0.0 '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sts': 3.354.0 - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/credential-provider-node': 3.354.0 - '@aws-sdk/eventstream-serde-browser': 3.347.0 - '@aws-sdk/eventstream-serde-config-resolver': 3.347.0 - '@aws-sdk/eventstream-serde-node': 3.347.0 - '@aws-sdk/fetch-http-handler': 3.353.0 - '@aws-sdk/hash-blob-browser': 3.353.0 - '@aws-sdk/hash-node': 3.347.0 - '@aws-sdk/hash-stream-node': 3.347.0 - '@aws-sdk/invalid-dependency': 3.347.0 - '@aws-sdk/md5-js': 3.347.0 - '@aws-sdk/middleware-bucket-endpoint': 3.354.0 - '@aws-sdk/middleware-content-length': 3.347.0 - '@aws-sdk/middleware-endpoint': 3.347.0 - '@aws-sdk/middleware-expect-continue': 3.347.0 - '@aws-sdk/middleware-flexible-checksums': 3.347.0 - '@aws-sdk/middleware-host-header': 3.347.0 - '@aws-sdk/middleware-location-constraint': 3.347.0 - '@aws-sdk/middleware-logger': 3.347.0 - '@aws-sdk/middleware-recursion-detection': 3.347.0 - '@aws-sdk/middleware-retry': 3.354.0 - '@aws-sdk/middleware-sdk-s3': 3.347.0 - '@aws-sdk/middleware-serde': 3.347.0 - '@aws-sdk/middleware-signing': 3.354.0 - '@aws-sdk/middleware-ssec': 3.347.0 - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/middleware-user-agent': 3.352.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/node-http-handler': 3.350.0 - '@aws-sdk/signature-v4-multi-region': 3.354.0 - '@aws-sdk/smithy-client': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 - '@aws-sdk/util-base64': 3.310.0 - '@aws-sdk/util-body-length-browser': 3.310.0 - '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.353.0 - '@aws-sdk/util-defaults-mode-node': 3.354.0 - '@aws-sdk/util-endpoints': 3.352.0 - '@aws-sdk/util-retry': 3.347.0 - '@aws-sdk/util-stream-browser': 3.353.0 - '@aws-sdk/util-stream-node': 3.350.0 - '@aws-sdk/util-user-agent-browser': 3.347.0 - '@aws-sdk/util-user-agent-node': 3.354.0 - '@aws-sdk/util-utf8': 3.310.0 - '@aws-sdk/util-waiter': 3.347.0 + '@aws-sdk/client-sts': 3.405.0 + '@aws-sdk/credential-provider-node': 3.405.0 + '@aws-sdk/middleware-bucket-endpoint': 3.405.0 + '@aws-sdk/middleware-expect-continue': 3.398.0 + '@aws-sdk/middleware-flexible-checksums': 3.400.0 + '@aws-sdk/middleware-host-header': 3.398.0 + '@aws-sdk/middleware-location-constraint': 3.398.0 + '@aws-sdk/middleware-logger': 3.398.0 + '@aws-sdk/middleware-recursion-detection': 3.398.0 + '@aws-sdk/middleware-sdk-s3': 3.398.0 + '@aws-sdk/middleware-signing': 3.398.0 + '@aws-sdk/middleware-ssec': 3.398.0 + '@aws-sdk/middleware-user-agent': 3.398.0 + '@aws-sdk/signature-v4-multi-region': 3.398.0 + '@aws-sdk/types': 3.398.0 + '@aws-sdk/util-endpoints': 3.398.0 + '@aws-sdk/util-user-agent-browser': 3.398.0 + '@aws-sdk/util-user-agent-node': 3.405.0 '@aws-sdk/xml-builder': 3.310.0 - '@smithy/protocol-http': 1.1.0 - '@smithy/types': 1.1.0 - fast-xml-parser: 4.2.4 - tslib: 2.6.0 + '@smithy/config-resolver': 2.0.5 + '@smithy/eventstream-serde-browser': 2.0.5 + '@smithy/eventstream-serde-config-resolver': 2.0.5 + '@smithy/eventstream-serde-node': 2.0.5 + '@smithy/fetch-http-handler': 2.0.5 + '@smithy/hash-blob-browser': 2.0.5 + '@smithy/hash-node': 2.0.5 + '@smithy/hash-stream-node': 2.0.5 + '@smithy/invalid-dependency': 2.0.5 + '@smithy/md5-js': 2.0.5 + '@smithy/middleware-content-length': 2.0.5 + '@smithy/middleware-endpoint': 2.0.5 + '@smithy/middleware-retry': 2.0.5 + '@smithy/middleware-serde': 2.0.5 + '@smithy/middleware-stack': 2.0.0 + '@smithy/node-config-provider': 2.0.7 + '@smithy/node-http-handler': 2.0.5 + '@smithy/protocol-http': 2.0.5 + '@smithy/smithy-client': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/url-parser': 2.0.5 + '@smithy/util-base64': 2.0.0 + '@smithy/util-body-length-browser': 2.0.0 + '@smithy/util-body-length-node': 2.1.0 + '@smithy/util-defaults-mode-browser': 2.0.6 + '@smithy/util-defaults-mode-node': 2.0.7 + '@smithy/util-retry': 2.0.0 + '@smithy/util-stream': 2.0.5 + '@smithy/util-utf8': 2.0.0 + '@smithy/util-waiter': 2.0.5 + fast-xml-parser: 4.2.5 + tslib: 2.6.2 transitivePeerDependencies: - '@aws-sdk/signature-v4-crt' - aws-crt dev: false - /@aws-sdk/client-secrets-manager@3.354.0: - resolution: {integrity: sha512-x/cbIL7YskM3rTA/wjGW1sK3ZGedvQDroUmKLdUWae6/VvjpVktasLInoeZiEP0tICbGzTVSxJUEwdg6dp9+Mw==} + /@aws-sdk/client-secrets-manager@3.405.0: + resolution: {integrity: sha512-q9wyCgxmqikdALtZDsiaV5kpdSACL3+TW7fD6zS7wgAcQlq6JQDOrVBKFdosaM3ln/GNwobFVW4/W8RdPvRniA==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sts': 3.354.0 - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/credential-provider-node': 3.354.0 - '@aws-sdk/fetch-http-handler': 3.353.0 - '@aws-sdk/hash-node': 3.347.0 - '@aws-sdk/invalid-dependency': 3.347.0 - '@aws-sdk/middleware-content-length': 3.347.0 - '@aws-sdk/middleware-endpoint': 3.347.0 - '@aws-sdk/middleware-host-header': 3.347.0 - '@aws-sdk/middleware-logger': 3.347.0 - '@aws-sdk/middleware-recursion-detection': 3.347.0 - '@aws-sdk/middleware-retry': 3.354.0 - '@aws-sdk/middleware-serde': 3.347.0 - '@aws-sdk/middleware-signing': 3.354.0 - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/middleware-user-agent': 3.352.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/node-http-handler': 3.350.0 - '@aws-sdk/smithy-client': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 - '@aws-sdk/util-base64': 3.310.0 - '@aws-sdk/util-body-length-browser': 3.310.0 - '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.353.0 - '@aws-sdk/util-defaults-mode-node': 3.354.0 - '@aws-sdk/util-endpoints': 3.352.0 - '@aws-sdk/util-retry': 3.347.0 - '@aws-sdk/util-user-agent-browser': 3.347.0 - '@aws-sdk/util-user-agent-node': 3.354.0 - '@aws-sdk/util-utf8': 3.310.0 - '@smithy/protocol-http': 1.1.0 - '@smithy/types': 1.1.0 - tslib: 2.6.0 + '@aws-sdk/client-sts': 3.405.0 + '@aws-sdk/credential-provider-node': 3.405.0 + '@aws-sdk/middleware-host-header': 3.398.0 + '@aws-sdk/middleware-logger': 3.398.0 + '@aws-sdk/middleware-recursion-detection': 3.398.0 + '@aws-sdk/middleware-signing': 3.398.0 + '@aws-sdk/middleware-user-agent': 3.398.0 + '@aws-sdk/types': 3.398.0 + '@aws-sdk/util-endpoints': 3.398.0 + '@aws-sdk/util-user-agent-browser': 3.398.0 + '@aws-sdk/util-user-agent-node': 3.405.0 + '@smithy/config-resolver': 2.0.5 + '@smithy/fetch-http-handler': 2.0.5 + '@smithy/hash-node': 2.0.5 + '@smithy/invalid-dependency': 2.0.5 + '@smithy/middleware-content-length': 2.0.5 + '@smithy/middleware-endpoint': 2.0.5 + '@smithy/middleware-retry': 2.0.5 + '@smithy/middleware-serde': 2.0.5 + '@smithy/middleware-stack': 2.0.0 + '@smithy/node-config-provider': 2.0.7 + '@smithy/node-http-handler': 2.0.5 + '@smithy/protocol-http': 2.0.5 + '@smithy/smithy-client': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/url-parser': 2.0.5 + '@smithy/util-base64': 2.0.0 + '@smithy/util-body-length-browser': 2.0.0 + '@smithy/util-body-length-node': 2.1.0 + '@smithy/util-defaults-mode-browser': 2.0.6 + '@smithy/util-defaults-mode-node': 2.0.7 + '@smithy/util-retry': 2.0.0 + '@smithy/util-utf8': 2.0.0 + tslib: 2.6.2 uuid: 8.3.2 transitivePeerDependencies: - aws-crt dev: false - /@aws-sdk/client-sns@3.354.0: - resolution: {integrity: sha512-9yYxYm0fkw1UrpiNM8ZCtNUjwA67JaIjwe1KloynKxx1GCWJ8R36nZUiYaEX3tTosFKqi1zbmswAPpIqwJhFSw==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-crypto/sha256-browser': 3.0.0 - '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sts': 3.354.0 - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/credential-provider-node': 3.354.0 - '@aws-sdk/fetch-http-handler': 3.353.0 - '@aws-sdk/hash-node': 3.347.0 - '@aws-sdk/invalid-dependency': 3.347.0 - '@aws-sdk/middleware-content-length': 3.347.0 - '@aws-sdk/middleware-endpoint': 3.347.0 - '@aws-sdk/middleware-host-header': 3.347.0 - '@aws-sdk/middleware-logger': 3.347.0 - '@aws-sdk/middleware-recursion-detection': 3.347.0 - '@aws-sdk/middleware-retry': 3.354.0 - '@aws-sdk/middleware-serde': 3.347.0 - '@aws-sdk/middleware-signing': 3.354.0 - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/middleware-user-agent': 3.352.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/node-http-handler': 3.350.0 - '@aws-sdk/smithy-client': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 - '@aws-sdk/util-base64': 3.310.0 - '@aws-sdk/util-body-length-browser': 3.310.0 - '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.353.0 - '@aws-sdk/util-defaults-mode-node': 3.354.0 - '@aws-sdk/util-endpoints': 3.352.0 - '@aws-sdk/util-retry': 3.347.0 - '@aws-sdk/util-user-agent-browser': 3.347.0 - '@aws-sdk/util-user-agent-node': 3.354.0 - '@aws-sdk/util-utf8': 3.310.0 - '@smithy/protocol-http': 1.1.0 - '@smithy/types': 1.1.0 - fast-xml-parser: 4.2.4 - tslib: 2.6.0 - transitivePeerDependencies: - - aws-crt - dev: false - - /@aws-sdk/client-sqs@3.354.0: - resolution: {integrity: sha512-zHhOU0nbxtwVBeuR4HJQyKjh5eBth+n2wULZet83RwMPT1EICAJbREKWbBW6Cyg395Lxtuc41Ie4lQZoKx2how==} + /@aws-sdk/client-sns@3.405.0: + resolution: {integrity: sha512-JaV7AARa+6g06HyxNDP3TQrakPK7aA9yi9IwDxZGQ4YTTLzyo6qlQQ9S+TfnG1mLBAvumhX7FBYwfIpin6nfUw==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sts': 3.354.0 - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/credential-provider-node': 3.354.0 - '@aws-sdk/fetch-http-handler': 3.353.0 - '@aws-sdk/hash-node': 3.347.0 - '@aws-sdk/invalid-dependency': 3.347.0 - '@aws-sdk/md5-js': 3.347.0 - '@aws-sdk/middleware-content-length': 3.347.0 - '@aws-sdk/middleware-endpoint': 3.347.0 - '@aws-sdk/middleware-host-header': 3.347.0 - '@aws-sdk/middleware-logger': 3.347.0 - '@aws-sdk/middleware-recursion-detection': 3.347.0 - '@aws-sdk/middleware-retry': 3.354.0 - '@aws-sdk/middleware-sdk-sqs': 3.347.0 - '@aws-sdk/middleware-serde': 3.347.0 - '@aws-sdk/middleware-signing': 3.354.0 - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/middleware-user-agent': 3.352.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/node-http-handler': 3.350.0 - '@aws-sdk/smithy-client': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 - '@aws-sdk/util-base64': 3.310.0 - '@aws-sdk/util-body-length-browser': 3.310.0 - '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.353.0 - '@aws-sdk/util-defaults-mode-node': 3.354.0 - '@aws-sdk/util-endpoints': 3.352.0 - '@aws-sdk/util-retry': 3.347.0 - '@aws-sdk/util-user-agent-browser': 3.347.0 - '@aws-sdk/util-user-agent-node': 3.354.0 - '@aws-sdk/util-utf8': 3.310.0 - '@smithy/protocol-http': 1.1.0 - '@smithy/types': 1.1.0 - fast-xml-parser: 4.2.4 - tslib: 2.6.0 + '@aws-sdk/client-sts': 3.405.0 + '@aws-sdk/credential-provider-node': 3.405.0 + '@aws-sdk/middleware-host-header': 3.398.0 + '@aws-sdk/middleware-logger': 3.398.0 + '@aws-sdk/middleware-recursion-detection': 3.398.0 + '@aws-sdk/middleware-signing': 3.398.0 + '@aws-sdk/middleware-user-agent': 3.398.0 + '@aws-sdk/types': 3.398.0 + '@aws-sdk/util-endpoints': 3.398.0 + '@aws-sdk/util-user-agent-browser': 3.398.0 + '@aws-sdk/util-user-agent-node': 3.405.0 + '@smithy/config-resolver': 2.0.5 + '@smithy/fetch-http-handler': 2.0.5 + '@smithy/hash-node': 2.0.5 + '@smithy/invalid-dependency': 2.0.5 + '@smithy/middleware-content-length': 2.0.5 + '@smithy/middleware-endpoint': 2.0.5 + '@smithy/middleware-retry': 2.0.5 + '@smithy/middleware-serde': 2.0.5 + '@smithy/middleware-stack': 2.0.0 + '@smithy/node-config-provider': 2.0.7 + '@smithy/node-http-handler': 2.0.5 + '@smithy/protocol-http': 2.0.5 + '@smithy/smithy-client': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/url-parser': 2.0.5 + '@smithy/util-base64': 2.0.0 + '@smithy/util-body-length-browser': 2.0.0 + '@smithy/util-body-length-node': 2.1.0 + '@smithy/util-defaults-mode-browser': 2.0.6 + '@smithy/util-defaults-mode-node': 2.0.7 + '@smithy/util-retry': 2.0.0 + '@smithy/util-utf8': 2.0.0 + fast-xml-parser: 4.2.5 + tslib: 2.6.2 transitivePeerDependencies: - aws-crt dev: false - /@aws-sdk/client-sso-oidc@3.354.0: - resolution: {integrity: sha512-XZcg4s2zKb4S8ltluiw5yxpm974uZqzo2HTECt1lbzUJgVgLsMAh/nPJ1fLqg4jadT+rf8Lq2FEFqOM/vxWT8A==} + /@aws-sdk/client-sqs@3.405.0: + resolution: {integrity: sha512-mZ3nKrAK8OntS765pH2kslCpaxtuGIc5TdKcgaFi17p4FD5zP5uzEK1UmUl52Y7YVa1Qpixyzbnzy/lp0J8V/g==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/fetch-http-handler': 3.353.0 - '@aws-sdk/hash-node': 3.347.0 - '@aws-sdk/invalid-dependency': 3.347.0 - '@aws-sdk/middleware-content-length': 3.347.0 - '@aws-sdk/middleware-endpoint': 3.347.0 - '@aws-sdk/middleware-host-header': 3.347.0 - '@aws-sdk/middleware-logger': 3.347.0 - '@aws-sdk/middleware-recursion-detection': 3.347.0 - '@aws-sdk/middleware-retry': 3.354.0 - '@aws-sdk/middleware-serde': 3.347.0 - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/middleware-user-agent': 3.352.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/node-http-handler': 3.350.0 - '@aws-sdk/smithy-client': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 - '@aws-sdk/util-base64': 3.310.0 - '@aws-sdk/util-body-length-browser': 3.310.0 - '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.353.0 - '@aws-sdk/util-defaults-mode-node': 3.354.0 - '@aws-sdk/util-endpoints': 3.352.0 - '@aws-sdk/util-retry': 3.347.0 - '@aws-sdk/util-user-agent-browser': 3.347.0 - '@aws-sdk/util-user-agent-node': 3.354.0 - '@aws-sdk/util-utf8': 3.310.0 - '@smithy/protocol-http': 1.1.0 - '@smithy/types': 1.1.0 - tslib: 2.6.0 + '@aws-sdk/client-sts': 3.405.0 + '@aws-sdk/credential-provider-node': 3.405.0 + '@aws-sdk/middleware-host-header': 3.398.0 + '@aws-sdk/middleware-logger': 3.398.0 + '@aws-sdk/middleware-recursion-detection': 3.398.0 + '@aws-sdk/middleware-sdk-sqs': 3.398.0 + '@aws-sdk/middleware-signing': 3.398.0 + '@aws-sdk/middleware-user-agent': 3.398.0 + '@aws-sdk/types': 3.398.0 + '@aws-sdk/util-endpoints': 3.398.0 + '@aws-sdk/util-user-agent-browser': 3.398.0 + '@aws-sdk/util-user-agent-node': 3.405.0 + '@smithy/config-resolver': 2.0.5 + '@smithy/fetch-http-handler': 2.0.5 + '@smithy/hash-node': 2.0.5 + '@smithy/invalid-dependency': 2.0.5 + '@smithy/md5-js': 2.0.5 + '@smithy/middleware-content-length': 2.0.5 + '@smithy/middleware-endpoint': 2.0.5 + '@smithy/middleware-retry': 2.0.5 + '@smithy/middleware-serde': 2.0.5 + '@smithy/middleware-stack': 2.0.0 + '@smithy/node-config-provider': 2.0.7 + '@smithy/node-http-handler': 2.0.5 + '@smithy/protocol-http': 2.0.5 + '@smithy/smithy-client': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/url-parser': 2.0.5 + '@smithy/util-base64': 2.0.0 + '@smithy/util-body-length-browser': 2.0.0 + '@smithy/util-body-length-node': 2.1.0 + '@smithy/util-defaults-mode-browser': 2.0.6 + '@smithy/util-defaults-mode-node': 2.0.7 + '@smithy/util-retry': 2.0.0 + '@smithy/util-utf8': 2.0.0 + fast-xml-parser: 4.2.5 + tslib: 2.6.2 transitivePeerDependencies: - aws-crt dev: false - /@aws-sdk/client-sso@3.354.0: - resolution: {integrity: sha512-4jmvjJYDaaPmm1n2TG4LYfTEnHLKcJmImgBqhgzhMgaypb4u/k1iw0INV2r/afYPL/FsrLFwc46RM3HYx3nc4A==} + /@aws-sdk/client-sso@3.405.0: + resolution: {integrity: sha512-z1ssydU07bDhe0tNXQwVO+rWh/iSfK48JI8s8vgpBNwH+NejMzIJ9r3AkjCiJ+LSAwlBZItUsNWwR0veIfgBiw==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/fetch-http-handler': 3.353.0 - '@aws-sdk/hash-node': 3.347.0 - '@aws-sdk/invalid-dependency': 3.347.0 - '@aws-sdk/middleware-content-length': 3.347.0 - '@aws-sdk/middleware-endpoint': 3.347.0 - '@aws-sdk/middleware-host-header': 3.347.0 - '@aws-sdk/middleware-logger': 3.347.0 - '@aws-sdk/middleware-recursion-detection': 3.347.0 - '@aws-sdk/middleware-retry': 3.354.0 - '@aws-sdk/middleware-serde': 3.347.0 - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/middleware-user-agent': 3.352.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/node-http-handler': 3.350.0 - '@aws-sdk/smithy-client': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 - '@aws-sdk/util-base64': 3.310.0 - '@aws-sdk/util-body-length-browser': 3.310.0 - '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.353.0 - '@aws-sdk/util-defaults-mode-node': 3.354.0 - '@aws-sdk/util-endpoints': 3.352.0 - '@aws-sdk/util-retry': 3.347.0 - '@aws-sdk/util-user-agent-browser': 3.347.0 - '@aws-sdk/util-user-agent-node': 3.354.0 - '@aws-sdk/util-utf8': 3.310.0 - '@smithy/protocol-http': 1.1.0 - '@smithy/types': 1.1.0 - tslib: 2.6.0 + '@aws-sdk/middleware-host-header': 3.398.0 + '@aws-sdk/middleware-logger': 3.398.0 + '@aws-sdk/middleware-recursion-detection': 3.398.0 + '@aws-sdk/middleware-user-agent': 3.398.0 + '@aws-sdk/types': 3.398.0 + '@aws-sdk/util-endpoints': 3.398.0 + '@aws-sdk/util-user-agent-browser': 3.398.0 + '@aws-sdk/util-user-agent-node': 3.405.0 + '@smithy/config-resolver': 2.0.5 + '@smithy/fetch-http-handler': 2.0.5 + '@smithy/hash-node': 2.0.5 + '@smithy/invalid-dependency': 2.0.5 + '@smithy/middleware-content-length': 2.0.5 + '@smithy/middleware-endpoint': 2.0.5 + '@smithy/middleware-retry': 2.0.5 + '@smithy/middleware-serde': 2.0.5 + '@smithy/middleware-stack': 2.0.0 + '@smithy/node-config-provider': 2.0.7 + '@smithy/node-http-handler': 2.0.5 + '@smithy/protocol-http': 2.0.5 + '@smithy/smithy-client': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/url-parser': 2.0.5 + '@smithy/util-base64': 2.0.0 + '@smithy/util-body-length-browser': 2.0.0 + '@smithy/util-body-length-node': 2.1.0 + '@smithy/util-defaults-mode-browser': 2.0.6 + '@smithy/util-defaults-mode-node': 2.0.7 + '@smithy/util-retry': 2.0.0 + '@smithy/util-utf8': 2.0.0 + tslib: 2.6.2 transitivePeerDependencies: - aws-crt dev: false - /@aws-sdk/client-sts@3.354.0: - resolution: {integrity: sha512-l9Ar/C/3PNlToM1ukHVfBtp4plbRUxLMYY2DOTMI0nb3jzfcvETBcdEGCP51fX4uAfJ2vc4g5qBF/qXKX0LMWA==} + /@aws-sdk/client-sts@3.405.0: + resolution: {integrity: sha512-asVEpda3zu5QUO5ZNNjbLBS0718IhxxyUDVrNmVTKZoOhK1pMNouGZf+l49v0Lb5cOPbUds8cxsNaInj2MvIKw==} engines: {node: '>=14.0.0'} dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/credential-provider-node': 3.354.0 - '@aws-sdk/fetch-http-handler': 3.353.0 - '@aws-sdk/hash-node': 3.347.0 - '@aws-sdk/invalid-dependency': 3.347.0 - '@aws-sdk/middleware-content-length': 3.347.0 - '@aws-sdk/middleware-endpoint': 3.347.0 - '@aws-sdk/middleware-host-header': 3.347.0 - '@aws-sdk/middleware-logger': 3.347.0 - '@aws-sdk/middleware-recursion-detection': 3.347.0 - '@aws-sdk/middleware-retry': 3.354.0 - '@aws-sdk/middleware-sdk-sts': 3.354.0 - '@aws-sdk/middleware-serde': 3.347.0 - '@aws-sdk/middleware-signing': 3.354.0 - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/middleware-user-agent': 3.352.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/node-http-handler': 3.350.0 - '@aws-sdk/smithy-client': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 - '@aws-sdk/util-base64': 3.310.0 - '@aws-sdk/util-body-length-browser': 3.310.0 - '@aws-sdk/util-body-length-node': 3.310.0 - '@aws-sdk/util-defaults-mode-browser': 3.353.0 - '@aws-sdk/util-defaults-mode-node': 3.354.0 - '@aws-sdk/util-endpoints': 3.352.0 - '@aws-sdk/util-retry': 3.347.0 - '@aws-sdk/util-user-agent-browser': 3.347.0 - '@aws-sdk/util-user-agent-node': 3.354.0 - '@aws-sdk/util-utf8': 3.310.0 - '@smithy/protocol-http': 1.1.0 - '@smithy/types': 1.1.0 - fast-xml-parser: 4.2.4 - tslib: 2.6.0 + '@aws-sdk/credential-provider-node': 3.405.0 + '@aws-sdk/middleware-host-header': 3.398.0 + '@aws-sdk/middleware-logger': 3.398.0 + '@aws-sdk/middleware-recursion-detection': 3.398.0 + '@aws-sdk/middleware-sdk-sts': 3.398.0 + '@aws-sdk/middleware-signing': 3.398.0 + '@aws-sdk/middleware-user-agent': 3.398.0 + '@aws-sdk/types': 3.398.0 + '@aws-sdk/util-endpoints': 3.398.0 + '@aws-sdk/util-user-agent-browser': 3.398.0 + '@aws-sdk/util-user-agent-node': 3.405.0 + '@smithy/config-resolver': 2.0.5 + '@smithy/fetch-http-handler': 2.0.5 + '@smithy/hash-node': 2.0.5 + '@smithy/invalid-dependency': 2.0.5 + '@smithy/middleware-content-length': 2.0.5 + '@smithy/middleware-endpoint': 2.0.5 + '@smithy/middleware-retry': 2.0.5 + '@smithy/middleware-serde': 2.0.5 + '@smithy/middleware-stack': 2.0.0 + '@smithy/node-config-provider': 2.0.7 + '@smithy/node-http-handler': 2.0.5 + '@smithy/protocol-http': 2.0.5 + '@smithy/smithy-client': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/url-parser': 2.0.5 + '@smithy/util-base64': 2.0.0 + '@smithy/util-body-length-browser': 2.0.0 + '@smithy/util-body-length-node': 2.1.0 + '@smithy/util-defaults-mode-browser': 2.0.6 + '@smithy/util-defaults-mode-node': 2.0.7 + '@smithy/util-retry': 2.0.0 + '@smithy/util-utf8': 2.0.0 + fast-xml-parser: 4.2.5 + tslib: 2.6.2 transitivePeerDependencies: - aws-crt dev: false - /@aws-sdk/config-resolver@3.354.0: - resolution: {integrity: sha512-K4XWie8yJPT8bpYVX54VJMQhiJRTw8PrjEs9QrKqvwoCcZ3G4qEt40tIu33XksuokXxk8rrVH5d7odOPBsAtdg==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-config-provider': 3.310.0 - '@aws-sdk/util-middleware': 3.347.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/credential-provider-env@3.353.0: - resolution: {integrity: sha512-Y4VsNS8O1FAD5J7S5itOhnOghQ5LIXlZ44t35nF8cbcF+JPvY3ToKzYpjYN1jM7DXKqU4shtqgYpzSqxlvEgKQ==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/credential-provider-imds@3.354.0: - resolution: {integrity: sha512-AB+PuDd1jX6qgz+JYvIyOn8Kz9/lQ60KuY1TFb7g3S8zURw+DSeMJNR1jzEsorWICTzhxXmyasHVMa4Eo4Uq+Q==} + /@aws-sdk/credential-provider-env@3.398.0: + resolution: {integrity: sha512-Z8Yj5z7FroAsR6UVML+XUdlpoqEe9Dnle8c2h8/xWwIC2feTfIBhjLhRVxfbpbM1pLgBSNEcZ7U8fwq5l7ESVQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@smithy/property-provider': 2.0.6 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false - /@aws-sdk/credential-provider-ini@3.354.0: - resolution: {integrity: sha512-bn2ifrRsxWpxzwXa25jRdUECQ1dC+NB3YlRYnGdIaIQLF559N2jnfCabYzqyfKI++WU7aQeMofPe2PxVGlbv9Q==} + /@aws-sdk/credential-provider-ini@3.405.0: + resolution: {integrity: sha512-b4TqVsM4WQM96GDVs+TYOhU2/0SnUWzz6NH55qY1y2xyF8/pZEhc0XXdpvZtQQBLGdROhXCbxhBVye8GmTpgcg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/credential-provider-env': 3.353.0 - '@aws-sdk/credential-provider-imds': 3.354.0 - '@aws-sdk/credential-provider-process': 3.354.0 - '@aws-sdk/credential-provider-sso': 3.354.0 - '@aws-sdk/credential-provider-web-identity': 3.354.0 - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/shared-ini-file-loader': 3.354.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/credential-provider-env': 3.398.0 + '@aws-sdk/credential-provider-process': 3.405.0 + '@aws-sdk/credential-provider-sso': 3.405.0 + '@aws-sdk/credential-provider-web-identity': 3.398.0 + '@aws-sdk/types': 3.398.0 + '@smithy/credential-provider-imds': 2.0.7 + '@smithy/property-provider': 2.0.6 + '@smithy/shared-ini-file-loader': 2.0.6 + '@smithy/types': 2.2.2 + tslib: 2.6.2 transitivePeerDependencies: - aws-crt dev: false - /@aws-sdk/credential-provider-node@3.354.0: - resolution: {integrity: sha512-ltKiRtHfqDaCcrb44DIoSHQ9MposFl/aDtNdu5OdQv/2Q1r7M/r2fQdq9DHOrxeQQjaUH4C6k6fGTsxALTHyNA==} + /@aws-sdk/credential-provider-node@3.405.0: + resolution: {integrity: sha512-AMmRP09nwYsft0MXDlHIxMQe7IloWW8As0lbZmPrG7Y7mK5RDmCIwD2yMDz77Zqlv09FsYt+9+cOK2fTNhim+Q==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/credential-provider-env': 3.353.0 - '@aws-sdk/credential-provider-imds': 3.354.0 - '@aws-sdk/credential-provider-ini': 3.354.0 - '@aws-sdk/credential-provider-process': 3.354.0 - '@aws-sdk/credential-provider-sso': 3.354.0 - '@aws-sdk/credential-provider-web-identity': 3.354.0 - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/shared-ini-file-loader': 3.354.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/credential-provider-env': 3.398.0 + '@aws-sdk/credential-provider-ini': 3.405.0 + '@aws-sdk/credential-provider-process': 3.405.0 + '@aws-sdk/credential-provider-sso': 3.405.0 + '@aws-sdk/credential-provider-web-identity': 3.398.0 + '@aws-sdk/types': 3.398.0 + '@smithy/credential-provider-imds': 2.0.7 + '@smithy/property-provider': 2.0.6 + '@smithy/shared-ini-file-loader': 2.0.6 + '@smithy/types': 2.2.2 + tslib: 2.6.2 transitivePeerDependencies: - aws-crt dev: false - /@aws-sdk/credential-provider-process@3.354.0: - resolution: {integrity: sha512-AxpASm+tS8V1PY4PLfG9dtqa96lzBJ3niTQb+RAm4uYCddW7gxNDkGB+jSCzVdUPVa3xA2ITBS/ka3C5yM8YWg==} + /@aws-sdk/credential-provider-process@3.405.0: + resolution: {integrity: sha512-EqAMcUVeZAICYHHL8x5Fi5CYPgCo9UCE7ScWmU5Sa2wAFY4XLyQ1mMxX3lKGYx9lBxWk3dqnhmvlcqdzN7AjyQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/shared-ini-file-loader': 3.354.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@smithy/property-provider': 2.0.6 + '@smithy/shared-ini-file-loader': 2.0.6 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false - /@aws-sdk/credential-provider-sso@3.354.0: - resolution: {integrity: sha512-ihiaUxh8V/nQgTOgQZxWQcbckXhM+J6Wdc4F0z9soi48iSOqzRpzPw5E14wSZScEZjNY/gKEDz8gCt8WkT/G0w==} + /@aws-sdk/credential-provider-sso@3.405.0: + resolution: {integrity: sha512-fXqSgQHz7qcmIWMVguwSMSjqFkVfN2+XiNgiskcmeYiCS7mIGAgUnKABZc9Ds2+YW9ATYiY0BOD5aWxc8TX5fA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/client-sso': 3.354.0 - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/shared-ini-file-loader': 3.354.0 - '@aws-sdk/token-providers': 3.354.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/client-sso': 3.405.0 + '@aws-sdk/token-providers': 3.405.0 + '@aws-sdk/types': 3.398.0 + '@smithy/property-provider': 2.0.6 + '@smithy/shared-ini-file-loader': 2.0.6 + '@smithy/types': 2.2.2 + tslib: 2.6.2 transitivePeerDependencies: - aws-crt dev: false - /@aws-sdk/credential-provider-web-identity@3.354.0: - resolution: {integrity: sha512-scx9mAf4m3Hc3uMX2Vh8GciEcC/5GqeDI8qc0zBj+UF/5c/GtihZA4WoCV3Sg3jMPDUKY81DiFCtcKHhtUqKfg==} + /@aws-sdk/credential-provider-web-identity@3.398.0: + resolution: {integrity: sha512-iG3905Alv9pINbQ8/MIsshgqYMbWx+NDQWpxbIW3W0MkSH3iAqdVpSCteYidYX9G/jv2Um1nW3y360ib20bvNg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@smithy/property-provider': 2.0.6 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false /@aws-sdk/endpoint-cache@3.310.0: @@ -2208,658 +2195,400 @@ packages: engines: {node: '>=14.0.0'} dependencies: mnemonist: 0.38.3 - tslib: 2.6.0 + tslib: 2.6.2 dev: false - /@aws-sdk/eventstream-codec@3.347.0: - resolution: {integrity: sha512-61q+SyspjsaQ4sdgjizMyRgVph2CiW4aAtfpoH69EJFJfTxTR/OqnZ9Jx/3YiYi0ksrvDenJddYodfWWJqD8/w==} + /@aws-sdk/is-array-buffer@3.201.0(patch_hash=lcduyc25etdvbxthpjpldc7hvu): + resolution: {integrity: sha512-UPez5qLh3dNgt0DYnPD/q0mVJY84rA17QE26hVNOW3fAji8W2wrwrxdacWOxyXvlxWsVRcKmr+lay1MDqpAMfg==} + engines: {node: '>=14.0.0'} dependencies: - '@aws-crypto/crc32': 3.0.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-hex-encoding': 3.310.0 - tslib: 2.6.0 + tslib: 2.6.2 dev: false + patched: true - /@aws-sdk/eventstream-serde-browser@3.347.0: - resolution: {integrity: sha512-9BLVTHWgpiTo/hl+k7qt7E9iYu43zVwJN+4TEwA9ZZB3p12068t1Hay6HgCcgJC3+LWMtw/OhvypV6vQAG4UBg==} + /@aws-sdk/is-array-buffer@3.310.0: + resolution: {integrity: sha512-urnbcCR+h9NWUnmOtet/s4ghvzsidFmspfhYaHAmSRdy9yDjdjBJMFjjsn85A1ODUktztm+cVncXjQ38WCMjMQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/eventstream-serde-universal': 3.347.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + tslib: 2.6.2 dev: false - /@aws-sdk/eventstream-serde-config-resolver@3.347.0: - resolution: {integrity: sha512-RcXQbNVq0PFmDqfn6+MnjCUWbbobcYVxpimaF6pMDav04o6Mcle+G2Hrefp5NlFr/lZbHW2eUKYsp1sXPaxVlQ==} + /@aws-sdk/middleware-bucket-endpoint@3.405.0: + resolution: {integrity: sha512-wKmHZi44NkbaGXXbMwassUm06/wDtSYucPbM4paU2cMbBUOnwFpndHWlrRYCNmj5Ty5A2HjdkGlhgla8nifHzQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@aws-sdk/util-arn-parser': 3.310.0 + '@smithy/protocol-http': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/util-config-provider': 2.0.0 + tslib: 2.6.2 dev: false - /@aws-sdk/eventstream-serde-node@3.347.0: - resolution: {integrity: sha512-pgQCWH0PkHjcHs04JE7FoGAD3Ww45ffV8Op0MSLUhg9OpGa6EDoO3EOpWi9l/TALtH4f0KRV35PVyUyHJ/wEkA==} + /@aws-sdk/middleware-endpoint-discovery@3.405.0: + resolution: {integrity: sha512-6Q4quuNjXEkX61eI6/UJOh16SGBZzGykJu/SYrALftHpn8D+hgeaOpc2wAkpObT8KSItoRSE/uXWTnN7XNmJLA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/eventstream-serde-universal': 3.347.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/endpoint-cache': 3.310.0 + '@aws-sdk/types': 3.398.0 + '@smithy/protocol-http': 2.0.5 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false - /@aws-sdk/eventstream-serde-universal@3.347.0: - resolution: {integrity: sha512-4wWj6bz6lOyDIO/dCCjwaLwRz648xzQQnf89R29sLoEqvAPP5XOB7HL+uFaQ/f5tPNh49gL6huNFSVwDm62n4Q==} + /@aws-sdk/middleware-expect-continue@3.398.0: + resolution: {integrity: sha512-d6he+Qqwh1yqml9duXSv5iKJ2lS0PVrF2UEsVew2GFxfUif0E/davTZJjvWtnelbuIGcTP+wDKVVjLwBN2sN/g==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/eventstream-codec': 3.347.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@smithy/protocol-http': 2.0.5 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false - /@aws-sdk/fetch-http-handler@3.353.0: - resolution: {integrity: sha512-8ic2+4E6jzfDevd++QS1rOR05QFkAhEFbi5Ja3/Zzp7TkWIS8wv5wwMATjNkbbdsXYuB5Lhl/OsjfZmIv5aqRw==} + /@aws-sdk/middleware-flexible-checksums@3.400.0: + resolution: {integrity: sha512-lpsumd5/G+eAMTr61h/cJQZ8+i+xzC6OG3bvUcbRHqcjN49XgeNLcPfYcr6Rzf0QHxmuCN4te/4XGU3Fif2YVA==} + engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/querystring-builder': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-base64': 3.310.0 - tslib: 2.6.0 + '@aws-crypto/crc32': 3.0.0 + '@aws-crypto/crc32c': 3.0.0 + '@aws-sdk/types': 3.398.0 + '@smithy/is-array-buffer': 2.0.0 + '@smithy/protocol-http': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/util-utf8': 2.0.0 + tslib: 2.6.2 dev: false - /@aws-sdk/hash-blob-browser@3.353.0: - resolution: {integrity: sha512-YO/38oTbTY5URjmYLU5YDh1VmHndWT7h3a0T5vM9K7AAoqdVbGXP1Di9zpEmteH4rurZNEqLGuLw9/p9dTre6Q==} + /@aws-sdk/middleware-host-header@3.398.0: + resolution: {integrity: sha512-m+5laWdBaxIZK2ko0OwcCHJZJ5V1MgEIt8QVQ3k4/kOkN9ICjevOYmba751pHoTnbOYB7zQd6D2OT3EYEEsUcA==} + engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/chunked-blob-reader': 3.310.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@smithy/protocol-http': 2.0.5 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false - /@aws-sdk/hash-node@3.347.0: - resolution: {integrity: sha512-96+ml/4EaUaVpzBdOLGOxdoXOjkPgkoJp/0i1fxOJEvl8wdAQSwc3IugVK9wZkCxy2DlENtgOe6DfIOhfffm/g==} + /@aws-sdk/middleware-location-constraint@3.398.0: + resolution: {integrity: sha512-it+olJf1Lf2bmH8OL/N1jMOFB0zEVYs4rIzgFrluTRCuPatRuDi4LsXS8zqYxkBa05JE8JmqwW5gCzAmWyLLqw==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-buffer-from': 3.310.0 - '@aws-sdk/util-utf8': 3.310.0 - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false - /@aws-sdk/hash-stream-node@3.347.0: - resolution: {integrity: sha512-tOBfcvELyt1GVuAlQ4d0mvm3QxoSSmvhH15SWIubM9RP4JWytBVzaFAn/aC02DBAWyvp0acMZ5J+47mxrWJElg==} + /@aws-sdk/middleware-logger@3.398.0: + resolution: {integrity: sha512-CiJjW+FL12elS6Pn7/UVjVK8HWHhXMfvHZvOwx/Qkpy340sIhkuzOO6fZEruECDTZhl2Wqn81XdJ1ZQ4pRKpCg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-utf8': 3.310.0 - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false - /@aws-sdk/invalid-dependency@3.347.0: - resolution: {integrity: sha512-8imQcwLwqZ/wTJXZqzXT9pGLIksTRckhGLZaXT60tiBOPKuerTsus2L59UstLs5LP8TKaVZKFFSsjRIn9dQdmQ==} + /@aws-sdk/middleware-recursion-detection@3.398.0: + resolution: {integrity: sha512-7QpOqPQAZNXDXv6vsRex4R8dLniL0E/80OPK4PPFsrCh9btEyhN9Begh4i1T+5lL28hmYkztLOkTQ2N5J3hgRQ==} + engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@smithy/protocol-http': 2.0.5 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false - /@aws-sdk/is-array-buffer@3.201.0(patch_hash=lcduyc25etdvbxthpjpldc7hvu): - resolution: {integrity: sha512-UPez5qLh3dNgt0DYnPD/q0mVJY84rA17QE26hVNOW3fAji8W2wrwrxdacWOxyXvlxWsVRcKmr+lay1MDqpAMfg==} + /@aws-sdk/middleware-sdk-s3@3.398.0: + resolution: {integrity: sha512-yweSMc/TyiFtqc52hFMKQJvTm3i1KCoW5mB3o/Sla6zsHBh+nS6TTaBmo+2kcDIR7AKODwW+FLCTHWiazb7J3Q==} engines: {node: '>=14.0.0'} dependencies: - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@aws-sdk/util-arn-parser': 3.310.0 + '@smithy/protocol-http': 2.0.5 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false - patched: true - /@aws-sdk/is-array-buffer@3.310.0: - resolution: {integrity: sha512-urnbcCR+h9NWUnmOtet/s4ghvzsidFmspfhYaHAmSRdy9yDjdjBJMFjjsn85A1ODUktztm+cVncXjQ38WCMjMQ==} + /@aws-sdk/middleware-sdk-sqs@3.398.0: + resolution: {integrity: sha512-O4MuAP14DuGRGFDIX7lWnR30Hx45SWx8p5vhERRMzC8Xjp3UDcLoJecFSv0/yn7KgSCho1Y61tFeyLic94+jzA==} engines: {node: '>=14.0.0'} dependencies: - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@smithy/types': 2.2.2 + '@smithy/util-hex-encoding': 2.0.0 + '@smithy/util-utf8': 2.0.0 + tslib: 2.6.2 dev: false - /@aws-sdk/md5-js@3.347.0: - resolution: {integrity: sha512-mChE+7DByTY9H4cQ6fnWp2x5jf8e6OZN+AdLp6WQ+W99z35zBeqBxVmgm8ziJwkMIrkSTv9j3Y7T9Ve3RIcSfg==} + /@aws-sdk/middleware-sdk-sts@3.398.0: + resolution: {integrity: sha512-+JH76XHEgfVihkY+GurohOQ5Z83zVN1nYcQzwCFnCDTh4dG4KwhnZKG+WPw6XJECocY0R+H0ivofeALHvVWJtQ==} + engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-utf8': 3.310.0 - tslib: 2.6.0 + '@aws-sdk/middleware-signing': 3.398.0 + '@aws-sdk/types': 3.398.0 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-bucket-endpoint@3.354.0: - resolution: {integrity: sha512-CU1RIwY8dqoPm+TixXHu4p0XziT6kXps1ip+hauxUC/BNalu2Cln8QwukDtYhN0IF9s82NhrDlDkI6RIzfGn2Q==} + /@aws-sdk/middleware-signing@3.398.0: + resolution: {integrity: sha512-O0KqXAix1TcvZBFt1qoFkHMUNJOSgjJTYS7lFTRKSwgsD27bdW2TM2r9R8DAccWFt5Amjkdt+eOwQMIXPGTm8w==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-arn-parser': 3.310.0 - '@aws-sdk/util-config-provider': 3.310.0 - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@smithy/property-provider': 2.0.6 + '@smithy/protocol-http': 2.0.5 + '@smithy/signature-v4': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/util-middleware': 2.0.0 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-content-length@3.347.0: - resolution: {integrity: sha512-i4qtWTDImMaDUtwKQPbaZpXsReiwiBomM1cWymCU4bhz81HL01oIxOxOBuiM+3NlDoCSPr3KI6txZSz/8cqXCQ==} + /@aws-sdk/middleware-ssec@3.398.0: + resolution: {integrity: sha512-QtKr/hPcRugKSIZAH4+7hbUfdW7Lg+OQvD25nJn7ic1JHRZ+eDctEFxdsmnt68lE6aZxOcHCWHAW6/umcA93Dw==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-endpoint-discovery@3.354.0: - resolution: {integrity: sha512-w4Kkx/OzDpDOZnahqq5nDHM5didMlGdQmXM/omZztNMGOm2sYIzgrQRwIPNOmr4QOzhUQHpEiVfMwgienuIdIA==} + /@aws-sdk/middleware-user-agent@3.398.0: + resolution: {integrity: sha512-nF1jg0L+18b5HvTcYzwyFgfZQQMELJINFqI0mi4yRKaX7T5a3aGp5RVLGGju/6tAGTuFbfBoEhkhU3kkxexPYQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/endpoint-cache': 3.310.0 - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@aws-sdk/util-endpoints': 3.398.0 + '@smithy/protocol-http': 2.0.5 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-endpoint@3.347.0: - resolution: {integrity: sha512-unF0c6dMaUL1ffU+37Ugty43DgMnzPWXr/Jup/8GbK5fzzWT5NQq6dj9KHPubMbWeEjQbmczvhv25JuJdK8gNQ==} + /@aws-sdk/node-http-handler@3.350.0: + resolution: {integrity: sha512-oD96GAlmpzYilCdC8wwyURM5lNfNHZCjm/kxBkQulHKa2kRbIrnD9GfDqdCkWA5cTpjh1NzGLT4D6e6UFDjt9w==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/middleware-serde': 3.347.0 + '@aws-sdk/abort-controller': 3.347.0 + '@aws-sdk/protocol-http': 3.347.0 + '@aws-sdk/querystring-builder': 3.347.0 '@aws-sdk/types': 3.347.0 - '@aws-sdk/url-parser': 3.347.0 - '@aws-sdk/util-middleware': 3.347.0 - tslib: 2.6.0 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-expect-continue@3.347.0: - resolution: {integrity: sha512-95M1unD1ENL0tx35dfyenSfx0QuXBSKtOi/qJja6LfX5771C5fm5ZTOrsrzPFJvRg/wj8pCOVWRZk+d5+jvfOQ==} + /@aws-sdk/protocol-http@3.347.0: + resolution: {integrity: sha512-2YdBhc02Wvy03YjhGwUxF0UQgrPWEy8Iq75pfS42N+/0B/+eWX1aQgfjFxIpLg7YSjT5eKtYOQGlYd4MFTgj9g==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.347.0 '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-flexible-checksums@3.347.0: - resolution: {integrity: sha512-Pda7VMAIyeHw9nMp29rxdFft3EF4KP/tz/vLB6bqVoBNbLujo5rxn3SGOgStgIz7fuMLQQfoWIsmvxUm+Fp+Dw==} + /@aws-sdk/querystring-builder@3.347.0: + resolution: {integrity: sha512-phtKTe6FXoV02MoPkIVV6owXI8Mwr5IBN3bPoxhcPvJG2AjEmnetSIrhb8kwc4oNhlwfZwH6Jo5ARW/VEWbZtg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-crypto/crc32': 3.0.0 - '@aws-crypto/crc32c': 3.0.0 - '@aws-sdk/is-array-buffer': 3.310.0 - '@aws-sdk/protocol-http': 3.347.0 '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-utf8': 3.310.0 - tslib: 2.6.0 + '@aws-sdk/util-uri-escape': 3.310.0 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-host-header@3.347.0: - resolution: {integrity: sha512-kpKmR9OvMlnReqp5sKcJkozbj1wmlblbVSbnQAIkzeQj2xD5dnVR3Nn2ogQKxSmU1Fv7dEroBtrruJ1o3fY38A==} + /@aws-sdk/signature-v4-multi-region@3.398.0: + resolution: {integrity: sha512-8fTqTxRDWE03T7ClaWlCfbwuSae//01XMNVy2a9g5QgaelQh7ZZyU3ZIJiV8gIj8v6ZM0NGn9Bz1liI/vmNmcw==} engines: {node: '>=14.0.0'} + peerDependencies: + '@aws-sdk/signature-v4-crt': ^3.118.0 + peerDependenciesMeta: + '@aws-sdk/signature-v4-crt': + optional: true dependencies: - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@smithy/protocol-http': 2.0.5 + '@smithy/signature-v4': 2.0.5 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-location-constraint@3.347.0: - resolution: {integrity: sha512-x5fcEV7q8fQ0OmUO+cLhN5iPqGoLWtC3+aKHIfRRb2BpOO1khyc1FKzsIAdeQz2hfktq4j+WsrmcPvFKv51pSg==} + /@aws-sdk/token-providers@3.405.0: + resolution: {integrity: sha512-rVzC7ptf7TlV84M9w+Ds9isio1EY7bs1MRFv/6lmYstsyTri+DaZG10TwXSGfzIMwB0yVh11niCxO9wSjQ36zg==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-crypto/sha256-browser': 3.0.0 + '@aws-crypto/sha256-js': 3.0.0 + '@aws-sdk/middleware-host-header': 3.398.0 + '@aws-sdk/middleware-logger': 3.398.0 + '@aws-sdk/middleware-recursion-detection': 3.398.0 + '@aws-sdk/middleware-user-agent': 3.398.0 + '@aws-sdk/types': 3.398.0 + '@aws-sdk/util-endpoints': 3.398.0 + '@aws-sdk/util-user-agent-browser': 3.398.0 + '@aws-sdk/util-user-agent-node': 3.405.0 + '@smithy/config-resolver': 2.0.5 + '@smithy/fetch-http-handler': 2.0.5 + '@smithy/hash-node': 2.0.5 + '@smithy/invalid-dependency': 2.0.5 + '@smithy/middleware-content-length': 2.0.5 + '@smithy/middleware-endpoint': 2.0.5 + '@smithy/middleware-retry': 2.0.5 + '@smithy/middleware-serde': 2.0.5 + '@smithy/middleware-stack': 2.0.0 + '@smithy/node-config-provider': 2.0.7 + '@smithy/node-http-handler': 2.0.5 + '@smithy/property-provider': 2.0.6 + '@smithy/protocol-http': 2.0.5 + '@smithy/shared-ini-file-loader': 2.0.6 + '@smithy/smithy-client': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/url-parser': 2.0.5 + '@smithy/util-base64': 2.0.0 + '@smithy/util-body-length-browser': 2.0.0 + '@smithy/util-body-length-node': 2.1.0 + '@smithy/util-defaults-mode-browser': 2.0.6 + '@smithy/util-defaults-mode-node': 2.0.7 + '@smithy/util-retry': 2.0.0 + '@smithy/util-utf8': 2.0.0 + tslib: 2.6.2 + transitivePeerDependencies: + - aws-crt dev: false - /@aws-sdk/middleware-logger@3.347.0: - resolution: {integrity: sha512-NYC+Id5UCkVn+3P1t/YtmHt75uED06vwaKyxDy0UmB2K66PZLVtwWbLpVWrhbroaw1bvUHYcRyQ9NIfnVcXQjA==} + /@aws-sdk/types@3.347.0: + resolution: {integrity: sha512-GkCMy79mdjU9OTIe5KT58fI/6uqdf8UmMdWqVHmFJ+UpEzOci7L/uw4sOXWo7xpPzLs6cJ7s5ouGZW4GRPmHFA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-recursion-detection@3.347.0: - resolution: {integrity: sha512-qfnSvkFKCAMjMHR31NdsT0gv5Sq/ZHTUD4yQsSLpbVQ6iYAS834lrzXt41iyEHt57Y514uG7F/Xfvude3u4icQ==} + /@aws-sdk/types@3.398.0: + resolution: {integrity: sha512-r44fkS+vsEgKCuEuTV+TIk0t0m5ZlXHNjSDYEUvzLStbbfUFiNus/YG4UCa0wOk9R7VuQI67badsvvPeVPCGDQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-retry@3.354.0: - resolution: {integrity: sha512-dnG5Nd/mobbhcWCM71DQWI9+f6b6fDSzALXftFIP/8lsXKRcWDSQuYjrnVST2wZzk/QmdF8TnVD0C1xL14K6CQ==} + /@aws-sdk/util-arn-parser@3.310.0: + resolution: {integrity: sha512-jL8509owp/xB9+Or0pvn3Fe+b94qfklc2yPowZZIFAkFcCSIdkIglz18cPDWnYAcy9JGewpMS1COXKIUhZkJsA==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/service-error-classification': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-middleware': 3.347.0 - '@aws-sdk/util-retry': 3.347.0 - tslib: 2.6.0 - uuid: 8.3.2 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-sdk-s3@3.347.0: - resolution: {integrity: sha512-TLr92+HMvamrhJJ0VDhA/PiUh4rTNQz38B9dB9ikohTaRgm+duP+mRiIv16tNPZPGl8v82Thn7Ogk2qPByNDtg==} + /@aws-sdk/util-buffer-from@3.208.0(patch_hash=2u2tbs2t5afqejrdyi43ufdqau): + resolution: {integrity: sha512-7L0XUixNEFcLUGPeBF35enCvB9Xl+K6SQsmbrPk1P3mlV9mguWSDQqbOBwY1Ir0OVbD6H/ZOQU7hI/9RtRI0Zw==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-arn-parser': 3.310.0 - tslib: 2.6.0 + '@aws-sdk/is-array-buffer': 3.201.0(patch_hash=lcduyc25etdvbxthpjpldc7hvu) + tslib: 2.6.2 dev: false + patched: true - /@aws-sdk/middleware-sdk-sqs@3.347.0: - resolution: {integrity: sha512-TSBTQoOVe9cDm9am4NOov1YZxbQ3LPBl7Ex0jblDFgUXqE9kNU3Kx/yc8edOLcq+5AFrgqT0NFD7pwFlQPh3KQ==} + /@aws-sdk/util-buffer-from@3.310.0: + resolution: {integrity: sha512-i6LVeXFtGih5Zs8enLrt+ExXY92QV25jtEnTKHsmlFqFAuL3VBeod6boeMXkN2p9lbSVVQ1sAOOYZOHYbYkntw==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-hex-encoding': 3.310.0 - '@aws-sdk/util-utf8': 3.310.0 - tslib: 2.6.0 + '@aws-sdk/is-array-buffer': 3.310.0 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-sdk-sts@3.354.0: - resolution: {integrity: sha512-L6vyAwYrdcOoB4YgCqNJNr+ZZtLHEF2Ym3CTfmFm2srXHqHuRB+mBu0NLV/grz77znIArK1H1ZL/ZaH2I5hclA==} + /@aws-sdk/util-dynamodb@3.405.0: + resolution: {integrity: sha512-MY7PN7Qp9UbU2pRvNZMl1kBNfOP7yjv+Ee4/S81A0ubb6cR7IDzgfZH9Wrv0+3dFwHxltOeDq00wC5OeRwUWAw==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/middleware-signing': 3.354.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-serde@3.347.0: - resolution: {integrity: sha512-x5Foi7jRbVJXDu9bHfyCbhYDH5pKK+31MmsSJ3k8rY8keXLBxm2XEEg/AIoV9/TUF9EeVvZ7F1/RmMpJnWQsEg==} + /@aws-sdk/util-endpoints@3.398.0: + resolution: {integrity: sha512-Fy0gLYAei/Rd6BrXG4baspCnWTUSd0NdokU1pZh4KlfEAEN1i8SPPgfiO5hLk7+2inqtCmqxVJlfqbMVe9k4bw==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-signing@3.354.0: - resolution: {integrity: sha512-Dd+vIhJL0VqqKWqlTKlKC5jkCaEIk73ZEXNfv44XbsI25a0vXbatHp1M8jB/cgkJC/Mri1TX9dmckP/C0FDEwA==} + /@aws-sdk/util-locate-window@3.310.0: + resolution: {integrity: sha512-qo2t/vBTnoXpjKxlsC2e1gBrRm80M3bId27r0BRB2VniSSe7bL1mmzM+/HFtujm0iAxtPM+aLEflLJlJeDPg0w==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/signature-v4': 3.354.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-middleware': 3.347.0 - tslib: 2.6.0 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-ssec@3.347.0: - resolution: {integrity: sha512-467VEi2elPmUGcHAgTmzhguZ3lwTpwK+3s+pk312uZtVsS9rP1MAknYhpS3ZvssiqBUVPx8m29cLcC6Tx5nOJg==} + /@aws-sdk/util-stream-node@3.350.0: + resolution: {integrity: sha512-qhcmYEAVMJPjCepog3WTFBaeP3XCkLBbUrM5/+LaB/FASKk+JeV8qBQyjYUd8EVb6Gsk7+y9SE3Tj+ChyHB4WA==} engines: {node: '>=14.0.0'} dependencies: + '@aws-sdk/node-http-handler': 3.350.0 '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/util-buffer-from': 3.310.0 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-stack@3.347.0: - resolution: {integrity: sha512-Izidg4rqtYMcKuvn2UzgEpPLSmyd8ub9+LQ2oIzG3mpIzCBITq7wp40jN1iNkMg+X6KEnX9vdMJIYZsPYMCYuQ==} + /@aws-sdk/util-uri-escape@3.310.0: + resolution: {integrity: sha512-drzt+aB2qo2LgtDoiy/3sVG8w63cgLkqFIa2NFlGpUgHFWTXkqtbgf4L5QdjRGKWhmZsnqkbtL7vkSWEcYDJ4Q==} engines: {node: '>=14.0.0'} dependencies: - tslib: 2.6.0 + tslib: 2.6.2 dev: false - /@aws-sdk/middleware-user-agent@3.352.0: - resolution: {integrity: sha512-QGqblMTsVDqeomy22KPm9LUW8PHZXBA2Hjk9Hcw8U1uFS8IKYJrewInG3ae2+9FAcTyug4LFWDf8CRr9YH2B3Q==} - engines: {node: '>=14.0.0'} + /@aws-sdk/util-user-agent-browser@3.398.0: + resolution: {integrity: sha512-A3Tzx1tkDHlBT+IgxmsMCHbV8LM7SwwCozq2ZjJRx0nqw3MCrrcxQFXldHeX/gdUMO+0Oocb7HGSnVODTq+0EA==} dependencies: - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-endpoints': 3.352.0 - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@smithy/types': 2.2.2 + bowser: 2.11.0 + tslib: 2.6.2 dev: false - /@aws-sdk/node-config-provider@3.354.0: - resolution: {integrity: sha512-pF1ZGWWvmwbrloNHYF3EDqCb9hq5wfZwDqAwAPhWkYnUYKkR7E7MZVuTwUDU48io8k6Z5pM52l/54w8e8aedTw==} + /@aws-sdk/util-user-agent-node@3.405.0: + resolution: {integrity: sha512-6Ssld7aalKCnW6lSGfiiWpqwo2L+AmYq2oV3P9yYAo9ZL+Q78dXquabwj3uq3plJ4l2xE4Gfcf2FJ/1PZpqDvQ==} engines: {node: '>=14.0.0'} + peerDependencies: + aws-crt: '>=1.0.0' + peerDependenciesMeta: + aws-crt: + optional: true dependencies: - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/shared-ini-file-loader': 3.354.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/types': 3.398.0 + '@smithy/node-config-provider': 2.0.7 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false - /@aws-sdk/node-http-handler@3.350.0: - resolution: {integrity: sha512-oD96GAlmpzYilCdC8wwyURM5lNfNHZCjm/kxBkQulHKa2kRbIrnD9GfDqdCkWA5cTpjh1NzGLT4D6e6UFDjt9w==} - engines: {node: '>=14.0.0'} + /@aws-sdk/util-utf8-browser@3.259.0(patch_hash=warwypb2fd3io6vojm27svyrfm): + resolution: {integrity: sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==} dependencies: - '@aws-sdk/abort-controller': 3.347.0 - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/querystring-builder': 3.347.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + tslib: 2.6.2 dev: false + patched: true - /@aws-sdk/property-provider@3.353.0: - resolution: {integrity: sha512-Iu6J59hncaew7eBKroTcLjZ8cgrom0IWyZZ09rsow3rZDHVtw7LQSrUyuqsSbKGY9eRtL7Wa6ZtYHnXFiAE2kg==} + /@aws-sdk/util-utf8-node@3.259.0(patch_hash=ip4wqmy432gtjtcha5gcn4zeu4): + resolution: {integrity: sha512-2sbGdmrkODKeJb6kbEOKpX8cYtS9IO16XRAtINcN7sInWfspAITDofrabf0i0tFQF0hsJtbC5dyJRn87w0gYIQ==} engines: {node: '>=14.0.0'} dependencies: - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/protocol-http@3.347.0: - resolution: {integrity: sha512-2YdBhc02Wvy03YjhGwUxF0UQgrPWEy8Iq75pfS42N+/0B/+eWX1aQgfjFxIpLg7YSjT5eKtYOQGlYd4MFTgj9g==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/querystring-builder@3.347.0: - resolution: {integrity: sha512-phtKTe6FXoV02MoPkIVV6owXI8Mwr5IBN3bPoxhcPvJG2AjEmnetSIrhb8kwc4oNhlwfZwH6Jo5ARW/VEWbZtg==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-uri-escape': 3.310.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/querystring-parser@3.347.0: - resolution: {integrity: sha512-5VXOhfZz78T2W7SuXf2avfjKglx1VZgZgp9Zfhrt/Rq+MTu2D+PZc5zmJHhYigD7x83jLSLogpuInQpFMA9LgA==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/service-error-classification@3.347.0: - resolution: {integrity: sha512-xZ3MqSY81Oy2gh5g0fCtooAbahqh9VhsF8vcKjVX8+XPbGC8y+kej82+MsMg4gYL8gRFB9u4hgYbNgIS6JTAvg==} - engines: {node: '>=14.0.0'} - dev: false - - /@aws-sdk/shared-ini-file-loader@3.354.0: - resolution: {integrity: sha512-UL9loGEsdzpHBu/PtlwUvkl/yRdmWXkySp22jUaeeRtBhiGAnyeYhxJLIt+u+UkX7Mwz+810SaZJqA9ptOXNAg==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/signature-v4-multi-region@3.354.0: - resolution: {integrity: sha512-/g/3rQH8lomtUEYMuhZi9RER1+dZtl0U8mtdNJKSJtdYT5Ftk3GXS82uDdgpg1jyeP8TCR2Stl2fWZH2Jed1vA==} - engines: {node: '>=14.0.0'} - peerDependencies: - '@aws-sdk/signature-v4-crt': ^3.118.0 - peerDependenciesMeta: - '@aws-sdk/signature-v4-crt': - optional: true - dependencies: - '@aws-sdk/protocol-http': 3.347.0 - '@aws-sdk/signature-v4': 3.354.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/signature-v4@3.354.0: - resolution: {integrity: sha512-bDp43P5NkwwznpZqmsr78DuyqNcjtS4mriuajb8XPhFNo8DrMXUrdrKJ+5aNABW7YG8uK8PSKBpq88ado692/w==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/eventstream-codec': 3.347.0 - '@aws-sdk/is-array-buffer': 3.310.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-hex-encoding': 3.310.0 - '@aws-sdk/util-middleware': 3.347.0 - '@aws-sdk/util-uri-escape': 3.310.0 - '@aws-sdk/util-utf8': 3.310.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/smithy-client@3.347.0: - resolution: {integrity: sha512-PaGTDsJLGK0sTjA6YdYQzILRlPRN3uVFyqeBUkfltXssvUzkm8z2t1lz2H4VyJLAhwnG5ZuZTNEV/2mcWrU7JQ==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/middleware-stack': 3.347.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/token-providers@3.354.0: - resolution: {integrity: sha512-KcijiySy0oIyafKQagcwgu0fo35mK+2K8pwxRU1WfXqe80Gn1qGceeWcG4iW+t/rUaxa/LVo857N0LcagxCrZA==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/client-sso-oidc': 3.354.0 - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/shared-ini-file-loader': 3.354.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 - transitivePeerDependencies: - - aws-crt - dev: false - - /@aws-sdk/types@3.347.0: - resolution: {integrity: sha512-GkCMy79mdjU9OTIe5KT58fI/6uqdf8UmMdWqVHmFJ+UpEzOci7L/uw4sOXWo7xpPzLs6cJ7s5ouGZW4GRPmHFA==} - engines: {node: '>=14.0.0'} - dependencies: - tslib: 2.6.0 - dev: false - - /@aws-sdk/url-parser@3.347.0: - resolution: {integrity: sha512-lhrnVjxdV7hl+yCnJfDZOaVLSqKjxN20MIOiijRiqaWGLGEAiSqBreMhL89X1WKCifxAs4zZf9YB9SbdziRpAA==} - dependencies: - '@aws-sdk/querystring-parser': 3.347.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-arn-parser@3.310.0: - resolution: {integrity: sha512-jL8509owp/xB9+Or0pvn3Fe+b94qfklc2yPowZZIFAkFcCSIdkIglz18cPDWnYAcy9JGewpMS1COXKIUhZkJsA==} - engines: {node: '>=14.0.0'} - dependencies: - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-base64@3.310.0: - resolution: {integrity: sha512-v3+HBKQvqgdzcbL+pFswlx5HQsd9L6ZTlyPVL2LS9nNXnCcR3XgGz9jRskikRUuUvUXtkSG1J88GAOnJ/apTPg==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/util-buffer-from': 3.310.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-body-length-browser@3.310.0: - resolution: {integrity: sha512-sxsC3lPBGfpHtNTUoGXMQXLwjmR0zVpx0rSvzTPAuoVILVsp5AU/w5FphNPxD5OVIjNbZv9KsKTuvNTiZjDp9g==} - dependencies: - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-body-length-node@3.310.0: - resolution: {integrity: sha512-2tqGXdyKhyA6w4zz7UPoS8Ip+7sayOg9BwHNidiGm2ikbDxm1YrCfYXvCBdwaJxa4hJfRVz+aL9e+d3GqPI9pQ==} - engines: {node: '>=14.0.0'} - dependencies: - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-buffer-from@3.208.0(patch_hash=2u2tbs2t5afqejrdyi43ufdqau): - resolution: {integrity: sha512-7L0XUixNEFcLUGPeBF35enCvB9Xl+K6SQsmbrPk1P3mlV9mguWSDQqbOBwY1Ir0OVbD6H/ZOQU7hI/9RtRI0Zw==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/is-array-buffer': 3.201.0(patch_hash=lcduyc25etdvbxthpjpldc7hvu) - tslib: 2.6.0 - dev: false - patched: true - - /@aws-sdk/util-buffer-from@3.310.0: - resolution: {integrity: sha512-i6LVeXFtGih5Zs8enLrt+ExXY92QV25jtEnTKHsmlFqFAuL3VBeod6boeMXkN2p9lbSVVQ1sAOOYZOHYbYkntw==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/is-array-buffer': 3.310.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-config-provider@3.310.0: - resolution: {integrity: sha512-xIBaYo8dwiojCw8vnUcIL4Z5tyfb1v3yjqyJKJWV/dqKUFOOS0U591plmXbM+M/QkXyML3ypon1f8+BoaDExrg==} - engines: {node: '>=14.0.0'} - dependencies: - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-defaults-mode-browser@3.353.0: - resolution: {integrity: sha512-ushvOQKJIH7S6E//xMDPyf2/Bbu0K2A0GJRB88qQV6VKRBo4PEbeHTb6BbzPhYVX0IbY3uR/X7+Xwk4FeEkMWg==} - engines: {node: '>= 10.0.0'} - dependencies: - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/types': 3.347.0 - bowser: 2.11.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-defaults-mode-node@3.354.0: - resolution: {integrity: sha512-CaaRVBdOYX4wZadj+CDUxpO+4RjyYJcSv71A60jV6CZ/ya1+oYfmPbG5QZ4AlV6crdev2B+aUoR2LPIYqn/GnQ==} - engines: {node: '>= 10.0.0'} - dependencies: - '@aws-sdk/config-resolver': 3.354.0 - '@aws-sdk/credential-provider-imds': 3.354.0 - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/property-provider': 3.353.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-dynamodb@3.354.0: - resolution: {integrity: sha512-neKsVEVyrIIhXV/YikRwuAE3OuxKWIFo39LGOwfQpL8zi4fvl/lam9ju+UcF+caBks1QxpFHsQFWQSTN/CZYNw==} - engines: {node: '>=14.0.0'} - dependencies: - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-endpoints@3.352.0: - resolution: {integrity: sha512-PjWMPdoIUWfBPgAWLyOrWFbdSS/3DJtc0OmFb/JrE8C8rKFYl+VGW5f1p0cVdRWiDR0xCGr0s67p8itAakVqjw==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-hex-encoding@3.310.0: - resolution: {integrity: sha512-sVN7mcCCDSJ67pI1ZMtk84SKGqyix6/0A1Ab163YKn+lFBQRMKexleZzpYzNGxYzmQS6VanP/cfU7NiLQOaSfA==} - engines: {node: '>=14.0.0'} - dependencies: - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-locate-window@3.310.0: - resolution: {integrity: sha512-qo2t/vBTnoXpjKxlsC2e1gBrRm80M3bId27r0BRB2VniSSe7bL1mmzM+/HFtujm0iAxtPM+aLEflLJlJeDPg0w==} - engines: {node: '>=14.0.0'} - dependencies: - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-middleware@3.347.0: - resolution: {integrity: sha512-8owqUA3ePufeYTUvlzdJ7Z0miLorTwx+rNol5lourGQZ9JXsVMo23+yGA7nOlFuXSGkoKpMOtn6S0BT2bcfeiw==} - engines: {node: '>=14.0.0'} - dependencies: - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-retry@3.347.0: - resolution: {integrity: sha512-NxnQA0/FHFxriQAeEgBonA43Q9/VPFQa8cfJDuT2A1YZruMasgjcltoZszi1dvoIRWSZsFTW42eY2gdOd0nffQ==} - engines: {node: '>= 14.0.0'} - dependencies: - '@aws-sdk/service-error-classification': 3.347.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-stream-browser@3.353.0: - resolution: {integrity: sha512-2EBLrnjdBiMwupdPlztUjTk7T/6LX//8ppudPJvaFDyXuPYV6pDR4L5CDvrPZQTdzfbzAJKb5MVG1OxTn+aF8g==} - dependencies: - '@aws-sdk/fetch-http-handler': 3.353.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-base64': 3.310.0 - '@aws-sdk/util-hex-encoding': 3.310.0 - '@aws-sdk/util-utf8': 3.310.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-stream-node@3.350.0: - resolution: {integrity: sha512-qhcmYEAVMJPjCepog3WTFBaeP3XCkLBbUrM5/+LaB/FASKk+JeV8qBQyjYUd8EVb6Gsk7+y9SE3Tj+ChyHB4WA==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/node-http-handler': 3.350.0 - '@aws-sdk/types': 3.347.0 - '@aws-sdk/util-buffer-from': 3.310.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-uri-escape@3.310.0: - resolution: {integrity: sha512-drzt+aB2qo2LgtDoiy/3sVG8w63cgLkqFIa2NFlGpUgHFWTXkqtbgf4L5QdjRGKWhmZsnqkbtL7vkSWEcYDJ4Q==} - engines: {node: '>=14.0.0'} - dependencies: - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-user-agent-browser@3.347.0: - resolution: {integrity: sha512-ydxtsKVtQefgbk1Dku1q7pMkjDYThauG9/8mQkZUAVik55OUZw71Zzr3XO8J8RKvQG8lmhPXuAQ0FKAyycc0RA==} - dependencies: - '@aws-sdk/types': 3.347.0 - bowser: 2.11.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-user-agent-node@3.354.0: - resolution: {integrity: sha512-2xkblZS3PGxxh//0lgCwJw2gvh9ZBcI9H9xv05YP7hcwlz9BmkAlbei2i6Uew6agJMLO4unfgWoBTpzp3WLaKg==} - engines: {node: '>=14.0.0'} - peerDependencies: - aws-crt: '>=1.0.0' - peerDependenciesMeta: - aws-crt: - optional: true - dependencies: - '@aws-sdk/node-config-provider': 3.354.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-utf8-browser@3.259.0(patch_hash=warwypb2fd3io6vojm27svyrfm): - resolution: {integrity: sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==} - dependencies: - tslib: 2.6.0 - dev: false - patched: true - - /@aws-sdk/util-utf8-node@3.259.0(patch_hash=ip4wqmy432gtjtcha5gcn4zeu4): - resolution: {integrity: sha512-2sbGdmrkODKeJb6kbEOKpX8cYtS9IO16XRAtINcN7sInWfspAITDofrabf0i0tFQF0hsJtbC5dyJRn87w0gYIQ==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/util-buffer-from': 3.208.0(patch_hash=2u2tbs2t5afqejrdyi43ufdqau) - tslib: 2.6.0 - dev: false - patched: true - - /@aws-sdk/util-utf8@3.310.0: - resolution: {integrity: sha512-DnLfFT8uCO22uOJc0pt0DsSNau1GTisngBCDw8jQuWT5CqogMJu4b/uXmwEqfj8B3GX6Xsz8zOd6JpRlPftQoA==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/util-buffer-from': 3.310.0 - tslib: 2.6.0 - dev: false - - /@aws-sdk/util-waiter@3.347.0: - resolution: {integrity: sha512-3ze/0PkwkzUzLncukx93tZgGL0JX9NaP8DxTi6WzflnL/TEul5Z63PCruRNK0om17iZYAWKrf8q2mFoHYb4grA==} - engines: {node: '>=14.0.0'} - dependencies: - '@aws-sdk/abort-controller': 3.347.0 - '@aws-sdk/types': 3.347.0 - tslib: 2.6.0 + '@aws-sdk/util-buffer-from': 3.208.0(patch_hash=2u2tbs2t5afqejrdyi43ufdqau) + tslib: 2.6.2 dev: false + patched: true /@aws-sdk/xml-builder@3.310.0: resolution: {integrity: sha512-TqELu4mOuSIKQCqj63fGVs86Yh+vBx5nHRpWKNUNhB2nPTpfbziTs5c1X358be3peVWA4wPxW7Nt53KIg1tnNw==} engines: {node: '>=14.0.0'} dependencies: - tslib: 2.6.0 + tslib: 2.6.2 dev: false /@azure/abort-controller@1.1.0: resolution: {integrity: sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==} engines: {node: '>=12.0.0'} dependencies: - tslib: 2.6.0 + tslib: 2.6.2 dev: false - /@azure/core-auth@1.4.0: - resolution: {integrity: sha512-HFrcTgmuSuukRf/EdPmqBrc5l6Q5Uu+2TbuhaKbgaCpP2TfAeiNaQPAadxO+CYBRHGUzIDteMAjFspFLDLnKVQ==} - engines: {node: '>=12.0.0'} + /@azure/core-auth@1.5.0: + resolution: {integrity: sha512-udzoBuYG1VBoHVohDTrvKjyzel34zt77Bhp7dQntVGGD0ehVq48owENbBG8fIgkHRNUBQH5k1r0hpoMu5L8+kw==} + engines: {node: '>=14.0.0'} dependencies: '@azure/abort-controller': 1.1.0 - tslib: 2.6.0 + '@azure/core-util': 1.4.0 + tslib: 2.6.2 dev: false /@azure/core-client@1.7.3: @@ -2867,31 +2596,31 @@ packages: engines: {node: '>=14.0.0'} dependencies: '@azure/abort-controller': 1.1.0 - '@azure/core-auth': 1.4.0 - '@azure/core-rest-pipeline': 1.11.0 + '@azure/core-auth': 1.5.0 + '@azure/core-rest-pipeline': 1.12.0 '@azure/core-tracing': 1.0.1 - '@azure/core-util': 1.3.2 + '@azure/core-util': 1.4.0 '@azure/logger': 1.0.4 - tslib: 2.6.0 + tslib: 2.6.2 transitivePeerDependencies: - supports-color dev: false - /@azure/core-http@3.0.2: - resolution: {integrity: sha512-o1wR9JrmoM0xEAa0Ue7Sp8j+uJvmqYaGoHOCT5qaVYmvgmnZDC0OvQimPA/JR3u77Sz6D1y3Xmk1y69cDU9q9A==} + /@azure/core-http@3.0.3: + resolution: {integrity: sha512-QMib3wXotJMFhHgmJBPUF9YsyErw34H0XDFQd9CauH7TPB+RGcyl9Ayy7iURtJB04ngXhE6YwrQsWDXlSLrilg==} engines: {node: '>=14.0.0'} dependencies: '@azure/abort-controller': 1.1.0 - '@azure/core-auth': 1.4.0 + '@azure/core-auth': 1.5.0 '@azure/core-tracing': 1.0.0-preview.13 - '@azure/core-util': 1.3.2 + '@azure/core-util': 1.4.0 '@azure/logger': 1.0.4 '@types/node-fetch': 2.6.4 '@types/tunnel': 0.0.3 form-data: 4.0.0 - node-fetch: 2.6.12 + node-fetch: 2.7.0 process: 0.11.10 - tslib: 2.6.0 + tslib: 2.6.2 tunnel: 0.0.6 uuid: 8.3.2 xml2js: 0.5.0 @@ -2899,36 +2628,36 @@ packages: - encoding dev: false - /@azure/core-lro@2.5.3: - resolution: {integrity: sha512-ubkOf2YCnVtq7KqEJQqAI8dDD5rH1M6OP5kW0KO/JQyTaxLA0N0pjFWvvaysCj9eHMNBcuuoZXhhl0ypjod2DA==} + /@azure/core-lro@2.5.4: + resolution: {integrity: sha512-3GJiMVH7/10bulzOKGrrLeG/uCBH/9VtxqaMcB9lIqAeamI/xYQSHJL/KcsLDuH+yTjYpro/u6D/MuRe4dN70Q==} engines: {node: '>=14.0.0'} dependencies: '@azure/abort-controller': 1.1.0 - '@azure/core-util': 1.3.2 + '@azure/core-util': 1.4.0 '@azure/logger': 1.0.4 - tslib: 2.6.0 + tslib: 2.6.2 dev: false - /@azure/core-paging@1.4.0: - resolution: {integrity: sha512-tabFtZTg8D9XqZKEfNUOGh63SuYeOxmvH4GDcOJN+R1bZWZ1FZskctgY9Pmuwzhn+0Xvq9rmimK9hsvtLkeBsw==} + /@azure/core-paging@1.5.0: + resolution: {integrity: sha512-zqWdVIt+2Z+3wqxEOGzR5hXFZ8MGKK52x4vFLw8n58pR6ZfKRx3EXYTxTaYxYHc/PexPUTyimcTWFJbji9Z6Iw==} engines: {node: '>=14.0.0'} dependencies: - tslib: 2.6.0 + tslib: 2.6.2 dev: false - /@azure/core-rest-pipeline@1.11.0: - resolution: {integrity: sha512-nB4KXl6qAyJmBVLWA7SakT4tzpYZTCk4pvRBeI+Ye0WYSOrlTqlMhc4MSS/8atD3ufeYWdkN380LLoXlUUzThw==} + /@azure/core-rest-pipeline@1.12.0: + resolution: {integrity: sha512-+MnSB0vGZjszSzr5AW8z93/9fkDu2RLtWmAN8gskURq7EW2sSwqy8jZa0V26rjuBVkwhdA3Hw8z3VWoeBUOw+A==} engines: {node: '>=14.0.0'} dependencies: '@azure/abort-controller': 1.1.0 - '@azure/core-auth': 1.4.0 + '@azure/core-auth': 1.5.0 '@azure/core-tracing': 1.0.1 - '@azure/core-util': 1.3.2 + '@azure/core-util': 1.4.0 '@azure/logger': 1.0.4 form-data: 4.0.0 http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 - tslib: 2.6.0 + tslib: 2.6.2 transitivePeerDependencies: - supports-color dev: false @@ -2938,22 +2667,22 @@ packages: engines: {node: '>=12.0.0'} dependencies: '@opentelemetry/api': 1.4.1 - tslib: 2.6.0 + tslib: 2.6.2 dev: false /@azure/core-tracing@1.0.1: resolution: {integrity: sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==} engines: {node: '>=12.0.0'} dependencies: - tslib: 2.6.0 + tslib: 2.6.2 dev: false - /@azure/core-util@1.3.2: - resolution: {integrity: sha512-2bECOUh88RvL1pMZTcc6OzfobBeWDBf5oBbhjIhT1MV9otMVWCzpOJkkiKtrnO88y5GGBelgY8At73KGAdbkeQ==} + /@azure/core-util@1.4.0: + resolution: {integrity: sha512-eGAyJpm3skVQoLiRqm/xPa+SXi/NPDdSHMxbRAz2lSprd+Zs+qrpQGQQ2VQ3Nttu+nSZR4XoYQC71LbEI7jsig==} engines: {node: '>=14.0.0'} dependencies: '@azure/abort-controller': 1.1.0 - tslib: 2.6.0 + tslib: 2.6.2 dev: false /@azure/identity@3.1.3: @@ -2961,20 +2690,20 @@ packages: engines: {node: '>=14.0.0'} dependencies: '@azure/abort-controller': 1.1.0 - '@azure/core-auth': 1.4.0 + '@azure/core-auth': 1.5.0 '@azure/core-client': 1.7.3 - '@azure/core-rest-pipeline': 1.11.0 + '@azure/core-rest-pipeline': 1.12.0 '@azure/core-tracing': 1.0.1 - '@azure/core-util': 1.3.2 + '@azure/core-util': 1.4.0 '@azure/logger': 1.0.4 - '@azure/msal-browser': 2.37.1 + '@azure/msal-browser': 2.38.2 '@azure/msal-common': 9.1.1 - '@azure/msal-node': 1.17.3 + '@azure/msal-node': 1.18.2 events: 3.3.0 jws: 4.0.0 - open: 8.4.0 + open: 8.4.2 stoppable: 1.1.0 - tslib: 2.6.0 + tslib: 2.6.2 uuid: 8.3.2 transitivePeerDependencies: - supports-color @@ -2984,18 +2713,18 @@ packages: resolution: {integrity: sha512-ustrPY8MryhloQj7OWGe+HrYx+aoiOxzbXTtgblbV3xwCqpzUK36phH3XNHQKj3EPonyFUuDTfR3qFhTEAuZEg==} engines: {node: '>=14.0.0'} dependencies: - tslib: 2.6.0 + tslib: 2.6.2 dev: false - /@azure/msal-browser@2.37.1: - resolution: {integrity: sha512-EoKQISEpIY39Ru1OpWkeFZBcwp6Y0bG81bVmdyy4QJebPPDdVzfm62PSU0XFIRc3bqjZ4PBKBLMYLuo9NZYAow==} + /@azure/msal-browser@2.38.2: + resolution: {integrity: sha512-71BeIn2we6LIgMplwCSaMq5zAwmalyJR3jFcVOZxNVfQ1saBRwOD+P77nLs5vrRCedVKTq8RMFhIOdpMLNno0A==} engines: {node: '>=0.8.0'} dependencies: - '@azure/msal-common': 13.1.0 + '@azure/msal-common': 13.3.0 dev: false - /@azure/msal-common@13.1.0: - resolution: {integrity: sha512-wj+ULrRB0HTuMmtrMjg8j3guCx32GE2BCPbsMCZkHgL1BZetC3o/Su5UJEQMX1HNc9CrIaQNx5WaKWHygYDe0g==} + /@azure/msal-common@13.3.0: + resolution: {integrity: sha512-/VFWTicjcJbrGp3yQP7A24xU95NiDMe23vxIU1U6qdRPFsprMDNUohMudclnd+WSHE4/McqkZs/nUU3sAKkVjg==} engines: {node: '>=0.8.0'} dev: false @@ -3004,12 +2733,12 @@ packages: engines: {node: '>=0.8.0'} dev: false - /@azure/msal-node@1.17.3: - resolution: {integrity: sha512-slsa+388bQQWnWH1V91KL+zV57rIp/0OQFfF0EmVMY8gnEIkAnpWWFUVBTTMbxEyjEFMk5ZW9xiHvHBcYFHzDw==} + /@azure/msal-node@1.18.2: + resolution: {integrity: sha512-bLbuhF9Q5cgwj9tt8R7EV9MbCwGuFgZiv6Gw0VvHx5AcWHhh2m8hYginGagB4EucxKueFDwZP6aZVAxfuD/lUQ==} engines: {node: 10 || 12 || 14 || 16 || 18} dependencies: - '@azure/msal-common': 13.1.0 - jsonwebtoken: 9.0.0 + '@azure/msal-common': 13.3.0 + jsonwebtoken: 9.0.2 uuid: 8.3.2 dev: false @@ -3018,91 +2747,59 @@ packages: engines: {node: '>=14.0.0'} dependencies: '@azure/abort-controller': 1.1.0 - '@azure/core-http': 3.0.2 - '@azure/core-lro': 2.5.3 - '@azure/core-paging': 1.4.0 + '@azure/core-http': 3.0.3 + '@azure/core-lro': 2.5.4 + '@azure/core-paging': 1.5.0 '@azure/core-tracing': 1.0.0-preview.13 '@azure/logger': 1.0.4 events: 3.3.0 - tslib: 2.6.0 + tslib: 2.6.2 transitivePeerDependencies: - encoding dev: false - /@babel/code-frame@7.22.5: - resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} + /@babel/code-frame@7.22.13: + resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.22.5 - - /@babel/compat-data@7.22.5: - resolution: {integrity: sha512-4Jc/YuIaYqKnDDz892kPIledykKg12Aw1PYX5i/TY28anJtacvM1Rrr8wbieB9GfEJwlzqT0hUEao0CxEebiDA==} - engines: {node: '>=6.9.0'} - dev: true + '@babel/highlight': 7.22.13 + chalk: 2.4.2 - /@babel/core@7.21.8: - resolution: {integrity: sha512-YeM22Sondbo523Sz0+CirSPnbj9bG3P0CdHcBZdqUuaeOaYEFbOLoGU7lebvGP6P5J/WE9wOn7u7C4J9HvS1xQ==} + /@babel/compat-data@7.22.9: + resolution: {integrity: sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==} engines: {node: '>=6.9.0'} - dependencies: - '@ampproject/remapping': 2.2.1 - '@babel/code-frame': 7.22.5 - '@babel/generator': 7.22.5 - '@babel/helper-compilation-targets': 7.22.5(@babel/core@7.21.8) - '@babel/helper-module-transforms': 7.22.5 - '@babel/helpers': 7.22.5 - '@babel/parser': 7.22.5 - '@babel/template': 7.22.5 - '@babel/traverse': 7.22.5 - '@babel/types': 7.21.5 - convert-source-map: 1.9.0 - debug: 4.3.4 - gensync: 1.0.0-beta.2 - json5: 2.2.3 - semver: 6.3.0 - transitivePeerDependencies: - - supports-color dev: true - /@babel/core@7.22.5: - resolution: {integrity: sha512-SBuTAjg91A3eKOvD+bPEz3LlhHZRNu1nFOVts9lzDJTXshHTjII0BAtDS3Y2DAkdZdDKWVZGVwkDfc4Clxn1dg==} + /@babel/core@7.22.11: + resolution: {integrity: sha512-lh7RJrtPdhibbxndr6/xx0w8+CVlY5FJZiaSz908Fpy+G0xkBFTvwLcKJFF4PJxVfGhVWNebikpWGnOoC71juQ==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.1 - '@babel/code-frame': 7.22.5 - '@babel/generator': 7.22.5 - '@babel/helper-compilation-targets': 7.22.5(@babel/core@7.22.5) - '@babel/helper-module-transforms': 7.22.5 - '@babel/helpers': 7.22.5 - '@babel/parser': 7.22.5 + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.22.10 + '@babel/helper-compilation-targets': 7.22.10 + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.11) + '@babel/helpers': 7.22.11 + '@babel/parser': 7.22.14 '@babel/template': 7.22.5 - '@babel/traverse': 7.22.5 - '@babel/types': 7.22.5 + '@babel/traverse': 7.22.11 + '@babel/types': 7.22.11 convert-source-map: 1.9.0 debug: 4.3.4 gensync: 1.0.0-beta.2 json5: 2.2.3 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true - /@babel/generator@7.21.9: - resolution: {integrity: sha512-F3fZga2uv09wFdEjEQIJxXALXfz0+JaOb7SabvVMmjHxeVTuGW8wgE8Vp1Hd7O+zMTYtcfEISGRzPkeiaPPsvg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.21.5 - '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.18 - jsesc: 2.5.2 - dev: true - - /@babel/generator@7.22.5: - resolution: {integrity: sha512-+lcUbnTRhd0jOewtFSedLyiPsD5tswKkbgcezOqqWFUVNEwoUTlpPOBmvhG7OXWLR4jMdv0czPGH5XbflnD1EA==} + /@babel/generator@7.22.10: + resolution: {integrity: sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 jsesc: 2.5.2 dev: true @@ -3110,136 +2807,68 @@ packages: resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 - dev: true - - /@babel/helper-builder-binary-assignment-operator-visitor@7.22.5: - resolution: {integrity: sha512-m1EP3lVOPptR+2DwD125gziZNcmoNSHGmJROKoy87loWUQyJaVXDgpmruWqDARZSmtYQ+Dl25okU8+qhVzuykw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 dev: true - /@babel/helper-compilation-targets@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-Ji+ywpHeuqxB8WDxraCiqR0xfhYjiDE/e6k7FuIaANnoOFxAHskHChz4vA1mJC9Lbm01s1PVAGhQY4FUKSkGZw==} + /@babel/helper-builder-binary-assignment-operator-visitor@7.22.10: + resolution: {integrity: sha512-Av0qubwDQxC56DoUReVDeLfMEjYYSN1nZrTUrWkXd7hpU73ymRANkbuDm3yni9npkn+RXy9nNbEJZEzXr7xrfQ==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 dependencies: - '@babel/compat-data': 7.22.5 - '@babel/core': 7.21.8 - '@babel/helper-validator-option': 7.22.5 - browserslist: 4.21.9 - lru-cache: 5.1.1 - semver: 6.3.0 + '@babel/types': 7.22.11 dev: true - /@babel/helper-compilation-targets@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-Ji+ywpHeuqxB8WDxraCiqR0xfhYjiDE/e6k7FuIaANnoOFxAHskHChz4vA1mJC9Lbm01s1PVAGhQY4FUKSkGZw==} + /@babel/helper-compilation-targets@7.22.10: + resolution: {integrity: sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 dependencies: - '@babel/compat-data': 7.22.5 - '@babel/core': 7.22.5 + '@babel/compat-data': 7.22.9 '@babel/helper-validator-option': 7.22.5 - browserslist: 4.21.9 + browserslist: 4.21.10 lru-cache: 5.1.1 - semver: 6.3.0 - dev: true - - /@babel/helper-create-class-features-plugin@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-xkb58MyOYIslxu3gKmVXmjTtUPvBU4odYzbiIQbWwLKIHCsx6UGZGX6F1IznMFVnDdirseUZopzN+ZRt8Xb33Q==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-function-name': 7.22.5 - '@babel/helper-member-expression-to-functions': 7.22.5 - '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/helper-replace-supers': 7.22.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.5 - semver: 6.3.0 - transitivePeerDependencies: - - supports-color + semver: 6.3.1 dev: true - /@babel/helper-create-class-features-plugin@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-xkb58MyOYIslxu3gKmVXmjTtUPvBU4odYzbiIQbWwLKIHCsx6UGZGX6F1IznMFVnDdirseUZopzN+ZRt8Xb33Q==} + /@babel/helper-create-class-features-plugin@7.22.11(@babel/core@7.22.11): + resolution: {integrity: sha512-y1grdYL4WzmUDBRGK0pDbIoFd7UZKoDurDzWEoNMYoj1EL+foGRQNyPWDcC+YyegN5y1DUsFFmzjGijB3nSVAQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 '@babel/helper-member-expression-to-functions': 7.22.5 '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/helper-replace-supers': 7.22.5 + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.11) '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.5 - semver: 6.3.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/helper-create-regexp-features-plugin@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-1VpEFOIbMRaXyDeUwUfmTIxExLwQ+zkW+Bh5zXpApA3oQedBx9v/updixWxnx/bZpKw7u8VxWjb/qWpIcmPq8A==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-annotate-as-pure': 7.22.5 - regexpu-core: 5.3.2 - semver: 6.3.0 + '@babel/helper-split-export-declaration': 7.22.6 + semver: 6.3.1 dev: true - /@babel/helper-create-regexp-features-plugin@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-1VpEFOIbMRaXyDeUwUfmTIxExLwQ+zkW+Bh5zXpApA3oQedBx9v/updixWxnx/bZpKw7u8VxWjb/qWpIcmPq8A==} + /@babel/helper-create-regexp-features-plugin@7.22.9(@babel/core@7.22.11): + resolution: {integrity: sha512-+svjVa/tFwsNSG4NEy1h85+HQ5imbT92Q5/bgtS7P0GTQlP8WuFdqsiABmQouhiFGyV66oGxZFpeYHza1rNsKw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-annotate-as-pure': 7.22.5 regexpu-core: 5.3.2 - semver: 6.3.0 + semver: 6.3.1 dev: true - /@babel/helper-define-polyfill-provider@0.3.3(@babel/core@7.21.8): - resolution: {integrity: sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==} + /@babel/helper-define-polyfill-provider@0.4.2(@babel/core@7.22.11): + resolution: {integrity: sha512-k0qnnOqHn5dK9pZpfD5XXZ9SojAITdCKRn2Lp6rnDGzIbaP0rHyMPk/4wsSxVBVz4RfN0q6VpXWP2pDGIoQ7hw==} peerDependencies: - '@babel/core': ^7.4.0-0 + '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.21.8 - '@babel/helper-compilation-targets': 7.22.5(@babel/core@7.21.8) + '@babel/core': 7.22.11 + '@babel/helper-compilation-targets': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 debug: 4.3.4 lodash.debounce: 4.0.8 - resolve: 1.22.2 - semver: 6.3.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/helper-define-polyfill-provider@0.4.0(@babel/core@7.22.5): - resolution: {integrity: sha512-RnanLx5ETe6aybRi1cO/edaRH+bNYWaryCEmjDDYyNr4wnSzyOp8T0dWipmqVHKEY3AbVKUom50AKSlj1zmKbg==} - peerDependencies: - '@babel/core': ^7.4.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-compilation-targets': 7.22.5(@babel/core@7.22.5) - '@babel/helper-plugin-utils': 7.22.5 - debug: 4.3.4 - lodash.debounce: 4.0.8 - resolve: 1.22.2 - semver: 6.3.0 + resolve: 1.22.4 transitivePeerDependencies: - supports-color dev: true @@ -3254,51 +2883,49 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.5 - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 dev: true /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 dev: true /@babel/helper-member-expression-to-functions@7.22.5: resolution: {integrity: sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 dev: true /@babel/helper-module-imports@7.22.5: resolution: {integrity: sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 dev: true - /@babel/helper-module-transforms@7.22.5: - resolution: {integrity: sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw==} + /@babel/helper-module-transforms@7.22.9(@babel/core@7.22.11): + resolution: {integrity: sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==} engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 dependencies: + '@babel/core': 7.22.11 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-module-imports': 7.22.5 '@babel/helper-simple-access': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 '@babel/helper-validator-identifier': 7.22.5 - '@babel/template': 7.22.5 - '@babel/traverse': 7.22.5 - '@babel/types': 7.22.5 - transitivePeerDependencies: - - supports-color dev: true /@babel/helper-optimise-call-expression@7.22.5: resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 dev: true /@babel/helper-plugin-utils@7.22.5: @@ -3306,69 +2933,49 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-remap-async-to-generator@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-cU0Sq1Rf4Z55fgz7haOakIyM7+x/uCFwXpLPaeRzfoUtAEAuUZjZvFPjL/rk5rW693dIgn2hng1W7xbT7lWT4g==} + /@babel/helper-remap-async-to-generator@7.22.9(@babel/core@7.22.11): + resolution: {integrity: sha512-8WWC4oR4Px+tr+Fp0X3RHDVfINGpF3ad1HIbrc8A77epiR6eMMc6jsgozkzT2uDiOOdoS9cLIQ+XD2XvI2WSmQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-wrap-function': 7.22.5 - '@babel/types': 7.22.5 - transitivePeerDependencies: - - supports-color + '@babel/helper-wrap-function': 7.22.10 dev: true - /@babel/helper-remap-async-to-generator@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-cU0Sq1Rf4Z55fgz7haOakIyM7+x/uCFwXpLPaeRzfoUtAEAuUZjZvFPjL/rk5rW693dIgn2hng1W7xbT7lWT4g==} + /@babel/helper-replace-supers@7.22.9(@babel/core@7.22.11): + resolution: {integrity: sha512-LJIKvvpgPOPUThdYqcX6IXRuIcTkcAub0IaDRGCZH0p5GPUp7PhRU9QVgFcDDd51BaPkk77ZjqFwh6DZTAEmGg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-wrap-function': 7.22.5 - '@babel/types': 7.22.5 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/helper-replace-supers@7.22.5: - resolution: {integrity: sha512-aLdNM5I3kdI/V9xGNyKSF3X/gTyMUBohTZ+/3QdQKAA9vxIiy12E+8E2HoOP1/DjeqU+g6as35QHJNMDDYpuCg==} - engines: {node: '>=6.9.0'} - dependencies: + '@babel/core': 7.22.11 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-member-expression-to-functions': 7.22.5 '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/template': 7.22.5 - '@babel/traverse': 7.22.5 - '@babel/types': 7.22.5 - transitivePeerDependencies: - - supports-color dev: true /@babel/helper-simple-access@7.22.5: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 dev: true /@babel/helper-skip-transparent-expression-wrappers@7.22.5: resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 dev: true - /@babel/helper-split-export-declaration@7.22.5: - resolution: {integrity: sha512-thqK5QFghPKWLhAV321lxF95yCg2K3Ob5yw+M3VHWfdia0IkPXUtoLH8x/6Fh486QUvzhb8YOWHChTVen2/PoQ==} + /@babel/helper-split-export-declaration@7.22.6: + resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 dev: true /@babel/helper-string-parser@7.22.5: @@ -3385,2173 +2992,1242 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-wrap-function@7.22.5: - resolution: {integrity: sha512-bYqLIBSEshYcYQyfks8ewYA8S30yaGSeRslcvKMvoUk6HHPySbxHq9YRi6ghhzEU+yhQv9bP/jXnygkStOcqZw==} + /@babel/helper-wrap-function@7.22.10: + resolution: {integrity: sha512-OnMhjWjuGYtdoO3FmsEFWvBStBAe2QOgwOLsLNDjN+aaiMD8InJk1/O3HSD8lkqTjCgg5YI34Tz15KNNA3p+nQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-function-name': 7.22.5 '@babel/template': 7.22.5 - '@babel/traverse': 7.22.5 - '@babel/types': 7.22.5 - transitivePeerDependencies: - - supports-color + '@babel/types': 7.22.11 dev: true - /@babel/helpers@7.22.5: - resolution: {integrity: sha512-pSXRmfE1vzcUIDFQcSGA5Mr+GxBV9oiRKDuDxXvWQQBCh8HoIjs/2DlDB7H8smac1IVrB9/xdXj2N3Wol9Cr+Q==} + /@babel/helpers@7.22.11: + resolution: {integrity: sha512-vyOXC8PBWaGc5h7GMsNx68OH33cypkEDJCHvYVVgVbbxJDROYVtexSk0gK5iCF1xNjRIN2s8ai7hwkWDq5szWg==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.5 - '@babel/traverse': 7.22.5 - '@babel/types': 7.22.5 + '@babel/traverse': 7.22.11 + '@babel/types': 7.22.11 transitivePeerDependencies: - supports-color dev: true - /@babel/highlight@7.22.5: - resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} + /@babel/highlight@7.22.13: + resolution: {integrity: sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-validator-identifier': 7.22.5 chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/parser@7.21.9: - resolution: {integrity: sha512-q5PNg/Bi1OpGgx5jYlvWZwAorZepEudDMCLtj967aeS7WMont7dUZI46M2XwcIQqvUlMxWfdLFu4S/qSxeUu5g==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@babel/types': 7.21.5 - dev: true - - /@babel/parser@7.22.5: - resolution: {integrity: sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==} + /@babel/parser@7.22.14: + resolution: {integrity: sha512-1KucTHgOvaw/LzCVrEOAyXkr9rQlp0A1HiHRYnSUE9dmb8PvPW7o5sscg+5169r54n3vGlbx6GevTE/Iw/P3AQ==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.22.5 - dev: true - - /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 + '@babel/types': 7.22.11 dev: true - /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.5(@babel/core@7.22.5): + /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.5(@babel/core@7.22.11): resolution: {integrity: sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.22.5(@babel/core@7.21.8): + /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.22.5(@babel/core@7.22.11): resolution: {integrity: sha512-31Bb65aZaUwqCbWMnZPduIZxCBngHFlzyN6Dq6KAJjtx+lx6ohKHubc61OomYi7XwVD4Ol0XCVz4h+pYFR048g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.13.0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-transform-optional-chaining': 7.22.5(@babel/core@7.21.8) + '@babel/plugin-transform-optional-chaining': 7.22.12(@babel/core@7.22.11) dev: true - /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-31Bb65aZaUwqCbWMnZPduIZxCBngHFlzyN6Dq6KAJjtx+lx6ohKHubc61OomYi7XwVD4Ol0XCVz4h+pYFR048g==} + /@babel/plugin-proposal-class-properties@7.18.6(@babel/core@7.22.11): + resolution: {integrity: sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==} engines: {node: '>=6.9.0'} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead. peerDependencies: - '@babel/core': ^7.13.0 + '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 + '@babel/helper-create-class-features-plugin': 7.22.11(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-transform-optional-chaining': 7.22.5(@babel/core@7.22.5) dev: true - /@babel/plugin-proposal-async-generator-functions@7.20.7(@babel/core@7.21.8): - resolution: {integrity: sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA==} + /@babel/plugin-proposal-nullish-coalescing-operator@7.18.6(@babel/core@7.22.11): + resolution: {integrity: sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==} engines: {node: '>=6.9.0'} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead. peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 - '@babel/helper-environment-visitor': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-remap-async-to-generator': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.21.8) - transitivePeerDependencies: - - supports-color + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.11) dev: true - /@babel/plugin-proposal-class-properties@7.18.6(@babel/core@7.21.8): - resolution: {integrity: sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==} + /@babel/plugin-proposal-optional-chaining@7.21.0(@babel/core@7.22.11): + resolution: {integrity: sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==} engines: {node: '>=6.9.0'} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead. peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.21.8) + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - transitivePeerDependencies: - - supports-color + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.11) dev: true - /@babel/plugin-proposal-class-properties@7.18.6(@babel/core@7.22.5): - resolution: {integrity: sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==} + /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.22.11): + resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.22.5) - '@babel/helper-plugin-utils': 7.22.5 - transitivePeerDependencies: - - supports-color + '@babel/core': 7.22.11 dev: true - /@babel/plugin-proposal-class-static-block@7.21.0(@babel/core@7.21.8): - resolution: {integrity: sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw==} - engines: {node: '>=6.9.0'} + /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.22.11): + resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: - '@babel/core': ^7.12.0 + '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.21.8) + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.21.8) - transitivePeerDependencies: - - supports-color dev: true - /@babel/plugin-proposal-dynamic-import@7.18.6(@babel/core@7.21.8): - resolution: {integrity: sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==} - engines: {node: '>=6.9.0'} + /@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.22.11): + resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.21.8) dev: true - /@babel/plugin-proposal-export-namespace-from@7.18.9(@babel/core@7.21.8): - resolution: {integrity: sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==} - engines: {node: '>=6.9.0'} + /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.22.11): + resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.21.8) dev: true - /@babel/plugin-proposal-json-strings@7.18.6(@babel/core@7.21.8): - resolution: {integrity: sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==} + /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.22.11): + resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.21.8) dev: true - /@babel/plugin-proposal-logical-assignment-operators@7.20.7(@babel/core@7.21.8): - resolution: {integrity: sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug==} - engines: {node: '>=6.9.0'} + /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.22.11): + resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.21.8) dev: true - /@babel/plugin-proposal-nullish-coalescing-operator@7.18.6(@babel/core@7.21.8): - resolution: {integrity: sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==} - engines: {node: '>=6.9.0'} + /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.22.11): + resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.21.8) dev: true - /@babel/plugin-proposal-nullish-coalescing-operator@7.18.6(@babel/core@7.22.5): - resolution: {integrity: sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==} + /@babel/plugin-syntax-flow@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-9RdCl0i+q0QExayk2nOS7853w08yLucnnPML6EN9S8fgMPVtdLDCdx/cOQ/i44Lb9UeQX9A35yaqBBOMMZxPxQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.5) dev: true - /@babel/plugin-proposal-numeric-separator@7.18.6(@babel/core@7.21.8): - resolution: {integrity: sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==} + /@babel/plugin-syntax-import-assertions@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.21.8) dev: true - /@babel/plugin-proposal-object-rest-spread@7.20.7(@babel/core@7.21.8): - resolution: {integrity: sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==} + /@babel/plugin-syntax-import-attributes@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-KwvoWDeNKPETmozyFE0P2rOLqh39EoQHNjqizrI5B8Vt0ZNS7M56s7dAiAqbYfiAYOuIzIh96z3iR2ktgu3tEg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/compat-data': 7.22.5 - '@babel/core': 7.21.8 - '@babel/helper-compilation-targets': 7.22.5(@babel/core@7.21.8) + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.21.8) - '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.21.8) dev: true - /@babel/plugin-proposal-optional-catch-binding@7.18.6(@babel/core@7.21.8): - resolution: {integrity: sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==} - engines: {node: '>=6.9.0'} + /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.22.11): + resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.21.8) dev: true - /@babel/plugin-proposal-optional-chaining@7.21.0(@babel/core@7.21.8): - resolution: {integrity: sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==} - engines: {node: '>=6.9.0'} + /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.22.11): + resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.21.8) dev: true - /@babel/plugin-proposal-optional-chaining@7.21.0(@babel/core@7.22.5): - resolution: {integrity: sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==} + /@babel/plugin-syntax-jsx@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.5) dev: true - /@babel/plugin-proposal-private-methods@7.18.6(@babel/core@7.21.8): - resolution: {integrity: sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==} - engines: {node: '>=6.9.0'} + /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.22.11): + resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.21.8) + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - transitivePeerDependencies: - - supports-color dev: true - /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.22.5): - resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==} - engines: {node: '>=6.9.0'} + /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.22.11): + resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 + '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-proposal-private-property-in-object@7.21.11(@babel/core@7.21.8): - resolution: {integrity: sha512-0QZ8qP/3RLDVBwBFoWAwCtgcDZJVwA5LUJRZU8x2YFfKNuFq161wK3cuGrALu5yiPu+vzwTAg/sMWVNeWeNyaw==} - engines: {node: '>=6.9.0'} + /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.22.11): + resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.21.8) + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.21.8) - transitivePeerDependencies: - - supports-color dev: true - /@babel/plugin-proposal-unicode-property-regex@7.18.6(@babel/core@7.21.8): - resolution: {integrity: sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==} - engines: {node: '>=4'} + /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.22.11): + resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.21.8) + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-proposal-unicode-property-regex@7.18.6(@babel/core@7.22.5): - resolution: {integrity: sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==} - engines: {node: '>=4'} + /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.22.11): + resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.22.5) + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.21.8): - resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} + /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.22.11): + resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.22.5): - resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} + /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.22.11): + resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.22.5): - resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} + /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.22.11): + resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.21.8): - resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} + /@babel/plugin-syntax-typescript@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.22.5): - resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} + /@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.22.11): + resolution: {integrity: sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==} + engines: {node: '>=6.9.0'} peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.21.8): - resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} + /@babel/plugin-transform-arrow-functions@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.22.5): - resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} + /@babel/plugin-transform-async-generator-functions@7.22.11(@babel/core@7.22.11): + resolution: {integrity: sha512-0pAlmeRJn6wU84zzZsEOx1JV1Jf8fqO9ok7wofIJwUnplYo247dcd24P+cMJht7ts9xkzdtB0EPHmOb7F+KzXw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 + '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-remap-async-to-generator': 7.22.9(@babel/core@7.22.11) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.11) dev: true - /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.21.8): - resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} + /@babel/plugin-transform-async-to-generator@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 + '@babel/helper-module-imports': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-remap-async-to-generator': 7.22.9(@babel/core@7.22.11) dev: true - /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.22.5): - resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} + /@babel/plugin-transform-block-scoped-functions@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.21.8): - resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==} + /@babel/plugin-transform-block-scoping@7.22.10(@babel/core@7.22.11): + resolution: {integrity: sha512-1+kVpGAOOI1Albt6Vse7c8pHzcZQdQKW+wJH+g8mCaszOdDVwRXa/slHPqIw+oJAJANTKDMuM2cBdV0Dg618Vg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.22.5): - resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==} + /@babel/plugin-transform-class-properties@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-nDkQ0NfkOhPTq8YCLiWNxp1+f9fCobEjCb0n8WdbNUBc4IB5V7P1QnX9IjpSoquKrXF5SKojHleVNs2vGeHCHQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 + '@babel/helper-create-class-features-plugin': 7.22.11(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-flow@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-9RdCl0i+q0QExayk2nOS7853w08yLucnnPML6EN9S8fgMPVtdLDCdx/cOQ/i44Lb9UeQX9A35yaqBBOMMZxPxQ==} + /@babel/plugin-transform-class-static-block@7.22.11(@babel/core@7.22.11): + resolution: {integrity: sha512-GMM8gGmqI7guS/llMFk1bJDkKfn3v3C4KHK9Yg1ey5qcHcOlKb0QvcMrgzvxo+T03/4szNh5lghY+fEC98Kq9g==} engines: {node: '>=6.9.0'} peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/core': ^7.12.0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 + '@babel/helper-create-class-features-plugin': 7.22.11(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.11) dev: true - /@babel/plugin-syntax-import-assertions@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==} + /@babel/plugin-transform-classes@7.22.6(@babel/core@7.22.11): + resolution: {integrity: sha512-58EgM6nuPNG6Py4Z3zSuu0xWu2VfodiMi72Jt5Kj2FECmaYk1RrTXA45z6KBFsu9tRgwQDwIiY4FXTt+YsSFAQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-compilation-targets': 7.22.10 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-function-name': 7.22.5 + '@babel/helper-optimise-call-expression': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.11) + '@babel/helper-split-export-declaration': 7.22.6 + globals: 11.12.0 dev: true - /@babel/plugin-syntax-import-assertions@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==} + /@babel/plugin-transform-computed-properties@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 + '@babel/template': 7.22.5 dev: true - /@babel/plugin-syntax-import-attributes@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-KwvoWDeNKPETmozyFE0P2rOLqh39EoQHNjqizrI5B8Vt0ZNS7M56s7dAiAqbYfiAYOuIzIh96z3iR2ktgu3tEg==} + /@babel/plugin-transform-destructuring@7.22.10(@babel/core@7.22.11): + resolution: {integrity: sha512-dPJrL0VOyxqLM9sritNbMSGx/teueHF/htMKrPT7DNxccXxRDPYqlgPFFdr8u+F+qUZOkZoXue/6rL5O5GduEw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.21.8): - resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} + /@babel/plugin-transform-dotall-regex@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.22.5): - resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} + /@babel/plugin-transform-duplicate-keys@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.21.8): - resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} + /@babel/plugin-transform-dynamic-import@7.22.11(@babel/core@7.22.11): + resolution: {integrity: sha512-g/21plo58sfteWjaO0ZNVb+uEOkJNjAaHhbejrnBmu011l/eNDScmkbjCC3l4FKb10ViaGU4aOkFznSu2zRHgA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.22.11) dev: true - /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.22.5): - resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} + /@babel/plugin-transform-exponentiation-operator@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 + '@babel/helper-builder-binary-assignment-operator-visitor': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-jsx@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==} + /@babel/plugin-transform-export-namespace-from@7.22.11(@babel/core@7.22.11): + resolution: {integrity: sha512-xa7aad7q7OiT8oNZ1mU7NrISjlSkVdMbNxn9IuLZyL9AJEhs1Apba3I+u5riX1dIkdptP5EKDG5XDPByWxtehw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.22.11) dev: true - /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.21.8): - resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} + /@babel/plugin-transform-flow-strip-types@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-tujNbZdxdG0/54g/oua8ISToaXTFBf8EnSb5PgQSciIXWOWKX3S4+JR7ZE9ol8FZwf9kxitzkGQ+QWeov/mCiA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-flow': 7.22.5(@babel/core@7.22.11) dev: true - /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.22.5): - resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} + /@babel/plugin-transform-for-of@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-3kxQjX1dU9uudwSshyLeEipvrLjBCVthCgeTp6CzE/9JYrlAIaeekVxRpCWsDDfYTfRZRoCeZatCQvwo+wvK8A==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.21.8): - resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} + /@babel/plugin-transform-function-name@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 + '@babel/helper-compilation-targets': 7.22.10 + '@babel/helper-function-name': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.22.5): - resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} + /@babel/plugin-transform-json-strings@7.22.11(@babel/core@7.22.11): + resolution: {integrity: sha512-CxT5tCqpA9/jXFlme9xIBCc5RPtdDq3JpkkhgHQqtDdiTnTI0jtZ0QzXhr5DILeYifDPp2wvY2ad+7+hLMW5Pw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.11) dev: true - /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.21.8): - resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} + /@babel/plugin-transform-literals@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.22.5): - resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} + /@babel/plugin-transform-logical-assignment-operators@7.22.11(@babel/core@7.22.11): + resolution: {integrity: sha512-qQwRTP4+6xFCDV5k7gZBF3C31K34ut0tbEcTKxlX/0KXxm9GLcO14p570aWxFvVzx6QAfPgq7gaeIHXJC8LswQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.11) dev: true - /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.21.8): - resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} + /@babel/plugin-transform-member-expression-literals@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.22.5): - resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} + /@babel/plugin-transform-modules-amd@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.21.8): - resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} + /@babel/plugin-transform-modules-commonjs@7.22.11(@babel/core@7.22.11): + resolution: {integrity: sha512-o2+bg7GDS60cJMgz9jWqRUsWkMzLCxp+jFDeDUT5sjRlAxcJWZ2ylNdI7QQ2+CH5hWu7OnN+Cv3htt7AkSf96g==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-simple-access': 7.22.5 dev: true - /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.22.5): - resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} + /@babel/plugin-transform-modules-systemjs@7.22.11(@babel/core@7.22.11): + resolution: {integrity: sha512-rIqHmHoMEOhI3VkVf5jQ15l539KrwhzqcBO6wdCNWPWc/JWt9ILNYNUssbRpeq0qWns8svuw8LnMNCvWBIJ8wA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 + '@babel/helper-hoist-variables': 7.22.5 + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-validator-identifier': 7.22.5 dev: true - /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.21.8): - resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} + /@babel/plugin-transform-modules-umd@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.22.5): - resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} + /@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==} + engines: {node: '>=6.9.0'} peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.21.8): - resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} + /@babel/plugin-transform-new-target@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.22.5): - resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} + /@babel/plugin-transform-nullish-coalescing-operator@7.22.11(@babel/core@7.22.11): + resolution: {integrity: sha512-YZWOw4HxXrotb5xsjMJUDlLgcDXSfO9eCmdl1bgW4+/lAGdkjaEvOnQ4p5WKKdUgSzO39dgPl0pTnfxm0OAXcg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.11) dev: true - /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.21.8): - resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} + /@babel/plugin-transform-numeric-separator@7.22.11(@babel/core@7.22.11): + resolution: {integrity: sha512-3dzU4QGPsILdJbASKhF/V2TVP+gJya1PsueQCxIPCEcerqF21oEcrob4mzjsp2Py/1nLfF5m+xYNMDpmA8vffg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.11) dev: true - /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.22.5): - resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} + /@babel/plugin-transform-object-rest-spread@7.22.11(@babel/core@7.22.11): + resolution: {integrity: sha512-nX8cPFa6+UmbepISvlf5jhQyaC7ASs/7UxHmMkuJ/k5xSHvDPPaibMo+v3TXwU/Pjqhep/nFNpd3zn4YR59pnw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/compat-data': 7.22.9 + '@babel/core': 7.22.11 + '@babel/helper-compilation-targets': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.11) + '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.22.11) dev: true - /@babel/plugin-syntax-typescript@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==} + /@babel/plugin-transform-object-super@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.11) dev: true - /@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.22.5): - resolution: {integrity: sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==} + /@babel/plugin-transform-optional-catch-binding@7.22.11(@babel/core@7.22.11): + resolution: {integrity: sha512-rli0WxesXUeCJnMYhzAglEjLWVDF6ahb45HuprcmQuLidBJFWjNnOzssk2kuc6e33FlLaiZhG/kUIzUMWdBKaQ==} engines: {node: '>=6.9.0'} peerDependencies: - '@babel/core': ^7.0.0 + '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.22.5) + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.11) dev: true - /@babel/plugin-transform-arrow-functions@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==} + /@babel/plugin-transform-optional-chaining@7.22.12(@babel/core@7.22.11): + resolution: {integrity: sha512-7XXCVqZtyFWqjDsYDY4T45w4mlx1rf7aOgkc/Ww76xkgBiOlmjPkx36PBLHa1k1rwWvVgYMPsbuVnIamx2ZQJw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.11) dev: true - /@babel/plugin-transform-arrow-functions@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==} + /@babel/plugin-transform-parameters@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-AVkFUBurORBREOmHRKo06FjHYgjrabpdqRSwq6+C7R5iTCZOsM4QbcB27St0a4U6fffyAOqh3s/qEfybAhfivg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-async-generator-functions@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-gGOEvFzm3fWoyD5uZq7vVTD57pPJ3PczPUD/xCFGjzBpUosnklmXyKnGQbbbGs1NPNPskFex0j93yKbHt0cHyg==} + /@babel/plugin-transform-private-methods@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-PPjh4gyrQnGe97JTalgRGMuU4icsZFnWkzicB/fUtzlKUqvsWBKEpPPfr5a2JiyirZkHxnAqkQMO5Z5B2kK3fA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-environment-visitor': 7.22.5 + '@babel/core': 7.22.11 + '@babel/helper-create-class-features-plugin': 7.22.11(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-remap-async-to-generator': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.5) - transitivePeerDependencies: - - supports-color dev: true - /@babel/plugin-transform-async-to-generator@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==} + /@babel/plugin-transform-private-property-in-object@7.22.11(@babel/core@7.22.11): + resolution: {integrity: sha512-sSCbqZDBKHetvjSwpyWzhuHkmW5RummxJBVbYLkGkaiTOWGxml7SXt0iWa03bzxFIx7wOj3g/ILRd0RcJKBeSQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 - '@babel/helper-module-imports': 7.22.5 + '@babel/core': 7.22.11 + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-create-class-features-plugin': 7.22.11(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-remap-async-to-generator': 7.22.5(@babel/core@7.21.8) - transitivePeerDependencies: - - supports-color + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.11) dev: true - /@babel/plugin-transform-async-to-generator@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==} + /@babel/plugin-transform-property-literals@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-module-imports': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-remap-async-to-generator': 7.22.5(@babel/core@7.22.5) - transitivePeerDependencies: - - supports-color dev: true - /@babel/plugin-transform-block-scoped-functions@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==} + /@babel/plugin-transform-react-jsx-self@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-nTh2ogNUtxbiSbxaT4Ds6aXnXEipHweN9YRgOX/oNXdf0cCrGn/+2LozFa3lnPV5D90MkjhgckCPBrsoSc1a7g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-block-scoped-functions@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==} + /@babel/plugin-transform-react-jsx-source@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-yIiRO6yobeEIaI0RTbIr8iAK9FcBHLtZq0S89ZPjDLQXBA4xvghaKqI0etp/tF3htTM0sazJKKLz9oEiGRtu7w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-block-scoping@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-EcACl1i5fSQ6bt+YGuU/XGCeZKStLmyVGytWkpyhCLeQVA0eu6Wtiw92V+I1T/hnezUv7j74dA/Ro69gWcU+hg==} + /@babel/plugin-transform-regenerator@7.22.10(@babel/core@7.22.11): + resolution: {integrity: sha512-F28b1mDt8KcT5bUyJc/U9nwzw6cV+UmTeRlXYIl2TNqMMJif0Jeey9/RQ3C4NOd2zp0/TRsDns9ttj2L523rsw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 + regenerator-transform: 0.15.2 dev: true - /@babel/plugin-transform-block-scoping@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-EcACl1i5fSQ6bt+YGuU/XGCeZKStLmyVGytWkpyhCLeQVA0eu6Wtiw92V+I1T/hnezUv7j74dA/Ro69gWcU+hg==} + /@babel/plugin-transform-reserved-words@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-class-properties@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-nDkQ0NfkOhPTq8YCLiWNxp1+f9fCobEjCb0n8WdbNUBc4IB5V7P1QnX9IjpSoquKrXF5SKojHleVNs2vGeHCHQ==} + /@babel/plugin-transform-shorthand-properties@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.22.5) + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - transitivePeerDependencies: - - supports-color dev: true - /@babel/plugin-transform-class-static-block@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-SPToJ5eYZLxlnp1UzdARpOGeC2GbHvr9d/UV0EukuVx8atktg194oe+C5BqQ8jRTkgLRVOPYeXRSBg1IlMoVRA==} + /@babel/plugin-transform-spread@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==} engines: {node: '>=6.9.0'} peerDependencies: - '@babel/core': ^7.12.0 + '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.22.5) + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.5) - transitivePeerDependencies: - - supports-color + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 dev: true - /@babel/plugin-transform-classes@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-2edQhLfibpWpsVBx2n/GKOz6JdGQvLruZQfGr9l1qes2KQaWswjBzhQF7UDUZMNaMMQeYnQzxwOMPsbYF7wqPQ==} + /@babel/plugin-transform-sticky-regex@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-compilation-targets': 7.22.5(@babel/core@7.21.8) - '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-function-name': 7.22.5 - '@babel/helper-optimise-call-expression': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-replace-supers': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.5 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color dev: true - /@babel/plugin-transform-classes@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-2edQhLfibpWpsVBx2n/GKOz6JdGQvLruZQfGr9l1qes2KQaWswjBzhQF7UDUZMNaMMQeYnQzxwOMPsbYF7wqPQ==} + /@babel/plugin-transform-template-literals@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-compilation-targets': 7.22.5(@babel/core@7.22.5) - '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-function-name': 7.22.5 - '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-replace-supers': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.5 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-computed-properties@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/template': 7.22.5 - dev: true - - /@babel/plugin-transform-computed-properties@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/template': 7.22.5 dev: true - /@babel/plugin-transform-destructuring@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-GfqcFuGW8vnEqTUBM7UtPd5A4q797LTvvwKxXTgRsFjoqaJiEg9deBG6kWeQYkVEL569NpnmpC0Pkr/8BLKGnQ==} + /@babel/plugin-transform-typeof-symbol@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-destructuring@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-GfqcFuGW8vnEqTUBM7UtPd5A4q797LTvvwKxXTgRsFjoqaJiEg9deBG6kWeQYkVEL569NpnmpC0Pkr/8BLKGnQ==} + /@babel/plugin-transform-typescript@7.22.11(@babel/core@7.22.11): + resolution: {integrity: sha512-0E4/L+7gfvHub7wsbTv03oRtD69X31LByy44fGmFzbZScpupFByMcgCJ0VbBTkzyjSJKuRoGN8tcijOWKTmqOA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-create-class-features-plugin': 7.22.11(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.22.11) dev: true - /@babel/plugin-transform-dotall-regex@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==} + /@babel/plugin-transform-unicode-escapes@7.22.10(@babel/core@7.22.11): + resolution: {integrity: sha512-lRfaRKGZCBqDlRU3UIFovdp9c9mEvlylmpod0/OatICsSfuQ9YFthRo1tpTkGsklEefZdqlEFdY4A2dwTb6ohg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.21.8) + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-dotall-regex@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==} + /@babel/plugin-transform-unicode-property-regex@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-HCCIb+CbJIAE6sXn5CjFQXMwkCClcOfPCzTlilJ8cUatfzwHlWQkbtV0zD338u9dZskwvuOYTuuaMaA8J5EI5A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.22.5) + '@babel/core': 7.22.11 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-duplicate-keys@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==} + /@babel/plugin-transform-unicode-regex@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 + '@babel/core': 7.22.11 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-duplicate-keys@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==} + /@babel/plugin-transform-unicode-sets-regex@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-lhMfi4FC15j13eKrh3DnYHjpGj6UKQHtNKTbtc1igvAhRy4+kLhV07OpLcsN0VgDEw/MjAvJO4BdMJsHwMhzCg==} engines: {node: '>=6.9.0'} peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.22.11) '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-dynamic-import@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-0MC3ppTB1AMxd8fXjSrbPa7LT9hrImt+/fcj+Pg5YMD7UQyWp/02+JWpdnCymmsXwIx5Z+sYn1bwCn4ZJNvhqQ==} + /@babel/preset-env@7.22.14(@babel/core@7.22.11): + resolution: {integrity: sha512-daodMIoVo+ol/g+//c/AH+szBkFj4STQUikvBijRGL72Ph+w+AMTSh55DUETe8KJlPlDT1k/mp7NBfOuiWmoig==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/compat-data': 7.22.9 + '@babel/core': 7.22.11 + '@babel/helper-compilation-targets': 7.22.10 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.22.5) + '@babel/helper-validator-option': 7.22.5 + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.22.11) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.11) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.22.11) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.11) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.22.11) + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.22.11) + '@babel/plugin-syntax-import-assertions': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-syntax-import-attributes': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.22.11) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.11) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.11) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.11) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.11) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.11) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.11) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.11) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.11) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.22.11) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.22.11) + '@babel/plugin-transform-arrow-functions': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-async-generator-functions': 7.22.11(@babel/core@7.22.11) + '@babel/plugin-transform-async-to-generator': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-block-scoped-functions': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-block-scoping': 7.22.10(@babel/core@7.22.11) + '@babel/plugin-transform-class-properties': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-class-static-block': 7.22.11(@babel/core@7.22.11) + '@babel/plugin-transform-classes': 7.22.6(@babel/core@7.22.11) + '@babel/plugin-transform-computed-properties': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-destructuring': 7.22.10(@babel/core@7.22.11) + '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-duplicate-keys': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-dynamic-import': 7.22.11(@babel/core@7.22.11) + '@babel/plugin-transform-exponentiation-operator': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-export-namespace-from': 7.22.11(@babel/core@7.22.11) + '@babel/plugin-transform-for-of': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-function-name': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-json-strings': 7.22.11(@babel/core@7.22.11) + '@babel/plugin-transform-literals': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-logical-assignment-operators': 7.22.11(@babel/core@7.22.11) + '@babel/plugin-transform-member-expression-literals': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-modules-amd': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-modules-commonjs': 7.22.11(@babel/core@7.22.11) + '@babel/plugin-transform-modules-systemjs': 7.22.11(@babel/core@7.22.11) + '@babel/plugin-transform-modules-umd': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-new-target': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-nullish-coalescing-operator': 7.22.11(@babel/core@7.22.11) + '@babel/plugin-transform-numeric-separator': 7.22.11(@babel/core@7.22.11) + '@babel/plugin-transform-object-rest-spread': 7.22.11(@babel/core@7.22.11) + '@babel/plugin-transform-object-super': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-optional-catch-binding': 7.22.11(@babel/core@7.22.11) + '@babel/plugin-transform-optional-chaining': 7.22.12(@babel/core@7.22.11) + '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-private-methods': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-private-property-in-object': 7.22.11(@babel/core@7.22.11) + '@babel/plugin-transform-property-literals': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-regenerator': 7.22.10(@babel/core@7.22.11) + '@babel/plugin-transform-reserved-words': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-shorthand-properties': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-spread': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-sticky-regex': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-template-literals': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-typeof-symbol': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-unicode-escapes': 7.22.10(@babel/core@7.22.11) + '@babel/plugin-transform-unicode-property-regex': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-unicode-regex': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-unicode-sets-regex': 7.22.5(@babel/core@7.22.11) + '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.22.11) + '@babel/types': 7.22.11 + babel-plugin-polyfill-corejs2: 0.4.5(@babel/core@7.22.11) + babel-plugin-polyfill-corejs3: 0.8.3(@babel/core@7.22.11) + babel-plugin-polyfill-regenerator: 0.5.2(@babel/core@7.22.11) + core-js-compat: 3.32.1 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color dev: true - /@babel/plugin-transform-exponentiation-operator@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==} + /@babel/preset-flow@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-ta2qZ+LSiGCrP5pgcGt8xMnnkXQrq8Sa4Ulhy06BOlF5QbLw9q5hIx7bn5MrsvyTGAfh6kTOo07Q+Pfld/8Y5Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 - '@babel/helper-builder-binary-assignment-operator-visitor': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-validator-option': 7.22.5 + '@babel/plugin-transform-flow-strip-types': 7.22.5(@babel/core@7.22.11) dev: true - /@babel/plugin-transform-exponentiation-operator@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==} - engines: {node: '>=6.9.0'} + /@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.22.11): + resolution: {integrity: sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==} peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-builder-binary-assignment-operator-visitor': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 + '@babel/types': 7.22.11 + esutils: 2.0.3 dev: true - /@babel/plugin-transform-export-namespace-from@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-X4hhm7FRnPgd4nDA4b/5V280xCx6oL7Oob5+9qVS5C13Zq4bh1qq7LU0GgRU6b5dBWBvhGaXYVB4AcN6+ol6vg==} + /@babel/preset-typescript@7.22.11(@babel/core@7.22.11): + resolution: {integrity: sha512-tWY5wyCZYBGY7IlalfKI1rLiGlIfnwsRHZqlky0HVv8qviwQ1Uo/05M6+s+TcTCVa6Bmoo2uJW5TMFX6Wa4qVg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.22.5) + '@babel/helper-validator-option': 7.22.5 + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-modules-commonjs': 7.22.11(@babel/core@7.22.11) + '@babel/plugin-transform-typescript': 7.22.11(@babel/core@7.22.11) dev: true - /@babel/plugin-transform-flow-strip-types@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-tujNbZdxdG0/54g/oua8ISToaXTFBf8EnSb5PgQSciIXWOWKX3S4+JR7ZE9ol8FZwf9kxitzkGQ+QWeov/mCiA==} + /@babel/register@7.22.5(@babel/core@7.22.11): + resolution: {integrity: sha512-vV6pm/4CijSQ8Y47RH5SopXzursN35RQINfGJkmOlcpAtGuf94miFvIPhCKGQN7WGIcsgG1BHEX2KVdTYwTwUQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-flow': 7.22.5(@babel/core@7.22.5) + '@babel/core': 7.22.11 + clone-deep: 4.0.1 + find-cache-dir: 2.1.0 + make-dir: 2.1.0 + pirates: 4.0.6 + source-map-support: 0.5.21 dev: true - /@babel/plugin-transform-for-of@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-3kxQjX1dU9uudwSshyLeEipvrLjBCVthCgeTp6CzE/9JYrlAIaeekVxRpCWsDDfYTfRZRoCeZatCQvwo+wvK8A==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 + /@babel/regjsgen@0.8.0: + resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} dev: true - /@babel/plugin-transform-for-of@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-3kxQjX1dU9uudwSshyLeEipvrLjBCVthCgeTp6CzE/9JYrlAIaeekVxRpCWsDDfYTfRZRoCeZatCQvwo+wvK8A==} + /@babel/runtime@7.22.11: + resolution: {integrity: sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - dev: true + regenerator-runtime: 0.14.0 - /@babel/plugin-transform-function-name@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==} + /@babel/template@7.22.5: + resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.8 - '@babel/helper-compilation-targets': 7.22.5(@babel/core@7.21.8) - '@babel/helper-function-name': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 + '@babel/code-frame': 7.22.13 + '@babel/parser': 7.22.14 + '@babel/types': 7.22.11 dev: true - /@babel/plugin-transform-function-name@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==} + /@babel/traverse@7.22.11: + resolution: {integrity: sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-compilation-targets': 7.22.5(@babel/core@7.22.5) + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.22.10 + '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-json-strings@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-DuCRB7fu8MyTLbEQd1ew3R85nx/88yMoqo2uPSjevMj3yoN7CDM8jkgrY0wmVxfJZyJ/B9fE1iq7EQppWQmR5A==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.5) - dev: true - - /@babel/plugin-transform-literals@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-hoist-variables': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/parser': 7.22.14 + '@babel/types': 7.22.11 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color dev: true - /@babel/plugin-transform-literals@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==} + /@babel/types@7.22.11: + resolution: {integrity: sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-string-parser': 7.22.5 + '@babel/helper-validator-identifier': 7.22.5 + to-fast-properties: 2.0.0 dev: true - /@babel/plugin-transform-logical-assignment-operators@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-MQQOUW1KL8X0cDWfbwYP+TbVbZm16QmQXJQ+vndPtH/BoO0lOKpVoEDMI7+PskYxH+IiE0tS8xZye0qr1lGzSA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.5) - dev: true + /@balena/dockerignore@1.0.2: + resolution: {integrity: sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q==} + dev: false - /@babel/plugin-transform-member-expression-literals@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 + /@base2/pretty-print-object@1.0.1: + resolution: {integrity: sha512-4iri8i1AqYHJE2DstZYkyEprg6Pq6sKx3xn5FpySk9sNhH7qN2LLlHJCfDTZRILNwQNPD7mATWM0TBui7uC1pA==} dev: true - /@babel/plugin-transform-member-expression-literals@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 + /@bcoe/v8-coverage@0.2.3: + resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true - /@babel/plugin-transform-modules-amd@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 + /@cdktf/cli-core@0.17.0(react@17.0.2): + resolution: {integrity: sha512-SW84rbcnvUsROC5FOIw6AXBGq2cBAdM278ar7j3PPTaun5tjYZaImIN70YFI5aV2A8PDm8yoilZADem8/2rUUA==} dependencies: - '@babel/core': 7.21.8 - '@babel/helper-module-transforms': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 + '@cdktf/commons': 0.17.0 + '@cdktf/hcl2cdk': 0.17.0 + '@cdktf/hcl2json': 0.17.0 + '@cdktf/node-pty-prebuilt-multiarch': 0.10.1-pre.10 + '@sentry/node': 6.19.7 + archiver: 5.3.2 + cdktf: 0.17.0(constructs@10.2.70) + chalk: 4.1.2 + chokidar: 3.5.3 + cli-spinners: 2.7.0 + codemaker: 1.88.0 + constructs: 10.2.70 + cross-fetch: 3.1.8 + cross-spawn: 7.0.3 + detect-port: 1.5.1 + execa: 5.1.1 + extract-zip: 2.0.1 + follow-redirects: 1.15.2 + fs-extra: 8.1.0 + https-proxy-agent: 5.0.1 + indent-string: 4.0.0 + ink: 3.2.0(react@17.0.2) + ink-select-input: 4.2.2(ink@3.2.0)(react@17.0.2) + ink-spinner: 4.0.3(ink@3.2.0)(react@17.0.2) + ink-testing-library: 2.1.0 + ink-use-stdout-dimensions: 1.0.5(ink@3.2.0)(react@17.0.2) + jsii: 5.0.21 + jsii-pacmak: 1.88.0 + jsii-srcmak: 0.1.951 + lodash.isequal: 4.5.0 + log4js: 6.9.1 + minimatch: 5.1.6 + node-fetch: 2.7.0 + open: 7.4.2 + parse-gitignore: 1.0.1 + pkg-up: 3.1.0 + semver: 7.5.4 + sscaff: 1.2.274 + stream-buffers: 3.0.2 + strip-ansi: 6.0.1 + tunnel-agent: 0.6.0 + uuid: 8.3.2 + xml-js: 1.6.11 + xstate: 4.38.2 + yargs: 17.7.2 + yoga-layout-prebuilt: 1.10.0 + zod: 1.11.17 transitivePeerDependencies: + - '@types/react' + - bufferutil + - debug + - encoding + - react - supports-color + - utf-8-validate dev: true - /@babel/plugin-transform-modules-amd@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 + /@cdktf/commons@0.17.0: + resolution: {integrity: sha512-zXWuaU/5HpIrg+IJPcCIp+yJHsn34Z0tmB6OusCofjhK677TLDt+jE5KKhgThM+NJLBYW5iSd8dMqn9e5KZong==} dependencies: - '@babel/core': 7.22.5 - '@babel/helper-module-transforms': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 + '@npmcli/ci-detect': 1.4.0 + '@sentry/node': 6.19.7 + cdktf: 0.17.0(constructs@10.2.70) + codemaker: 1.88.0 + constructs: 10.2.70 + cross-spawn: 7.0.3 + follow-redirects: 1.15.2 + fs-extra: 8.1.0 + is-valid-domain: 0.1.6 + log4js: 6.9.1 + uuid: 8.3.2 transitivePeerDependencies: + - debug - supports-color dev: true - /@babel/plugin-transform-modules-commonjs@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-B4pzOXj+ONRmuaQTg05b3y/4DuFz3WcCNAXPLb2Q0GT0TrGKGxNKV4jwsXts+StaM0LQczZbOpj8o1DLPDJIiA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 + /@cdktf/hcl2cdk@0.17.0: + resolution: {integrity: sha512-RkBTWlK15YjO5wqlgmLyPBy2nsoeIFZRI5EhaPeYhqjBr8qHH+Zhg4/jSSfW/trrdZazIortQzdfdbShvZYhhw==} dependencies: - '@babel/core': 7.21.8 - '@babel/helper-module-transforms': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-simple-access': 7.22.5 + '@babel/generator': 7.22.10 + '@babel/template': 7.22.5 + '@babel/types': 7.22.11 + '@cdktf/commons': 0.17.0 + '@cdktf/hcl2json': 0.17.0 + '@cdktf/provider-generator': 0.17.0 + camelcase: 6.3.0 + deep-equal: 2.2.2 + glob: 10.3.4 + graphology: 0.25.4(graphology-types@0.24.7) + graphology-types: 0.24.7 + jsii-rosetta: 5.0.11 + prettier: 2.8.8 + reserved-words: 0.1.2 + zod: 3.22.2 transitivePeerDependencies: + - debug - supports-color dev: true - /@babel/plugin-transform-modules-commonjs@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-B4pzOXj+ONRmuaQTg05b3y/4DuFz3WcCNAXPLb2Q0GT0TrGKGxNKV4jwsXts+StaM0LQczZbOpj8o1DLPDJIiA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 + /@cdktf/hcl2json@0.17.0: + resolution: {integrity: sha512-PNEDsVJBHqlBZtQNvMimjpkIkqqrRqWq7NVJaGiCSpb02rf5VeCgJvZhY0stUXd6hmsi4pg/Y10v4tjv7gb/XA==} dependencies: - '@babel/core': 7.22.5 - '@babel/helper-module-transforms': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-simple-access': 7.22.5 - transitivePeerDependencies: - - supports-color + fs-extra: 11.1.1 dev: true - /@babel/plugin-transform-modules-systemjs@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-emtEpoaTMsOs6Tzz+nbmcePl6AKVtS1yC4YNAeMun9U8YCsgadPNxnOPQ8GhHFB2qdx+LZu9LgoC0Lthuu05DQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 + /@cdktf/node-pty-prebuilt-multiarch@0.10.1-pre.10: + resolution: {integrity: sha512-5ysQrHJvqYLYg407KvaDNu+xx68ZGaqeF0SohXe5e4yNqJhPFPUQ536rkReQcPc2yZiF5PDmmvf5T9MOacHpSQ==} + requiresBuild: true dependencies: - '@babel/core': 7.21.8 - '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-module-transforms': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-validator-identifier': 7.22.5 - transitivePeerDependencies: - - supports-color + nan: 2.17.0 + prebuild-install: 7.1.1 dev: true - /@babel/plugin-transform-modules-systemjs@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-emtEpoaTMsOs6Tzz+nbmcePl6AKVtS1yC4YNAeMun9U8YCsgadPNxnOPQ8GhHFB2qdx+LZu9LgoC0Lthuu05DQ==} - engines: {node: '>=6.9.0'} + /@cdktf/provider-aws@15.0.0(cdktf@0.17.0)(constructs@10.2.70): + resolution: {integrity: sha512-GeXpsU8+TsXhFFowjos+7bYv2CDAMHjOlKxXTx6aaqEO7BTlyqXBM/Qetw6y/6MxwIcyEf5siduBeT6T3lg3Dg==} + engines: {node: '>= 16.14.0'} peerDependencies: - '@babel/core': ^7.0.0-0 + cdktf: ^0.17.0 + constructs: ^10.0.0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-module-transforms': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-validator-identifier': 7.22.5 + cdktf: 0.17.0(constructs@10.2.70) + constructs: 10.2.70 + + /@cdktf/provider-generator@0.17.0: + resolution: {integrity: sha512-/Ei9uVuLT6xjJIn6hvGepmS7tOjOAYsUplpc3J2jS1US85aO7oMASgjjgISvDC7saddLqhYCfysSWrYU5zUp0g==} + dependencies: + '@cdktf/commons': 0.17.0 + '@cdktf/hcl2json': 0.17.0 + '@types/node': 16.18.23 + codemaker: 1.88.0 + deepmerge: 4.3.1 + fs-extra: 8.1.0 + jsii-srcmak: 0.1.951 transitivePeerDependencies: + - debug - supports-color dev: true - /@babel/plugin-transform-modules-umd@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-module-transforms': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-modules-umd@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-module-transforms': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.21.8) - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.22.5) - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-new-target@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-new-target@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-nullish-coalescing-operator@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-6CF8g6z1dNYZ/VXok5uYkkBBICHZPiGEl7oDnAx2Mt1hlHVHOSIKWJaXHjQJA5VB43KZnXZDIexMchY4y2PGdA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.5) - dev: true - - /@babel/plugin-transform-numeric-separator@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-NbslED1/6M+sXiwwtcAB/nieypGw02Ejf4KtDeMkCEpP6gWFMX1wI9WKYua+4oBneCCEmulOkRpwywypVZzs/g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.5) - dev: true - - /@babel/plugin-transform-object-rest-spread@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-Kk3lyDmEslH9DnvCDA1s1kkd3YWQITiBOHngOtDL9Pt6BZjzqb6hiOlb8VfjiiQJ2unmegBqZu0rx5RxJb5vmQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/compat-data': 7.22.5 - '@babel/core': 7.22.5 - '@babel/helper-compilation-targets': 7.22.5(@babel/core@7.22.5) - '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.22.5) - dev: true - - /@babel/plugin-transform-object-super@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-replace-supers': 7.22.5 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-object-super@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-replace-supers': 7.22.5 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-optional-catch-binding@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-pH8orJahy+hzZje5b8e2QIlBWQvGpelS76C63Z+jhZKsmzfNaPQ+LaW6dcJ9bxTpo1mtXbgHwy765Ro3jftmUg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.5) - dev: true - - /@babel/plugin-transform-optional-chaining@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-AconbMKOMkyG+xCng2JogMCDcqW8wedQAqpVIL4cOSescZ7+iW8utC6YDZLMCSUIReEA733gzRSaOSXMAt/4WQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.21.8) - dev: true - - /@babel/plugin-transform-optional-chaining@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-AconbMKOMkyG+xCng2JogMCDcqW8wedQAqpVIL4cOSescZ7+iW8utC6YDZLMCSUIReEA733gzRSaOSXMAt/4WQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.5) - dev: true - - /@babel/plugin-transform-parameters@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-AVkFUBurORBREOmHRKo06FjHYgjrabpdqRSwq6+C7R5iTCZOsM4QbcB27St0a4U6fffyAOqh3s/qEfybAhfivg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-parameters@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-AVkFUBurORBREOmHRKo06FjHYgjrabpdqRSwq6+C7R5iTCZOsM4QbcB27St0a4U6fffyAOqh3s/qEfybAhfivg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-private-methods@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-PPjh4gyrQnGe97JTalgRGMuU4icsZFnWkzicB/fUtzlKUqvsWBKEpPPfr5a2JiyirZkHxnAqkQMO5Z5B2kK3fA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.22.5) - '@babel/helper-plugin-utils': 7.22.5 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-private-property-in-object@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-/9xnaTTJcVoBtSSmrVyhtSvO3kbqS2ODoh2juEU72c3aYonNF0OMGiaz2gjukyKM2wBBYJP38S4JiE0Wfb5VMQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.22.5) - '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.5) - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-property-literals@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-property-literals@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-react-jsx-self@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-nTh2ogNUtxbiSbxaT4Ds6aXnXEipHweN9YRgOX/oNXdf0cCrGn/+2LozFa3lnPV5D90MkjhgckCPBrsoSc1a7g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-react-jsx-source@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-yIiRO6yobeEIaI0RTbIr8iAK9FcBHLtZq0S89ZPjDLQXBA4xvghaKqI0etp/tF3htTM0sazJKKLz9oEiGRtu7w==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-react-jsx@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-rog5gZaVbUip5iWDMTYbVM15XQq+RkUKhET/IHR6oizR+JEoN6CAfTTuHcK4vwUyzca30qqHqEpzBOnaRMWYMA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-module-imports': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.5) - '@babel/types': 7.22.5 - dev: true - - /@babel/plugin-transform-regenerator@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-rR7KePOE7gfEtNTh9Qw+iO3Q/e4DEsoQ+hdvM6QUDH7JRJ5qxq5AA52ZzBWbI5i9lfNuvySgOGP8ZN7LAmaiPw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 - regenerator-transform: 0.15.1 - dev: true - - /@babel/plugin-transform-regenerator@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-rR7KePOE7gfEtNTh9Qw+iO3Q/e4DEsoQ+hdvM6QUDH7JRJ5qxq5AA52ZzBWbI5i9lfNuvySgOGP8ZN7LAmaiPw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - regenerator-transform: 0.15.1 - dev: true - - /@babel/plugin-transform-reserved-words@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-reserved-words@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-shorthand-properties@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-shorthand-properties@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-spread@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - dev: true - - /@babel/plugin-transform-spread@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - dev: true - - /@babel/plugin-transform-sticky-regex@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-sticky-regex@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-template-literals@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-template-literals@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-typeof-symbol@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-typeof-symbol@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-typescript@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-SMubA9S7Cb5sGSFFUlqxyClTA9zWJ8qGQrppNUm05LtFuN1ELRFNndkix4zUJrC9F+YivWwa1dHMSyo0e0N9dA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.22.5(@babel/core@7.22.5) - '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.22.5) - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-unicode-escapes@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-biEmVg1IYB/raUO5wT1tgfacCef15Fbzhkx493D3urBI++6hpJ+RFG4SrWMn0NEZLfvilqKf3QDrRVZHo08FYg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-unicode-escapes@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-biEmVg1IYB/raUO5wT1tgfacCef15Fbzhkx493D3urBI++6hpJ+RFG4SrWMn0NEZLfvilqKf3QDrRVZHo08FYg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-unicode-property-regex@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-HCCIb+CbJIAE6sXn5CjFQXMwkCClcOfPCzTlilJ8cUatfzwHlWQkbtV0zD338u9dZskwvuOYTuuaMaA8J5EI5A==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.22.5) - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-unicode-regex@7.22.5(@babel/core@7.21.8): - resolution: {integrity: sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.21.8) - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-unicode-regex@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.22.5) - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/plugin-transform-unicode-sets-regex@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-lhMfi4FC15j13eKrh3DnYHjpGj6UKQHtNKTbtc1igvAhRy4+kLhV07OpLcsN0VgDEw/MjAvJO4BdMJsHwMhzCg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-create-regexp-features-plugin': 7.22.5(@babel/core@7.22.5) - '@babel/helper-plugin-utils': 7.22.5 - dev: true - - /@babel/preset-env@7.21.5(@babel/core@7.21.8): - resolution: {integrity: sha512-wH00QnTTldTbf/IefEVyChtRdw5RJvODT/Vb4Vcxq1AZvtXj6T0YeX0cAcXhI6/BdGuiP3GcNIL4OQbI2DVNxg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/compat-data': 7.22.5 - '@babel/core': 7.21.8 - '@babel/helper-compilation-targets': 7.22.5(@babel/core@7.21.8) - '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-validator-option': 7.22.5 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-proposal-async-generator-functions': 7.20.7(@babel/core@7.21.8) - '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.21.8) - '@babel/plugin-proposal-class-static-block': 7.21.0(@babel/core@7.21.8) - '@babel/plugin-proposal-dynamic-import': 7.18.6(@babel/core@7.21.8) - '@babel/plugin-proposal-export-namespace-from': 7.18.9(@babel/core@7.21.8) - '@babel/plugin-proposal-json-strings': 7.18.6(@babel/core@7.21.8) - '@babel/plugin-proposal-logical-assignment-operators': 7.20.7(@babel/core@7.21.8) - '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.21.8) - '@babel/plugin-proposal-numeric-separator': 7.18.6(@babel/core@7.21.8) - '@babel/plugin-proposal-object-rest-spread': 7.20.7(@babel/core@7.21.8) - '@babel/plugin-proposal-optional-catch-binding': 7.18.6(@babel/core@7.21.8) - '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.21.8) - '@babel/plugin-proposal-private-methods': 7.18.6(@babel/core@7.21.8) - '@babel/plugin-proposal-private-property-in-object': 7.21.11(@babel/core@7.21.8) - '@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.21.8) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.21.8) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.21.8) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.21.8) - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.21.8) - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.21.8) - '@babel/plugin-syntax-import-assertions': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.21.8) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.21.8) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.21.8) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.21.8) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.21.8) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.21.8) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.21.8) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.21.8) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.21.8) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.21.8) - '@babel/plugin-transform-arrow-functions': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-async-to-generator': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-block-scoped-functions': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-block-scoping': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-classes': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-computed-properties': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-destructuring': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-duplicate-keys': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-exponentiation-operator': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-for-of': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-function-name': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-literals': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-member-expression-literals': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-modules-amd': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-modules-systemjs': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-modules-umd': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-new-target': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-object-super': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-property-literals': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-regenerator': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-reserved-words': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-shorthand-properties': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-spread': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-sticky-regex': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-template-literals': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-typeof-symbol': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-unicode-escapes': 7.22.5(@babel/core@7.21.8) - '@babel/plugin-transform-unicode-regex': 7.22.5(@babel/core@7.21.8) - '@babel/preset-modules': 0.1.5(@babel/core@7.21.8) - '@babel/types': 7.21.5 - babel-plugin-polyfill-corejs2: 0.3.3(@babel/core@7.21.8) - babel-plugin-polyfill-corejs3: 0.6.0(@babel/core@7.21.8) - babel-plugin-polyfill-regenerator: 0.4.1(@babel/core@7.21.8) - core-js-compat: 3.31.0 - semver: 6.3.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/preset-env@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-fj06hw89dpiZzGZtxn+QybifF07nNiZjZ7sazs2aVDcysAZVGjW7+7iFYxg6GLNM47R/thYfLdrXc+2f11Vi9A==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/compat-data': 7.22.5 - '@babel/core': 7.22.5 - '@babel/helper-compilation-targets': 7.22.5(@babel/core@7.22.5) - '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-validator-option': 7.22.5 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.22.5) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.5) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.22.5) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.5) - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-import-assertions': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-syntax-import-attributes': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.22.5) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.5) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.5) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.5) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.22.5) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.22.5) - '@babel/plugin-transform-arrow-functions': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-async-generator-functions': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-async-to-generator': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-block-scoped-functions': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-block-scoping': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-class-properties': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-class-static-block': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-classes': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-computed-properties': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-destructuring': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-duplicate-keys': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-dynamic-import': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-exponentiation-operator': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-export-namespace-from': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-for-of': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-function-name': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-json-strings': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-literals': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-logical-assignment-operators': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-member-expression-literals': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-modules-amd': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-modules-systemjs': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-modules-umd': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-new-target': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-nullish-coalescing-operator': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-numeric-separator': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-object-rest-spread': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-object-super': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-optional-catch-binding': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-optional-chaining': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-private-methods': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-private-property-in-object': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-property-literals': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-regenerator': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-reserved-words': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-shorthand-properties': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-spread': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-sticky-regex': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-template-literals': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-typeof-symbol': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-unicode-escapes': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-unicode-property-regex': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-unicode-regex': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-unicode-sets-regex': 7.22.5(@babel/core@7.22.5) - '@babel/preset-modules': 0.1.5(@babel/core@7.22.5) - '@babel/types': 7.22.5 - babel-plugin-polyfill-corejs2: 0.4.3(@babel/core@7.22.5) - babel-plugin-polyfill-corejs3: 0.8.1(@babel/core@7.22.5) - babel-plugin-polyfill-regenerator: 0.5.0(@babel/core@7.22.5) - core-js-compat: 3.31.0 - semver: 6.3.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/preset-flow@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-ta2qZ+LSiGCrP5pgcGt8xMnnkXQrq8Sa4Ulhy06BOlF5QbLw9q5hIx7bn5MrsvyTGAfh6kTOo07Q+Pfld/8Y5Q==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-validator-option': 7.22.5 - '@babel/plugin-transform-flow-strip-types': 7.22.5(@babel/core@7.22.5) - dev: true - - /@babel/preset-modules@0.1.5(@babel/core@7.21.8): - resolution: {integrity: sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.21.8) - '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.21.8) - '@babel/types': 7.22.5 - esutils: 2.0.3 - dev: true - - /@babel/preset-modules@0.1.5(@babel/core@7.22.5): - resolution: {integrity: sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.22.5) - '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.22.5) - '@babel/types': 7.22.5 - esutils: 2.0.3 - dev: true - - /@babel/preset-typescript@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-YbPaal9LxztSGhmndR46FmAbkJ/1fAsw293tSU+I5E5h+cnJ3d4GTwyUgGYmOXJYdGA+uNePle4qbaRzj2NISQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-validator-option': 7.22.5 - '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-typescript': 7.22.5(@babel/core@7.22.5) - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/register@7.22.5(@babel/core@7.22.5): - resolution: {integrity: sha512-vV6pm/4CijSQ8Y47RH5SopXzursN35RQINfGJkmOlcpAtGuf94miFvIPhCKGQN7WGIcsgG1BHEX2KVdTYwTwUQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.5 - clone-deep: 4.0.1 - find-cache-dir: 2.1.0 - make-dir: 2.1.0 - pirates: 4.0.6 - source-map-support: 0.5.21 - dev: true - - /@babel/regjsgen@0.8.0: - resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} - dev: true - - /@babel/runtime@7.22.5: - resolution: {integrity: sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==} - engines: {node: '>=6.9.0'} - dependencies: - regenerator-runtime: 0.13.11 - - /@babel/template@7.22.5: - resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.22.5 - '@babel/parser': 7.22.5 - '@babel/types': 7.22.5 - dev: true - - /@babel/traverse@7.21.5: - resolution: {integrity: sha512-AhQoI3YjWi6u/y/ntv7k48mcrCXmus0t79J9qPNlk/lAsFlCiJ047RmbfMOawySTHtywXhbXgpx/8nXMYd+oFw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.22.5 - '@babel/generator': 7.21.9 - '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-function-name': 7.22.5 - '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.5 - '@babel/parser': 7.21.9 - '@babel/types': 7.21.5 - debug: 4.3.4 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/traverse@7.22.5: - resolution: {integrity: sha512-7DuIjPgERaNo6r+PZwItpjCZEa5vyw4eJGufeLxrPdBXBoLcCJCIasvK6pK/9DVNrLZTLFhUGqaC6X/PA007TQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.22.5 - '@babel/generator': 7.22.5 - '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-function-name': 7.22.5 - '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.5 - '@babel/parser': 7.22.5 - '@babel/types': 7.22.5 - debug: 4.3.4 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/types@7.21.5: - resolution: {integrity: sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.22.5 - '@babel/helper-validator-identifier': 7.22.5 - to-fast-properties: 2.0.0 - dev: true - - /@babel/types@7.22.5: - resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.22.5 - '@babel/helper-validator-identifier': 7.22.5 - to-fast-properties: 2.0.0 - dev: true - - /@balena/dockerignore@1.0.2: - resolution: {integrity: sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q==} - dev: false - - /@base2/pretty-print-object@1.0.1: - resolution: {integrity: sha512-4iri8i1AqYHJE2DstZYkyEprg6Pq6sKx3xn5FpySk9sNhH7qN2LLlHJCfDTZRILNwQNPD7mATWM0TBui7uC1pA==} - dev: true - - /@bcoe/v8-coverage@0.2.3: - resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - dev: true - - /@cdktf/cli-core@0.17.0(react@17.0.2): - resolution: {integrity: sha512-SW84rbcnvUsROC5FOIw6AXBGq2cBAdM278ar7j3PPTaun5tjYZaImIN70YFI5aV2A8PDm8yoilZADem8/2rUUA==} - dependencies: - '@cdktf/commons': 0.17.0 - '@cdktf/hcl2cdk': 0.17.0 - '@cdktf/hcl2json': 0.17.0 - '@cdktf/node-pty-prebuilt-multiarch': 0.10.1-pre.10 - '@sentry/node': 6.19.7 - archiver: 5.3.1 - cdktf: 0.17.0(constructs@10.2.69) - chalk: 4.1.2 - chokidar: 3.5.3 - cli-spinners: 2.7.0 - codemaker: 1.84.0 - constructs: 10.2.69 - cross-fetch: 3.1.6 - cross-spawn: 7.0.3 - detect-port: 1.5.1 - execa: 5.1.1 - extract-zip: 2.0.1 - follow-redirects: 1.15.2 - fs-extra: 8.1.0 - https-proxy-agent: 5.0.1 - indent-string: 4.0.0 - ink: 3.2.0(react@17.0.2) - ink-select-input: 4.2.2(ink@3.2.0)(react@17.0.2) - ink-spinner: 4.0.3(ink@3.2.0)(react@17.0.2) - ink-testing-library: 2.1.0 - ink-use-stdout-dimensions: 1.0.5(ink@3.2.0)(react@17.0.2) - jsii: 5.0.11(patch_hash=zhi5puwzi5jiulxnmqgkd4wl2a) - jsii-pacmak: 1.84.0 - jsii-srcmak: 0.1.943 - lodash.isequal: 4.5.0 - log4js: 6.9.1 - minimatch: 5.1.6 - node-fetch: 2.6.12 - open: 7.4.2 - parse-gitignore: 1.0.1 - pkg-up: 3.1.0 - semver: 7.5.3 - sscaff: 1.2.274 - stream-buffers: 3.0.2 - strip-ansi: 6.0.1 - tunnel-agent: 0.6.0 - uuid: 8.3.2 - xml-js: 1.6.11 - xstate: 4.38.0 - yargs: 17.7.2 - yoga-layout-prebuilt: 1.10.0 - zod: 1.11.17 - transitivePeerDependencies: - - '@types/react' - - bufferutil - - debug - - encoding - - react - - supports-color - - utf-8-validate - dev: true - - /@cdktf/commons@0.17.0: - resolution: {integrity: sha512-zXWuaU/5HpIrg+IJPcCIp+yJHsn34Z0tmB6OusCofjhK677TLDt+jE5KKhgThM+NJLBYW5iSd8dMqn9e5KZong==} - dependencies: - '@npmcli/ci-detect': 1.4.0 - '@sentry/node': 6.19.7 - cdktf: 0.17.0(constructs@10.2.69) - codemaker: 1.84.0 - constructs: 10.2.69 - cross-spawn: 7.0.3 - follow-redirects: 1.15.2 - fs-extra: 8.1.0 - is-valid-domain: 0.1.6 - log4js: 6.9.1 - uuid: 8.3.2 - transitivePeerDependencies: - - debug - - supports-color - dev: true - - /@cdktf/hcl2cdk@0.17.0: - resolution: {integrity: sha512-RkBTWlK15YjO5wqlgmLyPBy2nsoeIFZRI5EhaPeYhqjBr8qHH+Zhg4/jSSfW/trrdZazIortQzdfdbShvZYhhw==} - dependencies: - '@babel/generator': 7.22.5 - '@babel/template': 7.22.5 - '@babel/types': 7.22.5 - '@cdktf/commons': 0.17.0 - '@cdktf/hcl2json': 0.17.0 - '@cdktf/provider-generator': 0.17.0 - camelcase: 6.3.0 - deep-equal: 2.2.1 - glob: 10.3.1 - graphology: 0.25.1(graphology-types@0.24.7) - graphology-types: 0.24.7 - jsii-rosetta: 5.1.3 - prettier: 2.8.8 - reserved-words: 0.1.2 - zod: 3.21.4 - transitivePeerDependencies: - - debug - - supports-color - dev: true - - /@cdktf/hcl2json@0.17.0: - resolution: {integrity: sha512-PNEDsVJBHqlBZtQNvMimjpkIkqqrRqWq7NVJaGiCSpb02rf5VeCgJvZhY0stUXd6hmsi4pg/Y10v4tjv7gb/XA==} - dependencies: - fs-extra: 11.1.1 - dev: true - - /@cdktf/node-pty-prebuilt-multiarch@0.10.1-pre.10: - resolution: {integrity: sha512-5ysQrHJvqYLYg407KvaDNu+xx68ZGaqeF0SohXe5e4yNqJhPFPUQ536rkReQcPc2yZiF5PDmmvf5T9MOacHpSQ==} - requiresBuild: true - dependencies: - nan: 2.17.0 - prebuild-install: 7.1.1 - dev: true - - /@cdktf/provider-aws@15.0.0(cdktf@0.17.0)(constructs@10.2.51): - resolution: {integrity: sha512-GeXpsU8+TsXhFFowjos+7bYv2CDAMHjOlKxXTx6aaqEO7BTlyqXBM/Qetw6y/6MxwIcyEf5siduBeT6T3lg3Dg==} - engines: {node: '>= 16.14.0'} - peerDependencies: - cdktf: ^0.17.0 - constructs: ^10.0.0 - dependencies: - cdktf: 0.17.0(constructs@10.2.51) - constructs: 10.2.51 - dev: false - - /@cdktf/provider-aws@15.0.0(cdktf@0.17.0)(constructs@10.2.69): - resolution: {integrity: sha512-GeXpsU8+TsXhFFowjos+7bYv2CDAMHjOlKxXTx6aaqEO7BTlyqXBM/Qetw6y/6MxwIcyEf5siduBeT6T3lg3Dg==} - engines: {node: '>= 16.14.0'} - peerDependencies: - cdktf: ^0.17.0 - constructs: ^10.0.0 - dependencies: - cdktf: 0.17.0(constructs@10.2.69) - constructs: 10.2.69 - dev: true - - /@cdktf/provider-generator@0.17.0: - resolution: {integrity: sha512-/Ei9uVuLT6xjJIn6hvGepmS7tOjOAYsUplpc3J2jS1US85aO7oMASgjjgISvDC7saddLqhYCfysSWrYU5zUp0g==} - dependencies: - '@cdktf/commons': 0.17.0 - '@cdktf/hcl2json': 0.17.0 - '@types/node': 16.18.23 - codemaker: 1.84.0 - deepmerge: 4.3.1 - fs-extra: 8.1.0 - jsii-srcmak: 0.1.943 - transitivePeerDependencies: - - debug - - supports-color - dev: true - - /@cloudy-ts/eslint-plugin@0.0.260(eslint@8.42.0): - resolution: {integrity: sha512-4mOL06xDWMyUz6OB0chNOwb3zhmDrXpHL7e7ZkCp5ysUQ2EEG4ms1Qg0vKBatKTN3LkYBeVqEqJRVGGg7/icSQ==} - engines: {node: '>= 14.18.0'} + /@cloudy-ts/eslint-plugin@0.0.260(eslint@8.48.0): + resolution: {integrity: sha512-4mOL06xDWMyUz6OB0chNOwb3zhmDrXpHL7e7ZkCp5ysUQ2EEG4ms1Qg0vKBatKTN3LkYBeVqEqJRVGGg7/icSQ==} + engines: {node: '>= 14.18.0'} peerDependencies: eslint: ^8.36.0 dependencies: - eslint: 8.42.0 + eslint: 8.48.0 dev: false /@colors/colors@1.5.0: @@ -5613,20 +4289,20 @@ packages: /@esbuild-kit/cjs-loader@2.4.2: resolution: {integrity: sha512-BDXFbYOJzT/NBEtp71cvsrGPwGAMGRB/349rwKuoxNSiKjPraNNnlK6MIIabViCjqZugu6j+xeMDlEkWdHHJSg==} dependencies: - '@esbuild-kit/core-utils': 3.1.0 - get-tsconfig: 4.6.2 + '@esbuild-kit/core-utils': 3.2.2 + get-tsconfig: 4.7.0 - /@esbuild-kit/core-utils@3.1.0: - resolution: {integrity: sha512-Uuk8RpCg/7fdHSceR1M6XbSZFSuMrxcePFuGgyvsBn+u339dk5OeL4jv2EojwTN2st/unJGsVm4qHWjWNmJ/tw==} + /@esbuild-kit/core-utils@3.2.2: + resolution: {integrity: sha512-Ub6LaRaAgF80dTSzUdXpFLM1pVDdmEVB9qb5iAzSpyDlX/mfJTFGOnZ516O05p5uWWteNviMKi4PAyEuRxI5gA==} dependencies: - esbuild: 0.17.19 + esbuild: 0.18.20 source-map-support: 0.5.21 /@esbuild-kit/esm-loader@2.5.5: resolution: {integrity: sha512-Qwfvj/qoPbClxCRNuac1Du01r9gvNOT+pMYtJDapfB1eoGN1YlJ1BixLyL9WVENRx5RXgNLdfYdx/CuswlGhMw==} dependencies: - '@esbuild-kit/core-utils': 3.1.0 - get-tsconfig: 4.6.2 + '@esbuild-kit/core-utils': 3.2.2 + get-tsconfig: 4.7.0 /@esbuild/android-arm64@0.17.19: resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} @@ -5634,15 +4310,15 @@ packages: cpu: [arm64] os: [android] requiresBuild: true + dev: true optional: true - /@esbuild/android-arm64@0.18.10: - resolution: {integrity: sha512-ynm4naLbNbK0ajf9LUWtQB+6Vfg1Z/AplArqr4tGebC00Z6m9Y91OVIcjDa461wGcZwcaHYaZAab4yJxfhisTQ==} + /@esbuild/android-arm64@0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/android-arm@0.15.18: @@ -5660,15 +4336,15 @@ packages: cpu: [arm] os: [android] requiresBuild: true + dev: true optional: true - /@esbuild/android-arm@0.18.10: - resolution: {integrity: sha512-3KClmVNd+Fku82uZJz5C4Rx8m1PPmWUFz5Zkw8jkpZPOmsq+EG1TTOtw1OXkHuX3WczOFQigrtf60B1ijKwNsg==} + /@esbuild/android-arm@0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} engines: {node: '>=12'} cpu: [arm] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/android-x64@0.17.19: @@ -5677,15 +4353,15 @@ packages: cpu: [x64] os: [android] requiresBuild: true + dev: true optional: true - /@esbuild/android-x64@0.18.10: - resolution: {integrity: sha512-vFfXj8P9Yfjh54yqUDEHKzqzYuEfPyAOl3z7R9hjkwt+NCvbn9VMxX+IILnAfdImRBfYVItgSUsqGKhJFnBwZw==} + /@esbuild/android-x64@0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} engines: {node: '>=12'} cpu: [x64] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/darwin-arm64@0.17.19: @@ -5694,15 +4370,15 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: true optional: true - /@esbuild/darwin-arm64@0.18.10: - resolution: {integrity: sha512-k2OJQ7ZxE6sVc91+MQeZH9gFeDAH2uIYALPAwTjTCvcPy9Dzrf7V7gFUQPYkn09zloWhQ+nvxWHia2x2ZLR0sQ==} + /@esbuild/darwin-arm64@0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true - dev: true optional: true /@esbuild/darwin-x64@0.17.19: @@ -5711,15 +4387,15 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: true optional: true - /@esbuild/darwin-x64@0.18.10: - resolution: {integrity: sha512-tnz/mdZk1L1Z3WpGjin/L2bKTe8/AKZpI8fcCLtH+gq8WXWsCNJSxlesAObV4qbtTl6pG5vmqFXfWUQ5hV8PAQ==} + /@esbuild/darwin-x64@0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true - dev: true optional: true /@esbuild/freebsd-arm64@0.17.19: @@ -5728,15 +4404,15 @@ packages: cpu: [arm64] os: [freebsd] requiresBuild: true + dev: true optional: true - /@esbuild/freebsd-arm64@0.18.10: - resolution: {integrity: sha512-QJluV0LwBrbHnYYwSKC+K8RGz0g/EyhpQH1IxdoFT0nM7PfgjE+aS8wxq/KFEsU0JkL7U/EEKd3O8xVBxXb2aA==} + /@esbuild/freebsd-arm64@0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] requiresBuild: true - dev: true optional: true /@esbuild/freebsd-x64@0.17.19: @@ -5745,15 +4421,15 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true + dev: true optional: true - /@esbuild/freebsd-x64@0.18.10: - resolution: {integrity: sha512-Hi/ycUkS6KTw+U9G5PK5NoK7CZboicaKUSVs0FSiPNtuCTzK6HNM4DIgniH7hFaeuszDS9T4dhAHWiLSt/Y5Ng==} + /@esbuild/freebsd-x64@0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] requiresBuild: true - dev: true optional: true /@esbuild/linux-arm64@0.17.19: @@ -5762,15 +4438,15 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true - /@esbuild/linux-arm64@0.18.10: - resolution: {integrity: sha512-Nz6XcfRBOO7jSrVpKAyEyFOPGhySPNlgumSDhWAspdQQ11ub/7/NZDMhWDFReE9QH/SsCOCLQbdj0atAk/HMOQ==} + /@esbuild/linux-arm64@0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} engines: {node: '>=12'} cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-arm@0.17.19: @@ -5779,15 +4455,15 @@ packages: cpu: [arm] os: [linux] requiresBuild: true + dev: true optional: true - /@esbuild/linux-arm@0.18.10: - resolution: {integrity: sha512-HfFoxY172tVHPIvJy+FHxzB4l8xU7e5cxmNS11cQ2jt4JWAukn/7LXaPdZid41UyTweqa4P/1zs201gRGCTwHw==} + /@esbuild/linux-arm@0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} engines: {node: '>=12'} cpu: [arm] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-ia32@0.17.19: @@ -5796,15 +4472,15 @@ packages: cpu: [ia32] os: [linux] requiresBuild: true + dev: true optional: true - /@esbuild/linux-ia32@0.18.10: - resolution: {integrity: sha512-otMdmSmkMe+pmiP/bZBjfphyAsTsngyT9RCYwoFzqrveAbux9nYitDTpdgToG0Z0U55+PnH654gCH2GQ1aB6Yw==} + /@esbuild/linux-ia32@0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} engines: {node: '>=12'} cpu: [ia32] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-loong64@0.15.18: @@ -5822,15 +4498,15 @@ packages: cpu: [loong64] os: [linux] requiresBuild: true + dev: true optional: true - /@esbuild/linux-loong64@0.18.10: - resolution: {integrity: sha512-t8tjFuON1koxskzQ4VFoh0T5UDUMiLYjwf9Wktd0tx8AoK6xgU+5ubKOpWpcnhEQ2tESS5u0v6QuN8PX/ftwcQ==} + /@esbuild/linux-loong64@0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-mips64el@0.17.19: @@ -5839,15 +4515,15 @@ packages: cpu: [mips64el] os: [linux] requiresBuild: true + dev: true optional: true - /@esbuild/linux-mips64el@0.18.10: - resolution: {integrity: sha512-+dUkcVzcfEJHz3HEnVpIJu8z8Wdn2n/nWMWdl6FVPFGJAVySO4g3+XPzNKFytVFwf8hPVDwYXzVcu8GMFqsqZw==} + /@esbuild/linux-mips64el@0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-ppc64@0.17.19: @@ -5856,15 +4532,15 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true + dev: true optional: true - /@esbuild/linux-ppc64@0.18.10: - resolution: {integrity: sha512-sO3PjjxEGy+PY2qkGe2gwJbXdZN9wAYpVBZWFD0AwAoKuXRkWK0/zaMQ5ekUFJDRDCRm8x5U0Axaub7ynH/wVg==} + /@esbuild/linux-ppc64@0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-riscv64@0.17.19: @@ -5873,15 +4549,15 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true + dev: true optional: true - /@esbuild/linux-riscv64@0.18.10: - resolution: {integrity: sha512-JDtdbJg3yjDeXLv4lZYE1kiTnxv73/8cbPHY9T/dUKi8rYOM/k5b3W4UJLMUksuQ6nTm5c89W1nADsql6FW75A==} + /@esbuild/linux-riscv64@0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-s390x@0.17.19: @@ -5890,15 +4566,15 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true + dev: true optional: true - /@esbuild/linux-s390x@0.18.10: - resolution: {integrity: sha512-NLuSKcp8WckjD2a7z5kzLiCywFwBTMlIxDNuud1AUGVuwBBJSkuubp6cNjJ0p5c6CZaA3QqUGwjHJBiG1SoOFw==} + /@esbuild/linux-s390x@0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} engines: {node: '>=12'} cpu: [s390x] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-x64@0.17.19: @@ -5907,15 +4583,15 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true - /@esbuild/linux-x64@0.18.10: - resolution: {integrity: sha512-wj2KRsCsFusli+6yFgNO/zmmLslislAWryJnodteRmGej7ZzinIbMdsyp13rVGde88zxJd5vercNYK9kuvlZaQ==} + /@esbuild/linux-x64@0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/netbsd-x64@0.17.19: @@ -5924,15 +4600,15 @@ packages: cpu: [x64] os: [netbsd] requiresBuild: true + dev: true optional: true - /@esbuild/netbsd-x64@0.18.10: - resolution: {integrity: sha512-pQ9QqxEPI3cVRZyUtCoZxhZK3If+7RzR8L2yz2+TDzdygofIPOJFaAPkEJ5rYIbUO101RaiYxfdOBahYexLk5A==} + /@esbuild/netbsd-x64@0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] requiresBuild: true - dev: true optional: true /@esbuild/openbsd-x64@0.17.19: @@ -5941,15 +4617,15 @@ packages: cpu: [x64] os: [openbsd] requiresBuild: true + dev: true optional: true - /@esbuild/openbsd-x64@0.18.10: - resolution: {integrity: sha512-k8GTIIW9I8pEEfoOUm32TpPMgSg06JhL5DO+ql66aLTkOQUs0TxCA67Wi7pv6z8iF8STCGcNbm3UWFHLuci+ag==} + /@esbuild/openbsd-x64@0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] requiresBuild: true - dev: true optional: true /@esbuild/sunos-x64@0.17.19: @@ -5958,15 +4634,15 @@ packages: cpu: [x64] os: [sunos] requiresBuild: true + dev: true optional: true - /@esbuild/sunos-x64@0.18.10: - resolution: {integrity: sha512-vIGYJIdEI6d4JBucAx8py792G8J0GP40qSH+EvSt80A4zvGd6jph+5t1g+eEXcS2aRpgZw6CrssNCFZxTdEsxw==} + /@esbuild/sunos-x64@0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true - dev: true optional: true /@esbuild/win32-arm64@0.17.19: @@ -5975,15 +4651,15 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: true optional: true - /@esbuild/win32-arm64@0.18.10: - resolution: {integrity: sha512-kRhNcMZFGMW+ZHCarAM1ypr8OZs0k688ViUCetVCef9p3enFxzWeBg9h/575Y0nsFu0ZItluCVF5gMR2pwOEpA==} + /@esbuild/win32-arm64@0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true - dev: true optional: true /@esbuild/win32-ia32@0.17.19: @@ -5992,15 +4668,15 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: true optional: true - /@esbuild/win32-ia32@0.18.10: - resolution: {integrity: sha512-AR9PX1whYaYh9p0EOaKna0h48F/A101Mt/ag72+kMkkBZXPQ7cjbz2syXI/HI3OlBdUytSdHneljfjvUoqwqiQ==} + /@esbuild/win32-ia32@0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} engines: {node: '>=12'} cpu: [ia32] os: [win32] requiresBuild: true - dev: true optional: true /@esbuild/win32-x64@0.17.19: @@ -6009,38 +4685,38 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: true optional: true - /@esbuild/win32-x64@0.18.10: - resolution: {integrity: sha512-5sTkYhAGHNRr6bVf4RM0PsscqVr6/DBYdrlMh168oph3usid3lKHcHEEHmr34iZ9GHeeg2juFOxtpl6XyC3tpw==} + /@esbuild/win32-x64@0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} engines: {node: '>=12'} cpu: [x64] os: [win32] requiresBuild: true - dev: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.42.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.48.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.42.0 - eslint-visitor-keys: 3.4.1 + eslint: 8.48.0 + eslint-visitor-keys: 3.4.3 - /@eslint-community/regexpp@4.5.1: - resolution: {integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==} + /@eslint-community/regexpp@4.8.0: + resolution: {integrity: sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - /@eslint/eslintrc@2.0.3: - resolution: {integrity: sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==} + /@eslint/eslintrc@2.1.2: + resolution: {integrity: sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.4 - espree: 9.5.2 - globals: 13.20.0 + espree: 9.6.1 + globals: 13.21.0 ignore: 5.2.4 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -6049,20 +4725,40 @@ packages: transitivePeerDependencies: - supports-color - /@eslint/js@8.42.0: - resolution: {integrity: sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw==} + /@eslint/js@8.48.0: + resolution: {integrity: sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - /@fabiospampinato/is@2.6.0: - resolution: {integrity: sha512-MpH8oD3WkIQ6NNHjMNGh3HNRTAjImhN7XE1uxhebeREx0UcbWUCxLUr0UtV0fzJe3TrFVnuXSODbEYn1Df/hGg==} - dev: false - /@fal-works/esbuild-plugin-global-externals@2.1.2: resolution: {integrity: sha512-cEee/Z+I12mZcFJshKcCqC8tuX5hG3s+d+9nZ3LabqKF1vKdF41B92pJVCBggjAGORAeOzyyDDKrZwIkLffeOQ==} dev: true - /@gar/promisify@1.1.3: - resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} + /@floating-ui/core@1.4.1: + resolution: {integrity: sha512-jk3WqquEJRlcyu7997NtR5PibI+y5bi+LS3hPmguVClypenMsCY3CBa3LAQnozRCtCrYWSEtAdiskpamuJRFOQ==} + dependencies: + '@floating-ui/utils': 0.1.1 + dev: true + + /@floating-ui/dom@1.5.1: + resolution: {integrity: sha512-KwvVcPSXg6mQygvA1TjbN/gh///36kKtllIF8SUm0qpFj8+rvYrpvlYdL1JoA71SHpDqgSSdGOSoQ0Mp3uY5aw==} + dependencies: + '@floating-ui/core': 1.4.1 + '@floating-ui/utils': 0.1.1 + dev: true + + /@floating-ui/react-dom@2.0.2(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-5qhlDvjaLmAst/rKb3VdlCinwTF4EYMiVxuuc/HVUjs46W0zgtbMmAZ1UTsDrRTxRmUEzl92mOtWbeeXL26lSQ==} + peerDependencies: + react: '>=16.8.0' + react-dom: '>=16.8.0' + dependencies: + '@floating-ui/dom': 1.5.1 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: true + + /@floating-ui/utils@0.1.1: + resolution: {integrity: sha512-m0G6wlnhm/AX0H12IOWtK8gASEMffnX08RtKkCgTdHb9JpHKGloI7icFfLg9ZmQeavcvR0PKmzxClyuFPSjKWw==} dev: true /@gwhitney/detect-indent@7.0.1: @@ -6070,8 +4766,8 @@ packages: engines: {node: '>=12.20'} dev: false - /@headlessui/react@1.7.15(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-OTO0XtoRQ6JPB1cKNFYBZv2Q0JMqMGNhYP1CjPvcJvjz8YGokz8oAj89HIYZGN0gZzn/4kk9iUpmMF4Q21Gsqw==} + /@headlessui/react@1.7.17(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-4am+tzvkqDSSgiwrsEpGWqgGo9dz8qU5M3znCkC4PgkpY4HcCZzEDEvozltGGGHIKl9jbXbZPSH5TWn4sWJdow==} engines: {node: '>=10'} peerDependencies: react: ^16 || ^17 || ^18 @@ -6090,8 +4786,8 @@ packages: react: 18.2.0 dev: false - /@humanwhocodes/config-array@0.11.10: - resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} + /@humanwhocodes/config-array@0.11.11: + resolution: {integrity: sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==} engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 @@ -6119,35 +4815,38 @@ packages: resolution: {integrity: sha512-kb1ATGXrFu/gF2NZY40OlRUAEWCcrq9mIEYkuWqXUPaC6Zrb7iA9wQYTkJdAPP+V6ySfp7NLAyzAnK9c5k90Sg==} dev: true - /@inquirer/checkbox@1.3.2: - resolution: {integrity: sha512-9ZhpEXiwlXAJ7KvUiDqIy9L4mayOGcP9aDRLT6eiwguuFW1gXQTspteIxk/b6QGger1UXJrtXQpPS7A+PGzVuA==} + /@inquirer/checkbox@1.3.9: + resolution: {integrity: sha512-PQJ0XEijmoXxp7QBnUIiYvqx9YC4c/MyJY5UIDXzsyrSY56xuWyi95ggaKq4KMbcjXfxmXSwuqEYbzWu3hAFuQ==} engines: {node: '>=14.18.0'} dependencies: - '@inquirer/core': 2.2.0 - '@inquirer/type': 1.1.0 + '@inquirer/core': 4.0.0 + '@inquirer/type': 1.1.2 ansi-escapes: 4.3.2 chalk: 4.1.2 figures: 3.2.0 dev: true - /@inquirer/confirm@2.0.3: - resolution: {integrity: sha512-5wMDBZ3ufN9IRvGowSZZv7hlgi+WPgCAEtfXvZgDLS8vtCORj3qLXFAlPyB26Mj4cbnWADwpydF9P7JPY6vb4g==} + /@inquirer/confirm@2.0.10: + resolution: {integrity: sha512-P2B3LgCn26EfK9LeSGbi6WWNg/Q7ZTZYERZ2YRJtNaQC4dEXDWt5xDkgKEHXopBeaBXrlBpHQ7Lb3IdhvWnCfQ==} engines: {node: '>=14.18.0'} dependencies: - '@inquirer/core': 2.2.0 - '@inquirer/type': 1.1.0 + '@inquirer/core': 4.0.0 + '@inquirer/type': 1.1.2 chalk: 4.1.2 dev: true - /@inquirer/core@2.2.0: - resolution: {integrity: sha512-YcSAyRTEJTzitg3yzEGabz0Jwmi8iO9QiLeDVY8LQLzY9AsLouuGRvUZ2Savp1T7AAYCMqDFLQirzB+eSux2Vg==} + /@inquirer/core@2.3.1: + resolution: {integrity: sha512-faYAYnIfdEuns3jGKykaog5oUqFiEVbCx9nXGZfUhyEEpKcHt5bpJfZTb3eOBQKo8I/v4sJkZeBHmFlSZQuBCw==} engines: {node: '>=14.18.0'} dependencies: - '@inquirer/type': 1.1.0 + '@inquirer/type': 1.1.2 + '@types/mute-stream': 0.0.1 + '@types/node': 20.5.8 + '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 chalk: 4.1.2 cli-spinners: 2.9.0 - cli-width: 4.0.0 + cli-width: 4.1.0 figures: 3.2.0 mute-stream: 1.0.0 run-async: 3.0.0 @@ -6156,81 +4855,101 @@ packages: wrap-ansi: 6.2.0 dev: true - /@inquirer/editor@1.2.1: - resolution: {integrity: sha512-BbmApP63G5bXW7+sLeJUgpeBvu29W5A1rD5BzMO93ChgfSLQRKucICKwZTc+UuJh4eiJ/KpVeVozoyttmV11AA==} + /@inquirer/core@4.0.0: + resolution: {integrity: sha512-YBo2o6ijIatBU1l1ziByZeVF4YdzKQnYs8tBJ8SnysgmK3YYQz/L/w5w7QXs4OVnbzTWhXiC4mn9gQGbDihsPQ==} engines: {node: '>=14.18.0'} dependencies: - '@inquirer/core': 2.2.0 - '@inquirer/type': 1.1.0 + '@inquirer/type': 1.1.2 + '@types/mute-stream': 0.0.1 + '@types/node': 20.5.8 + '@types/wrap-ansi': 3.0.0 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-spinners: 2.9.0 + cli-width: 4.1.0 + figures: 3.2.0 + mute-stream: 1.0.0 + run-async: 3.0.0 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + dev: true + + /@inquirer/editor@1.2.8: + resolution: {integrity: sha512-DzvzhtLmkVEzfphCbEQz63IuTwmgpeSyyaKrHwCsKYr/eUaMLksQz33VrHbwYbsBq4oNm14OkikrVIMC/XhhPw==} + engines: {node: '>=14.18.0'} + dependencies: + '@inquirer/core': 4.0.0 + '@inquirer/type': 1.1.2 chalk: 4.1.2 external-editor: 3.1.0 dev: true - /@inquirer/expand@1.1.2: - resolution: {integrity: sha512-oa40fTIibTOL6Y7AWPlmimTkA109/tLnqHFQLGfziVfAJNUEWfGDNdL04+l5uOLn+EaBVmdAz1jLzDm9BeLIPQ==} + /@inquirer/expand@1.1.9: + resolution: {integrity: sha512-8XuyeEVAEDCuDfK4+LVsOKfIOaC/Hen5nq+yMgyoQi4DgG77uLFtzjFBgOC0+HTEOugznF66DoWskUOmIN4x5Q==} engines: {node: '>=14.18.0'} dependencies: - '@inquirer/core': 2.2.0 - '@inquirer/type': 1.1.0 + '@inquirer/core': 4.0.0 + '@inquirer/type': 1.1.2 chalk: 4.1.2 figures: 3.2.0 dev: true - /@inquirer/input@1.2.2: - resolution: {integrity: sha512-ZMwt3+ov5yQgIWgVhP0vUpGccL/RtH7Nls6vJhPrpA+TaU9KJArSEOWFqQNIXwvsbWjcSO3nE1fIwi63TsLt7Q==} + /@inquirer/input@1.2.9: + resolution: {integrity: sha512-FC/wnXklGwUcGtlOU67T3pKHu6l1L5tIOHbZcqoLTlsdG8ukNARrX8h9Xrdgfr29t/LbvSxqdvYRmn4u2XRz0Q==} engines: {node: '>=14.18.0'} dependencies: - '@inquirer/core': 2.2.0 - '@inquirer/type': 1.1.0 + '@inquirer/core': 4.0.0 + '@inquirer/type': 1.1.2 chalk: 4.1.2 dev: true - /@inquirer/password@1.1.2: - resolution: {integrity: sha512-Rhx7RsU7zB641+Mq2J5VUDYzCacVYVoJrlNRZlQJq5cQQlH4cQZbeH9GeIQarj4ZewTmwP5tBRKgO2lux8bTgg==} + /@inquirer/password@1.1.9: + resolution: {integrity: sha512-6L/SimCHutKVPDjkJBAkGO0POdJA3VXbdgAhCsX9katuyQSiMq5WGGa2Nqv7zXqiZxL5YuTPFqNNKKq00Q1HxA==} engines: {node: '>=14.18.0'} dependencies: - '@inquirer/input': 1.2.2 - '@inquirer/type': 1.1.0 + '@inquirer/input': 1.2.9 + '@inquirer/type': 1.1.2 + ansi-escapes: 4.3.2 chalk: 4.1.2 dev: true - /@inquirer/prompts@2.2.0: - resolution: {integrity: sha512-lMknC3XVRoyt63N/i82z/Xp+geKZYvFaDZ2toRYM4JHEqCjcGr5bo3uuLBydR+sr0i5P5ULgw3W5FksHo7JjcA==} + /@inquirer/prompts@2.3.1: + resolution: {integrity: sha512-YQeBFzIE+6fcec5N/U2mSz+IcKEG4wtGDwF7MBLIDgITWzB3o723JpKJ1rxWqdCvTXkYE+gDXK/seSN6omo3DQ==} engines: {node: '>=14.18.0'} dependencies: - '@inquirer/checkbox': 1.3.2 - '@inquirer/confirm': 2.0.3 - '@inquirer/core': 2.2.0 - '@inquirer/editor': 1.2.1 - '@inquirer/expand': 1.1.2 - '@inquirer/input': 1.2.2 - '@inquirer/password': 1.1.2 - '@inquirer/rawlist': 1.2.2 - '@inquirer/select': 1.2.2 + '@inquirer/checkbox': 1.3.9 + '@inquirer/confirm': 2.0.10 + '@inquirer/core': 2.3.1 + '@inquirer/editor': 1.2.8 + '@inquirer/expand': 1.1.9 + '@inquirer/input': 1.2.9 + '@inquirer/password': 1.1.9 + '@inquirer/rawlist': 1.2.9 + '@inquirer/select': 1.2.9 dev: true - /@inquirer/rawlist@1.2.2: - resolution: {integrity: sha512-FQZS/8Z1kcYBMbDoqfmMJamE1leO2/SFqsPxEkSdFqdz8VXx/1S8Ldhz7wDNkRUBhIGTTkOxCtNJUsfSwT4vfA==} + /@inquirer/rawlist@1.2.9: + resolution: {integrity: sha512-HqZeTP/F0l9LE0uCSbPHUbxVjoh8TLPzy8+BJzXyS9Na+XbbMOGN7KVNkNEGY+GH7X05jdOtd4gsO9DtAJUM2Q==} engines: {node: '>=14.18.0'} dependencies: - '@inquirer/core': 2.2.0 - '@inquirer/type': 1.1.0 + '@inquirer/core': 4.0.0 + '@inquirer/type': 1.1.2 chalk: 4.1.2 dev: true - /@inquirer/select@1.2.2: - resolution: {integrity: sha512-asiP4Ej4AR0uWsQt8/ajAtF5IjBuTZ/YQgn/Xk7kviWN/wuFfUBo0dYntr0/rSvhNyt0jY6/yDhMM6mSPFLHRg==} + /@inquirer/select@1.2.9: + resolution: {integrity: sha512-WXMQfUGzxrxdbDCU50xKqYCMoz+SOZnyV8sOeEJ8Ei5AjANz1fap3xA7EF8aZLJ9K1//m4OnyS/XDoi31Tqn+g==} engines: {node: '>=14.18.0'} dependencies: - '@inquirer/core': 2.2.0 - '@inquirer/type': 1.1.0 + '@inquirer/core': 4.0.0 + '@inquirer/type': 1.1.2 ansi-escapes: 4.3.2 chalk: 4.1.2 figures: 3.2.0 dev: true - /@inquirer/type@1.1.0: - resolution: {integrity: sha512-XMaorygt2o/mXinZg/OOz6d3JKuV3o4jRc/3KDiVPeKLLkjiO4iJErbLKtKn+Od2ZC2lbiFQkrIuloVpEubisA==} + /@inquirer/type@1.1.2: + resolution: {integrity: sha512-lowHTIBAE/bltg7/EchMDLfKUdT0BCyS2xzqgjsyKADybz2QZ0cLWtDXzjT1C6rdZI07Ng9jU4d2R9rDoU+6Hw==} engines: {node: '>=14.18.0'} dev: true @@ -6271,22 +4990,22 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 chalk: 4.1.2 jest-message-util: 27.5.1 jest-util: 27.5.1 slash: 3.0.0 dev: true - /@jest/console@29.5.0: - resolution: {integrity: sha512-NEpkObxPwyw/XxZVLPmAGKE89IQRp4puc6IQRPru6JKd1M3fW9v1xM1AnzIJE65hbCkzQAdnL8P47e9hzhiYLQ==} + /@jest/console@29.6.4: + resolution: {integrity: sha512-wNK6gC0Ha9QeEPSkeJedQuTQqxZYnDPuDcDhVuVatRvMkL4D0VTvFVZj+Yuh6caG2aOfzkUZ36KtCmLNtR02hw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@jest/types': 29.6.3 + '@types/node': 18.17.13 chalk: 4.1.2 - jest-message-util: 29.5.0 - jest-util: 29.5.0 + jest-message-util: 29.6.3 + jest-util: 29.6.3 slash: 3.0.0 dev: true @@ -6304,7 +5023,7 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.8.1 @@ -6335,8 +5054,8 @@ packages: - utf-8-validate dev: true - /@jest/core@29.5.0(ts-node@10.9.1): - resolution: {integrity: sha512-28UzQc7ulUrOQw1IsN/kv1QES3q2kkbl/wGslyhAclqZ/8cMdB5M68BffkIdSJgKBUt50d3hbwJ92XESlE7LiQ==} + /@jest/core@29.6.4(ts-node@10.9.1): + resolution: {integrity: sha512-U/vq5ccNTSVgYH7mHnodHmCffGWHJnz/E1BEWlLuK5pM4FZmGfBn/nrJGLjUsSmyx3otCeqc1T31F4y08AMDLg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 @@ -6344,35 +5063,36 @@ packages: node-notifier: optional: true dependencies: - '@jest/console': 29.5.0 - '@jest/reporters': 29.5.0 - '@jest/test-result': 29.5.0 - '@jest/transform': 29.5.0 - '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@jest/console': 29.6.4 + '@jest/reporters': 29.6.4 + '@jest/test-result': 29.6.4 + '@jest/transform': 29.6.4 + '@jest/types': 29.6.3 + '@types/node': 18.17.13 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.8.0 exit: 0.1.2 graceful-fs: 4.2.11 - jest-changed-files: 29.5.0 - jest-config: 29.5.0(@types/node@18.16.18)(ts-node@10.9.1) - jest-haste-map: 29.5.0 - jest-message-util: 29.5.0 - jest-regex-util: 29.4.3 - jest-resolve: 29.5.0 - jest-resolve-dependencies: 29.5.0 - jest-runner: 29.5.0 - jest-runtime: 29.5.0 - jest-snapshot: 29.5.0 - jest-util: 29.5.0 - jest-validate: 29.5.0 - jest-watcher: 29.5.0 + jest-changed-files: 29.6.3 + jest-config: 29.6.4(@types/node@18.17.13)(ts-node@10.9.1) + jest-haste-map: 29.6.4 + jest-message-util: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.6.4 + jest-resolve-dependencies: 29.6.4 + jest-runner: 29.6.4 + jest-runtime: 29.6.4 + jest-snapshot: 29.6.4 + jest-util: 29.6.3 + jest-validate: 29.6.3 + jest-watcher: 29.6.4 micromatch: 4.0.5 - pretty-format: 29.5.0 + pretty-format: 29.6.3 slash: 3.0.0 strip-ansi: 6.0.1 transitivePeerDependencies: + - babel-plugin-macros - supports-color - ts-node dev: true @@ -6383,18 +5103,18 @@ packages: dependencies: '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 jest-mock: 27.5.1 dev: true - /@jest/environment@29.5.0: - resolution: {integrity: sha512-5FXw2+wD29YU1d4I2htpRX7jYnAyTRjP2CsXQdo9SAM8g3ifxWPSV0HnClSn71xwctr0U3oZIIH+dtbfmnbXVQ==} + /@jest/environment@29.6.4: + resolution: {integrity: sha512-sQ0SULEjA1XUTHmkBRl7A1dyITM9yb1yb3ZNKPX3KlTd6IG7mWUe3e2yfExtC2Zz1Q+mMckOLHmL/qLiuQJrBQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/fake-timers': 29.5.0 - '@jest/types': 29.5.0 - '@types/node': 18.16.18 - jest-mock: 29.5.0 + '@jest/fake-timers': 29.6.4 + '@jest/types': 29.6.3 + '@types/node': 18.17.13 + jest-mock: 29.6.3 dev: true /@jest/expect-utils@28.1.3: @@ -6404,19 +5124,19 @@ packages: jest-get-type: 28.0.2 dev: true - /@jest/expect-utils@29.5.0: - resolution: {integrity: sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg==} + /@jest/expect-utils@29.6.4: + resolution: {integrity: sha512-FEhkJhqtvBwgSpiTrocquJCdXPsyvNKcl/n7A3u7X4pVoF4bswm11c9d4AV+kfq2Gpv/mM8x7E7DsRvH+djkrg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - jest-get-type: 29.4.3 + jest-get-type: 29.6.3 dev: true - /@jest/expect@29.5.0: - resolution: {integrity: sha512-PueDR2HGihN3ciUNGr4uelropW7rqUfTiOn+8u0leg/42UhblPxHkfoh0Ruu3I9Y1962P3u2DY4+h7GVTSVU6g==} + /@jest/expect@29.6.4: + resolution: {integrity: sha512-Warhsa7d23+3X5bLbrbYvaehcgX5TLYhI03JKoedTiI8uJU4IhqYBWF7OSSgUyz4IgLpUYPkK0AehA5/fRclAA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - expect: 29.5.0 - jest-snapshot: 29.5.0 + expect: 29.6.4 + jest-snapshot: 29.6.4 transitivePeerDependencies: - supports-color dev: true @@ -6427,22 +5147,22 @@ packages: dependencies: '@jest/types': 27.5.1 '@sinonjs/fake-timers': 8.1.0 - '@types/node': 18.16.18 + '@types/node': 18.17.13 jest-message-util: 27.5.1 jest-mock: 27.5.1 jest-util: 27.5.1 dev: true - /@jest/fake-timers@29.5.0: - resolution: {integrity: sha512-9ARvuAAQcBwDAqOnglWq2zwNIRUDtk/SCkp/ToGEhFv5r86K21l+VEs0qNTaXtyiY0lEePl3kylijSYJQqdbDg==} + /@jest/fake-timers@29.6.4: + resolution: {integrity: sha512-6UkCwzoBK60edXIIWb0/KWkuj7R7Qq91vVInOe3De6DSpaEiqjKcJw4F7XUet24Wupahj9J6PlR09JqJ5ySDHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.5.0 + '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 18.16.18 - jest-message-util: 29.5.0 - jest-mock: 29.5.0 - jest-util: 29.5.0 + '@types/node': 18.17.13 + jest-message-util: 29.6.3 + jest-mock: 29.6.3 + jest-util: 29.6.3 dev: true /@jest/globals@27.5.1: @@ -6454,14 +5174,14 @@ packages: expect: 27.5.1 dev: true - /@jest/globals@29.5.0: - resolution: {integrity: sha512-S02y0qMWGihdzNbUiqSAiKSpSozSuHX5UYc7QbnHP+D9Lyw8DgGGCinrN9uSuHPeKgSSzvPom2q1nAtBvUsvPQ==} + /@jest/globals@29.6.4: + resolution: {integrity: sha512-wVIn5bdtjlChhXAzVXavcY/3PEjf4VqM174BM3eGL5kMxLiZD5CLnbmkEyA1Dwh9q8XjP6E8RwjBsY/iCWrWsA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/environment': 29.5.0 - '@jest/expect': 29.5.0 - '@jest/types': 29.5.0 - jest-mock: 29.5.0 + '@jest/environment': 29.6.4 + '@jest/expect': 29.6.4 + '@jest/types': 29.6.3 + jest-mock: 29.6.3 transitivePeerDependencies: - supports-color dev: true @@ -6480,17 +5200,17 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 chalk: 4.1.2 - collect-v8-coverage: 1.0.1 + collect-v8-coverage: 1.0.2 exit: 0.1.2 glob: 7.2.3 graceful-fs: 4.2.11 istanbul-lib-coverage: 3.2.0 istanbul-lib-instrument: 5.2.1 - istanbul-lib-report: 3.0.0 + istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 4.0.1 - istanbul-reports: 3.1.5 + istanbul-reports: 3.1.6 jest-haste-map: 27.5.1 jest-resolve: 27.5.1 jest-util: 27.5.1 @@ -6504,8 +5224,8 @@ packages: - supports-color dev: true - /@jest/reporters@29.5.0: - resolution: {integrity: sha512-D05STXqj/M8bP9hQNSICtPqz97u7ffGzZu+9XLucXhkOFBqKcXe04JLZOgIekOxdb73MAoBUFnqvf7MCpKk5OA==} + /@jest/reporters@29.6.4: + resolution: {integrity: sha512-sxUjWxm7QdchdrD3NfWKrL8FBsortZeibSJv4XLjESOOjSUOkjQcb0ZHJwfhEGIvBvTluTzfG2yZWZhkrXJu8g==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 @@ -6514,25 +5234,25 @@ packages: optional: true dependencies: '@bcoe/v8-coverage': 0.2.3 - '@jest/console': 29.5.0 - '@jest/test-result': 29.5.0 - '@jest/transform': 29.5.0 - '@jest/types': 29.5.0 - '@jridgewell/trace-mapping': 0.3.18 - '@types/node': 18.16.18 + '@jest/console': 29.6.4 + '@jest/test-result': 29.6.4 + '@jest/transform': 29.6.4 + '@jest/types': 29.6.3 + '@jridgewell/trace-mapping': 0.3.19 + '@types/node': 18.17.13 chalk: 4.1.2 - collect-v8-coverage: 1.0.1 + collect-v8-coverage: 1.0.2 exit: 0.1.2 glob: 7.2.3 graceful-fs: 4.2.11 istanbul-lib-coverage: 3.2.0 - istanbul-lib-instrument: 5.2.1 - istanbul-lib-report: 3.0.0 + istanbul-lib-instrument: 6.0.0 + istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 4.0.1 - istanbul-reports: 3.1.5 - jest-message-util: 29.5.0 - jest-util: 29.5.0 - jest-worker: 29.5.0 + istanbul-reports: 3.1.6 + jest-message-util: 29.6.3 + jest-util: 29.6.3 + jest-worker: 29.6.4 slash: 3.0.0 string-length: 4.0.2 strip-ansi: 6.0.1 @@ -6548,11 +5268,11 @@ packages: '@sinclair/typebox': 0.24.51 dev: true - /@jest/schemas@29.4.3: - resolution: {integrity: sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==} + /@jest/schemas@29.6.3: + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@sinclair/typebox': 0.25.24 + '@sinclair/typebox': 0.27.8 dev: true /@jest/source-map@27.5.1: @@ -6564,11 +5284,11 @@ packages: source-map: 0.6.1 dev: true - /@jest/source-map@29.4.3: - resolution: {integrity: sha512-qyt/mb6rLyd9j1jUts4EQncvS6Yy3PM9HghnNv86QBlV+zdL2inCdK1tuVlL+J+lpiw2BI67qXOrX3UurBqQ1w==} + /@jest/source-map@29.6.3: + resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 callsites: 3.1.0 graceful-fs: 4.2.11 dev: true @@ -6580,17 +5300,17 @@ packages: '@jest/console': 27.5.1 '@jest/types': 27.5.1 '@types/istanbul-lib-coverage': 2.0.4 - collect-v8-coverage: 1.0.1 + collect-v8-coverage: 1.0.2 dev: true - /@jest/test-result@29.5.0: - resolution: {integrity: sha512-fGl4rfitnbfLsrfx1uUpDEESS7zM8JdgZgOCQuxQvL1Sn/I6ijeAVQWGfXI9zb1i9Mzo495cIpVZhA0yr60PkQ==} + /@jest/test-result@29.6.4: + resolution: {integrity: sha512-uQ1C0AUEN90/dsyEirgMLlouROgSY+Wc/JanVVk0OiUKa5UFh7sJpMEM3aoUBAz2BRNvUJ8j3d294WFuRxSyOQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/console': 29.5.0 - '@jest/types': 29.5.0 + '@jest/console': 29.6.4 + '@jest/types': 29.6.3 '@types/istanbul-lib-coverage': 2.0.4 - collect-v8-coverage: 1.0.1 + collect-v8-coverage: 1.0.2 dev: true /@jest/test-sequencer@27.5.1: @@ -6605,13 +5325,13 @@ packages: - supports-color dev: true - /@jest/test-sequencer@29.5.0: - resolution: {integrity: sha512-yPafQEcKjkSfDXyvtgiV4pevSeyuA6MQr6ZIdVkWJly9vkqjnFfcfhRQqpD5whjoU8EORki752xQmjaqoFjzMQ==} + /@jest/test-sequencer@29.6.4: + resolution: {integrity: sha512-E84M6LbpcRq3fT4ckfKs9ryVanwkaIB0Ws9bw3/yP4seRLg/VaCZ/LgW0MCq5wwk4/iP/qnilD41aj2fsw2RMg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/test-result': 29.5.0 + '@jest/test-result': 29.6.4 graceful-fs: 4.2.11 - jest-haste-map: 29.5.0 + jest-haste-map: 29.6.4 slash: 3.0.0 dev: true @@ -6619,7 +5339,7 @@ packages: resolution: {integrity: sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@jest/types': 27.5.1 babel-plugin-istanbul: 6.1.1 chalk: 4.1.2 @@ -6638,21 +5358,21 @@ packages: - supports-color dev: true - /@jest/transform@29.5.0: - resolution: {integrity: sha512-8vbeZWqLJOvHaDfeMuoHITGKSz5qWc9u04lnWrQE3VyuSw604PzQM824ZeX9XSjUCeDiE3GuxZe5UKa8J61NQw==} + /@jest/transform@29.6.4: + resolution: {integrity: sha512-8thgRSiXUqtr/pPGY/OsyHuMjGyhVnWrFAwoxmIemlBuiMyU1WFs0tXoNxzcr4A4uErs/ABre76SGmrr5ab/AA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/core': 7.22.5 - '@jest/types': 29.5.0 - '@jridgewell/trace-mapping': 0.3.18 + '@babel/core': 7.22.11 + '@jest/types': 29.6.3 + '@jridgewell/trace-mapping': 0.3.19 babel-plugin-istanbul: 6.1.1 chalk: 4.1.2 convert-source-map: 2.0.0 fast-json-stable-stringify: 2.1.0 graceful-fs: 4.2.11 - jest-haste-map: 29.5.0 - jest-regex-util: 29.4.3 - jest-util: 29.5.0 + jest-haste-map: 29.6.4 + jest-regex-util: 29.6.3 + jest-util: 29.6.3 micromatch: 4.0.5 pirates: 4.0.6 slash: 3.0.0 @@ -6667,7 +5387,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 '@types/yargs': 16.0.5 chalk: 4.1.2 dev: true @@ -6679,24 +5399,24 @@ packages: '@jest/schemas': 28.1.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 '@types/yargs': 17.0.24 chalk: 4.1.2 dev: true - /@jest/types@29.5.0: - resolution: {integrity: sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog==} + /@jest/types@29.6.3: + resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/schemas': 29.4.3 + '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 '@types/yargs': 17.0.24 chalk: 4.1.2 dev: true - /@joshwooding/vite-plugin-react-docgen-typescript@0.2.1(typescript@5.1.3)(vite@4.3.9): + /@joshwooding/vite-plugin-react-docgen-typescript@0.2.1(typescript@5.2.2)(vite@4.4.9): resolution: {integrity: sha512-ou4ZJSXMMWHqGS4g8uNRbC5TiTWxAgQZiVucoUrOCWuPrTbkpJbmVyIi9jU72SBry7gQtuMEDp4YR8EEXAg7VQ==} peerDependencies: typescript: '>= 4.3.x' @@ -6708,9 +5428,9 @@ packages: glob: 7.2.3 glob-promise: 4.2.2(glob@7.2.3) magic-string: 0.27.0 - react-docgen-typescript: 2.2.2(typescript@5.1.3) - typescript: 5.1.3 - vite: 4.3.9(@types/node@18.16.18) + react-docgen-typescript: 2.2.2(typescript@5.2.2) + typescript: 5.2.2 + vite: 4.4.9(@types/node@18.17.13) dev: true /@jridgewell/gen-mapping@0.3.3: @@ -6719,36 +5439,31 @@ packages: dependencies: '@jridgewell/set-array': 1.1.2 '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.18 - - /@jridgewell/resolve-uri@3.1.0: - resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} - engines: {node: '>=6.0.0'} + '@jridgewell/trace-mapping': 0.3.19 /@jridgewell/resolve-uri@3.1.1: resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} engines: {node: '>=6.0.0'} - dev: true /@jridgewell/set-array@1.1.2: resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} engines: {node: '>=6.0.0'} - /@jridgewell/source-map@0.3.4: - resolution: {integrity: sha512-KE/SxsDqNs3rrWwFHcRh15ZLVFrI0YoZtgAdIyIq9k5hUNmiWRXXThPomIxHuL20sLdgzbDFyvkUMna14bvtrw==} + /@jridgewell/source-map@0.3.5: + resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==} + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.19 dev: true - /@jridgewell/sourcemap-codec@1.4.14: - resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} - /@jridgewell/sourcemap-codec@1.4.15: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - /@jridgewell/trace-mapping@0.3.18: - resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==} + /@jridgewell/trace-mapping@0.3.19: + resolution: {integrity: sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==} dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 /@jridgewell/trace-mapping@0.3.9: resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} @@ -6757,33 +5472,26 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true - /@jsii/check-node@1.73.0: - resolution: {integrity: sha512-oneDKgjplUw2Ivk78iAb9lCsAasxkuQ6Ii15qzXsw16CPSRCqQlE78lUVV7pr+rxx/vQDWBAa8ycRbuVghC6TQ==} - engines: {node: '>= 14.6.0'} - dependencies: - chalk: 4.1.2 - semver: 7.5.3 - /@jsii/check-node@1.84.0: resolution: {integrity: sha512-gLa+N1WKksCjTXaK8VMjTbEXf58QlrDOovoTOEzhGNgTFyAUX8woIRAUmk+X70ssDzBvgh3E98mIsDKoWOp6zA==} engines: {node: '>= 14.17.0'} dependencies: chalk: 4.1.2 - semver: 7.5.3 + semver: 7.5.4 dev: true - /@jsii/spec@1.73.0: - resolution: {integrity: sha512-h0BeA6WQfxvYl5BaacmlvB5bAIdhlgf9SInJljxtERn2eYN+VjgMyU/1iv0Ww4Lp71xMGL96bmfXpdlFgRQFEg==} - engines: {node: '>= 14.6.0'} + /@jsii/check-node@1.88.0: + resolution: {integrity: sha512-AveFyqkJIb8qZvGk5nZal/8mEJB6lWhwqvAQLodHmqE3WzpmZD5+h+aspBVt0El5cEFRJ1k1mrQqhAnJCVpvxg==} + engines: {node: '>= 14.17.0'} dependencies: - ajv: 8.12.0 + chalk: 4.1.2 + semver: 7.5.4 - /@jsii/spec@1.84.0: - resolution: {integrity: sha512-P2PCE4jlmuTh5Oj7Be2jdn5qyzIWHX4rcyYspddc0DLZAuLB/LRQYytrxgfdy4+NroGhrPeKPBoF9MwJ5CzfXA==} + /@jsii/spec@1.88.0: + resolution: {integrity: sha512-Q6xirxPM06TRW0GcsHa+tzPZLwe9I+mFYx5BaNMimcv21u6bQnxfynZMgNhHqvLYCmP37HWg0SboUYTa5JROzw==} engines: {node: '>= 14.17.0'} dependencies: ajv: 8.12.0 - dev: true /@juggle/resize-observer@3.4.0: resolution: {integrity: sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==} @@ -6806,8 +5514,8 @@ packages: peerDependencies: react: '>=16' dependencies: - '@types/mdx': 2.0.5 - '@types/react': 18.2.12 + '@types/mdx': 2.0.7 + '@types/react': 18.2.21 react: 18.2.0 dev: true @@ -6842,77 +5550,59 @@ packages: deprecated: this package has been deprecated, use `ci-info` instead dev: true - /@npmcli/fs@2.1.2: - resolution: {integrity: sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - dependencies: - '@gar/promisify': 1.1.3 - semver: 7.5.3 - dev: true - /@npmcli/fs@3.1.0: resolution: {integrity: sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - semver: 7.5.3 + semver: 7.5.4 dev: true - /@npmcli/git@3.0.2: - resolution: {integrity: sha512-CAcd08y3DWBJqJDpfuVL0uijlq5oaXaOJEKHKc4wqrjd00gkvTZB+nFuLn+doOOKddaQS9JfqtNoFCO2LCvA3w==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + /@npmcli/git@4.1.0: + resolution: {integrity: sha512-9hwoB3gStVfa0N31ymBmrX+GuDGdVA/QWShZVqE0HK2Af+7QGGrCTbZia/SW0ImUTjTne7SP91qxDmtXvDHRPQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - '@npmcli/promise-spawn': 3.0.0 + '@npmcli/promise-spawn': 6.0.2 lru-cache: 7.18.3 - mkdirp: 1.0.4 - npm-pick-manifest: 7.0.2 - proc-log: 2.0.1 + npm-pick-manifest: 8.0.2 + proc-log: 3.0.0 promise-inflight: 1.0.1 promise-retry: 2.0.1 - semver: 7.5.3 - which: 2.0.2 + semver: 7.5.4 + which: 3.0.1 transitivePeerDependencies: - bluebird dev: true - /@npmcli/installed-package-contents@1.0.7: - resolution: {integrity: sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==} - engines: {node: '>= 10'} + /@npmcli/installed-package-contents@2.0.2: + resolution: {integrity: sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} hasBin: true dependencies: - npm-bundled: 1.1.2 - npm-normalize-package-bin: 1.0.1 + npm-bundled: 3.0.0 + npm-normalize-package-bin: 3.0.1 dev: true - /@npmcli/move-file@2.0.1: - resolution: {integrity: sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - deprecated: This functionality has been moved to @npmcli/fs - dependencies: - mkdirp: 1.0.4 - rimraf: 3.0.2 - dev: true - - /@npmcli/node-gyp@2.0.0: - resolution: {integrity: sha512-doNI35wIe3bBaEgrlPfdJPaCpUR89pJWep4Hq3aRdh6gKazIVWfs0jHttvSSoq47ZXgC7h73kDsUl8AoIQUB+A==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + /@npmcli/node-gyp@3.0.0: + resolution: {integrity: sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true - /@npmcli/promise-spawn@3.0.0: - resolution: {integrity: sha512-s9SgS+p3a9Eohe68cSI3fi+hpcZUmXq5P7w0kMlAsWVtR7XbK3ptkZqKT2cK1zLDObJ3sR+8P59sJE0w/KTL1g==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + /@npmcli/promise-spawn@6.0.2: + resolution: {integrity: sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - infer-owner: 1.0.4 + which: 3.0.1 dev: true - /@npmcli/run-script@4.2.1: - resolution: {integrity: sha512-7dqywvVudPSrRCW5nTHpHgeWnbBtz8cFkOuKrecm6ih+oO9ciydhWt6OF7HlqupRRmB8Q/gECVdB9LMfToJbRg==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + /@npmcli/run-script@6.0.2: + resolution: {integrity: sha512-NCcr1uQo1k5U+SYlnIrbAh3cxy+OQT1VtqiAbxdymSlptbzBb62AjH2xXgjNCoP073hoa1CfCAcwoZ8k96C4nA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - '@npmcli/node-gyp': 2.0.0 - '@npmcli/promise-spawn': 3.0.0 + '@npmcli/node-gyp': 3.0.0 + '@npmcli/promise-spawn': 6.0.2 node-gyp: 9.4.0 - read-package-json-fast: 2.0.3 - which: 2.0.2 + read-package-json-fast: 3.0.2 + which: 3.0.1 transitivePeerDependencies: - supports-color dev: true @@ -7010,7 +5700,7 @@ packages: '@octokit/request-error': 2.1.0 '@octokit/types': 6.41.0 is-plain-object: 5.0.0 - node-fetch: 2.6.12 + node-fetch: 2.7.0 universal-user-agent: 6.0.0 transitivePeerDependencies: - encoding @@ -7073,51 +5763,40 @@ packages: dev: true optional: true - /@pkgr/utils@2.4.1: - resolution: {integrity: sha512-JOqwkgFEyi+OROIyq7l4Jy28h/WwhDnG/cPkXG2Z1iFbubB6jsHW1NDvmyOzTBxHr3yg68YGirmh1JUgMqa+9w==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - dependencies: - cross-spawn: 7.0.3 - fast-glob: 3.2.12 - is-glob: 4.0.3 - open: 9.1.0 - picocolors: 1.0.0 - tslib: 2.6.0 - - /@playwright/test@1.35.1: - resolution: {integrity: sha512-b5YoFe6J9exsMYg0pQAobNDR85T1nLumUYgUTtKm4d21iX2L7WqKq9dW8NGJ+2vX0etZd+Y7UeuqsxDXm9+5ZA==} + /@playwright/test@1.37.1: + resolution: {integrity: sha512-bq9zTli3vWJo8S3LwB91U0qDNQDpEXnw7knhxLM0nwDvexQAwx9tO8iKDZSqqneVq+URd/WIoz+BALMqUTgdSg==} engines: {node: '>=16'} hasBin: true dependencies: - '@types/node': 18.16.18 - playwright-core: 1.35.1 + '@types/node': 18.17.13 + playwright-core: 1.37.1 optionalDependencies: fsevents: 2.3.2 dev: true - /@pnpm/cli-meta@5.0.1: - resolution: {integrity: sha512-s7rVArn3s78w2ZDWC2/NzMaYBzq39QBmo1BQ4+qq1liX+ltSErDyAx3M/wvvJQgc+Ur3dZJYuc9t96roPnW3XQ==} + /@pnpm/cli-meta@5.0.2: + resolution: {integrity: sha512-xBKKuWtidOc94zbq6P7dq8btYcArTZXF1dQ2NLBh+nicfqWXGF9VaCl8rLx2PAlYORN+0qnFjWGrsa5sEiBylg==} engines: {node: '>=16.14'} dependencies: - '@pnpm/types': 9.1.0 + '@pnpm/types': 9.2.0 load-json-file: 6.2.0 dev: false - /@pnpm/cli-utils@2.0.11(@pnpm/logger@5.0.0): - resolution: {integrity: sha512-s30prkta0EUXVbJ0DDzgPBohjaIk51KUW3D4Q9kkKL6ThfQlGlVNHXLWlpihK5oRe7oHG9PlQf39joPdscJa7A==} + /@pnpm/cli-utils@2.0.15(@pnpm/logger@5.0.0): + resolution: {integrity: sha512-syoG1VbAbtTj2XtDW5yG3m2zQjSAZ9+OjQ5CjdnfW9yp+20du/GU8chS7PlzDc0pDxClvgC5XdhrvGmGitozMw==} engines: {node: '>=16.14'} peerDependencies: '@pnpm/logger': ^5.0.0 dependencies: - '@pnpm/cli-meta': 5.0.1 - '@pnpm/config': 18.4.2(@pnpm/logger@5.0.0) - '@pnpm/default-reporter': 12.2.5(@pnpm/logger@5.0.0) + '@pnpm/cli-meta': 5.0.2 + '@pnpm/config': 18.4.4(@pnpm/logger@5.0.0) + '@pnpm/default-reporter': 12.2.9(@pnpm/logger@5.0.0) '@pnpm/error': 5.0.2 '@pnpm/logger': 5.0.0 - '@pnpm/manifest-utils': 5.0.2(@pnpm/logger@5.0.0) - '@pnpm/package-is-installable': 8.0.3(@pnpm/logger@5.0.0) - '@pnpm/read-project-manifest': 5.0.2 - '@pnpm/types': 9.1.0 + '@pnpm/manifest-utils': 5.0.3(@pnpm/logger@5.0.0) + '@pnpm/package-is-installable': 8.0.4(@pnpm/logger@5.0.0) + '@pnpm/read-project-manifest': 5.0.4 + '@pnpm/types': 9.2.0 chalk: 4.1.2 load-json-file: 6.2.0 dev: false @@ -7126,8 +5805,8 @@ packages: resolution: {integrity: sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==} engines: {node: '>=12.22.0'} - /@pnpm/config@18.4.2(@pnpm/logger@5.0.0): - resolution: {integrity: sha512-91CYi3mc9N7poZKEGn6OutCyzQfQ/kaCp33rxrrl6geykcYWB32tRM4Y4L3Z52q4erFH4qJO2r6QAh3ejGswdA==} + /@pnpm/config@18.4.4(@pnpm/logger@5.0.0): + resolution: {integrity: sha512-TJmclGCIx5pXOW0Q3zQNhwMtvmrHoH3zN2ysXtDGUNWodCfLJjYIgAc2USOWzNedwhkfXU0qFgFB0JOOxCFXrQ==} engines: {node: '>=16.14'} dependencies: '@pnpm/config.env-replace': 1.1.0 @@ -7136,9 +5815,9 @@ packages: '@pnpm/git-utils': 1.0.0 '@pnpm/matcher': 5.0.0 '@pnpm/npm-conf': 2.2.2 - '@pnpm/pnpmfile': 5.0.8(@pnpm/logger@5.0.0) - '@pnpm/read-project-manifest': 5.0.2 - '@pnpm/types': 9.1.0 + '@pnpm/pnpmfile': 5.0.9(@pnpm/logger@5.0.0) + '@pnpm/read-project-manifest': 5.0.4 + '@pnpm/types': 9.2.0 better-path-resolve: 1.0.0 camelcase: 6.3.0 camelcase-keys: 6.2.2 @@ -7161,14 +5840,14 @@ packages: engines: {node: '>=16.14'} dev: false - /@pnpm/core-loggers@9.0.1(@pnpm/logger@5.0.0): - resolution: {integrity: sha512-qP/kk6OeLSxqhvA4n6u4XB6evqD9h1w9p4qtdBOVbkZloCK7L9btkSmKNolBoQ3wrOz7WRFfjRekYUSKphMMCg==} + /@pnpm/core-loggers@9.0.2(@pnpm/logger@5.0.0): + resolution: {integrity: sha512-yL44cxktfbVOMR4wwaJpPmcOqpACYCw6cXUUcUbllIZLVQGSw9RRYBYKEhgtUspjjyLfPAqafErAWAt2m/Z9QQ==} engines: {node: '>=16.14'} peerDependencies: '@pnpm/logger': ^5.0.0 dependencies: '@pnpm/logger': 5.0.0 - '@pnpm/types': 9.1.0 + '@pnpm/types': 9.2.0 dev: false /@pnpm/crypto.base32-hash@2.0.0: @@ -7192,20 +5871,20 @@ packages: engines: {node: '>=16.14'} dev: false - /@pnpm/default-reporter@12.2.5(@pnpm/logger@5.0.0): - resolution: {integrity: sha512-5gFQluYrXqTYynuQRHrqXltbZ+YArTbNf9bTVtwxm4+3WqV3Eq6gPp4XNr+4BjY26YuwR6NP5AEd5yNpoBlQ+A==} + /@pnpm/default-reporter@12.2.9(@pnpm/logger@5.0.0): + resolution: {integrity: sha512-7v5cTCuvsVGfBlHwYsafbkLAM2f9SJ4F7hSAlnQzbu5EXZbDSGEjywoDRwfwZSyu93ikEpRpgST+jRYaki3W8g==} engines: {node: '>=16.14'} peerDependencies: '@pnpm/logger': ^5.0.0 dependencies: - '@pnpm/config': 18.4.2(@pnpm/logger@5.0.0) - '@pnpm/core-loggers': 9.0.1(@pnpm/logger@5.0.0) + '@pnpm/config': 18.4.4(@pnpm/logger@5.0.0) + '@pnpm/core-loggers': 9.0.2(@pnpm/logger@5.0.0) '@pnpm/dedupe.issues-renderer': 1.0.0 '@pnpm/dedupe.types': 1.0.0 '@pnpm/error': 5.0.2 '@pnpm/logger': 5.0.0 - '@pnpm/render-peer-issues': 4.0.1 - '@pnpm/types': 9.1.0 + '@pnpm/render-peer-issues': 4.0.2 + '@pnpm/types': 9.2.0 ansi-diff: 1.1.1 boxen: 5.1.2 chalk: 4.1.2 @@ -7216,19 +5895,19 @@ packages: ramda: /@pnpm/ramda@0.28.1 right-pad: 1.0.1 rxjs: 7.8.1 - semver: 7.5.3 + semver: 7.5.4 stacktracey: 2.1.8 string-length: 4.0.2 dev: false - /@pnpm/dependency-path@2.1.2: - resolution: {integrity: sha512-BXEMdGHZG2y8z7hZAVn+r0z+IdszFZbVPpAp3xyDH3gDN30A4HCVhhCUUf0mthqQZsT131jK4HW82EUwEiW01A==} + /@pnpm/dependency-path@2.1.3: + resolution: {integrity: sha512-OKuLDqRZfAJAb4fnPZyPyrR827ISL1WV5YBs0q4BitPAz8ORUPSXSCFVailLhoyZWLE0Ag6hROy42Jkw/WnCUw==} engines: {node: '>=16.14'} dependencies: '@pnpm/crypto.base32-hash': 2.0.0 - '@pnpm/types': 9.1.0 + '@pnpm/types': 9.2.0 encode-registry: 3.0.0 - semver: 7.5.3 + semver: 7.5.4 dev: false /@pnpm/error@5.0.2: @@ -7238,12 +5917,12 @@ packages: '@pnpm/constants': 7.1.1 dev: false - /@pnpm/fetcher-base@14.0.1: - resolution: {integrity: sha512-DXPZ33CrmDQXnYzwvqyP7I0BF0MQELo4ah2JGpXhLhgOdzU+vj7zdKFo2x82L8anrK861IRi01V8o14oATq1vA==} + /@pnpm/fetcher-base@14.0.2: + resolution: {integrity: sha512-N+eeL0+GK382TC6ehA/ArYvC2yLfqq6Yu4Yky5Fxfk8FLC4euRduIYvEsSDNibs5KBUTl0Hi+ZXkJCaCQokGBA==} engines: {node: '>=16.14'} dependencies: - '@pnpm/resolver-base': 10.0.1 - '@pnpm/types': 9.1.0 + '@pnpm/resolver-base': 10.0.2 + '@pnpm/types': 9.2.0 '@types/ssri': 7.1.1 dev: false @@ -7255,14 +5934,14 @@ packages: find-up: 5.0.0 dev: false - /@pnpm/fs.find-packages@2.0.2: - resolution: {integrity: sha512-/OAnlN7dZDWgoyUBY3+klgbzf5OO4rD87tPQe8fLaeSSv2567gtMWLZEI0H0k+0h88p/vAwbeJg3VYjlVmUKyQ==} + /@pnpm/fs.find-packages@2.0.4: + resolution: {integrity: sha512-FflfdLDr/+K6WgoYtgbZGUM+V0doCoRiBCFOEL5sYhdPtW7EIik27sL9DHAADxDsfVq4fCExo3TbyzfxtElnOg==} engines: {node: '>=16.14'} dependencies: - '@pnpm/read-project-manifest': 5.0.2 - '@pnpm/types': 9.1.0 + '@pnpm/read-project-manifest': 5.0.4 + '@pnpm/types': 9.2.0 '@pnpm/util.lex-comparator': 1.0.0 - fast-glob: 3.2.12 + fast-glob: 3.3.1 p-filter: 2.1.0 dev: false @@ -7280,304 +5959,865 @@ packages: graceful-fs: 4.2.11 dev: false - /@pnpm/hooks.types@1.0.1: - resolution: {integrity: sha512-Zx2hzwxBKv1RmFzyu4pEVY7QeIGUb54smSSYt8GcJgByn+uMXgwJ7ydv9t2Koc90QTqk8J3P2J+RDrZVIQpVQw==} + /@pnpm/hooks.types@1.0.2: + resolution: {integrity: sha512-LSrnNl5IpfgO+Huyav3pNKm4urwrW24uyIA7nDgr9g9fDa2GnUMMom8F7U2quyFqi21EHCWRVBfhXN/3FJnkVA==} engines: {node: '>=16.14'} dependencies: - '@pnpm/lockfile-types': 5.1.0 - '@pnpm/types': 9.1.0 + '@pnpm/lockfile-types': 5.1.1 + '@pnpm/types': 9.2.0 dev: false - /@pnpm/lockfile-file@8.1.1(@pnpm/logger@5.0.0): - resolution: {integrity: sha512-voot73D3aQ9Mcegco+m+yvr3WqM3IHhUMQWCO2ggm6JNfwnQ6rSXzCytomM4W29Nh/Y1A6HemxtS/K7nImu/TA==} + /@pnpm/lockfile-file@8.1.2(@pnpm/logger@5.0.0): + resolution: {integrity: sha512-7HqPs4qDgfyBpnYqELwLvQQm/4xVRAzQ0Zv3sNt8IhJz8pncjPKcNVVXsGQEUg6Y922ThXfTCumbkSuPFl/rlA==} engines: {node: '>=16.14'} peerDependencies: '@pnpm/logger': ^5.0.0 dependencies: '@pnpm/constants': 7.1.1 - '@pnpm/dependency-path': 2.1.2 + '@pnpm/dependency-path': 2.1.3 '@pnpm/error': 5.0.2 '@pnpm/git-utils': 1.0.0 - '@pnpm/lockfile-types': 5.1.0 + '@pnpm/lockfile-types': 5.1.1 '@pnpm/logger': 5.0.0 - '@pnpm/merge-lockfile-changes': 5.0.2 - '@pnpm/types': 9.1.0 + '@pnpm/merge-lockfile-changes': 5.0.3 + '@pnpm/types': 9.2.0 '@pnpm/util.lex-comparator': 1.0.0 - '@zkochan/rimraf': 2.1.2 + '@zkochan/rimraf': 2.1.3 comver-to-semver: 1.0.0 js-yaml: /@zkochan/js-yaml@0.0.6 normalize-path: 3.0.0 ramda: /@pnpm/ramda@0.28.1 - semver: 7.5.3 + semver: 7.5.4 sort-keys: 4.2.0 strip-bom: 4.0.0 write-file-atomic: 5.0.1 dev: false - /@pnpm/lockfile-types@5.1.0: - resolution: {integrity: sha512-14eYp9iOdJ7SyOIVXomXhbVnc14DEhzMLS3eKqxYxi9LkANUfxx1/pwRiRY/lTiP9RFS+OkIcTm2QiLsmNEctw==} + /@pnpm/lockfile-types@5.1.1: + resolution: {integrity: sha512-QswQGFENlosERR2rCxp/0MhyOwBsRyfDvngTOmn8QG2IPd3KsCJFUNFnLddAp13L+9bxcTgijYIuyN2MlShoFw==} + engines: {node: '>=16.14'} + dependencies: + '@pnpm/types': 9.2.0 + dev: false + + /@pnpm/lockfile-utils@8.0.3: + resolution: {integrity: sha512-NezoTk3xdA9Dh7dd7lqi1v3QM2GR+ZvuPz9VaDXToqhUKYlcARgSbR56+eIAtraImeZdANIKjvwmJExVkUHAug==} + engines: {node: '>=16.14'} + dependencies: + '@pnpm/dependency-path': 2.1.3 + '@pnpm/lockfile-types': 5.1.1 + '@pnpm/resolver-base': 10.0.2 + '@pnpm/types': 9.2.0 + get-npm-tarball-url: 2.0.3 + ramda: /@pnpm/ramda@0.28.1 + dev: false + + /@pnpm/logger@5.0.0: + resolution: {integrity: sha512-YfcB2QrX+Wx1o6LD1G2Y2fhDhOix/bAY/oAnMpHoNLsKkWIRbt1oKLkIFvxBMzLwAEPqnYWguJrYC+J6i4ywbw==} + engines: {node: '>=12.17'} + dependencies: + bole: 5.0.7 + ndjson: 2.0.0 + dev: false + + /@pnpm/manifest-utils@5.0.3(@pnpm/logger@5.0.0): + resolution: {integrity: sha512-5uidFNS56U0+Ldhtfm91WqEyOJ1zPmUhAtrBsFs9VblhfW1rFGoMzM3Mnlh1xNjzMJrU/Xn3H4sOPnhnWn6sVA==} + engines: {node: '>=16.14'} + dependencies: + '@pnpm/core-loggers': 9.0.2(@pnpm/logger@5.0.0) + '@pnpm/error': 5.0.2 + '@pnpm/types': 9.2.0 + transitivePeerDependencies: + - '@pnpm/logger' + dev: false + + /@pnpm/matcher@5.0.0: + resolution: {integrity: sha512-uh+JBmW8XHGwz9x0K0Ok+TtMiu3ghEaqHHm7dqIubitBP8y9Y0LLP6D2fxWblogjpVzSlH3DpDR1Vicuhw9/cQ==} + engines: {node: '>=16.14'} + dependencies: + escape-string-regexp: 4.0.0 + dev: false + + /@pnpm/merge-lockfile-changes@5.0.3: + resolution: {integrity: sha512-RmWcpl7wWDx17upkxPfGorpLr85FbyihZoi2naoc04nocawKkVVeI68PDWFkgEmImuoQgHZaFCgAVgTbwJyb9A==} + engines: {node: '>=16.14'} + dependencies: + '@pnpm/lockfile-types': 5.1.1 + comver-to-semver: 1.0.0 + ramda: /@pnpm/ramda@0.28.1 + semver: 7.5.4 + dev: false + + /@pnpm/modules-yaml@12.1.2: + resolution: {integrity: sha512-2zKUJK8knoNqVW//3iqAg5RL2U1eTN49Ag+7Day140EkmGe0RPa9fdyIa6ZKPX0j24x330vqz0PLvqj+Lr1JAg==} + engines: {node: '>=16.14'} + dependencies: + '@pnpm/types': 9.2.0 + is-windows: 1.0.2 + ramda: /@pnpm/ramda@0.28.1 + read-yaml-file: 2.1.0 + write-yaml-file: 5.0.0 + dev: false + + /@pnpm/network.ca-file@1.0.2: + resolution: {integrity: sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==} + engines: {node: '>=12.22.0'} + dependencies: + graceful-fs: 4.2.10 + + /@pnpm/normalize-registries@5.0.2: + resolution: {integrity: sha512-oSf7IZky78NTUz6017bq3w2PdBHiyGm86ZKDuNpH/l1bQoyG9GBCCkvVleuSCg0D+MazvKtnGah/UddsgcbmKA==} + engines: {node: '>=16.14'} + dependencies: + '@pnpm/types': 9.2.0 + normalize-registry-url: 2.0.0 + ramda: /@pnpm/ramda@0.28.1 + dev: false + + /@pnpm/npm-conf@2.2.2: + resolution: {integrity: sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA==} + engines: {node: '>=12'} + dependencies: + '@pnpm/config.env-replace': 1.1.0 + '@pnpm/network.ca-file': 1.0.2 + config-chain: 1.1.13 + + /@pnpm/package-is-installable@8.0.4(@pnpm/logger@5.0.0): + resolution: {integrity: sha512-6rMB+51VKkGWxTS997aGKXi2ELHWstDT7S6WYyxOCwakzIPnRm3rGiku3SR/rhF3+E0pJggYxgjIgW72yT8UHQ==} + engines: {node: '>=16.14'} + peerDependencies: + '@pnpm/logger': ^5.0.0 + dependencies: + '@pnpm/core-loggers': 9.0.2(@pnpm/logger@5.0.0) + '@pnpm/error': 5.0.2 + '@pnpm/logger': 5.0.0 + '@pnpm/types': 9.2.0 + detect-libc: 2.0.2 + execa: /safe-execa@0.1.2 + mem: 8.1.1 + semver: 7.5.4 + dev: false + + /@pnpm/pnpmfile@5.0.9(@pnpm/logger@5.0.0): + resolution: {integrity: sha512-QgPgke8xcw60RXWz6EnHrO5b7VSBAjuRbL4MRLyGDFNIpRyWp8hMPH0TlINimfEKLCpW6aEuA2WLL7KRGAsUBA==} + engines: {node: '>=16.14'} + peerDependencies: + '@pnpm/logger': ^5.0.0 + dependencies: + '@pnpm/core-loggers': 9.0.2(@pnpm/logger@5.0.0) + '@pnpm/error': 5.0.2 + '@pnpm/hooks.types': 1.0.2 + '@pnpm/lockfile-types': 5.1.1 + '@pnpm/logger': 5.0.0 + '@pnpm/store-controller-types': 15.0.2 + '@pnpm/types': 9.2.0 + chalk: 4.1.2 + path-absolute: 1.0.1 + dev: false + + /@pnpm/ramda@0.28.1: + resolution: {integrity: sha512-zcAG+lvU0fMziNeGXpPyCyCJYp5ZVrPElEE4t14jAmViaihohocZ+dDkcRIyAomox8pQsuZnv1EyHR+pOhmUWw==} + dev: false + + /@pnpm/read-modules-dir@6.0.1: + resolution: {integrity: sha512-/h+3VB1j+hhUlEYkE+dAH5WbhR/qYDDvliqWQxN/AA0CYAFwMud5z4FOKzYHgY6RD+KVVgEelLquxCi7fKvT8A==} + engines: {node: '>=16.14'} + dependencies: + graceful-fs: 4.2.11 + dev: false + + /@pnpm/read-package-json@8.0.3: + resolution: {integrity: sha512-I4oZGqWC5tc+n5omMWUp5wFphsUFu9Qd2OtqUFzeV97Zx9/PaEE0Eh/sFKpJM91FNeatezF+OszETPFsvrsusw==} + engines: {node: '>=16.14'} + dependencies: + '@pnpm/error': 5.0.2 + '@pnpm/types': 9.2.0 + load-json-file: 6.2.0 + normalize-package-data: 5.0.0 + dev: false + + /@pnpm/read-project-manifest@5.0.4: + resolution: {integrity: sha512-fEfk7jjEhQrKm6xdQ9zIUVEqy8gAACo8TNaflVoXj+6QRul3mKaqW5zrjo11zYvDUA6lHIFw5ka1QnHXGlu67A==} + engines: {node: '>=16.14'} + dependencies: + '@gwhitney/detect-indent': 7.0.1 + '@pnpm/error': 5.0.2 + '@pnpm/graceful-fs': 3.0.0 + '@pnpm/text.comments-parser': 2.0.0 + '@pnpm/types': 9.2.0 + '@pnpm/write-project-manifest': 5.0.2 + fast-deep-equal: 3.1.3 + is-windows: 1.0.2 + json5: 2.2.3 + lodash.clonedeep: 4.5.0 + parse-json: 5.2.0 + read-yaml-file: 2.1.0 + sort-keys: 4.2.0 + strip-bom: 4.0.0 + dev: false + + /@pnpm/render-peer-issues@4.0.2: + resolution: {integrity: sha512-Su6zqJXoWcDelGNiDxBGEj86kSRp18Attq76aNGBH3/bAJtGcNe75ZIeCwtmBmAresoZiYlC4zCnRIaJgxT1kw==} + engines: {node: '>=16.14'} + dependencies: + '@pnpm/types': 9.2.0 + archy: 1.0.0 + chalk: 4.1.2 + cli-columns: 4.0.0 + dev: false + + /@pnpm/resolver-base@10.0.2: + resolution: {integrity: sha512-5Uop0eLVxoGnG+K5aNkiBeJqyDD4F34+ZpQxxFLtL7xGf9aISPY6OlFfHU0hBD/8aFtZ5JSXhHUsb42aFyqP5Q==} + engines: {node: '>=16.14'} + dependencies: + '@pnpm/types': 9.2.0 + dev: false + + /@pnpm/reviewing.dependencies-hierarchy@2.0.10(@pnpm/logger@5.0.0): + resolution: {integrity: sha512-jNUUpUjM7cG4xJOi5LnFrXH6O95gGK/BQtfnCbv0sfHtOmV/f7QPxS07qlNPHGc+vqgoqSthSXsgTni+w2leQA==} + engines: {node: '>=16.14'} + dependencies: + '@pnpm/dependency-path': 2.1.3 + '@pnpm/lockfile-file': 8.1.2(@pnpm/logger@5.0.0) + '@pnpm/lockfile-utils': 8.0.3 + '@pnpm/modules-yaml': 12.1.2 + '@pnpm/normalize-registries': 5.0.2 + '@pnpm/read-modules-dir': 6.0.1 + '@pnpm/read-package-json': 8.0.3 + '@pnpm/types': 9.2.0 + normalize-path: 3.0.0 + realpath-missing: 1.1.0 + resolve-link-target: 2.0.0 + transitivePeerDependencies: + - '@pnpm/logger' + dev: false + + /@pnpm/store-controller-types@15.0.2: + resolution: {integrity: sha512-p6LefQZrhORj6eHKXUsOXotZV2PAJwtgHrUVQq7BqBVtq2/+he8ZgRLQu2qPx6nvF1MZqkp9CjXiSMsGvN74og==} + engines: {node: '>=16.14'} + dependencies: + '@pnpm/fetcher-base': 14.0.2 + '@pnpm/resolver-base': 10.0.2 + '@pnpm/types': 9.2.0 + dev: false + + /@pnpm/text.comments-parser@2.0.0: + resolution: {integrity: sha512-DRWtTmmxQQtuWHf1xPt9bqzCSq8d0MQF5x1kdpCDMLd7xk3nP4To2/OGkPrb8MKbrWsgCNDwXyKCFlEKrAg7fg==} + engines: {node: '>=16.14'} + dependencies: + strip-comments-strings: 1.2.0 + dev: false + + /@pnpm/types@9.2.0: + resolution: {integrity: sha512-LtkHgtJ5Bjny4poUWyMhOKHc822/zm8NhPx+7VbopfDYnTrKgJwTyTbZjZEyN5KpDw3R1Fr8VYdmv5gn4eyWbw==} + engines: {node: '>=16.14'} + dev: false + + /@pnpm/util.lex-comparator@1.0.0: + resolution: {integrity: sha512-3aBQPHntVgk5AweBWZn+1I/fqZ9krK/w01197aYVkAJQGftb+BVWgEepxY5GChjSW12j52XX+CmfynYZ/p0DFQ==} + engines: {node: '>=12.22.0'} + dev: false + + /@pnpm/workspace.find-packages@1.0.5(@pnpm/logger@5.0.0): + resolution: {integrity: sha512-TKoRZQ2CDOASe0AbMRBVOVorpc7+qLbGQiE8e+zEwUc8lV8/SZo7S1o5DccqDYWJDHE1K11fM8JWjTHu+qYGOQ==} + engines: {node: '>=16.14'} + peerDependencies: + '@pnpm/logger': ^5.0.0 + dependencies: + '@pnpm/cli-utils': 2.0.15(@pnpm/logger@5.0.0) + '@pnpm/constants': 7.1.1 + '@pnpm/fs.find-packages': 2.0.4 + '@pnpm/logger': 5.0.0 + '@pnpm/types': 9.2.0 + '@pnpm/util.lex-comparator': 1.0.0 + read-yaml-file: 2.1.0 + dev: false + + /@pnpm/write-project-manifest@5.0.2: + resolution: {integrity: sha512-BSYKyVOp+GbqxqYBuBex05iJgplgbiwoJGxLsK989lGT9Ekc0QatNpbyhk1vVhocv7AlRySrAyI7Yk2l4do/9g==} engines: {node: '>=16.14'} dependencies: - '@pnpm/types': 9.1.0 - dev: false + '@pnpm/text.comments-parser': 2.0.0 + '@pnpm/types': 9.2.0 + json5: 2.2.3 + write-file-atomic: 5.0.1 + write-yaml-file: 5.0.0 + dev: false + + /@popperjs/core@2.11.8: + resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} + dev: false + + /@radix-ui/number@1.0.1: + resolution: {integrity: sha512-T5gIdVO2mmPW3NNhjNgEP3cqMXjXL9UbO0BzWcXfvdBs+BohbQxvd/K5hSVKmn9/lbTdsQVKbUcP5WLCwvUbBg==} + dependencies: + '@babel/runtime': 7.22.11 + dev: true + + /@radix-ui/primitive@1.0.1: + resolution: {integrity: sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw==} + dependencies: + '@babel/runtime': 7.22.11 + dev: true + + /@radix-ui/react-arrow@1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-wSP+pHsB/jQRaL6voubsQ/ZlrGBHHrOjmBnr19hxYgtS0WvAFwZhK2WP/YY5yF9uKECCEEDGxuLxq1NBK51wFA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.22.11 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.21 + '@types/react-dom': 18.2.7 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: true + + /@radix-ui/react-collection@1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.22.11 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.21)(react@18.2.0) + '@types/react': 18.2.21 + '@types/react-dom': 18.2.7 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: true + + /@radix-ui/react-compose-refs@1.0.1(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.22.11 + '@types/react': 18.2.21 + react: 18.2.0 + dev: true - /@pnpm/lockfile-utils@8.0.2: - resolution: {integrity: sha512-kkR0vxfss+YLKI/m+ZrRFCuadgs/JcQUz7Y1qP6xYRv7za5jZkVmWPMJZOzC2ACY8i/TUpDL44C5s/5C3KHMBg==} - engines: {node: '>=16.14'} + /@radix-ui/react-context@1.0.1(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true dependencies: - '@pnpm/dependency-path': 2.1.2 - '@pnpm/lockfile-types': 5.1.0 - '@pnpm/resolver-base': 10.0.1 - '@pnpm/types': 9.1.0 - get-npm-tarball-url: 2.0.3 - ramda: /@pnpm/ramda@0.28.1 - dev: false + '@babel/runtime': 7.22.11 + '@types/react': 18.2.21 + react: 18.2.0 + dev: true - /@pnpm/logger@5.0.0: - resolution: {integrity: sha512-YfcB2QrX+Wx1o6LD1G2Y2fhDhOix/bAY/oAnMpHoNLsKkWIRbt1oKLkIFvxBMzLwAEPqnYWguJrYC+J6i4ywbw==} - engines: {node: '>=12.17'} + /@radix-ui/react-direction@1.0.1(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true dependencies: - bole: 5.0.5 - ndjson: 2.0.0 - dev: false + '@babel/runtime': 7.22.11 + '@types/react': 18.2.21 + react: 18.2.0 + dev: true - /@pnpm/manifest-utils@5.0.2(@pnpm/logger@5.0.0): - resolution: {integrity: sha512-+qYnDRP3qIAsqaHvGc175bolMBwotvlDGPkSRON8hGlv7C1zVYWQNKXVAex/Pm0MhQAybZyYzjTnzJZZbBcnTg==} - engines: {node: '>=16.14'} + /@radix-ui/react-dismissable-layer@1.0.4(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-7UpBa/RKMoHJYjie1gkF1DlK8l1fdU/VKDpoS3rCCo8YBJR294GwcEHyxHw72yvphJ7ld0AXEcSLAzY2F/WyCg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true dependencies: - '@pnpm/core-loggers': 9.0.1(@pnpm/logger@5.0.0) - '@pnpm/error': 5.0.2 - '@pnpm/types': 9.1.0 - transitivePeerDependencies: - - '@pnpm/logger' - dev: false + '@babel/runtime': 7.22.11 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-use-escape-keydown': 1.0.3(@types/react@18.2.21)(react@18.2.0) + '@types/react': 18.2.21 + '@types/react-dom': 18.2.7 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: true - /@pnpm/matcher@5.0.0: - resolution: {integrity: sha512-uh+JBmW8XHGwz9x0K0Ok+TtMiu3ghEaqHHm7dqIubitBP8y9Y0LLP6D2fxWblogjpVzSlH3DpDR1Vicuhw9/cQ==} - engines: {node: '>=16.14'} + /@radix-ui/react-focus-guards@1.0.1(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true dependencies: - escape-string-regexp: 4.0.0 - dev: false + '@babel/runtime': 7.22.11 + '@types/react': 18.2.21 + react: 18.2.0 + dev: true - /@pnpm/merge-lockfile-changes@5.0.2: - resolution: {integrity: sha512-cswnzLUxumc1MzZp7ZxEiyV9LvEne4h2AtvSwtjdx8BU/+vbj/kjvBueqPw1t+QJl/lual9Kmem0hQaL8v57wQ==} - engines: {node: '>=16.14'} + /@radix-ui/react-focus-scope@1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-upXdPfqI4islj2CslyfUBNlaJCPybbqRHAi1KER7Isel9Q2AtSJ0zRBZv8mWQiFXD2nyAJ4BhC3yXgZ6kMBSrQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true dependencies: - '@pnpm/lockfile-types': 5.1.0 - comver-to-semver: 1.0.0 - ramda: /@pnpm/ramda@0.28.1 - semver: 7.5.3 - dev: false + '@babel/runtime': 7.22.11 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@types/react': 18.2.21 + '@types/react-dom': 18.2.7 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: true - /@pnpm/modules-yaml@12.1.1: - resolution: {integrity: sha512-K/le4dsBeWj0mygMJwzaDlUpx2pGlPnoPmLWQlm3ZiW5qLLlI1AV1+z7ddIXovHWyrALWVfSbJEAlWevAeFKKw==} - engines: {node: '>=16.14'} + /@radix-ui/react-id@1.0.1(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true dependencies: - '@pnpm/types': 9.1.0 - is-windows: 1.0.2 - ramda: /@pnpm/ramda@0.28.1 - read-yaml-file: 2.1.0 - write-yaml-file: 5.0.0 - dev: false + '@babel/runtime': 7.22.11 + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@types/react': 18.2.21 + react: 18.2.0 + dev: true - /@pnpm/network.ca-file@1.0.2: - resolution: {integrity: sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==} - engines: {node: '>=12.22.0'} + /@radix-ui/react-popper@1.1.2(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-1CnGGfFi/bbqtJZZ0P/NQY20xdG3E0LALJaLUEoKwPLwl6PPPfbeiCqMVQnhoFRAxjJj4RpBRJzDmUgsex2tSg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true dependencies: - graceful-fs: 4.2.10 + '@babel/runtime': 7.22.11 + '@floating-ui/react-dom': 2.0.2(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-arrow': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-use-rect': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-use-size': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/rect': 1.0.1 + '@types/react': 18.2.21 + '@types/react-dom': 18.2.7 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: true - /@pnpm/normalize-registries@5.0.1: - resolution: {integrity: sha512-0TYcuw4+Djl6LFYI5wh7y7n/YEVEJEAJov0MejFpJuuW1BYd059xS+BWOJ45/R/DgEZs40fkXiE3VllagZRfNw==} - engines: {node: '>=16.14'} + /@radix-ui/react-portal@1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-xLYZeHrWoPmA5mEKEfZZevoVRK/Q43GfzRXkWV6qawIWWK8t6ifIiLQdd7rmQ4Vk1bmI21XhqF9BN3jWf+phpA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true dependencies: - '@pnpm/types': 9.1.0 - normalize-registry-url: 2.0.0 - ramda: /@pnpm/ramda@0.28.1 - dev: false + '@babel/runtime': 7.22.11 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.21 + '@types/react-dom': 18.2.7 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: true - /@pnpm/npm-conf@2.2.2: - resolution: {integrity: sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA==} - engines: {node: '>=12'} + /@radix-ui/react-primitive@1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true dependencies: - '@pnpm/config.env-replace': 1.1.0 - '@pnpm/network.ca-file': 1.0.2 - config-chain: 1.1.13 + '@babel/runtime': 7.22.11 + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.21)(react@18.2.0) + '@types/react': 18.2.21 + '@types/react-dom': 18.2.7 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: true - /@pnpm/package-is-installable@8.0.3(@pnpm/logger@5.0.0): - resolution: {integrity: sha512-zdlqQlMs+SWUnw1WWgGSHPL4mnFxX2+AvkgzvWtunn1L+thXn3Swk39SjOse251c7rzLqERuV399yULyTv2QcQ==} - engines: {node: '>=16.14'} + /@radix-ui/react-roving-focus@1.0.4(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-2mUg5Mgcu001VkGy+FfzZyzbmuUWzgWkj3rvv4yu+mLw03+mTzbxZHvfcGyFp2b8EkQeMkpRQ5FiA2Vr2O6TeQ==} peerDependencies: - '@pnpm/logger': ^5.0.0 + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true dependencies: - '@pnpm/core-loggers': 9.0.1(@pnpm/logger@5.0.0) - '@pnpm/error': 5.0.2 - '@pnpm/logger': 5.0.0 - '@pnpm/types': 9.1.0 - detect-libc: 2.0.1 - execa: /safe-execa@0.1.2 - mem: 8.1.1 - semver: 7.5.3 - dev: false + '@babel/runtime': 7.22.11 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-direction': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@types/react': 18.2.21 + '@types/react-dom': 18.2.7 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: true - /@pnpm/pnpmfile@5.0.8(@pnpm/logger@5.0.0): - resolution: {integrity: sha512-voP1hzB961vG6fX9DEN48axuoGmQpQYco5NJLcxRRiTc3iHsxRdijlMd9FZLVBF+e3WlWlbEey7TrBhqp1nJng==} - engines: {node: '>=16.14'} + /@radix-ui/react-select@1.2.2(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-zI7McXr8fNaSrUY9mZe4x/HC0jTLY9fWNhO1oLWYMQGDXuV4UCivIGTxwioSzO0ZCYX9iSLyWmAh/1TOmX3Cnw==} peerDependencies: - '@pnpm/logger': ^5.0.0 + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true dependencies: - '@pnpm/core-loggers': 9.0.1(@pnpm/logger@5.0.0) - '@pnpm/error': 5.0.2 - '@pnpm/hooks.types': 1.0.1 - '@pnpm/lockfile-types': 5.1.0 - '@pnpm/logger': 5.0.0 - '@pnpm/store-controller-types': 15.0.1 - '@pnpm/types': 9.1.0 - chalk: 4.1.2 - path-absolute: 1.0.1 - dev: false + '@babel/runtime': 7.22.11 + '@radix-ui/number': 1.0.1 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-direction': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-dismissable-layer': 1.0.4(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-focus-scope': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-popper': 1.1.2(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-portal': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-use-previous': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-visually-hidden': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.21 + '@types/react-dom': 18.2.7 + aria-hidden: 1.2.3 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-remove-scroll: 2.5.5(@types/react@18.2.21)(react@18.2.0) + dev: true - /@pnpm/ramda@0.28.1: - resolution: {integrity: sha512-zcAG+lvU0fMziNeGXpPyCyCJYp5ZVrPElEE4t14jAmViaihohocZ+dDkcRIyAomox8pQsuZnv1EyHR+pOhmUWw==} - dev: false + /@radix-ui/react-separator@1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-itYmTy/kokS21aiV5+Z56MZB54KrhPgn6eHDKkFeOLR34HMN2s8PaN47qZZAGnvupcjxHaFZnW4pQEh0BvvVuw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.22.11 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.21 + '@types/react-dom': 18.2.7 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: true - /@pnpm/read-modules-dir@6.0.1: - resolution: {integrity: sha512-/h+3VB1j+hhUlEYkE+dAH5WbhR/qYDDvliqWQxN/AA0CYAFwMud5z4FOKzYHgY6RD+KVVgEelLquxCi7fKvT8A==} - engines: {node: '>=16.14'} + /@radix-ui/react-slot@1.0.2(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true dependencies: - graceful-fs: 4.2.11 - dev: false + '@babel/runtime': 7.22.11 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@types/react': 18.2.21 + react: 18.2.0 + dev: true - /@pnpm/read-package-json@8.0.2: - resolution: {integrity: sha512-YPTOp0vr1OCmdc2x8RLJEdZZQiZb77HbdhPbnKfwAH95awN2luNkNBvi5D27ieAxtyw4nR1oltNK4YcXtxJNhQ==} - engines: {node: '>=16.14'} + /@radix-ui/react-toggle-group@1.0.4(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-Uaj/M/cMyiyT9Bx6fOZO0SAG4Cls0GptBWiBmBxofmDbNVnYYoyRWj/2M/6VCi/7qcXFWnHhRUfdfZFvvkuu8A==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true dependencies: - '@pnpm/error': 5.0.2 - '@pnpm/types': 9.1.0 - load-json-file: 6.2.0 - normalize-package-data: 5.0.0 - dev: false + '@babel/runtime': 7.22.11 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-direction': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-roving-focus': 1.0.4(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-toggle': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@types/react': 18.2.21 + '@types/react-dom': 18.2.7 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: true - /@pnpm/read-project-manifest@5.0.2: - resolution: {integrity: sha512-LDrf6pKSnnhwXNK1dWSRRBPFOLCTvcrjbbPXEbjd1MpdI/mKQE94YozN2wIcgEh6gEjBkwZSIoWXlL4uc3e0cQ==} - engines: {node: '>=16.14'} + /@radix-ui/react-toggle@1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-Pkqg3+Bc98ftZGsl60CLANXQBBQ4W3mTFS9EJvNxKMZ7magklKV69/id1mlAlOFDDfHvlCms0fx8fA4CMKDJHg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true dependencies: - '@gwhitney/detect-indent': 7.0.1 - '@pnpm/error': 5.0.2 - '@pnpm/graceful-fs': 3.0.0 - '@pnpm/text.comments-parser': 2.0.0 - '@pnpm/types': 9.1.0 - '@pnpm/write-project-manifest': 5.0.1 - fast-deep-equal: 3.1.3 - is-windows: 1.0.2 - json5: 2.2.3 - parse-json: 5.2.0 - read-yaml-file: 2.1.0 - sort-keys: 4.2.0 - strip-bom: 4.0.0 - dev: false + '@babel/runtime': 7.22.11 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@types/react': 18.2.21 + '@types/react-dom': 18.2.7 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: true - /@pnpm/render-peer-issues@4.0.1: - resolution: {integrity: sha512-+SsNmbBHH7lBsFrs6dQCEWRtT+Bmq9MYxu+xgkXRplyvjSEQmM0h/UduIw5s8ZAlUuQcxNVTvl0b7ul6OPEIwg==} - engines: {node: '>=16.14'} + /@radix-ui/react-toolbar@1.0.4(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-tBgmM/O7a07xbaEkYJWYTXkIdU/1pW4/KZORR43toC/4XWyBCURK0ei9kMUdp+gTPPKBgYLxXmRSH1EVcIDp8Q==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true dependencies: - '@pnpm/types': 9.1.0 - archy: 1.0.0 - chalk: 4.1.2 - cli-columns: 4.0.0 - dev: false + '@babel/runtime': 7.22.11 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-direction': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-roving-focus': 1.0.4(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-separator': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-toggle-group': 1.0.4(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.21 + '@types/react-dom': 18.2.7 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: true - /@pnpm/resolver-base@10.0.1: - resolution: {integrity: sha512-2yufLOpiPKQyNVLbL3dgoytkDuuURB5yBOrFtafiuZieGZJid2AeHmFfPhU9hNc/ZM1+wqH3EuVHe/1DdEgm4Q==} - engines: {node: '>=16.14'} + /@radix-ui/react-use-callback-ref@1.0.1(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true dependencies: - '@pnpm/types': 9.1.0 - dev: false + '@babel/runtime': 7.22.11 + '@types/react': 18.2.21 + react: 18.2.0 + dev: true - /@pnpm/reviewing.dependencies-hierarchy@2.0.8(@pnpm/logger@5.0.0): - resolution: {integrity: sha512-JBNGYdzr7elZkUi5np9ci5VkKPbpedMt7EevGKvx+NHXckQCyGmwflIsijD9izxVghCigGmXZdO6/3aP24K0cw==} - engines: {node: '>=16.14'} + /@radix-ui/react-use-controllable-state@1.0.1(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true dependencies: - '@pnpm/dependency-path': 2.1.2 - '@pnpm/lockfile-file': 8.1.1(@pnpm/logger@5.0.0) - '@pnpm/lockfile-utils': 8.0.2 - '@pnpm/modules-yaml': 12.1.1 - '@pnpm/normalize-registries': 5.0.1 - '@pnpm/read-modules-dir': 6.0.1 - '@pnpm/read-package-json': 8.0.2 - '@pnpm/types': 9.1.0 - normalize-path: 3.0.0 - realpath-missing: 1.1.0 - resolve-link-target: 2.0.0 - transitivePeerDependencies: - - '@pnpm/logger' - dev: false + '@babel/runtime': 7.22.11 + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@types/react': 18.2.21 + react: 18.2.0 + dev: true - /@pnpm/store-controller-types@15.0.1: - resolution: {integrity: sha512-S88sR6xhQ1ZDhMRIjhaRBA11N2OIDU2W+60szQLU8e2bw+KgGU60LbcXMunTdRnJskuB9UfDyoN6YuRtETBqYA==} - engines: {node: '>=16.14'} + /@radix-ui/react-use-escape-keydown@1.0.3(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true dependencies: - '@pnpm/fetcher-base': 14.0.1 - '@pnpm/resolver-base': 10.0.1 - '@pnpm/types': 9.1.0 - dev: false + '@babel/runtime': 7.22.11 + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@types/react': 18.2.21 + react: 18.2.0 + dev: true - /@pnpm/text.comments-parser@2.0.0: - resolution: {integrity: sha512-DRWtTmmxQQtuWHf1xPt9bqzCSq8d0MQF5x1kdpCDMLd7xk3nP4To2/OGkPrb8MKbrWsgCNDwXyKCFlEKrAg7fg==} - engines: {node: '>=16.14'} + /@radix-ui/react-use-layout-effect@1.0.1(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true dependencies: - strip-comments-strings: 1.2.0 - dev: false + '@babel/runtime': 7.22.11 + '@types/react': 18.2.21 + react: 18.2.0 + dev: true - /@pnpm/types@9.1.0: - resolution: {integrity: sha512-MMPDMLOY17bfNhLhR9Qmq6/2keoocnR5DWXZfZDC4dKXugrMsE1jB6RnuU8swJIo4zyCsMT/iVSAtl/XK+9Z+A==} - engines: {node: '>=16.14'} - dev: false + /@radix-ui/react-use-previous@1.0.1(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-cV5La9DPwiQ7S0gf/0qiD6YgNqM5Fk97Kdrlc5yBcrF3jyEZQwm7vYFqMo4IfeHgJXsRaMvLABFtd0OVEmZhDw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.22.11 + '@types/react': 18.2.21 + react: 18.2.0 + dev: true - /@pnpm/util.lex-comparator@1.0.0: - resolution: {integrity: sha512-3aBQPHntVgk5AweBWZn+1I/fqZ9krK/w01197aYVkAJQGftb+BVWgEepxY5GChjSW12j52XX+CmfynYZ/p0DFQ==} - engines: {node: '>=12.22.0'} - dev: false + /@radix-ui/react-use-rect@1.0.1(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-Cq5DLuSiuYVKNU8orzJMbl15TXilTnJKUCltMVQg53BQOF1/C5toAaGrowkgksdBQ9H+SRL23g0HDmg9tvmxXw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.22.11 + '@radix-ui/rect': 1.0.1 + '@types/react': 18.2.21 + react: 18.2.0 + dev: true - /@pnpm/workspace.find-packages@1.0.1(@pnpm/logger@5.0.0): - resolution: {integrity: sha512-xTmJPmIucA5wuJ5c/htAtnV3o14/v8punNzXDZStYtWP0ZhtuYEb6hdSjQLcUYEyZH+aN15PxcigsSBcu8aWZQ==} - engines: {node: '>=16.14'} + /@radix-ui/react-use-size@1.0.1(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-ibay+VqrgcaI6veAojjofPATwledXiSmX+C0KrBk/xgpX9rBzPV3OsfwlhQdUOFbh+LKQorLYT+xTXW9V8yd0g==} peerDependencies: - '@pnpm/logger': ^5.0.0 + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true dependencies: - '@pnpm/cli-utils': 2.0.11(@pnpm/logger@5.0.0) - '@pnpm/constants': 7.1.1 - '@pnpm/fs.find-packages': 2.0.2 - '@pnpm/logger': 5.0.0 - '@pnpm/types': 9.1.0 - '@pnpm/util.lex-comparator': 1.0.0 - read-yaml-file: 2.1.0 - dev: false + '@babel/runtime': 7.22.11 + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.21)(react@18.2.0) + '@types/react': 18.2.21 + react: 18.2.0 + dev: true - /@pnpm/write-project-manifest@5.0.1: - resolution: {integrity: sha512-zU4vDfBUx/jUBPmR4CzCqPDOPObb/7iLT3UZvhXSJ8ZXDo9214V6agnJvxQ6bYBcypdiKva0hnb3tmo1chQBYg==} - engines: {node: '>=16.14'} + /@radix-ui/react-visually-hidden@1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-D4w41yN5YRKtu464TLnByKzMDG/JlMPHtfZgQAu9v6mNakUqGUI9vUrfQKz8NK41VMm/xbZbh76NUTVtIYqOMA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true dependencies: - '@pnpm/text.comments-parser': 2.0.0 - '@pnpm/types': 9.1.0 - json5: 2.2.3 - write-file-atomic: 5.0.1 - write-yaml-file: 5.0.0 - dev: false + '@babel/runtime': 7.22.11 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.21 + '@types/react-dom': 18.2.7 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: true - /@popperjs/core@2.11.8: - resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} - dev: false + /@radix-ui/rect@1.0.1: + resolution: {integrity: sha512-fyrgCaedtvMg9NK3en0pnOYJdtfwxUcNolezkNPUsoX57X8oQk+NkqcvzHXD2uKNij6GXmWU9NDru2IWjrO4BQ==} + dependencies: + '@babel/runtime': 7.22.11 + dev: true - /@redis/bloom@1.2.0(@redis/client@1.5.8): + /@redis/bloom@1.2.0(@redis/client@1.5.9): resolution: {integrity: sha512-HG2DFjYKbpNmVXsa0keLHp/3leGJz1mjh09f2RLGGLQZzSHpkmZWuwJbAvo3QcRY8p80m5+ZdXZdYOSBLlp7Cg==} peerDependencies: '@redis/client': ^1.0.0 dependencies: - '@redis/client': 1.5.8 + '@redis/client': 1.5.9 dev: true - /@redis/client@1.5.8: - resolution: {integrity: sha512-xzElwHIO6rBAqzPeVnCzgvrnBEcFL1P0w8P65VNLRkdVW8rOE58f52hdj0BDgmsdOm4f1EoXPZtH4Fh7M/qUpw==} + /@redis/client@1.5.9: + resolution: {integrity: sha512-SffgN+P1zdWJWSXBvJeynvEnmnZrYmtKSRW00xl8pOPFOMJjxRR9u0frSxJpPR6Y4V+k54blJjGW7FgxbTI7bQ==} engines: {node: '>=14'} dependencies: cluster-key-slot: 1.1.2 @@ -7585,42 +6825,48 @@ packages: yallist: 4.0.0 dev: true - /@redis/graph@1.1.0(@redis/client@1.5.8): + /@redis/graph@1.1.0(@redis/client@1.5.9): resolution: {integrity: sha512-16yZWngxyXPd+MJxeSr0dqh2AIOi8j9yXKcKCwVaKDbH3HTuETpDVPcLujhFYVPtYrngSco31BUcSa9TH31Gqg==} peerDependencies: '@redis/client': ^1.0.0 dependencies: - '@redis/client': 1.5.8 + '@redis/client': 1.5.9 dev: true - /@redis/json@1.0.4(@redis/client@1.5.8): + /@redis/json@1.0.4(@redis/client@1.5.9): resolution: {integrity: sha512-LUZE2Gdrhg0Rx7AN+cZkb1e6HjoSKaeeW8rYnt89Tly13GBI5eP4CwDVr+MY8BAYfCg4/N15OUrtLoona9uSgw==} peerDependencies: '@redis/client': ^1.0.0 dependencies: - '@redis/client': 1.5.8 + '@redis/client': 1.5.9 dev: true - /@redis/search@1.1.3(@redis/client@1.5.8): + /@redis/search@1.1.3(@redis/client@1.5.9): resolution: {integrity: sha512-4Dg1JjvCevdiCBTZqjhKkGoC5/BcB7k9j99kdMnaXFXg8x4eyOIVg9487CMv7/BUVkFLZCaIh8ead9mU15DNng==} peerDependencies: '@redis/client': ^1.0.0 dependencies: - '@redis/client': 1.5.8 + '@redis/client': 1.5.9 dev: true - /@redis/time-series@1.0.4(@redis/client@1.5.8): - resolution: {integrity: sha512-ThUIgo2U/g7cCuZavucQTQzA9g9JbDDY2f64u3AbAoz/8vE2lt2U37LamDUVChhaDA3IRT9R6VvJwqnUfTJzng==} + /@redis/time-series@1.0.5(@redis/client@1.5.9): + resolution: {integrity: sha512-IFjIgTusQym2B5IZJG3XKr5llka7ey84fw/NOYqESP5WUfQs9zz1ww/9+qoz4ka/S6KcGBodzlCeZ5UImKbscg==} peerDependencies: '@redis/client': ^1.0.0 dependencies: - '@redis/client': 1.5.8 + '@redis/client': 1.5.9 dev: true - /@rollup/pluginutils@4.2.1: - resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} - engines: {node: '>= 8.0.0'} + /@rollup/pluginutils@5.0.4: + resolution: {integrity: sha512-0KJnIoRI8A+a1dqOYLxH8vBf8bphDmty5QvIm2hqm7oFCFYKCAZWWd2hXgMibaPsNDhI0AtpYfQZJG47pt/k4g==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true dependencies: + '@types/estree': 1.0.1 estree-walker: 2.0.2 picomatch: 2.3.1 dev: true @@ -7630,18 +6876,18 @@ packages: dependencies: '@lukeed/uuid': 2.0.1 dset: 3.1.2 - tslib: 2.6.0 + tslib: 2.6.2 dev: false - /@segment/analytics-node@1.0.0: - resolution: {integrity: sha512-UWFujSxRkRauZuMVF4MPOT5QPvX4i7kiC2QCsozHhltoTiR2SBWRI86cYO/JI/Uk7qKaOxxGFDkJarCyIP7uLA==} + /@segment/analytics-node@1.1.0: + resolution: {integrity: sha512-q8MPpvQJgMUSIRmQXficA33ZmLQ6s5YqUMr623xJhhfp/TGkkgfpcdMk+qSniZVIm8JuQRXm8Mbh922LG3goBQ==} engines: {node: '>=14'} dependencies: '@lukeed/uuid': 2.0.1 '@segment/analytics-core': 1.3.0 buffer: 6.0.3 - node-fetch: 2.6.12 - tslib: 2.6.0 + node-fetch: 2.7.0 + tslib: 2.6.2 transitivePeerDependencies: - encoding dev: false @@ -7704,16 +6950,49 @@ packages: tslib: 1.14.1 dev: true + /@sigstore/bundle@1.1.0: + resolution: {integrity: sha512-PFutXEy0SmQxYI4texPw3dd2KewuNqv7OuK1ZFtY2fM754yhvG2KdgwIhRnoEE2uHdtdGNQ8s0lb94dW9sELog==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + '@sigstore/protobuf-specs': 0.2.1 + dev: true + + /@sigstore/protobuf-specs@0.2.1: + resolution: {integrity: sha512-XTWVxnWJu+c1oCshMLwnKvz8ZQJJDVOlciMfgpJBQbThVjKTCG8dwyhgLngBD2KN0ap9F/gOV8rFDEx8uh7R2A==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + + /@sigstore/sign@1.0.0: + resolution: {integrity: sha512-INxFVNQteLtcfGmcoldzV6Je0sbbfh9I16DM4yJPw3j5+TFP8X6uIiA18mvpEa9yyeycAKgPmOA3X9hVdVTPUA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + '@sigstore/bundle': 1.1.0 + '@sigstore/protobuf-specs': 0.2.1 + make-fetch-happen: 11.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@sigstore/tuf@1.0.3: + resolution: {integrity: sha512-2bRovzs0nJZFlCN3rXirE4gwxCn97JNjMmwpecqlbgV9WcxX7WRuIrgzx/X7Ib7MYRbyUTpBYE0s2x6AmZXnlg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + '@sigstore/protobuf-specs': 0.2.1 + tuf-js: 1.1.7 + transitivePeerDependencies: + - supports-color + dev: true + /@sinclair/typebox@0.24.51: resolution: {integrity: sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==} dev: true - /@sinclair/typebox@0.25.24: - resolution: {integrity: sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==} + /@sinclair/typebox@0.27.8: + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - /@sindresorhus/is@5.4.1: - resolution: {integrity: sha512-axlrvsHlHlFmKKMEg4VyvMzFr93JWJj4eIfXY1STVuO2fsImCa7ncaiG5gC8HKOX590AW5RtRsC41/B+OfrSqw==} + /@sindresorhus/is@5.6.0: + resolution: {integrity: sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==} engines: {node: '>=14.16'} dev: true @@ -7761,27 +7040,430 @@ packages: type-detect: 4.0.8 dev: true - /@sinonjs/text-encoding@0.7.2: - resolution: {integrity: sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==} - dev: true + /@sinonjs/text-encoding@0.7.2: + resolution: {integrity: sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==} + dev: true + + /@smithy/abort-controller@2.0.5: + resolution: {integrity: sha512-byVZ2KWLMPYAZGKjRpniAzLcygJO4ruClZKdJTuB0eCB76ONFTdptBHlviHpAZXknRz7skYWPfcgO9v30A1SyA==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/chunked-blob-reader-native@2.0.0: + resolution: {integrity: sha512-HM8V2Rp1y8+1343tkZUKZllFhEQPNmpNdgFAncbTsxkZ18/gqjk23XXv3qGyXWp412f3o43ZZ1UZHVcHrpRnCQ==} + dependencies: + '@smithy/util-base64': 2.0.0 + tslib: 2.6.2 + dev: false + + /@smithy/chunked-blob-reader@2.0.0: + resolution: {integrity: sha512-k+J4GHJsMSAIQPChGBrjEmGS+WbPonCXesoqP9fynIqjn7rdOThdH8FAeCmokP9mxTYKQAKoHCLPzNlm6gh7Wg==} + dependencies: + tslib: 2.6.2 + dev: false + + /@smithy/config-resolver@2.0.5: + resolution: {integrity: sha512-n0c2AXz+kjALY2FQr7Zy9zhYigXzboIh1AuUUVCqFBKFtdEvTwnwPXrTDoEehLiRTUHNL+4yzZ3s+D0kKYSLSg==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.2.2 + '@smithy/util-config-provider': 2.0.0 + '@smithy/util-middleware': 2.0.0 + tslib: 2.6.2 + dev: false + + /@smithy/credential-provider-imds@2.0.7: + resolution: {integrity: sha512-XivkZj/pipzpQPxgleE1odwJQ6oDsVViB4VUO/HRDI4EdEfZjud44USupOUOa/xOjS39/75DYB4zgTbyV+totw==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/node-config-provider': 2.0.7 + '@smithy/property-provider': 2.0.6 + '@smithy/types': 2.2.2 + '@smithy/url-parser': 2.0.5 + tslib: 2.6.2 + dev: false + + /@smithy/eventstream-codec@2.0.5: + resolution: {integrity: sha512-iqR6OuOV3zbQK8uVs9o+9AxhVk8kW9NAxA71nugwUB+kTY9C35pUd0A5/m4PRT0Y0oIW7W4kgnSR3fdYXQjECw==} + dependencies: + '@aws-crypto/crc32': 3.0.0 + '@smithy/types': 2.2.2 + '@smithy/util-hex-encoding': 2.0.0 + tslib: 2.6.2 + dev: false + + /@smithy/eventstream-serde-browser@2.0.5: + resolution: {integrity: sha512-8NU51y94qFJbxL6SmvgWDfITHO/svvbAigkLYk2pckX17TGCSf4EXuGpGLliJp5Ljh5+vASC7mUH2jYX7MWBxA==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/eventstream-serde-universal': 2.0.5 + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/eventstream-serde-config-resolver@2.0.5: + resolution: {integrity: sha512-u3gvukRaTH4X6tsryuZ4T1WGIEP34fPaTTzphFDJe8GJz/k11oBW1MPnkcaucBMxLnObK9swCF85j5cp1Kj1oA==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/eventstream-serde-node@2.0.5: + resolution: {integrity: sha512-/C8jb+k/vKUBIe80D30vzjvRXlJf76kG2AJY7/NwiqWuD2usRuuDFCDaswXdVsSh9P1+FeaxZ48chsK10yDryQ==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/eventstream-serde-universal': 2.0.5 + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/eventstream-serde-universal@2.0.5: + resolution: {integrity: sha512-+vHvbQtlSVYTQ/20tNpVaKi0EpTR7E8GoEUHJypRZIRgiT03b3h2MAWk+SNaqMrCJrYG9vKLkJFzDylRlUvDWg==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/eventstream-codec': 2.0.5 + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/fetch-http-handler@2.0.5: + resolution: {integrity: sha512-EzFoMowdBNy1VqtvkiXgPFEdosIAt4/4bgZ8uiDiUyfhmNXq/3bV+CagPFFBsgFOR/X2XK4zFZHRsoa7PNHVVg==} + dependencies: + '@smithy/protocol-http': 2.0.5 + '@smithy/querystring-builder': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/util-base64': 2.0.0 + tslib: 2.6.2 + dev: false + + /@smithy/hash-blob-browser@2.0.5: + resolution: {integrity: sha512-ZVAUBtJXGf9bEko4/RwWcTK6d3b/ZmQMxJMrxOOcQhVDiqny9zI0mzgstO4Oxz3135R7S3V/bbGw3w3woCYpQg==} + dependencies: + '@smithy/chunked-blob-reader': 2.0.0 + '@smithy/chunked-blob-reader-native': 2.0.0 + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/hash-node@2.0.5: + resolution: {integrity: sha512-mk551hIywBITT+kXruRNXk7f8Fy7DTzBjZJSr/V6nolYKmUHIG3w5QU6nO9qPYEQGKc/yEPtkpdS28ndeG93lA==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.2.2 + '@smithy/util-buffer-from': 2.0.0 + '@smithy/util-utf8': 2.0.0 + tslib: 2.6.2 + dev: false + + /@smithy/hash-stream-node@2.0.5: + resolution: {integrity: sha512-XiR4Aoux5kXy8OWPLQisKy3GPmm0l6deHepvPvr4MUzIwa5XWazG3JdbZXy+mk93CvEZrOwKPHU5Kul6QybJiQ==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.2.2 + '@smithy/util-utf8': 2.0.0 + tslib: 2.6.2 + dev: false + + /@smithy/invalid-dependency@2.0.5: + resolution: {integrity: sha512-0wEi+JT0hM+UUwrJVYbqjuGFhy5agY/zXyiN7BNAJ1XoCDjU5uaNSj8ekPWsXd/d4yM6NSe8UbPd8cOc1+3oBQ==} + dependencies: + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/is-array-buffer@2.0.0: + resolution: {integrity: sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==} + engines: {node: '>=14.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + + /@smithy/md5-js@2.0.5: + resolution: {integrity: sha512-k5EOte/Ye2r7XBVaXv2rhiehk6l3T4uRiPF+pnxKEc+G9Fwd1xAXBDZrtOq1syFPBKBmVfNszG4nevngST7NKg==} + dependencies: + '@smithy/types': 2.2.2 + '@smithy/util-utf8': 2.0.0 + tslib: 2.6.2 + dev: false + + /@smithy/middleware-content-length@2.0.5: + resolution: {integrity: sha512-E7VwV5H02fgZIUGRli4GevBCAPvkyEI/fgl9SU47nPPi3DAAX3nEtUb8xfGbXjOcJ5BdSUoWWZn42tEd/blOqA==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/protocol-http': 2.0.5 + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/middleware-endpoint@2.0.5: + resolution: {integrity: sha512-tyzDuoNTbsMQCq5Xkc4QOt6e2GACUllQIV8SQ5fc59FtOIV9/vbf58/GxVjZm2o8+MMbdDBANjTDZe/ijZKfyA==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/middleware-serde': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/url-parser': 2.0.5 + '@smithy/util-middleware': 2.0.0 + tslib: 2.6.2 + dev: false + + /@smithy/middleware-retry@2.0.5: + resolution: {integrity: sha512-ulIfbFyzQTVnJbLjUl1CTSi0etg6tej/ekwaLp0Gn8ybUkDkKYa+uB6CF/m2J5B6meRwyJlsryR+DjaOVyiicg==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/protocol-http': 2.0.5 + '@smithy/service-error-classification': 2.0.0 + '@smithy/types': 2.2.2 + '@smithy/util-middleware': 2.0.0 + '@smithy/util-retry': 2.0.0 + tslib: 2.6.2 + uuid: 8.3.2 + dev: false + + /@smithy/middleware-serde@2.0.5: + resolution: {integrity: sha512-in0AA5sous74dOfTGU9rMJBXJ0bDVNxwdXtEt5lh3FVd2sEyjhI+rqpLLRF1E4ixbw3RSEf80hfRpcPdjg4vvQ==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/middleware-stack@2.0.0: + resolution: {integrity: sha512-31XC1xNF65nlbc16yuh3wwTudmqs6qy4EseQUGF8A/p2m/5wdd/cnXJqpniy/XvXVwkHPz/GwV36HqzHtIKATQ==} + engines: {node: '>=14.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + + /@smithy/node-config-provider@2.0.7: + resolution: {integrity: sha512-GuLxhnf0aVQsfQp4ZWaM1TRCIndpQjAswyFcmDFRNf4yFqpxpLPDeV540+O0Z21Hmu3deoQm/dCPXbVn90PYzg==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/property-provider': 2.0.6 + '@smithy/shared-ini-file-loader': 2.0.6 + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/node-http-handler@2.0.5: + resolution: {integrity: sha512-lZm5DZf4b3V0saUw9WTC4/du887P6cy2fUyQgQQKRRV6OseButyD5yTzeMmXE53CaXJBMBsUvvIQ0hRVxIq56w==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/abort-controller': 2.0.5 + '@smithy/protocol-http': 2.0.5 + '@smithy/querystring-builder': 2.0.5 + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/property-provider@2.0.6: + resolution: {integrity: sha512-CVem6ZkkWxbTnhjDLyLESY0oLA6IUZYtdqrCpGQKUXaFBOuc/izjm7fIFGBxEbjZ1EGcH9hHxrjqX36RWULNRg==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/protocol-http@2.0.5: + resolution: {integrity: sha512-d2hhHj34mA2V86doiDfrsy2fNTnUOowGaf9hKb0hIPHqvcnShU4/OSc4Uf1FwHkAdYF3cFXTrj5VGUYbEuvMdw==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/querystring-builder@2.0.5: + resolution: {integrity: sha512-4DCX9krxLzATj+HdFPC3i8pb7XTAWzzKqSw8aTZMjXjtQY+vhe4azMAqIvbb6g7JKwIkmkRAjK6EXO3YWSnJVQ==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.2.2 + '@smithy/util-uri-escape': 2.0.0 + tslib: 2.6.2 + dev: false + + /@smithy/querystring-parser@2.0.5: + resolution: {integrity: sha512-C2stCULH0r54KBksv3AWcN8CLS3u9+WsEW8nBrvctrJ5rQTNa1waHkffpVaiKvcW2nP0aIMBPCobD/kYf/q9mA==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/service-error-classification@2.0.0: + resolution: {integrity: sha512-2z5Nafy1O0cTf69wKyNjGW/sNVMiqDnb4jgwfMG8ye8KnFJ5qmJpDccwIbJNhXIfbsxTg9SEec2oe1cexhMJvw==} + engines: {node: '>=14.0.0'} + dev: false + + /@smithy/shared-ini-file-loader@2.0.6: + resolution: {integrity: sha512-NO6dHqho6APbVR0DxPtYoL4KXBqUeSM3Slsd103MOgL50YbzzsQmMLtDMZ87W8MlvvCN0tuiq+OrAO/rM7hTQg==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/signature-v4@2.0.5: + resolution: {integrity: sha512-ABIzXmUDXK4n2c9cXjQLELgH2RdtABpYKT+U131e2I6RbCypFZmxIHmIBufJzU2kdMCQ3+thBGDWorAITFW04A==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/eventstream-codec': 2.0.5 + '@smithy/is-array-buffer': 2.0.0 + '@smithy/types': 2.2.2 + '@smithy/util-hex-encoding': 2.0.0 + '@smithy/util-middleware': 2.0.0 + '@smithy/util-uri-escape': 2.0.0 + '@smithy/util-utf8': 2.0.0 + tslib: 2.6.2 + dev: false + + /@smithy/smithy-client@2.0.5: + resolution: {integrity: sha512-kCTFr8wfOAWKDzGvfBElc6shHigWtHNhMQ1IbosjC4jOlayFyZMSs2PysKB+Ox/dhQ41KqOzgVjgiQ+PyWqHMQ==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/middleware-stack': 2.0.0 + '@smithy/types': 2.2.2 + '@smithy/util-stream': 2.0.5 + tslib: 2.6.2 + dev: false + + /@smithy/types@2.2.2: + resolution: {integrity: sha512-4PS0y1VxDnELGHGgBWlDksB2LJK8TG8lcvlWxIsgR+8vROI7Ms8h1P4FQUx+ftAX2QZv5g1CJCdhdRmQKyonyw==} + engines: {node: '>=14.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + + /@smithy/url-parser@2.0.5: + resolution: {integrity: sha512-OdMBvZhpckQSkugCXNJQCvqJ71wE7Ftxce92UOQLQ9pwF6hoS5PLL7wEfpnuEXtStzBqJYkzu1C1ZfjuFGOXAA==} + dependencies: + '@smithy/querystring-parser': 2.0.5 + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/util-base64@2.0.0: + resolution: {integrity: sha512-Zb1E4xx+m5Lud8bbeYi5FkcMJMnn+1WUnJF3qD7rAdXpaL7UjkFQLdmW5fHadoKbdHpwH9vSR8EyTJFHJs++tA==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/util-buffer-from': 2.0.0 + tslib: 2.6.2 + dev: false + + /@smithy/util-body-length-browser@2.0.0: + resolution: {integrity: sha512-JdDuS4ircJt+FDnaQj88TzZY3+njZ6O+D3uakS32f2VNnDo3vyEuNdBOh/oFd8Df1zSZOuH1HEChk2AOYDezZg==} + dependencies: + tslib: 2.6.2 + dev: false + + /@smithy/util-body-length-node@2.1.0: + resolution: {integrity: sha512-/li0/kj/y3fQ3vyzn36NTLGmUwAICb7Jbe/CsWCktW363gh1MOcpEcSO3mJ344Gv2dqz8YJCLQpb6hju/0qOWw==} + engines: {node: '>=14.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + + /@smithy/util-buffer-from@2.0.0: + resolution: {integrity: sha512-/YNnLoHsR+4W4Vf2wL5lGv0ksg8Bmk3GEGxn2vEQt52AQaPSCuaO5PM5VM7lP1K9qHRKHwrPGktqVoAHKWHxzw==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/is-array-buffer': 2.0.0 + tslib: 2.6.2 + dev: false + + /@smithy/util-config-provider@2.0.0: + resolution: {integrity: sha512-xCQ6UapcIWKxXHEU4Mcs2s7LcFQRiU3XEluM2WcCjjBtQkUN71Tb+ydGmJFPxMUrW/GWMgQEEGipLym4XG0jZg==} + engines: {node: '>=14.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + + /@smithy/util-defaults-mode-browser@2.0.6: + resolution: {integrity: sha512-h8xyKTZIIom62DN4xbPUmL+RL1deZcK1qJGmCr4c2yXjOrs5/iZ1VtQQcl+xP78620ga/565AikZE1sktdg2yA==} + engines: {node: '>= 10.0.0'} + dependencies: + '@smithy/property-provider': 2.0.6 + '@smithy/types': 2.2.2 + bowser: 2.11.0 + tslib: 2.6.2 + dev: false + + /@smithy/util-defaults-mode-node@2.0.7: + resolution: {integrity: sha512-2C1YfmYJj9bpM/cRAgQppYNzPd8gDEXZ5XIVDuEQg3TmmIiinZaFf/HsHYo9NK/PMy5oawJVdIuR7SVriIo1AQ==} + engines: {node: '>= 10.0.0'} + dependencies: + '@smithy/config-resolver': 2.0.5 + '@smithy/credential-provider-imds': 2.0.7 + '@smithy/node-config-provider': 2.0.7 + '@smithy/property-provider': 2.0.6 + '@smithy/types': 2.2.2 + tslib: 2.6.2 + dev: false + + /@smithy/util-hex-encoding@2.0.0: + resolution: {integrity: sha512-c5xY+NUnFqG6d7HFh1IFfrm3mGl29lC+vF+geHv4ToiuJCBmIfzx6IeHLg+OgRdPFKDXIw6pvi+p3CsscaMcMA==} + engines: {node: '>=14.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + + /@smithy/util-middleware@2.0.0: + resolution: {integrity: sha512-eCWX4ECuDHn1wuyyDdGdUWnT4OGyIzV0LN1xRttBFMPI9Ff/4heSHVxneyiMtOB//zpXWCha1/SWHJOZstG7kA==} + engines: {node: '>=14.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + + /@smithy/util-retry@2.0.0: + resolution: {integrity: sha512-/dvJ8afrElasuiiIttRJeoS2sy8YXpksQwiM/TcepqdRVp7u4ejd9C4IQURHNjlfPUT7Y6lCDSa2zQJbdHhVTg==} + engines: {node: '>= 14.0.0'} + dependencies: + '@smithy/service-error-classification': 2.0.0 + tslib: 2.6.2 + dev: false + + /@smithy/util-stream@2.0.5: + resolution: {integrity: sha512-ylx27GwI05xLpYQ4hDIfS15vm+wYjNN0Sc2P0FxuzgRe8v0BOLHppGIQ+Bezcynk8C9nUzsUue3TmtRhjut43g==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/fetch-http-handler': 2.0.5 + '@smithy/node-http-handler': 2.0.5 + '@smithy/types': 2.2.2 + '@smithy/util-base64': 2.0.0 + '@smithy/util-buffer-from': 2.0.0 + '@smithy/util-hex-encoding': 2.0.0 + '@smithy/util-utf8': 2.0.0 + tslib: 2.6.2 + dev: false + + /@smithy/util-uri-escape@2.0.0: + resolution: {integrity: sha512-ebkxsqinSdEooQduuk9CbKcI+wheijxEb3utGXkCoYQkJnwTnLbH1JXGimJtUkQwNQbsbuYwG2+aFVyZf5TLaw==} + engines: {node: '>=14.0.0'} + dependencies: + tslib: 2.6.2 + dev: false - /@smithy/protocol-http@1.1.0: - resolution: {integrity: sha512-H5y/kZOqfJSqRkwtcAoVbqONmhdXwSgYNJ1Glk5Ry8qlhVVy5qUzD9EklaCH8/XLnoCsLO/F/Giee8MIvaBRkg==} + /@smithy/util-utf8@2.0.0: + resolution: {integrity: sha512-rctU1VkziY84n5OXe3bPNpKR001ZCME2JCaBBFgtiM2hfKbHFudc/BkMuPab8hRbLd0j3vbnBTTZ1igBf0wgiQ==} engines: {node: '>=14.0.0'} dependencies: - '@smithy/types': 1.1.0 - tslib: 2.6.0 + '@smithy/util-buffer-from': 2.0.0 + tslib: 2.6.2 dev: false - /@smithy/types@1.1.0: - resolution: {integrity: sha512-KzmvisMmuwD2jZXuC9e65JrgsZM97y5NpDU7g347oB+Q+xQLU6hQZ5zFNNbEfwwOJHoOvEVTna+dk1h/lW7alw==} + /@smithy/util-waiter@2.0.5: + resolution: {integrity: sha512-1lkkUmI/bhaDX+LIT3RiUNAn+NzPmsWjE7beMq0oQ3H1/CffaILIN67riDA0aE1YBj6xll7uWMIy4tJqc+peXw==} engines: {node: '>=14.0.0'} dependencies: - tslib: 2.6.0 + '@smithy/abort-controller': 2.0.5 + '@smithy/types': 2.2.2 + tslib: 2.6.2 dev: false - /@storybook/addon-actions@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-otdbuEcHtzb6BzYdCYXyoZ3yNwcMdGSeGKf1aMj0b+C6b23XMnwDa90nzH3JST/sb8PJ1o5MHKWPQJ8UKt72Ug==} + /@storybook/addon-actions@7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-0lHLLUlrGE7CBFrfmAXrBKu7fUIsiQlnNekuE3cIAjSgVR481bJEzYHUUoMATqpPC4GGErBdP1CZxVDDwWV8jA==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7791,14 +7473,14 @@ packages: react-dom: optional: true dependencies: - '@storybook/client-logger': 7.0.20 - '@storybook/components': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/core-events': 7.0.20 + '@storybook/client-logger': 7.4.0 + '@storybook/components': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/core-events': 7.4.0 '@storybook/global': 5.0.0 - '@storybook/manager-api': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/preview-api': 7.0.20 - '@storybook/theming': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/types': 7.0.20 + '@storybook/manager-api': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/preview-api': 7.4.0 + '@storybook/theming': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/types': 7.4.0 dequal: 2.0.3 lodash: 4.17.21 polished: 4.2.2 @@ -7806,13 +7488,16 @@ packages: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) react-inspector: 6.0.2(react@18.2.0) - telejson: 7.1.0 + telejson: 7.2.0 ts-dedent: 2.2.0 uuid: 9.0.0 + transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' dev: true - /@storybook/addon-backgrounds@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-2hMZGCWNCPDgL+p6aL7dxHVOdh31ugGC2ZDeKscSrN+dvWCMUqj1Ns4EnEKBP4+4RXjmrNTsZCKaD9RfY3Pb5g==} + /@storybook/addon-backgrounds@7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-cEO/Tp/eRE+5bf1FGN4wKLqLDBv3EYp9enJyXV7B3cFdciqtoE7VJPZuFZkzjJN1rRcOKSZp8g5agsx+x9uNGQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7822,22 +7507,25 @@ packages: react-dom: optional: true dependencies: - '@storybook/client-logger': 7.0.20 - '@storybook/components': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/core-events': 7.0.20 + '@storybook/client-logger': 7.4.0 + '@storybook/components': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/core-events': 7.4.0 '@storybook/global': 5.0.0 - '@storybook/manager-api': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/preview-api': 7.0.20 - '@storybook/theming': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/types': 7.0.20 + '@storybook/manager-api': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/preview-api': 7.4.0 + '@storybook/theming': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/types': 7.4.0 memoizerific: 1.11.3 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) ts-dedent: 2.2.0 + transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' dev: true - /@storybook/addon-controls@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-wXs8QFNNly18d7wVyGne0CIPwAcptyzuq+Q0ltDSInRPvx6RadXH0L5Ah7FCsVXUozmxxRq+jt4Vne979W6mUA==} + /@storybook/addon-controls@7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-tYDfqpTR+c9y4kElmr3aWNHPot6kYd+nruYb697LpkCdy4lFErqSo0mhvPyZfMZp2KEajfp6YJAurhQWbvbj/A==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7847,46 +7535,48 @@ packages: react-dom: optional: true dependencies: - '@storybook/blocks': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/client-logger': 7.0.20 - '@storybook/components': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/core-common': 7.0.20 - '@storybook/manager-api': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/node-logger': 7.0.20 - '@storybook/preview-api': 7.0.20 - '@storybook/theming': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/types': 7.0.20 + '@storybook/blocks': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/client-logger': 7.4.0 + '@storybook/components': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/core-common': 7.4.0 + '@storybook/core-events': 7.4.0 + '@storybook/manager-api': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/node-logger': 7.4.0 + '@storybook/preview-api': 7.4.0 + '@storybook/theming': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/types': 7.4.0 lodash: 4.17.21 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) ts-dedent: 2.2.0 transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' + - encoding - supports-color dev: true - /@storybook/addon-docs@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-gxq7pGIER3eNGme9NJK5fUBqqXuHLnRwu6ng167IpAAVvcAXRnDFkP10y+KK72wAxwpZrI9squcWCOKReGr8Mg==} + /@storybook/addon-docs@7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-LJE92LUeVTgi8W4tLBEbSvCqF54snmBfTFCr46vhCFov2CE2VBgEvIX1XT3dfUgYUOtPu3RXR2C89fYgU6VYZw==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: - '@babel/core': 7.22.5 - '@babel/plugin-transform-react-jsx': 7.22.5(@babel/core@7.22.5) - '@jest/transform': 29.5.0 + '@jest/transform': 29.6.4 '@mdx-js/react': 2.3.0(react@18.2.0) - '@storybook/blocks': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/client-logger': 7.0.20 - '@storybook/components': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/csf-plugin': 7.0.20 - '@storybook/csf-tools': 7.0.20 + '@storybook/blocks': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/client-logger': 7.4.0 + '@storybook/components': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/csf-plugin': 7.4.0 + '@storybook/csf-tools': 7.4.0 '@storybook/global': 5.0.0 '@storybook/mdx2-csf': 1.1.0 - '@storybook/node-logger': 7.0.20 - '@storybook/postinstall': 7.0.20 - '@storybook/preview-api': 7.0.20 - '@storybook/react-dom-shim': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/theming': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/types': 7.0.20 + '@storybook/node-logger': 7.4.0 + '@storybook/postinstall': 7.4.0 + '@storybook/preview-api': 7.4.0 + '@storybook/react-dom-shim': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/theming': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/types': 7.4.0 fs-extra: 11.1.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -7894,45 +7584,51 @@ packages: remark-slug: 6.1.0 ts-dedent: 2.2.0 transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' + - encoding - supports-color dev: true - /@storybook/addon-essentials@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-KPHHSDGQUd/3TUr5s7gS3SGDD8XTLl7GnhV//uj1r0SSMKNcIhoV9fzw99IOhADkeazMn9ODBOhkFcIShUMmfQ==} + /@storybook/addon-essentials@7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-nZmNM9AKw2JXxnYUXyFKLeUF/cL7Z9E1WTeZyOFTDtU2aITRt8+LvaepwjchtPqu2B0GcQxLB5FRDdhy0I19nw==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: - '@storybook/addon-actions': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/addon-backgrounds': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/addon-controls': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/addon-docs': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/addon-highlight': 7.0.20 - '@storybook/addon-measure': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/addon-outline': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/addon-toolbars': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/addon-viewport': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/core-common': 7.0.20 - '@storybook/manager-api': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/node-logger': 7.0.20 - '@storybook/preview-api': 7.0.20 + '@storybook/addon-actions': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/addon-backgrounds': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/addon-controls': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/addon-docs': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/addon-highlight': 7.4.0 + '@storybook/addon-measure': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/addon-outline': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/addon-toolbars': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/addon-viewport': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/core-common': 7.4.0 + '@storybook/manager-api': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/node-logger': 7.4.0 + '@storybook/preview-api': 7.4.0 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) ts-dedent: 2.2.0 transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' + - encoding - supports-color dev: true - /@storybook/addon-highlight@7.0.20: - resolution: {integrity: sha512-AHNYMNY1DtzS+tQ4y0azyXCmIAKuf2j/xp5DgPVkdZmPIHA2wkQZw3EGQj9GTDMZ/Afj3r8kMkUw28NekGYa8A==} + /@storybook/addon-highlight@7.4.0: + resolution: {integrity: sha512-kpYSb3oXI9t/1+aRJhToDZ0/1W4mu+SzTBfv9Bl2d/DogEkFzgJricoy5LtvS5EpcXUmKO1FJsw/DCm9buSL2g==} dependencies: - '@storybook/core-events': 7.0.20 + '@storybook/core-events': 7.4.0 '@storybook/global': 5.0.0 - '@storybook/preview-api': 7.0.20 + '@storybook/preview-api': 7.4.0 dev: true - /@storybook/addon-interactions@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-8a+EFix0kkEE9Px9bE9BzHCHIxn2Fh9TlDW37YhY5grO/Z5VmJF7Z55pFHxSNYmCXKVxxlExSMmK/erbHKvqOA==} + /@storybook/addon-interactions@7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-nEWP+Ib0Y/ShXfpCm40FBTbBy1/MT8XxTEAhcNN+3ZJ07Vhhkrb8GMlWHTKQv2PyghEVBYEoPFHhElUJQOe00g==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7942,27 +7638,30 @@ packages: react-dom: optional: true dependencies: - '@storybook/client-logger': 7.0.20 - '@storybook/components': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/core-common': 7.0.20 - '@storybook/core-events': 7.0.20 + '@storybook/client-logger': 7.4.0 + '@storybook/components': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/core-common': 7.4.0 + '@storybook/core-events': 7.4.0 '@storybook/global': 5.0.0 - '@storybook/instrumenter': 7.0.20 - '@storybook/manager-api': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/preview-api': 7.0.20 - '@storybook/theming': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/types': 7.0.20 + '@storybook/instrumenter': 7.4.0 + '@storybook/manager-api': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/preview-api': 7.4.0 + '@storybook/theming': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/types': 7.4.0 jest-mock: 27.5.1 polished: 4.2.2 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) ts-dedent: 2.2.0 transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' + - encoding - supports-color dev: true - /@storybook/addon-links@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-C0eoik4ka9zxsMB1e9eE9NbvuSnNn303bdtaXnhd/U/cS5z1VzqPNWdft1L7YsIKgmF4fbUPw1QiUPORC2xnQA==} + /@storybook/addon-links@7.4.0(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-lFj8fiokWKk3jx5YUQ4anQo1uCNDMP1y6nJ/92Y85vnOd1vJr3w4GlLy8eOWMABRE33AKLI5Yp6wcpWZDe7hhQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7972,22 +7671,22 @@ packages: react-dom: optional: true dependencies: - '@storybook/client-logger': 7.0.20 - '@storybook/core-events': 7.0.20 + '@storybook/client-logger': 7.4.0 + '@storybook/core-events': 7.4.0 '@storybook/csf': 0.1.1 '@storybook/global': 5.0.0 - '@storybook/manager-api': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/preview-api': 7.0.20 - '@storybook/router': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/types': 7.0.20 + '@storybook/manager-api': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/preview-api': 7.4.0 + '@storybook/router': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/types': 7.4.0 prop-types: 15.8.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) ts-dedent: 2.2.0 dev: true - /@storybook/addon-measure@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-MFuilKpVPbf/EiB5mVB8lmsogX1Uv3N5NftYh5CVoERxc1oRhSXYDrZ60xXAwn/B1PwsIL7dGE6P/KPUVSTpkA==} + /@storybook/addon-measure@7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-8YjBqm6jPOBgkRn9YnJkLN0+ghgJiukdHOa0VB3qhiT+oww4ZOZ7mc2aQRwXQoFb05UbVVG9UNxE7lhyTyaG2w==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7997,19 +7696,23 @@ packages: react-dom: optional: true dependencies: - '@storybook/client-logger': 7.0.20 - '@storybook/components': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/core-events': 7.0.20 + '@storybook/client-logger': 7.4.0 + '@storybook/components': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/core-events': 7.4.0 '@storybook/global': 5.0.0 - '@storybook/manager-api': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/preview-api': 7.0.20 - '@storybook/types': 7.0.20 + '@storybook/manager-api': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/preview-api': 7.4.0 + '@storybook/types': 7.4.0 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + tiny-invariant: 1.3.1 + transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' dev: true - /@storybook/addon-outline@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-033r2LcJsfiqDHXrwXH8k4wVLuYdAn+W3B+0+06p0hcK32jitEyXH2w176fk6JPhRgH7etzrK+nehLN8uMriWA==} + /@storybook/addon-outline@7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-CCAWFC3bfkmYPzFjOemfH/kjpqJOHt+SdJgBKmwujDy+zum0DHlUL/7rd+U32cEpezCA8bapd0hlWn59C4agHQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -8019,20 +7722,23 @@ packages: react-dom: optional: true dependencies: - '@storybook/client-logger': 7.0.20 - '@storybook/components': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/core-events': 7.0.20 + '@storybook/client-logger': 7.4.0 + '@storybook/components': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/core-events': 7.4.0 '@storybook/global': 5.0.0 - '@storybook/manager-api': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/preview-api': 7.0.20 - '@storybook/types': 7.0.20 + '@storybook/manager-api': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/preview-api': 7.4.0 + '@storybook/types': 7.4.0 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) ts-dedent: 2.2.0 + transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' dev: true - /@storybook/addon-toolbars@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-xIEpOue1MGXtr7F02PTW65mP6j+yQTMX86iSO5ESLiXpfQnrMsCRElXCJVi0iVEr0+t4lW7y+psNAKPpBQy/Aw==} + /@storybook/addon-toolbars@7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-00PDLchlQXI3ZClQHU0YQBfikAAxHOhVNv2QKW54yFKmxPl+P2c/VIeir9LcPhA04smKrJTD1u+Nszd66A9xAA==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -8042,17 +7748,20 @@ packages: react-dom: optional: true dependencies: - '@storybook/client-logger': 7.0.20 - '@storybook/components': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/manager-api': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/preview-api': 7.0.20 - '@storybook/theming': 7.0.20(react-dom@18.2.0)(react@18.2.0) + '@storybook/client-logger': 7.4.0 + '@storybook/components': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/manager-api': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/preview-api': 7.4.0 + '@storybook/theming': 7.4.0(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' dev: true - /@storybook/addon-viewport@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-M4kR2FtaELY5bkJACRROinjCB15VxyrkCPH8UiFIGffPO8Nce2fa/4+8ZVIkA27VqD0KbLvVXAZrfn/+unyySg==} + /@storybook/addon-viewport@7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-Bfoilf9eJV/C7tR8XHDxz3h8JlZ+iggoESp2Tc0bW9tlRvz+PsCqeyHhF/IgHY+gLnPal2PkK/PIM+ruO45HXA==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -8062,66 +7771,73 @@ packages: react-dom: optional: true dependencies: - '@storybook/client-logger': 7.0.20 - '@storybook/components': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/core-events': 7.0.20 + '@storybook/client-logger': 7.4.0 + '@storybook/components': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/core-events': 7.4.0 '@storybook/global': 5.0.0 - '@storybook/manager-api': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/preview-api': 7.0.20 - '@storybook/theming': 7.0.20(react-dom@18.2.0)(react@18.2.0) + '@storybook/manager-api': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/preview-api': 7.4.0 + '@storybook/theming': 7.4.0(react-dom@18.2.0)(react@18.2.0) memoizerific: 1.11.3 prop-types: 15.8.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) + transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' dev: true - /@storybook/blocks@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-DIKJ8fyuG8Lz5Anp21EZ/dKa0UhMbrRINskxUpInQZ51dgsEYc/0ENp8hm0XmbxdF58BlT8nsEIjIpCc9ZAbVQ==} + /@storybook/blocks@7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-YQznNjJm+l32fCfPxrZso9+MbcyG0pWZSpx3RKI1+pxDMsAs4mbXsIw4//jKfjoDP/6/Cz/FJcSx8LT7i4BJ2w==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: - '@storybook/channels': 7.0.20 - '@storybook/client-logger': 7.0.20 - '@storybook/components': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/core-events': 7.0.20 + '@storybook/channels': 7.4.0 + '@storybook/client-logger': 7.4.0 + '@storybook/components': 7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/core-events': 7.4.0 '@storybook/csf': 0.1.1 - '@storybook/docs-tools': 7.0.20 + '@storybook/docs-tools': 7.4.0 '@storybook/global': 5.0.0 - '@storybook/manager-api': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/preview-api': 7.0.20 - '@storybook/theming': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/types': 7.0.20 - '@types/lodash': 4.14.195 + '@storybook/manager-api': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/preview-api': 7.4.0 + '@storybook/theming': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/types': 7.4.0 + '@types/lodash': 4.14.197 color-convert: 2.0.1 dequal: 2.0.3 lodash: 4.17.21 - markdown-to-jsx: 7.2.1(react@18.2.0) + markdown-to-jsx: 7.3.2(react@18.2.0) memoizerific: 1.11.3 polished: 4.2.2 react: 18.2.0 react-colorful: 5.6.1(react-dom@18.2.0)(react@18.2.0) react-dom: 18.2.0(react@18.2.0) - telejson: 7.1.0 + telejson: 7.2.0 + tocbot: 4.21.1 ts-dedent: 2.2.0 util-deprecate: 1.0.2 transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' + - encoding - supports-color dev: true - /@storybook/builder-manager@7.0.20: - resolution: {integrity: sha512-D1k7fZnEn/G4a6Ob7JWR3IsDsI2IiI42DEoi1h3Rmx9vBwBJatRatvIJz2qUxbQ00l+F5rnnmp8uIHG3FOFf1A==} + /@storybook/builder-manager@7.4.0: + resolution: {integrity: sha512-4fuxVzBIBbZh2aVBizSOU5EJ8b74IhR6x2TAZjifZZf5Gdxgfgio8sAyrrd/C78vrFOFhFEgmQhMqZRuCLHxvQ==} dependencies: '@fal-works/esbuild-plugin-global-externals': 2.1.2 - '@storybook/core-common': 7.0.20 - '@storybook/manager': 7.0.20 - '@storybook/node-logger': 7.0.20 + '@storybook/core-common': 7.4.0 + '@storybook/manager': 7.4.0 + '@storybook/node-logger': 7.4.0 '@types/ejs': 3.1.2 '@types/find-cache-dir': 3.2.1 - '@yarnpkg/esbuild-plugin-pnp': 3.0.0-rc.15(esbuild@0.17.19) + '@yarnpkg/esbuild-plugin-pnp': 3.0.0-rc.15(esbuild@0.18.20) browser-assert: 1.2.1 ejs: 3.1.9 - esbuild: 0.17.19 + esbuild: 0.18.20 esbuild-plugin-alias: 0.2.1 express: 4.18.2 find-cache-dir: 3.3.2 @@ -8129,11 +7845,12 @@ packages: process: 0.11.10 util: 0.12.5 transitivePeerDependencies: + - encoding - supports-color dev: true - /@storybook/builder-vite@7.0.20(typescript@5.1.3)(vite@4.3.9): - resolution: {integrity: sha512-+SQMdvrqpuuYE1KGNfvGfxt0sjeshMEEXCfxvh2/iCPPIMYTEQ5WfVeEuAla+PRyXrE4JLwCZEowcZoxel1uTA==} + /@storybook/builder-vite@7.4.0(typescript@5.2.2)(vite@4.4.9): + resolution: {integrity: sha512-2hE+Q5zoSFQvmiPKsRaZWUX5v6vRaSp0+kgZo3EOg0DvAACiC/Cd+sdnv7wxigvSnVRMbWvBVguPyePRjke8KA==} peerDependencies: '@preact/preset-vite': '*' typescript: '>= 4.3.x' @@ -8147,87 +7864,61 @@ packages: vite-plugin-glimmerx: optional: true dependencies: - '@storybook/channel-postmessage': 7.0.20 - '@storybook/channel-websocket': 7.0.20 - '@storybook/client-logger': 7.0.20 - '@storybook/core-common': 7.0.20 - '@storybook/csf-plugin': 7.0.20 + '@storybook/channels': 7.4.0 + '@storybook/client-logger': 7.4.0 + '@storybook/core-common': 7.4.0 + '@storybook/csf-plugin': 7.4.0 '@storybook/mdx2-csf': 1.1.0 - '@storybook/node-logger': 7.0.20 - '@storybook/preview': 7.0.20 - '@storybook/preview-api': 7.0.20 - '@storybook/types': 7.0.20 + '@storybook/node-logger': 7.4.0 + '@storybook/preview': 7.4.0 + '@storybook/preview-api': 7.4.0 + '@storybook/types': 7.4.0 + '@types/find-cache-dir': 3.2.1 browser-assert: 1.2.1 es-module-lexer: 0.9.3 express: 4.18.2 + find-cache-dir: 3.3.2 fs-extra: 11.1.1 - glob: 8.1.0 - glob-promise: 6.0.2(glob@8.1.0) - magic-string: 0.27.0 + magic-string: 0.30.3 remark-external-links: 8.0.0 remark-slug: 6.1.0 - rollup: 3.25.3 - typescript: 5.1.3 - vite: 4.3.9(@types/node@18.16.18) + rollup: 3.28.1 + typescript: 5.2.2 + vite: 4.4.9(@types/node@18.17.13) transitivePeerDependencies: + - encoding - supports-color dev: true - /@storybook/channel-postmessage@7.0.20: - resolution: {integrity: sha512-GhVI40gbCnq20+Wjk/f8RD/T4gruLNKCjuwTnCAoKIQpMOVAB6ddx0469f9lF5tAha6alZn0MLk5CXPK8LAn5w==} - dependencies: - '@storybook/channels': 7.0.20 - '@storybook/client-logger': 7.0.20 - '@storybook/core-events': 7.0.20 - '@storybook/global': 5.0.0 - qs: 6.11.2 - telejson: 7.1.0 - dev: true - - /@storybook/channel-postmessage@7.0.24: - resolution: {integrity: sha512-QLtLXjEeTEwBN/7pB888mBaykmRU9Jy2BitvZuLJWyHHygTYm3vYZOaGR37DT+q/6Ob5GaZ0tURZmCSNDe8IIA==} + /@storybook/channels@7.4.0: + resolution: {integrity: sha512-/1CU0s3npFumzVHLGeubSyPs21O3jNqtSppOjSB9iDTyV2GtQrjh5ntVwebfKpCkUSitx3x7TkCb9dylpEZ8+w==} dependencies: - '@storybook/channels': 7.0.24 - '@storybook/client-logger': 7.0.24 - '@storybook/core-events': 7.0.24 + '@storybook/client-logger': 7.4.0 + '@storybook/core-events': 7.4.0 '@storybook/global': 5.0.0 qs: 6.11.2 - telejson: 7.1.0 - dev: true - - /@storybook/channel-websocket@7.0.20: - resolution: {integrity: sha512-nzpnvUAdOgEn1FhUlaTl/ImSoiRJQs1UmLPxDtqAOGo01W+GIlj17Y+0TYCaG3EJoRVv59XPIrqywut2o6j40Q==} - dependencies: - '@storybook/channels': 7.0.20 - '@storybook/client-logger': 7.0.20 - '@storybook/global': 5.0.0 - telejson: 7.1.0 - dev: true - - /@storybook/channels@7.0.20: - resolution: {integrity: sha512-AL5GGSQ8WTDUoh3gitKEzo3fu7Vq5okXq2pAknAZlQA2Oio+HHO5nMeXvOfGdvo/tzbpNE3n5utmCJz006xrCA==} - dev: true - - /@storybook/channels@7.0.24: - resolution: {integrity: sha512-NZVLwMhtzy6cZrNRjshFvMAD9mQTmJDNwhohodSkM/YFCDVFhmxQk9tgizVGh9MwY3CYGJ1SI96RUejGosb49Q==} + telejson: 7.2.0 + tiny-invariant: 1.3.1 dev: true - /@storybook/cli@7.0.20: - resolution: {integrity: sha512-ZYBJL1d7nWXQok7SriF18h0YPO38Eu1YxR8b1VHgOZYKZhuQmtvhmjMTSgpoGjnynNkEaV3fvm6+KYTjSqYcnw==} + /@storybook/cli@7.4.0: + resolution: {integrity: sha512-yn27cn3LzhTqpEVX6CzUz13KTJ3jPLA2eM4bO1t7SYUqpDlzw3lET9DIcYIaUAIiL+0r2Js3jW2BsyN/5KmO5w==} hasBin: true dependencies: - '@babel/core': 7.22.5 - '@babel/preset-env': 7.22.5(@babel/core@7.22.5) + '@babel/core': 7.22.11 + '@babel/preset-env': 7.22.14(@babel/core@7.22.11) + '@babel/types': 7.22.11 '@ndelangen/get-tarball': 3.0.9 - '@storybook/codemod': 7.0.20 - '@storybook/core-common': 7.0.20 - '@storybook/core-server': 7.0.20 - '@storybook/csf-tools': 7.0.20 - '@storybook/node-logger': 7.0.20 - '@storybook/telemetry': 7.0.20 - '@storybook/types': 7.0.20 - '@types/semver': 7.5.0 - boxen: 5.1.2 + '@storybook/codemod': 7.4.0 + '@storybook/core-common': 7.4.0 + '@storybook/core-server': 7.4.0 + '@storybook/csf-tools': 7.4.0 + '@storybook/node-logger': 7.4.0 + '@storybook/telemetry': 7.4.0 + '@storybook/types': 7.4.0 + '@types/semver': 7.5.1 + '@yarnpkg/fslib': 2.10.3 + '@yarnpkg/libzip': 2.3.0 chalk: 4.1.2 commander: 6.2.1 cross-spawn: 7.0.3 @@ -8241,16 +7932,15 @@ packages: get-port: 5.1.1 giget: 1.1.2 globby: 11.1.0 - jscodeshift: 0.14.0(@babel/preset-env@7.22.5) + jscodeshift: 0.14.0(@babel/preset-env@7.22.14) leven: 3.1.0 ora: 5.4.1 prettier: 2.8.8 prompts: 2.4.2 puppeteer-core: 2.1.1 read-pkg-up: 7.0.1 - semver: 7.5.3 - shelljs: 0.8.5 - simple-update-notifier: 1.1.0 + semver: 7.5.4 + simple-update-notifier: 2.0.0 strip-json-comments: 3.1.1 tempy: 1.0.1 ts-dedent: 2.2.0 @@ -8262,121 +7952,122 @@ packages: - utf-8-validate dev: true - /@storybook/client-logger@7.0.20: - resolution: {integrity: sha512-h0maWgvrhoDVALrbQ6ZFF0/7koVAazMbqWLmV/SF4JB2cBSgfgO0gmrCmKzUAe+KOABK/TMQTEQc1S1js0Dorw==} - dependencies: - '@storybook/global': 5.0.0 - dev: true - - /@storybook/client-logger@7.0.24: - resolution: {integrity: sha512-4zRTb+QQ1hWaRqad/UufZNRfi2d/cf5a40My72Ct97VwjhJFE6aQ3K+hl1Xt6hh8dncDL2JK3cgziw6ElqjT0w==} + /@storybook/client-logger@7.4.0: + resolution: {integrity: sha512-4pBnf7+df1wXEVcF1civqxbrtccGGHQkfWQkJo49s53RXvF7SRTcif6XTx0V3cQV0v7I1C5mmLm0LNlmjPRP1Q==} dependencies: '@storybook/global': 5.0.0 dev: true - /@storybook/codemod@7.0.20: - resolution: {integrity: sha512-ZyxtYxp+1yEV0Z7qGeov/neeE9yYEOzobNuHDJ/nA0HNrXkeIolmvb9TFhSpOiSxRdHJhpBQG/U76KZMdAhNdw==} + /@storybook/codemod@7.4.0: + resolution: {integrity: sha512-XqNhv5bec+L7TJ5tXdsMalmJazwaFMVVxoNlnb0f9zKhovAEF2F6hl6+Pnd2avRomH9+1q7EM+GwrTCAvzAfzg==} dependencies: - '@babel/core': 7.21.8 - '@babel/preset-env': 7.21.5(@babel/core@7.21.8) - '@babel/types': 7.21.5 + '@babel/core': 7.22.11 + '@babel/preset-env': 7.22.14(@babel/core@7.22.11) + '@babel/types': 7.22.11 '@storybook/csf': 0.1.1 - '@storybook/csf-tools': 7.0.20 - '@storybook/node-logger': 7.0.20 - '@storybook/types': 7.0.20 + '@storybook/csf-tools': 7.4.0 + '@storybook/node-logger': 7.4.0 + '@storybook/types': 7.4.0 + '@types/cross-spawn': 6.0.2 cross-spawn: 7.0.3 globby: 11.1.0 - jscodeshift: 0.14.0(@babel/preset-env@7.21.5) + jscodeshift: 0.14.0(@babel/preset-env@7.22.14) lodash: 4.17.21 prettier: 2.8.8 - recast: 0.23.2 + recast: 0.23.4 transitivePeerDependencies: - supports-color dev: true - /@storybook/components@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-eoEtby/yVkvUKpXfktibxPOhR5UBsWnKRWQUNSxN0vYTG4iBBh3HdjgxFJYfSXV13J+6OfvpBPLlPC+enXrbrQ==} + /@storybook/components@7.4.0(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-GGnQrI4NXwri/PqNjhO1vNv4tC7RBjY87ce9WHBq1ueat3kBakdqV97NzScoldXarkkKK6grBqmhw9jE5PfzhQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: - '@storybook/client-logger': 7.0.20 + '@radix-ui/react-select': 1.2.2(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-toolbar': 1.0.4(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@storybook/client-logger': 7.4.0 '@storybook/csf': 0.1.1 '@storybook/global': 5.0.0 - '@storybook/theming': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/types': 7.0.20 + '@storybook/theming': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/types': 7.4.0 memoizerific: 1.11.3 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) use-resize-observer: 9.1.0(react-dom@18.2.0)(react@18.2.0) util-deprecate: 1.0.2 + transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' dev: true - /@storybook/core-client@7.0.20: - resolution: {integrity: sha512-POKAxwwbX+nDiqpVDjrV0H+GFmEg1IcmUWnmiE69n9GibX6zwGh3plJDKb+y0nK8eR4SRgLe8PovMEO/+W/xsw==} + /@storybook/core-client@7.4.0: + resolution: {integrity: sha512-AhysJS2HnydB8Jc+BMVzK5VLHa1liJjxroNsd+ZTgGUhD7R8wvozrswQgY4MLFtcaLwN/wDWlK2YavSBqmc94Q==} dependencies: - '@storybook/client-logger': 7.0.20 - '@storybook/preview-api': 7.0.20 + '@storybook/client-logger': 7.4.0 + '@storybook/preview-api': 7.4.0 dev: true - /@storybook/core-common@7.0.20: - resolution: {integrity: sha512-4uh/zMs884rlYSfPEzsZy8Z7lchitZTKI6031gigEMBBgdYZ1eHqwz91YfQK7e2dFKjxfw2y9HS1yRI57RJrQg==} + /@storybook/core-common@7.4.0: + resolution: {integrity: sha512-QKrBL46ZFdfTjlZE3f7b59Q5+frOHWIJ64sC9BZ2PHkZkGjFeYRDdJJ6EHLYBb+nToynl33dYN1GQz+hQn2vww==} dependencies: - '@storybook/node-logger': 7.0.20 - '@storybook/types': 7.0.20 - '@types/node': 16.18.23 + '@storybook/node-logger': 7.4.0 + '@storybook/types': 7.4.0 + '@types/find-cache-dir': 3.2.1 + '@types/node': 16.18.47 + '@types/node-fetch': 2.6.4 '@types/pretty-hrtime': 1.0.1 chalk: 4.1.2 - esbuild: 0.17.19 - esbuild-register: 3.4.2(esbuild@0.17.19) - file-system-cache: 2.4.1 + esbuild: 0.18.20 + esbuild-register: 3.4.2(esbuild@0.18.20) + file-system-cache: 2.3.0 + find-cache-dir: 3.3.2 find-up: 5.0.0 fs-extra: 11.1.1 - glob: 8.1.0 - glob-promise: 6.0.2(glob@8.1.0) - handlebars: 4.7.7 + glob: 10.3.4 + handlebars: 4.7.8 lazy-universal-dotenv: 4.0.0 + node-fetch: 2.7.0 picomatch: 2.3.1 pkg-dir: 5.0.0 pretty-hrtime: 1.0.3 resolve-from: 5.0.0 ts-dedent: 2.2.0 transitivePeerDependencies: + - encoding - supports-color dev: true - /@storybook/core-events@7.0.20: - resolution: {integrity: sha512-gUBQsbcDmRufmg8LdH7D57c/9BQ+cPi2vBcXdudmxeJFafGwDmLRu1mlv9rxlW4kicn/LZWJjKXtq4XXzF4OGg==} - dev: true - - /@storybook/core-events@7.0.24: - resolution: {integrity: sha512-xkf/rihCkhqMeh5EA8lVp90/mzbb2gcg6I3oeFWw2hognVcTnPXg6llhWdU4Spqd0cals7GEFmQugIILCmH8GA==} + /@storybook/core-events@7.4.0: + resolution: {integrity: sha512-JavEo4dw7TQdF5pSKjk4RtqLgsG2R/eWRI8vZ3ANKa0ploGAnQR/eMTfSxf6TUH3ElBWLJhi+lvUCkKXPQD+dw==} + dependencies: + ts-dedent: 2.2.0 dev: true - /@storybook/core-server@7.0.20: - resolution: {integrity: sha512-hNKwi5QZMhfeqw8+UmU6hCIIQfTC5r1ItaKZIeF43HnSt4hNKoA9fHu1UCS5UA56KddBxSAPggroEF+Ah8ZHcg==} + /@storybook/core-server@7.4.0: + resolution: {integrity: sha512-AcbfXatHVx1by4R2CiPIMgjQlOL3sUbVarkhmgUcL0AWT0zC0SCQWUZdo22en+jZhAraazgXyLGNCVP7A+6Tqg==} dependencies: - '@aw-web-design/x-default-browser': 1.4.88 + '@aw-web-design/x-default-browser': 1.4.126 '@discoveryjs/json-ext': 0.5.7 - '@storybook/builder-manager': 7.0.20 - '@storybook/core-common': 7.0.20 - '@storybook/core-events': 7.0.20 + '@storybook/builder-manager': 7.4.0 + '@storybook/channels': 7.4.0 + '@storybook/core-common': 7.4.0 + '@storybook/core-events': 7.4.0 '@storybook/csf': 0.1.1 - '@storybook/csf-tools': 7.0.20 + '@storybook/csf-tools': 7.4.0 '@storybook/docs-mdx': 0.1.0 '@storybook/global': 5.0.0 - '@storybook/manager': 7.0.20 - '@storybook/node-logger': 7.0.20 - '@storybook/preview-api': 7.0.20 - '@storybook/telemetry': 7.0.20 - '@storybook/types': 7.0.20 + '@storybook/manager': 7.4.0 + '@storybook/node-logger': 7.4.0 + '@storybook/preview-api': 7.4.0 + '@storybook/telemetry': 7.4.0 + '@storybook/types': 7.4.0 '@types/detect-port': 1.3.3 - '@types/node': 16.18.23 - '@types/node-fetch': 2.6.4 + '@types/node': 16.18.47 '@types/pretty-hrtime': 1.0.1 - '@types/semver': 7.5.0 - better-opn: 2.1.1 - boxen: 5.1.2 + '@types/semver': 7.5.1 + better-opn: 3.0.2 chalk: 4.1.2 cli-table3: 0.6.3 compression: 1.7.4 @@ -8386,15 +8077,16 @@ packages: globby: 11.1.0 ip: 2.0.0 lodash: 4.17.21 - node-fetch: 2.6.12 - open: 8.4.0 + open: 8.4.2 pretty-hrtime: 1.0.3 prompts: 2.4.2 read-pkg-up: 7.0.1 - semver: 7.5.3 + semver: 7.5.4 serve-favicon: 2.5.0 - telejson: 7.1.0 + telejson: 7.2.0 + tiny-invariant: 1.3.1 ts-dedent: 2.2.0 + util: 0.12.5 util-deprecate: 1.0.2 watchpack: 2.4.0 ws: 8.13.0 @@ -8405,26 +8097,26 @@ packages: - utf-8-validate dev: true - /@storybook/csf-plugin@7.0.20: - resolution: {integrity: sha512-jxEZN2Hf4qpALzDXX3gKy7c0nUM4BfDiAnUqTeJIks6nFUOF00qoU1qNqJzYScH1AXI9J7LwXJ6n8b0DSW/H3Q==} + /@storybook/csf-plugin@7.4.0: + resolution: {integrity: sha512-X1L3l/dpz2UYjCEQlFLkW7w1A13pmzDZpJ0lotkV79PALlakMXBeoX3I2E0VMjJATV8wC9RSj56COBAs6HsPeg==} dependencies: - '@storybook/csf-tools': 7.0.20 - unplugin: 0.10.2 + '@storybook/csf-tools': 7.4.0 + unplugin: 1.4.0 transitivePeerDependencies: - supports-color dev: true - /@storybook/csf-tools@7.0.20: - resolution: {integrity: sha512-m68wLgN5G7XIChQrjeILBYu+4TVHfllIrIJXMZ3Gi+iplOCHsQLfA6Oa0VtTB09Ol5K2StdMHjBCoR6HfHzsXA==} + /@storybook/csf-tools@7.4.0: + resolution: {integrity: sha512-bKyOmWPyvT50Neq2wCRr2PmVGLVVm6pOw8WL5t5jueD8sRRzo9QdfhEkqmuSyqdsBdt3SiJKL5oA6dqY5Vl9ww==} dependencies: - '@babel/generator': 7.21.9 - '@babel/parser': 7.21.9 - '@babel/traverse': 7.21.5 - '@babel/types': 7.21.5 + '@babel/generator': 7.22.10 + '@babel/parser': 7.22.14 + '@babel/traverse': 7.22.11 + '@babel/types': 7.22.11 '@storybook/csf': 0.1.1 - '@storybook/types': 7.0.20 + '@storybook/types': 7.4.0 fs-extra: 11.1.1 - recast: 0.23.2 + recast: 0.23.4 ts-dedent: 2.2.0 transitivePeerDependencies: - supports-color @@ -8440,17 +8132,17 @@ packages: resolution: {integrity: sha512-JDaBR9lwVY4eSH5W8EGHrhODjygPd6QImRbwjAuJNEnY0Vw4ie3bPkeGfnacB3OBW6u/agqPv2aRlR46JcAQLg==} dev: true - /@storybook/docs-tools@7.0.20: - resolution: {integrity: sha512-9MfQaIseC6fzU5McyBOYiVNHa4wiyVyNMG+rOgdDI4Q+JZDRm9wgf+mtB5Uc8bZZZJRUTxSKJwqeFlxn9zTJgA==} + /@storybook/docs-tools@7.4.0: + resolution: {integrity: sha512-DzXmt4JorAOePoS+sjQznf8jLPI9D5mdB1eSXjfvmGBQyyehKTZv5+TXuxYvT3iPN4rW4OPrIrQCSIrbULFdwA==} dependencies: - '@babel/core': 7.22.5 - '@storybook/core-common': 7.0.20 - '@storybook/preview-api': 7.0.20 - '@storybook/types': 7.0.20 + '@storybook/core-common': 7.4.0 + '@storybook/preview-api': 7.4.0 + '@storybook/types': 7.4.0 '@types/doctrine': 0.0.3 doctrine: 3.0.0 lodash: 4.17.21 transitivePeerDependencies: + - encoding - supports-color dev: true @@ -8458,103 +8150,67 @@ packages: resolution: {integrity: sha512-FcOqPAXACP0I3oJ/ws6/rrPT9WGhu915Cg8D02a9YxLo0DE9zI+a9A5gRGvmQ09fiWPukqI8ZAEoQEdWUKMQdQ==} dev: true - /@storybook/instrumenter@7.0.20: - resolution: {integrity: sha512-TQW/4LJOV2Rok8HH0/AiD9TRDdGaCcCDI34r394frNL61tprrSkT7+ASul68U3c2yuddL9mfrbacr7AzVuf2rA==} - dependencies: - '@storybook/channels': 7.0.20 - '@storybook/client-logger': 7.0.20 - '@storybook/core-events': 7.0.20 - '@storybook/global': 5.0.0 - '@storybook/preview-api': 7.0.20 - dev: true - - /@storybook/instrumenter@7.0.24: - resolution: {integrity: sha512-XQ4Whq0rqW9eFMTtRpLxcl6bCf+KO3UZYcm+H63EDn9TstDyopmqv1fDg2tmJOpqLo143F8qLVC89rI7M/lO6w==} + /@storybook/instrumenter@7.4.0: + resolution: {integrity: sha512-jZKxLK0lGKxY8LEul6GP7s+PDlNuXT4JU6MnPY9+SVSo23lP0pAOxo/ojV8WTLf48tcoyL3ztSfbYhxnaJvBfw==} dependencies: - '@storybook/channels': 7.0.24 - '@storybook/client-logger': 7.0.24 - '@storybook/core-events': 7.0.24 + '@storybook/channels': 7.4.0 + '@storybook/client-logger': 7.4.0 + '@storybook/core-events': 7.4.0 '@storybook/global': 5.0.0 - '@storybook/preview-api': 7.0.24 + '@storybook/preview-api': 7.4.0 dev: true - /@storybook/manager-api@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-/f4L63SWcj4OCck8hdKItnlq/QDZAF6fn4QDLdqXNhPsoi+G6YUMVBX23bW0ygyTM0nrOoAPLVP934H33Xb9Bg==} + /@storybook/manager-api@7.4.0(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-sBfkkt0eZGTozeKrbzMtWLEOQrgqdk24OUJlkc2IDaucR1CBNjoCMjNeYg7cLDw0rXE8W3W3AdWtJnfsUbLMAQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: - '@storybook/channels': 7.0.20 - '@storybook/client-logger': 7.0.20 - '@storybook/core-events': 7.0.20 + '@storybook/channels': 7.4.0 + '@storybook/client-logger': 7.4.0 + '@storybook/core-events': 7.4.0 '@storybook/csf': 0.1.1 '@storybook/global': 5.0.0 - '@storybook/router': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/theming': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/types': 7.0.20 + '@storybook/router': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/theming': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/types': 7.4.0 dequal: 2.0.3 lodash: 4.17.21 memoizerific: 1.11.3 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - semver: 7.5.3 + semver: 7.5.4 store2: 2.14.2 - telejson: 7.1.0 + telejson: 7.2.0 ts-dedent: 2.2.0 dev: true - /@storybook/manager@7.0.20: - resolution: {integrity: sha512-m79G2FMCIBQlF5FtnCoPP3B0Uy79SWmYLSTMmK/a2d5MS26d7eNOVT1W6httPMZlgy26/OjO7JcQVQsliQ4nxw==} + /@storybook/manager@7.4.0: + resolution: {integrity: sha512-uOSdPBEBKg8WORUZ5HKHb4KnKcTyA5j5Q8MWy/NBaRd22JR3fQkZiKuHer9WJIOQTU+fb6KDmzhZbCTKg5Euog==} dev: true /@storybook/mdx2-csf@1.1.0: resolution: {integrity: sha512-TXJJd5RAKakWx4BtpwvSNdgTDkKM6RkXU8GK34S/LhidQ5Pjz3wcnqb0TxEkfhK/ztbP8nKHqXFwLfa2CYkvQw==} dev: true - /@storybook/node-logger@7.0.20: - resolution: {integrity: sha512-CibPbHs7ELVtx7++5OGHL13lMG0vKEBGBBcb3FJFgf5fLYOor3jJ/xbiUZpfdg34mwzXHTVUi7o4MMMd4nVe+g==} - dependencies: - '@types/npmlog': 4.1.4 - chalk: 4.1.2 - npmlog: 5.0.1 - pretty-hrtime: 1.0.3 - dev: true - - /@storybook/postinstall@7.0.20: - resolution: {integrity: sha512-Aj+42Ld3fo0IGMEU3aqnrsFgK6V3EGmN07hS08PsY1g7RLBC0Xm6l0jMvehidNEyZWwUEXVro136bdnJVKnOKg==} + /@storybook/node-logger@7.4.0: + resolution: {integrity: sha512-tWSWkYyAvp6SxjIBaTklg29avzv/3Lv4c0dOG2o5tz79PyZkq9v6sQtwLLoI8EJA9Mo8Z08vaJp8NZyDQ9RCuA==} dev: true - /@storybook/preview-api@7.0.20: - resolution: {integrity: sha512-obtzMnI8X1GkOFivHUHsvXu8B0Lr/EECF+y35La1puGKbugviKj/k5vip2rlXmTDuqlxjexHZQOFz4n9NIeHiw==} - dependencies: - '@storybook/channel-postmessage': 7.0.20 - '@storybook/channels': 7.0.20 - '@storybook/client-logger': 7.0.20 - '@storybook/core-events': 7.0.20 - '@storybook/csf': 0.1.1 - '@storybook/global': 5.0.0 - '@storybook/types': 7.0.20 - '@types/qs': 6.9.7 - dequal: 2.0.3 - lodash: 4.17.21 - memoizerific: 1.11.3 - qs: 6.11.2 - synchronous-promise: 2.0.17 - ts-dedent: 2.2.0 - util-deprecate: 1.0.2 + /@storybook/postinstall@7.4.0: + resolution: {integrity: sha512-ZVBZggqkuj7ysfuHSCd/J7ovWV06zY9uWf+VU+Zw7ZeojDT8QHFrCurPsN7D9679j9vRU1/kSzqvAiStALS33g==} dev: true - /@storybook/preview-api@7.0.24: - resolution: {integrity: sha512-psycU07tuB5nyJvfAJiDN/9e8cjOdJ+5lrCSYC3vPzH86LxADDIN0/8xFb1CaQWcXZsADEFJGpHKWbRhjym5ew==} + /@storybook/preview-api@7.4.0: + resolution: {integrity: sha512-ndXO0Nx+eE7ktVE4EqHpQZ0guX7yYBdruDdJ7B739C0+OoPWsJN7jAzUqq0NXaBcYrdaU5gTy+KnWJUt8R+OyA==} dependencies: - '@storybook/channel-postmessage': 7.0.24 - '@storybook/channels': 7.0.24 - '@storybook/client-logger': 7.0.24 - '@storybook/core-events': 7.0.24 + '@storybook/channels': 7.4.0 + '@storybook/client-logger': 7.4.0 + '@storybook/core-events': 7.4.0 '@storybook/csf': 0.1.1 '@storybook/global': 5.0.0 - '@storybook/types': 7.0.24 - '@types/qs': 6.9.7 + '@storybook/types': 7.4.0 + '@types/qs': 6.9.8 dequal: 2.0.3 lodash: 4.17.21 memoizerific: 1.11.3 @@ -8564,12 +8220,12 @@ packages: util-deprecate: 1.0.2 dev: true - /@storybook/preview@7.0.20: - resolution: {integrity: sha512-ayC7Aud0WM91ki+UM/CInd3GbGPmkUaeT6fqs9zvH8H4QQGznr9E8sI9IUQN0dbpGWayZn0m7Ma89EHwpWOwiw==} + /@storybook/preview@7.4.0: + resolution: {integrity: sha512-R4LMTvUrVAbcUetRbAXpY3frkwD0eysqHrByiR73040+ngzDwtZOBAy0JfO3jw3WrWv2dn3kWlao5aEwVc9Exw==} dev: true - /@storybook/react-dom-shim@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-/TpK3WZFQ/wV3Z1sCYf5PN+u2XdncozE+wHdoXO0FYr3BY3w0BOeMLg6DauX9Nlbs8nh0RiIvck/sm/eBZH+qA==} + /@storybook/react-dom-shim@7.4.0(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-TLpb8a2hnWJoRLqoXpMADh82BFfRZll6JI2Waf1FjnvJ4SF9eS0zBbxybrjW3lFAHWy2XJi+rwcK8FiPj0iBoQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -8578,34 +8234,36 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: true - /@storybook/react-vite@7.0.20(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.3)(vite@4.3.9): - resolution: {integrity: sha512-BUIhMD6bxIJ+LTocRyiqfg9Y8HraQDyhSWTIonBjRoIxjCkVhJ3QHQkEy6P+0cerWsntTD2/Gwmq1o1Vzl/6Sw==} + /@storybook/react-vite@7.4.0(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2)(vite@4.4.9): + resolution: {integrity: sha512-ps1FUyD2j0plCSprBI8z6RvavMvcDarIMFNofV48vSjVFzenRmgJfSbYywTnw7NusplJyZlYqldHreDzwVX1dQ==} engines: {node: '>=16'} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 vite: ^3.0.0 || ^4.0.0 dependencies: - '@joshwooding/vite-plugin-react-docgen-typescript': 0.2.1(typescript@5.1.3)(vite@4.3.9) - '@rollup/pluginutils': 4.2.1 - '@storybook/builder-vite': 7.0.20(typescript@5.1.3)(vite@4.3.9) - '@storybook/react': 7.0.20(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.3) - '@vitejs/plugin-react': 3.1.0(vite@4.3.9) + '@joshwooding/vite-plugin-react-docgen-typescript': 0.2.1(typescript@5.2.2)(vite@4.4.9) + '@rollup/pluginutils': 5.0.4 + '@storybook/builder-vite': 7.4.0(typescript@5.2.2)(vite@4.4.9) + '@storybook/react': 7.4.0(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2) + '@vitejs/plugin-react': 3.1.0(vite@4.4.9) ast-types: 0.14.2 - magic-string: 0.27.0 + magic-string: 0.30.3 react: 18.2.0 react-docgen: 6.0.0-alpha.3 react-dom: 18.2.0(react@18.2.0) - vite: 4.3.9(@types/node@18.16.18) + vite: 4.4.9(@types/node@18.17.13) transitivePeerDependencies: - '@preact/preset-vite' + - encoding + - rollup - supports-color - typescript - vite-plugin-glimmerx dev: true - /@storybook/react@7.0.20(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.3): - resolution: {integrity: sha512-5F7ENxlAgUMzYu8W4OThn01P5zMPg/4Th/ekeSGJvAzR8OwwNNzHG9tKmu29cz8unmQqCSxkwaC63N1nm4YaBQ==} + /@storybook/react@7.4.0(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2): + resolution: {integrity: sha512-QWsFw/twsNkcWI6brW06sugQQ5dV+fJm4IrEeI28cA4cBHK9G9HKOwCHoXDUWikzZx48XYMpNfs/WyIkuGmEqg==} engines: {node: '>=16.0.0'} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -8615,16 +8273,16 @@ packages: typescript: optional: true dependencies: - '@storybook/client-logger': 7.0.20 - '@storybook/core-client': 7.0.20 - '@storybook/docs-tools': 7.0.20 + '@storybook/client-logger': 7.4.0 + '@storybook/core-client': 7.4.0 + '@storybook/docs-tools': 7.4.0 '@storybook/global': 5.0.0 - '@storybook/preview-api': 7.0.20 - '@storybook/react-dom-shim': 7.0.20(react-dom@18.2.0)(react@18.2.0) - '@storybook/types': 7.0.20 + '@storybook/preview-api': 7.4.0 + '@storybook/react-dom-shim': 7.4.0(react-dom@18.2.0)(react@18.2.0) + '@storybook/types': 7.4.0 '@types/escodegen': 0.0.6 '@types/estree': 0.0.51 - '@types/node': 16.0.0 + '@types/node': 16.18.47 acorn: 7.4.1 acorn-jsx: 5.3.2(acorn@7.4.1) acorn-walk: 7.2.0 @@ -8637,36 +8295,36 @@ packages: react-element-to-jsx-string: 15.0.0(react-dom@18.2.0)(react@18.2.0) ts-dedent: 2.2.0 type-fest: 2.19.0 - typescript: 5.1.3 + typescript: 5.2.2 util-deprecate: 1.0.2 transitivePeerDependencies: + - encoding - supports-color dev: true - /@storybook/router@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-Nzyy62hlP4QR3Dub2/PBqi2E7NjKUd1HBEMXFg2ggWF7ak2h9M1iPI0gGk6sUuC5NBVzYP20eF9wrz3Fe9eq8Q==} + /@storybook/router@7.4.0(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-IATdtFL5C3ryjNQSwaQfrmiOZiVFoVNMevMoBGDC++g0laSW40TGiNK6fUjUDBKuOgbuDt4Svfbl29k21GefEg==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: - '@storybook/client-logger': 7.0.20 + '@storybook/client-logger': 7.4.0 memoizerific: 1.11.3 qs: 6.11.2 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: true - /@storybook/telemetry@7.0.20: - resolution: {integrity: sha512-yCNPtu7yrFiBgriaM6Mq68871hTGbDmuiwAF4TXWnpEygtBKFpUomKcwVHGf8Fsc3xdXGl5m6uTfAPseWxfaVA==} + /@storybook/telemetry@7.4.0: + resolution: {integrity: sha512-oxCB3kIbpiDWuXEtQhk/j6t1/h0KKWAuvxmcwGPxwhEvj/uNtoM+f1qhoDID9waxNo4AccU9Px+1ZJQ+2ejcDg==} dependencies: - '@storybook/client-logger': 7.0.20 - '@storybook/core-common': 7.0.20 + '@storybook/client-logger': 7.4.0 + '@storybook/core-common': 7.4.0 + '@storybook/csf-tools': 7.4.0 chalk: 4.1.2 detect-package-manager: 2.0.1 fetch-retry: 5.0.6 fs-extra: 11.1.1 - isomorphic-unfetch: 3.1.0 - nanoid: 3.3.6 read-pkg-up: 7.0.1 transitivePeerDependencies: - encoding @@ -8676,47 +8334,39 @@ packages: /@storybook/testing-library@0.1.0: resolution: {integrity: sha512-g947f4LJZw3IluBhysMKLJXByAFiSxnGuooENqU+ZPt/GTrz1I9GDBlhmoTJahuFkVbwHvziAl/8riY2Re921g==} dependencies: - '@storybook/client-logger': 7.0.24 - '@storybook/instrumenter': 7.0.24 + '@storybook/client-logger': 7.4.0 + '@storybook/instrumenter': 7.4.0 '@testing-library/dom': 8.20.1 '@testing-library/user-event': 13.5.0(@testing-library/dom@8.20.1) ts-dedent: 2.2.0 dev: true - /@storybook/theming@7.0.20(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-qmo/RKygt7W+NoHCfszChhSOFKe7eNeGzax4YR7yeX3brTzUQqGnb0onGv7MPtoCPhMFpbktK80u4biZtC7XhQ==} + /@storybook/theming@7.4.0(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-eLjEf6G3cqlegfutF/iUrec9LrUjKDj7K4ZhGdACWrf7bQcODs99EK62e9/d8GNKr4b+QMSEuM6XNGaqdPnuzQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) - '@storybook/client-logger': 7.0.20 + '@storybook/client-logger': 7.4.0 '@storybook/global': 5.0.0 memoizerific: 1.11.3 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: true - /@storybook/types@7.0.20: - resolution: {integrity: sha512-Z7RhHRnhrPd2jXPZtjbOILj1QgylqlsD3cFIYMcSz3yvUvxLRx3BKCftXyFbIuxr0QoCJE38adRp7YGO9uJnQQ==} - dependencies: - '@storybook/channels': 7.0.20 - '@types/babel__core': 7.20.1 - '@types/express': 4.17.17 - file-system-cache: 2.4.1 - dev: true - - /@storybook/types@7.0.24: - resolution: {integrity: sha512-SZh/XBHP1TT5bmEk0W52nT0v6fUnYwmZVls3da5noutdgOAiwL7TANtl41XrNjG+UDr8x0OE3PVVJi+LhwUaNA==} + /@storybook/types@7.4.0: + resolution: {integrity: sha512-XyzYkmeklywxvElPrIWLczi/PWtEdgTL6ToT3++FVxptsC2LZKS3Ue+sBcQ9xRZhkRemw4HQHwed5EW3dO8yUg==} dependencies: - '@storybook/channels': 7.0.24 + '@storybook/channels': 7.4.0 '@types/babel__core': 7.20.1 '@types/express': 4.17.17 + '@types/react': 16.14.46 file-system-cache: 2.3.0 dev: true - /@swc/core-darwin-arm64@1.3.67: - resolution: {integrity: sha512-zCT2mCkOBVNf5uJDcQ3A9KDoO1OEaGdfjsRTZTo7sejDd9AXLfJg+xgyCBBrK2jNS/uWcT21IvSv3LqKp4K8pA==} + /@swc/core-darwin-arm64@1.3.82: + resolution: {integrity: sha512-JfsyDW34gVKD3uE0OUpUqYvAD3yseEaicnFP6pB292THtLJb0IKBBnK50vV/RzEJtc1bR3g1kNfxo2PeurZTrA==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] @@ -8724,8 +8374,8 @@ packages: dev: true optional: true - /@swc/core-darwin-x64@1.3.67: - resolution: {integrity: sha512-hXTVsfTatPEec5gFVyjGj3NccKZsYj/OXyHn6XA+l3Q76lZzGm2ISHdku//XNwXu8OmJ0HhS7LPsC4XXwxXQhg==} + /@swc/core-darwin-x64@1.3.82: + resolution: {integrity: sha512-ogQWgNMq7qTpITjcP3dnzkFNj7bh6SwMr859GvtOTrE75H7L7jDWxESfH4f8foB/LGxBKiDNmxKhitCuAsZK4A==} engines: {node: '>=10'} cpu: [x64] os: [darwin] @@ -8733,8 +8383,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm-gnueabihf@1.3.67: - resolution: {integrity: sha512-l8AKL0RkDL5FRTeWMmjoz9zvAc37amxC+0rheaNwE+gZya7ObyNjnIYz5FwN+3y+z6JFU7LS2x/5f6iwruv6pg==} + /@swc/core-linux-arm-gnueabihf@1.3.82: + resolution: {integrity: sha512-7TMXG1lXlNhD0kUiEqs+YlGV4irAdBa2quuy+XI3oJf2fBK6dQfEq4xBy65B3khrorzQS3O0oDGQ+cmdpHExHA==} engines: {node: '>=10'} cpu: [arm] os: [linux] @@ -8742,8 +8392,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-gnu@1.3.67: - resolution: {integrity: sha512-S8zOB1AXEpb7kmtgMaFNeLAj01VOky4B0RNZ+uJWigdrDiFT67FeZzNHUNmNSOU0QM79G+Lie/xD/beqEw0vDg==} + /@swc/core-linux-arm64-gnu@1.3.82: + resolution: {integrity: sha512-26JkOujbzcItPAmIbD5vHJxQVy5ihcSu3YHTKwope1h28sApZdtE7S3e2G3gsZRTIdsCQkXUtAQeqHxGWWR3pw==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -8751,8 +8401,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-musl@1.3.67: - resolution: {integrity: sha512-Fex8J8ASrt13pmOr2xWh41tEeKWwXYGk3sV8L/aGHiYtIJEUi2f+RtMx3jp7LIdOD8pQptor7i5WBlfR9jhp8A==} + /@swc/core-linux-arm64-musl@1.3.82: + resolution: {integrity: sha512-8Izj9tuuMpoc3cqiPBRtwqpO1BZ/+sfZVsEhLxrbOFlcSb8LnKyMle1g3JMMUwI4EU75RGVIzZMn8A6GOKdJbA==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -8760,8 +8410,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-gnu@1.3.67: - resolution: {integrity: sha512-9bz9/bMphrv5vDg0os/d8ve0QgFpDzJgZgHUaHiGwcmfnlgdOSAaYJLIvWdcGTjZuQeV4L0m+iru357D9TXEzA==} + /@swc/core-linux-x64-gnu@1.3.82: + resolution: {integrity: sha512-0GSrIBScQwTaPv46T2qB7XnDYxndRCpwH4HMjh6FN+I+lfPUhTSJKW8AonqrqT1TbpFIgvzQs7EnTsD7AnSCow==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -8769,8 +8419,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-musl@1.3.67: - resolution: {integrity: sha512-ED0H6oLvQmhgo9zs8usmEA/lcZPGTu7K9og9K871b7HhHX0h/R+Xg2pb5KD7S/GyUHpfuopxjVROm+h6X1jMUA==} + /@swc/core-linux-x64-musl@1.3.82: + resolution: {integrity: sha512-KJUnaaepDKNzrEbwz4jv0iC3/t9x0NSoe06fnkAlhh2+NFKWKKJhVCOBTrpds8n7eylBDIXUlK34XQafjVMUdg==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -8778,8 +8428,8 @@ packages: dev: true optional: true - /@swc/core-win32-arm64-msvc@1.3.67: - resolution: {integrity: sha512-J1yFDLgPFeRtA8t5E159OXX+ww1gbkFg70yr4OP7EsOkOD1uMkuTf9yK/woHfsaVJlUYjJHzw7MkUIEgQBucqQ==} + /@swc/core-win32-arm64-msvc@1.3.82: + resolution: {integrity: sha512-TR3MHKhDYIyGyFcyl2d/p1ftceXcubAhX5wRSOdtOyr5+K/v3jbyCCqN7bbqO5o43wQVCwwR/drHleYyDZvg8Q==} engines: {node: '>=10'} cpu: [arm64] os: [win32] @@ -8787,8 +8437,8 @@ packages: dev: true optional: true - /@swc/core-win32-ia32-msvc@1.3.67: - resolution: {integrity: sha512-bK11/KtasewqHxzkjKUBXRE9MSAidbZCxrgJUd49bItG2N/DHxkwMYu8Xkh5VDHdTYWv/2idYtf/VM9Yi+53qw==} + /@swc/core-win32-ia32-msvc@1.3.82: + resolution: {integrity: sha512-ZX4HzVVt6hs84YUg70UvyBJnBOIspmQQM0iXSzBvOikk3zRoN7BnDwQH4GScvevCEBuou60+i4I6d5kHLOfh8Q==} engines: {node: '>=10'} cpu: [ia32] os: [win32] @@ -8796,8 +8446,8 @@ packages: dev: true optional: true - /@swc/core-win32-x64-msvc@1.3.67: - resolution: {integrity: sha512-GxzUU3+NA3cPcYxCxtfSQIS2ySD7Z8IZmKTVaWA9GOUQbKLyCE8H5js31u39+0op/1gNgxOgYFDoj2lUyvLCqw==} + /@swc/core-win32-x64-msvc@1.3.82: + resolution: {integrity: sha512-4mJMnex21kbQoaHeAmHnVwQN9/XAfPszJ6n9HI7SVH+aAHnbBIR0M59/b50/CJMjTj5niUGk7EwQ3nhVNOG32g==} engines: {node: '>=10'} cpu: [x64] os: [win32] @@ -8805,8 +8455,8 @@ packages: dev: true optional: true - /@swc/core@1.3.67: - resolution: {integrity: sha512-9DROjzfAEt0xt0CDkOYsWpkUPyne8fl5ggWGon049678BOM7p0R0dmaalZGAsKatG5vYP1IWSKWsKhJIubDCsQ==} + /@swc/core@1.3.82: + resolution: {integrity: sha512-jpC1a18HMH67018Ij2jh+hT7JBFu7ZKcQVfrZ8K6JuEY+kjXmbea07P9MbQUZbAe0FB+xi3CqEVCP73MebodJQ==} engines: {node: '>=10'} requiresBuild: true peerDependencies: @@ -8814,17 +8464,23 @@ packages: peerDependenciesMeta: '@swc/helpers': optional: true + dependencies: + '@swc/types': 0.1.4 optionalDependencies: - '@swc/core-darwin-arm64': 1.3.67 - '@swc/core-darwin-x64': 1.3.67 - '@swc/core-linux-arm-gnueabihf': 1.3.67 - '@swc/core-linux-arm64-gnu': 1.3.67 - '@swc/core-linux-arm64-musl': 1.3.67 - '@swc/core-linux-x64-gnu': 1.3.67 - '@swc/core-linux-x64-musl': 1.3.67 - '@swc/core-win32-arm64-msvc': 1.3.67 - '@swc/core-win32-ia32-msvc': 1.3.67 - '@swc/core-win32-x64-msvc': 1.3.67 + '@swc/core-darwin-arm64': 1.3.82 + '@swc/core-darwin-x64': 1.3.82 + '@swc/core-linux-arm-gnueabihf': 1.3.82 + '@swc/core-linux-arm64-gnu': 1.3.82 + '@swc/core-linux-arm64-musl': 1.3.82 + '@swc/core-linux-x64-gnu': 1.3.82 + '@swc/core-linux-x64-musl': 1.3.82 + '@swc/core-win32-arm64-msvc': 1.3.82 + '@swc/core-win32-ia32-msvc': 1.3.82 + '@swc/core-win32-x64-msvc': 1.3.82 + dev: true + + /@swc/types@0.1.4: + resolution: {integrity: sha512-z/G02d+59gyyUb7KYhKi9jOhicek6QD2oMaotUyG+lUkybpXoV49dY9bj7Ah5Q+y7knK2jU67UTX9FyfGzaxQg==} dev: true /@szmarczak/http-timer@5.0.1: @@ -8834,20 +8490,20 @@ packages: defer-to-connect: 2.0.1 dev: true - /@tailwindcss/forms@0.5.3(tailwindcss@3.3.2): + /@tailwindcss/forms@0.5.3(tailwindcss@3.3.3): resolution: {integrity: sha512-y5mb86JUoiUgBjY/o6FJSFZSEttfb3Q5gllE4xoKjAAD+vBrnIhE4dViwUuow3va8mpH4s9jyUbUbrRGoRdc2Q==} peerDependencies: tailwindcss: '>=3.0.0 || >= 3.0.0-alpha.1' dependencies: mini-svg-data-uri: 1.4.4 - tailwindcss: 3.3.2 + tailwindcss: 3.3.3 - /@tanstack/query-core@4.29.11: - resolution: {integrity: sha512-8C+hF6SFAb/TlFZyS9FItgNwrw4PMa7YeX+KQYe2ZAiEz6uzg6yIr+QBzPkUwZ/L0bXvGd1sufTm3wotoz+GwQ==} + /@tanstack/query-core@4.33.0: + resolution: {integrity: sha512-qYu73ptvnzRh6se2nyBIDHGBQvPY1XXl3yR769B7B6mIDD7s+EZhdlWHQ67JI6UOTFRaI7wupnTnwJ3gE0Mr/g==} dev: false - /@tanstack/react-query@4.29.12(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-zhcN6+zF6cxprxhTHQajHGlvxgK8npnp9uLe9yaWhGc6sYcPWXzyO4raL4HomUzQOPzu3jLvkriJQ7BOrDM8vA==} + /@tanstack/react-query@4.33.0(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-97nGbmDK0/m0B86BdiXzx3EW9RcDYKpnyL2+WwyuLHEgpfThYAnXFaMMmnTDuAO4bQJXEhflumIEUfKmP7ESGA==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -8858,7 +8514,7 @@ packages: react-native: optional: true dependencies: - '@tanstack/query-core': 4.29.11 + '@tanstack/query-core': 4.33.0 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) use-sync-external-store: 1.2.0(react@18.2.0) @@ -8868,8 +8524,8 @@ packages: resolution: {integrity: sha512-/DiOQ5xBxgdYRC8LNk7U+RWat0S3qRLeIw3ZIkMQ9kkVlRmwD/Eg8k8CqIpD6GW7u20JIUOfMKbxtiLutpjQ4g==} engines: {node: '>=12'} dependencies: - '@babel/code-frame': 7.22.5 - '@babel/runtime': 7.22.5 + '@babel/code-frame': 7.22.13 + '@babel/runtime': 7.22.11 '@types/aria-query': 5.0.1 aria-query: 5.1.3 chalk: 4.1.2 @@ -8882,8 +8538,8 @@ packages: resolution: {integrity: sha512-0DGPd9AR3+iDTjGoMpxIkAsUihHZ3Ai6CneU6bRRrffXMgzCdlNk43jTrD2/5LT6CBb3MWTP8v510JzYtahD2w==} engines: {node: '>=14'} dependencies: - '@babel/code-frame': 7.22.5 - '@babel/runtime': 7.22.5 + '@babel/code-frame': 7.22.13 + '@babel/runtime': 7.22.11 '@types/aria-query': 5.0.1 aria-query: 5.1.3 chalk: 4.1.2 @@ -8899,9 +8555,9 @@ packages: react: ^18.0.0 react-dom: ^18.0.0 dependencies: - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.22.11 '@testing-library/dom': 9.3.1 - '@types/react-dom': 18.2.5 + '@types/react-dom': 18.2.7 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: true @@ -8912,7 +8568,7 @@ packages: peerDependencies: '@testing-library/dom': '>=7.21.4' dependencies: - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.22.11 '@testing-library/dom': 8.20.1 dev: true @@ -8925,31 +8581,31 @@ packages: resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} - /@trpc/client@10.30.0(@trpc/server@10.30.0): - resolution: {integrity: sha512-utz0qRI4eU3QcHvBwcSONEnt5pWR3Dyk4VFJnySHysBT6GQRRpJifWX5+RxDhFK93LxcAmiirFbYXjZ40gbobw==} + /@trpc/client@10.38.1(@trpc/server@10.38.1): + resolution: {integrity: sha512-kY7ZV7Eco5SeFIGJX6OBg7AAKkiMt5+1N+GC7N1lTZszrw95ZiNgtkZ5TI6+Un4O+RqrOcqqast6MeExCoyZhQ==} peerDependencies: - '@trpc/server': 10.30.0 + '@trpc/server': 10.38.1 dependencies: - '@trpc/server': 10.30.0 + '@trpc/server': 10.38.1 - /@trpc/react-query@10.30.0(@tanstack/react-query@4.29.12)(@trpc/client@10.30.0)(@trpc/server@10.30.0)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-bJnCEsuBv/xqnT76Ur8PI3VYjfCE1MYJ6LafT9nL25Pvfq480r0MFEIF0nQ7AWDZ8hZEDE8UZuicGG1ITpyxkQ==} + /@trpc/react-query@10.38.1(@tanstack/react-query@4.33.0)(@trpc/client@10.38.1)(@trpc/server@10.38.1)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-eNmNYDzfn4Xx5R94v/Z2vmNjsLo/CpgPyRBNARcO7wLwjpzLxRPsJKNfOB92RWB+QsPJxqeBGIS1IETg2yyu7w==} peerDependencies: '@tanstack/react-query': ^4.18.0 - '@trpc/client': 10.30.0 - '@trpc/server': 10.30.0 + '@trpc/client': 10.38.1 + '@trpc/server': 10.38.1 react: '>=16.8.0' react-dom: '>=16.8.0' dependencies: - '@tanstack/react-query': 4.29.12(react-dom@18.2.0)(react@18.2.0) - '@trpc/client': 10.30.0(@trpc/server@10.30.0) - '@trpc/server': 10.30.0 + '@tanstack/react-query': 4.33.0(react-dom@18.2.0)(react@18.2.0) + '@trpc/client': 10.38.1(@trpc/server@10.38.1) + '@trpc/server': 10.38.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /@trpc/server@10.30.0: - resolution: {integrity: sha512-pRsrHCuar3fbyOdJvO4b80OMP1Tx/wOSy5Ozy6cFDFWVUmfAyIX3En5Hoysy4cmMUuCsQsfTEYQwo+OcpjzBkg==} + /@trpc/server@10.38.1: + resolution: {integrity: sha512-59mM0Jk3cnWBExSv4Z4cw/776MPwa+rcVNywnV5gyHyK/p5qHtis1b1JPYdTEQZ0zhR+6zeto14rTR51hg+Nuw==} /@tsconfig/node10@1.0.9: resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} @@ -8967,19 +8623,32 @@ packages: resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} dev: true + /@tufjs/canonical-json@1.0.0: + resolution: {integrity: sha512-QTnf++uxunWvG2z3UFNzAoQPHxnSXOwtaI3iJ+AohhV+5vONuArPjJE7aPXPVXfXJsqrVbZBu9b81AJoSd09IQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + + /@tufjs/models@1.0.4: + resolution: {integrity: sha512-qaGV9ltJP0EO25YfFUPhxRVK0evXFIAGicsVXuRim4Ed9cjPxYhNnNJ49SFmbeLgtxpslIkX317IgpfcHPVj/A==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + '@tufjs/canonical-json': 1.0.0 + minimatch: 9.0.3 + dev: true + /@types/aria-query@5.0.1: resolution: {integrity: sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==} dev: true - /@types/aws-lambda@8.10.109: - resolution: {integrity: sha512-/ME92FneNyXQzrAfcnQQlW1XkCZGPDlpi2ao1MJwecN+6SbeonKeggU8eybv1DfKli90FAVT1MlIZVXfwVuCyg==} + /@types/aws-lambda@8.10.119: + resolution: {integrity: sha512-Vqm22aZrCvCd6I5g1SvpW151jfqwTzEZ7XJ3yZ6xaZG31nUEOEyzzVImjRcsN8Wi/QyPxId/x8GTtgIbsy8kEw==} dev: false /@types/babel__core@7.20.1: resolution: {integrity: sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==} dependencies: - '@babel/parser': 7.22.5 - '@babel/types': 7.22.5 + '@babel/parser': 7.22.14 + '@babel/types': 7.22.11 '@types/babel__generator': 7.6.4 '@types/babel__template': 7.4.1 '@types/babel__traverse': 7.20.1 @@ -8988,27 +8657,27 @@ packages: /@types/babel__generator@7.6.4: resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 dev: true /@types/babel__template@7.4.1: resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} dependencies: - '@babel/parser': 7.22.5 - '@babel/types': 7.22.5 + '@babel/parser': 7.22.14 + '@babel/types': 7.22.11 dev: true /@types/babel__traverse@7.20.1: resolution: {integrity: sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 dev: true /@types/body-parser@1.19.2: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 18.16.18 + '@types/node': 18.17.13 dev: true /@types/chai-subset@1.3.3: @@ -9024,13 +8693,19 @@ packages: /@types/connect@3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.17.13 dev: true /@types/cors@2.8.13: resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.17.13 + dev: true + + /@types/cross-spawn@6.0.2: + resolution: {integrity: sha512-KuwNhp3eza+Rhu8IFI5HUXRP0LIhqH5cAjubUvGXXthh4YYBuP2ntwEX+Cz8GJoZUHlKo247wPWOfA9LYEq4cw==} + dependencies: + '@types/node': 18.17.13 dev: true /@types/d3-color@3.1.0: @@ -9043,19 +8718,19 @@ packages: '@types/d3-color': 3.1.0 dev: true - /@types/d3-selection@3.0.5: - resolution: {integrity: sha512-xCB0z3Hi8eFIqyja3vW8iV01+OHGYR2di/+e+AiOcXIOrY82lcvWW8Ke1DYE/EUVMsBl4Db9RppSBS3X1U6J0w==} + /@types/d3-selection@3.0.6: + resolution: {integrity: sha512-2ACr96USZVjXR9KMD9IWi1Epo4rSDKnUtYn6q2SPhYxykvXTw9vR77lkFNruXVg4i1tzQtBxeDMx0oNvJWbF1w==} dev: true - /@types/d3-zoom@3.0.3: - resolution: {integrity: sha512-OWk1yYIIWcZ07+igN6BeoG6rqhnJ/pYe+R1qWFM2DtW49zsoSjgb9G5xB0ZXA8hh2jAzey1XuRmMSoXdKw8MDA==} + /@types/d3-zoom@3.0.4: + resolution: {integrity: sha512-cqkuY1ah9ZQre2POqjSLcM8g40UVya/qwEUrNYP2/rCVljbmqKCVcv+ebvwhlI5azIbSEL7m+os6n+WlYA43aA==} dependencies: '@types/d3-interpolate': 3.0.1 - '@types/d3-selection': 3.0.5 + '@types/d3-selection': 3.0.6 dev: true - /@types/debug@4.1.7: - resolution: {integrity: sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==} + /@types/debug@4.1.8: + resolution: {integrity: sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==} dependencies: '@types/ms': 0.7.31 dev: true @@ -9072,6 +8747,10 @@ packages: resolution: {integrity: sha512-ZmiaE3wglXVWBM9fyVC17aGPkLo/UgaOjEiI2FXQfyczrCefORPxIe+2dVmnmk3zkVIbizjrlQzmPGhSYGXG5g==} dev: true + /@types/emscripten@1.39.7: + resolution: {integrity: sha512-tLqYV94vuqDrXh515F/FOGtBcRMTPGvVV1LzLbtYDcQmmhtpf/gLYf+hikBbQk8MzOHNz37wpFfJbYAuSn8HqA==} + dev: true + /@types/escodegen@0.0.6: resolution: {integrity: sha512-AjwI4MvWx3HAOaZqYsjKWyEObT9lcVV0Y0V8nXo6cXzN8ZiMxVhf6F3d/UNvXVGKrEzL/Dluc5p+y9GkzlTWig==} dev: true @@ -9079,12 +8758,12 @@ packages: /@types/eslint-scope@3.7.4: resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==} dependencies: - '@types/eslint': 8.40.2 + '@types/eslint': 8.44.2 '@types/estree': 1.0.1 dev: true - /@types/eslint@8.40.2: - resolution: {integrity: sha512-PRVjQ4Eh9z9pmmtaq8nTjZjQwKFk7YIHIud3lRoKRBgUQjgjRmoGxxGEPXQkF+lH7QkHJRNr5F4aBgYCW0lqpQ==} + /@types/eslint@8.44.2: + resolution: {integrity: sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg==} dependencies: '@types/estree': 1.0.1 '@types/json-schema': 7.0.12 @@ -9098,11 +8777,11 @@ packages: resolution: {integrity: sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==} dev: true - /@types/express-serve-static-core@4.17.35: - resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==} + /@types/express-serve-static-core@4.17.36: + resolution: {integrity: sha512-zbivROJ0ZqLAtMzgzIUC4oNqDG9iF0lSsAqpOD9kbs5xcIM3dTiyuHvBc7R8MtWBp3AAWGaovJa+wzWPjLYW7Q==} dependencies: - '@types/node': 18.16.18 - '@types/qs': 6.9.7 + '@types/node': 18.17.13 + '@types/qs': 6.9.8 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 dev: true @@ -9111,8 +8790,8 @@ packages: resolution: {integrity: sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==} dependencies: '@types/body-parser': 1.19.2 - '@types/express-serve-static-core': 4.17.35 - '@types/qs': 6.9.7 + '@types/express-serve-static-core': 4.17.36 + '@types/qs': 6.9.8 '@types/serve-static': 1.15.2 dev: true @@ -9124,38 +8803,39 @@ packages: resolution: {integrity: sha512-MxObHvNl4A69ofaTRU8DFqvgzzv8s9yRtaPPm5gud9HDNvpB3GPQFvNuTWAI59B9huVGV5jXYJwbCsmBsOGYWA==} dependencies: '@types/jsonfile': 6.1.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 dev: true /@types/fs-extra@9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 18.16.18 + '@types/node': 16.18.47 dev: true /@types/glob@7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.16.18 + '@types/node': 18.17.13 dev: true /@types/glob@8.1.0: resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.16.18 + '@types/node': 18.17.13 + dev: false /@types/graceful-fs@4.1.6: resolution: {integrity: sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.17.13 dev: true - /@types/hast@2.3.4: - resolution: {integrity: sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==} + /@types/hast@2.3.5: + resolution: {integrity: sha512-SvQi0L/lNpThgPoleH53cdjB3y9zpLlVjRbqB3rH8hx1jiRSBGAhyjV3H+URFjNVRqt2EdYNrbZE5IsGlNfpRg==} dependencies: - '@types/unist': 2.0.6 + '@types/unist': 2.0.8 dev: true /@types/http-cache-semantics@4.0.1: @@ -9196,11 +8876,11 @@ packages: pretty-format: 28.1.3 dev: true - /@types/jest@29.2.6: - resolution: {integrity: sha512-XEUC/Tgw3uMh6Ho8GkUtQ2lPhY5Fmgyp3TdlkTJs1W9VgNxs+Ow/x3Elh8lHQKqCbZL0AubQuqWjHVT033Hhrw==} + /@types/jest@29.5.4: + resolution: {integrity: sha512-PhglGmhWeD46FYOVLt3X7TiWjzwuVGW9wG/4qocPevXMjCmrIc5b6db9WjeGE4QYVpUAWMDv3v0IiBwObY289A==} dependencies: - expect: 29.5.0 - pretty-format: 29.5.0 + expect: 29.6.4 + pretty-format: 29.6.3 dev: true /@types/json-schema@7.0.12: @@ -9212,45 +8892,45 @@ packages: /@types/jsonfile@6.1.1: resolution: {integrity: sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.17.13 dev: true /@types/lodash.debounce@4.0.7: resolution: {integrity: sha512-X1T4wMZ+gT000M2/91SYj0d/7JfeNZ9PeeOldSNoE/lunLeQXKvkmIumI29IaKMotU/ln/McOIvgzZcQ/3TrSA==} dependencies: - '@types/lodash': 4.14.195 + '@types/lodash': 4.14.197 dev: true /@types/lodash.throttle@4.1.7: resolution: {integrity: sha512-znwGDpjCHQ4FpLLx19w4OXDqq8+OvREa05H89obtSyXyOFKL3dDjCslsmfBz0T2FU8dmf5Wx1QvogbINiGIu9g==} dependencies: - '@types/lodash': 4.14.195 + '@types/lodash': 4.14.197 dev: true /@types/lodash.uniq@4.5.7: resolution: {integrity: sha512-qg7DeAbdZMi6DGvCxThlJycykLLhETrJrQZ6F2KaZ+o0sNK1qRHz46lgNA+nHHjwrmA2a91DyiZTp3ey3m1rEw==} dependencies: - '@types/lodash': 4.14.195 + '@types/lodash': 4.14.197 dev: true /@types/lodash.uniqby@4.7.7: resolution: {integrity: sha512-sv2g6vkCIvEUsK5/Vq17haoZaisfj2EWW8mP7QWlnKi6dByoNmeuHDDXHR7sabuDqwO4gvU7ModIL22MmnOocg==} dependencies: - '@types/lodash': 4.14.195 + '@types/lodash': 4.14.197 dev: true - /@types/lodash@4.14.195: - resolution: {integrity: sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==} + /@types/lodash@4.14.197: + resolution: {integrity: sha512-BMVOiWs0uNxHVlHBgzTIqJYmj+PgCo4euloGF+5m4okL3rEYzM2EEv78mw8zWSMM57dM7kVIgJ2QDvwHSoCI5g==} dev: true - /@types/mdast@3.0.11: - resolution: {integrity: sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw==} + /@types/mdast@3.0.12: + resolution: {integrity: sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==} dependencies: - '@types/unist': 2.0.6 + '@types/unist': 2.0.8 dev: true - /@types/mdx@2.0.5: - resolution: {integrity: sha512-76CqzuD6Q7LC+AtbPqrvD9AqsN0k8bsYo2bM2J8pmNldP1aIPAbzUQ7QbobyXL4eLr1wK5x8FZFe8eF/ubRuBg==} + /@types/mdx@2.0.7: + resolution: {integrity: sha512-BG4tyr+4amr3WsSEmHn/fXPqaCba/AYZ7dsaQTiavihQunHSIxk+uAtqsjvicNpyHN6cm+B9RVrUOtW9VzIKHw==} dev: true /@types/mime-types@2.1.1: @@ -9276,40 +8956,50 @@ packages: resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} dev: true + /@types/mute-stream@0.0.1: + resolution: {integrity: sha512-0yQLzYhCqGz7CQPE3iDmYjhb7KMBFOP+tBkyw+/Y2YyDI5wpS7itXXxneN1zSsUwWx3Ji6YiVYrhAnpQGS/vkw==} + dependencies: + '@types/node': 18.17.13 + dev: true + /@types/node-fetch@2.6.4: resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.17.13 form-data: 3.0.1 - /@types/node-persist@3.1.3: - resolution: {integrity: sha512-6MdN3tQcBdlnswJ/JGJYEwWh72Ru3RHH3I16PCQ/GB7ecM3YFfcUB4Yysim6HHnKbCse5vgk5r51JKR7w5zE0Q==} + /@types/node-persist@3.1.4: + resolution: {integrity: sha512-MXwo/ijhPIIKa5jLxwBfs8wTVZzwO36V/a12TSzsm5hAMFiY9CgSzbFobvQEmQTRu778CIIhJoT59KF2BzSYwg==} dependencies: - '@types/node': 18.16.18 - dev: true - - /@types/node@16.0.0: - resolution: {integrity: sha512-TmCW5HoZ2o2/z2EYi109jLqIaPIi9y/lc2LmDCWzuCi35bcaQ+OtUh6nwBiFK7SOu25FAU5+YKdqFZUwtqGSdg==} + '@types/node': 18.17.13 dev: true /@types/node@16.18.23: resolution: {integrity: sha512-XAMpaw1s1+6zM+jn2tmw8MyaRDIJfXxqmIQIS0HfoGYPuf7dUWeiUKopwq13KFX9lEp1+THGtlaaYx39Nxr58g==} dev: true - /@types/node@18.16.18: - resolution: {integrity: sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw==} + /@types/node@16.18.47: + resolution: {integrity: sha512-yBaT6qZKmvaeTuv8kfv2QwIsgi/D4bYSLmHow/IBxjLNRHxYEXgwVRvBmnNLBXi3CkZg0Wdzu3NTUlUjjxconQ==} + dev: true - /@types/normalize-package-data@2.4.1: - resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} + /@types/node@18.17.13: + resolution: {integrity: sha512-SlLPDDe6YQl1JnQQy4hgsuJeo5q5c1TBU4be4jeBLXsqpjoDbfb0HesSfhMwnaxfSJ4txtfzJzW5/x/43fkkfQ==} - /@types/npmlog@4.1.4: - resolution: {integrity: sha512-WKG4gTr8przEZBiJ5r3s8ZIAoMXNbOgQ+j/d5O4X3x6kZJRLNvyUJuUK/KoG3+8BaOHPhp2m7WC6JKKeovDSzQ==} + /@types/node@20.5.8: + resolution: {integrity: sha512-eajsR9aeljqNhK028VG0Wuw+OaY5LLxYmxeoXynIoE6jannr9/Ucd1LL0hSSoafk5LTYG+FfqsyGt81Q6Zkybw==} dev: true + /@types/normalize-package-data@2.4.1: + resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} + /@types/prettier@2.6.0: resolution: {integrity: sha512-G/AdOadiZhnJp0jXCaBQU449W2h716OW/EoXeYkCytxKL06X1WCXB4DZpp8TpZ8eyIJVS1cw4lrlkkSYU21cDw==} dev: true + /@types/prettier@2.7.3: + resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} + dev: true + /@types/pretty-hrtime@1.0.1: resolution: {integrity: sha512-VjID5MJb1eGKthz2qUerWT8+R4b9N+CHvGCzg9fn4kWZgaF9AhdYikQio3R7wV8YY1NsQKPaCwKz1Yff+aHNUQ==} dev: true @@ -9318,22 +9008,30 @@ packages: resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} dev: true - /@types/qs@6.9.7: - resolution: {integrity: sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==} + /@types/qs@6.9.8: + resolution: {integrity: sha512-u95svzDlTysU5xecFNTgfFG5RUWu1A9P0VzgpcIiGZA9iraHOdSzcxMxQ55DyeRaGCSxQi7LxXDI4rzq/MYfdg==} dev: true /@types/range-parser@1.2.4: resolution: {integrity: sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==} dev: true - /@types/react-dom@18.2.5: - resolution: {integrity: sha512-sRQsOS/sCLnpQhR4DSKGTtWFE3FZjpQa86KPVbhUqdYMRZ9FEFcfAytKhR/vUG2rH1oFbOOej6cuD7MFSobDRQ==} + /@types/react-dom@18.2.7: + resolution: {integrity: sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA==} + dependencies: + '@types/react': 18.2.21 + dev: true + + /@types/react@16.14.46: + resolution: {integrity: sha512-Am4pyXMrr6cWWw/TN3oqHtEZl0j+G6Up/O8m65+xF/3ZaUgkv1GAtTPWw4yNRmH0HJXmur6xKCKoMo3rBGynuw==} dependencies: - '@types/react': 18.2.12 + '@types/prop-types': 15.7.5 + '@types/scheduler': 0.16.3 + csstype: 3.1.2 dev: true - /@types/react@18.2.12: - resolution: {integrity: sha512-ndmBMLCgn38v3SntMeoJaIrO6tGHYKMEBohCUmw8HoLLQdRMOIGXfeYaBTLe2lsFaSB3MOK1VXscYFnmLtTSmw==} + /@types/react@18.2.21: + resolution: {integrity: sha512-neFKG/sBAwGxHgXiIxnbm3/AAVQ/cMRS93hvBpg8xYRbeQSPVABp9U2bRnPf0iI4+Ucdv3plSxKK+3CW2ENJxA==} dependencies: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.3 @@ -9348,14 +9046,14 @@ packages: resolution: {integrity: sha512-WLZZQdwo5P+H6R+bDDCFqFSlP5Jtk6gyXpE0R0KAVQbcMGmxpVsNX8dah640hY4+PpRG2+Ph3dcwDHzrOAOZ7A==} dev: true - /@types/semver@7.5.0: - resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} + /@types/semver@7.5.1: + resolution: {integrity: sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg==} /@types/send@0.17.1: resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} dependencies: '@types/mime': 1.3.2 - '@types/node': 18.16.18 + '@types/node': 18.17.13 dev: true /@types/serve-static@1.15.2: @@ -9363,11 +9061,11 @@ packages: dependencies: '@types/http-errors': 2.0.1 '@types/mime': 3.0.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 dev: true - /@types/sinon@10.0.15: - resolution: {integrity: sha512-3lrFNQG0Kr2LDzvjyjB6AMJk4ge+8iYhQfdnSwIwlG88FUOV43kPcQqDZkDa/h3WSZy6i8Fr0BSjfQtB1B3xuQ==} + /@types/sinon@10.0.16: + resolution: {integrity: sha512-j2Du5SYpXZjJVJtXBokASpPRj+e2z+VUhCPHmM6WMfe3dpHu6iVKJMU6AiBcMp/XTAYnEj6Wc1trJUWwZ0QaAQ==} dependencies: '@types/sinonjs__fake-timers': 8.1.2 dev: true @@ -9379,7 +9077,7 @@ packages: /@types/ssri@7.1.1: resolution: {integrity: sha512-DPP/jkDaqGiyU75MyMURxLWyYLwKSjnAuGe9ZCsLp9QZOpXmDfuevk769F0BS86TmRuD5krnp06qw9nSoNO+0g==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.17.13 dev: false /@types/stack-utils@2.0.1: @@ -9394,33 +9092,37 @@ packages: /@types/tunnel@0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.17.13 dev: false - /@types/unist@2.0.6: - resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} + /@types/unist@2.0.8: + resolution: {integrity: sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==} dev: true - /@types/uuid@8.3.2: - resolution: {integrity: sha512-u40ViizKDmdl5FhOXn9WQbulpigYCaiD5hD4KqR3xyQww6l3+0ND+A9TeFla8tFpqvR+UAkJdYb/8jdaQG4/nw==} + /@types/uuid@8.3.4: + resolution: {integrity: sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==} dev: true - /@types/uuid@9.0.1: - resolution: {integrity: sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA==} + /@types/uuid@9.0.3: + resolution: {integrity: sha512-taHQQH/3ZyI3zP8M/puluDEIEvtQHVYcC6y3N8ijFtAd28+Ey/G4sg1u2gB01S8MwybLOKAp9/yCMu/uR5l3Ug==} dev: true - /@types/vscode@1.70.0: - resolution: {integrity: sha512-3/9Fz0F2eBgwciazc94Ien+9u1elnjFg9YAhvAb3qDy/WeFWD9VrOPU7CIytryOVUdbxus8uzL4VZYONA0gDtA==} + /@types/vscode@1.81.0: + resolution: {integrity: sha512-YIaCwpT+O2E7WOMq0eCgBEABE++SX3Yl/O02GoMIF2DO3qAtvw7m6BXFYsxnc6XyzwZgh6/s/UG78LSSombl2w==} dev: true /@types/which@2.0.2: resolution: {integrity: sha512-113D3mDkZDjo+EeUEHCFy0qniNc1ZpecGiAU7WSo7YDoSzolZIQKpYFHrPpjkB2nuyahcKfrmLXeQlh7gqJYdw==} dev: true + /@types/wrap-ansi@3.0.0: + resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==} + dev: true + /@types/ws@8.5.5: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.17.13 dev: true /@types/yargs-parser@21.0.0: @@ -9443,7 +9145,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 18.16.18 + '@types/node': 18.17.13 dev: true optional: true @@ -9451,8 +9153,8 @@ packages: resolution: {integrity: sha512-S9q47ByT2pPvD65IvrWp7qppVMpk9WGMbVq9wbWZOHg6tnXSD4vyhao6nOSBwwfDdV2p3Kx9evA9vI+XWTfDvw==} dev: true - /@typescript-eslint/eslint-plugin@5.59.11(@typescript-eslint/parser@5.59.11)(eslint@8.42.0)(typescript@4.9.4): - resolution: {integrity: sha512-XxuOfTkCUiOSyBWIvHlUraLw/JT/6Io1365RO6ZuI88STKMavJZPNMU0lFcUTeQXEhHiv64CbxYxBNoDVSmghg==} + /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.48.0)(typescript@4.9.5): + resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -9462,25 +9164,25 @@ packages: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 5.59.11(eslint@8.42.0)(typescript@4.9.4) - '@typescript-eslint/scope-manager': 5.59.11 - '@typescript-eslint/type-utils': 5.59.11(eslint@8.42.0)(typescript@4.9.4) - '@typescript-eslint/utils': 5.59.11(eslint@8.42.0)(typescript@4.9.4) + '@eslint-community/regexpp': 4.8.0 + '@typescript-eslint/parser': 5.62.0(eslint@8.48.0)(typescript@4.9.5) + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/type-utils': 5.62.0(eslint@8.48.0)(typescript@4.9.5) + '@typescript-eslint/utils': 5.62.0(eslint@8.48.0)(typescript@4.9.5) debug: 4.3.4 - eslint: 8.42.0 - grapheme-splitter: 1.0.4 + eslint: 8.48.0 + graphemer: 1.4.0 ignore: 5.2.4 natural-compare-lite: 1.4.0 - semver: 7.5.2 - tsutils: 3.21.0(typescript@4.9.4) - typescript: 4.9.4 + semver: 7.5.4 + tsutils: 3.21.0(typescript@4.9.5) + typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/eslint-plugin@5.59.11(@typescript-eslint/parser@5.59.11)(eslint@8.42.0)(typescript@5.1.3): - resolution: {integrity: sha512-XxuOfTkCUiOSyBWIvHlUraLw/JT/6Io1365RO6ZuI88STKMavJZPNMU0lFcUTeQXEhHiv64CbxYxBNoDVSmghg==} + /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.48.0)(typescript@5.2.2): + resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -9490,25 +9192,25 @@ packages: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 5.59.11(eslint@8.42.0)(typescript@5.1.3) - '@typescript-eslint/scope-manager': 5.59.11 - '@typescript-eslint/type-utils': 5.59.11(eslint@8.42.0)(typescript@5.1.3) - '@typescript-eslint/utils': 5.59.11(eslint@8.42.0)(typescript@5.1.3) + '@eslint-community/regexpp': 4.8.0 + '@typescript-eslint/parser': 5.62.0(eslint@8.48.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/type-utils': 5.62.0(eslint@8.48.0)(typescript@5.2.2) + '@typescript-eslint/utils': 5.62.0(eslint@8.48.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.42.0 - grapheme-splitter: 1.0.4 + eslint: 8.48.0 + graphemer: 1.4.0 ignore: 5.2.4 natural-compare-lite: 1.4.0 - semver: 7.5.2 - tsutils: 3.21.0(typescript@5.1.3) - typescript: 5.1.3 + semver: 7.5.4 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/parser@5.59.11(eslint@8.42.0)(typescript@4.9.4): - resolution: {integrity: sha512-s9ZF3M+Nym6CAZEkJJeO2TFHHDsKAM3ecNkLuH4i4s8/RCPnF5JRip2GyviYkeEAcwGMJxkqG9h2dAsnA1nZpA==} + /@typescript-eslint/parser@5.62.0(eslint@8.48.0)(typescript@4.9.5): + resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -9517,17 +9219,17 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.59.11 - '@typescript-eslint/types': 5.59.11 - '@typescript-eslint/typescript-estree': 5.59.11(typescript@4.9.4) + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.9.5) debug: 4.3.4 - eslint: 8.42.0 - typescript: 4.9.4 + eslint: 8.48.0 + typescript: 4.9.5 transitivePeerDependencies: - supports-color - /@typescript-eslint/parser@5.59.11(eslint@8.42.0)(typescript@5.1.3): - resolution: {integrity: sha512-s9ZF3M+Nym6CAZEkJJeO2TFHHDsKAM3ecNkLuH4i4s8/RCPnF5JRip2GyviYkeEAcwGMJxkqG9h2dAsnA1nZpA==} + /@typescript-eslint/parser@5.62.0(eslint@8.48.0)(typescript@5.2.2): + resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -9536,25 +9238,25 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.59.11 - '@typescript-eslint/types': 5.59.11 - '@typescript-eslint/typescript-estree': 5.59.11(typescript@5.1.3) + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) debug: 4.3.4 - eslint: 8.42.0 - typescript: 5.1.3 + eslint: 8.48.0 + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/scope-manager@5.59.11: - resolution: {integrity: sha512-dHFOsxoLFtrIcSj5h0QoBT/89hxQONwmn3FOQ0GOQcLOOXm+MIrS8zEAhs4tWl5MraxCY3ZJpaXQQdFMc2Tu+Q==} + /@typescript-eslint/scope-manager@5.62.0: + resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.59.11 - '@typescript-eslint/visitor-keys': 5.59.11 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 - /@typescript-eslint/type-utils@5.59.11(eslint@8.42.0)(typescript@4.9.4): - resolution: {integrity: sha512-LZqVY8hMiVRF2a7/swmkStMYSoXMFlzL6sXV6U/2gL5cwnLWQgLEG8tjWPpaE4rMIdZ6VKWwcffPlo1jPfk43g==} + /@typescript-eslint/type-utils@5.62.0(eslint@8.48.0)(typescript@4.9.5): + resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -9563,18 +9265,18 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.59.11(typescript@4.9.4) - '@typescript-eslint/utils': 5.59.11(eslint@8.42.0)(typescript@4.9.4) + '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.9.5) + '@typescript-eslint/utils': 5.62.0(eslint@8.48.0)(typescript@4.9.5) debug: 4.3.4 - eslint: 8.42.0 - tsutils: 3.21.0(typescript@4.9.4) - typescript: 4.9.4 + eslint: 8.48.0 + tsutils: 3.21.0(typescript@4.9.5) + typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/type-utils@5.59.11(eslint@8.42.0)(typescript@5.1.3): - resolution: {integrity: sha512-LZqVY8hMiVRF2a7/swmkStMYSoXMFlzL6sXV6U/2gL5cwnLWQgLEG8tjWPpaE4rMIdZ6VKWwcffPlo1jPfk43g==} + /@typescript-eslint/type-utils@5.62.0(eslint@8.48.0)(typescript@5.2.2): + resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -9583,22 +9285,22 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.59.11(typescript@5.1.3) - '@typescript-eslint/utils': 5.59.11(eslint@8.42.0)(typescript@5.1.3) + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) + '@typescript-eslint/utils': 5.62.0(eslint@8.48.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.42.0 - tsutils: 3.21.0(typescript@5.1.3) - typescript: 5.1.3 + eslint: 8.48.0 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/types@5.59.11: - resolution: {integrity: sha512-epoN6R6tkvBYSc+cllrz+c2sOFWkbisJZWkOE+y3xHtvYaOE6Wk6B8e114McRJwFRjGvYdJwLXQH5c9osME/AA==} + /@typescript-eslint/types@5.62.0: + resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - /@typescript-eslint/typescript-estree@5.59.11(typescript@4.9.4): - resolution: {integrity: sha512-YupOpot5hJO0maupJXixi6l5ETdrITxeo5eBOeuV7RSKgYdU3G5cxO49/9WRnJq9EMrB7AuTSLH/bqOsXi7wPA==} + /@typescript-eslint/typescript-estree@5.62.0(typescript@4.9.5): + resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -9606,19 +9308,19 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.59.11 - '@typescript-eslint/visitor-keys': 5.59.11 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.5.3 - tsutils: 3.21.0(typescript@4.9.4) - typescript: 4.9.4 + semver: 7.5.4 + tsutils: 3.21.0(typescript@4.9.5) + typescript: 4.9.5 transitivePeerDependencies: - supports-color - /@typescript-eslint/typescript-estree@5.59.11(typescript@5.1.3): - resolution: {integrity: sha512-YupOpot5hJO0maupJXixi6l5ETdrITxeo5eBOeuV7RSKgYdU3G5cxO49/9WRnJq9EMrB7AuTSLH/bqOsXi7wPA==} + /@typescript-eslint/typescript-estree@5.62.0(typescript@5.2.2): + resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -9626,150 +9328,152 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.59.11 - '@typescript-eslint/visitor-keys': 5.59.11 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.5.3 - tsutils: 3.21.0(typescript@5.1.3) - typescript: 5.1.3 + semver: 7.5.4 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/utils@5.59.11(eslint@8.42.0)(typescript@4.9.4): - resolution: {integrity: sha512-didu2rHSOMUdJThLk4aZ1Or8IcO3HzCw/ZvEjTTIfjIrcdd5cvSIwwDy2AOlE7htSNp7QIZ10fLMyRCveesMLg==} + /@typescript-eslint/utils@5.62.0(eslint@8.48.0)(typescript@4.9.5): + resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.42.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) '@types/json-schema': 7.0.12 - '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 5.59.11 - '@typescript-eslint/types': 5.59.11 - '@typescript-eslint/typescript-estree': 5.59.11(typescript@4.9.4) - eslint: 8.42.0 + '@types/semver': 7.5.1 + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.9.5) + eslint: 8.48.0 eslint-scope: 5.1.1 - semver: 7.5.3 + semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/utils@5.59.11(eslint@8.42.0)(typescript@5.1.3): - resolution: {integrity: sha512-didu2rHSOMUdJThLk4aZ1Or8IcO3HzCw/ZvEjTTIfjIrcdd5cvSIwwDy2AOlE7htSNp7QIZ10fLMyRCveesMLg==} + /@typescript-eslint/utils@5.62.0(eslint@8.48.0)(typescript@5.2.2): + resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.42.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) '@types/json-schema': 7.0.12 - '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 5.59.11 - '@typescript-eslint/types': 5.59.11 - '@typescript-eslint/typescript-estree': 5.59.11(typescript@5.1.3) - eslint: 8.42.0 + '@types/semver': 7.5.1 + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) + eslint: 8.48.0 eslint-scope: 5.1.1 - semver: 7.5.3 + semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript dev: false - /@typescript-eslint/visitor-keys@5.59.11: - resolution: {integrity: sha512-KGYniTGG3AMTuKF9QBD7EIrvufkB6O6uX3knP73xbKLMpH+QRPcgnCxjWXSHjMRuOxFLovljqQgQpR0c7GvjoA==} + /@typescript-eslint/visitor-keys@5.62.0: + resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.59.11 - eslint-visitor-keys: 3.4.1 + '@typescript-eslint/types': 5.62.0 + eslint-visitor-keys: 3.4.3 - /@vitejs/plugin-react-swc@3.3.2(vite@4.3.9): + /@vitejs/plugin-react-swc@3.3.2(vite@4.4.9): resolution: {integrity: sha512-VJFWY5sfoZerQRvJrh518h3AcQt6f/yTuWn4/TRB+dqmYU0NX1qz7qM5Wfd+gOQqUzQW4gxKqKN3KpE/P3+zrA==} peerDependencies: vite: ^4 dependencies: - '@swc/core': 1.3.67 - vite: 4.3.9(@types/node@18.16.18) + '@swc/core': 1.3.82 + vite: 4.4.9(@types/node@18.17.13) transitivePeerDependencies: - '@swc/helpers' dev: true - /@vitejs/plugin-react@3.1.0(vite@4.3.9): + /@vitejs/plugin-react@3.1.0(vite@4.4.9): resolution: {integrity: sha512-AfgcRL8ZBhAlc3BFdigClmTUMISmmzHn7sB2h9U1odvc5U/MjWXsAaz18b/WoppUTDBzxOJwo2VdClfUcItu9g==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^4.1.0-beta.0 dependencies: - '@babel/core': 7.22.5 - '@babel/plugin-transform-react-jsx-self': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-react-jsx-source': 7.22.5(@babel/core@7.22.5) + '@babel/core': 7.22.11 + '@babel/plugin-transform-react-jsx-self': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-react-jsx-source': 7.22.5(@babel/core@7.22.11) magic-string: 0.27.0 react-refresh: 0.14.0 - vite: 4.3.9(@types/node@18.16.18) + vite: 4.4.9(@types/node@18.17.13) transitivePeerDependencies: - supports-color dev: true - /@vitejs/plugin-react@4.0.0(vite@4.3.9): - resolution: {integrity: sha512-HX0XzMjL3hhOYm+0s95pb0Z7F8O81G7joUHgfDd/9J/ZZf5k4xX6QAMFkKsHFxaHlf6X7GD7+XuaZ66ULiJuhQ==} + /@vitejs/plugin-react@4.0.4(vite@4.4.9): + resolution: {integrity: sha512-7wU921ABnNYkETiMaZy7XqpueMnpu5VxvVps13MjmCo+utBdD79sZzrApHawHtVX66cCJQQTXFcjH0y9dSUK8g==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^4.2.0 dependencies: - '@babel/core': 7.22.5 - '@babel/plugin-transform-react-jsx-self': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-transform-react-jsx-source': 7.22.5(@babel/core@7.22.5) + '@babel/core': 7.22.11 + '@babel/plugin-transform-react-jsx-self': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-transform-react-jsx-source': 7.22.5(@babel/core@7.22.11) react-refresh: 0.14.0 - vite: 4.3.9(@types/node@18.16.18) + vite: 4.4.9(@types/node@18.17.13) transitivePeerDependencies: - supports-color dev: true /@vitest/coverage-c8@0.31.4(vitest@0.31.4): resolution: {integrity: sha512-VPx368m4DTcpA/P0v3YdVxl4QOSh1DbUcXURLRvDShrIB5KxOgfzw4Bn2R8AhAe/GyiWW/FIsJ/OJdYXCCiC1w==} + deprecated: v8 coverage is moved to @vitest/coverage-v8 package peerDependencies: vitest: '>=0.30.0 <1' dependencies: '@ampproject/remapping': 2.2.1 c8: 7.14.0 - magic-string: 0.30.0 + magic-string: 0.30.3 picocolors: 1.0.0 - std-env: 3.3.3 + std-env: 3.4.3 vitest: 0.31.4(happy-dom@9.20.3) dev: true - /@vitest/coverage-c8@0.31.4(vitest@0.32.2): + /@vitest/coverage-c8@0.31.4(vitest@0.32.4): resolution: {integrity: sha512-VPx368m4DTcpA/P0v3YdVxl4QOSh1DbUcXURLRvDShrIB5KxOgfzw4Bn2R8AhAe/GyiWW/FIsJ/OJdYXCCiC1w==} + deprecated: v8 coverage is moved to @vitest/coverage-v8 package peerDependencies: vitest: '>=0.30.0 <1' dependencies: '@ampproject/remapping': 2.2.1 c8: 7.14.0 - magic-string: 0.30.0 + magic-string: 0.30.3 picocolors: 1.0.0 - std-env: 3.3.3 - vitest: 0.32.2 + std-env: 3.4.3 + vitest: 0.32.4 dev: true - /@vitest/coverage-v8@0.32.2(vitest@0.32.2): - resolution: {integrity: sha512-/+V3nB3fyeuuSeKxCfi6XmWjDIxpky7AWSkGVfaMjAk7di8igBwRsThLjultwIZdTDH1RAxpjmCXEfSqsMFZOA==} + /@vitest/coverage-v8@0.32.4(vitest@0.32.4): + resolution: {integrity: sha512-itiCYY3TmWEK+5wnFBoNr0ZA+adACp7Op1r2TeX5dPOgU2See7+Gx2NlK2lVMHVxfPsu5z9jszKa3i//eR+hqg==} peerDependencies: vitest: '>=0.32.0 <1' dependencies: '@ampproject/remapping': 2.2.1 '@bcoe/v8-coverage': 0.2.3 istanbul-lib-coverage: 3.2.0 - istanbul-lib-report: 3.0.0 + istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 4.0.1 - istanbul-reports: 3.1.5 - magic-string: 0.30.0 + istanbul-reports: 3.1.6 + magic-string: 0.30.3 picocolors: 1.0.0 - std-env: 3.3.3 + std-env: 3.4.3 test-exclude: 6.0.0 v8-to-istanbul: 9.1.0 - vitest: 0.32.2 + vitest: 0.32.4 transitivePeerDependencies: - supports-color dev: true @@ -9779,7 +9483,7 @@ packages: dependencies: '@vitest/spy': 0.30.1 '@vitest/utils': 0.30.1 - chai: 4.3.7 + chai: 4.3.8 dev: true /@vitest/expect@0.31.4: @@ -9787,15 +9491,15 @@ packages: dependencies: '@vitest/spy': 0.31.4 '@vitest/utils': 0.31.4 - chai: 4.3.7 + chai: 4.3.8 dev: true - /@vitest/expect@0.32.2: - resolution: {integrity: sha512-6q5yzweLnyEv5Zz1fqK5u5E83LU+gOMVBDuxBl2d2Jfx1BAp5M+rZgc5mlyqdnxquyoiOXpXmFNkcGcfFnFH3Q==} + /@vitest/expect@0.32.4: + resolution: {integrity: sha512-m7EPUqmGIwIeoU763N+ivkFjTzbaBn0n9evsTOcde03ugy2avPs3kZbYmw3DkcH1j5mxhMhdamJkLQ6dM1bk/A==} dependencies: - '@vitest/spy': 0.32.2 - '@vitest/utils': 0.32.2 - chai: 4.3.7 + '@vitest/spy': 0.32.4 + '@vitest/utils': 0.32.4 + chai: 4.3.8 dev: true /@vitest/runner@0.30.1: @@ -9816,11 +9520,10 @@ packages: pathe: 1.1.1 dev: true - /@vitest/runner@0.32.2: - resolution: {integrity: sha512-06vEL0C1pomOEktGoLjzZw+1Fb+7RBRhmw/06WkDrd1akkT9i12su0ku+R/0QM69dfkIL/rAIDTG+CSuQVDcKw==} + /@vitest/runner@0.32.4: + resolution: {integrity: sha512-cHOVCkiRazobgdKLnczmz2oaKK9GJOw6ZyRcaPdssO1ej+wzHVIkWiCiNacb3TTYPdzMddYkCgMjZ4r8C0JFCw==} dependencies: - '@vitest/utils': 0.32.2 - concordance: 5.0.4 + '@vitest/utils': 0.32.4 p-limit: 4.0.0 pathe: 1.1.1 dev: true @@ -9828,7 +9531,7 @@ packages: /@vitest/snapshot@0.30.1: resolution: {integrity: sha512-fJZqKrE99zo27uoZA/azgWyWbFvM1rw2APS05yB0JaLwUIg9aUtvvnBf4q7JWhEcAHmSwbrxKFgyBUga6tq9Tw==} dependencies: - magic-string: 0.30.0 + magic-string: 0.30.3 pathe: 1.1.1 pretty-format: 27.5.1 dev: true @@ -9836,17 +9539,17 @@ packages: /@vitest/snapshot@0.31.4: resolution: {integrity: sha512-LemvNumL3NdWSmfVAMpXILGyaXPkZbG5tyl6+RQSdcHnTj6hvA49UAI8jzez9oQyE/FWLKRSNqTGzsHuk89LRA==} dependencies: - magic-string: 0.30.0 + magic-string: 0.30.3 pathe: 1.1.1 pretty-format: 27.5.1 dev: true - /@vitest/snapshot@0.32.2: - resolution: {integrity: sha512-JwhpeH/PPc7GJX38vEfCy9LtRzf9F4er7i4OsAJyV7sjPwjj+AIR8cUgpMTWK4S3TiamzopcTyLsZDMuldoi5A==} + /@vitest/snapshot@0.32.4: + resolution: {integrity: sha512-IRpyqn9t14uqsFlVI2d7DFMImGMs1Q9218of40bdQQgMePwVdmix33yMNnebXcTzDU5eiV3eUsoxxH5v0x/IQA==} dependencies: - magic-string: 0.30.0 + magic-string: 0.30.3 pathe: 1.1.1 - pretty-format: 27.5.1 + pretty-format: 29.6.3 dev: true /@vitest/spy@0.30.1: @@ -9861,8 +9564,8 @@ packages: tinyspy: 2.1.1 dev: true - /@vitest/spy@0.32.2: - resolution: {integrity: sha512-Q/ZNILJ4ca/VzQbRM8ur3Si5Sardsh1HofatG9wsJY1RfEaw0XKP8IVax2lI1qnrk9YPuG9LA2LkZ0EI/3d4ug==} + /@vitest/spy@0.32.4: + resolution: {integrity: sha512-oA7rCOqVOOpE6rEoXuCOADX7Lla1LIa4hljI2MSccbpec54q+oifhziZIJXxlE/CvI2E+ElhBHzVu0VEvJGQKQ==} dependencies: tinyspy: 2.1.1 dev: true @@ -9883,16 +9586,16 @@ packages: pretty-format: 27.5.1 dev: true - /@vitest/utils@0.32.2: - resolution: {integrity: sha512-lnJ0T5i03j0IJaeW73hxe2AuVnZ/y1BhhCOuIcl9LIzXnbpXJT9Lrt6brwKHXLOiA7MZ6N5hSJjt0xE1dGNCzQ==} + /@vitest/utils@0.32.4: + resolution: {integrity: sha512-Gwnl8dhd1uJ+HXrYyV0eRqfmk9ek1ASE/LWfTCuWMw+d07ogHqp4hEAV28NiecimK6UY9DpSEPh+pXBA5gtTBg==} dependencies: - diff-sequences: 29.4.3 + diff-sequences: 29.6.3 loupe: 2.3.6 - pretty-format: 27.5.1 + pretty-format: 29.6.3 dev: true - /@vscode/vsce@2.16.0: - resolution: {integrity: sha512-BhJ0zO7UxShLFBZM6jwOLt1ZVoqQ4r5Lj/kHNeYp0ICPXhz/erqBSMQnHkRgkjn2L/bh+TYFGkZyguhu/SKsjw==} + /@vscode/vsce@2.21.0: + resolution: {integrity: sha512-KuxYqScqUY/duJbkj9eE2tN2X/WJoGAy54hHtxT3ZBkM6IzrOg7H7CXGUPBxNlmqku2w/cAjOUSrgIHlzz0mbA==} engines: {node: '>= 14'} hasBin: true dependencies: @@ -9902,17 +9605,18 @@ packages: commander: 6.2.1 glob: 7.2.3 hosted-git-info: 4.1.0 + jsonc-parser: 3.2.0 leven: 3.1.0 markdown-it: 12.3.2 mime: 1.6.0 minimatch: 3.1.2 parse-semver: 1.1.1 read: 1.0.7 - semver: 5.7.1 + semver: 7.5.4 tmp: 0.2.1 typed-rest-client: 1.8.11 url-join: 4.0.1 - xml2js: 0.4.23 + xml2js: 0.5.0 yauzl: 2.10.0 yazl: 2.5.1 optionalDependencies: @@ -10031,8 +9735,8 @@ packages: '@xtuc/long': 4.2.2 dev: true - /@xmldom/xmldom@0.8.8: - resolution: {integrity: sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q==} + /@xmldom/xmldom@0.8.10: + resolution: {integrity: sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==} engines: {node: '>=10.0.0'} /@xtuc/ieee754@1.2.0: @@ -10043,14 +9747,30 @@ packages: resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} dev: true - /@yarnpkg/esbuild-plugin-pnp@3.0.0-rc.15(esbuild@0.17.19): + /@yarnpkg/esbuild-plugin-pnp@3.0.0-rc.15(esbuild@0.18.20): resolution: {integrity: sha512-kYzDJO5CA9sy+on/s2aIW0411AklfCi8Ck/4QDivOqsMKpStZA2SsR+X27VTggGwpStWaLrjJcDcdDMowtG8MA==} engines: {node: '>=14.15.0'} peerDependencies: esbuild: '>=0.10.0' dependencies: - esbuild: 0.17.19 - tslib: 2.6.0 + esbuild: 0.18.20 + tslib: 2.6.2 + dev: true + + /@yarnpkg/fslib@2.10.3: + resolution: {integrity: sha512-41H+Ga78xT9sHvWLlFOZLIhtU6mTGZ20pZ29EiZa97vnxdohJD2AF42rCoAoWfqUz486xY6fhjMH+DYEM9r14A==} + engines: {node: '>=12 <14 || 14.2 - 14.9 || >14.10.0'} + dependencies: + '@yarnpkg/libzip': 2.3.0 + tslib: 1.14.1 + dev: true + + /@yarnpkg/libzip@2.3.0: + resolution: {integrity: sha512-6xm38yGVIa6mKm/DUCF2zFFJhERh/QWp1ufm4cNUvxsONBmfPg8uZ9pZBdOmF6qFGr/HlT6ABBkCSx/dlEtvWg==} + engines: {node: '>=12 <14 || 14.2 - 14.9 || >14.10.0'} + dependencies: + '@types/emscripten': 1.39.7 + tslib: 1.14.1 dev: true /@zkochan/js-yaml@0.0.6: @@ -10060,8 +9780,8 @@ packages: argparse: 2.0.1 dev: false - /@zkochan/rimraf@2.1.2: - resolution: {integrity: sha512-Lc2oK51J6aQWcLWTloobJun5ZF41BbTDdLvE+aMcexoVWFoFqvZmnZoyXR2IZk6NJEVoZW8tjgtvQLfTsmRs2Q==} + /@zkochan/rimraf@2.1.3: + resolution: {integrity: sha512-mCfR3gylCzPC+iqdxEA6z5SxJeOgzgbwmyxanKriIne5qZLswDe/M43aD3p5MNzwzXRhbZg/OX+MpES6Zk1a6A==} engines: {node: '>=12.10'} dependencies: rimraf: 3.0.2 @@ -10105,12 +9825,12 @@ packages: acorn-walk: 7.2.0 dev: true - /acorn-import-assertions@1.9.0(acorn@8.9.0): + /acorn-import-assertions@1.9.0(acorn@8.10.0): resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} peerDependencies: acorn: ^8 dependencies: - acorn: 8.9.0 + acorn: 8.10.0 dev: true /acorn-jsx@5.3.2(acorn@7.4.1): @@ -10121,12 +9841,12 @@ packages: acorn: 7.4.1 dev: true - /acorn-jsx@5.3.2(acorn@8.9.0): + /acorn-jsx@5.3.2(acorn@8.10.0): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.9.0 + acorn: 8.10.0 /acorn-walk@7.2.0: resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} @@ -10144,8 +9864,8 @@ packages: hasBin: true dev: true - /acorn@8.9.0: - resolution: {integrity: sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==} + /acorn@8.10.0: + resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} engines: {node: '>=0.4.0'} hasBin: true @@ -10171,15 +9891,11 @@ packages: transitivePeerDependencies: - supports-color - /agentkeepalive@4.3.0: - resolution: {integrity: sha512-7Epl1Blf4Sy37j4v9f9FjICCh4+KAQOyXgHEwlyBiAQLbhKdq/i2QQU3amQalS/wPhdPzDXPL5DMR5bkn+YeWg==} + /agentkeepalive@4.5.0: + resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} engines: {node: '>= 8.0.0'} dependencies: - debug: 4.3.4 - depd: 2.0.0 humanize-ms: 1.2.1 - transitivePeerDependencies: - - supports-color dev: true /aggregate-error@3.1.0: @@ -10328,18 +10044,23 @@ packages: tar-stream: 2.2.0 zip-stream: 4.1.0 - /archy@1.0.0: - resolution: {integrity: sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==} - dev: false - - /are-we-there-yet@2.0.0: - resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} - engines: {node: '>=10'} + /archiver@5.3.2: + resolution: {integrity: sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw==} + engines: {node: '>= 10'} dependencies: - delegates: 1.0.0 + archiver-utils: 2.1.0 + async: 3.2.4 + buffer-crc32: 0.2.13 readable-stream: 3.6.2 + readdir-glob: 1.1.3 + tar-stream: 2.2.0 + zip-stream: 4.1.0 dev: true + /archy@1.0.0: + resolution: {integrity: sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==} + dev: false + /are-we-there-yet@3.0.1: resolution: {integrity: sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -10363,10 +10084,17 @@ packages: /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + /aria-hidden@1.2.3: + resolution: {integrity: sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==} + engines: {node: '>=10'} + dependencies: + tslib: 2.6.2 + dev: true + /aria-query@5.1.3: resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==} dependencies: - deep-equal: 2.2.1 + deep-equal: 2.2.2 dev: true /aria-query@5.3.0: @@ -10386,11 +10114,6 @@ packages: call-bind: 1.0.2 is-array-buffer: 3.0.2 - /array-find-index@1.0.2: - resolution: {integrity: sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==} - engines: {node: '>=0.10.0'} - dev: true - /array-flatten@1.1.1: resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} @@ -10404,7 +10127,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - es-abstract: 1.21.2 + es-abstract: 1.22.1 get-intrinsic: 1.2.1 is-string: 1.0.7 @@ -10415,13 +10138,23 @@ packages: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} + /array.prototype.findlastindex@1.2.3: + resolution: {integrity: sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + es-shim-unscopables: 1.0.0 + get-intrinsic: 1.2.1 + /array.prototype.flat@1.3.1: resolution: {integrity: sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - es-abstract: 1.21.2 + es-abstract: 1.22.1 es-shim-unscopables: 1.0.0 /array.prototype.flatmap@1.3.1: @@ -10430,7 +10163,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - es-abstract: 1.21.2 + es-abstract: 1.22.1 es-shim-unscopables: 1.0.0 /array.prototype.tosorted@1.1.1: @@ -10438,11 +10171,22 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - es-abstract: 1.21.2 + es-abstract: 1.22.1 es-shim-unscopables: 1.0.0 get-intrinsic: 1.2.1 dev: false + /arraybuffer.prototype.slice@1.0.1: + resolution: {integrity: sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.0 + call-bind: 1.0.2 + define-properties: 1.2.0 + get-intrinsic: 1.2.1 + is-array-buffer: 3.0.2 + is-shared-array-buffer: 1.0.2 + /arrify@1.0.1: resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} engines: {node: '>=0.10.0'} @@ -10475,21 +10219,21 @@ packages: resolution: {integrity: sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==} engines: {node: '>=4'} dependencies: - tslib: 2.6.0 + tslib: 2.6.2 dev: true /ast-types@0.15.2: resolution: {integrity: sha512-c27loCv9QkZinsa5ProX751khO9DJl/AcB5c2KNtA6NRvHKS0PgLfcftz72KVq504vB0Gku5s2kUZzDBvQWvHg==} engines: {node: '>=4'} dependencies: - tslib: 2.6.0 + tslib: 2.6.2 dev: true /ast-types@0.16.1: resolution: {integrity: sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==} engines: {node: '>=4'} dependencies: - tslib: 2.6.0 + tslib: 2.6.2 dev: true /astral-regex@2.0.0: @@ -10503,6 +10247,12 @@ packages: /async@3.2.4: resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} + /asynciterator.prototype@1.0.0: + resolution: {integrity: sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==} + dependencies: + has-symbols: 1.0.3 + dev: false + /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -10510,30 +10260,31 @@ packages: resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} engines: {node: '>= 4.0.0'} - /atomically@2.0.1: - resolution: {integrity: sha512-sxBhVZUFBFhqSAsYMM3X2oaUi2NVDJ8U026FsIusM8gYXls9AYs/eXzgGrufs1Qjpkxi9zunds+75QUFz+m7UQ==} + /atomically@2.0.2: + resolution: {integrity: sha512-Xfmb4q5QV7uqTlVdMSTtO5eF4DCHfNOdaPyKlbFShkzeNP+3lj3yjjcbdjSmEY4+pDBKJ9g26aP+ImTe88UHoQ==} dependencies: - stubborn-fs: 1.2.4 - when-exit: 2.1.0 + stubborn-fs: 1.2.5 + when-exit: 2.1.1 + dev: true /auto-bind@4.0.0: resolution: {integrity: sha512-Hdw8qdNiqdJ8LqT0iK0sVzkFbzg6fhnQqqfWhBDxcHZvU75+B+ayzTy8x+k5Ix0Y92XOhOUlx74ps+bA6BeYMQ==} engines: {node: '>=8'} dev: true - /autoprefixer@10.4.14(postcss@8.4.24): - resolution: {integrity: sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==} + /autoprefixer@10.4.15(postcss@8.4.29): + resolution: {integrity: sha512-KCuPB8ZCIqFdA4HwKXsvz7j6gvSDNhDP7WnUjBleRkKjPdvCmHFuQ77ocavI8FT6NdvlBnE2UFr2H4Mycn8Vew==} engines: {node: ^10 || ^12 || >=14} hasBin: true peerDependencies: postcss: ^8.1.0 dependencies: - browserslist: 4.21.9 - caniuse-lite: 1.0.30001509 - fraction.js: 4.2.0 + browserslist: 4.21.10 + caniuse-lite: 1.0.30001525 + fraction.js: 4.3.6 normalize-range: 0.1.2 picocolors: 1.0.0 - postcss: 8.4.24 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true @@ -10541,55 +10292,25 @@ packages: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} - /aws-cdk-lib@2.64.0(constructs@10.2.51): - resolution: {integrity: sha512-IrgL7thb6TeOyHgyR/qKWTdA9FBb9lv7Z9QPDzCNJlkKI+0ANjYHy3RYV8Gd+1+kc6l8DG9Z1elij40YCr/Ptg==} - engines: {node: '>= 14.15.0'} - peerDependencies: - constructs: ^10.0.0 - dependencies: - '@aws-cdk/asset-awscli-v1': 2.2.199 - '@aws-cdk/asset-kubectl-v20': 2.1.2 - '@aws-cdk/asset-node-proxy-agent-v5': 2.0.165 - '@balena/dockerignore': 1.0.2 - case: 1.6.3 - constructs: 10.2.51 - fs-extra: 9.1.0 - ignore: 5.2.4 - jsonschema: 1.4.1 - minimatch: 3.1.2 - punycode: 2.3.0 - semver: 7.5.3 - yaml: 1.10.2 - dev: false - bundledDependencies: - - '@balena/dockerignore' - - case - - fs-extra - - ignore - - jsonschema - - minimatch - - punycode - - semver - - yaml - - /aws-cdk-lib@2.64.0(constructs@10.2.69): - resolution: {integrity: sha512-IrgL7thb6TeOyHgyR/qKWTdA9FBb9lv7Z9QPDzCNJlkKI+0ANjYHy3RYV8Gd+1+kc6l8DG9Z1elij40YCr/Ptg==} + /aws-cdk-lib@2.94.0(constructs@10.2.70): + resolution: {integrity: sha512-pB/UzKeM+p/wY9WuFYkEewOFUh2r8qwaML63is4vUChXY2G2Bj3pGyfJ97Xir2Q5KIhgJPJz5igdouI4+F9A+g==} engines: {node: '>= 14.15.0'} peerDependencies: constructs: ^10.0.0 dependencies: - '@aws-cdk/asset-awscli-v1': 2.2.199 + '@aws-cdk/asset-awscli-v1': 2.2.200 '@aws-cdk/asset-kubectl-v20': 2.1.2 - '@aws-cdk/asset-node-proxy-agent-v5': 2.0.165 + '@aws-cdk/asset-node-proxy-agent-v6': 2.0.1 '@balena/dockerignore': 1.0.2 case: 1.6.3 - constructs: 10.2.69 - fs-extra: 9.1.0 + constructs: 10.2.70 + fs-extra: 11.1.1 ignore: 5.2.4 jsonschema: 1.4.1 minimatch: 3.1.2 punycode: 2.3.0 - semver: 7.5.3 + semver: 7.5.4 + table: 6.8.1 yaml: 1.10.2 dev: false bundledDependencies: @@ -10601,24 +10322,25 @@ packages: - minimatch - punycode - semver + - table - yaml - /aws-sdk-client-mock-jest@2.0.1(aws-sdk-client-mock@2.0.1): - resolution: {integrity: sha512-mQN3rWzk+b9+kxMAeV9fxu8+lDOFpmvBc+dgU9Sd+HkF+0Sl9O9upFRS7NudyVDcq7KF/30jsC2Dju2Q28nlIw==} + /aws-sdk-client-mock-jest@2.2.0(aws-sdk-client-mock@2.2.0): + resolution: {integrity: sha512-lpPapmCjTe70qhXYFIjUL9cdA75YmtC0surig3QSr2Y5doaG1e4fuXlgkNeH6V873rlwu9TWCG2MFOr4rHuMfg==} peerDependencies: - aws-sdk-client-mock: 2.0.1 + aws-sdk-client-mock: 2.2.0 dependencies: '@types/jest': 28.1.8 - aws-sdk-client-mock: 2.0.1 - tslib: 2.6.0 + aws-sdk-client-mock: 2.2.0 + tslib: 2.6.2 dev: true - /aws-sdk-client-mock@2.0.1: - resolution: {integrity: sha512-Ib/AnI8ZdoIxOBbKSs28TUwJb7FI/AYVYn48PcXx6guk5fBs4GZJJEc+Ci9aImRtVmgO6jHN/6Etz17fr6j3qw==} + /aws-sdk-client-mock@2.2.0: + resolution: {integrity: sha512-Kq2N+6gHRDedbrgTA0NMMfyN1XDWEA5Kbpm9/M/cenSxoNjfvQBOtBawI1lQe5h4UziLl///E7u17K9PBoHEKA==} dependencies: - '@types/sinon': 10.0.15 + '@types/sinon': 10.0.16 sinon: 14.0.2 - tslib: 2.6.0 + tslib: 2.6.2 dev: true /axe-core@4.7.2: @@ -10649,26 +10371,26 @@ packages: typed-rest-client: 1.8.11 dev: true - /babel-core@7.0.0-bridge.0(@babel/core@7.22.5): + /babel-core@7.0.0-bridge.0(@babel/core@7.22.11): resolution: {integrity: sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 dev: true - /babel-jest@27.5.1(@babel/core@7.22.5): + /babel-jest@27.5.1(@babel/core@7.22.11): resolution: {integrity: sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} peerDependencies: '@babel/core': ^7.8.0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 '@types/babel__core': 7.20.1 babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 27.5.1(@babel/core@7.22.5) + babel-preset-jest: 27.5.1(@babel/core@7.22.11) chalk: 4.1.2 graceful-fs: 4.2.11 slash: 3.0.0 @@ -10676,17 +10398,17 @@ packages: - supports-color dev: true - /babel-jest@29.5.0(@babel/core@7.22.5): - resolution: {integrity: sha512-mA4eCDh5mSo2EcA9xQjVTpmbbNk32Zb3Q3QFQsNhaK56Q+yoXowzFodLux30HRgyOho5rsQ6B0P9QpMkvvnJ0Q==} + /babel-jest@29.6.4(@babel/core@7.22.11): + resolution: {integrity: sha512-meLj23UlSLddj6PC+YTOFRgDAtjnZom8w/ACsrx0gtPtv5cJZk0A5Unk5bV4wixD7XaPCN1fQvpww8czkZURmw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@babel/core': ^7.8.0 dependencies: - '@babel/core': 7.22.5 - '@jest/transform': 29.5.0 + '@babel/core': 7.22.11 + '@jest/transform': 29.6.4 '@types/babel__core': 7.20.1 babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 29.5.0(@babel/core@7.22.5) + babel-preset-jest: 29.6.3(@babel/core@7.22.11) chalk: 4.1.2 graceful-fs: 4.2.11 slash: 3.0.0 @@ -10712,133 +10434,97 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@babel/template': 7.22.5 - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 '@types/babel__core': 7.20.1 '@types/babel__traverse': 7.20.1 dev: true - /babel-plugin-jest-hoist@29.5.0: - resolution: {integrity: sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==} + /babel-plugin-jest-hoist@29.6.3: + resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@babel/template': 7.22.5 - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 '@types/babel__core': 7.20.1 - '@types/babel__traverse': 7.20.1 - dev: true - - /babel-plugin-polyfill-corejs2@0.3.3(@babel/core@7.21.8): - resolution: {integrity: sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/compat-data': 7.22.5 - '@babel/core': 7.21.8 - '@babel/helper-define-polyfill-provider': 0.3.3(@babel/core@7.21.8) - semver: 6.3.0 - transitivePeerDependencies: - - supports-color - dev: true - - /babel-plugin-polyfill-corejs2@0.4.3(@babel/core@7.22.5): - resolution: {integrity: sha512-bM3gHc337Dta490gg+/AseNB9L4YLHxq1nGKZZSHbhXv4aTYU2MD2cjza1Ru4S6975YLTaL1K8uJf6ukJhhmtw==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/compat-data': 7.22.5 - '@babel/core': 7.22.5 - '@babel/helper-define-polyfill-provider': 0.4.0(@babel/core@7.22.5) - semver: 6.3.0 - transitivePeerDependencies: - - supports-color - dev: true - - /babel-plugin-polyfill-corejs3@0.6.0(@babel/core@7.21.8): - resolution: {integrity: sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.21.8 - '@babel/helper-define-polyfill-provider': 0.3.3(@babel/core@7.21.8) - core-js-compat: 3.31.0 - transitivePeerDependencies: - - supports-color + '@types/babel__traverse': 7.20.1 dev: true - /babel-plugin-polyfill-corejs3@0.8.1(@babel/core@7.22.5): - resolution: {integrity: sha512-ikFrZITKg1xH6pLND8zT14UPgjKHiGLqex7rGEZCH2EvhsneJaJPemmpQaIZV5AL03II+lXylw3UmddDK8RU5Q==} + /babel-plugin-polyfill-corejs2@0.4.5(@babel/core@7.22.11): + resolution: {integrity: sha512-19hwUH5FKl49JEsvyTcoHakh6BE0wgXLLptIyKZ3PijHc/Ci521wygORCUCCred+E/twuqRyAkE02BAWPmsHOg==} peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-define-polyfill-provider': 0.4.0(@babel/core@7.22.5) - core-js-compat: 3.31.0 + '@babel/compat-data': 7.22.9 + '@babel/core': 7.22.11 + '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.11) + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true - /babel-plugin-polyfill-regenerator@0.4.1(@babel/core@7.21.8): - resolution: {integrity: sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==} + /babel-plugin-polyfill-corejs3@0.8.3(@babel/core@7.22.11): + resolution: {integrity: sha512-z41XaniZL26WLrvjy7soabMXrfPWARN25PZoriDEiLMxAp50AUW3t35BGQUMg5xK3UrpVTtagIDklxYa+MhiNA==} peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.21.8 - '@babel/helper-define-polyfill-provider': 0.3.3(@babel/core@7.21.8) + '@babel/core': 7.22.11 + '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.11) + core-js-compat: 3.32.1 transitivePeerDependencies: - supports-color dev: true - /babel-plugin-polyfill-regenerator@0.5.0(@babel/core@7.22.5): - resolution: {integrity: sha512-hDJtKjMLVa7Z+LwnTCxoDLQj6wdc+B8dun7ayF2fYieI6OzfuvcLMB32ihJZ4UhCBwNYGl5bg/x/P9cMdnkc2g==} + /babel-plugin-polyfill-regenerator@0.5.2(@babel/core@7.22.11): + resolution: {integrity: sha512-tAlOptU0Xj34V1Y2PNTL4Y0FOJMDB6bZmoW39FeCQIhigGLkqu3Fj6uiXpxIf6Ij274ENdYx64y6Au+ZKlb1IA==} peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.22.5 - '@babel/helper-define-polyfill-provider': 0.4.0(@babel/core@7.22.5) + '@babel/core': 7.22.11 + '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.22.11) transitivePeerDependencies: - supports-color dev: true - /babel-preset-current-node-syntax@1.0.1(@babel/core@7.22.5): + /babel-preset-current-node-syntax@1.0.1(@babel/core@7.22.11): resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.5 - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.5) - '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.22.5) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.22.5) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.5) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.5) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.5) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.22.5) - dev: true - - /babel-preset-jest@27.5.1(@babel/core@7.22.5): + '@babel/core': 7.22.11 + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.11) + '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.22.11) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.22.11) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.22.11) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.22.11) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.22.11) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.22.11) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.22.11) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.22.11) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.22.11) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.11) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.22.11) + dev: true + + /babel-preset-jest@27.5.1(@babel/core@7.22.11): resolution: {integrity: sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 babel-plugin-jest-hoist: 27.5.1 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.5) + babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.11) dev: true - /babel-preset-jest@29.5.0(@babel/core@7.22.5): - resolution: {integrity: sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg==} + /babel-preset-jest@29.6.3(@babel/core@7.22.11): + resolution: {integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.5 - babel-plugin-jest-hoist: 29.5.0 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.5) + '@babel/core': 7.22.11 + babel-plugin-jest-hoist: 29.6.3 + babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.11) dev: true /backport@8.5.0: @@ -10887,11 +10573,11 @@ packages: dev: false optional: true - /better-opn@2.1.1: - resolution: {integrity: sha512-kIPXZS5qwyKiX/HcRvDYfmBQUa8XP17I0mYZZ0y4UhpYOSvtsLHDYqmomS+Mj20aDvD3knEiQ0ecQy2nhio3yA==} - engines: {node: '>8.0.0'} + /better-opn@3.0.2: + resolution: {integrity: sha512-aVNobHnJqLiUelTaHat9DZ1qM2w0C0Eym4LPI/3JxOnSokGVdsl1T1kN7TFvsEAD8G47A6VKQ0TVHqbBnYMJlQ==} + engines: {node: '>=12.0.0'} dependencies: - open: 7.4.2 + open: 8.4.2 dev: true /better-path-resolve@1.0.0: @@ -10939,8 +10625,8 @@ packages: transitivePeerDependencies: - supports-color - /bole@5.0.5: - resolution: {integrity: sha512-0hIw7WGx47i59q7FVPIDgS3Zo7ocisK3RKlNj18luJZvyjoPrDt4f9xTF51Axx92uMfTIjsvsxHowPtEHcQXCA==} + /bole@5.0.7: + resolution: {integrity: sha512-VOZfL/f6/Khk7dIDA8U7+kEltBRynoeuahXj3XcCM3InRR4X1SVfTz3aZGWbipWoLdf316cJdxONZrInosmfew==} dependencies: fast-safe-stringify: 2.1.1 individual: 3.0.0 @@ -10966,9 +10652,10 @@ packages: type-fest: 0.20.2 widest-line: 3.1.0 wrap-ansi: 7.0.0 + dev: false - /boxen@7.1.0: - resolution: {integrity: sha512-ScG8CDo8dj7McqCZ5hz4dIBp20xj4unQ2lXIDa7ff6RcZElCpuNzutdwzKVvRikfNjm7CFAlR3HJHcoHkDOExQ==} + /boxen@7.1.1: + resolution: {integrity: sha512-2hCgjEmP8YLWQ130n2FerGv7rYpfBmnmp9Uy2Le1vge6X3gZIfSmEzP5QTDElFxcvVcXlEn8Aq6MU/PZygIOog==} engines: {node: '>=14.16'} dependencies: ansi-align: 3.0.1 @@ -11018,15 +10705,15 @@ packages: pako: 0.2.9 dev: true - /browserslist@4.21.9: - resolution: {integrity: sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==} + /browserslist@4.21.10: + resolution: {integrity: sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001509 - electron-to-chromium: 1.4.445 - node-releases: 2.0.12 - update-browserslist-db: 1.0.11(browserslist@4.21.9) + caniuse-lite: 1.0.30001525 + electron-to-chromium: 1.4.508 + node-releases: 2.0.13 + update-browserslist-db: 1.0.11(browserslist@4.21.10) dev: true /bs-logger@0.2.6: @@ -11073,7 +10760,7 @@ packages: /builtins@5.0.1: resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} dependencies: - semver: 7.5.3 + semver: 7.5.4 dev: true /bundle-name@3.0.0: @@ -11092,13 +10779,13 @@ packages: load-tsconfig: 0.2.5 dev: true - /bundle-require@4.0.1(esbuild@0.18.10): + /bundle-require@4.0.1(esbuild@0.18.20): resolution: {integrity: sha512-9NQkRHlNdNpDBGmLpngF3EFDcwodhMUuLz9PaWYciVcQF9SE4LFjM2DB/xV1Li5JiuDMv7ZUWuC3rGbqR0MAXQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} peerDependencies: esbuild: '>=0.17' dependencies: - esbuild: 0.18.10 + esbuild: 0.18.20 load-tsconfig: 0.2.5 dev: true @@ -11118,9 +10805,9 @@ packages: defu: 6.1.2 dotenv: 16.3.1 giget: 1.1.2 - jiti: 1.18.2 - mlly: 1.4.0 - ohash: 1.1.2 + jiti: 1.19.3 + mlly: 1.4.1 + ohash: 1.1.3 pathe: 1.1.1 perfect-debounce: 1.0.0 pkg-types: 1.0.3 @@ -11139,8 +10826,8 @@ packages: find-up: 5.0.0 foreground-child: 2.0.0 istanbul-lib-coverage: 3.2.0 - istanbul-lib-report: 3.0.0 - istanbul-reports: 3.1.5 + istanbul-lib-report: 3.0.1 + istanbul-reports: 3.1.6 rimraf: 3.0.2 test-exclude: 6.0.0 v8-to-istanbul: 9.1.0 @@ -11153,47 +10840,21 @@ packages: engines: {node: '>=8'} dev: true - /cacache@16.1.3: - resolution: {integrity: sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - dependencies: - '@npmcli/fs': 2.1.2 - '@npmcli/move-file': 2.0.1 - chownr: 2.0.0 - fs-minipass: 2.1.0 - glob: 8.1.0 - infer-owner: 1.0.4 - lru-cache: 7.18.3 - minipass: 3.3.6 - minipass-collect: 1.0.2 - minipass-flush: 1.0.5 - minipass-pipeline: 1.2.4 - mkdirp: 1.0.4 - p-map: 4.0.0 - promise-inflight: 1.0.1 - rimraf: 3.0.2 - ssri: 9.0.1 - tar: 6.1.13 - unique-filename: 2.0.1 - transitivePeerDependencies: - - bluebird - dev: true - - /cacache@17.1.3: - resolution: {integrity: sha512-jAdjGxmPxZh0IipMdR7fK/4sDSrHMLUV0+GvVUsjwyGNKHsh79kW/otg+GkbXwl6Uzvy9wsvHOX4nUoWldeZMg==} + /cacache@17.1.4: + resolution: {integrity: sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: '@npmcli/fs': 3.1.0 - fs-minipass: 3.0.2 - glob: 10.3.1 + fs-minipass: 3.0.3 + glob: 10.3.4 lru-cache: 7.18.3 - minipass: 5.0.0 + minipass: 7.0.3 minipass-collect: 1.0.2 minipass-flush: 1.0.5 minipass-pipeline: 1.2.4 p-map: 4.0.0 - ssri: 10.0.4 - tar: 6.1.13 + ssri: 10.0.5 + tar: 6.1.15 unique-filename: 3.0.0 dev: true @@ -11202,14 +10863,14 @@ packages: engines: {node: '>=14.16'} dev: true - /cacheable-request@10.2.12: - resolution: {integrity: sha512-qtWGB5kn2OLjx47pYUkWicyOpK1vy9XZhq8yRTXOy+KAmjjESSRLx6SiExnnaGGUP1NM6/vmygMu0fGylNh9tw==} + /cacheable-request@10.2.13: + resolution: {integrity: sha512-3SD4rrMu1msNGEtNSt8Od6enwdo//U9s4ykmXfA2TD58kcLkCobtCDiby7kNyj7a/Q7lz/mAesAFI54rTdnvBA==} engines: {node: '>=14.16'} dependencies: '@types/http-cache-semantics': 4.0.1 get-stream: 6.0.1 http-cache-semantics: 4.1.1 - keyv: 4.5.2 + keyv: 4.5.3 mimic-response: 4.0.0 normalize-url: 8.0.0 responselike: 3.0.0 @@ -11229,15 +10890,6 @@ packages: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} - /camelcase-keys@4.2.0: - resolution: {integrity: sha512-Ej37YKYbFUI8QiYlvj9YHb6/Z60dZyPJW0Cs8sFilMbd2lP0bw3ylAq9yJkK4lcTA2dID5fG8LjmJYbO7kWb7Q==} - engines: {node: '>=4'} - dependencies: - camelcase: 4.1.0 - map-obj: 2.0.0 - quick-lru: 1.1.0 - dev: true - /camelcase-keys@6.2.2: resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} engines: {node: '>=8'} @@ -11246,11 +10898,6 @@ packages: map-obj: 4.3.0 quick-lru: 4.0.1 - /camelcase@4.1.0: - resolution: {integrity: sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==} - engines: {node: '>=4'} - dev: true - /camelcase@5.3.1: resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} engines: {node: '>=6'} @@ -11268,26 +10915,26 @@ packages: resolution: {integrity: sha512-eOgiEWqjppB+3DN/5E82EQ8dTINus8d9GXMCbEsUnp2hcUIcXmBvzWmD3tXMk3CuBK0v+ddK9qw0EAF+JVRMjQ==} engines: {node: '>=10.13'} dependencies: - path-temp: 2.0.0 + path-temp: 2.1.0 dev: false - /caniuse-lite@1.0.30001509: - resolution: {integrity: sha512-2uDDk+TRiTX5hMcUYT/7CSyzMZxjfGu0vAUjS2g0LSD8UoXOv0LtpH4LxGMemsiPq6LCVIUjNwVM0erkOkGCDA==} + /caniuse-lite@1.0.30001525: + resolution: {integrity: sha512-/3z+wB4icFt3r0USMwxujAqRvaD/B7rvGTsKhbhSQErVrJvkZCLhgNLJxU8MevahQVH6hCU9FsHdNUFbiwmE7Q==} dev: true /case@1.6.3: resolution: {integrity: sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==} engines: {node: '>= 0.8.0'} - /cdk8s-plus-27@2.7.0(cdk8s@2.60.0)(constructs@10.2.51): - resolution: {integrity: sha512-Ii6XKP88+IkARCfecKAimWwrDTK4cSrUylxQAvbQ40Mbro82GqlITyGPVbBjToOc9753dTJUHziwGEp30YIJSQ==} + /cdk8s-plus-27@2.7.1(cdk8s@2.64.2)(constructs@10.2.70): + resolution: {integrity: sha512-zF/QGx+S/299wuTrvww5PjZ0yLXc/LDc9hyQbyQEImPLITpvRfYXAlMxCR5AXOsIgUgZlkuhBss91D7/HXkC8Q==} engines: {node: '>= 16.20.0'} peerDependencies: - cdk8s: ^2.30.0 - constructs: ^10.2.69 + cdk8s: ^2.64.2 + constructs: ^10.2.70 dependencies: - cdk8s: 2.60.0(constructs@10.2.51) - constructs: 10.2.51 + cdk8s: 2.64.2(constructs@10.2.70) + constructs: 10.2.70 minimatch: 3.1.2 optionalDependencies: backport: 8.5.0 @@ -11298,16 +10945,16 @@ packages: bundledDependencies: - minimatch - /cdk8s@2.60.0(constructs@10.2.51): - resolution: {integrity: sha512-65hp3sjf61zvBo9r3pna/ed1wIodXa9FynOELwyTYBsVez4jfwI0B8gWNngB16GtklBJ/PKI0DWvJVB0IFE9Kw==} + /cdk8s@2.64.2(constructs@10.2.70): + resolution: {integrity: sha512-dpMFuWePDM0jZyvACZnOhekIA3mrSnx6KP9VsUg2QhcVIYMekN6HW4DfORu35Fms01V9Wg/eL/qhzIwHVeXdsA==} engines: {node: '>= 16.20.0'} peerDependencies: constructs: ^10 dependencies: - constructs: 10.2.51 + constructs: 10.2.70 fast-json-patch: 3.1.1 follow-redirects: 1.15.2 - yaml: 2.3.1 + yaml: 2.3.2 optionalDependencies: backport: 8.5.0 transitivePeerDependencies: @@ -11327,24 +10974,24 @@ packages: '@cdktf/commons': 0.17.0 '@cdktf/hcl2cdk': 0.17.0 '@cdktf/hcl2json': 0.17.0 - '@inquirer/prompts': 2.2.0 + '@inquirer/prompts': 2.3.1 '@sentry/node': 6.19.7 - cdktf: 0.17.0(constructs@10.2.69) - codemaker: 1.84.0 - constructs: 10.2.69 + cdktf: 0.17.0(constructs@10.2.70) + codemaker: 1.88.0 + constructs: 10.2.70 cross-spawn: 7.0.3 https-proxy-agent: 5.0.1 ink-select-input: 4.2.2(ink@3.2.0)(react@17.0.2) ink-table: 3.0.0(ink@3.2.0)(react@17.0.2) - jsii: 5.0.11(patch_hash=zhi5puwzi5jiulxnmqgkd4wl2a) - jsii-pacmak: 1.84.0 + jsii: 5.0.21 + jsii-pacmak: 1.88.0 minimatch: 5.1.6 - node-fetch: 2.6.12 + node-fetch: 2.7.0 pidtree: 0.6.0 pidusage: 3.0.2 tunnel-agent: 0.6.0 xml-js: 1.6.11 - yargs: 17.6.2 + yargs: 17.7.2 yoga-layout-prebuilt: 1.10.0 zod: 1.11.17 transitivePeerDependencies: @@ -11358,37 +11005,37 @@ packages: - utf-8-validate dev: true - /cdktf@0.17.0(constructs@10.2.51): + /cdktf@0.17.0(constructs@10.2.70): resolution: {integrity: sha512-4R57uBLBqeb8NgfKZdn/az8UE3yXxGHyzH6Xjsz1Oo9kNvSkPibX7YqNLUpuCgdYNVgU2fdaNoHj9h4LXc6iCw==} peerDependencies: constructs: ^10.0.25 dependencies: archiver: 5.3.1 - constructs: 10.2.51 + constructs: 10.2.70 json-stable-stringify: 1.0.2 - semver: 7.5.3 - dev: false + semver: 7.5.4 bundledDependencies: - archiver - json-stable-stringify - semver - /cdktf@0.17.0(constructs@10.2.69): - resolution: {integrity: sha512-4R57uBLBqeb8NgfKZdn/az8UE3yXxGHyzH6Xjsz1Oo9kNvSkPibX7YqNLUpuCgdYNVgU2fdaNoHj9h4LXc6iCw==} + /cdktf@0.17.3(constructs@10.2.70): + resolution: {integrity: sha512-bqAzuuYLc8sy0ZoKw/RnohS6SH6fwAhCsU31vxuEiwu0BVcCaExfjQVZx/iJgmF1TJqk/cu2fMCLUgT3PDAuhQ==} peerDependencies: constructs: ^10.0.25 dependencies: archiver: 5.3.1 - constructs: 10.2.69 + constructs: 10.2.70 json-stable-stringify: 1.0.2 - semver: 7.5.3 + semver: 7.5.4 + dev: true bundledDependencies: - archiver - json-stable-stringify - semver - /chai@4.3.7: - resolution: {integrity: sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==} + /chai@4.3.8: + resolution: {integrity: sha512-vX4YvVVtxlfSZ2VecZgFUTU5qPCYsobVI2O9FmwEXBhDigYGQA6jRXCycIs1yJnnWbZ6/+a2zNIF5DfVCcJBFQ==} engines: {node: '>=4'} dependencies: assertion-error: 1.1.0 @@ -11420,24 +11067,25 @@ packages: engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} dev: true - /changelogen@0.5.3: - resolution: {integrity: sha512-RjTrgJlTHhbGlMo/s73j7uSTspla3ykr0UA5zwRs/HIZvElY6qZHu3X70httgC2Du5poS2wFCS10WLfwZr7ZTQ==} + /changelogen@0.5.5: + resolution: {integrity: sha512-IzgToIJ/R9NhVKmL+PW33ozYkv53bXvufDNUSH3GTKXq1iCHGgkbgbtqEWbo8tnWNnt7nPDpjL8PwSG2iS8RVw==} hasBin: true dependencies: c12: 1.4.2 colorette: 2.0.20 - consola: 3.2.2 + consola: 3.2.3 convert-gitmoji: 0.1.3 - execa: 7.1.1 + execa: 8.0.1 mri: 1.2.0 - node-fetch-native: 1.2.0 - ofetch: 1.1.1 + node-fetch-native: 1.4.0 + ofetch: 1.3.3 open: 9.1.0 pathe: 1.1.1 pkg-types: 1.0.3 scule: 1.0.0 - semver: 7.5.2 - yaml: 2.2.1 + semver: 7.5.4 + std-env: 3.4.3 + yaml: 2.3.2 transitivePeerDependencies: - supports-color dev: false @@ -11493,7 +11141,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 /chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} @@ -11576,13 +11224,6 @@ packages: '@colors/colors': 1.5.0 dev: true - /cli-table@0.3.11: - resolution: {integrity: sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ==} - engines: {node: '>= 0.2.0'} - dependencies: - colors: 1.0.3 - dev: true - /cli-truncate@2.1.0: resolution: {integrity: sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==} engines: {node: '>=8'} @@ -11596,8 +11237,8 @@ packages: dev: false optional: true - /cli-width@4.0.0: - resolution: {integrity: sha512-ZksGS2xpa/bYkNzN3BAw1wEjsLV/ZKOf/CCrJ/QOBsxx6fOARIkwTutxp1XIOIohi6HKmOFjMoK/XaqDVUpEEw==} + /cli-width@4.1.0: + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} engines: {node: '>= 12'} dev: true @@ -11662,8 +11303,8 @@ packages: convert-to-spaces: 1.0.2 dev: true - /codemaker@1.84.0: - resolution: {integrity: sha512-sOUH3y2q2DEO+gDiBCCoGgkDs8aMY0LTMH0FmHbKpqReZwWDAmWJ0Voc4Thp4Mn380bPku9/ncqyY1a3MZnfEQ==} + /codemaker@1.88.0: + resolution: {integrity: sha512-/7+1mPQCEFmBm9zhf5blMiqirCcXNwulb8dozu2LVsDLgnafPt1h2eg/OwvyrqSMWUnsIFetAssKVP2gE66MPQ==} engines: {node: '>= 14.17.0'} dependencies: camelcase: 6.3.0 @@ -11679,8 +11320,8 @@ packages: - supports-color dev: false - /collect-v8-coverage@1.0.1: - resolution: {integrity: sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==} + /collect-v8-coverage@1.0.2: + resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} dev: true /color-convert@1.9.3: @@ -11724,11 +11365,6 @@ packages: /colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} - /colors@1.0.3: - resolution: {integrity: sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==} - engines: {node: '>=0.1.90'} - dev: true - /colorspace@1.1.4: resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==} dependencies: @@ -11747,10 +11383,9 @@ packages: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} dev: true - /commander@10.0.0: - resolution: {integrity: sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA==} + /commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} engines: {node: '>=14'} - dev: false /commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} @@ -11764,11 +11399,6 @@ packages: engines: {node: '>= 6'} dev: true - /commander@9.5.0: - resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} - engines: {node: ^12.20.0 || >=14} - dev: true - /comment-json@4.2.2: resolution: {integrity: sha512-H8T+kl3nZesZu41zO2oNXIJWojNeK3mHxCLrsBNu6feksBXsgb+PtYz5daP5P86A0F3sz3840KVYehr04enISQ==} engines: {node: '>= 6'} @@ -11872,22 +11502,22 @@ packages: js-string-escape: 1.0.1 lodash: 4.17.21 md5-hex: 3.0.1 - semver: 7.5.3 + semver: 7.5.4 well-known-symbols: 2.0.0 dev: true - /conf@11.0.1: - resolution: {integrity: sha512-WlLiQboEjKx0bYx2IIRGedBgNjLAxtwPaCSnsjWPST5xR0DB4q8lcsO/bEH9ZRYNcj63Y9vj/JG/5Fg6uWzI0Q==} + /conf@11.0.2: + resolution: {integrity: sha512-jjyhlQ0ew/iwmtwsS2RaB6s8DBifcE2GYBEaw2SJDUY/slJJbNfY4GlDVzOs/ff8cM/Wua5CikqXgbFl5eu85A==} engines: {node: '>=14.16'} dependencies: ajv: 8.12.0 ajv-formats: 2.1.1(ajv@8.12.0) - atomically: 2.0.1 + atomically: 2.0.2 debounce-fn: 5.1.2 dot-prop: 7.2.0 env-paths: 3.0.0 json-schema-typed: 8.0.1 - semver: 7.5.2 + semver: 7.5.4 dev: true /config-chain@1.1.13: @@ -11907,8 +11537,8 @@ packages: xdg-basedir: 5.1.0 dev: true - /consola@3.2.2: - resolution: {integrity: sha512-r921u0vbF4lQsoIqYvSSER+yZLPQGijOHrYcWoCNVNBZmn/bRR+xT/DgerTze/nLD9TTGzdDa378TVhx7RDOYg==} + /consola@3.2.3: + resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} engines: {node: ^14.18.0 || >=16.10.0} dev: false @@ -11916,19 +11546,14 @@ packages: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} dev: true - /constructs@10.2.51: - resolution: {integrity: sha512-vB96JQJzno7k0e+dX7Y9UmV4NDxqdr+2qnD5izDi552u7uFSpRF88GAEJjtv2eAWHG4WCDNu9+lV59Z3fYHlRQ==} + /constructs@10.2.70: + resolution: {integrity: sha512-z6zr1E8K/9tzJbCQzY0UGX0/oVKPFKu9C/mzEnghCG6TAJINnvlq0CMKm63XqqeMleadZYm5T3sZGJKcxJS/Pg==} engines: {node: '>= 16.14.0'} - /constructs@10.2.69: - resolution: {integrity: sha512-0AiM/uQe5Uk6JVe/62oolmSN2MjbFQkOlYrM3fFGZLKuT+g7xlAI10EebFhyCcZwI2JAcWuWCmmCAyCothxjuw==} + /constructs@3.4.344: + resolution: {integrity: sha512-Qq3upn44oGdvgasHUKWVFsrynyYrtVRd9fd8ko9cJOrFzx9eCm3iI4bhBryQqaISdausbTYUOXmoEe/YSJ16Nw==} engines: {node: '>= 16.14.0'} - - /constructs@3.3.69: - resolution: {integrity: sha512-mfU72Bb1N57UVwdxDzdhSFAt6DIFnPHSkeAMtTlCUpBYOfSPS3iK6Kh06RvpESM4x9m1x0PZP7k00ZjaAkjSyg==} - engines: {node: '>= 10.17.0'} dev: false - bundledDependencies: [] /content-disposition@0.5.4: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} @@ -11965,8 +11590,8 @@ packages: /conventional-changelog-config-spec@2.1.0: resolution: {integrity: sha512-IpVePh16EbbB02V+UA+HQnnPIohgXvJRxHcS5+Uwk4AT5LjzCZJm5sp/yqs5C6KZJ1jMsV4paEV13BN1pvDuxQ==} - /conventional-changelog-conventionalcommits@4.4.0: - resolution: {integrity: sha512-ybvx76jTh08tpaYrYn/yd0uJNLt5yMrb1BphDe4WBredMlvPisvMghfpnJb6RmRNcqXeuhR6LfGZGewbkRm9yA==} + /conventional-changelog-conventionalcommits@4.6.3: + resolution: {integrity: sha512-LTTQV4fwOM4oLPad317V/QNQ1FY4Hju5qeBIM1uTHbrnCE+Eg4CdRZ3gO2pUeR+tzWdp80M2j3qFFEDWVqOV4g==} engines: {node: '>=10'} dependencies: compare-func: 2.0.0 @@ -12042,23 +11667,23 @@ packages: dependencies: conventional-commits-filter: 2.0.7 dateformat: 3.0.3 - handlebars: 4.7.7 + handlebars: 4.7.8 json-stringify-safe: 5.0.1 lodash: 4.17.21 meow: 8.1.2 - semver: 6.3.0 + semver: 6.3.1 split: 1.0.1 through2: 4.0.2 dev: true - /conventional-changelog@3.1.23: - resolution: {integrity: sha512-sScUu2NHusjRC1dPc5p8/b3kT78OYr95/Bx7Vl8CPB8tF2mG1xei5iylDTRjONV5hTlzt+Cn/tBWrKdd299b7A==} + /conventional-changelog@3.1.25: + resolution: {integrity: sha512-ryhi3fd1mKf3fSjbLXOfK2D06YwKNic1nC9mWqybBHdObPd8KJ2vjaXZfYj1U23t+V8T8n0d7gwnc9XbIdFbyQ==} engines: {node: '>=10'} dependencies: conventional-changelog-angular: 5.0.13 conventional-changelog-atom: 2.0.8 conventional-changelog-codemirror: 2.0.8 - conventional-changelog-conventionalcommits: 4.4.0 + conventional-changelog-conventionalcommits: 4.6.3 conventional-changelog-core: 4.2.4 conventional-changelog-ember: 2.0.9 conventional-changelog-eslint: 3.0.9 @@ -12089,8 +11714,8 @@ packages: through2: 4.0.2 dev: true - /conventional-recommended-bump@6.0.10: - resolution: {integrity: sha512-2ibrqAFMN3ZA369JgVoSbajdD/BHN6zjY7DZFKTHzyzuQejDUCjQ85S5KHxCRxNwsbDJhTPD5hOKcis/jQhRgg==} + /conventional-recommended-bump@6.1.0: + resolution: {integrity: sha512-uiApbSiNGM/kkdL9GTOLAqC4hbptObFo4wW2QRyHsKciGAfQuLU1ShZ1BIVI/+K2BE/W1AWYQMCXAsv4dyKPaw==} engines: {node: '>=10'} hasBin: true dependencies: @@ -12098,9 +11723,9 @@ packages: conventional-changelog-preset-loader: 2.3.4 conventional-commits-filter: 2.0.7 conventional-commits-parser: 3.2.4 - git-raw-commits: 2.0.0 + git-raw-commits: 2.0.11 git-semver-tags: 4.1.1 - meow: 7.1.1 + meow: 8.1.2 q: 1.5.1 dev: true @@ -12133,10 +11758,10 @@ packages: resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} engines: {node: '>= 0.6'} - /core-js-compat@3.31.0: - resolution: {integrity: sha512-hM7YCu1cU6Opx7MXNu0NuumM0ezNeAeRKadixyiQELWY3vT3De9S4J5ZBMraWV2vZnrE1Cirl0GtFtDtMUXzPw==} + /core-js-compat@3.32.1: + resolution: {integrity: sha512-GSvKDv4wE0bPnQtjklV101juQ85g6H3rm5PDP20mqlS5j0kXF3pP97YvAu5hl+uFHqMictp3b2VxOHljWMAtuA==} dependencies: - browserslist: 4.21.9 + browserslist: 4.21.10 dev: true /core-util-is@1.0.3: @@ -12166,17 +11791,17 @@ packages: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} dev: true - /cron-parser@4.8.1: - resolution: {integrity: sha512-jbokKWGcyU4gl6jAfX97E1gDpY12DJ1cLJZmoDzaAln/shZ+S3KBFBuA2Q6WeUN4gJf/8klnV1EfvhA2lK5IRQ==} + /cron-parser@4.9.0: + resolution: {integrity: sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==} engines: {node: '>=12.0.0'} dependencies: - luxon: 3.3.0 + luxon: 3.4.2 dev: false - /cross-fetch@3.1.6: - resolution: {integrity: sha512-riRvo06crlE8HiqOwIpQhxwdOk4fOeR7FVM/wXoxchFEqMNUjvbs3bfo4OTgMEMHzppd4DxFBDbyySj8Cv781g==} + /cross-fetch@3.1.8: + resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} dependencies: - node-fetch: 2.6.12 + node-fetch: 2.7.0 transitivePeerDependencies: - encoding dev: true @@ -12243,13 +11868,6 @@ packages: resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} dev: true - /currently-unhandled@0.4.1: - resolution: {integrity: sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==} - engines: {node: '>=0.10.0'} - dependencies: - array-find-index: 1.0.2 - dev: true - /d3-color@3.1.0: resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} engines: {node: '>=12'} @@ -12319,13 +11937,6 @@ packages: resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} dev: false - /dargs@4.1.0: - resolution: {integrity: sha512-jyweV/k0rbv2WK4r9KLayuBrSh2Py0tNmV7LBoSMH4hMQyrG8OPyIOWB2VEx4DJKXWmK4lopYMVvORlDt2S8Aw==} - engines: {node: '>=0.10.0'} - dependencies: - number-is-nan: 1.0.1 - dev: true - /dargs@7.0.0: resolution: {integrity: sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==} engines: {node: '>=8'} @@ -12441,6 +12052,15 @@ packages: /dedent@0.7.0: resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} + /dedent@1.5.1: + resolution: {integrity: sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==} + peerDependencies: + babel-plugin-macros: ^3.1.0 + peerDependenciesMeta: + babel-plugin-macros: + optional: true + dev: true + /deep-eql@4.1.3: resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} engines: {node: '>=6'} @@ -12448,8 +12068,8 @@ packages: type-detect: 4.0.8 dev: true - /deep-equal@2.2.1: - resolution: {integrity: sha512-lKdkdV6EOGoVn65XaOsPdH4rMxTZOnmFyuIkMjM1i5HHCbfjC97dawgTAy0deYNfuqUqW+Q5VrVaQYtUpSd6yQ==} + /deep-equal@2.2.2: + resolution: {integrity: sha512-xjVyBf0w5vH0I42jdAZzOKVldmPgSulmiyPRywoyq7HXC9qdgo17kxJE+rdnif5Tz6+pIrpJI8dCpMNLIGkUiA==} dependencies: array-buffer-byte-length: 1.0.0 call-bind: 1.0.2 @@ -12468,7 +12088,7 @@ packages: side-channel: 1.0.4 which-boxed-primitive: 1.0.2 which-collection: 1.0.1 - which-typed-array: 1.1.9 + which-typed-array: 1.1.11 dev: true /deep-extend@0.6.0: @@ -12497,7 +12117,7 @@ packages: dependencies: bundle-name: 3.0.0 default-browser-id: 3.0.0 - execa: 7.1.1 + execa: 7.2.0 titleize: 3.0.0 /defaults@1.0.4: @@ -12567,8 +12187,8 @@ packages: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} - /destr@2.0.0: - resolution: {integrity: sha512-FJ9RDpf3GicEBvzI3jxc2XhHzbqD8p4ANw/1kPsFBfTvP1b7Gn/Lg1vO7R9J4IVgoMbyUmFrFGZafJ1hPZpvlg==} + /destr@2.0.1: + resolution: {integrity: sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==} dev: false /destroy@1.2.0: @@ -12584,8 +12204,8 @@ packages: engines: {node: '>=8'} dev: true - /detect-libc@2.0.1: - resolution: {integrity: sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==} + /detect-libc@2.0.2: + resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} engines: {node: '>=8'} /detect-newline@2.1.0: @@ -12597,6 +12217,10 @@ packages: engines: {node: '>=8'} dev: true + /detect-node-es@1.1.0: + resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} + dev: true + /detect-package-manager@2.0.1: resolution: {integrity: sha512-j/lJHyoLlWi6G1LDdLgvUtz60Zo5GEj+sVYtTVXnYLDPuzgC3llMxonXym9zIwhhUII8vjdw0LXxavpLqTbl1A==} engines: {node: '>=12'} @@ -12627,8 +12251,8 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dev: true - /diff-sequences@29.4.3: - resolution: {integrity: sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==} + /diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true @@ -12743,9 +12367,9 @@ packages: resolution: {integrity: sha512-vo835pntK7kzYStk7xUHDifiYJvXxVhUapt85uk2AI94gUUAQX9HNRtrcMHNSc3YHJUEHGbYIGsM99uIbgAtxw==} hasBin: true dependencies: - semver: 7.5.3 + semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20230829 + typescript: 5.3.0-dev.20230904 dev: true /dset@3.1.2: @@ -12783,8 +12407,8 @@ packages: jake: 10.8.7 dev: true - /electron-to-chromium@1.4.445: - resolution: {integrity: sha512-++DB+9VK8SBJwC+X1zlMfJ1tMA3F0ipi39GdEp+x3cV2TyBihqAgad8cNMWtLDEkbH39nlDQP7PfGrDr3Dr7HA==} + /electron-to-chromium@1.4.508: + resolution: {integrity: sha512-FFa8QKjQK/A5QuFr2167myhMesGrhlOBD+3cYNxO9/S4XzHEXesyTD/1/xF644gC8buFPz3ca6G1LOQD0tZrrg==} dev: true /elkjs@0.8.2: @@ -12885,16 +12509,17 @@ packages: dependencies: is-arrayish: 0.2.1 - /es-abstract@1.21.2: - resolution: {integrity: sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==} + /es-abstract@1.22.1: + resolution: {integrity: sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==} engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.0 + arraybuffer.prototype.slice: 1.0.1 available-typed-arrays: 1.0.5 call-bind: 1.0.2 es-set-tostringtag: 2.0.1 es-to-primitive: 1.2.1 - function.prototype.name: 1.1.5 + function.prototype.name: 1.1.6 get-intrinsic: 1.2.1 get-symbol-description: 1.0.0 globalthis: 1.0.3 @@ -12910,19 +12535,23 @@ packages: is-regex: 1.1.4 is-shared-array-buffer: 1.0.2 is-string: 1.0.7 - is-typed-array: 1.1.10 + is-typed-array: 1.1.12 is-weakref: 1.0.2 object-inspect: 1.12.3 object-keys: 1.1.1 object.assign: 4.1.4 regexp.prototype.flags: 1.5.0 + safe-array-concat: 1.0.0 safe-regex-test: 1.0.0 string.prototype.trim: 1.2.7 string.prototype.trimend: 1.0.6 string.prototype.trimstart: 1.0.6 + typed-array-buffer: 1.0.0 + typed-array-byte-length: 1.0.0 + typed-array-byte-offset: 1.0.0 typed-array-length: 1.0.4 unbox-primitive: 1.0.2 - which-typed-array: 1.1.9 + which-typed-array: 1.1.11 /es-get-iterator@1.1.3: resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} @@ -12938,6 +12567,25 @@ packages: stop-iteration-iterator: 1.0.0 dev: true + /es-iterator-helpers@1.0.14: + resolution: {integrity: sha512-JgtVnwiuoRuzLvqelrvN3Xu7H9bu2ap/kQ2CrM62iidP8SKuD99rWU3CJy++s7IVL2qb/AjXPGR/E7i9ngd/Cw==} + dependencies: + asynciterator.prototype: 1.0.0 + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + es-set-tostringtag: 2.0.1 + function-bind: 1.1.1 + get-intrinsic: 1.2.1 + globalthis: 1.0.3 + has-property-descriptors: 1.0.0 + has-proto: 1.0.1 + has-symbols: 1.0.3 + internal-slot: 1.0.5 + iterator.prototype: 1.1.1 + safe-array-concat: 1.0.0 + dev: false + /es-module-lexer@0.9.3: resolution: {integrity: sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==} dev: true @@ -13127,13 +12775,13 @@ packages: esbuild: 0.15.18 dev: true - /esbuild-register@3.4.2(esbuild@0.17.19): + /esbuild-register@3.4.2(esbuild@0.18.20): resolution: {integrity: sha512-kG/XyTDyz6+YDuyfB9ZoSIOOmgyFCH+xPRtsCa8W85HLRV5Csp+o3jWVbOSHgSLfyLc5DmP+KFDNwty4mEjC+Q==} peerDependencies: esbuild: '>=0.12 <1' dependencies: debug: 4.3.4 - esbuild: 0.17.19 + esbuild: 0.18.20 transitivePeerDependencies: - supports-color dev: true @@ -13147,8 +12795,8 @@ packages: dev: true optional: true - /esbuild-wasm@0.18.5(patch_hash=t2ef2z2cxi7d6lxkcfsq2qtq3m): - resolution: {integrity: sha512-1V2/CuXoapvzE+kAHYXW5GhLKWifqdpeV8QR0I4tnNguk1JOkAJDzmfJuDk/OuioLKg1+1CE4kUqbyZDIVn3pA==} + /esbuild-wasm@0.18.20(patch_hash=b6w4kbugtl4xi6w24tkr3hfz4y): + resolution: {integrity: sha512-xRXxH7q4FeC783rORSCyBPWQhcboleKXRPvt3Yl2YMe7jTtu/j7/zjWjqkVhO9BNVHSNVC6igG+XVTPWNQ+kRA==} engines: {node: '>=12'} hasBin: true dev: false @@ -13239,36 +12887,36 @@ packages: '@esbuild/win32-arm64': 0.17.19 '@esbuild/win32-ia32': 0.17.19 '@esbuild/win32-x64': 0.17.19 + dev: true - /esbuild@0.18.10: - resolution: {integrity: sha512-33WKo67auOXzZHBY/9DTJRo7kIvfU12S+D4sp2wIz39N88MDIaCGyCwbW01RR70pK6Iya0I74lHEpyLfFqOHPA==} + /esbuild@0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.18.10 - '@esbuild/android-arm64': 0.18.10 - '@esbuild/android-x64': 0.18.10 - '@esbuild/darwin-arm64': 0.18.10 - '@esbuild/darwin-x64': 0.18.10 - '@esbuild/freebsd-arm64': 0.18.10 - '@esbuild/freebsd-x64': 0.18.10 - '@esbuild/linux-arm': 0.18.10 - '@esbuild/linux-arm64': 0.18.10 - '@esbuild/linux-ia32': 0.18.10 - '@esbuild/linux-loong64': 0.18.10 - '@esbuild/linux-mips64el': 0.18.10 - '@esbuild/linux-ppc64': 0.18.10 - '@esbuild/linux-riscv64': 0.18.10 - '@esbuild/linux-s390x': 0.18.10 - '@esbuild/linux-x64': 0.18.10 - '@esbuild/netbsd-x64': 0.18.10 - '@esbuild/openbsd-x64': 0.18.10 - '@esbuild/sunos-x64': 0.18.10 - '@esbuild/win32-arm64': 0.18.10 - '@esbuild/win32-ia32': 0.18.10 - '@esbuild/win32-x64': 0.18.10 - dev: true + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -13307,25 +12955,25 @@ packages: source-map: 0.6.1 dev: true - /eslint-config-prettier@8.8.0(eslint@8.42.0): - resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} + /eslint-config-prettier@8.10.0(eslint@8.48.0): + resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.42.0 + eslint: 8.48.0 - /eslint-import-resolver-node@0.3.7: - resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} + /eslint-import-resolver-node@0.3.9: + resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} dependencies: debug: 3.2.7(supports-color@5.5.0) - is-core-module: 2.12.1 - resolve: 1.22.2 + is-core-module: 2.13.0 + resolve: 1.22.4 transitivePeerDependencies: - supports-color - /eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.42.0): - resolution: {integrity: sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==} + /eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.48.0): + resolution: {integrity: sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -13333,21 +12981,20 @@ packages: dependencies: debug: 4.3.4 enhanced-resolve: 5.15.0 - eslint: 8.42.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.42.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-typescript@3.5.5)(eslint@8.42.0) - get-tsconfig: 4.6.2 - globby: 13.2.0 - is-core-module: 2.12.1 + eslint: 8.48.0 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.48.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.48.0) + fast-glob: 3.3.1 + get-tsconfig: 4.7.0 + is-core-module: 2.13.0 is-glob: 4.0.3 - synckit: 0.8.5 transitivePeerDependencies: - '@typescript-eslint/parser' - eslint-import-resolver-node - eslint-import-resolver-webpack - supports-color - /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.42.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.48.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -13368,16 +13015,16 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.59.11(eslint@8.42.0)(typescript@4.9.4) + '@typescript-eslint/parser': 5.62.0(eslint@8.48.0)(typescript@4.9.5) debug: 3.2.7(supports-color@5.5.0) - eslint: 8.42.0 - eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5)(eslint@8.42.0) + eslint: 8.48.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.48.0) transitivePeerDependencies: - supports-color - /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-typescript@3.5.5)(eslint@8.42.0): - resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} + /eslint-plugin-import@2.28.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.48.0): + resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -13386,35 +13033,37 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.59.11(eslint@8.42.0)(typescript@4.9.4) + '@typescript-eslint/parser': 5.62.0(eslint@8.48.0)(typescript@4.9.5) array-includes: 3.1.6 + array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 debug: 3.2.7(supports-color@5.5.0) doctrine: 2.1.0 - eslint: 8.42.0 - eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.11)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.42.0) + eslint: 8.48.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.48.0) has: 1.0.3 - is-core-module: 2.12.1 + is-core-module: 2.13.0 is-glob: 4.0.3 minimatch: 3.1.2 - object.values: 1.1.6 - resolve: 1.22.2 - semver: 6.3.0 + object.fromentries: 2.0.7 + object.groupby: 1.0.1 + object.values: 1.1.7 + semver: 6.3.1 tsconfig-paths: 3.14.2 transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - /eslint-plugin-jsx-a11y@6.7.1(eslint@8.42.0): + /eslint-plugin-jsx-a11y@6.7.1(eslint@8.48.0): resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==} engines: {node: '>=4.0'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.22.11 aria-query: 5.3.0 array-includes: 3.1.6 array.prototype.flatmap: 1.3.1 @@ -13423,17 +13072,17 @@ packages: axobject-query: 3.2.1 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 8.42.0 + eslint: 8.48.0 has: 1.0.3 - jsx-ast-utils: 3.3.4 + jsx-ast-utils: 3.3.5 language-tags: 1.0.5 minimatch: 3.1.2 - object.entries: 1.1.6 - object.fromentries: 2.0.6 - semver: 6.3.0 + object.entries: 1.1.7 + object.fromentries: 2.0.7 + semver: 6.3.1 dev: false - /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.8.0)(eslint@8.42.0)(prettier@2.8.8): + /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.10.0)(eslint@8.48.0)(prettier@2.8.8): resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -13444,22 +13093,22 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.42.0 - eslint-config-prettier: 8.8.0(eslint@8.42.0) + eslint: 8.48.0 + eslint-config-prettier: 8.10.0(eslint@8.48.0) prettier: 2.8.8 prettier-linter-helpers: 1.0.0 - /eslint-plugin-react-hooks@4.6.0(eslint@8.42.0): + /eslint-plugin-react-hooks@4.6.0(eslint@8.48.0): resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.42.0 + eslint: 8.48.0 dev: false - /eslint-plugin-react@7.32.2(eslint@8.42.0): - resolution: {integrity: sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==} + /eslint-plugin-react@7.33.2(eslint@8.48.0): + resolution: {integrity: sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 @@ -13468,39 +13117,40 @@ packages: array.prototype.flatmap: 1.3.1 array.prototype.tosorted: 1.1.1 doctrine: 2.1.0 - eslint: 8.42.0 + es-iterator-helpers: 1.0.14 + eslint: 8.48.0 estraverse: 5.3.0 - jsx-ast-utils: 3.3.4 + jsx-ast-utils: 3.3.5 minimatch: 3.1.2 - object.entries: 1.1.6 - object.fromentries: 2.0.6 - object.hasown: 1.1.2 - object.values: 1.1.6 + object.entries: 1.1.7 + object.fromentries: 2.0.7 + object.hasown: 1.1.3 + object.values: 1.1.7 prop-types: 15.8.1 resolve: 2.0.0-next.4 - semver: 6.3.0 - string.prototype.matchall: 4.0.8 + semver: 6.3.1 + string.prototype.matchall: 4.0.9 dev: false - /eslint-plugin-sort-exports@0.8.0(eslint@8.42.0): + /eslint-plugin-sort-exports@0.8.0(eslint@8.48.0): resolution: {integrity: sha512-5x7kJNjIS5bSyehFJ6Gk2gh2wUPt/rmhwDHF8JPDicSH7bvrLRFdlkhHu74YqYBjEySHYaOZVoKNP90TjI0v6w==} peerDependencies: eslint: '>=5.0.0' dependencies: - eslint: 8.42.0 + eslint: 8.48.0 dev: true - /eslint-plugin-unicorn@47.0.0(eslint@8.42.0): + /eslint-plugin-unicorn@47.0.0(eslint@8.48.0): resolution: {integrity: sha512-ivB3bKk7fDIeWOUmmMm9o3Ax9zbMz1Bsza/R2qm46ufw4T6VBFBaJIR1uN3pCKSmSXm8/9Nri8V+iUut1NhQGA==} engines: {node: '>=16'} peerDependencies: eslint: '>=8.38.0' dependencies: '@babel/helper-validator-identifier': 7.22.5 - '@eslint-community/eslint-utils': 4.4.0(eslint@8.42.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) ci-info: 3.8.0 clean-regexp: 1.0.0 - eslint: 8.42.0 + eslint: 8.48.0 esquery: 1.5.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 @@ -13511,7 +13161,7 @@ packages: regexp-tree: 0.1.27 regjsparser: 0.10.0 safe-regex: 2.1.1 - semver: 7.5.2 + semver: 7.5.4 strip-indent: 3.0.0 dev: false @@ -13522,27 +13172,27 @@ packages: esrecurse: 4.3.0 estraverse: 4.3.0 - /eslint-scope@7.2.0: - resolution: {integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==} + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 - /eslint-visitor-keys@3.4.1: - resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} + /eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - /eslint@8.42.0: - resolution: {integrity: sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A==} + /eslint@8.48.0: + resolution: {integrity: sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.42.0) - '@eslint-community/regexpp': 4.5.1 - '@eslint/eslintrc': 2.0.3 - '@eslint/js': 8.42.0 - '@humanwhocodes/config-array': 0.11.10 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) + '@eslint-community/regexpp': 4.8.0 + '@eslint/eslintrc': 2.1.2 + '@eslint/js': 8.48.0 + '@humanwhocodes/config-array': 0.11.11 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 @@ -13551,19 +13201,18 @@ packages: debug: 4.3.4 doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.0 - eslint-visitor-keys: 3.4.1 - espree: 9.5.2 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.20.0 + globals: 13.21.0 graphemer: 1.4.0 ignore: 5.2.4 - import-fresh: 3.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 @@ -13575,18 +13224,17 @@ packages: natural-compare: 1.4.0 optionator: 0.9.3 strip-ansi: 6.0.1 - strip-json-comments: 3.1.1 text-table: 0.2.0 transitivePeerDependencies: - supports-color - /espree@9.5.2: - resolution: {integrity: sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==} + /espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.9.0 - acorn-jsx: 5.3.2(acorn@8.9.0) - eslint-visitor-keys: 3.4.1 + acorn: 8.10.0 + acorn-jsx: 5.3.2(acorn@8.10.0) + eslint-visitor-keys: 3.4.3 /esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -13617,8 +13265,8 @@ packages: resolution: {integrity: sha512-YNF+mZ/Wu2FU/gvmzuWtYc8rloubL7wfXCTgouFrnjGVXPA/EeYYA7pupXWrb3Iv1cTBeSSxxJIbK23l4MRNqg==} engines: {node: '>=8.3.0'} dependencies: - '@babel/traverse': 7.22.5 - '@babel/types': 7.22.5 + '@babel/traverse': 7.22.11 + '@babel/types': 7.22.11 c8: 7.14.0 transitivePeerDependencies: - supports-color @@ -13654,8 +13302,8 @@ packages: signal-exit: 3.0.7 strip-final-newline: 2.0.0 - /execa@7.1.1: - resolution: {integrity: sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==} + /execa@7.2.0: + resolution: {integrity: sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==} engines: {node: ^14.18.0 || ^16.14.0 || >=18.0.0} dependencies: cross-spawn: 7.0.3 @@ -13668,6 +13316,21 @@ packages: signal-exit: 3.0.7 strip-final-newline: 3.0.0 + /execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} + dependencies: + cross-spawn: 7.0.3 + get-stream: 8.0.1 + human-signals: 5.0.0 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.1.0 + onetime: 6.0.0 + signal-exit: 4.1.0 + strip-final-newline: 3.0.0 + dev: false + /exit@0.1.2: resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} engines: {node: '>= 0.8.0'} @@ -13699,15 +13362,15 @@ packages: jest-util: 28.1.3 dev: true - /expect@29.5.0: - resolution: {integrity: sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg==} + /expect@29.6.4: + resolution: {integrity: sha512-F2W2UyQ8XYyftHT57dtfg8Ue3X5qLgm2sSug0ivvLRH/VKNRL/pDxg/TH7zVzbQB0tu80clNFy6LU7OS/VSEKA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/expect-utils': 29.5.0 - jest-get-type: 29.4.3 - jest-matcher-utils: 29.5.0 - jest-message-util: 29.5.0 - jest-util: 29.5.0 + '@jest/expect-utils': 29.6.4 + jest-get-type: 29.6.3 + jest-matcher-utils: 29.6.4 + jest-message-util: 29.6.3 + jest-util: 29.6.3 dev: true /exponential-backoff@3.1.1: @@ -13796,8 +13459,8 @@ packages: /fast-diff@1.3.0: resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - /fast-glob@3.2.12: - resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} + /fast-glob@3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} engines: {node: '>=8.6.0'} dependencies: '@nodelib/fs.stat': 2.0.5 @@ -13823,8 +13486,8 @@ packages: resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} dev: false - /fast-xml-parser@4.2.4: - resolution: {integrity: sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==} + /fast-xml-parser@4.2.5: + resolution: {integrity: sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==} hasBin: true dependencies: strnum: 1.0.5 @@ -13878,7 +13541,7 @@ packages: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flat-cache: 3.0.4 + flat-cache: 3.1.0 /file-system-cache@2.3.0: resolution: {integrity: sha512-l4DMNdsIPsVnKrgEXbJwDJsA5mB8rGwHYERMgqQx/xAUtChPJMre1bXBzDEqqVbWv9AIbFezXMxeEkZDSrXUOQ==} @@ -13887,13 +13550,6 @@ packages: ramda: 0.29.0 dev: true - /file-system-cache@2.4.1: - resolution: {integrity: sha512-mzEiUdjzqhxwppIJVSBq8C9evWM1j0v/lCg7gFMDiQDQPlQSm8kRfXSPFScT1p/Fxy0N2LSIps6g28e8itumlg==} - dependencies: - fs-extra: 11.1.1 - ramda: 0.29.0 - dev: true - /filelist@1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} dependencies: @@ -13966,11 +13622,12 @@ packages: locate-path: 6.0.0 path-exists: 4.0.0 - /flat-cache@3.0.4: - resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} - engines: {node: ^10.12.0 || >=12.0.0} + /flat-cache@3.1.0: + resolution: {integrity: sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==} + engines: {node: '>=12.0.0'} dependencies: flatted: 3.2.7 + keyv: 4.5.3 rimraf: 3.0.2 /flat@5.0.2: @@ -13981,8 +13638,8 @@ packages: /flatted@3.2.7: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} - /flow-parser@0.210.1: - resolution: {integrity: sha512-M0SdOwD0wZHhk6K/AOaPReBnw2vB7p9KUFUFZHJRsU3ZMl/+WVrMpmb8AfEM6GXZ5mEssCx9vHugxxJg1ieoew==} + /flow-parser@0.215.1: + resolution: {integrity: sha512-qq3rdRToqwesrddyXf+Ml8Tuf7TdoJS+EMbJgC6fHAVoBCXjb4mHelNd3J+jD8ts0bSHX81FG3LN7Qn/dcl6pA==} engines: {node: '>=0.4.0'} dev: true @@ -14018,7 +13675,7 @@ packages: engines: {node: '>=14'} dependencies: cross-spawn: 7.0.3 - signal-exit: 4.0.2 + signal-exit: 4.1.0 dev: true /form-data-encoder@2.1.4: @@ -14059,12 +13716,12 @@ packages: engines: {node: '>=10'} dev: true - /fraction.js@4.2.0: - resolution: {integrity: sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==} + /fraction.js@4.3.6: + resolution: {integrity: sha512-n2aZ9tNfYDwaHhvFTkhFErqOMIb8uyzSQ+vGJBjZyanAKZVbGUQ1sngfk9FdkBw7G26O7AgNjLcecLffD1c7eg==} dev: true - /framer-motion@10.12.16(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-w/SfWEIWJkYSgRHYBmln7EhcNo31ao8Xexol8lGXf1pR/tlnBtf1HcxoUmEiEh6pacB4/geku5ami53AAQWHMQ==} + /framer-motion@10.16.2(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-aY6L9YMvqMWtfOQptaUvvr8dp97jskXY5UYLQM0vOPxKeERrG/Z034EIQZ/52u7MeCT0HlCQy3/l0HdUZCB9Tw==} peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 @@ -14076,7 +13733,7 @@ packages: dependencies: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - tslib: 2.6.0 + tslib: 2.6.2 optionalDependencies: '@emotion/is-prop-valid': 0.8.8 dev: false @@ -14085,13 +13742,6 @@ packages: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} - /fs-access@1.0.1: - resolution: {integrity: sha512-05cXDIwNbFaoFWaz5gNHlUTbH5whiss/hr/ibzPd4MH3cR4w0ZKeIPiVdbyJurg3O5r/Bjpvn9KOb1/rPMf3nA==} - engines: {node: '>=0.10.0'} - dependencies: - null-check: 1.0.0 - dev: true - /fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} @@ -14134,11 +13784,11 @@ packages: dependencies: minipass: 3.3.6 - /fs-minipass@3.0.2: - resolution: {integrity: sha512-2GAfyfoaCDRrM6jaOS3UsBts8yJ55VioXdWcOL7dK9zdAuKT71+WBA4ifnNYqVjYv+4SsPxjK0JT4yIIn4cA/g==} + /fs-minipass@3.0.3: + resolution: {integrity: sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - minipass: 5.0.0 + minipass: 7.0.3 dev: true /fs-monkey@1.0.4: @@ -14153,38 +13803,31 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true + dev: true + optional: true + + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true optional: true /function-bind@1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - /function.prototype.name@1.1.5: - resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} + /function.prototype.name@1.1.6: + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - es-abstract: 1.21.2 + es-abstract: 1.22.1 functions-have-names: 1.2.3 /functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - /gauge@3.0.2: - resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} - engines: {node: '>=10'} - dependencies: - aproba: 2.0.0 - color-support: 1.1.3 - console-control-strings: 1.1.0 - has-unicode: 2.0.1 - object-assign: 4.1.1 - signal-exit: 3.0.7 - string-width: 4.2.3 - strip-ansi: 6.0.1 - wide-align: 1.1.5 - dev: true - /gauge@4.0.4: resolution: {integrity: sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -14225,6 +13868,11 @@ packages: has-proto: 1.0.1 has-symbols: 1.0.3 + /get-nonce@1.0.1: + resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} + engines: {node: '>=6'} + dev: true + /get-npm-tarball-url@2.0.3: resolution: {integrity: sha512-R/PW6RqyaBQNWYaSyfrh54/qtcnOp22FHCCiRhSSZj0FP3KQWCsxxt0DzIdVTbwTqe9CtQfvl/FPD4UIPt4pqw==} engines: {node: '>=12.17'} @@ -14278,6 +13926,11 @@ packages: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} + /get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} + dev: false + /get-symbol-description@1.0.0: resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} engines: {node: '>= 0.4'} @@ -14285,8 +13938,8 @@ packages: call-bind: 1.0.2 get-intrinsic: 1.2.1 - /get-tsconfig@4.6.2: - resolution: {integrity: sha512-E5XrT4CbbXcXWy+1jChlZmrmCwd5KGx502kDCXJJ7y898TtWW9FwoG5HfOLVRKmlmDGkWN2HM9Ho+/Y8F0sJDg==} + /get-tsconfig@4.7.0: + resolution: {integrity: sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==} dependencies: resolve-pkg-maps: 1.0.0 @@ -14298,24 +13951,12 @@ packages: defu: 6.1.2 https-proxy-agent: 5.0.1 mri: 1.2.0 - node-fetch-native: 1.2.0 + node-fetch-native: 1.4.0 pathe: 1.1.1 - tar: 6.1.13 + tar: 6.1.15 transitivePeerDependencies: - supports-color - /git-raw-commits@2.0.0: - resolution: {integrity: sha512-w4jFEJFgKXMQJ0H0ikBk2S+4KP2VEjhCvLCNqbNRQC8BgGWgLKNCO7a9K9LI+TVT7Gfoloje502sEnctibffgg==} - engines: {node: '>=6.9.0'} - hasBin: true - dependencies: - dargs: 4.1.0 - lodash.template: 4.5.0 - meow: 4.0.1 - split2: 2.2.0 - through2: 2.0.5 - dev: true - /git-raw-commits@2.0.11: resolution: {integrity: sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==} engines: {node: '>=10'} @@ -14342,7 +13983,7 @@ packages: hasBin: true dependencies: meow: 8.1.2 - semver: 6.3.0 + semver: 6.3.1 dev: true /gitconfiglocal@1.0.0: @@ -14381,29 +14022,30 @@ packages: glob: 7.2.3 dev: true - /glob-promise@6.0.2(glob@8.1.0): - resolution: {integrity: sha512-Ni2aDyD1ekD6x8/+K4hDriRDbzzfuK4yKpqSymJ4P7IxbtARiOOuU+k40kbHM0sLIlbf1Qh0qdMkAHMZYE6XJQ==} + /glob-promise@6.0.3(glob@8.1.0): + resolution: {integrity: sha512-m+kxywR5j/2Z2V9zvHKfwwL5Gp7gIFEBX+deTB9w2lJB+wSuw9kcS43VfvTAMk8TXL5JCl/cCjsR+tgNVspGyA==} engines: {node: '>=16'} peerDependencies: glob: ^8.0.3 dependencies: '@types/glob': 8.1.0 glob: 8.1.0 + dev: false /glob-to-regexp@0.4.1: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} dev: true - /glob@10.3.1: - resolution: {integrity: sha512-9BKYcEeIs7QwlCYs+Y3GBvqAMISufUS0i2ELd11zpZjxI5V9iyRj0HgzB5/cLf2NY4vcYBTYzJ7GIui7j/4DOw==} + /glob@10.3.4: + resolution: {integrity: sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==} engines: {node: '>=16 || 14 >=14.17'} hasBin: true dependencies: foreground-child: 3.1.1 - jackspeak: 2.2.1 + jackspeak: 2.3.1 minimatch: 9.0.3 - minipass: 6.0.2 - path-scurry: 1.10.0 + minipass: 7.0.3 + path-scurry: 1.10.1 dev: true /glob@7.1.6: @@ -14448,8 +14090,8 @@ packages: engines: {node: '>=4'} dev: true - /globals@13.20.0: - resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} + /globals@13.21.0: + resolution: {integrity: sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==} engines: {node: '>=8'} dependencies: type-fest: 0.20.2 @@ -14466,21 +14108,11 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.2.12 + fast-glob: 3.3.1 ignore: 5.2.4 merge2: 1.4.1 slash: 3.0.0 - /globby@13.2.0: - resolution: {integrity: sha512-jWsQfayf13NvqKUIL3Ta+CIqMnvlaIDFveWE/dpOZ9+3AMEJozsxDvKA02zync9UuvOM8rOXzsD5GqKP4OnWPQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - dir-glob: 3.0.1 - fast-glob: 3.2.12 - ignore: 5.2.4 - merge2: 1.4.1 - slash: 4.0.0 - /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: @@ -14490,10 +14122,10 @@ packages: resolution: {integrity: sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==} engines: {node: '>=14.16'} dependencies: - '@sindresorhus/is': 5.4.1 + '@sindresorhus/is': 5.6.0 '@szmarczak/http-timer': 5.0.1 cacheable-lookup: 7.0.0 - cacheable-request: 10.2.12 + cacheable-request: 10.2.13 decompress-response: 6.0.0 form-data-encoder: 2.1.4 get-stream: 6.0.1 @@ -14509,9 +14141,6 @@ packages: /graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - /grapheme-splitter@1.0.4: - resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} - /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} @@ -14519,8 +14148,8 @@ packages: resolution: {integrity: sha512-tdcqOOpwArNjEr0gNQKCXwaNCWnQJrog14nJNQPeemcLnXQUUGrsCWpWkVKt46zLjcS6/KGoayeJfHHyPDlvwA==} dev: true - /graphology@0.25.1(graphology-types@0.24.7): - resolution: {integrity: sha512-yYA7BJCcXN2DrKNQQ9Qf22zBHm/yTbyBR71T1MYBbGtywNHsv0QZtk8zaR6zxNcp2hCCZayUkHp9DyMSZCpoxQ==} + /graphology@0.25.4(graphology-types@0.24.7): + resolution: {integrity: sha512-33g0Ol9nkWdD6ulw687viS8YJQBxqG5LWII6FI6nul0pq6iM2t5EKquOTFDbyTblRB3O9I+7KX4xI8u5ffekAQ==} peerDependencies: graphology-types: '>=0.24.0' dependencies: @@ -14536,7 +14165,7 @@ packages: graphql: ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: graphql: 16.8.0 - tslib: 2.6.0 + tslib: 2.6.2 dev: false optional: true @@ -14558,8 +14187,8 @@ packages: through2: 2.0.5 dev: true - /handlebars@4.7.7: - resolution: {integrity: sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==} + /handlebars@4.7.8: + resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} engines: {node: '>=0.4.7'} hasBin: true dependencies: @@ -14662,7 +14291,6 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: lru-cache: 7.18.3 - dev: false /html-encoding-sniffer@2.0.1: resolution: {integrity: sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==} @@ -14759,6 +14387,11 @@ packages: resolution: {integrity: sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==} engines: {node: '>=14.18.0'} + /human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} + dev: false + /humanize-ms@1.2.1: resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} dependencies: @@ -14785,11 +14418,11 @@ packages: resolution: {integrity: sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==} dev: true - /ignore-walk@5.0.1: - resolution: {integrity: sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + /ignore-walk@6.0.3: + resolution: {integrity: sha512-C7FfFoTA+bI10qfeydT8aZbvr91vAEU+2W5BZUlzPec47oNb07SsOfwYrtxuvOYdUApPP/Qlh4DtAO51Ekk2QA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - minimatch: 5.1.6 + minimatch: 9.0.3 dev: true /ignore@5.2.4: @@ -14825,11 +14458,6 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} - /indent-string@3.2.0: - resolution: {integrity: sha512-BYqTHXTGUIvg7t1r4sJNKcbDZkL92nkXA8YtRpbjFHRHGDL/NtUeiBJMeE60kIFN/Mg8ESaWQvftaYMGJzQZCQ==} - engines: {node: '>=4'} - dev: true - /indent-string@4.0.0: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} @@ -14838,10 +14466,6 @@ packages: resolution: {integrity: sha512-rUY5vtT748NMRbEMrTNiFfy29BgGZwGXUi2NFUVMWQrogSLzlJvQV9eeMWi+g1aVaQ53tpyLAQtd5x/JH0Nh1g==} dev: false - /infer-owner@1.0.4: - resolution: {integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==} - dev: true - /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: @@ -14863,6 +14487,11 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} dev: false + /ini@4.1.1: + resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + /ink-select-input@4.2.2(ink@3.2.0)(react@17.0.2): resolution: {integrity: sha512-E5AS2Vnd4CSzEa7Rm+hG47wxRQo1ASfh4msKxO7FHmn/ym+GKSSsFIfR+FonqjKNDPXYJClw8lM47RdN3Pi+nw==} engines: {node: '>=10'} @@ -14884,7 +14513,7 @@ packages: ink: '>=3.0.5' react: '>=16.8.2' dependencies: - cli-spinners: 2.9.0 + cli-spinners: 2.7.0 ink: 3.2.0(react@17.0.2) react: 17.0.2 dev: true @@ -14942,7 +14571,7 @@ packages: lodash: 4.17.21 patch-console: 1.0.0 react: 17.0.2 - react-devtools-core: 4.27.8 + react-devtools-core: 4.28.0 react-reconciler: 0.26.2(react@17.0.2) scheduler: 0.20.2 signal-exit: 3.0.7 @@ -14997,8 +14626,18 @@ packages: resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==} engines: {node: '>= 0.10'} - /ioredis@5.3.1: - resolution: {integrity: sha512-C+IBcMysM6v52pTLItYMeV4Hz7uriGtoJdz7SSBDX6u+zwSYGirLdQh3L7t/OItWITcw3gTFMjJReYUwS4zihg==} + /invariant@2.2.4: + resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} + dependencies: + loose-envify: 1.4.0 + dev: true + + /ionstore@1.0.0: + resolution: {integrity: sha512-ikEvmeZFh9u5SkjKbFqJlmmhaQTulB3P7QoSoZ/xL8EDP5uj5QWbPeKcQ8ZJtszBLHRRnhIJJE8P1dhFx/oCMw==} + dev: false + + /ioredis@5.3.2: + resolution: {integrity: sha512-1DKMMzlIHM02eBBVOFQ1+AolGjs6+xEcM4PDL7NqOS6szq7H9jSaEkIUH6/a5Hl241LzW6JLSiAbNvTQjUupUA==} engines: {node: '>=12.22.0'} dependencies: '@ioredis/commands': 1.2.0 @@ -15040,7 +14679,7 @@ packages: dependencies: call-bind: 1.0.2 get-intrinsic: 1.2.1 - is-typed-array: 1.1.10 + is-typed-array: 1.1.12 /is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} @@ -15050,6 +14689,13 @@ packages: dev: false optional: true + /is-async-function@2.0.0: + resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: false + /is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} dependencies: @@ -15098,8 +14744,8 @@ packages: ci-info: 3.8.0 dev: true - /is-core-module@2.12.1: - resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==} + /is-core-module@2.13.0: + resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} dependencies: has: 1.0.3 @@ -15127,6 +14773,12 @@ packages: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} + /is-finalizationregistry@1.0.2: + resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} + dependencies: + call-bind: 1.0.2 + dev: false + /is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} @@ -15141,7 +14793,6 @@ packages: engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 - dev: true /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} @@ -15179,7 +14830,6 @@ packages: /is-map@2.0.2: resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==} - dev: true /is-nan@1.3.2: resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} @@ -15260,7 +14910,6 @@ packages: /is-set@2.0.2: resolution: {integrity: sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==} - dev: true /is-shared-array-buffer@1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} @@ -15301,15 +14950,11 @@ packages: text-extensions: 1.9.0 dev: true - /is-typed-array@1.1.10: - resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==} + /is-typed-array@1.1.12: + resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} engines: {node: '>= 0.4'} dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.0 + which-typed-array: 1.1.11 /is-typedarray@1.0.0: resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} @@ -15327,7 +14972,6 @@ packages: /is-weakmap@2.0.1: resolution: {integrity: sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==} - dev: true /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} @@ -15339,7 +14983,6 @@ packages: dependencies: call-bind: 1.0.2 get-intrinsic: 1.2.1 - dev: true /is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} @@ -15366,7 +15009,6 @@ packages: /isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} - dev: true /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -15376,23 +15018,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /isomorphic-unfetch@3.1.0: - resolution: {integrity: sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==} - dependencies: - node-fetch: 2.6.12 - unfetch: 4.2.0 - transitivePeerDependencies: - - encoding - dev: true - - /isostore@1.0.0: - resolution: {integrity: sha512-MnhxUZYfi6vzq+MSgAziefgMKCVtSX9MUh1JK2qUTw4TSzszJoQfYko48ZoVgycCrSbzIQXBz2eaRA/6D4TlOg==} - dependencies: - atomically: 2.0.1 - memoization-registry: 1.0.1 - when-exit: 2.1.0 - dev: false - /istanbul-lib-coverage@3.2.0: resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} engines: {node: '>=8'} @@ -15402,21 +15027,34 @@ packages: resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} engines: {node: '>=8'} dependencies: - '@babel/core': 7.22.5 - '@babel/parser': 7.22.5 + '@babel/core': 7.22.11 + '@babel/parser': 7.22.14 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true - /istanbul-lib-report@3.0.0: - resolution: {integrity: sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==} - engines: {node: '>=8'} + /istanbul-lib-instrument@6.0.0: + resolution: {integrity: sha512-x58orMzEVfzPUKqlbLd1hXCnySCxKdDKa6Rjg97CwuLLRI4g3FHTdnExu1OqffVFay6zeMW+T6/DowFLndWnIw==} + engines: {node: '>=10'} dependencies: + '@babel/core': 7.22.11 + '@babel/parser': 7.22.14 + '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 - make-dir: 3.1.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + dev: true + + /istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} + dependencies: + istanbul-lib-coverage: 3.2.0 + make-dir: 4.0.0 supports-color: 7.2.0 dev: true @@ -15431,16 +15069,25 @@ packages: - supports-color dev: true - /istanbul-reports@3.1.5: - resolution: {integrity: sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==} + /istanbul-reports@3.1.6: + resolution: {integrity: sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==} engines: {node: '>=8'} dependencies: html-escaper: 2.0.2 - istanbul-lib-report: 3.0.0 + istanbul-lib-report: 3.0.1 dev: true - /jackspeak@2.2.1: - resolution: {integrity: sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==} + /iterator.prototype@1.1.1: + resolution: {integrity: sha512-9E+nePc8C9cnQldmNl6bgpTY6zI4OPRZd97fhJ/iVZ1GifIUDVV5F6x1nEDqpe8KaMEZGT4xgrwKQDxXnjOIZQ==} + dependencies: + define-properties: 1.2.0 + get-intrinsic: 1.2.1 + has-symbols: 1.0.3 + reflect.getprototypeof: 1.0.4 + dev: false + + /jackspeak@2.3.1: + resolution: {integrity: sha512-4iSY3Bh1Htv+kLhiiZunUhQ+OYXIn0ze3ulq8JeWrFKmhPAJSySV2+kdtRh2pGcCeF0s6oR8Oc+pYZynJj4t8A==} engines: {node: '>=14'} dependencies: '@isaacs/cliui': 8.0.2 @@ -15468,11 +15115,12 @@ packages: throat: 6.0.2 dev: true - /jest-changed-files@29.5.0: - resolution: {integrity: sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==} + /jest-changed-files@29.6.3: + resolution: {integrity: sha512-G5wDnElqLa4/c66ma5PG9eRjE342lIbF6SUnTJi26C3J28Fv2TVY2rOyKB9YGbSA5ogwevgmxc4j4aVjrEK6Yg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: execa: 5.1.1 + jest-util: 29.6.3 p-limit: 3.1.0 dev: true @@ -15483,7 +15131,7 @@ packages: '@jest/environment': 27.5.1 '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 chalk: 4.1.2 co: 4.6.0 dedent: 0.7.0 @@ -15503,31 +15151,32 @@ packages: - supports-color dev: true - /jest-circus@29.5.0: - resolution: {integrity: sha512-gq/ongqeQKAplVxqJmbeUOJJKkW3dDNPY8PjhJ5G0lBRvu0e3EWGxGy5cI4LAGA7gV2UHCtWBI4EMXK8c9nQKA==} + /jest-circus@29.6.4: + resolution: {integrity: sha512-YXNrRyntVUgDfZbjXWBMPslX1mQ8MrSG0oM/Y06j9EYubODIyHWP8hMUbjbZ19M3M+zamqEur7O80HODwACoJw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/environment': 29.5.0 - '@jest/expect': 29.5.0 - '@jest/test-result': 29.5.0 - '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@jest/environment': 29.6.4 + '@jest/expect': 29.6.4 + '@jest/test-result': 29.6.4 + '@jest/types': 29.6.3 + '@types/node': 18.17.13 chalk: 4.1.2 co: 4.6.0 - dedent: 0.7.0 + dedent: 1.5.1 is-generator-fn: 2.1.0 - jest-each: 29.5.0 - jest-matcher-utils: 29.5.0 - jest-message-util: 29.5.0 - jest-runtime: 29.5.0 - jest-snapshot: 29.5.0 - jest-util: 29.5.0 + jest-each: 29.6.3 + jest-matcher-utils: 29.6.4 + jest-message-util: 29.6.3 + jest-runtime: 29.6.4 + jest-snapshot: 29.6.4 + jest-util: 29.6.3 p-limit: 3.1.0 - pretty-format: 29.5.0 + pretty-format: 29.6.3 pure-rand: 6.0.2 slash: 3.0.0 stack-utils: 2.0.6 transitivePeerDependencies: + - babel-plugin-macros - supports-color dev: true @@ -15561,8 +15210,8 @@ packages: - utf-8-validate dev: true - /jest-cli@29.5.0(@types/node@16.0.0)(ts-node@10.9.1): - resolution: {integrity: sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw==} + /jest-cli@29.6.4(@types/node@16.18.47)(ts-node@10.9.1): + resolution: {integrity: sha512-+uMCQ7oizMmh8ZwRfZzKIEszFY9ksjjEQnTEMTaL7fYiL3Kw4XhqT9bYh+A4DQKUb67hZn2KbtEnDuHvcgK4pQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true peerDependencies: @@ -15571,20 +15220,21 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 29.5.0(ts-node@10.9.1) - '@jest/test-result': 29.5.0 - '@jest/types': 29.5.0 + '@jest/core': 29.6.4(ts-node@10.9.1) + '@jest/test-result': 29.6.4 + '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 import-local: 3.1.0 - jest-config: 29.5.0(@types/node@16.0.0)(ts-node@10.9.1) - jest-util: 29.5.0 - jest-validate: 29.5.0 + jest-config: 29.6.4(@types/node@16.18.47)(ts-node@10.9.1) + jest-util: 29.6.3 + jest-validate: 29.6.3 prompts: 2.4.2 yargs: 17.7.2 transitivePeerDependencies: - '@types/node' + - babel-plugin-macros - supports-color - ts-node dev: true @@ -15598,10 +15248,10 @@ packages: ts-node: optional: true dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 '@jest/test-sequencer': 27.5.1 '@jest/types': 27.5.1 - babel-jest: 27.5.1(@babel/core@7.22.5) + babel-jest: 27.5.1(@babel/core@7.22.11) chalk: 4.1.2 ci-info: 3.8.0 deepmerge: 4.3.1 @@ -15622,7 +15272,7 @@ packages: pretty-format: 27.5.1 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.1(@types/node@16.0.0)(typescript@4.9.4) + ts-node: 10.9.1(@types/node@16.18.47)(typescript@4.9.5) transitivePeerDependencies: - bufferutil - canvas @@ -15630,8 +15280,8 @@ packages: - utf-8-validate dev: true - /jest-config@29.5.0(@types/node@16.0.0)(ts-node@10.9.1): - resolution: {integrity: sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==} + /jest-config@29.6.4(@types/node@16.18.47)(ts-node@10.9.1): + resolution: {integrity: sha512-JWohr3i9m2cVpBumQFv2akMEnFEPVOh+9L2xIBJhJ0zOaci2ZXuKJj0tgMKQCBZAKA09H049IR4HVS/43Qb19A==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@types/node': '*' @@ -15642,36 +15292,37 @@ packages: ts-node: optional: true dependencies: - '@babel/core': 7.22.5 - '@jest/test-sequencer': 29.5.0 - '@jest/types': 29.5.0 - '@types/node': 16.0.0 - babel-jest: 29.5.0(@babel/core@7.22.5) + '@babel/core': 7.22.11 + '@jest/test-sequencer': 29.6.4 + '@jest/types': 29.6.3 + '@types/node': 16.18.47 + babel-jest: 29.6.4(@babel/core@7.22.11) chalk: 4.1.2 ci-info: 3.8.0 deepmerge: 4.3.1 glob: 7.2.3 graceful-fs: 4.2.11 - jest-circus: 29.5.0 - jest-environment-node: 29.5.0 - jest-get-type: 29.4.3 - jest-regex-util: 29.4.3 - jest-resolve: 29.5.0 - jest-runner: 29.5.0 - jest-util: 29.5.0 - jest-validate: 29.5.0 + jest-circus: 29.6.4 + jest-environment-node: 29.6.4 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.6.4 + jest-runner: 29.6.4 + jest-util: 29.6.3 + jest-validate: 29.6.3 micromatch: 4.0.5 parse-json: 5.2.0 - pretty-format: 29.5.0 + pretty-format: 29.6.3 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.1(@types/node@16.0.0)(typescript@4.9.4) + ts-node: 10.9.1(@types/node@16.18.47)(typescript@4.9.5) transitivePeerDependencies: + - babel-plugin-macros - supports-color dev: true - /jest-config@29.5.0(@types/node@18.16.18)(ts-node@10.9.1): - resolution: {integrity: sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==} + /jest-config@29.6.4(@types/node@18.17.13)(ts-node@10.9.1): + resolution: {integrity: sha512-JWohr3i9m2cVpBumQFv2akMEnFEPVOh+9L2xIBJhJ0zOaci2ZXuKJj0tgMKQCBZAKA09H049IR4HVS/43Qb19A==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@types/node': '*' @@ -15682,31 +15333,32 @@ packages: ts-node: optional: true dependencies: - '@babel/core': 7.22.5 - '@jest/test-sequencer': 29.5.0 - '@jest/types': 29.5.0 - '@types/node': 18.16.18 - babel-jest: 29.5.0(@babel/core@7.22.5) + '@babel/core': 7.22.11 + '@jest/test-sequencer': 29.6.4 + '@jest/types': 29.6.3 + '@types/node': 18.17.13 + babel-jest: 29.6.4(@babel/core@7.22.11) chalk: 4.1.2 ci-info: 3.8.0 deepmerge: 4.3.1 glob: 7.2.3 graceful-fs: 4.2.11 - jest-circus: 29.5.0 - jest-environment-node: 29.5.0 - jest-get-type: 29.4.3 - jest-regex-util: 29.4.3 - jest-resolve: 29.5.0 - jest-runner: 29.5.0 - jest-util: 29.5.0 - jest-validate: 29.5.0 + jest-circus: 29.6.4 + jest-environment-node: 29.6.4 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.6.4 + jest-runner: 29.6.4 + jest-util: 29.6.3 + jest-validate: 29.6.3 micromatch: 4.0.5 parse-json: 5.2.0 - pretty-format: 29.5.0 + pretty-format: 29.6.3 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.1(@types/node@16.0.0)(typescript@4.9.4) + ts-node: 10.9.1(@types/node@16.18.47)(typescript@4.9.5) transitivePeerDependencies: + - babel-plugin-macros - supports-color dev: true @@ -15730,14 +15382,14 @@ packages: pretty-format: 28.1.3 dev: true - /jest-diff@29.5.0: - resolution: {integrity: sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==} + /jest-diff@29.6.4: + resolution: {integrity: sha512-9F48UxR9e4XOEZvoUXEHSWY4qC4zERJaOfrbBg9JpbJOO43R1vN76REt/aMGZoY6GD5g84nnJiBIVlscegefpw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 - diff-sequences: 29.4.3 - jest-get-type: 29.4.3 - pretty-format: 29.5.0 + diff-sequences: 29.6.3 + jest-get-type: 29.6.3 + pretty-format: 29.6.3 dev: true /jest-docblock@27.5.1: @@ -15747,8 +15399,8 @@ packages: detect-newline: 3.1.0 dev: true - /jest-docblock@29.4.3: - resolution: {integrity: sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==} + /jest-docblock@29.6.3: + resolution: {integrity: sha512-2+H+GOTQBEm2+qFSQ7Ma+BvyV+waiIFxmZF5LdpBsAEjWX8QYjSCa4FrkIYtbfXUJJJnFCYrOtt6TZ+IAiTjBQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: detect-newline: 3.1.0 @@ -15765,15 +15417,15 @@ packages: pretty-format: 27.5.1 dev: true - /jest-each@29.5.0: - resolution: {integrity: sha512-HM5kIJ1BTnVt+DQZ2ALp3rzXEl+g726csObrW/jpEGl+CDSSQpOJJX2KE/vEg8cxcMXdyEPu6U4QX5eruQv5hA==} + /jest-each@29.6.3: + resolution: {integrity: sha512-KoXfJ42k8cqbkfshW7sSHcdfnv5agDdHCPA87ZBdmHP+zJstTJc0ttQaJ/x7zK6noAL76hOuTIJ6ZkQRS5dcyg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.5.0 + '@jest/types': 29.6.3 chalk: 4.1.2 - jest-get-type: 29.4.3 - jest-util: 29.5.0 - pretty-format: 29.5.0 + jest-get-type: 29.6.3 + jest-util: 29.6.3 + pretty-format: 29.6.3 dev: true /jest-environment-jsdom@27.5.1: @@ -15783,7 +15435,7 @@ packages: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 jest-mock: 27.5.1 jest-util: 27.5.1 jsdom: 16.7.0 @@ -15801,21 +15453,21 @@ packages: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 jest-mock: 27.5.1 jest-util: 27.5.1 dev: true - /jest-environment-node@29.5.0: - resolution: {integrity: sha512-ExxuIK/+yQ+6PRGaHkKewYtg6hto2uGCgvKdb2nfJfKXgZ17DfXjvbZ+jA1Qt9A8EQSfPnt5FKIfnOO3u1h9qw==} + /jest-environment-node@29.6.4: + resolution: {integrity: sha512-i7SbpH2dEIFGNmxGCpSc2w9cA4qVD+wfvg2ZnfQ7XVrKL0NA5uDVBIiGH8SR4F0dKEv/0qI5r+aDomDf04DpEQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/environment': 29.5.0 - '@jest/fake-timers': 29.5.0 - '@jest/types': 29.5.0 - '@types/node': 18.16.18 - jest-mock: 29.5.0 - jest-util: 29.5.0 + '@jest/environment': 29.6.4 + '@jest/fake-timers': 29.6.4 + '@jest/types': 29.6.3 + '@types/node': 18.17.13 + jest-mock: 29.6.3 + jest-util: 29.6.3 dev: true /jest-get-type@27.5.1: @@ -15828,8 +15480,8 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dev: true - /jest-get-type@29.4.3: - resolution: {integrity: sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==} + /jest-get-type@29.6.3: + resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true @@ -15839,7 +15491,7 @@ packages: dependencies: '@jest/types': 27.5.1 '@types/graceful-fs': 4.1.6 - '@types/node': 18.16.18 + '@types/node': 18.17.13 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -15850,26 +15502,26 @@ packages: micromatch: 4.0.5 walker: 1.0.8 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true - /jest-haste-map@29.5.0: - resolution: {integrity: sha512-IspOPnnBro8YfVYSw6yDRKh/TiCdRngjxeacCps1cQ9cgVN6+10JUcuJ1EabrgYLOATsIAigxA0rLR9x/YlrSA==} + /jest-haste-map@29.6.4: + resolution: {integrity: sha512-12Ad+VNTDHxKf7k+M65sviyynRoZYuL1/GTuhEVb8RYsNSNln71nANRb/faSyWvx0j+gHcivChXHIoMJrGYjog==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.5.0 + '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.6 - '@types/node': 18.16.18 + '@types/node': 18.17.13 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 - jest-regex-util: 29.4.3 - jest-util: 29.5.0 - jest-worker: 29.5.0 + jest-regex-util: 29.6.3 + jest-util: 29.6.3 + jest-worker: 29.6.4 micromatch: 4.0.5 walker: 1.0.8 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /jest-jasmine2@27.5.1: @@ -15880,7 +15532,7 @@ packages: '@jest/source-map': 27.5.1 '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 chalk: 4.1.2 co: 4.6.0 expect: 27.5.1 @@ -15915,12 +15567,12 @@ packages: pretty-format: 27.5.1 dev: true - /jest-leak-detector@29.5.0: - resolution: {integrity: sha512-u9YdeeVnghBUtpN5mVxjID7KbkKE1QU4f6uUwuxiY0vYRi9BUCLKlPEZfDGR67ofdFmDz9oPAy2G92Ujrntmow==} + /jest-leak-detector@29.6.3: + resolution: {integrity: sha512-0kfbESIHXYdhAdpLsW7xdwmYhLf1BRu4AA118/OxFm0Ho1b2RcTmO4oF6aAMaxpxdxnJ3zve2rgwzNBD4Zbm7Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - jest-get-type: 29.4.3 - pretty-format: 29.5.0 + jest-get-type: 29.6.3 + pretty-format: 29.6.3 dev: true /jest-matcher-utils@27.5.1: @@ -15943,21 +15595,21 @@ packages: pretty-format: 28.1.3 dev: true - /jest-matcher-utils@29.5.0: - resolution: {integrity: sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw==} + /jest-matcher-utils@29.6.4: + resolution: {integrity: sha512-KSzwyzGvK4HcfnserYqJHYi7sZVqdREJ9DMPAKVbS98JsIAvumihaNUbjrWw0St7p9IY7A9UskCW5MYlGmBQFQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 - jest-diff: 29.5.0 - jest-get-type: 29.4.3 - pretty-format: 29.5.0 + jest-diff: 29.6.4 + jest-get-type: 29.6.3 + pretty-format: 29.6.3 dev: true /jest-message-util@27.5.1: resolution: {integrity: sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.22.13 '@jest/types': 27.5.1 '@types/stack-utils': 2.0.1 chalk: 4.1.2 @@ -15972,7 +15624,7 @@ packages: resolution: {integrity: sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.22.13 '@jest/types': 28.1.3 '@types/stack-utils': 2.0.1 chalk: 4.1.2 @@ -15983,17 +15635,17 @@ packages: stack-utils: 2.0.6 dev: true - /jest-message-util@29.5.0: - resolution: {integrity: sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==} + /jest-message-util@29.6.3: + resolution: {integrity: sha512-FtzaEEHzjDpQp51HX4UMkPZjy46ati4T5pEMyM6Ik48ztu4T9LQplZ6OsimHx7EuM9dfEh5HJa6D3trEftu3dA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.22.5 - '@jest/types': 29.5.0 + '@babel/code-frame': 7.22.13 + '@jest/types': 29.6.3 '@types/stack-utils': 2.0.1 chalk: 4.1.2 graceful-fs: 4.2.11 micromatch: 4.0.5 - pretty-format: 29.5.0 + pretty-format: 29.6.3 slash: 3.0.0 stack-utils: 2.0.6 dev: true @@ -16003,16 +15655,16 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 dev: true - /jest-mock@29.5.0: - resolution: {integrity: sha512-GqOzvdWDE4fAV2bWQLQCkujxYWL7RxjCnj71b5VhDAGOevB3qj3Ovg26A5NI84ZpODxyzaozXLOh2NCgkbvyaw==} + /jest-mock@29.6.3: + resolution: {integrity: sha512-Z7Gs/mOyTSR4yPsaZ72a/MtuK6RnC3JYqWONe48oLaoEcYwEDxqvbXz85G4SJrm2Z5Ar9zp6MiHF4AlFlRM4Pg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.5.0 - '@types/node': 18.16.18 - jest-util: 29.5.0 + '@jest/types': 29.6.3 + '@types/node': 18.17.13 + jest-util: 29.6.3 dev: true /jest-pnp-resolver@1.2.3(jest-resolve@27.5.1): @@ -16027,7 +15679,7 @@ packages: jest-resolve: 27.5.1 dev: true - /jest-pnp-resolver@1.2.3(jest-resolve@29.5.0): + /jest-pnp-resolver@1.2.3(jest-resolve@29.6.4): resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} engines: {node: '>=6'} peerDependencies: @@ -16036,7 +15688,7 @@ packages: jest-resolve: optional: true dependencies: - jest-resolve: 29.5.0 + jest-resolve: 29.6.4 dev: true /jest-regex-util@27.5.1: @@ -16044,8 +15696,8 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dev: true - /jest-regex-util@29.4.3: - resolution: {integrity: sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==} + /jest-regex-util@29.6.3: + resolution: {integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true @@ -16060,12 +15712,12 @@ packages: - supports-color dev: true - /jest-resolve-dependencies@29.5.0: - resolution: {integrity: sha512-sjV3GFr0hDJMBpYeUuGduP+YeCRbd7S/ck6IvL3kQ9cpySYKqcqhdLLC2rFwrcL7tz5vYibomBrsFYWkIGGjOg==} + /jest-resolve-dependencies@29.6.4: + resolution: {integrity: sha512-7+6eAmr1ZBF3vOAJVsfLj1QdqeXG+WYhidfLHBRZqGN24MFRIiKG20ItpLw2qRAsW/D2ZUUmCNf6irUr/v6KHA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - jest-regex-util: 29.4.3 - jest-snapshot: 29.5.0 + jest-regex-util: 29.6.3 + jest-snapshot: 29.6.4 transitivePeerDependencies: - supports-color dev: true @@ -16081,22 +15733,22 @@ packages: jest-pnp-resolver: 1.2.3(jest-resolve@27.5.1) jest-util: 27.5.1 jest-validate: 27.5.1 - resolve: 1.22.2 + resolve: 1.22.4 resolve.exports: 1.1.1 slash: 3.0.0 dev: true - /jest-resolve@29.5.0: - resolution: {integrity: sha512-1TzxJ37FQq7J10jPtQjcc+MkCkE3GBpBecsSUWJ0qZNJpmg6m0D9/7II03yJulm3H/fvVjgqLh/k2eYg+ui52w==} + /jest-resolve@29.6.4: + resolution: {integrity: sha512-fPRq+0vcxsuGlG0O3gyoqGTAxasagOxEuyoxHeyxaZbc9QNek0AmJWSkhjlMG+mTsj+8knc/mWb3fXlRNVih7Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 graceful-fs: 4.2.11 - jest-haste-map: 29.5.0 - jest-pnp-resolver: 1.2.3(jest-resolve@29.5.0) - jest-util: 29.5.0 - jest-validate: 29.5.0 - resolve: 1.22.2 + jest-haste-map: 29.6.4 + jest-pnp-resolver: 1.2.3(jest-resolve@29.6.4) + jest-util: 29.6.3 + jest-validate: 29.6.3 + resolve: 1.22.4 resolve.exports: 2.0.2 slash: 3.0.0 dev: true @@ -16110,7 +15762,7 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 chalk: 4.1.2 emittery: 0.8.1 graceful-fs: 4.2.11 @@ -16133,29 +15785,29 @@ packages: - utf-8-validate dev: true - /jest-runner@29.5.0: - resolution: {integrity: sha512-m7b6ypERhFghJsslMLhydaXBiLf7+jXy8FwGRHO3BGV1mcQpPbwiqiKUR2zU2NJuNeMenJmlFZCsIqzJCTeGLQ==} + /jest-runner@29.6.4: + resolution: {integrity: sha512-SDaLrMmtVlQYDuG0iSPYLycG8P9jLI+fRm8AF/xPKhYDB2g6xDWjXBrR5M8gEWsK6KVFlebpZ4QsrxdyIX1Jaw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/console': 29.5.0 - '@jest/environment': 29.5.0 - '@jest/test-result': 29.5.0 - '@jest/transform': 29.5.0 - '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@jest/console': 29.6.4 + '@jest/environment': 29.6.4 + '@jest/test-result': 29.6.4 + '@jest/transform': 29.6.4 + '@jest/types': 29.6.3 + '@types/node': 18.17.13 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 - jest-docblock: 29.4.3 - jest-environment-node: 29.5.0 - jest-haste-map: 29.5.0 - jest-leak-detector: 29.5.0 - jest-message-util: 29.5.0 - jest-resolve: 29.5.0 - jest-runtime: 29.5.0 - jest-util: 29.5.0 - jest-watcher: 29.5.0 - jest-worker: 29.5.0 + jest-docblock: 29.6.3 + jest-environment-node: 29.6.4 + jest-haste-map: 29.6.4 + jest-leak-detector: 29.6.3 + jest-message-util: 29.6.3 + jest-resolve: 29.6.4 + jest-runtime: 29.6.4 + jest-util: 29.6.3 + jest-watcher: 29.6.4 + jest-worker: 29.6.4 p-limit: 3.1.0 source-map-support: 0.5.13 transitivePeerDependencies: @@ -16175,7 +15827,7 @@ packages: '@jest/types': 27.5.1 chalk: 4.1.2 cjs-module-lexer: 1.2.3 - collect-v8-coverage: 1.0.1 + collect-v8-coverage: 1.0.2 execa: 5.1.1 glob: 7.2.3 graceful-fs: 4.2.11 @@ -16192,30 +15844,30 @@ packages: - supports-color dev: true - /jest-runtime@29.5.0: - resolution: {integrity: sha512-1Hr6Hh7bAgXQP+pln3homOiEZtCDZFqwmle7Ew2j8OlbkIu6uE3Y/etJQG8MLQs3Zy90xrp2C0BRrtPHG4zryw==} + /jest-runtime@29.6.4: + resolution: {integrity: sha512-s/QxMBLvmwLdchKEjcLfwzP7h+jsHvNEtxGP5P+Fl1FMaJX2jMiIqe4rJw4tFprzCwuSvVUo9bn0uj4gNRXsbA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/environment': 29.5.0 - '@jest/fake-timers': 29.5.0 - '@jest/globals': 29.5.0 - '@jest/source-map': 29.4.3 - '@jest/test-result': 29.5.0 - '@jest/transform': 29.5.0 - '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@jest/environment': 29.6.4 + '@jest/fake-timers': 29.6.4 + '@jest/globals': 29.6.4 + '@jest/source-map': 29.6.3 + '@jest/test-result': 29.6.4 + '@jest/transform': 29.6.4 + '@jest/types': 29.6.3 + '@types/node': 18.17.13 chalk: 4.1.2 cjs-module-lexer: 1.2.3 - collect-v8-coverage: 1.0.1 + collect-v8-coverage: 1.0.2 glob: 7.2.3 graceful-fs: 4.2.11 - jest-haste-map: 29.5.0 - jest-message-util: 29.5.0 - jest-mock: 29.5.0 - jest-regex-util: 29.4.3 - jest-resolve: 29.5.0 - jest-snapshot: 29.5.0 - jest-util: 29.5.0 + jest-haste-map: 29.6.4 + jest-message-util: 29.6.3 + jest-mock: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.6.4 + jest-snapshot: 29.6.4 + jest-util: 29.6.3 slash: 3.0.0 strip-bom: 4.0.0 transitivePeerDependencies: @@ -16226,7 +15878,7 @@ packages: resolution: {integrity: sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.17.13 graceful-fs: 4.2.11 dev: true @@ -16234,16 +15886,16 @@ packages: resolution: {integrity: sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@babel/core': 7.22.5 - '@babel/generator': 7.22.5 - '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.22.5) - '@babel/traverse': 7.22.5 - '@babel/types': 7.22.5 + '@babel/core': 7.22.11 + '@babel/generator': 7.22.10 + '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.22.11) + '@babel/traverse': 7.22.11 + '@babel/types': 7.22.11 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 '@types/babel__traverse': 7.20.1 - '@types/prettier': 2.6.0 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.5) + '@types/prettier': 2.7.3 + babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.11) chalk: 4.1.2 expect: 27.5.1 graceful-fs: 4.2.11 @@ -16255,38 +15907,35 @@ packages: jest-util: 27.5.1 natural-compare: 1.4.0 pretty-format: 27.5.1 - semver: 7.5.3 + semver: 7.5.4 transitivePeerDependencies: - supports-color dev: true - /jest-snapshot@29.5.0: - resolution: {integrity: sha512-x7Wolra5V0tt3wRs3/ts3S6ciSQVypgGQlJpz2rsdQYoUKxMxPNaoHMGJN6qAuPJqS+2iQ1ZUn5kl7HCyls84g==} + /jest-snapshot@29.6.4: + resolution: {integrity: sha512-VC1N8ED7+4uboUKGIDsbvNAZb6LakgIPgAF4RSpF13dN6YaMokfRqO+BaqK4zIh6X3JffgwbzuGqDEjHm/MrvA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/core': 7.22.5 - '@babel/generator': 7.22.5 - '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.5) - '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.22.5) - '@babel/traverse': 7.22.5 - '@babel/types': 7.22.5 - '@jest/expect-utils': 29.5.0 - '@jest/transform': 29.5.0 - '@jest/types': 29.5.0 - '@types/babel__traverse': 7.20.1 - '@types/prettier': 2.6.0 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.5) + '@babel/core': 7.22.11 + '@babel/generator': 7.22.10 + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.11) + '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.22.11) + '@babel/types': 7.22.11 + '@jest/expect-utils': 29.6.4 + '@jest/transform': 29.6.4 + '@jest/types': 29.6.3 + babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.11) chalk: 4.1.2 - expect: 29.5.0 + expect: 29.6.4 graceful-fs: 4.2.11 - jest-diff: 29.5.0 - jest-get-type: 29.4.3 - jest-matcher-utils: 29.5.0 - jest-message-util: 29.5.0 - jest-util: 29.5.0 + jest-diff: 29.6.4 + jest-get-type: 29.6.3 + jest-matcher-utils: 29.6.4 + jest-message-util: 29.6.3 + jest-util: 29.6.3 natural-compare: 1.4.0 - pretty-format: 29.5.0 - semver: 7.5.3 + pretty-format: 29.6.3 + semver: 7.5.4 transitivePeerDependencies: - supports-color dev: true @@ -16296,7 +15945,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.11 @@ -16308,19 +15957,19 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: '@jest/types': 28.1.3 - '@types/node': 18.16.18 + '@types/node': 18.17.13 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.11 picomatch: 2.3.1 dev: true - /jest-util@29.5.0: - resolution: {integrity: sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==} + /jest-util@29.6.3: + resolution: {integrity: sha512-QUjna/xSy4B32fzcKTSz1w7YYzgiHrjjJjevdRf61HYk998R5vVMMNmrHESYZVDS5DSWs+1srPLPKxXPkeSDOA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@jest/types': 29.6.3 + '@types/node': 18.17.13 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.11 @@ -16339,16 +15988,16 @@ packages: pretty-format: 27.5.1 dev: true - /jest-validate@29.5.0: - resolution: {integrity: sha512-pC26etNIi+y3HV8A+tUGr/lph9B18GnzSRAkPaaZJIE1eFdiYm6/CewuiJQ8/RlfHd1u/8Ioi8/sJ+CmbA+zAQ==} + /jest-validate@29.6.3: + resolution: {integrity: sha512-e7KWZcAIX+2W1o3cHfnqpGajdCs1jSM3DkXjGeLSNmCazv1EeI1ggTeK5wdZhF+7N+g44JI2Od3veojoaumlfg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.5.0 + '@jest/types': 29.6.3 camelcase: 6.3.0 chalk: 4.1.2 - jest-get-type: 29.4.3 + jest-get-type: 29.6.3 leven: 3.1.0 - pretty-format: 29.5.0 + pretty-format: 29.6.3 dev: true /jest-watcher@27.5.1: @@ -16357,24 +16006,24 @@ packages: dependencies: '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.16.18 + '@types/node': 18.17.13 ansi-escapes: 4.3.2 chalk: 4.1.2 jest-util: 27.5.1 string-length: 4.0.2 dev: true - /jest-watcher@29.5.0: - resolution: {integrity: sha512-KmTojKcapuqYrKDpRwfqcQ3zjMlwu27SYext9pt4GlF5FUgB+7XE1mcCnSm6a4uUpFyQIkb6ZhzZvHl+jiBCiA==} + /jest-watcher@29.6.4: + resolution: {integrity: sha512-oqUWvx6+On04ShsT00Ir9T4/FvBeEh2M9PTubgITPxDa739p4hoQweWPRGyYeaojgT0xTpZKF0Y/rSY1UgMxvQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/test-result': 29.5.0 - '@jest/types': 29.5.0 - '@types/node': 18.16.18 + '@jest/test-result': 29.6.4 + '@jest/types': 29.6.3 + '@types/node': 18.17.13 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 - jest-util: 29.5.0 + jest-util: 29.6.3 string-length: 4.0.2 dev: true @@ -16382,27 +16031,27 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.16.18 + '@types/node': 18.17.13 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jest-worker@29.5.0: - resolution: {integrity: sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA==} + /jest-worker@29.6.4: + resolution: {integrity: sha512-6dpvFV4WjcWbDVGgHTWo/aupl8/LbBx2NSKfiwqf79xC/yeJjKHT1+StcKy/2KTmW16hE68ccKVOtXf+WZGz7Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 18.16.18 - jest-util: 29.5.0 + '@types/node': 18.17.13 + jest-util: 29.6.3 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jest@27.0.0(ts-node@10.9.1): - resolution: {integrity: sha512-rOVbFCiNh9i7qj4236yQNipFJ80GiqyzkHumQvyOYXDYkVy7E1Hn6nm1xNaqPs80plE8LohX+AEKKLAWo3C5CQ==} + /jest@27.5.1(ts-node@10.9.1): + resolution: {integrity: sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} hasBin: true peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: node-notifier: optional: true @@ -16418,8 +16067,8 @@ packages: - utf-8-validate dev: true - /jest@29.3.1(@types/node@16.0.0)(ts-node@10.9.1): - resolution: {integrity: sha512-6iWfL5DTT0Np6UYs/y5Niu7WIfNv/wRTtN5RSXt2DIEft3dx3zPuw/3WJQBCJfmEzvDiEKwoqMbGD9n49+qLSA==} + /jest@29.6.4(@types/node@16.18.47)(ts-node@10.9.1): + resolution: {integrity: sha512-tEFhVQFF/bzoYV1YuGyzLPZ6vlPrdfvDmmAxudA1dLEuiztqg2Rkx20vkKY32xiDROcD2KXlgZ7Cu8RPeEHRKw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true peerDependencies: @@ -16428,18 +16077,19 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 29.5.0(ts-node@10.9.1) - '@jest/types': 29.5.0 + '@jest/core': 29.6.4(ts-node@10.9.1) + '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.5.0(@types/node@16.0.0)(ts-node@10.9.1) + jest-cli: 29.6.4(@types/node@16.18.47)(ts-node@10.9.1) transitivePeerDependencies: - '@types/node' + - babel-plugin-macros - supports-color - ts-node dev: true - /jiti@1.18.2: - resolution: {integrity: sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==} + /jiti@1.19.3: + resolution: {integrity: sha512-5eEbBDQT/jF1xg6l36P+mWGGoH9Spuy0PCdSr2dtWRDGC6ph/w9ZCL4lmESW8f8F7MwT3XKescfP0wnZWAKL9w==} hasBin: true /jju@1.4.0: @@ -16472,55 +16122,25 @@ packages: dependencies: argparse: 2.0.1 - /jscodeshift@0.14.0(@babel/preset-env@7.21.5): - resolution: {integrity: sha512-7eCC1knD7bLUPuSCwXsMZUH51O8jIcoVyKtI6P0XM0IVzlGjckPy3FIwQlorzbN0Sg79oK+RlohN32Mqf/lrYA==} - hasBin: true - peerDependencies: - '@babel/preset-env': ^7.1.6 - dependencies: - '@babel/core': 7.22.5 - '@babel/parser': 7.22.5 - '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.22.5) - '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.22.5) - '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.22.5) - '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.22.5) - '@babel/preset-env': 7.21.5(@babel/core@7.21.8) - '@babel/preset-flow': 7.22.5(@babel/core@7.22.5) - '@babel/preset-typescript': 7.22.5(@babel/core@7.22.5) - '@babel/register': 7.22.5(@babel/core@7.22.5) - babel-core: 7.0.0-bridge.0(@babel/core@7.22.5) - chalk: 4.1.2 - flow-parser: 0.210.1 - graceful-fs: 4.2.11 - micromatch: 4.0.5 - neo-async: 2.6.2 - node-dir: 0.1.17 - recast: 0.21.5 - temp: 0.8.4 - write-file-atomic: 2.4.3 - transitivePeerDependencies: - - supports-color - dev: true - - /jscodeshift@0.14.0(@babel/preset-env@7.22.5): + /jscodeshift@0.14.0(@babel/preset-env@7.22.14): resolution: {integrity: sha512-7eCC1knD7bLUPuSCwXsMZUH51O8jIcoVyKtI6P0XM0IVzlGjckPy3FIwQlorzbN0Sg79oK+RlohN32Mqf/lrYA==} hasBin: true peerDependencies: '@babel/preset-env': ^7.1.6 dependencies: - '@babel/core': 7.22.5 - '@babel/parser': 7.22.5 - '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.22.5) - '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.22.5) - '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.22.5) - '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.22.5) - '@babel/preset-env': 7.22.5(@babel/core@7.22.5) - '@babel/preset-flow': 7.22.5(@babel/core@7.22.5) - '@babel/preset-typescript': 7.22.5(@babel/core@7.22.5) - '@babel/register': 7.22.5(@babel/core@7.22.5) - babel-core: 7.0.0-bridge.0(@babel/core@7.22.5) + '@babel/core': 7.22.11 + '@babel/parser': 7.22.14 + '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.22.11) + '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.22.11) + '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.22.11) + '@babel/plugin-transform-modules-commonjs': 7.22.11(@babel/core@7.22.11) + '@babel/preset-env': 7.22.14(@babel/core@7.22.11) + '@babel/preset-flow': 7.22.5(@babel/core@7.22.11) + '@babel/preset-typescript': 7.22.11(@babel/core@7.22.11) + '@babel/register': 7.22.5(@babel/core@7.22.11) + babel-core: 7.0.0-bridge.0(@babel/core@7.22.11) chalk: 4.1.2 - flow-parser: 0.210.1 + flow-parser: 0.215.1 graceful-fs: 4.2.11 micromatch: 4.0.5 neo-async: 2.6.2 @@ -16542,7 +16162,7 @@ packages: optional: true dependencies: abab: 2.0.6 - acorn: 8.9.0 + acorn: 8.10.0 acorn-globals: 6.0.0 cssom: 0.4.4 cssstyle: 2.3.0 @@ -16555,7 +16175,7 @@ packages: http-proxy-agent: 4.0.1 https-proxy-agent: 5.0.1 is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.5 + nwsapi: 2.2.7 parse5: 6.0.1 saxes: 5.0.1 symbol-tree: 3.2.4 @@ -16594,228 +16214,193 @@ packages: resolution: {integrity: sha512-op3y4UUzd6J6lfjV+UP/hhEQIPUtpsLNtMRXLO1v5X7hbJ8N76gdO6UHu7RqyCElRjUaNqtGug0pkQBC5sDepg==} dev: false - /jsii-diff@1.73.0: - resolution: {integrity: sha512-pbMxeP1wFJwpA9Kki+IoFzVz/I81dHIW0yXyKOwTX7SrmoJ8LRlGJDb3Ks5H2MDdf2YL/6QVl0sgU6sC9/Ssvw==} - engines: {node: '>= 14.6.0'} + /jsii-diff@1.88.0: + resolution: {integrity: sha512-5Wjig/1GvZckAS1G8f+kztNDZVP4TFqUu/NsSiIb4hHHM+MvUy7O9ihVuWDVE+QodSTxPXy3RMKp+ILsiRcuqg==} + engines: {node: '>= 14.17.0'} hasBin: true dependencies: - '@jsii/check-node': 1.73.0 - '@jsii/spec': 1.73.0 + '@jsii/check-node': 1.88.0 + '@jsii/spec': 1.88.0 fs-extra: 10.1.0 - jsii-reflect: 1.73.0 + jsii-reflect: 1.88.0 log4js: 6.9.1 yargs: 16.2.0 transitivePeerDependencies: - supports-color dev: true - /jsii-pacmak@1.84.0: - resolution: {integrity: sha512-+EGfpQDPSyDNPWclcOes6dUhwDsn5dG0bBgVb3hpRWZ0uDe7wLCVwGxh7fphx2XtNvTwdNfspTSBLBMqscOYmg==} + /jsii-pacmak@1.88.0: + resolution: {integrity: sha512-nanfSaYpe2lgOzvosup4iObQ76tCs47+rERUUGFyrCq7sruQ7VMYgRdAuGWh8PqF9fGNwq6Do1eR+EMC+d4WUg==} engines: {node: '>= 14.17.0'} hasBin: true dependencies: - '@jsii/check-node': 1.84.0 - '@jsii/spec': 1.84.0 + '@jsii/check-node': 1.88.0 + '@jsii/spec': 1.88.0 clone: 2.1.2 - codemaker: 1.84.0 + codemaker: 1.88.0 commonmark: 0.30.0 escape-string-regexp: 4.0.0 fs-extra: 10.1.0 - jsii-reflect: 1.84.0 - jsii-rosetta: 1.84.0 - semver: 7.5.2 - spdx-license-list: 6.6.0 + jsii-reflect: 1.88.0 + jsii-rosetta: 1.88.0 + semver: 7.5.4 + spdx-license-list: 6.7.0 xmlbuilder: 15.1.1 yargs: 16.2.0 transitivePeerDependencies: - supports-color dev: true - /jsii-reflect@1.73.0: - resolution: {integrity: sha512-RNnejItM5DUvTpMNBhL095Yt87a6mLWTse9rYZmR+XglJ8WdyNW8mmDftz8gq58TKr5mDVUtq5vpRApCEm0Viw==} - engines: {node: '>= 14.6.0'} - hasBin: true - dependencies: - '@jsii/check-node': 1.73.0 - '@jsii/spec': 1.73.0 - chalk: 4.1.2 - fs-extra: 10.1.0 - oo-ascii-tree: 1.84.0 - yargs: 16.2.0 - - /jsii-reflect@1.84.0: - resolution: {integrity: sha512-Iuh0GAxsQscK1re9sWEQHG0wKswnr7ha4EZ8j47Sigo8yBIZNp01P+V0kbZ55bDjiT66Sqqu3jaDJdYzR/5o4w==} + /jsii-reflect@1.88.0: + resolution: {integrity: sha512-YYZTEQpayvwMDtRMCjgNraTFUqsj4/KEOE8ChvDCkpxv6aH89vpZSsAJM5ymhNLDHj4XZ2OW3XE0sNOz31NbvA==} engines: {node: '>= 14.17.0'} hasBin: true dependencies: - '@jsii/check-node': 1.84.0 - '@jsii/spec': 1.84.0 + '@jsii/check-node': 1.88.0 + '@jsii/spec': 1.88.0 chalk: 4.1.2 - fs-extra: 10.1.0 - oo-ascii-tree: 1.84.0 - yargs: 16.2.0 - dev: true - - /jsii-rosetta@1.73.0: - resolution: {integrity: sha512-UrXBaM/7jJldrlDN2aV/vaIurIZJM4ikJtcE/ugSoAuJUW42Hpi0Qd5k9MiSaE/k+KNxRpihS+skRa2TETT3Cg==} - engines: {node: '>= 14.6.0'} - hasBin: true - dependencies: - '@jsii/check-node': 1.73.0 - '@jsii/spec': 1.73.0 - '@xmldom/xmldom': 0.8.8 - commonmark: 0.30.0 - fast-glob: 3.2.12 - jsii: 1.73.0 - semver: 7.5.2 - semver-intersect: 1.4.0 - typescript: 3.9.10 - workerpool: 6.4.0 - yargs: 16.2.0 - transitivePeerDependencies: - - supports-color - dev: false + fs-extra: 10.1.0 + oo-ascii-tree: 1.88.0 + yargs: 16.2.0 - /jsii-rosetta@1.84.0: - resolution: {integrity: sha512-VrXmc6utiNs3eNTKxVky0LTxoQrsh5GuEGyfj9ihwCkojYBJ3w80PdkMQEeRpWGdaCLEocjpy1X67xgZ4ZbPlg==} + /jsii-rosetta@1.88.0: + resolution: {integrity: sha512-6xRRkwWUKFqDTnjgCXkB6v9dxA51KUD4Cd7InLB4qirMBDuMtyYhYVNc1yJbHPYs9gkN5/ao0dFk+1CQxt7T7g==} engines: {node: '>= 14.17.0'} hasBin: true dependencies: - '@jsii/check-node': 1.84.0 - '@jsii/spec': 1.84.0 - '@xmldom/xmldom': 0.8.8 + '@jsii/check-node': 1.88.0 + '@jsii/spec': 1.88.0 + '@xmldom/xmldom': 0.8.10 commonmark: 0.30.0 - fast-glob: 3.2.12 - jsii: 1.84.0 - semver: 7.5.3 + fast-glob: 3.3.1 + jsii: 1.88.0 + semver: 7.5.4 semver-intersect: 1.4.0 stream-json: 1.8.0 typescript: 3.9.10 - workerpool: 6.4.0 + workerpool: 6.4.2 yargs: 16.2.0 transitivePeerDependencies: - supports-color - dev: true - /jsii-rosetta@5.1.3: - resolution: {integrity: sha512-QZJNe0X02lBuHr/Zio9JVJLyGoP9P5E/+Qbn22Qp9aecs2Kn8kLvGCJklfpc65OXM2G2RepyBQPyyvW+mVxr0Q==} - engines: {node: '>= 16.14.0'} + /jsii-rosetta@5.0.11: + resolution: {integrity: sha512-rdL+eBpvHTSbCjSellJHtskICY3MTMICkFgPG1B2c/aE0xdsZCQHLxi9/A8VoobhMk2r7wZtpml7vrzNIpyKYg==} + engines: {node: '>= 14.18.0'} hasBin: true dependencies: '@jsii/check-node': 1.84.0 - '@jsii/spec': 1.84.0 - '@xmldom/xmldom': 0.8.8 + '@jsii/spec': 1.88.0 + '@xmldom/xmldom': 0.8.10 chalk: 4.1.2 commonmark: 0.30.0 - fast-glob: 3.2.12 - jsii: 5.1.3 - semver: 7.5.3 + fast-glob: 3.3.1 + jsii: 5.0.21 + semver: 7.5.4 semver-intersect: 1.4.0 stream-json: 1.8.0 - typescript: 5.1.3 - workerpool: 6.4.0 + typescript: 5.0.4 + workerpool: 6.4.2 yargs: 17.7.2 transitivePeerDependencies: - supports-color dev: true - /jsii-srcmak@0.1.943: - resolution: {integrity: sha512-So3ajrrfE+pupJoDzqAIVR0+PMWkja8cjGBSBgSbfx9WaytZUYwBZ9C33tG0OFwTmOTpc3k4+AgrBWmjEg5ujw==} + /jsii-srcmak@0.1.951: + resolution: {integrity: sha512-zaKqrsR416yX+QhE1T4mkBWqPpsHQmBnBbsR0f5a32Uknr3+l4PCVtuV5/rgthAG6iE4Pa6c/jO0vcTzyzEY6A==} hasBin: true dependencies: fs-extra: 9.1.0 - jsii: 5.1.3 - jsii-pacmak: 1.84.0 + jsii: 5.1.12 + jsii-pacmak: 1.88.0 ncp: 2.0.0 yargs: 15.4.1 transitivePeerDependencies: - supports-color dev: true - /jsii@1.73.0: - resolution: {integrity: sha512-6GLXJv+XDPNPw4JRAMr6NicWgLorFcKmAZB6x+gqCnrkA6FqZlgDPohFdcqAkxE5Px9K3oAFIsnEH/xV3HuGrg==} - engines: {node: '>= 14.6.0'} + /jsii@1.88.0: + resolution: {integrity: sha512-WKfwHbcEI/j5OYDPexvkH8KKDcTZR7tIBFNTxu8h1Nh3G8xFT4hh3pObUUSMRCa6rsSF9EHGjS+AKC+TfpFGrQ==} + engines: {node: '>= 14.17.0'} hasBin: true dependencies: - '@jsii/check-node': 1.73.0 - '@jsii/spec': 1.73.0 + '@jsii/check-node': 1.88.0 + '@jsii/spec': 1.88.0 case: 1.6.3 chalk: 4.1.2 fast-deep-equal: 3.1.3 fs-extra: 10.1.0 log4js: 6.9.1 - semver: 7.5.3 + semver: 7.5.4 semver-intersect: 1.4.0 sort-json: 2.0.1 - spdx-license-list: 6.6.0 + spdx-license-list: 6.7.0 typescript: 3.9.10 yargs: 16.2.0 transitivePeerDependencies: - supports-color - dev: false - /jsii@1.84.0: - resolution: {integrity: sha512-vtrw3fRrr5Do4LDNxAVXHgtHDyxHvohyzAfBwxcMEYzZ51gJX52wsdlaGE1p0dPe1V9uCAbNQTDKbAMgVJkg0Q==} - engines: {node: '>= 14.17.0'} + /jsii@5.0.11(patch_hash=zhi5puwzi5jiulxnmqgkd4wl2a): + resolution: {integrity: sha512-mFW7gTA6w+LEB3WzJqP7isFNUYYeJHmHKIKoO3kdG266giTQuoqqnuezqgr2Hl3p66Gzs7rdDzLwefQ0vIAs8A==} + engines: {node: '>= 14.18.0'} hasBin: true dependencies: '@jsii/check-node': 1.84.0 - '@jsii/spec': 1.84.0 + '@jsii/spec': 1.88.0 case: 1.6.3 chalk: 4.1.2 + downlevel-dts: 0.11.0 fast-deep-equal: 3.1.3 - fs-extra: 10.1.0 log4js: 6.9.1 - semver: 7.5.3 + semver: 7.5.4 semver-intersect: 1.4.0 sort-json: 2.0.1 - spdx-license-list: 6.6.0 - typescript: 3.9.10 - yargs: 16.2.0 + spdx-license-list: 6.7.0 + typescript: 5.0.4 + yargs: 17.7.2 transitivePeerDependencies: - supports-color dev: true + patched: true - /jsii@5.0.11(patch_hash=zhi5puwzi5jiulxnmqgkd4wl2a): - resolution: {integrity: sha512-mFW7gTA6w+LEB3WzJqP7isFNUYYeJHmHKIKoO3kdG266giTQuoqqnuezqgr2Hl3p66Gzs7rdDzLwefQ0vIAs8A==} - engines: {node: '>= 14.18.0'} + /jsii@5.0.21: + resolution: {integrity: sha512-m5WEKKnER9veGrJNxr5OULu43D6DSe69RmKgQjTSHLEKSCS+taCf32sFmBT/b3nBcSh1gfch7QfjoHKoKpUz2w==} + engines: {node: '>= 16.14.0'} hasBin: true dependencies: - '@jsii/check-node': 1.84.0 - '@jsii/spec': 1.84.0 + '@jsii/check-node': 1.88.0 + '@jsii/spec': 1.88.0 case: 1.6.3 chalk: 4.1.2 downlevel-dts: 0.11.0 fast-deep-equal: 3.1.3 log4js: 6.9.1 - semver: 7.5.3 + semver: 7.5.4 semver-intersect: 1.4.0 sort-json: 2.0.1 - spdx-license-list: 6.6.0 + spdx-license-list: 6.7.0 typescript: 5.0.4 yargs: 17.7.2 transitivePeerDependencies: - supports-color dev: true - patched: true - /jsii@5.1.3: - resolution: {integrity: sha512-w8RCGYkzDlsTJGXZ3n9OatsoOKLH63xW2Quy9lSnen6UkDjwl4HWKYhJkijVEoZioQN7V2ennxfbRMTL+yF/4w==} + /jsii@5.1.12: + resolution: {integrity: sha512-iY3zLosUEKbeua6IAGJXjFxibiiI0xHFjyYPyewOc56MBRHC7nczWSVGRP+Jgwyo7HWXs4TvJKLG6w8zSuAZrg==} engines: {node: '>= 16.14.0'} hasBin: true dependencies: - '@jsii/check-node': 1.84.0 - '@jsii/spec': 1.84.0 + '@jsii/check-node': 1.88.0 + '@jsii/spec': 1.88.0 case: 1.6.3 chalk: 4.1.2 downlevel-dts: 0.11.0 fast-deep-equal: 3.1.3 log4js: 6.9.1 - semver: 7.5.3 + semver: 7.5.4 semver-intersect: 1.4.0 sort-json: 2.0.1 - spdx-license-list: 6.6.0 - typescript: 5.1.3 + spdx-license-list: 6.7.0 + typescript: 5.1.6 yargs: 17.7.2 transitivePeerDependencies: - supports-color @@ -16823,7 +16408,6 @@ packages: /json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - dev: true /json-parse-better-errors@1.0.2: resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} @@ -16832,6 +16416,11 @@ packages: /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + /json-parse-even-better-errors@3.0.0: + resolution: {integrity: sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + /json-parse-helpfulerror@1.0.3: resolution: {integrity: sha512-XgP0FGR77+QhUxjXkwOMkC94k3WtqEBfcnjWqhRd82qTat4SWKRE+9kUnynz/shm3I4ea2+qISvTIeGTNU7kJg==} dependencies: @@ -16901,24 +16490,30 @@ packages: resolution: {integrity: sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==} dev: false - /jsonwebtoken@9.0.0: - resolution: {integrity: sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==} + /jsonwebtoken@9.0.2: + resolution: {integrity: sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==} engines: {node: '>=12', npm: '>=6'} dependencies: jws: 3.2.2 - lodash: 4.17.21 + lodash.includes: 4.3.0 + lodash.isboolean: 3.0.3 + lodash.isinteger: 4.0.4 + lodash.isnumber: 3.0.3 + lodash.isplainobject: 4.0.6 + lodash.isstring: 4.0.1 + lodash.once: 4.1.1 ms: 2.1.3 - semver: 7.5.3 + semver: 7.5.4 dev: false - /jsx-ast-utils@3.3.4: - resolution: {integrity: sha512-fX2TVdCViod6HwKEtSWGHs57oFhVfCMwieb9PuRDgjDPh5XeqJiHFFFJCHxU5cnTc3Bu/GRL+kPiFmw8XWOfKw==} + /jsx-ast-utils@3.3.5: + resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} dependencies: array-includes: 3.1.6 array.prototype.flat: 1.3.1 object.assign: 4.1.4 - object.values: 1.1.6 + object.values: 1.1.7 dev: false /jszip@3.10.1: @@ -16973,11 +16568,10 @@ packages: dev: true optional: true - /keyv@4.5.2: - resolution: {integrity: sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==} + /keyv@4.5.3: + resolution: {integrity: sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==} dependencies: json-buffer: 3.0.1 - dev: true /kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} @@ -17125,9 +16719,9 @@ packages: dependencies: p-locate: 5.0.0 - /lodash._reinterpolate@3.0.0: - resolution: {integrity: sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==} - dev: true + /lodash.clonedeep@4.5.0: + resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==} + dev: false /lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} @@ -17145,21 +16739,41 @@ packages: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} dev: true + /lodash.includes@4.3.0: + resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==} + dev: false + /lodash.isarguments@3.1.0: resolution: {integrity: sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==} dev: false + /lodash.isboolean@3.0.3: + resolution: {integrity: sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==} + dev: false + /lodash.isequal@4.5.0: resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} dev: true + /lodash.isinteger@4.0.4: + resolution: {integrity: sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==} + dev: false + /lodash.ismatch@4.4.0: resolution: {integrity: sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==} dev: true + /lodash.isnumber@3.0.3: + resolution: {integrity: sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==} + dev: false + /lodash.isplainobject@4.0.6: resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} + /lodash.isstring@4.0.1: + resolution: {integrity: sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==} + dev: false + /lodash.memoize@4.1.2: resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} dev: true @@ -17167,27 +16781,22 @@ packages: /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + /lodash.once@4.1.1: + resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==} + dev: false + /lodash.sortby@4.7.0: resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} dev: true - /lodash.template@4.5.0: - resolution: {integrity: sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==} - dependencies: - lodash._reinterpolate: 3.0.0 - lodash.templatesettings: 4.2.0 - dev: true - - /lodash.templatesettings@4.2.0: - resolution: {integrity: sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==} - dependencies: - lodash._reinterpolate: 3.0.0 - dev: true - /lodash.throttle@4.1.1: resolution: {integrity: sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==} dev: false + /lodash.truncate@4.4.2: + resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} + dev: false + /lodash.union@4.6.0: resolution: {integrity: sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==} @@ -17238,14 +16847,6 @@ packages: dependencies: js-tokens: 4.0.0 - /loud-rejection@1.6.0: - resolution: {integrity: sha512-RPNliZOFkqFumDhvYqOaNY4Uz9oJM2K9tC6JWsJJsNdhuONW4LQHRBpb0qf4pJApVffI5N39SwzWZJuEhfd7eQ==} - engines: {node: '>=0.10.0'} - dependencies: - currently-unhandled: 0.4.1 - signal-exit: 3.0.7 - dev: true - /loupe@2.3.6: resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} dependencies: @@ -17257,8 +16858,8 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /lru-cache@10.0.0: - resolution: {integrity: sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==} + /lru-cache@10.0.1: + resolution: {integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==} engines: {node: 14 || >=16.14} dev: true @@ -17282,8 +16883,8 @@ packages: resolution: {integrity: sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==} dev: true - /luxon@3.3.0: - resolution: {integrity: sha512-An0UCfG/rSiqtAIiBPO0Y9/zAnHUZxAMiCpTd5h2smgsj7GGmcenvrvww2cqNA8/4A5ZrD1gJpHN2mIHZQF+Mg==} + /luxon@3.4.2: + resolution: {integrity: sha512-uBoAVCVcajsrqy3pv7eo5jEUz1oeLmCcnMv8n4AJpT5hbpN9lUssAXibNElpbLce3Mhm9dyBzwYLs9zctM/0tA==} engines: {node: '>=12'} dev: false @@ -17299,8 +16900,8 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true - /magic-string@0.30.0: - resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==} + /magic-string@0.30.3: + resolution: {integrity: sha512-B7xGbll2fG/VjP+SWg4sX3JynwIU0mjoTc6MPpKNuIvftk6u6vqhDnk1R80b8C2GBR6ywqy+1DcKBrevBg+bmw==} engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': 1.4.15 @@ -17311,63 +16912,45 @@ packages: engines: {node: '>=6'} dependencies: pify: 4.0.1 - semver: 5.7.1 + semver: 5.7.2 dev: true /make-dir@3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} dependencies: - semver: 6.3.0 + semver: 6.3.1 - /make-error@1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + /make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} + dependencies: + semver: 7.5.4 dev: true - /make-fetch-happen@10.2.1: - resolution: {integrity: sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - dependencies: - agentkeepalive: 4.3.0 - cacache: 16.1.3 - http-cache-semantics: 4.1.1 - http-proxy-agent: 5.0.0 - https-proxy-agent: 5.0.1 - is-lambda: 1.0.1 - lru-cache: 7.18.3 - minipass: 3.3.6 - minipass-collect: 1.0.2 - minipass-fetch: 2.1.2 - minipass-flush: 1.0.5 - minipass-pipeline: 1.2.4 - negotiator: 0.6.3 - promise-retry: 2.0.1 - socks-proxy-agent: 7.0.0 - ssri: 9.0.1 - transitivePeerDependencies: - - bluebird - - supports-color + /make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} dev: true /make-fetch-happen@11.1.1: resolution: {integrity: sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - agentkeepalive: 4.3.0 - cacache: 17.1.3 + agentkeepalive: 4.5.0 + cacache: 17.1.4 http-cache-semantics: 4.1.1 http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 is-lambda: 1.0.1 lru-cache: 7.18.3 minipass: 5.0.0 - minipass-fetch: 3.0.3 + minipass-fetch: 3.0.4 minipass-flush: 1.0.5 minipass-pipeline: 1.2.4 negotiator: 0.6.3 promise-retry: 2.0.1 socks-proxy-agent: 7.0.0 - ssri: 10.0.4 + ssri: 10.0.5 transitivePeerDependencies: - supports-color dev: true @@ -17390,11 +16973,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /map-obj@2.0.0: - resolution: {integrity: sha512-TzQSV2DiMYgoF5RycneKVUzIa9bQsj/B3tTgsE3dOGqlzHnGIDaC7XBE7grnA+8kZPnfqSGFe95VHc2oc0VFUQ==} - engines: {node: '>=4'} - dev: true - /map-obj@4.3.0: resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} engines: {node: '>=8'} @@ -17414,8 +16992,8 @@ packages: uc.micro: 1.0.6 dev: true - /markdown-to-jsx@7.2.1(react@18.2.0): - resolution: {integrity: sha512-9HrdzBAo0+sFz9ZYAGT5fB8ilzTW+q6lPocRxrIesMO+aB40V9MgFfbfMXxlGjf22OpRy+IXlvVaQenicdpgbg==} + /markdown-to-jsx@7.3.2(react@18.2.0): + resolution: {integrity: sha512-B+28F5ucp83aQm+OxNrPkS8z0tMKaeHiy0lHJs3LqCyDQFtWuenaIrkaVTgAm1pf1AU85LXltva86hlaT17i8Q==} engines: {node: '>= 10'} peerDependencies: react: '>= 0.14.0' @@ -17439,16 +17017,16 @@ packages: /mdast-util-definitions@5.1.2: resolution: {integrity: sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==} dependencies: - '@types/mdast': 3.0.11 - '@types/unist': 2.0.6 + '@types/mdast': 3.0.12 + '@types/unist': 2.0.8 unist-util-visit: 4.1.2 dev: true /mdast-util-from-markdown@1.3.1: resolution: {integrity: sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww==} dependencies: - '@types/mdast': 3.0.11 - '@types/unist': 2.0.6 + '@types/mdast': 3.0.12 + '@types/unist': 2.0.8 decode-named-character-reference: 1.0.2 mdast-util-to-string: 3.2.0 micromark: 3.2.0 @@ -17466,8 +17044,8 @@ packages: /mdast-util-to-hast@12.3.0: resolution: {integrity: sha512-pits93r8PhnIoU4Vy9bjW39M2jJ6/tdHyja9rrot9uujkN7UTU9SDnE6WNJz/IGyQk3XHX6yNNtrBH6cQzm8Hw==} dependencies: - '@types/hast': 2.3.4 - '@types/mdast': 3.0.11 + '@types/hast': 2.3.5 + '@types/mdast': 3.0.12 mdast-util-definitions: 5.1.2 micromark-util-sanitize-uri: 1.2.0 trim-lines: 3.0.1 @@ -17483,7 +17061,7 @@ packages: /mdast-util-to-string@3.2.0: resolution: {integrity: sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==} dependencies: - '@types/mdast': 3.0.11 + '@types/mdast': 3.0.12 dev: true /mdurl@1.0.1: @@ -17501,50 +17079,12 @@ packages: mimic-fn: 3.1.0 dev: false - /memoization-registry@1.0.1: - resolution: {integrity: sha512-jKMBM586f/vsZVhmOO4mh1QH7Kx3BV/gIqxR3/hTh4L0Lej3P0POhPuC/dSuYQ6i3sSJwafvCFJic62rGzwtBw==} - dependencies: - mild-map: 1.1.1 - dev: false - /memoizerific@1.11.3: resolution: {integrity: sha512-/EuHYwAPdLtXwAwSZkh/Gutery6pD2KYd44oQLhAvQp/50mpyduZh8Q7PYHXTCJ+wuXxt7oij2LXyIJOOYFPog==} dependencies: map-or-similar: 1.5.0 dev: true - /meow@4.0.1: - resolution: {integrity: sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==} - engines: {node: '>=4'} - dependencies: - camelcase-keys: 4.2.0 - decamelize-keys: 1.1.1 - loud-rejection: 1.6.0 - minimist: 1.2.8 - minimist-options: 3.0.2 - normalize-package-data: 2.5.0 - read-pkg-up: 3.0.0 - redent: 2.0.0 - trim-newlines: 2.0.0 - dev: true - - /meow@7.1.1: - resolution: {integrity: sha512-GWHvA5QOcS412WCo8vwKDlTelGLsCGBVevQB5Kva961rmNfun0PCbv5+xta2kUMFJyR8/oWnn7ddeKdosbAPbA==} - engines: {node: '>=10'} - dependencies: - '@types/minimist': 1.2.2 - camelcase-keys: 6.2.2 - decamelize-keys: 1.1.1 - hard-rejection: 2.1.0 - minimist-options: 4.1.0 - normalize-package-data: 2.5.0 - read-pkg-up: 7.0.1 - redent: 3.0.0 - trim-newlines: 3.0.1 - type-fest: 0.13.1 - yargs-parser: 18.1.3 - dev: true - /meow@8.1.2: resolution: {integrity: sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==} engines: {node: '>=10'} @@ -17730,7 +17270,7 @@ packages: /micromark@3.2.0: resolution: {integrity: sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==} dependencies: - '@types/debug': 4.1.7 + '@types/debug': 4.1.8 debug: 4.3.4 decode-named-character-reference: 1.0.2 micromark-core-commonmark: 1.1.0 @@ -17758,12 +17298,6 @@ packages: braces: 3.0.2 picomatch: 2.3.1 - /mild-map@1.1.1: - resolution: {integrity: sha512-+rxFxqOkENTsgH10mOP7ofDeEQQYsBLgYKsnVE8/Bu0E0LquCx7tGhdBdf8dLkXOuK2dKXJUX7uSg8B/JyR9SA==} - dependencies: - is: /@fabiospampinato/is@2.6.0 - dev: false - /mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} @@ -17833,14 +17367,6 @@ packages: dependencies: brace-expansion: 2.0.1 - /minimist-options@3.0.2: - resolution: {integrity: sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==} - engines: {node: '>= 4'} - dependencies: - arrify: 1.0.1 - is-plain-obj: 1.1.0 - dev: true - /minimist-options@4.1.0: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} engines: {node: '>= 6'} @@ -17860,22 +17386,11 @@ packages: minipass: 3.3.6 dev: true - /minipass-fetch@2.1.2: - resolution: {integrity: sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - dependencies: - minipass: 3.3.6 - minipass-sized: 1.0.3 - minizlib: 2.1.2 - optionalDependencies: - encoding: 0.1.13 - dev: true - - /minipass-fetch@3.0.3: - resolution: {integrity: sha512-n5ITsTkDqYkYJZjcRWzZt9qnZKCT7nKCosJhHoj7S7zD+BP4jVbWs+odsniw5TA3E0sLomhTKOKjF86wf11PuQ==} + /minipass-fetch@3.0.4: + resolution: {integrity: sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - minipass: 5.0.0 + minipass: 7.0.3 minipass-sized: 1.0.3 minizlib: 2.1.2 optionalDependencies: @@ -17916,17 +17431,12 @@ packages: dependencies: yallist: 4.0.0 - /minipass@4.2.8: - resolution: {integrity: sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==} - engines: {node: '>=8'} - /minipass@5.0.0: resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} engines: {node: '>=8'} - dev: true - /minipass@6.0.2: - resolution: {integrity: sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==} + /minipass@7.0.3: + resolution: {integrity: sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==} engines: {node: '>=16 || 14 >=14.17'} dev: true @@ -17953,13 +17463,13 @@ packages: engines: {node: '>=10'} hasBin: true - /mlly@1.4.0: - resolution: {integrity: sha512-ua8PAThnTwpprIaU47EPeZ/bPUVp2QYBbWMphUQpVdBI3Lgqzm5KZQ45Agm3YJedHXaIHl6pBGabaLSUPPSptg==} + /mlly@1.4.1: + resolution: {integrity: sha512-SCDs78Q2o09jiZiE2WziwVBEqXQ02XkGdUy45cbJf+BpYRIjArXRJ1Wbowxkb+NaM9DWvS3UC9GiO/6eqvQ/pg==} dependencies: - acorn: 8.9.0 + acorn: 8.10.0 pathe: 1.1.1 pkg-types: 1.0.3 - ufo: 1.1.2 + ufo: 1.3.0 /mnemonist@0.38.3: resolution: {integrity: sha512-2K9QYubXx/NAjv4VLq1d1Ly8pWNC5L3BrixtdkyTegXWJIqY+zLNDhhX/A+ZwWt70tB1S8H4BE8FLYEFyNoOBw==} @@ -18004,13 +17514,8 @@ packages: object-assign: 4.1.1 thenify-all: 1.6.0 - /nan@2.12.1: - resolution: {integrity: sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==} - dev: false - /nan@2.17.0: resolution: {integrity: sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==} - dev: true /nanoid@3.3.6: resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} @@ -18067,11 +17572,11 @@ packages: path-to-regexp: 1.8.0 dev: true - /node-abi@3.45.0: - resolution: {integrity: sha512-iwXuFrMAcFVi/ZoZiqq8BzAdsLw9kxDfTC0HMyjXfSL/6CSDAGD5UmR7azrAgWV1zKYq7dUUMj4owusBWKLsiQ==} + /node-abi@3.47.0: + resolution: {integrity: sha512-2s6B2CWZM//kPgwnuI0KrYwNjfdByE25zvAaEpq9IH4zcNsarH8Ihu/UuX6XMPEogDAxkuUFeZn60pXNHAqn3A==} engines: {node: '>=10'} dependencies: - semver: 7.5.3 + semver: 7.5.4 dev: true /node-addon-api@4.3.0: @@ -18092,11 +17597,11 @@ packages: engines: {node: '>=10.5.0'} dev: true - /node-fetch-native@1.2.0: - resolution: {integrity: sha512-5IAMBTl9p6PaAjYCnMv5FmqIF6GcZnawAVnzaCG0rX2aYZJ4CxEkZNtVPuTRug7fL7wyM5BQYTlAzcyMPi6oTQ==} + /node-fetch-native@1.4.0: + resolution: {integrity: sha512-F5kfEj95kX8tkDhUCYdV8dg3/8Olx/94zB8+ZNthFs6Bz31UpUi8Xh40TN3thLwXgrwXry1pEg9lJ++tLWTcqA==} - /node-fetch@2.6.12: - resolution: {integrity: sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==} + /node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} peerDependencies: encoding: ^0.1.0 @@ -18106,8 +17611,8 @@ packages: dependencies: whatwg-url: 5.0.0 - /node-fetch@3.3.1: - resolution: {integrity: sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==} + /node-fetch@3.3.2: + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: data-uri-to-buffer: 4.0.1 @@ -18128,8 +17633,8 @@ packages: nopt: 6.0.0 npmlog: 6.0.2 rimraf: 3.0.2 - semver: 7.5.3 - tar: 6.1.13 + semver: 7.5.4 + tar: 6.1.15 which: 2.0.2 transitivePeerDependencies: - supports-color @@ -18139,13 +17644,13 @@ packages: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} dev: true - /node-releases@2.0.12: - resolution: {integrity: sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==} + /node-releases@2.0.13: + resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} dev: true - /nodemon@2.0.22: - resolution: {integrity: sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==} - engines: {node: '>=8.10.0'} + /nodemon@3.0.1: + resolution: {integrity: sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==} + engines: {node: '>=10'} hasBin: true dependencies: chokidar: 3.5.3 @@ -18153,8 +17658,8 @@ packages: ignore-by-default: 1.0.1 minimatch: 3.1.2 pstree.remy: 1.1.8 - semver: 5.7.1 - simple-update-notifier: 1.1.0 + semver: 7.5.4 + simple-update-notifier: 2.0.0 supports-color: 5.5.0 touch: 3.1.0 undefsafe: 2.0.5 @@ -18179,8 +17684,8 @@ packages: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: hosted-git-info: 2.8.9 - resolve: 1.22.2 - semver: 5.7.1 + resolve: 1.22.4 + semver: 5.7.2 validate-npm-package-license: 3.0.4 /normalize-package-data@3.0.3: @@ -18188,18 +17693,8 @@ packages: engines: {node: '>=10'} dependencies: hosted-git-info: 4.1.0 - is-core-module: 2.12.1 - semver: 7.5.3 - validate-npm-package-license: 3.0.4 - dev: true - - /normalize-package-data@4.0.1: - resolution: {integrity: sha512-EBk5QKKuocMJhB3BILuKhmaPjI8vNRSpIfO9woLC6NyHVkKKdVEdAO1mrT0ZfxNR1lKwCcTkuZfmGIFdizZ8Pg==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - dependencies: - hosted-git-info: 5.2.1 - is-core-module: 2.12.1 - semver: 7.5.3 + is-core-module: 2.13.0 + semver: 7.5.4 validate-npm-package-license: 3.0.4 dev: true @@ -18208,10 +17703,9 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: hosted-git-info: 6.1.1 - is-core-module: 2.12.1 - semver: 7.5.3 + is-core-module: 2.13.0 + semver: 7.5.4 validate-npm-package-license: 3.0.4 - dev: false /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} @@ -18231,91 +17725,81 @@ packages: engines: {node: '>=14.16'} dev: true - /npm-bundled@1.1.2: - resolution: {integrity: sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==} - dependencies: - npm-normalize-package-bin: 1.0.1 - dev: true - - /npm-bundled@2.0.1: - resolution: {integrity: sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + /npm-bundled@3.0.0: + resolution: {integrity: sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - npm-normalize-package-bin: 2.0.0 + npm-normalize-package-bin: 3.0.1 dev: true - /npm-check-updates@16.0.0: - resolution: {integrity: sha512-l1PSWEQ51Zhq54LVMbvWcBDIKTqLLE0Bj40mP0z85mHR7wUJYRN1C+pndPu5qW3ay0h5466zZGc3E+o7wtJ2gA==} + /npm-check-updates@16.13.2: + resolution: {integrity: sha512-0pQI+k1y0JVwenB2gBc69tXFYfkckSVrNrlcn7TIrZfis4LnfdzakY/LYzZKt/lx37edN2isk3d2Zw4csptu/w==} engines: {node: '>=14.14'} hasBin: true dependencies: chalk: 5.3.0 - cli-table: 0.3.11 - commander: 9.5.0 + cli-table3: 0.6.3 + commander: 10.0.1 fast-memoize: 2.5.2 find-up: 5.0.0 fp-and-or: 0.1.3 get-stdin: 8.0.0 globby: 11.1.0 hosted-git-info: 5.2.1 + ini: 4.1.1 + js-yaml: 4.1.0 json-parse-helpfulerror: 1.0.3 jsonlines: 0.1.1 lodash: 4.17.21 - minimatch: 5.1.6 + make-fetch-happen: 11.1.1 + minimatch: 9.0.3 p-map: 4.0.0 - pacote: 13.6.2 + pacote: 15.2.0 parse-github-url: 1.0.2 progress: 2.0.3 - prompts-ncu: 2.5.1 + prompts-ncu: 3.0.0 rc-config-loader: 4.1.3 remote-git-tags: 3.0.0 - rimraf: 3.0.2 - semver: 7.5.2 + rimraf: 5.0.1 + semver: 7.5.4 semver-utils: 1.1.4 source-map-support: 0.5.21 - spawn-please: 1.0.0 + spawn-please: 2.0.2 + strip-json-comments: 5.0.1 + untildify: 4.0.0 update-notifier: 6.0.2 - yaml: 2.2.1 transitivePeerDependencies: - bluebird - supports-color dev: true - /npm-install-checks@5.0.0: - resolution: {integrity: sha512-65lUsMI8ztHCxFz5ckCEC44DRvEGdZX5usQFriauxHEwt7upv1FKaQEmAtU0YnOAdwuNWCmk64xYiQABNrEyLA==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + /npm-install-checks@6.2.0: + resolution: {integrity: sha512-744wat5wAAHsxa4590mWO0tJ8PKxR8ORZsH9wGpQc3nWTzozMAgBN/XyqYw7mg3yqLM8dLwEnwSfKMmXAjF69g==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - semver: 7.5.3 + semver: 7.5.4 dev: true - /npm-normalize-package-bin@1.0.1: - resolution: {integrity: sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==} - dev: true - - /npm-normalize-package-bin@2.0.0: - resolution: {integrity: sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + /npm-normalize-package-bin@3.0.1: + resolution: {integrity: sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true - /npm-package-arg@9.1.2: - resolution: {integrity: sha512-pzd9rLEx4TfNJkovvlBSLGhq31gGu2QDexFPWT19yCDh0JgnRhlBLNo5759N0AJmBk+kQ9Y/hXoLnlgFD+ukmg==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + /npm-package-arg@10.1.0: + resolution: {integrity: sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - hosted-git-info: 5.2.1 - proc-log: 2.0.1 - semver: 7.5.3 - validate-npm-package-name: 4.0.0 + hosted-git-info: 6.1.1 + proc-log: 3.0.0 + semver: 7.5.4 + validate-npm-package-name: 5.0.0 dev: true - /npm-packlist@5.1.3: - resolution: {integrity: sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - hasBin: true + /npm-packlist@7.0.4: + resolution: {integrity: sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - glob: 8.1.0 - ignore-walk: 5.0.1 - npm-bundled: 2.0.1 - npm-normalize-package-bin: 2.0.0 + ignore-walk: 6.0.3 dev: true /npm-path@2.0.4: @@ -18326,29 +17810,28 @@ packages: which: 1.3.1 dev: false - /npm-pick-manifest@7.0.2: - resolution: {integrity: sha512-gk37SyRmlIjvTfcYl6RzDbSmS9Y4TOBXfsPnoYqTHARNgWbyDiCSMLUpmALDj4jjcTZpURiEfsSHJj9k7EV4Rw==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + /npm-pick-manifest@8.0.2: + resolution: {integrity: sha512-1dKY+86/AIiq1tkKVD3l0WI+Gd3vkknVGAggsFeBkTvbhMQ1OND/LKkYv4JtXPKUJ8bOTCyLiqEg2P6QNdK+Gg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - npm-install-checks: 5.0.0 - npm-normalize-package-bin: 2.0.0 - npm-package-arg: 9.1.2 - semver: 7.5.3 + npm-install-checks: 6.2.0 + npm-normalize-package-bin: 3.0.1 + npm-package-arg: 10.1.0 + semver: 7.5.4 dev: true - /npm-registry-fetch@13.3.1: - resolution: {integrity: sha512-eukJPi++DKRTjSBRcDZSDDsGqRK3ehbxfFUcgaRd0Yp6kRwOwh2WVn0r+8rMB4nnuzvAk6rQVzl6K5CkYOmnvw==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + /npm-registry-fetch@14.0.5: + resolution: {integrity: sha512-kIDMIo4aBm6xg7jOttupWZamsZRkAqMqwqqbVXnUqstY5+tapvv6bkH/qMR76jdgV+YljEUCyWx3hRYMrJiAgA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - make-fetch-happen: 10.2.1 - minipass: 3.3.6 - minipass-fetch: 2.1.2 + make-fetch-happen: 11.1.1 + minipass: 5.0.0 + minipass-fetch: 3.0.4 minipass-json-stream: 1.0.1 minizlib: 2.1.2 - npm-package-arg: 9.1.2 - proc-log: 2.0.1 + npm-package-arg: 10.1.0 + proc-log: 3.0.0 transitivePeerDependencies: - - bluebird - supports-color dev: true @@ -18374,8 +17857,8 @@ packages: which: 1.3.1 dev: false - /npm@9.6.4: - resolution: {integrity: sha512-8/Mct0X/w77PmgIpSlXfNIOlrZBfT+8966zLCxOhwi1qZ2Ueyy99uWPSDW6bt2OKw1NzrvHJBSgkzAvn1iWuhw==} + /npm@9.8.1: + resolution: {integrity: sha512-AfDvThQzsIXhYgk9zhbk5R+lh811lKkLAeQMMhSypf1BM7zUafeIIBzMzespeuVEJ0+LvY36oRQYf7IKLzU3rw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} hasBin: true dev: true @@ -18383,8 +17866,10 @@ packages: - '@isaacs/string-locale-compare' - '@npmcli/arborist' - '@npmcli/config' + - '@npmcli/fs' - '@npmcli/map-workspaces' - '@npmcli/package-json' + - '@npmcli/promise-spawn' - '@npmcli/run-script' - abbrev - archy @@ -18435,10 +17920,10 @@ packages: - proc-log - qrcode-terminal - read - - read-package-json - - read-package-json-fast - semver + - sigstore - ssri + - supports-color - tar - text-table - tiny-relative-date @@ -18447,15 +17932,6 @@ packages: - which - write-file-atomic - /npmlog@5.0.1: - resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} - dependencies: - are-we-there-yet: 2.0.0 - console-control-strings: 1.1.0 - gauge: 3.0.2 - set-blocking: 2.0.0 - dev: true - /npmlog@6.0.2: resolution: {integrity: sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -18472,18 +17948,8 @@ packages: boolbase: 1.0.0 dev: true - /null-check@1.0.0: - resolution: {integrity: sha512-j8ZNHg19TyIQOWCGeeQJBuu6xZYIEurf8M1Qsfd8mFrGEfIZytbw18YjKWg+LcO25NowXGZXZpKAx+Ui3TFfDw==} - engines: {node: '>=0.10.0'} - dev: true - - /number-is-nan@1.0.1: - resolution: {integrity: sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==} - engines: {node: '>=0.10.0'} - dev: true - - /nwsapi@2.2.5: - resolution: {integrity: sha512-6xpotnECFy/og7tKSBVmUNft7J3jyXAka4XvG6AUhFWRz+Q/Ljus7znJAA3bxColfQLdS+XsjoodtJfCgeTEFQ==} + /nwsapi@2.2.7: + resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} dev: true /object-assign@4.1.1: @@ -18523,38 +17989,45 @@ packages: has-symbols: 1.0.3 object-keys: 1.1.1 - /object.entries@1.1.6: - resolution: {integrity: sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==} + /object.entries@1.1.7: + resolution: {integrity: sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - es-abstract: 1.21.2 + es-abstract: 1.22.1 dev: false - /object.fromentries@2.0.6: - resolution: {integrity: sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==} + /object.fromentries@2.0.7: + resolution: {integrity: sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - es-abstract: 1.21.2 - dev: false + es-abstract: 1.22.1 + + /object.groupby@1.0.1: + resolution: {integrity: sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + get-intrinsic: 1.2.1 - /object.hasown@1.1.2: - resolution: {integrity: sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==} + /object.hasown@1.1.3: + resolution: {integrity: sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA==} dependencies: define-properties: 1.2.0 - es-abstract: 1.21.2 + es-abstract: 1.22.1 dev: false - /object.values@1.1.6: - resolution: {integrity: sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==} + /object.values@1.1.7: + resolution: {integrity: sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - es-abstract: 1.21.2 + es-abstract: 1.22.1 /obliterator@1.6.1: resolution: {integrity: sha512-9WXswnqINnnhOG/5SLimUlzuU1hFJUc8zkwyD59Sd+dPOMf05PmnYG/d6Q7HZ+KmgkZJa1PxRso6QdM3sTNHig==} @@ -18564,16 +18037,16 @@ packages: resolution: {integrity: sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==} dev: true - /ofetch@1.1.1: - resolution: {integrity: sha512-SSMoktrp9SNLi20BWfB/BnnKcL0RDigXThD/mZBeQxkIRv1xrd9183MtLdsqRYLYSqW0eTr5t8w8MqjNhvoOQQ==} + /ofetch@1.3.3: + resolution: {integrity: sha512-s1ZCMmQWXy4b5K/TW9i/DtiN8Ku+xCiHcjQ6/J/nDdssirrQNOoB165Zu8EqLMA2lln1JUth9a0aW9Ap2ctrUg==} dependencies: - destr: 2.0.0 - node-fetch-native: 1.2.0 - ufo: 1.1.2 + destr: 2.0.1 + node-fetch-native: 1.4.0 + ufo: 1.3.0 dev: false - /ohash@1.1.2: - resolution: {integrity: sha512-9CIOSq5945rI045GFtcO3uudyOkYVY1nyfFxVQp+9BRgslr8jPNiSSrsFGg/BNTUFOLqx0P5tng6G32brIPw0w==} + /ohash@1.1.3: + resolution: {integrity: sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw==} dev: false /on-finished@2.4.1: @@ -18611,8 +18084,8 @@ packages: dependencies: mimic-fn: 4.0.0 - /oo-ascii-tree@1.84.0: - resolution: {integrity: sha512-8bvsAKFAQ7HwU3lAEDwsKYDkTqsDTsRTkr3J0gvH1U805d2no9rUNYptWzg3oYku5h5mr9Bko+BIh1pjSD8qrg==} + /oo-ascii-tree@1.88.0: + resolution: {integrity: sha512-A7m3z7XlUD3DnXSYxWmAdKQTIY6+1JzWS0lhaqgPGhj6g7a/odCsV1ctaRnjJljCB3zQBrbp2QHdYTUsD9AXcQ==} engines: {node: '>= 14.17.0'} /open@7.4.2: @@ -18623,8 +18096,8 @@ packages: is-wsl: 2.2.0 dev: true - /open@8.4.0: - resolution: {integrity: sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==} + /open@8.4.2: + resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} engines: {node: '>=12'} dependencies: define-lazy-prop: 2.0.0 @@ -18765,35 +18238,32 @@ packages: got: 12.6.1 registry-auth-token: 5.0.2 registry-url: 6.0.1 - semver: 7.5.3 + semver: 7.5.4 dev: true - /pacote@13.6.2: - resolution: {integrity: sha512-Gu8fU3GsvOPkak2CkbojR7vjs3k3P9cA6uazKTHdsdV0gpCEQq2opelnEv30KRQWgVzP5Vd/5umjcedma3MKtg==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + /pacote@15.2.0: + resolution: {integrity: sha512-rJVZeIwHTUta23sIZgEIM62WYwbmGbThdbnkt81ravBplQv+HjyroqnLRNH2+sLJHcGZmLRmhPwACqhfTcOmnA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} hasBin: true dependencies: - '@npmcli/git': 3.0.2 - '@npmcli/installed-package-contents': 1.0.7 - '@npmcli/promise-spawn': 3.0.0 - '@npmcli/run-script': 4.2.1 - cacache: 16.1.3 - chownr: 2.0.0 - fs-minipass: 2.1.0 - infer-owner: 1.0.4 - minipass: 3.3.6 - mkdirp: 1.0.4 - npm-package-arg: 9.1.2 - npm-packlist: 5.1.3 - npm-pick-manifest: 7.0.2 - npm-registry-fetch: 13.3.1 - proc-log: 2.0.1 + '@npmcli/git': 4.1.0 + '@npmcli/installed-package-contents': 2.0.2 + '@npmcli/promise-spawn': 6.0.2 + '@npmcli/run-script': 6.0.2 + cacache: 17.1.4 + fs-minipass: 3.0.3 + minipass: 5.0.0 + npm-package-arg: 10.1.0 + npm-packlist: 7.0.4 + npm-pick-manifest: 8.0.2 + npm-registry-fetch: 14.0.5 + proc-log: 3.0.0 promise-retry: 2.0.1 - read-package-json: 5.0.2 - read-package-json-fast: 2.0.3 - rimraf: 3.0.2 - ssri: 9.0.1 - tar: 6.1.13 + read-package-json: 6.0.4 + read-package-json-fast: 3.0.2 + sigstore: 1.9.0 + ssri: 10.0.5 + tar: 6.1.15 transitivePeerDependencies: - bluebird - supports-color @@ -18836,7 +18306,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.22.13 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -18849,7 +18319,7 @@ packages: /parse-semver@1.1.1: resolution: {integrity: sha512-Eg1OuNntBMH0ojvEKSrvDSnwLmvVuUOSdylH/pSCPNMIspLlweJyIWXCE+k/5hm3cj/EBUYwmWkjhBALNP4LXQ==} dependencies: - semver: 5.7.1 + semver: 5.7.2 dev: true /parse5-htmlparser2-tree-adapter@7.0.0: @@ -18915,16 +18385,16 @@ packages: /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - /path-scurry@1.10.0: - resolution: {integrity: sha512-tZFEaRQbMLjwrsmidsGJ6wDMv0iazJWk6SfIKnY4Xru8auXgmJkOBa5DUbYFcFD2Rzk2+KDlIiF0GVXNCbgC7g==} + /path-scurry@1.10.1: + resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} engines: {node: '>=16 || 14 >=14.17'} dependencies: - lru-cache: 10.0.0 - minipass: 6.0.2 + lru-cache: 10.0.1 + minipass: 7.0.3 dev: true - /path-temp@2.0.0: - resolution: {integrity: sha512-92olbatybjsHTGB2CUnAM7s0mU/27gcMfLNA7t09UftndUdxywlQKur3fzXEPpfLrgZD3I2Bt8+UmiL7YDEgXQ==} + /path-temp@2.1.0: + resolution: {integrity: sha512-cMMJTAZlion/RWRRC48UbrDymEIt+/YSD/l8NqjneyDw2rDOBQcP5yRkMB4CYGn47KMhZvbblBP7Z79OsMw72w==} engines: {node: '>=8.15'} dependencies: unique-string: 2.0.0 @@ -19036,7 +18506,7 @@ packages: resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} dependencies: jsonc-parser: 3.2.0 - mlly: 1.4.0 + mlly: 1.4.1 pathe: 1.1.1 /pkg-up@3.1.0: @@ -19046,8 +18516,8 @@ packages: find-up: 3.0.0 dev: true - /playwright-core@1.35.1: - resolution: {integrity: sha512-pNXb6CQ7OqmGDRspEjlxE49w+4YtR6a3X6mT1hZXeJHWmsEz7SunmvZeiG/+y1yyMZdHnnn73WKYdtV1er0Xyg==} + /playwright-core@1.37.1: + resolution: {integrity: sha512-17EuQxlSIYCmEMwzMqusJ2ztDgJePjrbttaefgdsiqeLWidjYz9BxXaTaZWxH1J95SHGk6tjE+dwgWILJoUZfA==} engines: {node: '>=16'} hasBin: true dev: true @@ -19061,30 +18531,30 @@ packages: resolution: {integrity: sha512-Sz2Lkdxz6F2Pgnpi9U5Ng/WdWAUZxmHrNPoVlm3aAemxoy2Qy7LGjQg4uf8qKelDAUW94F4np3iH2YPf2qefcQ==} engines: {node: '>=10'} dependencies: - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.22.11 dev: true - /postcss-import@15.1.0(postcss@8.4.24): + /postcss-import@15.1.0(postcss@8.4.29): resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} engines: {node: '>=14.0.0'} peerDependencies: postcss: ^8.0.0 dependencies: - postcss: 8.4.24 + postcss: 8.4.29 postcss-value-parser: 4.2.0 read-cache: 1.0.0 - resolve: 1.22.2 + resolve: 1.22.4 - /postcss-js@4.0.1(postcss@8.4.24): + /postcss-js@4.0.1(postcss@8.4.29): resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} engines: {node: ^12 || ^14 || >= 16} peerDependencies: postcss: ^8.4.21 dependencies: camelcase-css: 2.0.1 - postcss: 8.4.24 + postcss: 8.4.29 - /postcss-load-config@3.1.4(postcss@8.4.24): + /postcss-load-config@3.1.4(postcss@8.4.29): resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} engines: {node: '>= 10'} peerDependencies: @@ -19097,7 +18567,7 @@ packages: optional: true dependencies: lilconfig: 2.1.0 - postcss: 8.4.24 + postcss: 8.4.29 yaml: 1.10.2 dev: true @@ -19114,11 +18584,11 @@ packages: optional: true dependencies: lilconfig: 2.1.0 - ts-node: 10.9.1(@types/node@16.0.0)(typescript@4.9.4) + ts-node: 10.9.1(@types/node@16.18.23)(typescript@4.9.5) yaml: 1.10.2 dev: true - /postcss-load-config@4.0.1(postcss@8.4.24): + /postcss-load-config@4.0.1(postcss@8.4.29): resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} engines: {node: '>= 14'} peerDependencies: @@ -19131,16 +18601,16 @@ packages: optional: true dependencies: lilconfig: 2.1.0 - postcss: 8.4.24 - yaml: 2.3.1 + postcss: 8.4.29 + yaml: 2.3.2 - /postcss-nested@6.0.1(postcss@8.4.24): + /postcss-nested@6.0.1(postcss@8.4.29): resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.2.14 dependencies: - postcss: 8.4.24 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 /postcss-selector-parser@6.0.13: @@ -19153,8 +18623,8 @@ packages: /postcss-value-parser@4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - /postcss@8.4.24: - resolution: {integrity: sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==} + /postcss@8.4.29: + resolution: {integrity: sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.6 @@ -19166,13 +18636,13 @@ packages: engines: {node: '>=10'} hasBin: true dependencies: - detect-libc: 2.0.1 + detect-libc: 2.0.2 expand-template: 2.0.3 github-from-package: 0.0.0 minimist: 1.2.8 mkdirp-classic: 0.5.3 napi-build-utils: 1.0.2 - node-abi: 3.45.0 + node-abi: 3.47.0 pump: 3.0.0 rc: 1.2.8 simple-get: 4.0.1 @@ -19219,11 +18689,11 @@ packages: react-is: 18.2.0 dev: true - /pretty-format@29.5.0: - resolution: {integrity: sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==} + /pretty-format@29.6.3: + resolution: {integrity: sha512-ZsBgjVhFAj5KeK+nHfF1305/By3lechHQSMWCTl8iHSbfOm2TN5nHEtFc/+W7fAyUeCs2n5iow72gld4gW0xDw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/schemas': 29.4.3 + '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 react-is: 18.2.0 dev: true @@ -19244,9 +18714,9 @@ packages: resolution: {integrity: sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==} dev: false - /proc-log@2.0.1: - resolution: {integrity: sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + /proc-log@3.0.0: + resolution: {integrity: sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true /process-nextick-args@2.0.1: @@ -19261,8 +18731,8 @@ packages: engines: {node: '>=0.4.0'} dev: true - /projen@0.71.60: - resolution: {integrity: sha512-/up45q54xkLQdG09lEnPWF/Yzph2YKW9RmOO5rXkrVUUJTDmFSw8gogxbLR3MIWxBovDeHj7cUElvev1x+VMnw==} + /projen@0.71.163: + resolution: {integrity: sha512-Sj0UthyhhvHYAhgvuQtQk6R4ia/AkHGT/JG3PFbEjIIYcPSImonW+1OIrZ+S+ofWZJPWZj07RBYLiZ+qAVm8NQ==} engines: {node: '>= 14.0.0'} hasBin: true dependencies: @@ -19274,10 +18744,10 @@ packages: fast-json-patch: 3.1.1 glob: 8.1.0 ini: 2.0.0 - semver: 7.5.3 + semver: 7.5.4 shx: 0.3.4 xmlbuilder2: 3.1.1 - yaml: 2.3.1 + yaml: 2.3.2 yargs: 17.7.2 bundledDependencies: - '@iarna/toml' @@ -19311,9 +18781,9 @@ packages: retry: 0.12.0 dev: true - /prompts-ncu@2.5.1: - resolution: {integrity: sha512-Hdd7GgV7b76Yh9FP9HL1D9xqtJCJdVPpiM2vDtuoc8W1KfweJe15gutFYmxkq83ViFaagFM8K0UcPCQ/tZq8bA==} - engines: {node: '>= 6'} + /prompts-ncu@3.0.0: + resolution: {integrity: sha512-qyz9UxZ5MlPKWVhWrCmSZ1ahm2GVYdjLb8og2sg0IPth1KRuhcggHGuijz0e41dkx35p1t1q3GRISGH7QGALFA==} + engines: {node: '>= 14'} dependencies: kleur: 4.1.5 sisteransi: 1.0.5 @@ -19334,8 +18804,8 @@ packages: object-assign: 4.1.1 react-is: 16.13.1 - /property-information@6.2.0: - resolution: {integrity: sha512-kma4U7AFCTwpqq5twzC1YVIDXSqg6qQK6JN0smOw8fgRy1OkMi0CYSzFmsy6dnqSenamAtj0CyXMUJ1Mf6oROg==} + /property-information@6.3.0: + resolution: {integrity: sha512-gVNZ74nqhRMiIUYWGQdosYetaKc83x8oT41a0LlV3AAFCAZwCpg4vmGkq8t34+cUhp3cnM4XDiU/7xlgK7HGrg==} dev: true /proto-list@1.2.4: @@ -19442,11 +18912,6 @@ packages: /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - /quick-lru@1.1.0: - resolution: {integrity: sha512-tRS7sTgyxMXtLum8L65daJnHUhfDUgboRdcWW2bR9vBfrj2+O5HSMbQOJfJJjIVSPFqbBCF37FpwWXGitDc5tA==} - engines: {node: '>=4'} - dev: true - /quick-lru@4.0.1: resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} engines: {node: '>=8'} @@ -19500,7 +18965,7 @@ packages: resolution: {integrity: sha512-lNeOl38Ws0eNxpO3+wD1I9rkHGQyj1NU1jlzv4go2CtEnEQEUfqnIvZG7W+bC/aXdJ27n5x/yUjb6RoT9tko+Q==} dependencies: defu: 6.1.2 - destr: 2.0.0 + destr: 2.0.1 flat: 5.0.2 dev: false @@ -19524,8 +18989,8 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: true - /react-devtools-core@4.27.8: - resolution: {integrity: sha512-KwoH8/wN/+m5wTItLnsgVraGNmFrcTWR3k1VimP1HjtMMw4CNF+F5vg4S/0tzTEKIdpCi2R7mPNTC+/dswZMgw==} + /react-devtools-core@4.28.0: + resolution: {integrity: sha512-E3C3X1skWBdBzwpOUbmXG8SgH6BtsluSMe+s6rRcujNKG1DGi8uIfhdhszkgDpAsMoE55hwqRUzeXCmETDBpTg==} dependencies: shell-quote: 1.8.1 ws: 7.5.9 @@ -19534,12 +18999,12 @@ packages: - utf-8-validate dev: true - /react-docgen-typescript@2.2.2(typescript@5.1.3): + /react-docgen-typescript@2.2.2(typescript@5.2.2): resolution: {integrity: sha512-tvg2ZtOpOi6QDwsb3GZhOjDkkX0h8Z2gipvTg6OVMUyoYoURhEiRNePT8NZItTVCDh39JJHnLdfCOkzoLbFnTg==} peerDependencies: typescript: '>= 4.3.x' dependencies: - typescript: 5.1.3 + typescript: 5.2.2 dev: true /react-docgen@6.0.0-alpha.3: @@ -19547,15 +19012,15 @@ packages: engines: {node: '>=12.0.0'} hasBin: true dependencies: - '@babel/core': 7.22.5 - '@babel/generator': 7.22.5 + '@babel/core': 7.22.11 + '@babel/generator': 7.22.10 ast-types: 0.14.2 commander: 2.20.3 doctrine: 3.0.0 estree-to-babel: 3.2.1 neo-async: 2.6.2 node-dir: 0.1.17 - resolve: 1.22.2 + resolve: 1.22.4 strip-indent: 3.0.0 transitivePeerDependencies: - supports-color @@ -19610,26 +19075,26 @@ packages: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: true - /react-markdown@8.0.7(@types/react@18.2.12)(react@18.2.0): + /react-markdown@8.0.7(@types/react@18.2.21)(react@18.2.0): resolution: {integrity: sha512-bvWbzG4MtOU62XqBx3Xx+zB2raaFFsq4mYiAzfjXJMEz2sixgeAfraA3tvzULF02ZdOMUOKTBFFaZJDDrq+BJQ==} peerDependencies: '@types/react': '>=16' react: '>=16' dependencies: - '@types/hast': 2.3.4 + '@types/hast': 2.3.5 '@types/prop-types': 15.7.5 - '@types/react': 18.2.12 - '@types/unist': 2.0.6 + '@types/react': 18.2.21 + '@types/unist': 2.0.8 comma-separated-tokens: 2.0.3 hast-util-whitespace: 2.0.1 prop-types: 15.8.1 - property-information: 6.2.0 + property-information: 6.3.0 react: 18.2.0 react-is: 18.2.0 remark-parse: 10.0.2 remark-rehype: 10.1.0 space-separated-tokens: 2.0.2 - style-to-object: 0.4.1 + style-to-object: 0.4.2 unified: 10.1.2 unist-util-visit: 4.1.2 vfile: 5.3.7 @@ -19668,6 +19133,58 @@ packages: engines: {node: '>=0.10.0'} dev: true + /react-remove-scroll-bar@2.3.4(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@types/react': 18.2.21 + react: 18.2.0 + react-style-singleton: 2.2.1(@types/react@18.2.21)(react@18.2.0) + tslib: 2.6.2 + dev: true + + /react-remove-scroll@2.5.5(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@types/react': 18.2.21 + react: 18.2.0 + react-remove-scroll-bar: 2.3.4(@types/react@18.2.21)(react@18.2.0) + react-style-singleton: 2.2.1(@types/react@18.2.21)(react@18.2.0) + tslib: 2.6.2 + use-callback-ref: 1.3.0(@types/react@18.2.21)(react@18.2.0) + use-sidecar: 1.1.2(@types/react@18.2.21)(react@18.2.0) + dev: true + + /react-style-singleton@2.2.1(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@types/react': 18.2.21 + get-nonce: 1.0.1 + invariant: 2.2.4 + react: 18.2.0 + tslib: 2.6.2 + dev: true + /react@17.0.2: resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} engines: {node: '>=0.10.0'} @@ -19695,22 +19212,22 @@ packages: strip-bom: 4.0.0 dev: false - /read-package-json-fast@2.0.3: - resolution: {integrity: sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==} - engines: {node: '>=10'} + /read-package-json-fast@3.0.2: + resolution: {integrity: sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - json-parse-even-better-errors: 2.3.1 - npm-normalize-package-bin: 1.0.1 + json-parse-even-better-errors: 3.0.0 + npm-normalize-package-bin: 3.0.1 dev: true - /read-package-json@5.0.2: - resolution: {integrity: sha512-BSzugrt4kQ/Z0krro8zhTwV1Kd79ue25IhNN/VtHFy1mG/6Tluyi+msc0UpwaoQzxSHa28mntAjIZY6kEgfR9Q==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + /read-package-json@6.0.4: + resolution: {integrity: sha512-AEtWXYfopBj2z5N5PbkAOeNHRPUg5q+Nen7QLxV8M2zJq1ym6/lCz3fYNTCXe19puu2d06jfHhrP7v/S2PtMMw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - glob: 8.1.0 - json-parse-even-better-errors: 2.3.1 - normalize-package-data: 4.0.1 - npm-normalize-package-bin: 2.0.0 + glob: 10.3.4 + json-parse-even-better-errors: 3.0.0 + normalize-package-data: 5.0.0 + npm-normalize-package-bin: 3.0.1 dev: true /read-pkg-up@3.0.0: @@ -19804,33 +19321,25 @@ packages: ast-types: 0.15.2 esprima: 4.0.1 source-map: 0.6.1 - tslib: 2.6.0 + tslib: 2.6.2 dev: true - /recast@0.23.2: - resolution: {integrity: sha512-Qv6cPfVZyMOtPszK6PgW70pUgm7gPlFitAPf0Q69rlOA0zLw2XdDcNmPbVGYicFGT9O8I7TZ/0ryJD+6COvIPw==} + /recast@0.23.4: + resolution: {integrity: sha512-qtEDqIZGVcSZCHniWwZWbRy79Dc6Wp3kT/UmDA2RJKBPg7+7k51aQBZirHmUGn5uvHf2rg8DkjizrN26k61ATw==} engines: {node: '>= 4'} dependencies: assert: 2.0.0 ast-types: 0.16.1 esprima: 4.0.1 source-map: 0.6.1 - tslib: 2.6.0 + tslib: 2.6.2 dev: true /rechoir@0.6.2: - resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} - engines: {node: '>= 0.10'} - dependencies: - resolve: 1.22.2 - - /redent@2.0.0: - resolution: {integrity: sha512-XNwrTx77JQCEMXTeb8movBKuK75MgH0RZkujNuDKCezemx/voapl9i2gCSi8WWm8+ox5ycJi1gxF22fR7c0Ciw==} - engines: {node: '>=4'} + resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} + engines: {node: '>= 0.10'} dependencies: - indent-string: 3.2.0 - strip-indent: 2.0.0 - dev: true + resolve: 1.22.4 /redent@3.0.0: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} @@ -19852,17 +19361,29 @@ packages: redis-errors: 1.2.0 dev: false - /redis@4.6.7: - resolution: {integrity: sha512-KrkuNJNpCwRm5vFJh0tteMxW8SaUzkm5fBH7eL5hd/D0fAkzvapxbfGPP/r+4JAXdQuX7nebsBkBqA2RHB7Usw==} + /redis@4.6.8: + resolution: {integrity: sha512-S7qNkPUYrsofQ0ztWlTHSaK0Qqfl1y+WMIxrzeAGNG+9iUZB4HGeBgkHxE6uJJ6iXrkvLd1RVJ2nvu6H1sAzfQ==} dependencies: - '@redis/bloom': 1.2.0(@redis/client@1.5.8) - '@redis/client': 1.5.8 - '@redis/graph': 1.1.0(@redis/client@1.5.8) - '@redis/json': 1.0.4(@redis/client@1.5.8) - '@redis/search': 1.1.3(@redis/client@1.5.8) - '@redis/time-series': 1.0.4(@redis/client@1.5.8) + '@redis/bloom': 1.2.0(@redis/client@1.5.9) + '@redis/client': 1.5.9 + '@redis/graph': 1.1.0(@redis/client@1.5.9) + '@redis/json': 1.0.4(@redis/client@1.5.9) + '@redis/search': 1.1.3(@redis/client@1.5.9) + '@redis/time-series': 1.0.5(@redis/client@1.5.9) dev: true + /reflect.getprototypeof@1.0.4: + resolution: {integrity: sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + get-intrinsic: 1.2.1 + globalthis: 1.0.3 + which-builtin-type: 1.1.3 + dev: false + /regenerate-unicode-properties@10.1.0: resolution: {integrity: sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==} engines: {node: '>=4'} @@ -19874,13 +19395,13 @@ packages: resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==} dev: true - /regenerator-runtime@0.13.11: - resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} + /regenerator-runtime@0.14.0: + resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} - /regenerator-transform@0.15.1: - resolution: {integrity: sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==} + /regenerator-transform@0.15.2: + resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==} dependencies: - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.22.11 dev: true /regexp-tree@0.1.27: @@ -19949,7 +19470,7 @@ packages: /remark-parse@10.0.2: resolution: {integrity: sha512-3ydxgHa/ZQzG8LvC7jTXccARYDcRld3VfcgIIFs7bI6vbRSxJJmzgLEIIoYKyrfhaY+ujuWaf/PJiMZXoiCXgw==} dependencies: - '@types/mdast': 3.0.11 + '@types/mdast': 3.0.12 mdast-util-from-markdown: 1.3.1 unified: 10.1.2 transitivePeerDependencies: @@ -19959,8 +19480,8 @@ packages: /remark-rehype@10.1.0: resolution: {integrity: sha512-EFmR5zppdBp0WQeDVZ/b66CWJipB2q2VLNFMabzDSGR66Z2fQii83G5gTBbgGEnEEA0QRussvrFHxk1HWGJskw==} dependencies: - '@types/hast': 2.3.4 - '@types/mdast': 3.0.11 + '@types/hast': 2.3.5 + '@types/mdast': 3.0.12 mdast-util-to-hast: 12.3.0 unified: 10.1.2 dev: true @@ -20040,11 +19561,11 @@ packages: engines: {node: '>=10'} dev: true - /resolve@1.22.2: - resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} + /resolve@1.22.4: + resolution: {integrity: sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==} hasBin: true dependencies: - is-core-module: 2.12.1 + is-core-module: 2.13.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 @@ -20052,7 +19573,7 @@ packages: resolution: {integrity: sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==} hasBin: true dependencies: - is-core-module: 2.12.1 + is-core-module: 2.13.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: false @@ -20112,12 +19633,20 @@ packages: dependencies: glob: 7.2.3 - /rollup@3.25.3: - resolution: {integrity: sha512-ZT279hx8gszBj9uy5FfhoG4bZx8c+0A1sbqtr7Q3KNWIizpTdDEPZbV2xcbvHsnFp4MavCQYZyzApJ+virB8Yw==} + /rimraf@5.0.1: + resolution: {integrity: sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==} + engines: {node: '>=14'} + hasBin: true + dependencies: + glob: 10.3.4 + dev: true + + /rollup@3.28.1: + resolution: {integrity: sha512-R9OMQmIHJm9znrU3m3cpE8uhN0fGdXiawME7aZIpQqvpS/85+Vt1Hq1/yVIcYfOmaQiHjvXkQAoJukvLpau6Yw==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /run-applescript@5.0.0: @@ -20145,7 +19674,7 @@ packages: /rxjs@7.8.1: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} dependencies: - tslib: 2.6.0 + tslib: 2.6.2 dev: false /sade@1.8.1: @@ -20155,6 +19684,15 @@ packages: mri: 1.2.0 dev: true + /safe-array-concat@1.0.0: + resolution: {integrity: sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==} + engines: {node: '>=0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + has-symbols: 1.0.3 + isarray: 2.0.5 + /safe-buffer@5.1.1: resolution: {integrity: sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==} dev: true @@ -20239,40 +19777,28 @@ packages: resolution: {integrity: sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==} engines: {node: '>=12'} dependencies: - semver: 7.5.3 + semver: 7.5.4 dev: true /semver-intersect@1.4.0: resolution: {integrity: sha512-d8fvGg5ycKAq0+I6nfWeCx6ffaWJCsBYU0H2Rq56+/zFePYfT8mXkB3tWBSjR5BerkHNZ5eTPIk1/LBYas35xQ==} dependencies: - semver: 5.7.1 + semver: 5.7.2 /semver-utils@1.1.4: resolution: {integrity: sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA==} dev: true - /semver@5.7.1: - resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} + /semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true - /semver@6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} + /semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - /semver@7.0.0: - resolution: {integrity: sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==} - hasBin: true - dev: true - - /semver@7.5.2: - resolution: {integrity: sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==} - engines: {node: '>=10'} - hasBin: true - dependencies: - lru-cache: 6.0.0 - - /semver@7.5.3: - resolution: {integrity: sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==} + /semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} engines: {node: '>=10'} hasBin: true dependencies: @@ -20389,10 +19915,24 @@ packages: /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - /signal-exit@4.0.2: - resolution: {integrity: sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==} + /signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} + /sigstore@1.9.0: + resolution: {integrity: sha512-0Zjz0oe37d08VeOtBIuB6cRriqXse2e8w+7yIy2XSXjshRKxbc2KkhXjL229jXSxEm7UbcjS76wcJDGQddVI9A==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + hasBin: true + dependencies: + '@sigstore/bundle': 1.1.0 + '@sigstore/protobuf-specs': 0.2.1 + '@sigstore/sign': 1.0.0 + '@sigstore/tuf': 1.0.3 + make-fetch-happen: 11.1.1 + transitivePeerDependencies: + - supports-color + dev: true + /simple-concat@1.0.1: resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} dev: true @@ -20412,11 +19952,11 @@ packages: dev: false optional: true - /simple-update-notifier@1.1.0: - resolution: {integrity: sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==} - engines: {node: '>=8.10.0'} + /simple-update-notifier@2.0.0: + resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==} + engines: {node: '>=10'} dependencies: - semver: 7.0.0 + semver: 7.5.4 dev: true /sinon@14.0.2: @@ -20438,10 +19978,6 @@ packages: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} - /slash@4.0.0: - resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} - engines: {node: '>=12'} - /slice-ansi@3.0.0: resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==} engines: {node: '>=8'} @@ -20450,6 +19986,15 @@ packages: astral-regex: 2.0.0 is-fullwidth-code-point: 3.0.0 + /slice-ansi@4.0.0: + resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + astral-regex: 2.0.0 + is-fullwidth-code-point: 3.0.0 + dev: false + /smart-buffer@4.2.0: resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} @@ -20530,9 +20075,11 @@ packages: resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} dev: true - /spawn-please@1.0.0: - resolution: {integrity: sha512-Kz33ip6NRNKuyTRo3aDWyWxeGeM0ORDO552Fs6E1nj4pLWPkl37SrRtTnq+MEopVaqgmaO6bAvVS+v64BJ5M/A==} - engines: {node: '>=10'} + /spawn-please@2.0.2: + resolution: {integrity: sha512-KM8coezO6ISQ89c1BzyWNtcn2V2kAVtwIXd3cN/V5a0xPYc1F/vydrRc01wsKFEQ/p+V1a4sw4z2yMITIXrgGw==} + engines: {node: '>=14'} + dependencies: + cross-spawn: 7.0.3 dev: true /spdx-correct@3.2.0: @@ -20553,16 +20100,10 @@ packages: /spdx-license-ids@3.0.13: resolution: {integrity: sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==} - /spdx-license-list@6.6.0: - resolution: {integrity: sha512-vLwdf9AWgdJQmG8cai2HKfkInFsliKaCCOwXmdVonClIhdURTX61KdDOoXC1qcQ7gDaZj+CUTcrMJeAdnCtrKA==} + /spdx-license-list@6.7.0: + resolution: {integrity: sha512-NFqavuJxNsHdwSy/0PjmUpcc76XwlmHQRPjVVtE62qmSLhKJUnzSvJCkU9nrY6TsChfGU1xqGePriBkNtNRMiA==} engines: {node: '>=8'} - /split2@2.2.0: - resolution: {integrity: sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==} - dependencies: - through2: 2.0.5 - dev: true - /split2@3.2.2: resolution: {integrity: sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==} dependencies: @@ -20582,18 +20123,11 @@ packages: engines: {node: '>= 12.13.0'} dev: true - /ssri@10.0.4: - resolution: {integrity: sha512-12+IR2CB2C28MMAw0Ncqwj5QbTcs0nGIhgJzYWzDkb21vWmfNI83KS4f3Ci6GI98WreIfG7o9UXp3C0qbpA8nQ==} + /ssri@10.0.5: + resolution: {integrity: sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - minipass: 5.0.0 - dev: true - - /ssri@9.0.1: - resolution: {integrity: sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - dependencies: - minipass: 3.3.6 + minipass: 7.0.3 dev: true /stack-trace@0.0.10: @@ -20623,36 +20157,33 @@ packages: resolution: {integrity: sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==} dev: false - /standard-version@9.0.0: - resolution: {integrity: sha512-eRR04IscMP3xW9MJTykwz13HFNYs8jS33AGuDiBKgfo5YrO0qX0Nxb4rjupVwT5HDYL/aR+MBEVLjlmVFmFEDQ==} + /standard-version@9.5.0: + resolution: {integrity: sha512-3zWJ/mmZQsOaO+fOlsa0+QK90pwhNd042qEcw6hKFNoLFs7peGyvPffpEBbK/DSGPbyOvli0mUIFv5A4qTjh2Q==} engines: {node: '>=10'} - deprecated: standard-version is deprecated. If you're a GitHub user, I recommend https://github.com/googleapis/release-please as an alternative. hasBin: true dependencies: chalk: 2.4.2 - conventional-changelog: 3.1.23 + conventional-changelog: 3.1.25 conventional-changelog-config-spec: 2.1.0 - conventional-changelog-conventionalcommits: 4.4.0 - conventional-recommended-bump: 6.0.10 + conventional-changelog-conventionalcommits: 4.6.3 + conventional-recommended-bump: 6.1.0 detect-indent: 6.1.0 detect-newline: 3.1.0 dotgitignore: 2.1.0 figures: 3.2.0 - find-up: 4.1.0 - fs-access: 1.0.1 + find-up: 5.0.0 git-semver-tags: 4.1.1 - semver: 7.5.2 + semver: 7.5.4 stringify-package: 1.0.1 - yargs: 15.4.1 + yargs: 16.2.0 dev: true /statuses@2.0.1: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} - /std-env@3.3.3: - resolution: {integrity: sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==} - dev: true + /std-env@3.4.3: + resolution: {integrity: sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==} /stop-iteration-iterator@1.0.0: resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} @@ -20670,11 +20201,11 @@ packages: resolution: {integrity: sha512-siT1RiqlfQnGqgT/YzXVUNsom9S0H1OX+dpdGN1xkyYATo4I6sep5NmsRD/40s3IIOvlCq6akxkqG82urIZW1w==} dev: true - /storybook@7.0.20: - resolution: {integrity: sha512-QxMdqeY7oigiwnVqVPp8550CUtfWW5fujkVXUhgyI1u4i9dpmJxkxWRvfSvhGKAvHf0n2BZ550SevZRPrCr+Tg==} + /storybook@7.4.0: + resolution: {integrity: sha512-jSwbyxHlr2dTY51Pv0mzenjrMDJNZH7DQhHu4ZezpjV+QK/rLCnD+Gt/7iDSaNlsmZJejQcmURDoEybWggMOqw==} hasBin: true dependencies: - '@storybook/cli': 7.0.20 + '@storybook/cli': 7.4.0 transitivePeerDependencies: - bufferutil - encoding @@ -20689,13 +20220,11 @@ packages: /stream-chain@2.2.5: resolution: {integrity: sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA==} - dev: true /stream-json@1.8.0: resolution: {integrity: sha512-HZfXngYHUAr1exT4fxlbc1IOce1RYxp2ldeaf97LYCOPSoOqY/1Psp7iGvpb+6JIOgkra9zDYnPX01hGAHzEPw==} dependencies: stream-chain: 2.2.5 - dev: true /stream-shift@1.0.1: resolution: {integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==} @@ -20735,12 +20264,12 @@ packages: strip-ansi: 7.1.0 dev: true - /string.prototype.matchall@4.0.8: - resolution: {integrity: sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==} + /string.prototype.matchall@4.0.9: + resolution: {integrity: sha512-6i5hL3MqG/K2G43mWXWgP+qizFW/QH/7kCNN13JrJS5q48FN5IKksLDscexKP3dnmB6cdm9jlNgAsWNLpSykmA==} dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - es-abstract: 1.21.2 + es-abstract: 1.22.1 get-intrinsic: 1.2.1 has-symbols: 1.0.3 internal-slot: 1.0.5 @@ -20757,21 +20286,21 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - es-abstract: 1.21.2 + es-abstract: 1.22.1 /string.prototype.trimend@1.0.6: resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - es-abstract: 1.21.2 + es-abstract: 1.22.1 /string.prototype.trimstart@1.0.6: resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - es-abstract: 1.21.2 + es-abstract: 1.22.1 /string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} @@ -20821,11 +20350,6 @@ packages: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} - /strip-indent@2.0.0: - resolution: {integrity: sha512-RsSNPLpq6YUL7QYy44RnPVTn/lcVZtb48Uof3X5JLbF4zD/Gs7ZFDv2HWol+leoQN2mT86LAzSshGfkTlSOpsA==} - engines: {node: '>=4'} - dev: true - /strip-indent@3.0.0: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} @@ -20841,27 +20365,33 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - /strip-literal@1.0.1: - resolution: {integrity: sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==} + /strip-json-comments@5.0.1: + resolution: {integrity: sha512-0fk9zBqO67Nq5M/m45qHCJxylV/DhBlIOVExqgOMiCCrzrhU6tCibRXNqE3jwJLftzE9SNuZtYbpzcO+i9FiKw==} + engines: {node: '>=14.16'} + dev: true + + /strip-literal@1.3.0: + resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} dependencies: - acorn: 8.9.0 + acorn: 8.10.0 dev: true /strnum@1.0.5: resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} dev: false - /stubborn-fs@1.2.4: - resolution: {integrity: sha512-KRa4nIRJ8q6uApQbPwYZVhOof8979fw4xbajBWa5kPJFa4nyY3aFaMWVyIVCDnkNCCG/3HLipUZ4QaNlYsmX1w==} + /stubborn-fs@1.2.5: + resolution: {integrity: sha512-H2N9c26eXjzL/S/K+i/RHHcFanE74dptvvjM8iwzwbVcWY/zjBbgRqF3K0DY4+OD+uTTASTBvDoxPDaPN02D7g==} + dev: true - /style-to-object@0.4.1: - resolution: {integrity: sha512-HFpbb5gr2ypci7Qw+IOhnP2zOU7e77b+rzM+wTzXzfi1PrtBCX0E7Pk4wL4iTLnhzZ+JgEGAhX81ebTg/aYjQw==} + /style-to-object@0.4.2: + resolution: {integrity: sha512-1JGpfPB3lo42ZX8cuPrheZbfQ6kqPPnPHlKMyeRYtfKD+0jG+QsXgXN57O/dvJlzlB2elI6dGmrPnl5VPQFPaA==} dependencies: inline-style-parser: 0.1.1 dev: true - /sucrase@3.32.0: - resolution: {integrity: sha512-ydQOU34rpSyj2TGyz4D2p8rbktIOZ8QY9s+DGLvFU1i5pWJE8vkpruCjGCMHsdXwnD7JDcS+noSwM/a7zyNFDQ==} + /sucrase@3.34.0: + resolution: {integrity: sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==} engines: {node: '>=8'} hasBin: true dependencies: @@ -20911,15 +20441,19 @@ packages: resolution: {integrity: sha512-AsS729u2RHUfEra9xJrE39peJcc2stq2+poBXX8bcM08Y6g9j/i/PUzwNQqkaJde7Ntg1TO7bSREbR5sdosQ+g==} dev: true - /synckit@0.8.5: - resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==} - engines: {node: ^14.18.0 || >=16.0.0} + /table@6.8.1: + resolution: {integrity: sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==} + engines: {node: '>=10.0.0'} dependencies: - '@pkgr/utils': 2.4.1 - tslib: 2.6.0 + ajv: 8.12.0 + lodash.truncate: 4.4.2 + slice-ansi: 4.0.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + dev: false - /tailwindcss@3.3.2: - resolution: {integrity: sha512-9jPkMiIBXvPc2KywkraqsUfbfj+dHDb+JPWtSJa9MLFdrPyazI7q6WX2sUrm7R9eVR7qqv3Pas7EvQFzxKnI6w==} + /tailwindcss@3.3.3: + resolution: {integrity: sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==} engines: {node: '>=14.0.0'} hasBin: true dependencies: @@ -20928,24 +20462,23 @@ packages: chokidar: 3.5.3 didyoumean: 1.2.2 dlv: 1.1.3 - fast-glob: 3.2.12 + fast-glob: 3.3.1 glob-parent: 6.0.2 is-glob: 4.0.3 - jiti: 1.18.2 + jiti: 1.19.3 lilconfig: 2.1.0 micromatch: 4.0.5 normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.24 - postcss-import: 15.1.0(postcss@8.4.24) - postcss-js: 4.0.1(postcss@8.4.24) - postcss-load-config: 4.0.1(postcss@8.4.24) - postcss-nested: 6.0.1(postcss@8.4.24) + postcss: 8.4.29 + postcss-import: 15.1.0(postcss@8.4.29) + postcss-js: 4.0.1(postcss@8.4.29) + postcss-load-config: 4.0.1(postcss@8.4.29) + postcss-nested: 6.0.1(postcss@8.4.29) postcss-selector-parser: 6.0.13 - postcss-value-parser: 4.2.0 - resolve: 1.22.2 - sucrase: 3.32.0 + resolve: 1.22.4 + sucrase: 3.34.0 transitivePeerDependencies: - ts-node @@ -20972,19 +20505,19 @@ packages: inherits: 2.0.4 readable-stream: 3.6.2 - /tar@6.1.13: - resolution: {integrity: sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==} + /tar@6.1.15: + resolution: {integrity: sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==} engines: {node: '>=10'} dependencies: chownr: 2.0.0 fs-minipass: 2.1.0 - minipass: 4.2.8 + minipass: 5.0.0 minizlib: 2.1.2 mkdirp: 1.0.4 yallist: 4.0.0 - /telejson@7.1.0: - resolution: {integrity: sha512-jFJO4P5gPebZAERPkJsqMAQ0IMA1Hi0AoSfxpnUaV6j6R2SZqlpkbS20U6dEUtA3RUYt2Ak/mTlkQzHH9Rv/hA==} + /telejson@7.2.0: + resolution: {integrity: sha512-1QTEcJkJEhc8OnStBx/ILRu5J2p0GjvWsBx56bmZRqnrkdBMUe+nX92jxV+p3dB4CP6PZCdJMQJwCggkNBMzkQ==} dependencies: memoizerific: 1.11.3 dev: true @@ -21019,7 +20552,7 @@ packages: ansi-escapes: 4.3.2 supports-hyperlinks: 2.3.0 - /terser-webpack-plugin@5.3.9(esbuild@0.17.19)(webpack@5.86.0): + /terser-webpack-plugin@5.3.9(esbuild@0.17.19)(webpack@5.88.2): resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -21035,16 +20568,16 @@ packages: uglify-js: optional: true dependencies: - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 esbuild: 0.17.19 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.1 - terser: 5.18.2 - webpack: 5.86.0(esbuild@0.17.19) + terser: 5.19.3 + webpack: 5.88.2(esbuild@0.17.19) dev: true - /terser-webpack-plugin@5.3.9(esbuild@0.18.10)(webpack@5.86.0): + /terser-webpack-plugin@5.3.9(esbuild@0.18.20)(webpack@5.88.2): resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -21060,22 +20593,22 @@ packages: uglify-js: optional: true dependencies: - '@jridgewell/trace-mapping': 0.3.18 - esbuild: 0.18.10 + '@jridgewell/trace-mapping': 0.3.19 + esbuild: 0.18.20 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.1 - terser: 5.18.2 - webpack: 5.86.0(esbuild@0.18.10) + terser: 5.19.3 + webpack: 5.88.2(esbuild@0.18.20) dev: true - /terser@5.18.2: - resolution: {integrity: sha512-Ah19JS86ypbJzTzvUCX7KOsEIhDaRONungA4aYBjEP3JZRf4ocuDzTg4QWZnPn9DEMiMYGJPiSOy7aykoCc70w==} + /terser@5.19.3: + resolution: {integrity: sha512-pQzJ9UJzM0IgmT4FAtYI6+VqFf0lj/to58AV0Xfgg0Up37RyPG7Al+1cepC6/BVuAxR9oNb41/DL4DEoHJvTdg==} engines: {node: '>=10'} hasBin: true dependencies: - '@jridgewell/source-map': 0.3.4 - acorn: 8.9.0 + '@jridgewell/source-map': 0.3.5 + acorn: 8.10.0 commander: 2.20.3 source-map-support: 0.5.21 dev: true @@ -21137,16 +20670,20 @@ packages: engines: {node: '>=4'} dev: true - /tiny-colors@2.0.2: - resolution: {integrity: sha512-FYzA5Q5myp26PIZ4mx/03SreNgB1dGqcHJnj1Z8UVQ8/CBw0c6qRoPgRdk8rKpviY5diZyOmRGYMYKLYbjnmWQ==} + /tiny-colors@2.1.2: + resolution: {integrity: sha512-6peGRBtkYBJpVrQUWOPKrC0ECo6WotUlXxirVTKvihjdgxQETpKtLdCKIb68IHjJYH1AOE7GM7RnxFvkGHsqOg==} dev: false - /tiny-updater@3.4.0: - resolution: {integrity: sha512-FUYEOUCAUuJHCEeuTq3XwJSDf73uHfBJnMEMoDQhlvYSP5BU3x5anCw4pgf19vFxRq97INZo7bdFjDIy6ar6wA==} + /tiny-invariant@1.3.1: + resolution: {integrity: sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==} + dev: true + + /tiny-updater@3.5.1: + resolution: {integrity: sha512-kh1922FSNPTmrdr353x+xJRTrrVFl9zq/Q1Vz47YNWhTO0jn3ZyZd6Cahe8qW5MLXg+gia+0G7b6HIgW7pbBMg==} dependencies: - isostore: 1.0.0 - tiny-colors: 2.0.2 - when-exit: 2.1.0 + ionstore: 1.0.0 + tiny-colors: 2.1.2 + when-exit: 2.1.1 dev: false /tinybench@2.5.0: @@ -21200,6 +20737,10 @@ packages: dependencies: is-number: 7.0.0 + /tocbot@4.21.1: + resolution: {integrity: sha512-IfajhBTeg0HlMXu1f+VMbPef05QpDTsZ9X2Yn1+8npdaXsXg/+wrm9Ze1WG5OS1UDC3qJ5EQN/XOZ3gfXjPFCw==} + dev: true + /toidentifier@1.0.1: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} @@ -21252,11 +20793,6 @@ packages: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} dev: true - /trim-newlines@2.0.0: - resolution: {integrity: sha512-MTBWv3jhVjTU7XR3IQHllbiJs8sc75a80OEhB6or/q7pLTWgQ0bMGQXXYQSrSuXe6WiKWDZ5txXY5P59a/coVA==} - engines: {node: '>=4'} - dev: true - /trim-newlines@3.0.1: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} engines: {node: '>=8'} @@ -21280,30 +20816,43 @@ packages: /ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - /ts-jest@27.0.0(jest@27.0.0)(typescript@4.9.4): - resolution: {integrity: sha512-YhuEjDZz9ZjxKbUlgT3XtJb9lyditEjctlo1nLcn983my3Xz4BE3c2ogHhonmGlAdUUiGlz/Dq2KOMXmf1WHfA==} + /ts-jest@27.1.5(@babel/core@7.22.11)(@types/jest@27.5.2)(jest@27.5.1)(typescript@4.9.5): + resolution: {integrity: sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} hasBin: true peerDependencies: + '@babel/core': '>=7.0.0-beta.0 <8' + '@types/jest': ^27.0.0 + babel-jest: '>=27.0.0 <28' + esbuild: '*' jest: ^27.0.0 typescript: '>=3.8 <5.0' + peerDependenciesMeta: + '@babel/core': + optional: true + '@types/jest': + optional: true + babel-jest: + optional: true + esbuild: + optional: true dependencies: + '@babel/core': 7.22.11 + '@types/jest': 27.5.2 bs-logger: 0.2.6 - buffer-from: 1.1.2 fast-json-stable-stringify: 2.1.0 - jest: 27.0.0(ts-node@10.9.1) + jest: 27.5.1(ts-node@10.9.1) jest-util: 27.5.1 json5: 2.2.3 - lodash: 4.17.21 + lodash.memoize: 4.1.2 make-error: 1.3.6 - mkdirp: 1.0.4 - semver: 7.5.2 - typescript: 4.9.4 + semver: 7.5.4 + typescript: 4.9.5 yargs-parser: 20.2.9 dev: true - /ts-jest@29.0.5(@babel/core@7.22.5)(jest@29.3.1)(typescript@4.9.4): - resolution: {integrity: sha512-PL3UciSgIpQ7f6XjVOmbi96vmDHUqAyqDr8YxzopDqX3kfgYtX1cuNeBjP+L9sFXi6nzsGGA6R3fP3DDDJyrxA==} + /ts-jest@29.1.1(@babel/core@7.22.11)(jest@29.6.4)(typescript@4.9.5): + resolution: {integrity: sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true peerDependencies: @@ -21312,7 +20861,7 @@ packages: babel-jest: ^29.0.0 esbuild: '*' jest: ^29.0.0 - typescript: '>=4.3' + typescript: '>=4.3 <6' peerDependenciesMeta: '@babel/core': optional: true @@ -21323,20 +20872,51 @@ packages: esbuild: optional: true dependencies: - '@babel/core': 7.22.5 + '@babel/core': 7.22.11 bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.3.1(@types/node@16.0.0)(ts-node@10.9.1) - jest-util: 29.5.0 + jest: 29.6.4(@types/node@16.18.47)(ts-node@10.9.1) + jest-util: 29.6.3 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 - semver: 7.5.2 - typescript: 4.9.4 + semver: 7.5.4 + typescript: 4.9.5 yargs-parser: 21.1.1 dev: true - /ts-node@10.9.1(@types/node@16.0.0)(typescript@4.9.4): + /ts-node@10.9.1(@types/node@16.18.23)(typescript@4.9.5): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 16.18.23 + acorn: 8.10.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 4.9.5 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: true + + /ts-node@10.9.1(@types/node@16.18.47)(typescript@4.9.5): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -21355,19 +20935,19 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 16.0.0 - acorn: 8.9.0 + '@types/node': 16.18.47 + acorn: 8.10.0 acorn-walk: 8.2.0 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.9.4 + typescript: 4.9.5 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true - /ts-node@10.9.1(@types/node@18.16.18)(typescript@4.9.4): + /ts-node@10.9.1(@types/node@18.17.13)(typescript@4.9.5): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -21386,14 +20966,14 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 18.16.18 - acorn: 8.9.0 + '@types/node': 18.17.13 + acorn: 8.10.0 acorn-walk: 8.2.0 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.9.4 + typescript: 4.9.5 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true @@ -21409,10 +20989,10 @@ packages: /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - /tslib@2.6.0: - resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==} + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - /tsup@6.7.0(postcss@8.4.24)(typescript@5.1.3): + /tsup@6.7.0(postcss@8.4.29)(typescript@5.2.2): resolution: {integrity: sha512-L3o8hGkaHnu5TdJns+mCqFsDBo83bJ44rlK7e6VdanIvpea4ArPcU3swWGsLVbXak1PqQx/V+SSmFPujBK+zEQ==} engines: {node: '>=14.18'} hasBin: true @@ -21436,20 +21016,20 @@ packages: execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss: 8.4.24 - postcss-load-config: 3.1.4(postcss@8.4.24) + postcss: 8.4.29 + postcss-load-config: 3.1.4(postcss@8.4.29) resolve-from: 5.0.0 - rollup: 3.25.3 + rollup: 3.28.1 source-map: 0.8.0-beta.0 - sucrase: 3.32.0 + sucrase: 3.34.0 tree-kill: 1.2.2 - typescript: 5.1.3 + typescript: 5.2.2 transitivePeerDependencies: - supports-color - ts-node dev: true - /tsup@6.7.0(ts-node@10.9.1)(typescript@4.9.4): + /tsup@6.7.0(ts-node@10.9.1)(typescript@4.9.5): resolution: {integrity: sha512-L3o8hGkaHnu5TdJns+mCqFsDBo83bJ44rlK7e6VdanIvpea4ArPcU3swWGsLVbXak1PqQx/V+SSmFPujBK+zEQ==} engines: {node: '>=14.18'} hasBin: true @@ -21475,17 +21055,17 @@ packages: joycon: 3.1.1 postcss-load-config: 3.1.4(ts-node@10.9.1) resolve-from: 5.0.0 - rollup: 3.25.3 + rollup: 3.28.1 source-map: 0.8.0-beta.0 - sucrase: 3.32.0 + sucrase: 3.34.0 tree-kill: 1.2.2 - typescript: 4.9.4 + typescript: 4.9.5 transitivePeerDependencies: - supports-color - ts-node dev: true - /tsup@6.7.0(typescript@4.9.4): + /tsup@6.7.0(typescript@4.9.5): resolution: {integrity: sha512-L3o8hGkaHnu5TdJns+mCqFsDBo83bJ44rlK7e6VdanIvpea4ArPcU3swWGsLVbXak1PqQx/V+SSmFPujBK+zEQ==} engines: {node: '>=14.18'} hasBin: true @@ -21509,20 +21089,20 @@ packages: execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss-load-config: 3.1.4(postcss@8.4.24) + postcss-load-config: 3.1.4(postcss@8.4.29) resolve-from: 5.0.0 - rollup: 3.25.3 + rollup: 3.28.1 source-map: 0.8.0-beta.0 - sucrase: 3.32.0 + sucrase: 3.34.0 tree-kill: 1.2.2 - typescript: 4.9.4 + typescript: 4.9.5 transitivePeerDependencies: - supports-color - ts-node dev: true - /tsup@7.1.0(postcss@8.4.24)(typescript@5.1.3): - resolution: {integrity: sha512-mazl/GRAk70j8S43/AbSYXGgvRP54oQeX8Un4iZxzATHt0roW0t6HYDVZIXMw0ZQIpvr1nFMniIVnN5186lW7w==} + /tsup@7.2.0(postcss@8.4.29)(typescript@5.2.2): + resolution: {integrity: sha512-vDHlczXbgUvY3rWvqFEbSqmC1L7woozbzngMqTtL2PGBODTtWlRwGDDawhvWzr5c1QjKe4OAKqJGfE1xeXUvtQ==} engines: {node: '>=16.14'} hasBin: true peerDependencies: @@ -21537,55 +21117,66 @@ packages: typescript: optional: true dependencies: - bundle-require: 4.0.1(esbuild@0.18.10) + bundle-require: 4.0.1(esbuild@0.18.20) cac: 6.7.14 chokidar: 3.5.3 debug: 4.3.4 - esbuild: 0.18.10 + esbuild: 0.18.20 execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss: 8.4.24 - postcss-load-config: 4.0.1(postcss@8.4.24) + postcss: 8.4.29 + postcss-load-config: 4.0.1(postcss@8.4.29) resolve-from: 5.0.0 - rollup: 3.25.3 + rollup: 3.28.1 source-map: 0.8.0-beta.0 - sucrase: 3.32.0 + sucrase: 3.34.0 tree-kill: 1.2.2 - typescript: 5.1.3 + typescript: 5.2.2 transitivePeerDependencies: - supports-color - ts-node dev: true - /tsutils@3.21.0(typescript@4.9.4): + /tsutils@3.21.0(typescript@4.9.5): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 4.9.4 + typescript: 4.9.5 - /tsutils@3.21.0(typescript@5.1.3): + /tsutils@3.21.0(typescript@5.2.2): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 5.1.3 + typescript: 5.2.2 dev: false - /tsx@3.12.7: - resolution: {integrity: sha512-C2Ip+jPmqKd1GWVQDvz/Eyc6QJbGfE7NrR3fx5BpEHMZsEHoIxHL1j+lKdGobr8ovEyqeNkPLSKp6SCSOt7gmw==} + /tsx@3.12.8: + resolution: {integrity: sha512-Lt9KYaRGF023tlLInPj8rgHwsZU8qWLBj4iRXNWxTfjIkU7canGL806AqKear1j722plHuiYNcL2ZCo6uS9UJA==} hasBin: true dependencies: '@esbuild-kit/cjs-loader': 2.4.2 - '@esbuild-kit/core-utils': 3.1.0 + '@esbuild-kit/core-utils': 3.2.2 '@esbuild-kit/esm-loader': 2.5.5 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 + + /tuf-js@1.1.7: + resolution: {integrity: sha512-i3P9Kgw3ytjELUfpuKVDNBJvk4u5bXL6gskv572mcevPbSKCV3zt3djhmlEQ65yERjIbOSncy7U4cQJaB1CBCg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + '@tufjs/models': 1.0.4 + debug: 4.3.4 + make-fetch-happen: 11.1.1 + transitivePeerDependencies: + - supports-color + dev: true /tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} @@ -21597,65 +21188,65 @@ packages: resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} - /turbo-darwin-64@1.10.12: - resolution: {integrity: sha512-vmDfGVPl5/aFenAbOj3eOx3ePNcWVUyZwYr7taRl0ZBbmv2TzjRiFotO4vrKCiTVnbqjQqAFQWY2ugbqCI1kOQ==} + /turbo-darwin-64@1.10.13: + resolution: {integrity: sha512-vmngGfa2dlYvX7UFVncsNDMuT4X2KPyPJ2Jj+xvf5nvQnZR/3IeDEGleGVuMi/hRzdinoxwXqgk9flEmAYp0Xw==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@1.10.12: - resolution: {integrity: sha512-3JliEESLNX2s7g54SOBqqkqJ7UhcOGkS0ywMr5SNuvF6kWVTbuUq7uBU/sVbGq8RwvK1ONlhPvJne5MUqBCTCQ==} + /turbo-darwin-arm64@1.10.13: + resolution: {integrity: sha512-eMoJC+k7gIS4i2qL6rKmrIQGP6Wr9nN4odzzgHFngLTMimok2cGLK3qbJs5O5F/XAtEeRAmuxeRnzQwTl/iuAw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@1.10.12: - resolution: {integrity: sha512-siYhgeX0DidIfHSgCR95b8xPee9enKSOjCzx7EjTLmPqPaCiVebRYvbOIYdQWRqiaKh9yfhUtFmtMOMScUf1gg==} + /turbo-linux-64@1.10.13: + resolution: {integrity: sha512-0CyYmnKTs6kcx7+JRH3nPEqCnzWduM0hj8GP/aodhaIkLNSAGAa+RiYZz6C7IXN+xUVh5rrWTnU2f1SkIy7Gdg==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@1.10.12: - resolution: {integrity: sha512-K/ZhvD9l4SslclaMkTiIrnfcACgos79YcAo4kwc8bnMQaKuUeRpM15sxLpZp3xDjDg8EY93vsKyjaOhdFG2UbA==} + /turbo-linux-arm64@1.10.13: + resolution: {integrity: sha512-0iBKviSGQQlh2OjZgBsGjkPXoxvRIxrrLLbLObwJo3sOjIH0loGmVIimGS5E323soMfi/o+sidjk2wU1kFfD7Q==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@1.10.12: - resolution: {integrity: sha512-7FSgSwvktWDNOqV65l9AbZwcoueAILeE4L7JvjauNASAjjbuzXGCEq5uN8AQU3U5BOFj4TdXrVmO2dX+lLu8Zg==} + /turbo-windows-64@1.10.13: + resolution: {integrity: sha512-S5XySRfW2AmnTeY1IT+Jdr6Goq7mxWganVFfrmqU+qqq3Om/nr0GkcUX+KTIo9mPrN0D3p5QViBRzulwB5iuUQ==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@1.10.12: - resolution: {integrity: sha512-gCNXF52dwom1HLY9ry/cneBPOKTBHhzpqhMylcyvJP0vp9zeMQQkt6yjYv+6QdnmELC92CtKNp2FsNZo+z0pyw==} + /turbo-windows-arm64@1.10.13: + resolution: {integrity: sha512-nKol6+CyiExJIuoIc3exUQPIBjP9nIq5SkMJgJuxsot2hkgGrafAg/izVDRDrRduQcXj2s8LdtxJHvvnbI8hEQ==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@1.10.12: - resolution: {integrity: sha512-WM3+jTfQWnB9W208pmP4oeehZcC6JQNlydb/ZHMRrhmQa+htGhWLCzd6Q9rLe0MwZLPpSPFV2/bN5egCLyoKjQ==} + /turbo@1.10.13: + resolution: {integrity: sha512-vOF5IPytgQPIsgGtT0n2uGZizR2N3kKuPIn4b5p5DdeLoI0BV7uNiydT7eSzdkPRpdXNnO8UwS658VaI4+YSzQ==} hasBin: true requiresBuild: true optionalDependencies: - turbo-darwin-64: 1.10.12 - turbo-darwin-arm64: 1.10.12 - turbo-linux-64: 1.10.12 - turbo-linux-arm64: 1.10.12 - turbo-windows-64: 1.10.12 - turbo-windows-arm64: 1.10.12 + turbo-darwin-64: 1.10.13 + turbo-darwin-arm64: 1.10.13 + turbo-linux-64: 1.10.13 + turbo-linux-arm64: 1.10.13 + turbo-windows-64: 1.10.13 + turbo-windows-arm64: 1.10.13 dev: true /type-check@0.4.0: @@ -21674,11 +21265,6 @@ packages: engines: {node: '>=10'} dev: true - /type-fest@0.13.1: - resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} - engines: {node: '>=10'} - dev: true - /type-fest@0.16.0: resolution: {integrity: sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==} engines: {node: '>=10'} @@ -21722,12 +21308,39 @@ packages: media-typer: 0.3.0 mime-types: 2.1.35 + /typed-array-buffer@1.0.0: + resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + is-typed-array: 1.1.12 + + /typed-array-byte-length@1.0.0: + resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.12 + + /typed-array-byte-offset@1.0.0: + resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.12 + /typed-array-length@1.0.4: resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} dependencies: call-bind: 1.0.2 for-each: 0.3.3 - is-typed-array: 1.1.10 + is-typed-array: 1.1.12 /typed-rest-client@1.8.11: resolution: {integrity: sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==} @@ -21756,8 +21369,8 @@ packages: engines: {node: '>=4.2.0'} hasBin: true - /typescript@4.9.4: - resolution: {integrity: sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==} + /typescript@4.9.5: + resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} engines: {node: '>=4.2.0'} hasBin: true @@ -21767,13 +21380,19 @@ packages: hasBin: true dev: true - /typescript@5.1.3: - resolution: {integrity: sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==} + /typescript@5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} engines: {node: '>=14.17'} hasBin: true - /typescript@5.3.0-dev.20230829: - resolution: {integrity: sha512-2bsH+jTfOtehS2ZMI6RteCCRFk2QTUUY3BijvnyS0+o0CB/xWJDu7+WRbpt/XEZgOcoTLf9evRm/tyGSlPyNgA==} + /typescript@5.3.0-dev.20230904: + resolution: {integrity: sha512-07NPNxXTmtOd0G5DnbDHee7Yh7VT6R8HzBiBkzx/PsyDIiD2/a14pbmex5xiDRvoLyUNJvNG1S6p48f+Qk0FMQ==} engines: {node: '>=14.17'} hasBin: true dev: true @@ -21782,8 +21401,8 @@ packages: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} dev: true - /ufo@1.1.2: - resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==} + /ufo@1.3.0: + resolution: {integrity: sha512-bRn3CsoojyNStCZe0BG0Mt4Nr/4KF+rhFlnNXybgqt5pXHNFRlqinSoQaTrGyzE4X8aHplSb+TorH+COin9Yxw==} /uglify-js@3.17.4: resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} @@ -21809,10 +21428,6 @@ packages: resolution: {integrity: sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==} dev: true - /unfetch@4.2.0: - resolution: {integrity: sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==} - dev: true - /unicode-canonical-property-names-ecmascript@2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} engines: {node: '>=4'} @@ -21839,7 +21454,7 @@ packages: /unified@10.1.2: resolution: {integrity: sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==} dependencies: - '@types/unist': 2.0.6 + '@types/unist': 2.0.8 bail: 2.0.2 extend: 3.0.2 is-buffer: 2.0.5 @@ -21848,13 +21463,6 @@ packages: vfile: 5.3.7 dev: true - /unique-filename@2.0.1: - resolution: {integrity: sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - dependencies: - unique-slug: 3.0.0 - dev: true - /unique-filename@3.0.0: resolution: {integrity: sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -21862,13 +21470,6 @@ packages: unique-slug: 4.0.0 dev: true - /unique-slug@3.0.0: - resolution: {integrity: sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - dependencies: - imurmurhash: 0.1.4 - dev: true - /unique-slug@4.0.0: resolution: {integrity: sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -21900,39 +21501,39 @@ packages: /unist-util-is@5.2.1: resolution: {integrity: sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==} dependencies: - '@types/unist': 2.0.6 + '@types/unist': 2.0.8 dev: true /unist-util-position@4.0.4: resolution: {integrity: sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==} dependencies: - '@types/unist': 2.0.6 + '@types/unist': 2.0.8 dev: true /unist-util-stringify-position@3.0.3: resolution: {integrity: sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==} dependencies: - '@types/unist': 2.0.6 + '@types/unist': 2.0.8 dev: true /unist-util-visit-parents@3.1.1: resolution: {integrity: sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==} dependencies: - '@types/unist': 2.0.6 + '@types/unist': 2.0.8 unist-util-is: 4.1.0 dev: true /unist-util-visit-parents@5.1.3: resolution: {integrity: sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==} dependencies: - '@types/unist': 2.0.6 + '@types/unist': 2.0.8 unist-util-is: 5.2.1 dev: true /unist-util-visit@2.0.3: resolution: {integrity: sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==} dependencies: - '@types/unist': 2.0.6 + '@types/unist': 2.0.8 unist-util-is: 4.1.0 unist-util-visit-parents: 3.1.1 dev: true @@ -21940,7 +21541,7 @@ packages: /unist-util-visit@4.1.2: resolution: {integrity: sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==} dependencies: - '@types/unist': 2.0.6 + '@types/unist': 2.0.8 unist-util-is: 5.2.1 unist-util-visit-parents: 5.1.3 dev: true @@ -21967,26 +21568,26 @@ packages: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} - /unplugin@0.10.2: - resolution: {integrity: sha512-6rk7GUa4ICYjae5PrAllvcDeuT8pA9+j5J5EkxbMFaV+SalHhxZ7X2dohMzu6C3XzsMT+6jwR/+pwPNR3uK9MA==} + /unplugin@1.4.0: + resolution: {integrity: sha512-5x4eIEL6WgbzqGtF9UV8VEC/ehKptPXDS6L2b0mv4FRMkJxRtjaJfOWDd6a8+kYbqsjklix7yWP0N3SUepjXcg==} dependencies: - acorn: 8.9.0 + acorn: 8.10.0 chokidar: 3.5.3 webpack-sources: 3.2.3 - webpack-virtual-modules: 0.4.6 + webpack-virtual-modules: 0.5.0 dev: true /untildify@4.0.0: resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} engines: {node: '>=8'} - /update-browserslist-db@1.0.11(browserslist@4.21.9): + /update-browserslist-db@1.0.11(browserslist@4.21.10): resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.21.9 + browserslist: 4.21.10 escalade: 3.1.1 picocolors: 1.0.0 dev: true @@ -21995,7 +21596,7 @@ packages: resolution: {integrity: sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==} engines: {node: '>=14.16'} dependencies: - boxen: 7.1.0 + boxen: 7.1.1 chalk: 5.3.0 configstore: 6.0.0 has-yarn: 3.0.0 @@ -22006,7 +21607,7 @@ packages: is-yarn-global: 0.4.1 latest-version: 7.0.0 pupa: 3.1.0 - semver: 7.5.3 + semver: 7.5.4 semver-diff: 4.0.0 xdg-basedir: 5.1.0 dev: true @@ -22027,6 +21628,21 @@ packages: requires-port: 1.0.0 dev: true + /use-callback-ref@1.3.0(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@types/react': 18.2.21 + react: 18.2.0 + tslib: 2.6.2 + dev: true + /use-resize-observer@9.1.0(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-R25VqO9Wb3asSD4eqtcxk8sJalvIOYBqS8MNZlpDSQ4l4xMQxC/J7Id9HoTqPq8FwULIn0PVW+OAqF2dyYbjow==} peerDependencies: @@ -22038,6 +21654,22 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: true + /use-sidecar@1.1.2(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': ^16.9.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@types/react': 18.2.21 + detect-node-es: 1.1.0 + react: 18.2.0 + tslib: 2.6.2 + dev: true + /use-sync-external-store@1.2.0(react@18.2.0): resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} peerDependencies: @@ -22055,8 +21687,8 @@ packages: inherits: 2.0.4 is-arguments: 1.1.1 is-generator-function: 1.0.10 - is-typed-array: 1.1.10 - which-typed-array: 1.1.9 + is-typed-array: 1.1.12 + which-typed-array: 1.1.11 dev: true /utility-types@3.10.0: @@ -22105,7 +21737,7 @@ packages: resolution: {integrity: sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==} engines: {node: '>=10.12.0'} dependencies: - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 '@types/istanbul-lib-coverage': 2.0.4 convert-source-map: 1.9.0 dev: true @@ -22116,9 +21748,9 @@ packages: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 - /validate-npm-package-name@4.0.0: - resolution: {integrity: sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + /validate-npm-package-name@5.0.0: + resolution: {integrity: sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: builtins: 5.0.1 dev: true @@ -22130,33 +21762,34 @@ packages: /vfile-message@3.1.4: resolution: {integrity: sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==} dependencies: - '@types/unist': 2.0.6 + '@types/unist': 2.0.8 unist-util-stringify-position: 3.0.3 dev: true /vfile@5.3.7: resolution: {integrity: sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==} dependencies: - '@types/unist': 2.0.6 + '@types/unist': 2.0.8 is-buffer: 2.0.5 unist-util-stringify-position: 3.0.3 vfile-message: 3.1.4 dev: true - /vite-node@0.30.1(@types/node@18.16.18): + /vite-node@0.30.1(@types/node@18.17.13): resolution: {integrity: sha512-vTikpU/J7e6LU/8iM3dzBo8ZhEiKZEKRznEMm+mJh95XhWaPrJQraT/QsT2NWmuEf+zgAoMe64PKT7hfZ1Njmg==} engines: {node: '>=v14.18.0'} hasBin: true dependencies: cac: 6.7.14 debug: 4.3.4 - mlly: 1.4.0 + mlly: 1.4.1 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.3.9(@types/node@18.16.18) + vite: 4.4.9(@types/node@18.17.13) transitivePeerDependencies: - '@types/node' - less + - lightningcss - sass - stylus - sugarss @@ -22164,20 +21797,21 @@ packages: - terser dev: true - /vite-node@0.31.4(@types/node@18.16.18): + /vite-node@0.31.4(@types/node@18.17.13): resolution: {integrity: sha512-uzL377GjJtTbuc5KQxVbDu2xfU/x0wVjUtXQR2ihS21q/NK6ROr4oG0rsSkBBddZUVCwzfx22in76/0ZZHXgkQ==} engines: {node: '>=v14.18.0'} hasBin: true dependencies: cac: 6.7.14 debug: 4.3.4 - mlly: 1.4.0 + mlly: 1.4.1 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.3.9(@types/node@18.16.18) + vite: 4.4.9(@types/node@18.17.13) transitivePeerDependencies: - '@types/node' - less + - lightningcss - sass - stylus - sugarss @@ -22185,20 +21819,21 @@ packages: - terser dev: true - /vite-node@0.32.2(@types/node@18.16.18): - resolution: {integrity: sha512-dTQ1DCLwl2aEseov7cfQ+kDMNJpM1ebpyMMMwWzBvLbis8Nla/6c9WQcqpPssTwS6Rp/+U6KwlIj8Eapw4bLdA==} + /vite-node@0.32.4(@types/node@18.17.13): + resolution: {integrity: sha512-L2gIw+dCxO0LK14QnUMoqSYpa9XRGnTTTDjW2h19Mr+GR0EFj4vx52W41gFXfMLqpA00eK4ZjOVYo1Xk//LFEw==} engines: {node: '>=v14.18.0'} hasBin: true dependencies: cac: 6.7.14 debug: 4.3.4 - mlly: 1.4.0 + mlly: 1.4.1 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.3.9(@types/node@18.16.18) + vite: 4.4.9(@types/node@18.17.13) transitivePeerDependencies: - '@types/node' - less + - lightningcss - sass - stylus - sugarss @@ -22206,13 +21841,14 @@ packages: - terser dev: true - /vite@4.3.9(@types/node@18.16.18): - resolution: {integrity: sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==} + /vite@4.4.9(@types/node@18.17.13): + resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: '@types/node': '>= 14' less: '*' + lightningcss: ^1.21.0 sass: '*' stylus: '*' sugarss: '*' @@ -22222,6 +21858,8 @@ packages: optional: true less: optional: true + lightningcss: + optional: true sass: optional: true stylus: @@ -22231,12 +21869,12 @@ packages: terser: optional: true dependencies: - '@types/node': 18.16.18 - esbuild: 0.17.19 - postcss: 8.4.24 - rollup: 3.25.3 + '@types/node': 18.17.13 + esbuild: 0.18.20 + postcss: 8.4.29 + rollup: 3.28.1 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /vitest@0.30.1: @@ -22272,32 +21910,33 @@ packages: dependencies: '@types/chai': 4.3.5 '@types/chai-subset': 1.3.3 - '@types/node': 18.16.18 + '@types/node': 18.17.13 '@vitest/expect': 0.30.1 '@vitest/runner': 0.30.1 '@vitest/snapshot': 0.30.1 '@vitest/spy': 0.30.1 '@vitest/utils': 0.30.1 - acorn: 8.9.0 + acorn: 8.10.0 acorn-walk: 8.2.0 cac: 6.7.14 - chai: 4.3.7 + chai: 4.3.8 concordance: 5.0.4 debug: 4.3.4 local-pkg: 0.4.3 - magic-string: 0.30.0 + magic-string: 0.30.3 pathe: 1.1.1 picocolors: 1.0.0 source-map: 0.6.1 - std-env: 3.3.3 - strip-literal: 1.0.1 + std-env: 3.4.3 + strip-literal: 1.3.0 tinybench: 2.5.0 tinypool: 0.4.0 - vite: 4.3.9(@types/node@18.16.18) - vite-node: 0.30.1(@types/node@18.16.18) + vite: 4.4.9(@types/node@18.17.13) + vite-node: 0.30.1(@types/node@18.17.13) why-is-node-running: 2.2.2 transitivePeerDependencies: - less + - lightningcss - sass - stylus - sugarss @@ -22338,32 +21977,33 @@ packages: dependencies: '@types/chai': 4.3.5 '@types/chai-subset': 1.3.3 - '@types/node': 18.16.18 + '@types/node': 18.17.13 '@vitest/expect': 0.31.4 '@vitest/runner': 0.31.4 '@vitest/snapshot': 0.31.4 '@vitest/spy': 0.31.4 '@vitest/utils': 0.31.4 - acorn: 8.9.0 + acorn: 8.10.0 acorn-walk: 8.2.0 cac: 6.7.14 - chai: 4.3.7 + chai: 4.3.8 concordance: 5.0.4 debug: 4.3.4 happy-dom: 9.20.3 local-pkg: 0.4.3 - magic-string: 0.30.0 + magic-string: 0.30.3 pathe: 1.1.1 picocolors: 1.0.0 - std-env: 3.3.3 - strip-literal: 1.0.1 + std-env: 3.4.3 + strip-literal: 1.3.0 tinybench: 2.5.0 tinypool: 0.5.0 - vite: 4.3.9(@types/node@18.16.18) - vite-node: 0.31.4(@types/node@18.16.18) + vite: 4.4.9(@types/node@18.17.13) + vite-node: 0.31.4(@types/node@18.17.13) why-is-node-running: 2.2.2 transitivePeerDependencies: - less + - lightningcss - sass - stylus - sugarss @@ -22371,8 +22011,8 @@ packages: - terser dev: true - /vitest@0.32.2: - resolution: {integrity: sha512-hU8GNNuQfwuQmqTLfiKcqEhZY72Zxb7nnN07koCUNmntNxbKQnVbeIS6sqUgR3eXSlbOpit8+/gr1KpqoMgWCQ==} + /vitest@0.32.4: + resolution: {integrity: sha512-3czFm8RnrsWwIzVDu/Ca48Y/M+qh3vOnF16czJm98Q/AN1y3B6PBsyV8Re91Ty5s7txKNjEhpgtGPcfdbh2MZg==} engines: {node: '>=v14.18.0'} hasBin: true peerDependencies: @@ -22404,31 +22044,31 @@ packages: dependencies: '@types/chai': 4.3.5 '@types/chai-subset': 1.3.3 - '@types/node': 18.16.18 - '@vitest/expect': 0.32.2 - '@vitest/runner': 0.32.2 - '@vitest/snapshot': 0.32.2 - '@vitest/spy': 0.32.2 - '@vitest/utils': 0.32.2 - acorn: 8.9.0 + '@types/node': 18.17.13 + '@vitest/expect': 0.32.4 + '@vitest/runner': 0.32.4 + '@vitest/snapshot': 0.32.4 + '@vitest/spy': 0.32.4 + '@vitest/utils': 0.32.4 + acorn: 8.10.0 acorn-walk: 8.2.0 cac: 6.7.14 - chai: 4.3.7 - concordance: 5.0.4 + chai: 4.3.8 debug: 4.3.4 local-pkg: 0.4.3 - magic-string: 0.30.0 + magic-string: 0.30.3 pathe: 1.1.1 picocolors: 1.0.0 - std-env: 3.3.3 - strip-literal: 1.0.1 + std-env: 3.4.3 + strip-literal: 1.3.0 tinybench: 2.5.0 tinypool: 0.5.0 - vite: 4.3.9(@types/node@18.16.18) - vite-node: 0.32.2(@types/node@18.16.18) + vite: 4.4.9(@types/node@18.17.13) + vite-node: 0.32.4(@types/node@18.17.13) why-is-node-running: 2.2.2 transitivePeerDependencies: - less + - lightningcss - sass - stylus - sugarss @@ -22436,33 +22076,33 @@ packages: - terser dev: true - /vscode-jsonrpc@8.0.2: - resolution: {integrity: sha512-RY7HwI/ydoC1Wwg4gJ3y6LpU9FJRZAUnTYMXthqhFXXu77ErDd/xkREpGuk4MyYkk4a+XDWAMqe0S3KkelYQEQ==} + /vscode-jsonrpc@8.1.0: + resolution: {integrity: sha512-6TDy/abTQk+zDGYazgbIPc+4JoXdwC8NHU9Pbn4UJP1fehUyZmM4RHp5IthX7A6L5KS30PRui+j+tbbMMMafdw==} engines: {node: '>=14.0.0'} - /vscode-languageclient@8.0.2: - resolution: {integrity: sha512-lHlthJtphG9gibGb/y72CKqQUxwPsMXijJVpHEC2bvbFqxmkj9LwQ3aGU9dwjBLqsX1S4KjShYppLvg1UJDF/Q==} + /vscode-languageclient@8.1.0: + resolution: {integrity: sha512-GL4QdbYUF/XxQlAsvYWZRV3V34kOkpRlvV60/72ghHfsYFnS/v2MANZ9P6sHmxFcZKOse8O+L9G7Czg0NUWing==} engines: {vscode: ^1.67.0} dependencies: - minimatch: 3.1.2 - semver: 7.5.3 - vscode-languageserver-protocol: 3.17.2 + minimatch: 5.1.6 + semver: 7.5.4 + vscode-languageserver-protocol: 3.17.3 dev: true - /vscode-languageserver-protocol@3.17.2: - resolution: {integrity: sha512-8kYisQ3z/SQ2kyjlNeQxbkkTNmVFoQCqkmGrzLH6A9ecPlgTbp3wDTnUNqaUxYr4vlAcloxx8zwy7G5WdguYNg==} + /vscode-languageserver-protocol@3.17.3: + resolution: {integrity: sha512-924/h0AqsMtA5yK22GgMtCYiMdCOtWTSGgUOkgEDX+wk2b0x4sAfLiO4NxBxqbiVtz7K7/1/RgVrVI0NClZwqA==} dependencies: - vscode-jsonrpc: 8.0.2 - vscode-languageserver-types: 3.17.2 + vscode-jsonrpc: 8.1.0 + vscode-languageserver-types: 3.17.3 - /vscode-languageserver-types@3.17.2: - resolution: {integrity: sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA==} + /vscode-languageserver-types@3.17.3: + resolution: {integrity: sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==} - /vscode-languageserver@8.0.2: - resolution: {integrity: sha512-bpEt2ggPxKzsAOZlXmCJ50bV7VrxwCS5BI4+egUmure/oI/t4OlFzi/YNtVvY24A2UDOZAgwFGgnZPwqSJubkA==} + /vscode-languageserver@8.1.0: + resolution: {integrity: sha512-eUt8f1z2N2IEUDBsKaNapkz7jl5QpskN2Y0G01T/ItMxBxw1fJwvtySGB9QMecatne8jFIWJGWI61dWjyTLQsw==} hasBin: true dependencies: - vscode-languageserver-protocol: 3.17.2 + vscode-languageserver-protocol: 3.17.3 dev: false /w3c-hr-time@1.0.2: @@ -22553,12 +22193,12 @@ packages: engines: {node: '>=10.13.0'} dev: true - /webpack-virtual-modules@0.4.6: - resolution: {integrity: sha512-5tyDlKLqPfMqjT3Q9TAqf2YqjwmnUleZwzJi1A5qXnlBCdj2AtOJ6wAWdglTIDOPgOiOrXeBeFcsQ8+aGQ6QbA==} + /webpack-virtual-modules@0.5.0: + resolution: {integrity: sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==} dev: true - /webpack@5.86.0(esbuild@0.17.19): - resolution: {integrity: sha512-3BOvworZ8SO/D4GVP+GoRC3fVeg5MO4vzmq8TJJEkdmopxyazGDxN8ClqN12uzrZW9Tv8EED8v5VSb6Sqyi0pg==} + /webpack@5.88.2(esbuild@0.17.19): + resolution: {integrity: sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==} engines: {node: '>=10.13.0'} hasBin: true peerDependencies: @@ -22572,9 +22212,9 @@ packages: '@webassemblyjs/ast': 1.11.6 '@webassemblyjs/wasm-edit': 1.11.6 '@webassemblyjs/wasm-parser': 1.11.6 - acorn: 8.9.0 - acorn-import-assertions: 1.9.0(acorn@8.9.0) - browserslist: 4.21.9 + acorn: 8.10.0 + acorn-import-assertions: 1.9.0(acorn@8.10.0) + browserslist: 4.21.10 chrome-trace-event: 1.0.3 enhanced-resolve: 5.15.0 es-module-lexer: 1.3.0 @@ -22588,7 +22228,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(esbuild@0.17.19)(webpack@5.86.0) + terser-webpack-plugin: 5.3.9(esbuild@0.17.19)(webpack@5.88.2) watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -22597,8 +22237,8 @@ packages: - uglify-js dev: true - /webpack@5.86.0(esbuild@0.18.10): - resolution: {integrity: sha512-3BOvworZ8SO/D4GVP+GoRC3fVeg5MO4vzmq8TJJEkdmopxyazGDxN8ClqN12uzrZW9Tv8EED8v5VSb6Sqyi0pg==} + /webpack@5.88.2(esbuild@0.18.20): + resolution: {integrity: sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==} engines: {node: '>=10.13.0'} hasBin: true peerDependencies: @@ -22612,9 +22252,9 @@ packages: '@webassemblyjs/ast': 1.11.6 '@webassemblyjs/wasm-edit': 1.11.6 '@webassemblyjs/wasm-parser': 1.11.6 - acorn: 8.9.0 - acorn-import-assertions: 1.9.0(acorn@8.9.0) - browserslist: 4.21.9 + acorn: 8.10.0 + acorn-import-assertions: 1.9.0(acorn@8.10.0) + browserslist: 4.21.10 chrome-trace-event: 1.0.3 enhanced-resolve: 5.15.0 es-module-lexer: 1.3.0 @@ -22628,7 +22268,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(esbuild@0.18.10)(webpack@5.86.0) + terser-webpack-plugin: 5.3.9(esbuild@0.18.20)(webpack@5.88.2) watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -22687,8 +22327,8 @@ packages: webidl-conversions: 6.1.0 dev: true - /when-exit@2.1.0: - resolution: {integrity: sha512-H85ulNwUBU1e6PGxkWUDgxnbohSXD++ah6Xw1VHAN7CtypcbZaC4aYjQ+C2PMVaDkURDuOinNAT+Lnz3utWXxQ==} + /when-exit@2.1.1: + resolution: {integrity: sha512-XLipGldz/UcleuGaoQjbYuWwD+ICRnzIjlldtwTaTWr7aZz8yQW49rXk6MHQnh+KxOiWiJpM1vIyaxprOnlW4g==} /which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} @@ -22699,6 +22339,24 @@ packages: is-string: 1.0.7 is-symbol: 1.0.4 + /which-builtin-type@1.1.3: + resolution: {integrity: sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==} + engines: {node: '>= 0.4'} + dependencies: + function.prototype.name: 1.1.6 + has-tostringtag: 1.0.0 + is-async-function: 2.0.0 + is-date-object: 1.0.5 + is-finalizationregistry: 1.0.2 + is-generator-function: 1.0.10 + is-regex: 1.1.4 + is-weakref: 1.0.2 + isarray: 2.0.5 + which-boxed-primitive: 1.0.2 + which-collection: 1.0.1 + which-typed-array: 1.1.11 + dev: false + /which-collection@1.0.1: resolution: {integrity: sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==} dependencies: @@ -22706,14 +22364,13 @@ packages: is-set: 2.0.2 is-weakmap: 2.0.1 is-weakset: 2.0.2 - dev: true /which-module@2.0.1: resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} dev: true - /which-typed-array@1.1.9: - resolution: {integrity: sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==} + /which-typed-array@1.1.11: + resolution: {integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==} engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.5 @@ -22721,7 +22378,6 @@ packages: for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.0 - is-typed-array: 1.1.10 /which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} @@ -22742,7 +22398,6 @@ packages: hasBin: true dependencies: isexe: 2.0.0 - dev: false /why-is-node-running@2.2.2: resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} @@ -22804,8 +22459,8 @@ packages: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} dev: true - /workerpool@6.4.0: - resolution: {integrity: sha512-i3KR1mQMNwY2wx20ozq2EjISGtQWDIfV56We+yGJ5yDs8jTwQiLLaqHlkBHITlCuJnYlVRmXegxFxZg7gqI++A==} + /workerpool@6.4.2: + resolution: {integrity: sha512-MrDWwemtC4xNV22kbbZDQQQmxNX+yLm790sgYl2wVD3CWnK7LJY1youI/11wHorAjHjK+GEjUxUh74XoPU71uQ==} /wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} @@ -22865,7 +22520,7 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: imurmurhash: 0.1.4 - signal-exit: 4.0.2 + signal-exit: 4.1.0 dev: false /write-yaml-file@5.0.0: @@ -22932,21 +22587,12 @@ packages: resolution: {integrity: sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==} dev: true - /xml2js@0.4.23: - resolution: {integrity: sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==} - engines: {node: '>=4.0.0'} - dependencies: - sax: 1.2.4 - xmlbuilder: 11.0.1 - dev: true - /xml2js@0.5.0: resolution: {integrity: sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==} engines: {node: '>=4.0.0'} dependencies: sax: 1.2.4 xmlbuilder: 11.0.1 - dev: false /xml@1.0.1: resolution: {integrity: sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==} @@ -22974,8 +22620,8 @@ packages: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} dev: true - /xstate@4.38.0: - resolution: {integrity: sha512-oFjw2YZPyu6HeO0JWCSqfhAALsjFPURsrD2FUFN3u213dWwYU68RFuLtSHco+cEUhpQFW+hRG3PNYgq8HatudQ==} + /xstate@4.38.2: + resolution: {integrity: sha512-Fba/DwEPDLneHT3tbJ9F3zafbQXszOlyCJyQqqdzmtlY/cwE2th462KK48yaANf98jHlP6lJvxfNtN0LFKXPQg==} dev: true /xtend@4.0.2: @@ -23002,12 +22648,8 @@ packages: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} - /yaml@2.2.1: - resolution: {integrity: sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw==} - engines: {node: '>= 14'} - - /yaml@2.3.1: - resolution: {integrity: sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==} + /yaml@2.3.2: + resolution: {integrity: sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==} engines: {node: '>= 14'} /yargs-parser@18.1.3: @@ -23018,11 +22660,6 @@ packages: decamelize: 1.2.0 dev: true - /yargs-parser@19.0.4: - resolution: {integrity: sha512-eXeQm7yXRjPFFyf1voPkZgXQZJjYfjgQUmGPbD2TLtZeIYzvacgWX7sQ5a1HsRgVP+pfKAkRZDNtTGev4h9vhw==} - engines: {node: '>=10'} - dev: false - /yargs-parser@20.2.9: resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} @@ -23048,19 +22685,6 @@ packages: yargs-parser: 18.1.3 dev: true - /yargs@16.0.0: - resolution: {integrity: sha512-Ykb00VnWjee855QmeCrDAAmhVagt0T8PMML9WS2YrcU0VtvbeGq02MD7UiWmK6biiVPas6CaXmJNetL4Ye4+ng==} - engines: {node: '>=10'} - dependencies: - cliui: 7.0.4 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 19.0.4 - dev: false - /yargs@16.2.0: resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} engines: {node: '>=10'} @@ -23073,18 +22697,6 @@ packages: y18n: 5.0.8 yargs-parser: 20.2.9 - /yargs@17.6.2: - resolution: {integrity: sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==} - engines: {node: '>=12'} - dependencies: - cliui: 8.0.1 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - /yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} @@ -23143,5 +22755,5 @@ packages: resolution: {integrity: sha512-UzIwO92D0dSFwIRyyqAfRXICITLjF0IP8tRbEK/un7adirMssWZx8xF/1hZNE7t61knWZ+lhEuUvxlu2MO8qqA==} dev: true - /zod@3.21.4: - resolution: {integrity: sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==} + /zod@3.22.2: + resolution: {integrity: sha512-wvWkphh5WQsJbVk1tbx1l1Ly4yg+XecD+Mq280uBGt9wa5BKSWf4Mhp6GmrkPixhMxmabYY7RbzlwVP32pbGCg==} diff --git a/tools/bump-pack/package.json b/tools/bump-pack/package.json index 11d47d6f724..64e6680190b 100644 --- a/tools/bump-pack/package.json +++ b/tools/bump-pack/package.json @@ -15,22 +15,22 @@ "type": "module", "scripts": {}, "devDependencies": { - "@types/fs-extra": "^11", - "@types/node": "^18.16.18", - "@types/semver": "^7.5.0", - "typescript": "^5.1.3" + "@types/fs-extra": "^11.0.1", + "@types/node": "^18.17.13", + "@types/semver": "^7.5.1", + "typescript": "^5.2.2" }, "dependencies": { "@actions/core": "^1.10.0", "@pnpm/find-workspace-dir": "^6.0.2", - "@pnpm/reviewing.dependencies-hierarchy": "^2.0.8", - "@pnpm/workspace.find-packages": "^1.0.1", - "changelogen": "^0.5.3", - "fs-extra": "^11", + "@pnpm/reviewing.dependencies-hierarchy": "^2.0.10", + "@pnpm/workspace.find-packages": "^1.0.5", + "changelogen": "^0.5.5", + "fs-extra": "^11.1.1", "minimatch": "^9.0.3", "npm-which": "^3.0.1", - "semver": "^7.5.2", - "tsx": "^3.12.7" + "semver": "^7.5.4", + "tsx": "^3.12.8" }, "volta": { "extends": "../../package.json" diff --git a/tools/hangar/package.json b/tools/hangar/package.json index df382948549..cb3ce51d9df 100644 --- a/tools/hangar/package.json +++ b/tools/hangar/package.json @@ -17,13 +17,13 @@ "@wingconsole/ui": "workspace:^", "@winglang/compiler": "workspace:^", "@winglang/sdk": "workspace:^", - "winglang": "workspace:^", - "cdktf": "^0.17.0", - "execa": "^7.1.1", - "npm": "^9.6.4", - "tsx": "^3.12.6", + "cdktf": "^0.17.3", + "execa": "^7.2.0", + "npm": "^9.8.1", + "tsx": "^3.12.8", "vitest": "^0.30.1", - "yaml": "^2.2.1" + "winglang": "workspace:^", + "yaml": "^2.3.2" }, "volta": { "extends": "../../package.json" From 8fc40067c45826228bc31bde37ceeb221a840e48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pol=20Amor=C3=B3s?= Date: Tue, 5 Sep 2023 11:06:20 +0200 Subject: [PATCH 42/48] feat(console): improve jump to error when runing in vscode (#4012) When opening a hyperlink in vs-code, the default behavior is to open the hyperlink in the currently focused 'Editor Group.' However, when we have the Console open side by side with the wing file, this default behavior causes vs-code to open the file as a new tab in the Console panel group (if the group where you have the Console is focused). This PR adds two new endpoints: `[POST] app.openFileInEditor` and `app.openFileInEditorSubscription` When clicking on an error link the Console emits an event named `openFileInEditor`. Code editors like vscode (and potentially others) can subscribe to the new sub endpoint to receive these events. Previous behaviour (using hyperlinks) https://github.com/winglang/wing/assets/5547636/305a58ef-1f90-499e-a72d-60a00cefe2ca New behaviour (using sub) https://github.com/winglang/wing/assets/5547636/ae9c5d84-c70a-4160-b019-7b9144509797 Weird case when you have 425924593 groups https://github.com/winglang/wing/assets/5547636/ec52da55-887d-4b46-84a2-8d0b566669b0 resolves https://github.com/winglang/wing/issues/3337 *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .../src/console/console-manager.ts | 43 +++++++++++++-- .../src/console/services/client.ts | 9 ++++ apps/wing-console/console/server/src/index.ts | 1 + .../console/server/src/router/app.ts | 31 ++++++++++- .../console/server/src/utils/createRouter.ts | 7 +++ .../console/ui/src/features/console-logs.tsx | 53 ++++++++----------- .../console/ui/src/shared/use-file-link.tsx | 49 +++++++++++++++++ .../ui/src/ui/blue-screen-of-death.tsx | 19 ++++--- 8 files changed, 169 insertions(+), 43 deletions(-) create mode 100644 apps/wing-console/console/ui/src/shared/use-file-link.tsx diff --git a/apps/vscode-wing/src/console/console-manager.ts b/apps/vscode-wing/src/console/console-manager.ts index 77520bad945..130ce361447 100644 --- a/apps/vscode-wing/src/console/console-manager.ts +++ b/apps/vscode-wing/src/console/console-manager.ts @@ -7,6 +7,8 @@ import { ViewColumn, Uri, ExtensionContext, + Position, + Range, } from "vscode"; import { @@ -156,6 +158,42 @@ export const createConsoleManager = ( logger.appendLine(err); }, }); + + instance.client.onOpenFileInEditor({ + onData: async (data) => { + const path = data?.path; + const line = data?.line - 1 || 0; + const column = data?.column || 0; + + const openEditor = window.visibleTextEditors.find((editor) => { + return editor.document.uri.fsPath === path; + }); + + if (!openEditor || !openEditor.viewColumn) { + await commands.executeCommand( + "vscode.open", + Uri.file(path), + new Position(line, column) + ); + return; + } + + await commands.executeCommand("workbench.action.focusFirstEditorGroup"); + for (let i = 0; i < openEditor.viewColumn - 1; i++) { + await commands.executeCommand("workbench.action.focusNextGroup"); + } + await window.showTextDocument(openEditor.document, { + selection: new Range( + new Position(line, column), + new Position(line, column) + ), + }); + }, + onError: (err) => { + logger.appendLine(err); + }, + }); + instances[instance.id] = instance; await setActiveInstance(instance.id); @@ -244,11 +282,6 @@ export const createConsoleManager = ( }); context.subscriptions.push(webviewPanel, explorerView, testsExplorerView); - - const node = await resourcesExplorer.getChildren(); - if (node[0]?.id) { - await explorerView?.reveal(new ResourceItem(node[0].id)); - } activeInstanceId = instanceId; }; diff --git a/apps/vscode-wing/src/console/services/client.ts b/apps/vscode-wing/src/console/services/client.ts index 8a14520cbd0..5e40eab7f50 100644 --- a/apps/vscode-wing/src/console/services/client.ts +++ b/apps/vscode-wing/src/console/services/client.ts @@ -25,6 +25,7 @@ export interface Client { runAllTests: () => Promise; listResources: () => Promise; onInvalidateQuery: (options: SubscriptionOptions) => void; + onOpenFileInEditor: (options: SubscriptionOptions) => void; close: () => void; } @@ -98,6 +99,13 @@ export const createClient = (host: string): Client => { return client["app.invalidateQuery"].subscribe(undefined, options); }; + const onOpenFileInEditor = (options: SubscriptionOptions) => { + return client["app.openFileInEditorSubscription"].subscribe( + undefined, + options + ); + }; + const close = () => { wsClient.close(); }; @@ -112,6 +120,7 @@ export const createClient = (host: string): Client => { runAllTests, listResources, onInvalidateQuery, + onOpenFileInEditor, close, }; }; diff --git a/apps/wing-console/console/server/src/index.ts b/apps/wing-console/console/server/src/index.ts index d39a6597a1a..db976bd85fe 100644 --- a/apps/wing-console/console/server/src/index.ts +++ b/apps/wing-console/console/server/src/index.ts @@ -23,6 +23,7 @@ export type { TestsStateManager, TestStatus, TestItem, + FileLink, } from "./utils/createRouter.js"; export type { Trace, State } from "./types.js"; export type { LogInterface } from "./utils/LogInterface.js"; diff --git a/apps/wing-console/console/server/src/router/app.ts b/apps/wing-console/console/server/src/router/app.ts index ebbf51dfa11..efb63e8fad3 100644 --- a/apps/wing-console/console/server/src/router/app.ts +++ b/apps/wing-console/console/server/src/router/app.ts @@ -12,7 +12,11 @@ import { NodeConnection, ConstructTreeNodeMap, } from "../utils/constructTreeNodeMap.js"; -import { createProcedure, createRouter } from "../utils/createRouter.js"; +import { + FileLink, + createProcedure, + createRouter, +} from "../utils/createRouter.js"; import { isTermsAccepted, acceptTerms, @@ -561,6 +565,31 @@ export const createAppRouter = () => { .mutation(async ({ ctx, input }) => { await ctx.hostUtils?.openExternal(input.url); }), + "app.openFileInEditor": createProcedure + .input( + z.object({ + path: z.string(), + line: z.number().optional(), + column: z.number().optional(), + }), + ) + .mutation(async ({ ctx, input }) => { + ctx.emitter.emit("openFileInEditor", { + path: input.path, + line: input.line, + column: input.column, + }); + }), + "app.openFileInEditorSubscription": createProcedure.subscription( + ({ ctx }) => { + return observable((emit) => { + ctx.emitter.on("openFileInEditor", emit.next); + return () => { + ctx.emitter.off("openFileInEditor", emit.next); + }; + }); + }, + ), }); return { router }; diff --git a/apps/wing-console/console/server/src/utils/createRouter.ts b/apps/wing-console/console/server/src/utils/createRouter.ts index a8175c81baf..6e89652a9db 100644 --- a/apps/wing-console/console/server/src/utils/createRouter.ts +++ b/apps/wing-console/console/server/src/utils/createRouter.ts @@ -68,6 +68,12 @@ export interface TestsStateManager { setTest: (test: TestItem) => void; } +export interface FileLink { + path: string; + line?: number; + column?: number; +} + export interface RouterContext { simulator(): Promise; appDetails(): Promise<{ @@ -77,6 +83,7 @@ export interface RouterContext { emitter: Emittery<{ invalidateQuery: string | undefined; trace: Trace; + openFileInEditor: FileLink; }>; appState(): State; logger: ConsoleLogger; diff --git a/apps/wing-console/console/ui/src/features/console-logs.tsx b/apps/wing-console/console/ui/src/features/console-logs.tsx index 3870286ca3b..d45922374fd 100644 --- a/apps/wing-console/console/ui/src/features/console-logs.tsx +++ b/apps/wing-console/console/ui/src/features/console-logs.tsx @@ -9,6 +9,12 @@ import classNames from "classnames"; import throttle from "lodash.throttle"; import { Fragment, useEffect, useRef, useState } from "react"; +import { + OpenFileInEditorButton, + useFileLink, +} from "../shared/use-file-link.js"; +import { createHtmlLink } from "../shared/use-file-link.js"; + const dateTimeFormat = new Intl.DateTimeFormat(undefined, { hour: "2-digit", minute: "2-digit", @@ -23,21 +29,6 @@ interface LogEntryProps { showIcons?: boolean; } -export const formatAbsolutePaths = ( - error: string, - className: string, - expanded: boolean = false, -) => { - return error - .replaceAll( - /\B((?:[a-z]:)?[/\\]\S+):(\d+):(\d+)/gi, - (match, path, line, column) => { - return `${match}`; - }, - ) - .replaceAll(/(\r\n|\n|\r)/gm, expanded ? "
" : "\n"); -}; - const LogEntryRow = ({ log, showIcons = true, @@ -77,7 +68,7 @@ const LogEntryRow = ({ if (expandableRef.current === null) { return; } - const html = formatAbsolutePaths( + const html = createHtmlLink( log.message, "text-sky-500 underline hover:text-sky-800", expanded, @@ -154,20 +145,22 @@ const LogEntryRow = ({ /> )} - + + +

{onResourceClick && ( diff --git a/apps/wing-console/console/ui/src/shared/use-file-link.tsx b/apps/wing-console/console/ui/src/shared/use-file-link.tsx new file mode 100644 index 00000000000..0b8a5b21025 --- /dev/null +++ b/apps/wing-console/console/ui/src/shared/use-file-link.tsx @@ -0,0 +1,49 @@ +import { PropsWithChildren } from "react"; + +import { trpc } from "../services/trpc.js"; + +export const createHtmlLink = ( + error: string, + className: string, + expanded: boolean = false, +) => { + return error + .replaceAll( + /\B((?:[a-z]:)?[/\\]\S+):(\d+):(\d+)/gi, + (match, path, line, column) => { + const link = `vscode://file/${path}:${line}:${column}`; + return `${match}`; + }, + ) + .replaceAll(/(\r\n|\n|\r)/gm, expanded ? "
" : "\n"); +}; + +export const OpenFileInEditorButton = ({ children }: PropsWithChildren) => { + const openFileInEditor = trpc["app.openFileInEditor"].useMutation(); + + return ( + + ); +}; diff --git a/apps/wing-console/console/ui/src/ui/blue-screen-of-death.tsx b/apps/wing-console/console/ui/src/ui/blue-screen-of-death.tsx index 8394f2af120..a00b5c6d8cb 100644 --- a/apps/wing-console/console/ui/src/ui/blue-screen-of-death.tsx +++ b/apps/wing-console/console/ui/src/ui/blue-screen-of-death.tsx @@ -1,7 +1,10 @@ import classNames from "classnames"; -import { useEffect, useRef, useState } from "react"; +import { useEffect, useState } from "react"; -import { formatAbsolutePaths } from "../features/console-logs.js"; +import { + OpenFileInEditorButton, + createHtmlLink, +} from "../shared/use-file-link.js"; export const BlueScreenOfDeath = ({ title, @@ -22,7 +25,7 @@ export const BlueScreenOfDeath = ({ return; } setFormattedPathsError( - formatAbsolutePaths( + createHtmlLink( error, "underline text-slate-300 hover:text-slate-400", true, @@ -46,10 +49,12 @@ export const BlueScreenOfDeath = ({
{title}
- + + +
{displayLinks && (
From 5b7c71cb80b28c397897683978fcfa0886bb8cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pol=20Amor=C3=B3s?= Date: Tue, 5 Sep 2023 14:26:45 +0200 Subject: [PATCH 43/48] feat(console): preserve state inside resource interaction views (#3981) Preserve inputs state for the interaction views when: * Changing from one resource to another * Saving the file (if the resource still exists) https://github.com/winglang/wing/assets/5547636/b5161eae-f180-4d96-bd61-63f5f051765a resolves https://github.com/winglang/wing/issues/3928 *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .../console/design-system/src/combobox.tsx | 2 +- .../design-system/src/key-value-list.tsx | 17 +- .../console/server/src/router/app.ts | 27 ++ apps/wing-console/console/ui/package.json | 1 + .../ui/src/features/api-interaction-view.tsx | 1 + .../features/function-interaction-view.tsx | 1 + .../src/features/queue-interaction-view.tsx | 6 +- .../src/features/redis-interaction-view.tsx | 13 +- .../src/features/table-interaction-view.tsx | 1 + .../src/features/topic-interaction-view.tsx | 7 +- .../console/ui/src/layout/default-layout.tsx | 398 +++++++++--------- .../console/ui/src/services/use-explorer.tsx | 17 +- .../ui/src/shared/use-terminal-history.ts | 10 +- .../console/ui/src/ui/api-interaction.tsx | 42 +- .../console/ui/src/ui/bucket-interaction.tsx | 2 +- .../ui/src/ui/function-interaction.tsx | 7 +- .../console/ui/src/ui/queue-interaction.tsx | 7 +- .../console/ui/src/ui/table-interaction.tsx | 10 +- .../console/ui/src/ui/topic-interaction.tsx | 11 +- .../use-persistent-state/.eslintignore | 1 + .../use-persistent-state/.eslintrc.json | 4 + .../use-persistent-state/package.json | 25 ++ .../use-persistent-state/src/index.tsx | 76 ++++ .../use-persistent-state/tsconfig.json | 8 + pnpm-lock.yaml | 70 ++- 25 files changed, 526 insertions(+), 238 deletions(-) create mode 100644 apps/wing-console/packages/use-persistent-state/.eslintignore create mode 100644 apps/wing-console/packages/use-persistent-state/.eslintrc.json create mode 100644 apps/wing-console/packages/use-persistent-state/package.json create mode 100644 apps/wing-console/packages/use-persistent-state/src/index.tsx create mode 100644 apps/wing-console/packages/use-persistent-state/tsconfig.json diff --git a/apps/wing-console/console/design-system/src/combobox.tsx b/apps/wing-console/console/design-system/src/combobox.tsx index f7e75b7e37f..850deaf91a7 100644 --- a/apps/wing-console/console/design-system/src/combobox.tsx +++ b/apps/wing-console/console/design-system/src/combobox.tsx @@ -61,7 +61,7 @@ export const Combobox = ({ } setFiltered( items.filter((item) => { - return item.label?.toLowerCase().includes(value.toLowerCase()); + return item.label?.toLowerCase().includes(value?.toLowerCase()); }), ); }, [items, value, filter]); diff --git a/apps/wing-console/console/design-system/src/key-value-list.tsx b/apps/wing-console/console/design-system/src/key-value-list.tsx index 8c4f55d7512..a58cbc09e41 100644 --- a/apps/wing-console/console/design-system/src/key-value-list.tsx +++ b/apps/wing-console/console/design-system/src/key-value-list.tsx @@ -1,6 +1,11 @@ import { PlusIcon, TrashIcon } from "@heroicons/react/24/outline"; import classNames from "classnames"; -import { useCallback, useEffect, useState } from "react"; +import { + useCallback, + useEffect, + useState as useReactState, + useState, +} from "react"; import { Button } from "./button.js"; import { Combobox } from "./combobox.js"; @@ -11,7 +16,13 @@ export interface KeyValueItem { value: string; } -export const useKeyValueList = () => { +export interface UseKeyValueListOptions { + useState?: typeof useReactState; +} + +export const useKeyValueList = ({ + useState = useReactState, +}: UseKeyValueListOptions) => { const [items, setItems] = useState([]); const addItem = useCallback((item: KeyValueItem) => { @@ -86,7 +97,7 @@ export const KeyValueList = ({ return; } setEditItems([...items, { key: "", value: "" }]); - }, [readonly, items]); + }, [readonly, items, onAddItem]); const onItemChange = (index: number, item: KeyValueItem) => { if (index === items.length) { diff --git a/apps/wing-console/console/server/src/router/app.ts b/apps/wing-console/console/server/src/router/app.ts index efb63e8fad3..134bff61e90 100644 --- a/apps/wing-console/console/server/src/router/app.ts +++ b/apps/wing-console/console/server/src/router/app.ts @@ -118,6 +118,33 @@ export const createAppRouter = () => { input?.showTests, ); }), + "app.nodeIds": createProcedure + .input( + z + .object({ + showTests: z.boolean().optional(), + }) + .optional(), + ) + .query(async ({ ctx, input }) => { + const simulator = await ctx.simulator(); + const { tree } = simulator.tree().rawData(); + const node = createExplorerItemFromConstructTreeNode( + shakeTree(tree), + simulator, + input?.showTests, + ); + + const list = new Array(); + const getNodeIds = (item: ExplorerItem) => { + list.push(item.id); + for (const child of item.childItems ?? []) { + getNodeIds(child); + } + }; + getNodeIds(node); + return list; + }), "app.selectNode": createProcedure .input( z.object({ diff --git a/apps/wing-console/console/ui/package.json b/apps/wing-console/console/ui/package.json index 87ffd664728..1fa5fabe56b 100644 --- a/apps/wing-console/console/ui/package.json +++ b/apps/wing-console/console/ui/package.json @@ -74,6 +74,7 @@ "@wingconsole/server": "workspace:^", "@wingconsole/tsconfig": "workspace:^", "@wingconsole/use-loading": "workspace:^", + "@wingconsole/use-persistent-state": "workspace:^", "autoprefixer": "^10.4.15", "bump-pack": "workspace:^", "eslint": "^8.48.0", diff --git a/apps/wing-console/console/ui/src/features/api-interaction-view.tsx b/apps/wing-console/console/ui/src/features/api-interaction-view.tsx index 5f7df9cf4f5..5af23754589 100644 --- a/apps/wing-console/console/ui/src/features/api-interaction-view.tsx +++ b/apps/wing-console/console/ui/src/features/api-interaction-view.tsx @@ -24,6 +24,7 @@ export const ApiInteractionView = ({ resourcePath }: ApiViewProps) => { return ( { const { isLoading, pushMessage } = useQueue({ resourcePath }); return ( - + ); }; diff --git a/apps/wing-console/console/ui/src/features/redis-interaction-view.tsx b/apps/wing-console/console/ui/src/features/redis-interaction-view.tsx index 158e896a230..34a6ac15a44 100644 --- a/apps/wing-console/console/ui/src/features/redis-interaction-view.tsx +++ b/apps/wing-console/console/ui/src/features/redis-interaction-view.tsx @@ -1,7 +1,9 @@ -import { useCallback, useState } from "react"; +import { createPersistentState } from "@wingconsole/use-persistent-state"; +import { useCallback, useEffect, useState } from "react"; import { useOpenExternal } from "../services/use-open-external.js"; import { useRedis } from "../services/use-redis.js"; +import { TerminalHistoryItem } from "../shared/ternimal.js"; import { useTerminalHistory } from "../shared/use-terminal-history.js"; import { RedisInteraction } from "../ui/redis-interaction.js"; @@ -12,7 +14,9 @@ export interface RedisViewProps { const REDIS_HELP_URL = "https://redis.io/commands"; export const RedisInteractionView = ({ resourcePath }: RedisViewProps) => { - const [command, setCommand] = useState(""); + const { usePersistentState } = createPersistentState(resourcePath); + + const [command, setCommand] = usePersistentState(""); const { commandHistory, terminalHistory, @@ -21,7 +25,9 @@ export const RedisInteractionView = ({ resourcePath }: RedisViewProps) => { updateTerminalHistory, updateCommandHistory, clearTerminalHistory, - } = useTerminalHistory(); + } = useTerminalHistory({ + useState: usePersistentState, + }); const { open } = useOpenExternal(); const { isLoading, redisUrl, execCommand } = useRedis({ resourcePath }); @@ -103,6 +109,7 @@ export const RedisInteractionView = ({ resourcePath }: RedisViewProps) => { return ( { showNotification("Message published", { body: message, type: "success" }); }; - return ; + return ( + + ); }; diff --git a/apps/wing-console/console/ui/src/layout/default-layout.tsx b/apps/wing-console/console/ui/src/layout/default-layout.tsx index 01db45c3cba..7c84e55a775 100644 --- a/apps/wing-console/console/ui/src/layout/default-layout.tsx +++ b/apps/wing-console/console/ui/src/layout/default-layout.tsx @@ -8,6 +8,7 @@ import { } from "@wingconsole/design-system"; import type { State, LayoutConfig, LayoutComponent } from "@wingconsole/server"; import { useLoading } from "@wingconsole/use-loading"; +import { PersistentStateProvider } from "@wingconsole/use-persistent-state"; import classNames from "classnames"; import { useCallback, useEffect, useMemo, useState } from "react"; @@ -263,234 +264,239 @@ export const DefaultLayout = ({ layout?.panels?.rounded && "pt-1", )} > - {cloudAppState === "error" && - layout.errorScreen?.position === "default" && ( -
- -
- )} + + {cloudAppState === "error" && + layout.errorScreen?.position === "default" && ( +
+ +
+ )} - {renderApp && ( - <> -
-
-
- + {renderApp && ( + <> +
+
+
+ +
-
- {!layout.leftPanel?.hide && - layout.leftPanel?.components?.length && ( - - {layout.leftPanel?.components.map( - (component: LayoutComponent, index: number) => { - const panelComponent = ( -
0 && "h-full", - )} - > - {renderLayoutComponent(component)} -
- ); + {!layout.leftPanel?.hide && + layout.leftPanel?.components?.length && ( + + {layout.leftPanel?.components.map( + (component: LayoutComponent, index: number) => { + const panelComponent = ( +
0 && "h-full", + )} + > + {renderLayoutComponent(component)} +
+ ); - if (index > 0) { + if (index > 0) { + return ( + + {panelComponent} + + ); + } return ( - {panelComponent} - +
); - } - return ( -
- {panelComponent} -
- ); - }, - )} - - )} - -
-
-
- - setSelectedItems(nodeId ? [nodeId] : []) - } - selectedEdgeId={selectedEdgeId} - onSelectedEdgeIdChange={setSelectedEdgeId} - /> -
+ }, + )} + + )} - +
+
- {metadata.data && ( - { - expand(path); - setSelectedItems([path]); - }} - /> - )} - {selectedEdgeId && edgeMetadata.data && ( - { - expand(path); - setSelectedItems([path]); - }} - /> - )} + + setSelectedItems(nodeId ? [nodeId] : []) + } + selectedEdgeId={selectedEdgeId} + onSelectedEdgeIdChange={setSelectedEdgeId} + />
- -
-
-
- {!layout.bottomPanel?.hide && ( - - {layout.bottomPanel?.components?.map( - (component: LayoutComponent, index: number) => { - const panelComponent = ( +
- {renderLayoutComponent(component)} + {metadata.data && ( + { + expand(path); + setSelectedItems([path]); + }} + /> + )} + + {selectedEdgeId && edgeMetadata.data && ( + { + expand(path); + setSelectedItems([path]); + }} + /> + )}
- ); +
+
+
+
- if ( - layout.bottomPanel?.components?.length && - layout.bottomPanel.components.length > 1 && - index !== layout.bottomPanel.components.length - 1 - ) { - return ( - + {layout.bottomPanel?.components?.map( + (component: LayoutComponent, index: number) => { + const panelComponent = ( +
- {panelComponent} - + {renderLayoutComponent(component)} +
); - } - return panelComponent; - }, - )} - - )} - - {cloudAppState === "error" && - layout.errorScreen?.position === "bottom" && ( - <> -
-
- - - -
- + if ( + layout.bottomPanel?.components?.length && + layout.bottomPanel.components.length > 1 && + index !== layout.bottomPanel.components.length - 1 + ) { + return ( + + {panelComponent} + + ); + } + return panelComponent; + }, + )} + )} - - )} - {!layout.statusBar?.hide && ( -
- -
- )} + {cloudAppState === "error" && + layout.errorScreen?.position === "bottom" && ( + <> +
+ +
+ + + +
+ + )} + + )} + + {!layout.statusBar?.hide && ( +
+ +
+ )} +
); diff --git a/apps/wing-console/console/ui/src/services/use-explorer.tsx b/apps/wing-console/console/ui/src/services/use-explorer.tsx index 3c9988b06fd..47499a27ad4 100644 --- a/apps/wing-console/console/ui/src/services/use-explorer.tsx +++ b/apps/wing-console/console/ui/src/services/use-explorer.tsx @@ -44,6 +44,7 @@ export const useExplorer = () => { const setSelectedNode = trpc["app.selectNode"].useMutation(); const selectedNode = trpc["app.selectedNode"].useQuery(); + const nodeIds = trpc["app.nodeIds"].useQuery(); const onSelectedItemsChange = useCallback( (selectedItems: string[]) => { @@ -60,12 +61,20 @@ export const useExplorer = () => { return; } setItems([createTreeMenuItemFromExplorerTreeItem(tree.data)]); - - setSelectedNode.mutate({ - resourcePath: "root", - }); }, [tree.data, setItems]); + useEffect(() => { + if (!nodeIds.data) { + return; + } + + if (!selectedNode.data || !nodeIds.data?.includes(selectedNode.data)) { + setSelectedNode.mutate({ + resourcePath: "root", + }); + } + }, [selectedNode.data, nodeIds.data]); + useEffect(() => { if (!selectedNode.data) { return; diff --git a/apps/wing-console/console/ui/src/shared/use-terminal-history.ts b/apps/wing-console/console/ui/src/shared/use-terminal-history.ts index 298370b3979..22d3019ee74 100644 --- a/apps/wing-console/console/ui/src/shared/use-terminal-history.ts +++ b/apps/wing-console/console/ui/src/shared/use-terminal-history.ts @@ -1,8 +1,14 @@ -import { useCallback, useState } from "react"; +import { useCallback, useState as useReactState } from "react"; import { TerminalHistoryItem } from "./ternimal.js"; -export const useTerminalHistory = () => { +export interface UseTerminalHistoryOptions { + useState?: typeof useReactState; +} + +export const useTerminalHistory = ({ + useState = useReactState, +}: UseTerminalHistoryOptions) => { const [terminalHistory, setTerminalHistory] = useState( [], ); diff --git a/apps/wing-console/console/ui/src/ui/api-interaction.tsx b/apps/wing-console/console/ui/src/ui/api-interaction.tsx index e64343c7b5f..6cddd5272cf 100644 --- a/apps/wing-console/console/ui/src/ui/api-interaction.tsx +++ b/apps/wing-console/console/ui/src/ui/api-interaction.tsx @@ -9,6 +9,7 @@ import { useKeyValueList, useTheme, } from "@wingconsole/design-system"; +import { createPersistentState } from "@wingconsole/use-persistent-state"; import classNames from "classnames"; import { useCallback, useEffect, useId, useState } from "react"; @@ -27,6 +28,7 @@ import { ApiResponseBodyPanel } from "./api-response-body-panel.js"; import { ApiResponseHeadersPanel } from "./api-response-headers-panel.js"; export interface ApiInteractionProps { + resourceId: string; appMode: AppMode; apiResponse?: ApiResponse; schemaData: any; @@ -35,6 +37,7 @@ export interface ApiInteractionProps { } export const ApiInteraction = ({ + resourceId, appMode, apiResponse, callFetch, @@ -42,18 +45,25 @@ export const ApiInteraction = ({ isLoading, }: ApiInteractionProps) => { const { theme } = useTheme(); + + const { usePersistentState } = createPersistentState(resourceId); const bodyId = useId(); - const [url, setUrl] = useState(""); + const [url, setUrl] = useState(""); const [routes, setRoutes] = useState([]); - const [currentRoute, setCurrentRoute] = useState(""); - const [currentMethod, setCurrentMethod] = useState("GET"); - const [body, setBody] = useState(""); - const [currentHeaderKey, setCurrentHeaderKey] = useState(""); + const [valuesList, setValuesList] = useState([]); - const [currentOptionsTab, setCurrentOptionsTab] = useState("headers"); - const [currentResponseTab, setCurrentResponseTab] = useState("body"); + const [currentHeaderKey, setCurrentHeaderKey] = usePersistentState(""); + const [currentRoute, setCurrentRoute] = usePersistentState(""); + + const [currentMethod, setCurrentMethod] = usePersistentState("GET"); + const [body, setBody] = usePersistentState(""); + + const [currentOptionsTab, setCurrentOptionsTab] = + usePersistentState("headers"); + const [currentResponseTab, setCurrentResponseTab] = + usePersistentState("body"); const { items: headers, @@ -61,7 +71,9 @@ export const ApiInteraction = ({ removeItem: removeHeader, editItem: editHeader, removeAll: removeAllHeaders, - } = useKeyValueList(); + } = useKeyValueList({ + useState: usePersistentState, + }); const { items: queryParameters, @@ -70,14 +82,18 @@ export const ApiInteraction = ({ editItem: editQueryParameter, setItems: setQueryParameters, removeAll: removeAllQueryParameters, - } = useKeyValueList(); + } = useKeyValueList({ + useState: usePersistentState, + }); const { items: pathVariables, editItem: editPathVariable, setItems: setPathVariables, removeAll: removeAllPathVariables, - } = useKeyValueList(); + } = useKeyValueList({ + useState: usePersistentState, + }); const resetApiState = () => { setCurrentRoute(""); @@ -94,7 +110,7 @@ export const ApiInteraction = ({ if (!url || !currentMethod || !currentRoute) { return; } - await callFetch({ + callFetch({ url, route: currentRoute, variables: pathVariables, @@ -179,7 +195,7 @@ export const ApiInteraction = ({ if (!schemaData) { return; } - resetApiState(); + setUrl(schemaData.url); const routes = getRoutesFromOpenApi(schemaData.openApiSpec); setRoutes(routes); @@ -318,6 +334,7 @@ export const ApiInteraction = ({ Query params
)} + Path variables
+ No files
diff --git a/apps/wing-console/console/ui/src/ui/function-interaction.tsx b/apps/wing-console/console/ui/src/ui/function-interaction.tsx index 976dfde9865..536b65d3907 100644 --- a/apps/wing-console/console/ui/src/ui/function-interaction.tsx +++ b/apps/wing-console/console/ui/src/ui/function-interaction.tsx @@ -4,24 +4,29 @@ import { TextArea, useTheme, } from "@wingconsole/design-system"; +import { createPersistentState } from "@wingconsole/use-persistent-state"; import classNames from "classnames"; import { useId, useState } from "react"; import { useFunction } from "../services/use-function.js"; export interface FunctionInteractionProps { + resourceId: string; onInvokeClick: (payload: string) => void; isLoading: boolean; response: string; } export const FunctionInteraction = ({ + resourceId, onInvokeClick, isLoading, response, }: FunctionInteractionProps) => { const { theme } = useTheme(); - const [payload, setPayload] = useState(""); + const { usePersistentState } = createPersistentState(resourceId); + + const [payload, setPayload] = usePersistentState(""); const payloadElementId = useId(); const responseElementId = useId(); diff --git a/apps/wing-console/console/ui/src/ui/queue-interaction.tsx b/apps/wing-console/console/ui/src/ui/queue-interaction.tsx index 97a8a0747fb..8cfee9c33a9 100644 --- a/apps/wing-console/console/ui/src/ui/queue-interaction.tsx +++ b/apps/wing-console/console/ui/src/ui/queue-interaction.tsx @@ -1,15 +1,20 @@ import { Button, TextArea } from "@wingconsole/design-system"; +import { createPersistentState } from "@wingconsole/use-persistent-state"; import { useCallback, useId, useState } from "react"; export interface QueueInteractionProps { + resourceId: string; isLoading: boolean; onPushMessageClick: (message: string) => void; } export const QueueInteraction = ({ + resourceId, isLoading, onPushMessageClick, }: QueueInteractionProps) => { - const [message, setMessage] = useState(""); + const { usePersistentState } = createPersistentState(resourceId); + + const [message, setMessage] = usePersistentState(""); const pushMessage = useCallback(async () => { if (!message || message === "") { diff --git a/apps/wing-console/console/ui/src/ui/table-interaction.tsx b/apps/wing-console/console/ui/src/ui/table-interaction.tsx index df2ab3bfae3..34ced10c8e9 100644 --- a/apps/wing-console/console/ui/src/ui/table-interaction.tsx +++ b/apps/wing-console/console/ui/src/ui/table-interaction.tsx @@ -6,6 +6,7 @@ import { TableRow, getInputType, } from "@wingconsole/design-system"; +import { createPersistentState } from "@wingconsole/use-persistent-state"; import classNames from "classnames"; import { useCallback, useEffect, useRef, useState } from "react"; @@ -17,6 +18,7 @@ export type Row = { }; export interface TableInteractionProps { + resourceId: string; primaryKey?: string; columns?: Column[]; rows?: Row[]; @@ -29,6 +31,7 @@ export interface TableInteractionProps { } export const TableInteraction = ({ + resourceId, primaryKey = "", columns = [], rows = [], @@ -40,8 +43,9 @@ export const TableInteraction = ({ loading = false, }: TableInteractionProps) => { const { theme } = useTheme(); + const { usePersistentState } = createPersistentState(resourceId); - const [newRow, setNewRow] = useState({ data: {}, error: "" }); + const [newRow, setNewRow] = usePersistentState({ data: {}, error: "" }); const [internalRows, setInternalRows] = useState([]); const inputRef = useRef(null); @@ -51,7 +55,8 @@ export const TableInteraction = ({ return; } onAddRow(row); - }, [newRow, onAddRow, primaryKey]); + setNewRow({ data: {}, error: "" }); + }, [newRow, onAddRow, primaryKey, setNewRow]); const updateNewRow = useCallback( (key: string, newValue: any) => { @@ -94,7 +99,6 @@ export const TableInteraction = ({ ); useEffect(() => { - setNewRow({ data: {}, error: "" }); setInternalRows(rows); }, [rows]); diff --git a/apps/wing-console/console/ui/src/ui/topic-interaction.tsx b/apps/wing-console/console/ui/src/ui/topic-interaction.tsx index 0964813d9c9..e8ea9c038e9 100644 --- a/apps/wing-console/console/ui/src/ui/topic-interaction.tsx +++ b/apps/wing-console/console/ui/src/ui/topic-interaction.tsx @@ -1,11 +1,18 @@ import { Button, TextArea } from "@wingconsole/design-system"; +import { createPersistentState } from "@wingconsole/use-persistent-state"; import { useId, useState } from "react"; export interface TopicInteractionProps { + resourceId: string; onPublishClick: (message: string) => void; } -export const TopicInteraction = ({ onPublishClick }: TopicInteractionProps) => { - const [message, setMessage] = useState(""); +export const TopicInteraction = ({ + resourceId, + onPublishClick, +}: TopicInteractionProps) => { + const { usePersistentState } = createPersistentState(resourceId); + + const [message, setMessage] = usePersistentState(""); const elementId = useId(); return ( diff --git a/apps/wing-console/packages/use-persistent-state/.eslintignore b/apps/wing-console/packages/use-persistent-state/.eslintignore new file mode 100644 index 00000000000..2ccbe4656c6 --- /dev/null +++ b/apps/wing-console/packages/use-persistent-state/.eslintignore @@ -0,0 +1 @@ +/node_modules/ diff --git a/apps/wing-console/packages/use-persistent-state/.eslintrc.json b/apps/wing-console/packages/use-persistent-state/.eslintrc.json new file mode 100644 index 00000000000..96e9873fe04 --- /dev/null +++ b/apps/wing-console/packages/use-persistent-state/.eslintrc.json @@ -0,0 +1,4 @@ +{ + "root": true, + "extends": ["plugin:@wingconsole/browser"] +} diff --git a/apps/wing-console/packages/use-persistent-state/package.json b/apps/wing-console/packages/use-persistent-state/package.json new file mode 100644 index 00000000000..ac8981ae15d --- /dev/null +++ b/apps/wing-console/packages/use-persistent-state/package.json @@ -0,0 +1,25 @@ +{ + "name": "@wingconsole/use-persistent-state", + "version": "0.0.0", + "private": true, + "exports": "./src/index.tsx", + "types": "./src/index.tsx", + "sideEffects": false, + "type": "module", + "files": [ + "dist" + ], + "scripts": { + "tsc": "tsc --build", + "eslint": "eslint --ext .js,.cjs,.ts,.cts,.mts,.tsx --no-error-on-unmatched-pattern . --fix" + }, + "devDependencies": { + "@types/react": "^18.2.12", + "@wingconsole/eslint-plugin": "workspace:^", + "@wingconsole/tsconfig": "workspace:^", + "typescript": "^5.1.3" + }, + "volta": { + "extends": "../../../../package.json" + } +} diff --git a/apps/wing-console/packages/use-persistent-state/src/index.tsx b/apps/wing-console/packages/use-persistent-state/src/index.tsx new file mode 100644 index 00000000000..ba76fbd52ac --- /dev/null +++ b/apps/wing-console/packages/use-persistent-state/src/index.tsx @@ -0,0 +1,76 @@ +import { + Dispatch, + PropsWithChildren, + SetStateAction, + createContext, + useContext, + useEffect, + useRef, + MutableRefObject, + useState, +} from "react"; + +const PersistentStateContext = createContext< + | { + state: MutableRefObject>; + } + | undefined +>(undefined); + +export const usePersistentStateContext = () => { + const context = useContext(PersistentStateContext); + if (!context?.state) { + throw new Error( + "usePersistentState must be used within a PersistentStateProvider", + ); + } + return context.state; +}; + +export const PersistentStateProvider = (props: PropsWithChildren) => { + const state = useRef(new Map()); + return ( + + {props.children} + + ); +}; + +export const createPersistentState = (stateId: string) => { + let index = 0; + + return { + usePersistentState: function ( + initialValue?: S | (() => S), + ): [S, Dispatch>] { + const currentIndex = useRef(index++); + + const valueRef = useRef() as MutableRefObject; + const state = usePersistentStateContext(); + + const [value, setValue] = useState(() => { + const values = state.current.get(stateId) ?? []; + if (values.length > currentIndex.current) { + return values[currentIndex.current]; + } + return initialValue instanceof Function ? initialValue() : initialValue; + }); + + useEffect(() => { + valueRef.current = value; + }, [value]); + + useEffect(() => { + const currentState = state.current; + const index = currentIndex.current; + return () => { + const storedData = currentState.get(stateId) ?? []; + storedData[index] = valueRef.current; + currentState.set(stateId, storedData); + }; + }, []); + + return [value, setValue]; + }, + }; +}; diff --git a/apps/wing-console/packages/use-persistent-state/tsconfig.json b/apps/wing-console/packages/use-persistent-state/tsconfig.json new file mode 100644 index 00000000000..4191fb58ccb --- /dev/null +++ b/apps/wing-console/packages/use-persistent-state/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "@wingconsole/tsconfig", + "compilerOptions": { + "jsx": "react-jsx", + "lib": ["DOM", "DOM.Iterable", "ESNext"] + }, + "include": ["src/**/*", "test/**/*"] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2c20a43ef5b..5403286a576 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -831,6 +831,9 @@ importers: '@wingconsole/use-loading': specifier: workspace:^ version: link:../../packages/use-loading + '@wingconsole/use-persistent-state': + specifier: workspace:^ + version: link:../../packages/use-persistent-state autoprefixer: specifier: ^10.4.15 version: 10.4.15(postcss@8.4.29) @@ -892,6 +895,21 @@ importers: specifier: ^5.2.2 version: 5.2.2 + apps/wing-console/packages/use-persistent-state: + devDependencies: + '@types/react': + specifier: ^18.2.12 + version: 18.2.21 + '@wingconsole/eslint-plugin': + specifier: workspace:^ + version: link:../../tools/eslint-plugin + '@wingconsole/tsconfig': + specifier: workspace:^ + version: link:../../tools/tsconfig + typescript: + specifier: ^5.1.3 + version: 5.2.2 + apps/wing-console/tools/eslint-plugin: dependencies: '@cloudy-ts/eslint-plugin': @@ -1407,7 +1425,6 @@ packages: deprecated: |- AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2. - For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html peerDependencies: '@aws-cdk/aws-iam': 1.204.0 @@ -1425,7 +1442,6 @@ packages: deprecated: |- AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2. - For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html peerDependencies: '@aws-cdk/core': 1.204.0 @@ -1446,7 +1462,6 @@ packages: deprecated: |- AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2. - For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html peerDependencies: '@aws-cdk/aws-iam': 1.204.0 @@ -1468,7 +1483,6 @@ packages: deprecated: |- AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2. - For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html peerDependencies: '@aws-cdk/aws-events': 1.204.0 @@ -1492,7 +1506,6 @@ packages: deprecated: |- AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2. - For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html dependencies: jsonschema: 1.4.1 @@ -1508,7 +1521,6 @@ packages: deprecated: |- AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2. - For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html peerDependencies: '@aws-cdk/cloud-assembly-schema': 1.204.0 @@ -1537,7 +1549,6 @@ packages: deprecated: |- AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2. - For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html peerDependencies: '@aws-cdk/cloud-assembly-schema': 1.204.0 @@ -4252,6 +4263,7 @@ packages: /@dabh/diagnostics@2.0.3: resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} + requiresBuild: true dependencies: colorspace: 1.1.4 enabled: 2.0.0 @@ -5609,6 +5621,7 @@ packages: /@octokit/auth-token@2.5.0: resolution: {integrity: sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==} + requiresBuild: true dependencies: '@octokit/types': 6.41.0 dev: false @@ -5616,6 +5629,7 @@ packages: /@octokit/core@3.6.0: resolution: {integrity: sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==} + requiresBuild: true dependencies: '@octokit/auth-token': 2.5.0 '@octokit/graphql': 4.8.0 @@ -5631,6 +5645,7 @@ packages: /@octokit/endpoint@6.0.12: resolution: {integrity: sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==} + requiresBuild: true dependencies: '@octokit/types': 6.41.0 is-plain-object: 5.0.0 @@ -5640,6 +5655,7 @@ packages: /@octokit/graphql@4.8.0: resolution: {integrity: sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==} + requiresBuild: true dependencies: '@octokit/request': 5.6.3 '@octokit/types': 6.41.0 @@ -5651,11 +5667,13 @@ packages: /@octokit/openapi-types@12.11.0: resolution: {integrity: sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==} + requiresBuild: true dev: false optional: true /@octokit/plugin-paginate-rest@2.21.3(@octokit/core@3.6.0): resolution: {integrity: sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==} + requiresBuild: true peerDependencies: '@octokit/core': '>=2' dependencies: @@ -5666,6 +5684,7 @@ packages: /@octokit/plugin-request-log@1.0.4(@octokit/core@3.6.0): resolution: {integrity: sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==} + requiresBuild: true peerDependencies: '@octokit/core': '>=3' dependencies: @@ -5675,6 +5694,7 @@ packages: /@octokit/plugin-rest-endpoint-methods@5.16.2(@octokit/core@3.6.0): resolution: {integrity: sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==} + requiresBuild: true peerDependencies: '@octokit/core': '>=3' dependencies: @@ -5686,6 +5706,7 @@ packages: /@octokit/request-error@2.1.0: resolution: {integrity: sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==} + requiresBuild: true dependencies: '@octokit/types': 6.41.0 deprecation: 2.3.1 @@ -5695,6 +5716,7 @@ packages: /@octokit/request@5.6.3: resolution: {integrity: sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==} + requiresBuild: true dependencies: '@octokit/endpoint': 6.0.12 '@octokit/request-error': 2.1.0 @@ -5709,6 +5731,7 @@ packages: /@octokit/rest@18.12.0: resolution: {integrity: sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q==} + requiresBuild: true dependencies: '@octokit/core': 3.6.0 '@octokit/plugin-paginate-rest': 2.21.3(@octokit/core@3.6.0) @@ -5721,6 +5744,7 @@ packages: /@octokit/types@6.41.0: resolution: {integrity: sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==} + requiresBuild: true dependencies: '@octokit/openapi-types': 12.11.0 dev: false @@ -9086,6 +9110,7 @@ packages: /@types/triple-beam@1.3.2: resolution: {integrity: sha512-txGIh+0eDFzKGC25zORnswy+br1Ha7hj5cMVwKIU7+s0U2AxxJru/jZSMU6OC9MJWP6+pc/hc6ZjyZShpsyY2g==} + requiresBuild: true dev: false optional: true @@ -10350,6 +10375,7 @@ packages: /axios@0.27.2: resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} + requiresBuild: true dependencies: follow-redirects: 1.15.2 form-data: 4.0.0 @@ -10570,6 +10596,7 @@ packages: /before-after-hook@2.2.3: resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} + requiresBuild: true dev: false optional: true @@ -11100,6 +11127,7 @@ packages: /chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + requiresBuild: true /check-error@1.0.2: resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} @@ -11234,6 +11262,7 @@ packages: /cli-width@3.0.0: resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} engines: {node: '>= 10'} + requiresBuild: true dev: false optional: true @@ -11343,6 +11372,7 @@ packages: /color-string@1.9.1: resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} + requiresBuild: true dependencies: color-name: 1.1.4 simple-swizzle: 0.2.2 @@ -11356,6 +11386,7 @@ packages: /color@3.2.1: resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==} + requiresBuild: true dependencies: color-convert: 1.9.3 color-string: 1.9.1 @@ -11367,6 +11398,7 @@ packages: /colorspace@1.1.4: resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==} + requiresBuild: true dependencies: color: 3.2.1 text-hex: 1.0.0 @@ -12180,6 +12212,7 @@ packages: /deprecation@2.3.1: resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==} + requiresBuild: true dev: false optional: true @@ -12438,6 +12471,7 @@ packages: /enabled@2.0.0: resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} + requiresBuild: true dev: false optional: true @@ -13512,6 +13546,7 @@ packages: /fecha@4.2.3: resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==} + requiresBuild: true dev: false optional: true @@ -13645,6 +13680,7 @@ packages: /fn.name@1.1.0: resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==} + requiresBuild: true dev: false optional: true @@ -14161,6 +14197,7 @@ packages: /graphql-tag@2.12.6(graphql@16.8.0): resolution: {integrity: sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==} engines: {node: '>=10'} + requiresBuild: true peerDependencies: graphql: ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: @@ -14172,6 +14209,7 @@ packages: /graphql@16.8.0: resolution: {integrity: sha512-0oKGaR+y3qcS5mCu1vb7KG+a89vjn06C7Ihq/dDl3jA+A8B3TKomvi3CiEcVLJQGalbu8F52LxkOym7U5sSfbg==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} + requiresBuild: true dev: false optional: true @@ -14595,6 +14633,7 @@ packages: /inquirer@8.2.6: resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==} engines: {node: '>=12.0.0'} + requiresBuild: true dependencies: ansi-escapes: 4.3.2 chalk: 4.1.2 @@ -14686,6 +14725,7 @@ packages: /is-arrayish@0.3.2: resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + requiresBuild: true dev: false optional: true @@ -14866,6 +14906,7 @@ packages: /is-path-cwd@2.2.0: resolution: {integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==} engines: {node: '>=6'} + requiresBuild: true /is-path-inside@3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} @@ -16590,6 +16631,7 @@ packages: /kuler@2.0.0: resolution: {integrity: sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==} + requiresBuild: true dev: false optional: true @@ -16831,6 +16873,7 @@ packages: /logform@2.5.1: resolution: {integrity: sha512-9FyqAm9o9NKKfiAKfZoYo9bGXXuwMkxQiQttkT4YjjVtQVIQtK6LmVtlxmCaFswo6N4AfEkHqZTV0taDtPotNg==} + requiresBuild: true dependencies: '@colors/colors': 1.5.0 '@types/triple-beam': 1.3.2 @@ -18067,6 +18110,7 @@ packages: /one-time@1.0.0: resolution: {integrity: sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==} + requiresBuild: true dependencies: fn.name: 1.1.0 dev: false @@ -18141,6 +18185,7 @@ packages: /os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} + requiresBuild: true /p-cancelable@3.0.0: resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} @@ -19658,6 +19703,7 @@ packages: /run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} + requiresBuild: true dev: false optional: true @@ -19714,6 +19760,7 @@ packages: /safe-json-stringify@1.2.0: resolution: {integrity: sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==} + requiresBuild: true dev: false optional: true @@ -19947,6 +19994,7 @@ packages: /simple-swizzle@0.2.2: resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + requiresBuild: true dependencies: is-arrayish: 0.3.2 dev: false @@ -20132,6 +20180,7 @@ packages: /stack-trace@0.0.10: resolution: {integrity: sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==} + requiresBuild: true dev: false optional: true @@ -20629,6 +20678,7 @@ packages: /text-hex@1.0.0: resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==} + requiresBuild: true dev: false optional: true @@ -20712,6 +20762,7 @@ packages: /tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} + requiresBuild: true dependencies: os-tmpdir: 1.0.2 @@ -20801,6 +20852,7 @@ packages: /triple-beam@1.4.1: resolution: {integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==} engines: {node: '>= 14.0.0'} + requiresBuild: true dev: false optional: true @@ -21548,6 +21600,7 @@ packages: /universal-user-agent@6.0.0: resolution: {integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==} + requiresBuild: true dev: false optional: true @@ -21694,6 +21747,7 @@ packages: /utility-types@3.10.0: resolution: {integrity: sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg==} engines: {node: '>= 4'} + requiresBuild: true dev: false optional: true @@ -22430,6 +22484,7 @@ packages: /winston-transport@4.5.0: resolution: {integrity: sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q==} engines: {node: '>= 6.4.0'} + requiresBuild: true dependencies: logform: 2.5.1 readable-stream: 3.6.2 @@ -22440,6 +22495,7 @@ packages: /winston@3.10.0: resolution: {integrity: sha512-nT6SIDaE9B7ZRO0u3UvdrimG0HkB7dSTAgInQnNR2SOPJ4bvq5q79+pXLftKmP52lJGW15+H5MCK0nM9D3KB/g==} engines: {node: '>= 12.0.0'} + requiresBuild: true dependencies: '@colors/colors': 1.5.0 '@dabh/diagnostics': 2.0.3 From f8ebba729616eec0d2ab5168d2503aa0caa147d1 Mon Sep 17 00:00:00 2001 From: Mark McCulloh Date: Tue, 5 Sep 2023 10:52:17 -0400 Subject: [PATCH 44/48] chore: dependabot fix for vscode (#4081) Fixes https://github.com/winglang/wing/security/dependabot/130 *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- apps/vscode-wing/.projen/deps.json | 2 +- apps/vscode-wing/.projen/tasks.json | 10 +++++----- apps/vscode-wing/.projenrc.ts | 2 +- apps/vscode-wing/package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/vscode-wing/.projen/deps.json b/apps/vscode-wing/.projen/deps.json index 8a7d2e139eb..432892546f0 100644 --- a/apps/vscode-wing/.projen/deps.json +++ b/apps/vscode-wing/.projen/deps.json @@ -77,7 +77,7 @@ }, { "name": "node-fetch", - "version": "2", + "version": "^2.6.7", "type": "build" }, { diff --git a/apps/vscode-wing/.projen/tasks.json b/apps/vscode-wing/.projen/tasks.json index 38fc8882d7a..07e05df05de 100644 --- a/apps/vscode-wing/.projen/tasks.json +++ b/apps/vscode-wing/.projen/tasks.json @@ -165,19 +165,19 @@ "exec": "pnpm update npm-check-updates" }, { - "exec": "npm-check-updates --dep dev --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,node-fetch,winglang'" + "exec": "npm-check-updates --dep dev --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,winglang'" }, { - "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,node-fetch,winglang'" + "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,winglang'" }, { - "exec": "npm-check-updates --dep peer --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,node-fetch,winglang'" + "exec": "npm-check-updates --dep peer --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,winglang'" }, { - "exec": "npm-check-updates --dep prod --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,node-fetch,winglang'" + "exec": "npm-check-updates --dep prod --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,winglang'" }, { - "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,node-fetch,winglang'" + "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='@wingconsole/app,@wingconsole/server,winglang'" }, { "exec": "pnpm i --no-frozen-lockfile" diff --git a/apps/vscode-wing/.projenrc.ts b/apps/vscode-wing/.projenrc.ts index 153c2c3c3e8..f4628f85870 100644 --- a/apps/vscode-wing/.projenrc.ts +++ b/apps/vscode-wing/.projenrc.ts @@ -60,7 +60,7 @@ const project = new TypeScriptAppProject({ "@trpc/client", "ws", "open", - "node-fetch@2", + "node-fetch@^2.6.7", "@types/node", "@types/which", "@vscode/vsce", diff --git a/apps/vscode-wing/package.json b/apps/vscode-wing/package.json index 7fa9c5f635d..7bf7c31cd52 100644 --- a/apps/vscode-wing/package.json +++ b/apps/vscode-wing/package.json @@ -46,7 +46,7 @@ "eslint-import-resolver-typescript": "^3.6.0", "eslint-plugin-import": "^2.28.1", "eslint-plugin-prettier": "^4.2.1", - "node-fetch": "2", + "node-fetch": "^2.6.7", "npm-check-updates": "^16", "open": "^8.4.2", "prettier": "^2.8.8", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5403286a576..e8fa1a23539 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -229,7 +229,7 @@ importers: specifier: ^4.2.1 version: 4.2.1(eslint-config-prettier@8.10.0)(eslint@8.48.0)(prettier@2.8.8) node-fetch: - specifier: '2' + specifier: ^2.6.7 version: 2.7.0 npm-check-updates: specifier: ^16 @@ -12402,7 +12402,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.3.0-dev.20230904 + typescript: 5.3.0-dev.20230905 dev: true /dset@3.1.2: @@ -21443,8 +21443,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - /typescript@5.3.0-dev.20230904: - resolution: {integrity: sha512-07NPNxXTmtOd0G5DnbDHee7Yh7VT6R8HzBiBkzx/PsyDIiD2/a14pbmex5xiDRvoLyUNJvNG1S6p48f+Qk0FMQ==} + /typescript@5.3.0-dev.20230905: + resolution: {integrity: sha512-Nl9MoKWN0YYlCvQnw850L4ZgqdmqwVGCi9cAoQDw4PsqRGaWAi9HKizS9xu0q4qgKKsEKetWCZHT8dBtJTGaMg==} engines: {node: '>=14.17'} hasBin: true dev: true From bed23849d843560520c6ca9cfa5ecb74c8096d47 Mon Sep 17 00:00:00 2001 From: Mark McCulloh Date: Tue, 5 Sep 2023 12:04:28 -0400 Subject: [PATCH 45/48] chore(repo): ensure publish runs even when certain processes are skipped (#4085) Similar to https://github.com/winglang/wing/pull/4019, but I didn't realize the issue also applies to any jobs that also has dependencies whose dependencies are skipped. *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64e953bb668..dc1281e5388 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -342,7 +342,7 @@ jobs: publish: name: Publish - if: ${{ github.event_name == 'push' && github.repository == 'winglang/wing' && github.ref == 'refs/heads/main' }} + if: ${{ !cancelled() && needs.quality-gate.result == 'success' && github.event_name == 'push' && github.repository == 'winglang/wing' && github.ref == 'refs/heads/main' }} needs: - quality-gate - build From f1446e78183df1d12f864c3e514b24c1b00c0a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wiktor=20Zaj=C4=85c?= Date: Tue, 5 Sep 2023 21:12:26 +0200 Subject: [PATCH 46/48] feat(compiler): addition and subtraction assignment operators implementation (#4018) Fixes #4005 Implemented a `+=` and `-=` operators, as a new type of `StmtKind::Assignment`. - [Type Check](https://github.com/winglang/wing/compare/main...wzslr321:feature/compiler/add-and-sub-assignment-ops?expand=1#diff-fe246e49d57ca72d41851e8dacc3d2ccee194881769083dd8ca508058cff13b4R1829) allows only for numbers to be used on both sides of the operator. ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [x] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- docs/docs/03-language-reference.md | 8 ++++++ .../valid/expressions_binary_operators.w | 3 ++- examples/tests/valid/reassignment.w | 7 +++++ libs/tree-sitter-wing/grammar.js | 5 +++- .../test/corpus/statements/statements.txt | 19 +++++++++++++ libs/wingc/src/ast.rs | 8 ++++++ libs/wingc/src/closure_transform.rs | 7 ++--- libs/wingc/src/fold.rs | 3 ++- libs/wingc/src/jsify.rs | 26 ++++++++++++------ libs/wingc/src/parser.rs | 27 ++++++++++++++----- libs/wingc/src/type_check.rs | 11 ++++++-- .../wingc/src/type_check/class_fields_init.rs | 8 ++++-- libs/wingc/src/visit.rs | 6 ++++- .../valid/reassignment.w_compile_tf-aws.md | 5 ++++ 14 files changed, 118 insertions(+), 25 deletions(-) diff --git a/docs/docs/03-language-reference.md b/docs/docs/03-language-reference.md index 8b33020cb30..e4c77432f5d 100644 --- a/docs/docs/03-language-reference.md +++ b/docs/docs/03-language-reference.md @@ -657,6 +657,14 @@ for item in [1,2,3] { } ``` +To modify a numeric value, it is also possible to use `+=` and `-=` operators. +```TS +// wing +let var x = 0; +x += 5; // x == 5 +x -= 10; // x == -5 +``` + Re-assignment to class fields is allowed if field is marked with `var`. Examples in the class section below. diff --git a/examples/tests/valid/expressions_binary_operators.w b/examples/tests/valid/expressions_binary_operators.w index 6e328d25e63..fb231d3cc7d 100644 --- a/examples/tests/valid/expressions_binary_operators.w +++ b/examples/tests/valid/expressions_binary_operators.w @@ -15,4 +15,5 @@ assert(xyznf == -5); let xyznfj = 501.9 \ (-99.1 - 0.91); assert(xyznfj == -5); let xynfj = -501.9 \ (-99.1 - 0.91); -assert(xynfj == 5); \ No newline at end of file +assert(xynfj == 5); + diff --git a/examples/tests/valid/reassignment.w b/examples/tests/valid/reassignment.w index 4ad8c0fa94d..3fdf48a3ff4 100644 --- a/examples/tests/valid/reassignment.w +++ b/examples/tests/valid/reassignment.w @@ -4,6 +4,13 @@ assert(x == 5); x = x + 1; assert(x == 6); +let var z = 1; +z += 2; +assert(z == 3); + +z -= 1; +assert(z == 2); + class R { var f: num; f1: num; diff --git a/libs/tree-sitter-wing/grammar.js b/libs/tree-sitter-wing/grammar.js index eb0f96f0d4c..7ba31d51c26 100644 --- a/libs/tree-sitter-wing/grammar.js +++ b/libs/tree-sitter-wing/grammar.js @@ -152,14 +152,17 @@ module.exports = grammar({ throw_statement: ($) => seq("throw", optional(field("expression", $.expression)), $._semicolon), + assignment_operator: ($) => choice("=", "+=", "-="), + variable_assignment_statement: ($) => seq( field("name", alias($.reference, $.lvalue)), - "=", + field("operator", $.assignment_operator), field("value", $.expression), $._semicolon ), + expression_statement: ($) => seq($.expression, $._semicolon), reassignable: ($) => "var", diff --git a/libs/tree-sitter-wing/test/corpus/statements/statements.txt b/libs/tree-sitter-wing/test/corpus/statements/statements.txt index 43635bfb719..e78abdfb22e 100644 --- a/libs/tree-sitter-wing/test/corpus/statements/statements.txt +++ b/libs/tree-sitter-wing/test/corpus/statements/statements.txt @@ -72,6 +72,10 @@ Variable assignment let x: num = 1; x = 2; +let var z = 1; +z += 2; +z -= 1; + let var y = "hello"; -------------------------------------------------------------------------------- @@ -84,6 +88,21 @@ let var y = "hello"; (variable_assignment_statement name: (lvalue (reference_identifier)) + operator: (assignment_operator) + value: (number)) + (variable_definition_statement + reassignable: (reassignable) + name: (identifier) + value: (number)) + (variable_assignment_statement + name: (lvalue + (reference_identifier)) + operator: (assignment_operator) + value: (number)) + (variable_assignment_statement + name: (lvalue + (reference_identifier)) + operator: (assignment_operator) value: (number)) (variable_definition_statement reassignable: (reassignable) diff --git a/libs/wingc/src/ast.rs b/libs/wingc/src/ast.rs index 18ea51bc429..2242310087d 100644 --- a/libs/wingc/src/ast.rs +++ b/libs/wingc/src/ast.rs @@ -425,6 +425,13 @@ pub enum BringSource { WingFile(Symbol), } +#[derive(Debug)] +pub enum AssignmentKind { + Assign, + AssignIncr, + AssignDecr, +} + #[derive(Debug)] pub enum StmtKind { Bring { @@ -469,6 +476,7 @@ pub enum StmtKind { Throw(Expr), Expression(Expr), Assignment { + kind: AssignmentKind, variable: Reference, value: Expr, }, diff --git a/libs/wingc/src/closure_transform.rs b/libs/wingc/src/closure_transform.rs index 34b1516c220..90d5290c10b 100644 --- a/libs/wingc/src/closure_transform.rs +++ b/libs/wingc/src/closure_transform.rs @@ -2,9 +2,9 @@ use indexmap::IndexMap; use crate::{ ast::{ - ArgList, CalleeKind, Class, ClassField, Expr, ExprKind, FunctionBody, FunctionDefinition, FunctionParameter, - FunctionSignature, Literal, NewExpr, Phase, Reference, Scope, Stmt, StmtKind, Symbol, TypeAnnotation, - TypeAnnotationKind, UserDefinedType, + ArgList, AssignmentKind, CalleeKind, Class, ClassField, Expr, ExprKind, FunctionBody, FunctionDefinition, + FunctionParameter, FunctionSignature, Literal, NewExpr, Phase, Reference, Scope, Stmt, StmtKind, Symbol, + TypeAnnotation, TypeAnnotationKind, UserDefinedType, }, diagnostic::WingSpan, fold::{self, Fold}, @@ -213,6 +213,7 @@ impl Fold for ClosureTransformer { let class_init_body = vec![Stmt { idx: 0, kind: StmtKind::Assignment { + kind: AssignmentKind::Assign, variable: Reference::InstanceMember { object: Box::new(std_display_of_this), property: Symbol::new("hidden", WingSpan::for_file(file_id)), diff --git a/libs/wingc/src/fold.rs b/libs/wingc/src/fold.rs index 788370cac36..456bdc7b24c 100644 --- a/libs/wingc/src/fold.rs +++ b/libs/wingc/src/fold.rs @@ -158,7 +158,8 @@ where StmtKind::Return(value) => StmtKind::Return(value.map(|value| f.fold_expr(value))), StmtKind::Throw(value) => StmtKind::Throw(f.fold_expr(value)), StmtKind::Expression(expr) => StmtKind::Expression(f.fold_expr(expr)), - StmtKind::Assignment { variable, value } => StmtKind::Assignment { + StmtKind::Assignment { kind, variable, value } => StmtKind::Assignment { + kind, variable: f.fold_reference(variable), value: f.fold_expr(value), }, diff --git a/libs/wingc/src/jsify.rs b/libs/wingc/src/jsify.rs index eaef10f1df2..cc047f2e85c 100644 --- a/libs/wingc/src/jsify.rs +++ b/libs/wingc/src/jsify.rs @@ -10,9 +10,9 @@ use std::{borrow::Borrow, cell::RefCell, cmp::Ordering, vec}; use crate::{ ast::{ - ArgList, BinaryOperator, BringSource, CalleeKind, Class as AstClass, ElifLetBlock, Expr, ExprKind, FunctionBody, - FunctionDefinition, InterpolatedStringPart, Literal, NewExpr, Phase, Reference, Scope, Stmt, StmtKind, StructField, - Symbol, TypeAnnotationKind, UnaryOperator, UserDefinedType, + ArgList, AssignmentKind, BinaryOperator, BringSource, CalleeKind, Class as AstClass, ElifLetBlock, Expr, ExprKind, + FunctionBody, FunctionDefinition, InterpolatedStringPart, Literal, NewExpr, Phase, Reference, Scope, Stmt, + StmtKind, StructField, Symbol, TypeAnnotationKind, UnaryOperator, UserDefinedType, }, comp_ctx::{CompilationContext, CompilationPhase}, dbg_panic, debug, @@ -1012,11 +1012,21 @@ impl<'a> JSifier<'a> { code } StmtKind::Expression(e) => CodeMaker::one_line(format!("{};", self.jsify_expression(e, ctx))), - StmtKind::Assignment { variable, value } => CodeMaker::one_line(format!( - "{} = {};", - self.jsify_reference(variable, ctx), - self.jsify_expression(value, ctx) - )), + + StmtKind::Assignment { kind, variable, value } => { + let operator = match kind { + AssignmentKind::Assign => "=", + AssignmentKind::AssignIncr => "+=", + AssignmentKind::AssignDecr => "-=", + }; + + CodeMaker::one_line(format!( + "{} {} {};", + self.jsify_reference(variable, ctx), + operator, + self.jsify_expression(value, ctx) + )) + } StmtKind::Scope(scope) => { let mut code = CodeMaker::default(); if !scope.statements.is_empty() { diff --git a/libs/wingc/src/parser.rs b/libs/wingc/src/parser.rs index 10b34e97274..0602443fc0d 100644 --- a/libs/wingc/src/parser.rs +++ b/libs/wingc/src/parser.rs @@ -8,10 +8,10 @@ use tree_sitter::Node; use tree_sitter_traversal::{traverse, Order}; use crate::ast::{ - ArgList, BinaryOperator, BringSource, CalleeKind, CatchBlock, Class, ClassField, ElifBlock, ElifLetBlock, Expr, - ExprKind, FunctionBody, FunctionDefinition, FunctionParameter, FunctionSignature, Interface, InterpolatedString, - InterpolatedStringPart, Literal, NewExpr, Phase, Reference, Scope, Stmt, StmtKind, StructField, Symbol, - TypeAnnotation, TypeAnnotationKind, UnaryOperator, UserDefinedType, + ArgList, AssignmentKind, BinaryOperator, BringSource, CalleeKind, CatchBlock, Class, ClassField, ElifBlock, + ElifLetBlock, Expr, ExprKind, FunctionBody, FunctionDefinition, FunctionParameter, FunctionSignature, Interface, + InterpolatedString, InterpolatedStringPart, Literal, NewExpr, Phase, Reference, Scope, Stmt, StmtKind, StructField, + Symbol, TypeAnnotation, TypeAnnotationKind, UnaryOperator, UserDefinedType, }; use crate::comp_ctx::{CompilationContext, CompilationPhase}; use crate::diagnostic::{report_diagnostic, Diagnostic, DiagnosticResult, WingSpan}; @@ -438,8 +438,16 @@ impl<'s> Parser<'s> { "import_statement" => self.build_bring_statement(statement_node)?, "variable_definition_statement" => self.build_variable_def_statement(statement_node, phase)?, - "variable_assignment_statement" => self.build_assignment_statement(statement_node, phase)?, + "variable_assignment_statement" => { + let kind = match self.node_text(&statement_node.child_by_field_name("operator").unwrap()) { + "=" => AssignmentKind::Assign, + "+=" => AssignmentKind::AssignIncr, + "-=" => AssignmentKind::AssignDecr, + other => return self.report_unimplemented_grammar(other, "assignment operator", statement_node), + }; + self.build_assignment_statement(statement_node, phase, kind)? + } "expression_statement" => { StmtKind::Expression(self.build_expression(&statement_node.named_child(0).unwrap(), phase)?) } @@ -631,10 +639,17 @@ impl<'s> Parser<'s> { }) } - fn build_assignment_statement(&self, statement_node: &Node, phase: Phase) -> DiagnosticResult { + fn build_assignment_statement( + &self, + statement_node: &Node, + phase: Phase, + kind: AssignmentKind, + ) -> DiagnosticResult { let reference = self.build_reference(&statement_node.child_by_field_name("name").unwrap(), phase)?; + if let ExprKind::Reference(r) = reference.kind { Ok(StmtKind::Assignment { + kind: kind, variable: r, value: self.build_expression(&statement_node.child_by_field_name("value").unwrap(), phase)?, }) diff --git a/libs/wingc/src/type_check.rs b/libs/wingc/src/type_check.rs index e3052f3f921..26474f016e5 100644 --- a/libs/wingc/src/type_check.rs +++ b/libs/wingc/src/type_check.rs @@ -4,7 +4,9 @@ pub(crate) mod jsii_importer; pub mod lifts; pub mod symbol_env; -use crate::ast::{self, BringSource, CalleeKind, ClassField, ExprId, FunctionDefinition, NewExpr, TypeAnnotationKind}; +use crate::ast::{ + self, AssignmentKind, BringSource, CalleeKind, ClassField, ExprId, FunctionDefinition, NewExpr, TypeAnnotationKind, +}; use crate::ast::{ ArgList, BinaryOperator, Class as AstClass, Expr, ExprKind, FunctionBody, FunctionParameter as AstFunctionParameter, Interface as AstInterface, InterpolatedStringPart, Literal, Phase, Reference, Scope, Spanned, Stmt, StmtKind, Symbol, @@ -3131,7 +3133,7 @@ impl<'a> TypeChecker<'a> { StmtKind::Expression(e) => { self.type_check_exp(e, env); } - StmtKind::Assignment { variable, value } => { + StmtKind::Assignment { kind, variable, value } => { let (exp_type, _) = self.type_check_exp(value, env); // TODO: we need to verify that if this variable is defined in a parent environment (i.e. @@ -3145,6 +3147,11 @@ impl<'a> TypeChecker<'a> { self.spanned_error(stmt, "Variable cannot be reassigned from inflight".to_string()); } + if matches!(&kind, AssignmentKind::AssignIncr | AssignmentKind::AssignDecr) { + self.validate_type(exp_type, self.types.number(), value); + self.validate_type(var.type_, self.types.number(), variable); + } + self.validate_type(exp_type, var.type_, value); } StmtKind::Bring { source, identifier } => { diff --git a/libs/wingc/src/type_check/class_fields_init.rs b/libs/wingc/src/type_check/class_fields_init.rs index b98ff6c7ee1..3439974f82e 100644 --- a/libs/wingc/src/type_check/class_fields_init.rs +++ b/libs/wingc/src/type_check/class_fields_init.rs @@ -1,5 +1,5 @@ use crate::{ - ast::{Reference, Stmt, StmtKind, Symbol}, + ast::{AssignmentKind, Reference, Stmt, StmtKind, Symbol}, visit::{self, Visit}, }; @@ -20,7 +20,11 @@ impl VisitClassInit { impl Visit<'_> for VisitClassInit { fn visit_stmt(&mut self, node: &Stmt) { match &node.kind { - StmtKind::Assignment { variable, value: _ } => match variable { + StmtKind::Assignment { + kind: AssignmentKind::Assign, + variable, + value: _, + } => match variable { Reference::InstanceMember { property, object: _, diff --git a/libs/wingc/src/visit.rs b/libs/wingc/src/visit.rs index d10447d5a65..c27a6fc6ba5 100644 --- a/libs/wingc/src/visit.rs +++ b/libs/wingc/src/visit.rs @@ -170,7 +170,11 @@ where StmtKind::Expression(expr) => { v.visit_expr(&expr); } - StmtKind::Assignment { variable, value } => { + StmtKind::Assignment { + kind: _, + variable, + value, + } => { v.visit_reference(variable); v.visit_expr(value); } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/reassignment.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/reassignment.w_compile_tf-aws.md index 26d0408d65e..1c99cab3309 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/reassignment.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/reassignment.w_compile_tf-aws.md @@ -90,6 +90,11 @@ class $Root extends $stdlib.std.Resource { {((cond) => {if (!cond) throw new Error("assertion failed: x == 5")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(x,5)))}; x = (x + 1); {((cond) => {if (!cond) throw new Error("assertion failed: x == 6")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(x,6)))}; + let z = 1; + z += 2; + {((cond) => {if (!cond) throw new Error("assertion failed: z == 3")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(z,3)))}; + z -= 1; + {((cond) => {if (!cond) throw new Error("assertion failed: z == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(z,2)))}; const r = new R(this,"R"); (r.inc()); {((cond) => {if (!cond) throw new Error("assertion failed: r.f == 2")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(r.f,2)))}; From 52b44cae49e9274ecf79f3215ca6194909dcbb30 Mon Sep 17 00:00:00 2001 From: Tsuf Cohen <39455181+tsuf239@users.noreply.github.com> Date: Wed, 6 Sep 2023 11:06:55 +0300 Subject: [PATCH 47/48] feat(docs): add variadic params to jsii docgen (#4007) closes [#3781](https://github.com/winglang/wing/issues/3781) image ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [ ] Tests added (always) - [x] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .../src/docgen/transpile/transpile.ts | 5 +++++ apps/jsii-docgen/src/docgen/transpile/wing.ts | 10 +++++++++- .../__snapshots__/documentation.test.ts.snap | 16 ++++++++-------- .../view/__snapshots__/interface.test.ts.snap | 4 ++-- .../view/__snapshots__/markdown.test.ts.snap | 16 ++++++++-------- docs/docs/04-standard-library/01-cloud/queue.md | 2 +- .../04-standard-library/02-std/api-reference.md | 2 +- libs/wingsdk/.projenrc.ts | 2 +- 8 files changed, 35 insertions(+), 22 deletions(-) diff --git a/apps/jsii-docgen/src/docgen/transpile/transpile.ts b/apps/jsii-docgen/src/docgen/transpile/transpile.ts index e7bd685c294..efff36ae4e5 100644 --- a/apps/jsii-docgen/src/docgen/transpile/transpile.ts +++ b/apps/jsii-docgen/src/docgen/transpile/transpile.ts @@ -275,6 +275,11 @@ export interface TranspiledParameter { * supports that. */ readonly declaration: string; + + /** + * Is the parameter variadic + */ + readonly variadic?: boolean; } /** diff --git a/apps/jsii-docgen/src/docgen/transpile/wing.ts b/apps/jsii-docgen/src/docgen/transpile/wing.ts index 4d1b5e826c6..d95a4f2dbc1 100644 --- a/apps/jsii-docgen/src/docgen/transpile/wing.ts +++ b/apps/jsii-docgen/src/docgen/transpile/wing.ts @@ -174,6 +174,7 @@ export class WingTranspile extends transpile.TranspileBase { parentType: this.type(parameter.parentType), typeReference: typeRef, optional: parameter.optional, + variadic: parameter.spec.variadic, declaration: this.formatProperty(name, typeRef), }; } @@ -280,7 +281,14 @@ export class WingTranspile extends transpile.TranspileBase { if (tf === "Inflight") { tf = "~Inflight"; } - return `${transpiled.name}${transpiled.optional ? "?" : ""}: ${tf}`; + if (transpiled.variadic) { + tf = `Array<${tf}>`; + } + const name = transpiled.variadic + ? `...${transpiled.name}` + : transpiled.name; + + return `${name}${transpiled.optional ? "?" : ""}: ${tf}`; } private formatProperty( diff --git a/apps/jsii-docgen/test/docgen/view/__snapshots__/documentation.test.ts.snap b/apps/jsii-docgen/test/docgen/view/__snapshots__/documentation.test.ts.snap index cbef7336ede..26504ef1ef9 100644 --- a/apps/jsii-docgen/test/docgen/view/__snapshots__/documentation.test.ts.snap +++ b/apps/jsii-docgen/test/docgen/view/__snapshots__/documentation.test.ts.snap @@ -165,7 +165,7 @@ for details about allowed filter rules.", }, }, ], - "usage": "addEventNotification(event: EventType, dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void", + "usage": "addEventNotification(event: EventType, dest: IBucketNotificationDestination, ...filters: Array): void", }, Object { "displayName": "addObjectCreatedNotification", @@ -222,7 +222,7 @@ for details about allowed filter rules.", }, }, ], - "usage": "addObjectCreatedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void", + "usage": "addObjectCreatedNotification(dest: IBucketNotificationDestination, ...filters: Array): void", }, Object { "displayName": "addObjectRemovedNotification", @@ -279,7 +279,7 @@ for details about allowed filter rules.", }, }, ], - "usage": "addObjectRemovedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void", + "usage": "addObjectRemovedNotification(dest: IBucketNotificationDestination, ...filters: Array): void", }, Object { "displayName": "addToResourcePolicy", @@ -446,7 +446,7 @@ impossible to modify the policy of an existing bucket.", }, }, ], - "usage": "grantPublicAccess(allowedActions: str, keyPrefix?: str): Grant", + "usage": "grantPublicAccess(...allowedActions: Array, keyPrefix?: str): Grant", }, Object { "displayName": "grantPut", @@ -1600,7 +1600,7 @@ account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). ##### \`addEventNotification\` \`\`\`wing -addEventNotification(event: EventType, dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void +addEventNotification(event: EventType, dest: IBucketNotificationDestination, ...filters: Array): void \`\`\` Adds a bucket notification event destination. @@ -1647,7 +1647,7 @@ for details about allowed filter rules. ##### \`addObjectCreatedNotification\` \`\`\`wing -addObjectCreatedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void +addObjectCreatedNotification(dest: IBucketNotificationDestination, ...filters: Array): void \`\`\` Subscribes a destination to receive notifications when an object is created in the bucket. @@ -1674,7 +1674,7 @@ Filters (see onEvent). ##### \`addObjectRemovedNotification\` \`\`\`wing -addObjectRemovedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void +addObjectRemovedNotification(dest: IBucketNotificationDestination, ...filters: Array): void \`\`\` Subscribes a destination to receive notifications when an object is removed from the bucket. @@ -1767,7 +1767,7 @@ Restrict the permission to a certain key pattern (default '*'). ##### \`grantPublicAccess\` \`\`\`wing -grantPublicAccess(allowedActions: str, keyPrefix?: str): Grant +grantPublicAccess(...allowedActions: Array, keyPrefix?: str): Grant \`\`\` Allows unrestricted access to objects from this bucket. diff --git a/apps/jsii-docgen/test/docgen/view/__snapshots__/interface.test.ts.snap b/apps/jsii-docgen/test/docgen/view/__snapshots__/interface.test.ts.snap index 7a2cf8b6937..8792e6cd812 100644 --- a/apps/jsii-docgen/test/docgen/view/__snapshots__/interface.test.ts.snap +++ b/apps/jsii-docgen/test/docgen/view/__snapshots__/interface.test.ts.snap @@ -4886,7 +4886,7 @@ Object { }, }, ], - "usage": "grant(grantee: IGrantable, actions: str): Grant", + "usage": "grant(grantee: IGrantable, ...actions: Array): Grant", }, Object { "displayName": "grantPull", @@ -5312,7 +5312,7 @@ Add a policy statement to the repository's resource policy. ## \`grant\` \`\`\`wing -grant(grantee: IGrantable, actions: str): Grant +grant(grantee: IGrantable, ...actions: Array): Grant \`\`\` Grant the given principal identity permissions to perform the actions on this repository. diff --git a/apps/jsii-docgen/test/docgen/view/__snapshots__/markdown.test.ts.snap b/apps/jsii-docgen/test/docgen/view/__snapshots__/markdown.test.ts.snap index 75f47151b7c..6721cd97140 100644 --- a/apps/jsii-docgen/test/docgen/view/__snapshots__/markdown.test.ts.snap +++ b/apps/jsii-docgen/test/docgen/view/__snapshots__/markdown.test.ts.snap @@ -88,7 +88,7 @@ account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). ##### \`addEventNotification\` \`\`\`wing -addEventNotification(event: EventType, dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void +addEventNotification(event: EventType, dest: IBucketNotificationDestination, ...filters: Array): void \`\`\` Adds a bucket notification event destination. @@ -135,7 +135,7 @@ for details about allowed filter rules. ##### \`addObjectCreatedNotification\` \`\`\`wing -addObjectCreatedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void +addObjectCreatedNotification(dest: IBucketNotificationDestination, ...filters: Array): void \`\`\` Subscribes a destination to receive notifications when an object is created in the bucket. @@ -162,7 +162,7 @@ Filters (see onEvent). ##### \`addObjectRemovedNotification\` \`\`\`wing -addObjectRemovedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void +addObjectRemovedNotification(dest: IBucketNotificationDestination, ...filters: Array): void \`\`\` Subscribes a destination to receive notifications when an object is removed from the bucket. @@ -255,7 +255,7 @@ Restrict the permission to a certain key pattern (default '*'). ##### \`grantPublicAccess\` \`\`\`wing -grantPublicAccess(allowedActions: str, keyPrefix?: str): Grant +grantPublicAccess(...allowedActions: Array, keyPrefix?: str): Grant \`\`\` Allows unrestricted access to objects from this bucket. @@ -1061,7 +1061,7 @@ account for data recovery and cleanup later (\`RemovalPolicy.RETAIN\`). ##### \`addEventNotification\` \`\`\`wing -addEventNotification(event: EventType, dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void +addEventNotification(event: EventType, dest: IBucketNotificationDestination, ...filters: Array): void \`\`\` Adds a bucket notification event destination. @@ -1108,7 +1108,7 @@ for details about allowed filter rules. ##### \`addObjectCreatedNotification\` \`\`\`wing -addObjectCreatedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void +addObjectCreatedNotification(dest: IBucketNotificationDestination, ...filters: Array): void \`\`\` Subscribes a destination to receive notifications when an object is created in the bucket. @@ -1135,7 +1135,7 @@ Filters (see onEvent). ##### \`addObjectRemovedNotification\` \`\`\`wing -addObjectRemovedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void +addObjectRemovedNotification(dest: IBucketNotificationDestination, ...filters: Array): void \`\`\` Subscribes a destination to receive notifications when an object is removed from the bucket. @@ -1228,7 +1228,7 @@ Restrict the permission to a certain key pattern (default '*'). ##### \`grantPublicAccess\` \`\`\`wing -grantPublicAccess(allowedActions: str, keyPrefix?: str): Grant +grantPublicAccess(...allowedActions: Array, keyPrefix?: str): Grant \`\`\` Allows unrestricted access to objects from this bucket. diff --git a/docs/docs/04-standard-library/01-cloud/queue.md b/docs/docs/04-standard-library/01-cloud/queue.md index 487b88c507a..b872a267307 100644 --- a/docs/docs/04-standard-library/01-cloud/queue.md +++ b/docs/docs/04-standard-library/01-cloud/queue.md @@ -170,7 +170,7 @@ Purge all of the messages in the queue. ##### `push` ```wing -inflight push(messages: str): void +inflight push(...messages: Array): void ``` Push one or more messages to the queue. diff --git a/docs/docs/04-standard-library/02-std/api-reference.md b/docs/docs/04-standard-library/02-std/api-reference.md index 2b54032ac6f..9066dd31faf 100644 --- a/docs/docs/04-standard-library/02-std/api-reference.md +++ b/docs/docs/04-standard-library/02-std/api-reference.md @@ -1818,7 +1818,7 @@ metadata describing how one construct is related to another construct. ##### `addDependency` ```wing -addDependency(deps: IDependable): void +addDependency(...deps: Array): void ``` Add an ordering dependency on another construct. diff --git a/libs/wingsdk/.projenrc.ts b/libs/wingsdk/.projenrc.ts index 3be8fec3b93..a770ea47b14 100644 --- a/libs/wingsdk/.projenrc.ts +++ b/libs/wingsdk/.projenrc.ts @@ -6,7 +6,7 @@ const UNDOCUMENTED_CLOUD_FILES = ["index", "test-runner"]; const cloudFiles = readdirSync("./src/cloud"); const cloudResources: Set = new Set( - cloudFiles.map((filename) => filename.split(".").slice(0, -1).join(".")) + cloudFiles.map((filename) => filename.split(".")[0]) ); UNDOCUMENTED_CLOUD_FILES.forEach((file) => cloudResources.delete(file)); From 17208d58a9c4b986dc6f1bed2d1d659c8a297be3 Mon Sep 17 00:00:00 2001 From: Sebastian Korfmann Date: Wed, 6 Sep 2023 10:22:29 +0200 Subject: [PATCH 48/48] feat(sdk): cors support for api resource (#2904) Based on [this spec](https://docs.winglang.io/contributors/rfcs/2023-01-20-wingsdk-spec#api). Work in progress, only focusing simulator target right now. - [x] Simulator - [x] tf-aws - [x] tests - [x] something like `cors: true` to do some sort of catch all cors handling Open questions: - ~How to inject cors handlers in other targets than `sim`~ Outscoped: - [ ] individual route handling - [ ] limit auto added cors handler to valid routes (maybe not that important) - [ ] probably needs [max age](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age) header Fixes https://github.com/winglang/wing/issues/2289 ## Checklist - [ ] Title matches [Winglang's style guide](https://docs.winglang.io/contributors/pull_requests#how-are-pull-request-titles-formatted) - [ ] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Monada Contribution License](https://docs.winglang.io/terms-and-policies/contribution-license.html)*. --- .gitignore | 2 + docs/docs/04-standard-library/01-cloud/api.md | 171 +++ examples/tests/sdk_tests/api/cors.w | 22 + examples/tests/valid/api_cors_custom.w | 73 ++ examples/tests/valid/api_cors_default.w | 50 + examples/tests/valid/assertions.w | 27 + examples/tests/valid/website_with_api.w | 60 +- .../incomplete_inflight_namespace.snap | 8 +- .../completions/namespace_middle_dot.snap | 8 +- .../variable_type_annotation_namespace.snap | 8 +- libs/wingsdk/src/cloud/api.ts | 232 +++- .../src/shared-aws/api.onrequest.inflight.ts | 18 +- libs/wingsdk/src/target-sim/api.inflight.ts | 25 + libs/wingsdk/src/target-sim/api.ts | 8 +- .../src/target-sim/schema-resources.ts | 3 +- libs/wingsdk/src/target-tf-aws/api.cors.ts | 146 +++ libs/wingsdk/src/target-tf-aws/api.ts | 74 +- .../shared-aws/api.onrequest.inflight.test.ts | 43 + libs/wingsdk/test/target-sim/api.test.ts | 90 ++ .../__snapshots__/api.test.ts.snap | 451 +++++-- .../__snapshots__/tokens.test.ts.snap | 2 +- libs/wingsdk/test/target-tf-aws/api.test.ts | 17 + libs/wingsdk/vitest.config.ts | 1 - .../sdk_tests/api/404.w_compile_tf-aws.md | 2 +- .../sdk_tests/api/cors.w_compile_tf-aws.md | 394 ++++++ .../sdk_tests/api/cors.w_test_sim.md | 12 + .../sdk_tests/api/delete.w_compile_tf-aws.md | 2 +- .../sdk_tests/api/get.w_compile_tf-aws.md | 2 +- .../sdk_tests/api/options.w_compile_tf-aws.md | 2 +- .../sdk_tests/api/patch.w_compile_tf-aws.md | 2 +- .../api/path_vars.w_compile_tf-aws.md | 2 +- .../sdk_tests/api/post.w_compile_tf-aws.md | 2 +- .../sdk_tests/api/put.w_compile_tf-aws.md | 2 +- .../test_corpus/valid/api.w_compile_tf-aws.md | 4 +- .../valid/api_cors_custom.w_compile_tf-aws.md | 728 +++++++++++ .../valid/api_cors_custom.w_test_sim.md | 14 + .../api_cors_default.w_compile_tf-aws.md | 598 +++++++++ .../valid/api_cors_default.w_test_sim.md | 13 + .../valid/api_valid_path.w_compile_tf-aws.md | 2 +- .../valid/assertions.w_compile_tf-aws.md | 115 ++ .../valid/assertions.w_test_sim.md | 12 + .../valid/capture_tokens.w_compile_tf-aws.md | 4 +- .../valid/captures.w_compile_tf-aws.md | 2 +- .../valid/cors_api.w_compile_tf-aws.md | 1123 +++++++++++++++++ .../test_corpus/valid/cors_api.w_test_sim.md | 16 + .../valid/inference.w_compile_tf-aws.md | 2 +- .../valid/issue_2889.w_compile_tf-aws.md | 2 +- .../website_with_api.w_compile_tf-aws.md | 384 ++++-- .../valid/website_with_api.w_test_sim.md | 5 +- 49 files changed, 4713 insertions(+), 272 deletions(-) create mode 100644 examples/tests/sdk_tests/api/cors.w create mode 100644 examples/tests/valid/api_cors_custom.w create mode 100644 examples/tests/valid/api_cors_default.w create mode 100644 examples/tests/valid/assertions.w create mode 100644 libs/wingsdk/src/target-tf-aws/api.cors.ts create mode 100644 tools/hangar/__snapshots__/test_corpus/sdk_tests/api/cors.w_compile_tf-aws.md create mode 100644 tools/hangar/__snapshots__/test_corpus/sdk_tests/api/cors.w_test_sim.md create mode 100644 tools/hangar/__snapshots__/test_corpus/valid/api_cors_custom.w_compile_tf-aws.md create mode 100644 tools/hangar/__snapshots__/test_corpus/valid/api_cors_custom.w_test_sim.md create mode 100644 tools/hangar/__snapshots__/test_corpus/valid/api_cors_default.w_compile_tf-aws.md create mode 100644 tools/hangar/__snapshots__/test_corpus/valid/api_cors_default.w_test_sim.md create mode 100644 tools/hangar/__snapshots__/test_corpus/valid/assertions.w_compile_tf-aws.md create mode 100644 tools/hangar/__snapshots__/test_corpus/valid/assertions.w_test_sim.md create mode 100644 tools/hangar/__snapshots__/test_corpus/valid/cors_api.w_compile_tf-aws.md create mode 100644 tools/hangar/__snapshots__/test_corpus/valid/cors_api.w_test_sim.md diff --git a/.gitignore b/.gitignore index 233e1f9b1c1..c41313fee1d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ node_modules/ +.pnpm-store/ + # Terraform state files *.tfstate *.tfstate.* diff --git a/docs/docs/04-standard-library/01-cloud/api.md b/docs/docs/04-standard-library/01-cloud/api.md index 1df2c8d9fa0..1f3a0d77309 100644 --- a/docs/docs/04-standard-library/01-cloud/api.md +++ b/docs/docs/04-standard-library/01-cloud/api.md @@ -467,6 +467,123 @@ let ApiConnectProps = cloud.ApiConnectProps{ ... }; ``` +### ApiCorsOptions + +Cors Options for `Api`. + +#### Initializer + +```wing +bring cloud; + +let ApiCorsOptions = cloud.ApiCorsOptions{ ... }; +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| allowCredentials | bool | Whether to allow credentials. | +| allowHeaders | MutArray<str> | The list of allowed headers. | +| allowMethods | MutArray<HttpMethod> | The list of allowed methods. | +| allowOrigin | MutArray<str> | The list of allowed allowOrigin. | +| exposeHeaders | MutArray<str> | The list of exposed headers. | + +--- + +##### `allowCredentials`Optional + +```wing +allowCredentials: bool; +``` + +- *Type:* bool +- *Default:* false + +Whether to allow credentials. + +--- + +##### `allowHeaders`Optional + +```wing +allowHeaders: MutArray; +``` + +- *Type:* MutArray<str> +- *Default:* ["Content-Type", "Authorization"] + +The list of allowed headers. + +--- + +*Example* + +```wing +["Content-Type"] +``` + + +##### `allowMethods`Optional + +```wing +allowMethods: MutArray; +``` + +- *Type:* MutArray<HttpMethod> +- *Default:* [HttpMethod.GET, HttpMethod.POST, HttpMethod.PUT, HttpMethod.PATCH, HttpMethod.DELETE, HttpMethod.HEAD, HttpMethod.OPTIONS] + +The list of allowed methods. + +--- + +*Example* + +```wing +[HttpMethod.GET, HttpMethod.POST] +``` + + +##### `allowOrigin`Optional + +```wing +allowOrigin: MutArray; +``` + +- *Type:* MutArray<str> +- *Default:* ["*"] + +The list of allowed allowOrigin. + +--- + +*Example* + +```wing +["https://example.com"] +``` + + +##### `exposeHeaders`Optional + +```wing +exposeHeaders: MutArray; +``` + +- *Type:* MutArray<str> +- *Default:* [] + +The list of exposed headers. + +--- + +*Example* + +```wing +["Content-Type"] +``` + + ### ApiDeleteProps Options for Api put endpoint. @@ -557,6 +674,60 @@ bring cloud; let ApiProps = cloud.ApiProps{ ... }; ``` +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| cors | bool | Options for configuring the API's CORS behavior across all routes. | +| corsOptions | ApiCorsOptions | Options for configuring the API's CORS behavior across all routes. | + +--- + +##### `cors`Optional + +```wing +cors: bool; +``` + +- *Type:* bool +- *Default:* false, CORS configuration is disabled + +Options for configuring the API's CORS behavior across all routes. + +Options can also be overridden on a per-route basis. (not yet implemented) +When enabled this will add CORS headers with default options. +Can be customized by passing `corsOptions` + +--- + +*Example* + +```wing +true +``` + + +##### `corsOptions`Optional + +```wing +corsOptions: ApiCorsOptions; +``` + +- *Type:* ApiCorsOptions +- *Default:* Default CORS options are applied when `cors` is set to `true` allowOrigin: ["*"], allowMethods: [ HttpMethod.GET, HttpMethod.POST, HttpMethod.PUT, HttpMethod.DELETE, HttpMethod.HEAD, HttpMethod.OPTIONS, ], allowHeaders: ["Content-Type", "Authorization"], exposeHeaders: [], allowCredentials: false, + +Options for configuring the API's CORS behavior across all routes. + +Options can also be overridden on a per-route basis. (not yet implemented) + +--- + +*Example* + +```wing +{ allowOrigin: ["https://example.com"] } +``` + ### ApiPutProps diff --git a/examples/tests/sdk_tests/api/cors.w b/examples/tests/sdk_tests/api/cors.w new file mode 100644 index 00000000000..6a99966930a --- /dev/null +++ b/examples/tests/sdk_tests/api/cors.w @@ -0,0 +1,22 @@ +bring cloud; +bring http; +bring util; + +let api = new cloud.Api({ + cors: true +}); +let body = "ok!"; + +api.get("/path", inflight (req) => { + return { + status: 200, + body: body + }; +}); + +test "http.get and http.fetch can preform a call to an api" { + let url = api.url + "/path"; + let response = http.get(url); + + assert(response.headers.get("access-control-allow-origin") == "*"); +} diff --git a/examples/tests/valid/api_cors_custom.w b/examples/tests/valid/api_cors_custom.w new file mode 100644 index 00000000000..a19c8df50fa --- /dev/null +++ b/examples/tests/valid/api_cors_custom.w @@ -0,0 +1,73 @@ +bring cloud; +bring ex; +bring http; +bring "./assertions.w" as t; + +let api = new cloud.Api( + cors: true, + corsOptions: { + allowOrigin: ["winglang.io"], + allowMethods: [cloud.HttpMethod.GET, cloud.HttpMethod.POST, cloud.HttpMethod.OPTIONS], + allowHeaders: ["Content-Type", "Authorization", "X-Custom-Header"], + allowCredentials: true, + exposeHeaders: ["Content-Type"] + } +); + +api.get("/users", inflight (req) => { + return { + body: "hello world", + status: 200 + }; +}); + +test "GET /users has cors headers" { + let response = http.get(api.url + "/users"); + + let headers = response.headers; + t.Assert.equalNum(response.status, 200); + + // GET cors headers are set + t.Assert.equalStr(headers.get("access-control-allow-origin"), "winglang.io"); + t.Assert.equalStr(headers.get("access-control-allow-credentials"), "true"); + t.Assert.equalStr(headers.get("access-control-expose-headers"), "Content-Type"); + + // OPTIONS cors headers are not set + t.Assert.isNil(headers.get("access-control-allow-headers")); + t.Assert.isNil(headers.get("access-control-allow-methods")); +} + +test "OPTIONS /users has cors headers" { + let response = http.fetch(api.url + "/users", { + method: http.HttpMethod.OPTIONS + }); + + let headers = response.headers; + + t.Assert.equalNum(response.status, 204); + + // OPTIONS cors headers are set + t.Assert.equalStr(headers.get("access-control-allow-methods"), "GET,POST,OPTIONS"); + t.Assert.equalStr(headers.get("access-control-allow-headers"), "Content-Type,Authorization,X-Custom-Header"); + t.Assert.equalStr(headers.get("access-control-allow-origin"), "winglang.io"); + + // Other cors headers are not set + t.Assert.isNil(headers.get("access-control-expose-headers")); + t.Assert.isNil(headers.get("access-control-allow-credentials")); +} + +test "OPTIONS /users responds with proper headers for requested" { + let response = http.fetch(api.url + "/users", { + method: http.HttpMethod.OPTIONS, + headers: { + "Access-Control-Request-Method": "PUT", + "Access-Control-Request-Headers": "Content-Type,Authorization,X-Custom-Foo", + } + }); + + let headers = response.headers; + t.Assert.equalNum(response.status, 204); + t.Assert.equalStr(headers.get("access-control-allow-methods"), "GET,POST,OPTIONS"); + t.Assert.equalStr(headers.get("access-control-allow-headers"), "Content-Type,Authorization,X-Custom-Header"); + t.Assert.equalStr(headers.get("access-control-allow-origin"), "winglang.io"); +} \ No newline at end of file diff --git a/examples/tests/valid/api_cors_default.w b/examples/tests/valid/api_cors_default.w new file mode 100644 index 00000000000..96c7a2af5f9 --- /dev/null +++ b/examples/tests/valid/api_cors_default.w @@ -0,0 +1,50 @@ +bring cloud; +bring ex; +bring http; +bring "./assertions.w" as t; + +let apiDefaultCors = new cloud.Api( + cors: true +); + +apiDefaultCors.get("/users", inflight (req) => { + return { + body: "hello world", + status: 200 + }; +}); + +test "GET /users has default cors headers" { + let response = http.get(apiDefaultCors.url + "/users"); + + let headers = response.headers; + t.Assert.equalNum(response.status, 200); + + // GET cors headers are set + t.Assert.equalStr(headers.get("access-control-allow-origin"), "*"); + t.Assert.equalStr(headers.get("access-control-allow-credentials"), "false"); + t.Assert.equalStr(headers.get("access-control-expose-headers"), ""); + + // OPTIONS headers are not set + t.Assert.isNil(headers.get("access-control-allow-headers")); + t.Assert.isNil(headers.get("access-control-allow-methods")); +} + +test "OPTIONS /users has default cors headers" { + let response = http.fetch(apiDefaultCors.url + "/users", { + method: http.HttpMethod.OPTIONS + }); + + let headers = response.headers; + t.Assert.equalNum(response.status, 204); + + // OPTIONS cors headers are set + t.Assert.equalStr(headers.get("access-control-allow-headers"), "Content-Type,Authorization,X-Requested-With"); + t.Assert.equalStr(headers.get("access-control-allow-methods"), "GET,POST,PUT,DELETE,HEAD,OPTIONS"); + t.Assert.equalStr(headers.get("access-control-allow-origin"), "*"); + + // Other headers are not set + t.Assert.isNil(headers.get("access-control-allow-credentials")); + t.Assert.isNil(headers.get("access-control-expose-headers")); +} + diff --git a/examples/tests/valid/assertions.w b/examples/tests/valid/assertions.w new file mode 100644 index 00000000000..d406d818bee --- /dev/null +++ b/examples/tests/valid/assertions.w @@ -0,0 +1,27 @@ +inflight class Assert { + static equalStr(a: str, b: str): bool { + try { + assert(a == b); + } catch e { + throw("expected: ${b} got: ${a}"); + } + } + + static isNil(a: str?): bool { + try { + assert(a == nil); + } catch e { + log(e); + throw("expected '${a}' to be nil"); + } + } + + static equalNum(a: num, b: num): bool{ + try { + assert(a == b); + } catch e { + log(e); + throw("expected: ${b} got: ${a}"); + } + } +} \ No newline at end of file diff --git a/examples/tests/valid/website_with_api.w b/examples/tests/valid/website_with_api.w index 1339840c09a..2735cabe09c 100644 --- a/examples/tests/valid/website_with_api.w +++ b/examples/tests/valid/website_with_api.w @@ -1,8 +1,19 @@ bring cloud; bring ex; +bring http; +bring "./assertions.w" as t; //needs to be written before the website (so the website will be able to use it's url on sim env) -let api = new cloud.Api(); +let api = new cloud.Api( + cors: true, + corsOptions: cloud.ApiCorsOptions { + allowOrigin: ["*"], + allowMethods: [cloud.HttpMethod.GET, cloud.HttpMethod.POST, cloud.HttpMethod.OPTIONS], + allowHeaders: ["Content-Type"], + allowCredentials: false, + exposeHeaders: ["Content-Type"] + } +); let website = new cloud.Website(path: "./website_with_api"); @@ -16,7 +27,6 @@ let usersTable = new ex.Table( } ); - let getHandler = inflight (req: cloud.ApiRequest): cloud.ApiResponse => { return cloud.ApiResponse { body: Json.stringify({ users: usersTable.list() }), @@ -39,20 +49,40 @@ let postHandler = inflight (req: cloud.ApiRequest): cloud.ApiResponse => { }; }; - // responsible for the CORS - https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors.html -let optionsHandler = inflight(req: cloud.ApiRequest): cloud.ApiResponse => { - return cloud.ApiResponse { - headers: { - "Access-Control-Allow-Headers" => "Content-Type", - "Access-Control-Allow-Origin" => "*", - "Access-Control-Allow-Methods" => "OPTIONS,POST,GET" - }, - status: 204 - }; -}; - api.get("/users", getHandler); api.post("/users", postHandler); -api.options("/users", optionsHandler); website.addJson("config.json", { apiUrl: api.url }); + +test "GET /users" { + let response = http.fetch(api.url + "/users", { + method: http.HttpMethod.GET, + headers: { + "Content-Type": "text/json" + } + }); + +let headers = response.headers; + t.Assert.equalNum(response.status, 200); + + t.Assert.equalStr(headers.get("access-control-allow-origin"), "*"); + t.Assert.equalStr(headers.get("access-control-expose-headers"), "Content-Type"); + t.Assert.equalStr(headers.get("access-control-allow-credentials"), "false"); + + t.Assert.isNil(headers.get("access-control-allow-headers")); + t.Assert.isNil(headers.get("access-control-allow-methods")); +} + +test "OPTIONS /users" { + let response = http.fetch(api.url + "/users", { + method: http.HttpMethod.OPTIONS, + headers: { + "Content-Type": "text/json" + } + }); + + let headers = response.headers; + t.Assert.equalNum(response.status, 204); + t.Assert.equalStr(headers.get("access-control-allow-methods"), "GET,POST,OPTIONS"); + t.Assert.equalStr(headers.get("access-control-allow-headers"), "Content-Type"); +} \ No newline at end of file diff --git a/libs/wingc/src/lsp/snapshots/completions/incomplete_inflight_namespace.snap b/libs/wingc/src/lsp/snapshots/completions/incomplete_inflight_namespace.snap index e2e85c6bb64..bf598d3deb6 100644 --- a/libs/wingc/src/lsp/snapshots/completions/incomplete_inflight_namespace.snap +++ b/libs/wingc/src/lsp/snapshots/completions/incomplete_inflight_namespace.snap @@ -73,6 +73,12 @@ source: libs/wingc/src/lsp/completions.rs kind: markdown value: "```wing\nstruct ApiConnectProps\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiConnectProps +- label: ApiCorsOptions + kind: 22 + documentation: + kind: markdown + value: "```wing\nstruct ApiCorsOptions\n```\n---\nCors Options for `Api`.\n### Fields\n- `allowCredentials?` — Whether to allow credentials.\n- `allowHeaders?` — The list of allowed headers.\n- `allowMethods?` — The list of allowed methods.\n- `allowOrigin?` — The list of allowed allowOrigin.\n- `exposeHeaders?` — The list of exposed headers." + sortText: hh|ApiCorsOptions - label: ApiDeleteProps kind: 22 documentation: @@ -113,7 +119,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiProps\n```\n---\nOptions for `Api`." + value: "```wing\nstruct ApiProps\n```\n---\nOptions for `Api`.\n### Fields\n- `cors?` — Options for configuring the API's CORS behavior across all routes.\n- `corsOptions?` — Options for configuring the API's CORS behavior across all routes." sortText: hh|ApiProps - label: ApiPutProps kind: 22 diff --git a/libs/wingc/src/lsp/snapshots/completions/namespace_middle_dot.snap b/libs/wingc/src/lsp/snapshots/completions/namespace_middle_dot.snap index e2e85c6bb64..bf598d3deb6 100644 --- a/libs/wingc/src/lsp/snapshots/completions/namespace_middle_dot.snap +++ b/libs/wingc/src/lsp/snapshots/completions/namespace_middle_dot.snap @@ -73,6 +73,12 @@ source: libs/wingc/src/lsp/completions.rs kind: markdown value: "```wing\nstruct ApiConnectProps\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiConnectProps +- label: ApiCorsOptions + kind: 22 + documentation: + kind: markdown + value: "```wing\nstruct ApiCorsOptions\n```\n---\nCors Options for `Api`.\n### Fields\n- `allowCredentials?` — Whether to allow credentials.\n- `allowHeaders?` — The list of allowed headers.\n- `allowMethods?` — The list of allowed methods.\n- `allowOrigin?` — The list of allowed allowOrigin.\n- `exposeHeaders?` — The list of exposed headers." + sortText: hh|ApiCorsOptions - label: ApiDeleteProps kind: 22 documentation: @@ -113,7 +119,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiProps\n```\n---\nOptions for `Api`." + value: "```wing\nstruct ApiProps\n```\n---\nOptions for `Api`.\n### Fields\n- `cors?` — Options for configuring the API's CORS behavior across all routes.\n- `corsOptions?` — Options for configuring the API's CORS behavior across all routes." sortText: hh|ApiProps - label: ApiPutProps kind: 22 diff --git a/libs/wingc/src/lsp/snapshots/completions/variable_type_annotation_namespace.snap b/libs/wingc/src/lsp/snapshots/completions/variable_type_annotation_namespace.snap index e2e85c6bb64..bf598d3deb6 100644 --- a/libs/wingc/src/lsp/snapshots/completions/variable_type_annotation_namespace.snap +++ b/libs/wingc/src/lsp/snapshots/completions/variable_type_annotation_namespace.snap @@ -73,6 +73,12 @@ source: libs/wingc/src/lsp/completions.rs kind: markdown value: "```wing\nstruct ApiConnectProps\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiConnectProps +- label: ApiCorsOptions + kind: 22 + documentation: + kind: markdown + value: "```wing\nstruct ApiCorsOptions\n```\n---\nCors Options for `Api`.\n### Fields\n- `allowCredentials?` — Whether to allow credentials.\n- `allowHeaders?` — The list of allowed headers.\n- `allowMethods?` — The list of allowed methods.\n- `allowOrigin?` — The list of allowed allowOrigin.\n- `exposeHeaders?` — The list of exposed headers." + sortText: hh|ApiCorsOptions - label: ApiDeleteProps kind: 22 documentation: @@ -113,7 +119,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiProps\n```\n---\nOptions for `Api`." + value: "```wing\nstruct ApiProps\n```\n---\nOptions for `Api`.\n### Fields\n- `cors?` — Options for configuring the API's CORS behavior across all routes.\n- `corsOptions?` — Options for configuring the API's CORS behavior across all routes." sortText: hh|ApiProps - label: ApiPutProps kind: 22 diff --git a/libs/wingsdk/src/cloud/api.ts b/libs/wingsdk/src/cloud/api.ts index f839f51f7a7..bdc8f12e797 100644 --- a/libs/wingsdk/src/cloud/api.ts +++ b/libs/wingsdk/src/cloud/api.ts @@ -9,11 +9,82 @@ import { IResource, Node, Resource } from "../std"; export const API_FQN = fqnForType("cloud.Api"); +/** + * Cors Options for `Api`. + */ +export interface ApiCorsOptions { + /** + * The list of allowed allowOrigin. + * @example ["https://example.com"] + * @default - ["*"] + */ + readonly allowOrigin?: Array; + + /** + * The list of allowed methods. + * @example [HttpMethod.GET, HttpMethod.POST] + * @default - [HttpMethod.GET, HttpMethod.POST, HttpMethod.PUT, HttpMethod.PATCH, HttpMethod.DELETE, HttpMethod.HEAD, HttpMethod.OPTIONS] + */ + readonly allowMethods?: Array; + + /** + * The list of allowed headers. + * @example ["Content-Type"] + * @default - ["Content-Type", "Authorization"] + */ + readonly allowHeaders?: Array; + + /** + * The list of exposed headers. + * @example ["Content-Type"] + * @default - [] + */ + readonly exposeHeaders?: Array; + + /** + * Whether to allow credentials. + * @default - false + */ + readonly allowCredentials?: boolean; +} + /** * Options for `Api`. */ -export interface ApiProps {} +export interface ApiProps { + /** + * Options for configuring the API's CORS behavior across all routes. + * Options can also be overridden on a per-route basis. (not yet implemented) + * When enabled this will add CORS headers with default options. + * Can be customized by passing `corsOptions` + * @example true + * @default - false, CORS configuration is disabled + */ + readonly cors?: boolean; + + /** + * Options for configuring the API's CORS behavior across all routes. + * Options can also be overridden on a per-route basis. (not yet implemented) + * + * @example { allowOrigin: ["https://example.com"] } + * @default - Default CORS options are applied when `cors` is set to `true` + * allowOrigin: ["*"], + * allowMethods: [ + * HttpMethod.GET, + * HttpMethod.POST, + * HttpMethod.PUT, + * HttpMethod.DELETE, + * HttpMethod.HEAD, + * HttpMethod.OPTIONS, + * ], + * allowHeaders: ["Content-Type", "Authorization"], + * exposeHeaders: [], + * allowCredentials: false, + * + */ + readonly corsOptions?: ApiCorsOptions; +} /** * The OpenAPI spec. */ @@ -26,6 +97,65 @@ export type OpenApiSpec = any; * */ export type OpenApiSpecExtension = any; +/** + * The OpenAPI spec for CORS headers. + * */ +export type OpenApiCorsHeaders = Record; + +/** + * Type definition for default CORS headers. + */ +type CorsDefaultResponseHeaders = { + /** + * Specifies the origin that is allowed to access the resource. + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin + */ + "Access-Control-Allow-Origin": string; + + /** + * Lists the headers that the client can access. + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers + */ + "Access-Control-Expose-Headers": string; + + /** + * Indicates whether the response to the request can + * be exposed when the credentials flag is true. + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials + */ + "Access-Control-Allow-Credentials": string; +}; + +/** + * Type definition for CORS option headers. + */ +type CorsOptionsResponseHeaders = { + /** + * Specifies the origin that is allowed to access the resource. + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin + */ + "Access-Control-Allow-Origin": string; + + /** + * Specifies the headers that are allowed in a request. + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers + */ + "Access-Control-Allow-Headers": string; + + /** + * Specifies the methods that are allowed in a request. + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods + */ + "Access-Control-Allow-Methods": string; +}; + +/** + * Type definition for CORS headers which includes default and options headers. + */ +export type CorsHeaders = { + defaultResponse: CorsDefaultResponseHeaders; // Default CORS headers for all requests. + optionsResponse: CorsOptionsResponseHeaders; // CORS option headers for OPTIONS requests. +}; /** * Functionality shared between all `Api` implementations. * @inflight `@winglang/sdk.cloud.IApiClient` @@ -55,11 +185,32 @@ export abstract class Api extends Resource { paths: {}, }; + private corsDefaultValues: ApiCorsOptions = { + allowOrigin: ["*"], + allowMethods: [ + HttpMethod.GET, + HttpMethod.POST, + HttpMethod.PUT, + HttpMethod.DELETE, + HttpMethod.HEAD, + HttpMethod.OPTIONS, + ], + allowHeaders: ["Content-Type", "Authorization", "X-Requested-With"], + exposeHeaders: [], + allowCredentials: false, + }; + + /** + * CORS options for api + */ + protected corsOptions?: ApiCorsOptions; + constructor(scope: Construct, id: string, props: ApiProps = {}) { super(scope, id); props; + this.corsOptions = props.cors ? this._cors(props.corsOptions) : undefined; Node.of(this).title = "Api"; Node.of(this).description = "A REST API endpoint"; } @@ -183,6 +334,78 @@ export abstract class Api extends Resource { } } + /** + * Returns CORS configuration. If props are provided, they will have precedence over defaults. + * @param props + * @returns ApiCorsOptions + * @internal + */ + protected _cors(props?: ApiCorsOptions): ApiCorsOptions { + return { + ...this.corsDefaultValues, + ...props, + }; + } + + /** + * Generates the OpenAPI schema for CORS headers based on the provided CORS options. + * @param corsOptions The CORS options to generate the schema from. + * @returns An object representing the OpenAPI schema for CORS headers. + */ + private _corsOpenApiSchema(corsOptions?: ApiCorsOptions): OpenApiCorsHeaders { + const corsHeaders: OpenApiCorsHeaders = {}; + if (corsOptions) { + const corsHeaderSchema = { + schema: { + type: "string", + }, + }; + corsHeaders["Access-Control-Allow-Origin"] = corsHeaderSchema; + corsHeaders["Access-Control-Allow-Methods"] = corsHeaderSchema; + corsHeaders["Access-Control-Allow-Headers"] = corsHeaderSchema; + } + return corsHeaders; + } + + /** + * Generates an object containing default CORS response headers and OPTIONS response headers. + * @param corsOptions The CORS options to generate the headers from. + * @returns An object containing default CORS response headers and OPTIONS response headers. + * @internal + */ + protected _generateCorsHeaders( + corsOptions?: ApiCorsOptions + ): CorsHeaders | undefined { + if (corsOptions == undefined) { + return; + } + + const { + allowOrigin = [], + allowHeaders = [], + allowMethods = [], + exposeHeaders = [], + allowCredentials = false, + } = corsOptions; + + const defaultHeaders: CorsDefaultResponseHeaders = { + "Access-Control-Allow-Origin": allowOrigin.join(",") || "", + "Access-Control-Expose-Headers": exposeHeaders.join(",") || "", + "Access-Control-Allow-Credentials": allowCredentials ? "true" : "false", + }; + + const optionsHeaders: CorsOptionsResponseHeaders = { + "Access-Control-Allow-Origin": allowOrigin.join(",") || "", + "Access-Control-Allow-Headers": allowHeaders.join(",") || "", + "Access-Control-Allow-Methods": allowMethods.join(",") || "", + }; + + return { + defaultResponse: defaultHeaders, + optionsResponse: optionsHeaders, + }; + } + /** * Add a route to the api spec. * @param path The path to add. @@ -194,7 +417,8 @@ export abstract class Api extends Resource { public _addToSpec( path: string, method: string, - apiSpecExtension: OpenApiSpecExtension + apiSpecExtension: OpenApiSpecExtension, + corsOptions?: ApiCorsOptions ) { if (this.apiSpec.paths[path]?.[method.toLowerCase()]) { throw new Error( @@ -219,6 +443,7 @@ export abstract class Api extends Resource { }); }); } + const corsOpenApiSchema = this._corsOpenApiSchema(corsOptions); const methodSpec = { [method.toLowerCase()]: { operationId: operationId, @@ -226,6 +451,9 @@ export abstract class Api extends Resource { "200": { description: "200 response", content: {}, + ...(Object.keys(corsOpenApiSchema).length > 0 + ? { headers: corsOpenApiSchema } + : {}), }, }, parameters: pathParameters, diff --git a/libs/wingsdk/src/shared-aws/api.onrequest.inflight.ts b/libs/wingsdk/src/shared-aws/api.onrequest.inflight.ts index ca24488382b..3e42f414d23 100644 --- a/libs/wingsdk/src/shared-aws/api.onrequest.inflight.ts +++ b/libs/wingsdk/src/shared-aws/api.onrequest.inflight.ts @@ -9,8 +9,18 @@ import { export class ApiOnRequestHandlerClient { private readonly handler: IApiEndpointHandlerClient; - constructor({ handler }: { handler: IApiEndpointHandlerClient }) { + private readonly corsHeaders?: Record; + constructor({ + handler, + args, + }: { + handler: IApiEndpointHandlerClient; + args?: { + corsHeaders?: Record; + }; + }) { this.handler = handler; + this.corsHeaders = args?.corsHeaders; } public async handle( request: APIGatewayProxyEvent @@ -18,7 +28,7 @@ export class ApiOnRequestHandlerClient { const apiRequest: ApiRequest = mapApigatewayEventToCloudApiRequest(request); const apiResponse: ApiResponse = await this.handler.handle(apiRequest); const apiGatewayResponse: APIGatewayProxyResult = - mapCloudApiResponseToApigatewayResponse(apiResponse); + mapCloudApiResponseToApigatewayResponse(apiResponse, this.corsHeaders); return apiGatewayResponse; } } @@ -29,13 +39,15 @@ export class ApiOnRequestHandlerClient { * @returns API Gateway response */ function mapCloudApiResponseToApigatewayResponse( - resp: ApiResponse + resp: ApiResponse, + corsHeaders?: Record ): APIGatewayProxyResult { return { statusCode: resp.status, body: resp.body ?? "", headers: { "Content-Type": "application/json", + ...corsHeaders, ...resp.headers, }, }; diff --git a/libs/wingsdk/src/target-sim/api.inflight.ts b/libs/wingsdk/src/target-sim/api.inflight.ts index 7f805c44bb8..3c2b9050f44 100644 --- a/libs/wingsdk/src/target-sim/api.inflight.ts +++ b/libs/wingsdk/src/target-sim/api.inflight.ts @@ -38,6 +38,7 @@ export class Api props; this.routes = []; this.context = context; + const { corsHeaders } = props; // Set up an express server that handles the routes. this.app = express(); @@ -46,6 +47,30 @@ export class Api // matching the limit to aws api gateway's payload size limit: // https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html this.app.use(express.text({ limit: "10mb", type: "*/*" })); + + // Set up CORS headers for options requests. + if (corsHeaders) { + this.app.use((req, res, next) => { + const method = + req.method && req.method.toUpperCase && req.method.toUpperCase(); + + if (method === "OPTIONS") { + for (const [key, value] of Object.entries( + corsHeaders.optionsResponse + )) { + res.setHeader(key, value); + } + res.status(204).send(); + } else { + for (const [key, value] of Object.entries( + corsHeaders.defaultResponse + )) { + res.setHeader(key, value); + } + next(); + } + }); + } } public async addEventSubscription( diff --git a/libs/wingsdk/src/target-sim/api.ts b/libs/wingsdk/src/target-sim/api.ts index 63c5a42d937..96bbb91287e 100644 --- a/libs/wingsdk/src/target-sim/api.ts +++ b/libs/wingsdk/src/target-sim/api.ts @@ -1,3 +1,4 @@ +import { Construct } from "constructs"; import { EventMapping } from "./event-mapping"; import { Function } from "./function"; import { ISimulatorResource } from "./resource"; @@ -16,6 +17,10 @@ import { BaseResourceSchema } from "../testing/simulator"; export class Api extends cloud.Api implements ISimulatorResource { private eventMappings: { [key: string]: EventMapping } = {}; + constructor(scope: Construct, id: string, props: cloud.ApiProps = {}) { + super(scope, id, props); + } + public get url(): string { return simulatorAttrToken(this, "url"); } @@ -74,7 +79,7 @@ export class Api extends cloud.Api implements ISimulatorResource { ): void { this._validatePath(path); - this._addToSpec(path, method, undefined); + this._addToSpec(path, method, undefined, this.corsOptions); const fn = this.createOrGetFunction(inflight, props, path, method); Node.of(this).addConnection({ @@ -202,6 +207,7 @@ export class Api extends cloud.Api implements ISimulatorResource { path: this.node.path, props: { openApiSpec: this._getApiSpec(), + corsHeaders: this._generateCorsHeaders(this.corsOptions), }, attrs: {} as any, }; diff --git a/libs/wingsdk/src/target-sim/schema-resources.ts b/libs/wingsdk/src/target-sim/schema-resources.ts index c660c860a9e..bd4f5a8e57f 100644 --- a/libs/wingsdk/src/target-sim/schema-resources.ts +++ b/libs/wingsdk/src/target-sim/schema-resources.ts @@ -1,4 +1,4 @@ -import { HttpMethod, OpenApiSpec } from "../cloud"; +import { CorsHeaders, HttpMethod, OpenApiSpec } from "../cloud"; import { ColumnType } from "../ex"; import { Json } from "../std"; import { @@ -31,6 +31,7 @@ export interface ApiSchema extends BaseResourceSchema { readonly type: typeof API_TYPE; readonly props: { openApiSpec: OpenApiSpec; + corsHeaders?: CorsHeaders; }; readonly attrs: ApiAttributes & BaseResourceAttributes; } diff --git a/libs/wingsdk/src/target-tf-aws/api.cors.ts b/libs/wingsdk/src/target-tf-aws/api.cors.ts new file mode 100644 index 00000000000..e5a0fdad487 --- /dev/null +++ b/libs/wingsdk/src/target-tf-aws/api.cors.ts @@ -0,0 +1,146 @@ +import * as cloud from "../cloud"; + +/** + * DEFAULT_RESPONSE is a constant that defines the default response when a request occurs. + * It is used to handle all requests that do not match any defined routes in the API Gateway. + * The response is a mock integration type, which means it returns a mocked response without + * forwarding the request to any backend. The response status code is set to 200 for OPTIONS + * and 404 for any other method. The Content-Type header is set to 'application/json'. + * @internal + */ +export const API_CORS_DEFAULT_RESPONSE = ( + corsOptions?: cloud.ApiCorsOptions +) => { + if (corsOptions) { + return { + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + produces: ["application/json"], + "x-amazon-apigateway-integration": { + type: "mock", + requestTemplates: { + "application/json": ` + #if ($context.httpMethod == "OPTIONS") + {"statusCode": 204} + #else + {"statusCode": 404} + #end + `, + }, + passthroughBehavior: "never", + responses: { + default: { + statusCode: "404", + responseParameters: { + "method.response.header.Content-Type": "'application/json'", + }, + responseTemplates: { + "application/json": + '{"statusCode": 404, "message": "Error: Resource not found"}', + }, + }, + "204": { + statusCode: "204", + responseParameters: { + "method.response.header.Content-Type": "'application/json'", + "method.response.header.Access-Control-Allow-Origin": `'${corsOptions.allowOrigin}'`, + "method.response.header.Access-Control-Allow-Methods": `'${corsOptions.allowMethods}'`, + "method.response.header.Access-Control-Allow-Headers": `'${corsOptions.allowHeaders}'`, + }, + responseTemplates: { + "application/json": "{}", + }, + }, + "404": { + statusCode: "404", + responseParameters: { + "method.response.header.Content-Type": "'application/json'", + }, + responseTemplates: { + "application/json": + '{"statusCode": 404, "message": "Error: Resource not found"}', + }, + }, + }, + }, + responses: { + 204: { + description: "204 response", + headers: { + "Content-Type": { + type: "string", + }, + "Access-Control-Allow-Origin": { + type: "string", + }, + "Access-Control-Allow-Methods": { + type: "string", + }, + "Access-Control-Allow-Headers": { + type: "string", + }, + }, + }, + 404: { + description: "404 response", + headers: { + "Content-Type": { + type: "string", + }, + }, + }, + }, + }, + }, + }; + } else { + return { + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + produces: ["application/json"], + "x-amazon-apigateway-integration": { + type: "mock", + requestTemplates: { + "application/json": ` + {"statusCode": 404} + `, + }, + passthroughBehavior: "never", + responses: { + default: { + statusCode: "404", + responseParameters: { + "method.response.header.Content-Type": "'application/json'", + }, + responseTemplates: { + "application/json": + '{"statusCode": 404, "message": "Error: Resource not found"}', + }, + }, + "404": { + statusCode: "404", + responseParameters: { + "method.response.header.Content-Type": "'application/json'", + }, + responseTemplates: { + "application/json": + '{"statusCode": 404, "message": "Error: Resource not found"}', + }, + }, + }, + }, + responses: { + 404: { + description: "404 response", + headers: { + "Content-Type": { + type: "string", + }, + }, + }, + }, + }, + }, + }; + } +}; diff --git a/libs/wingsdk/src/target-tf-aws/api.ts b/libs/wingsdk/src/target-tf-aws/api.ts index 8207ef9f9ab..01d92c295ed 100644 --- a/libs/wingsdk/src/target-tf-aws/api.ts +++ b/libs/wingsdk/src/target-tf-aws/api.ts @@ -3,6 +3,7 @@ import { join } from "path"; import { Fn, Lazy } from "cdktf"; import { Construct } from "constructs"; +import { API_CORS_DEFAULT_RESPONSE } from "./api.cors"; import { App } from "./app"; import { Function } from "./function"; import { core } from ".."; @@ -38,10 +39,12 @@ const NAME_OPTS: NameOptions = { */ export class Api extends cloud.Api { private readonly api: WingRestApi; + constructor(scope: Construct, id: string, props: cloud.ApiProps = {}) { super(scope, id, props); this.api = new WingRestApi(this, "api", { apiSpec: this._getApiSpec(), + cors: this.corsOptions, }); } @@ -67,7 +70,7 @@ export class Api extends cloud.Api { const fn = this.addHandler(inflight); const apiSpecEndpoint = this.api.addEndpoint(path, "GET", fn); - this._addToSpec(path, "GET", apiSpecEndpoint); + this._addToSpec(path, "GET", apiSpecEndpoint, this.corsOptions); Node.of(this).addConnection({ source: this, @@ -94,7 +97,7 @@ export class Api extends cloud.Api { const fn = this.addHandler(inflight); const apiSpecEndpoint = this.api.addEndpoint(path, "POST", fn); - this._addToSpec(path, "POST", apiSpecEndpoint); + this._addToSpec(path, "POST", apiSpecEndpoint, this.corsOptions); Node.of(this).addConnection({ source: this, @@ -121,7 +124,7 @@ export class Api extends cloud.Api { const fn = this.addHandler(inflight); const apiSpecEndpoint = this.api.addEndpoint(path, "PUT", fn); - this._addToSpec(path, "PUT", apiSpecEndpoint); + this._addToSpec(path, "PUT", apiSpecEndpoint, this.corsOptions); Node.of(this).addConnection({ source: this, @@ -148,7 +151,7 @@ export class Api extends cloud.Api { const fn = this.addHandler(inflight); const apiSpecEndpoint = this.api.addEndpoint(path, "DELETE", fn); - this._addToSpec(path, "DELETE", apiSpecEndpoint); + this._addToSpec(path, "DELETE", apiSpecEndpoint, this.corsOptions); Node.of(this).addConnection({ source: this, @@ -175,7 +178,7 @@ export class Api extends cloud.Api { const fn = this.addHandler(inflight); const apiSpecEndpoint = this.api.addEndpoint(path, "PATCH", fn); - this._addToSpec(path, "PATCH", apiSpecEndpoint); + this._addToSpec(path, "PATCH", apiSpecEndpoint, this.corsOptions); Node.of(this).addConnection({ source: this, @@ -202,7 +205,7 @@ export class Api extends cloud.Api { const fn = this.addHandler(inflight); const apiSpecEndpoint = this.api.addEndpoint(path, "OPTIONS", fn); - this._addToSpec(path, "OPTIONS", apiSpecEndpoint); + this._addToSpec(path, "OPTIONS", apiSpecEndpoint, this.corsOptions); Node.of(this).addConnection({ source: this, @@ -229,7 +232,7 @@ export class Api extends cloud.Api { const fn = this.addHandler(inflight); const apiSpecEndpoint = this.api.addEndpoint(path, "HEAD", fn); - this._addToSpec(path, "HEAD", apiSpecEndpoint); + this._addToSpec(path, "HEAD", apiSpecEndpoint, this.corsOptions); Node.of(this).addConnection({ source: this, @@ -323,7 +326,11 @@ export class Api extends cloud.Api { __dirname.replace("target-tf-aws", "shared-aws"), "api.onrequest.inflight.js" ), - "ApiOnRequestHandlerClient" + "ApiOnRequestHandlerClient", + { + corsHeaders: this._generateCorsHeaders(this.corsOptions) + ?.defaultResponse, + } ); return Function._newFunction( this, @@ -362,50 +369,6 @@ export class Api extends cloud.Api { } } -/** - * DEFAULT_404_RESPONSE is a constant that defines the default response when a 404 error occurs. - * It is used to handle all requests that do not match any defined routes in the API Gateway. - * The response is a mock integration type, which means it returns a mocked response without - * forwarding the request to any backend. The response status code is set to 404 and the - * Content-Type header is set to 'application/json'. - */ -const DEFAULT_404_RESPONSE = { - "/{proxy+}": { - "x-amazon-apigateway-any-method": { - produces: ["application/json"], - consumes: ["application/json"], - "x-amazon-apigateway-integration": { - type: "mock", - requestTemplates: { - "application/json": '{"statusCode": 404}', - }, - responses: { - default: { - statusCode: "404", - responseParameters: { - "method.response.header.Content-Type": "'application/json'", - }, - responseTemplates: { - "application/json": - '{"statusCode: 404, "message": "Error: Resource not found"}', - }, - }, - }, - }, - responses: { - 404: { - description: "404 response", - headers: { - "Content-Type": { - type: "string", - }, - }, - }, - }, - }, - }, -}; - /** * Encapsulates the API Gateway REST API as a abstraction for Terraform. */ @@ -415,17 +378,20 @@ class WingRestApi extends Construct { public readonly stage: ApiGatewayStage; private readonly deployment: ApiGatewayDeployment; private readonly region: string; + constructor( scope: Construct, id: string, props: { apiSpec: OpenApiSpec; + cors?: cloud.ApiCorsOptions; } ) { super(scope, id); - this.region = (App.of(this) as App).region; + const defaultResponse = API_CORS_DEFAULT_RESPONSE(props.cors); + this.api = new ApiGatewayRestApi(this, "api", { name: ResourceNames.generateName(this, NAME_OPTS), // Lazy generation of the api spec because routes can be added after the API is created @@ -434,7 +400,7 @@ class WingRestApi extends Construct { const injectGreedy404Handler = (openApiSpec: OpenApiSpec) => { openApiSpec.paths = { ...openApiSpec.paths, - ...DEFAULT_404_RESPONSE, + ...defaultResponse, }; return openApiSpec; }; diff --git a/libs/wingsdk/test/shared-aws/api.onrequest.inflight.test.ts b/libs/wingsdk/test/shared-aws/api.onrequest.inflight.test.ts index 85fd6943640..108e3fcbd0f 100644 --- a/libs/wingsdk/test/shared-aws/api.onrequest.inflight.test.ts +++ b/libs/wingsdk/test/shared-aws/api.onrequest.inflight.test.ts @@ -157,6 +157,49 @@ describe("ApiResponseMapper", () => { }, }); }); + + test("inject cors response headers", async () => { + // GIVEN + const apiRequestEvent: Partial = { + body: JSON.stringify({}), + headers: {}, + path: "/", + httpMethod: "GET", + }; + + const handlerResponse: ApiResponse = { + status: 200, + body: JSON.stringify({ key: "value" }), + }; + const requestHandlerClient = new ApiOnRequestHandlerClient({ + handler: { + handle: async () => { + return handlerResponse; + }, + }, + args: { + corsHeaders: { + "Access-Control-Allow-Origin": "*", + }, + }, + }); + + // WHEN + const response = await requestHandlerClient.handle( + apiRequestEvent as APIGatewayProxyEvent + ); + + // THEN + + expect(response).toEqual({ + statusCode: 200, + body: JSON.stringify({ key: "value" }), + headers: { + "Content-Type": "application/json", + "Access-Control-Allow-Origin": "*", + }, + }); + }); }); describe("ApiRequest", () => { diff --git a/libs/wingsdk/test/target-sim/api.test.ts b/libs/wingsdk/test/target-sim/api.test.ts index daccf9da22f..32595907d48 100644 --- a/libs/wingsdk/test/target-sim/api.test.ts +++ b/libs/wingsdk/test/target-sim/api.test.ts @@ -597,3 +597,93 @@ test("404 handler", async () => { expect(response.status).toEqual(404); expect(body).toContain("Error"); }); + +test("api with CORS defaults", async () => { + // GIVEN + const ROUTE = "/hello"; + const RESPONSE = "boom"; + + const app = new SimApp(); + const api = cloud.Api._newApi(app, "my_api", { cors: true }); + const inflight = Testing.makeHandler(app, "Handler", INFLIGHT_CODE(RESPONSE)); + api.get(ROUTE, inflight); + + // WHEN + const s = await app.startSimulator(); + const apiUrl = getApiUrl(s, "/my_api"); + const response = await fetch(apiUrl + ROUTE, { method: "GET" }); + + // THEN + await s.stop(); + + expect(response.status).toEqual(200); + expect(await response.text()).toEqual(RESPONSE); + expect(response.headers.get("access-control-allow-origin")).toEqual("*"); + expect(response.headers.get("access-control-allow-credentials")).toEqual( + "false" + ); +}); + +test("api with custom CORS settings", async () => { + // GIVEN + const ROUTE = "/hello"; + const RESPONSE = "boom"; + + const app = new SimApp(); + const api = cloud.Api._newApi(app, "my_api", { + cors: true, + corsOptions: { + allowOrigin: ["https://example.com"], + allowCredentials: true, + exposeHeaders: ["x-wingnuts"], + }, + }); + const inflight = Testing.makeHandler(app, "Handler", INFLIGHT_CODE(RESPONSE)); + api.get(ROUTE, inflight); + + // WHEN + const s = await app.startSimulator(); + const apiUrl = getApiUrl(s, "/my_api"); + const response = await fetch(apiUrl + ROUTE, { method: "GET" }); + + // THEN + await s.stop(); + + expect(response.status).toEqual(200); + expect(await response.text()).toEqual(RESPONSE); + expect(response.headers.get("access-control-allow-origin")).toEqual( + "https://example.com" + ); + expect(response.headers.get("access-control-allow-credentials")).toEqual( + "true" + ); + expect(response.headers.get("access-control-expose-headers")).toEqual( + "x-wingnuts" + ); +}); + +test("api with CORS settings responds to OPTIONS request", async () => { + // GIVEN + const ROUTE = "/hello"; + + const app = new SimApp(); + const api = cloud.Api._newApi(app, "my_api", { + cors: true, + }); + + // WHEN + const s = await app.startSimulator(); + const apiUrl = getApiUrl(s, "/my_api"); + const response = await fetch(apiUrl + ROUTE, { method: "OPTIONS" }); + + // THEN + await s.stop(); + + expect(response.status).toEqual(204); + expect(response.headers.get("access-control-allow-headers")).toEqual( + "Content-Type,Authorization,X-Requested-With" + ); + expect(response.headers.get("access-control-allow-methods")).toEqual( + "GET,POST,PUT,DELETE,HEAD,OPTIONS" + ); +}); diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/api.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/api.test.ts.snap index 3dd2d4d766d..d4855e37966 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/api.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/api.test.ts.snap @@ -1,5 +1,133 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html +exports[`api configured for cors 1`] = ` +{ + "openapi": "3.0.3", + "paths": { + "/": { + "get": { + "operationId": "get", + "parameters": [], + "responses": { + "200": { + "content": {}, + "description": "200 response", + "headers": { + "Access-Control-Allow-Headers": { + "schema": { + "type": "string", + }, + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string", + }, + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string", + }, + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "contentHandling": "CONVERT_TO_TEXT", + "httpMethod": "POST", + "passthroughBehavior": "when_no_match", + "responses": { + "default": { + "statusCode": "200", + }, + }, + "type": "aws_proxy", + "uri": "arn:aws:apigateway:\${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/\${aws_lambda_function.Api_Api-OnRequest-c5395e41_37F21C2B.arn}/invocations", + }, + }, + }, + "/{proxy+}": { + "x-amazon-apigateway-any-method": { + "produces": [ + "application/json", + ], + "responses": { + "204": { + "description": "204 response", + "headers": { + "Access-Control-Allow-Headers": { + "type": "string", + }, + "Access-Control-Allow-Methods": { + "type": "string", + }, + "Access-Control-Allow-Origin": { + "type": "string", + }, + "Content-Type": { + "type": "string", + }, + }, + }, + "404": { + "description": "404 response", + "headers": { + "Content-Type": { + "type": "string", + }, + }, + }, + }, + "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", + "requestTemplates": { + "application/json": " + #if ($context.httpMethod == \\"OPTIONS\\") + {\\"statusCode\\": 204} + #else + {\\"statusCode\\": 404} + #end + ", + }, + "responses": { + "204": { + "responseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,Authorization,X-Requested-With'", + "method.response.header.Access-Control-Allow-Methods": "'GET,POST,PUT,DELETE,HEAD,OPTIONS'", + "method.response.header.Access-Control-Allow-Origin": "'*'", + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{}", + }, + "statusCode": "204", + }, + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + "default": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, + }, + "type": "mock", + }, + }, + }, + }, +} +`; + exports[`api with 'name' & 'age' parameter 1`] = ` { "openapi": "3.0.3", @@ -47,9 +175,6 @@ exports[`api with 'name' & 'age' parameter 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -64,16 +189,28 @@ exports[`api with 'name' & 'age' parameter 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, @@ -125,9 +262,6 @@ exports[`api with 'name' parameter 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -142,16 +276,28 @@ exports[`api with 'name' parameter 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, @@ -194,9 +340,6 @@ exports[`api with CONNECT route 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -211,16 +354,28 @@ exports[`api with CONNECT route 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, @@ -263,9 +418,6 @@ exports[`api with DELETE route 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -280,16 +432,28 @@ exports[`api with DELETE route 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, @@ -332,9 +496,6 @@ exports[`api with GET route at root 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -349,16 +510,28 @@ exports[`api with GET route at root 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, @@ -425,9 +598,6 @@ exports[`api with GET routes with common prefix 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -442,16 +612,28 @@ exports[`api with GET routes with common prefix 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, @@ -518,9 +700,6 @@ exports[`api with GET routes with different prefix 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -535,16 +714,28 @@ exports[`api with GET routes with different prefix 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, @@ -587,9 +778,6 @@ exports[`api with HEAD route 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -604,16 +792,28 @@ exports[`api with HEAD route 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, @@ -656,9 +856,6 @@ exports[`api with OPTIONS route 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -673,16 +870,28 @@ exports[`api with OPTIONS route 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, @@ -725,9 +934,6 @@ exports[`api with PATCH route 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -742,16 +948,28 @@ exports[`api with PATCH route 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, @@ -794,9 +1012,6 @@ exports[`api with POST route 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -811,16 +1026,28 @@ exports[`api with POST route 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, @@ -863,9 +1090,6 @@ exports[`api with PUT route 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -880,16 +1104,28 @@ exports[`api with PUT route 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, @@ -956,9 +1192,6 @@ exports[`api with multiple GET route and one lambda 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -973,16 +1206,28 @@ exports[`api with multiple GET route and one lambda 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, @@ -1049,9 +1294,6 @@ exports[`api with multiple methods and multiple lambda 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -1066,16 +1308,28 @@ exports[`api with multiple methods and multiple lambda 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, @@ -1142,9 +1396,6 @@ exports[`api with multiple methods and one lambda 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -1159,16 +1410,28 @@ exports[`api with multiple methods and one lambda 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, @@ -1233,9 +1496,6 @@ exports[`api with multiple methods on same route 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -1250,16 +1510,28 @@ exports[`api with multiple methods on same route 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, @@ -1311,9 +1583,6 @@ exports[`api with path parameter 1`] = ` }, "/{proxy+}": { "x-amazon-apigateway-any-method": { - "consumes": [ - "application/json", - ], "produces": [ "application/json", ], @@ -1328,16 +1597,28 @@ exports[`api with path parameter 1`] = ` }, }, "x-amazon-apigateway-integration": { + "passthroughBehavior": "never", "requestTemplates": { - "application/json": "{\\"statusCode\\": 404}", + "application/json": " + {\\"statusCode\\": 404} + ", }, "responses": { + "404": { + "responseParameters": { + "method.response.header.Content-Type": "'application/json'", + }, + "responseTemplates": { + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", + }, + "statusCode": "404", + }, "default": { "responseParameters": { "method.response.header.Content-Type": "'application/json'", }, "responseTemplates": { - "application/json": "{\\"statusCode: 404, \\"message\\": \\"Error: Resource not found\\"}", + "application/json": "{\\"statusCode\\": 404, \\"message\\": \\"Error: Resource not found\\"}", }, "statusCode": "404", }, diff --git a/libs/wingsdk/test/target-tf-aws/__snapshots__/tokens.test.ts.snap b/libs/wingsdk/test/target-tf-aws/__snapshots__/tokens.test.ts.snap index 9016b32324f..69e9eaa36d0 100644 --- a/libs/wingsdk/test/target-tf-aws/__snapshots__/tokens.test.ts.snap +++ b/libs/wingsdk/test/target-tf-aws/__snapshots__/tokens.test.ts.snap @@ -45,7 +45,7 @@ exports[`captures tokens 2`] = ` }, "aws_api_gateway_rest_api": { "Api_api_91C07D84": { - "body": "{\\"openapi\\":\\"3.0.3\\",\\"paths\\":{\\"/\\":{\\"get\\":{\\"operationId\\":\\"get\\",\\"responses\\":{\\"200\\":{\\"description\\":\\"200 response\\",\\"content\\":{}}},\\"parameters\\":[],\\"x-amazon-apigateway-integration\\":{\\"uri\\":\\"arn:aws:apigateway:\${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/\${aws_lambda_function.Api_Api-OnRequest-c5395e41_37F21C2B.arn}/invocations\\",\\"type\\":\\"aws_proxy\\",\\"httpMethod\\":\\"POST\\",\\"responses\\":{\\"default\\":{\\"statusCode\\":\\"200\\"}},\\"passthroughBehavior\\":\\"when_no_match\\",\\"contentHandling\\":\\"CONVERT_TO_TEXT\\"}}},\\"/{proxy+}\\":{\\"x-amazon-apigateway-any-method\\":{\\"produces\\":[\\"application/json\\"],\\"consumes\\":[\\"application/json\\"],\\"x-amazon-apigateway-integration\\":{\\"type\\":\\"mock\\",\\"requestTemplates\\":{\\"application/json\\":\\"{\\\\\\"statusCode\\\\\\": 404}\\"},\\"responses\\":{\\"default\\":{\\"statusCode\\":\\"404\\",\\"responseParameters\\":{\\"method.response.header.Content-Type\\":\\"'application/json'\\"},\\"responseTemplates\\":{\\"application/json\\":\\"{\\\\\\"statusCode: 404, \\\\\\"message\\\\\\": \\\\\\"Error: Resource not found\\\\\\"}\\"}}}},\\"responses\\":{\\"404\\":{\\"description\\":\\"404 response\\",\\"headers\\":{\\"Content-Type\\":{\\"type\\":\\"string\\"}}}}}}}}", + "body": "{\\"openapi\\":\\"3.0.3\\",\\"paths\\":{\\"/\\":{\\"get\\":{\\"operationId\\":\\"get\\",\\"responses\\":{\\"200\\":{\\"description\\":\\"200 response\\",\\"content\\":{}}},\\"parameters\\":[],\\"x-amazon-apigateway-integration\\":{\\"uri\\":\\"arn:aws:apigateway:\${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/\${aws_lambda_function.Api_Api-OnRequest-c5395e41_37F21C2B.arn}/invocations\\",\\"type\\":\\"aws_proxy\\",\\"httpMethod\\":\\"POST\\",\\"responses\\":{\\"default\\":{\\"statusCode\\":\\"200\\"}},\\"passthroughBehavior\\":\\"when_no_match\\",\\"contentHandling\\":\\"CONVERT_TO_TEXT\\"}}},\\"/{proxy+}\\":{\\"x-amazon-apigateway-any-method\\":{\\"produces\\":[\\"application/json\\"],\\"x-amazon-apigateway-integration\\":{\\"type\\":\\"mock\\",\\"requestTemplates\\":{\\"application/json\\":\\"\\\\n {\\\\\\"statusCode\\\\\\": 404}\\\\n \\"},\\"passthroughBehavior\\":\\"never\\",\\"responses\\":{\\"404\\":{\\"statusCode\\":\\"404\\",\\"responseParameters\\":{\\"method.response.header.Content-Type\\":\\"'application/json'\\"},\\"responseTemplates\\":{\\"application/json\\":\\"{\\\\\\"statusCode\\\\\\": 404, \\\\\\"message\\\\\\": \\\\\\"Error: Resource not found\\\\\\"}\\"}},\\"default\\":{\\"statusCode\\":\\"404\\",\\"responseParameters\\":{\\"method.response.header.Content-Type\\":\\"'application/json'\\"},\\"responseTemplates\\":{\\"application/json\\":\\"{\\\\\\"statusCode\\\\\\": 404, \\\\\\"message\\\\\\": \\\\\\"Error: Resource not found\\\\\\"}\\"}}}},\\"responses\\":{\\"404\\":{\\"description\\":\\"404 response\\",\\"headers\\":{\\"Content-Type\\":{\\"type\\":\\"string\\"}}}}}}}}", "name": "api-c8f613f0", }, }, diff --git a/libs/wingsdk/test/target-tf-aws/api.test.ts b/libs/wingsdk/test/target-tf-aws/api.test.ts index 97556cfe2d3..40efb48b41f 100644 --- a/libs/wingsdk/test/target-tf-aws/api.test.ts +++ b/libs/wingsdk/test/target-tf-aws/api.test.ts @@ -350,3 +350,20 @@ test("api url can be used as environment variable", () => { tfConfig.resource.aws_lambda_function.Fn.environment.variables.API_URL ).toEqual("${aws_api_gateway_stage.Api_api_stage_E0FA39D6.invoke_url}"); }); + +test("api configured for cors", () => { + // GIVEN + const app = new tfaws.App({ outdir: mkdtemp() }); + const api = new Api(app, "Api", { cors: true }); + const handler = Testing.makeHandler(app, "Handler", INFLIGHT_CODE); + api.get("/", handler); + + const output = app.synth(); + + // THEN + const apiSpec = extractApiSpec(output); + expect(tfResourcesOfCount(output, "aws_api_gateway_rest_api")).toEqual(1); + expect(tfResourcesOfCount(output, "aws_lambda_function")).toEqual(1); + expect(Object.keys(apiSpec.paths["/"])).toStrictEqual(["get"]); + expect(apiSpec).toMatchSnapshot(); +}); diff --git a/libs/wingsdk/vitest.config.ts b/libs/wingsdk/vitest.config.ts index 275c28c9da4..1cb7948faf8 100644 --- a/libs/wingsdk/vitest.config.ts +++ b/libs/wingsdk/vitest.config.ts @@ -2,7 +2,6 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { - update: true, globalSetup: "test/global.setup.ts", testTimeout: 200_000, include: ["test/**/*.test.ts"], diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/404.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/404.w_compile_tf-aws.md index 895cd5b7a46..0287aeb265e 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/404.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/404.w_compile_tf-aws.md @@ -106,7 +106,7 @@ module.exports = function({ $api_url, $http_Util }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/hello\":{\"get\":{\"operationId\":\"get-hello\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/hello\":{\"get\":{\"operationId\":\"get-hello\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n {\\\"statusCode\\\": 404}\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/cors.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/cors.w_compile_tf-aws.md new file mode 100644 index 00000000000..387fe8cc53d --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/cors.w_compile_tf-aws.md @@ -0,0 +1,394 @@ +# [cors.w](../../../../../../examples/tests/sdk_tests/api/cors.w) | compile | tf-aws + +## inflight.$Closure1-1.js +```js +module.exports = function({ $body }) { + class $Closure1 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle(req) { + return ({"status": 200,"body": $body}); + } + } + return $Closure1; +} + +``` + +## inflight.$Closure2-1.js +```js +module.exports = function({ $api_url, $http_Util }) { + class $Closure2 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const url = ($api_url + "/path"); + const response = (await $http_Util.get(url)); + {((cond) => {if (!cond) throw new Error("assertion failed: response.headers.get(\"access-control-allow-origin\") == \"*\"")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((response.headers)["access-control-allow-origin"],"*")))}; + } + } + return $Closure2; +} + +``` + +## main.tf.json +```json +{ + "//": { + "metadata": { + "backend": "local", + "stackName": "root", + "version": "0.17.0" + }, + "outputs": { + "root": { + "Default": { + "cloud.TestRunner": { + "TestFunctionArns": "WING_TEST_RUNNER_FUNCTION_ARNS" + } + } + } + } + }, + "data": { + "aws_region": { + "Region": { + "//": { + "metadata": { + "path": "root/Default/Region", + "uniqueId": "Region" + } + } + } + } + }, + "output": { + "WING_TEST_RUNNER_FUNCTION_ARNS": { + "value": "[[\"root/Default/Default/test:http.get and http.fetch can preform a call to an api\",\"${aws_lambda_function.testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_9FEA2521.arn}\"]]" + } + }, + "provider": { + "aws": [ + {} + ] + }, + "resource": { + "aws_api_gateway_deployment": { + "cloudApi_api_deployment_545514BF": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/deployment", + "uniqueId": "cloudApi_api_deployment_545514BF" + } + }, + "lifecycle": { + "create_before_destroy": true + }, + "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", + "triggers": { + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" + } + } + }, + "aws_api_gateway_rest_api": { + "cloudApi_api_2B334D75": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/api", + "uniqueId": "cloudApi_api_2B334D75" + } + }, + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"get\":{\"operationId\":\"get-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{},\"headers\":{\"Access-Control-Allow-Origin\":{\"schema\":{\"type\":\"string\"}},\"Access-Control-Allow-Methods\":{\"schema\":{\"type\":\"string\"}},\"Access-Control-Allow-Headers\":{\"schema\":{\"type\":\"string\"}}}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n #if ($context.httpMethod == \\\"OPTIONS\\\")\\n {\\\"statusCode\\\": 204}\\n #else\\n {\\\"statusCode\\\": 404}\\n #end\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"204\":{\"statusCode\":\"204\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\",\"method.response.header.Access-Control-Allow-Origin\":\"'*'\",\"method.response.header.Access-Control-Allow-Methods\":\"'GET,POST,PUT,DELETE,HEAD,OPTIONS'\",\"method.response.header.Access-Control-Allow-Headers\":\"'Content-Type,Authorization,X-Requested-With'\"},\"responseTemplates\":{\"application/json\":\"{}\"}},\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"204\":{\"description\":\"204 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"},\"Access-Control-Allow-Origin\":{\"type\":\"string\"},\"Access-Control-Allow-Methods\":{\"type\":\"string\"},\"Access-Control-Allow-Headers\":{\"type\":\"string\"}}},\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "name": "api-c895068c" + } + }, + "aws_api_gateway_stage": { + "cloudApi_api_stage_BBB283E4": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/stage", + "uniqueId": "cloudApi_api_stage_BBB283E4" + } + }, + "deployment_id": "${aws_api_gateway_deployment.cloudApi_api_deployment_545514BF.id}", + "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", + "stage_name": "prod" + } + }, + "aws_iam_role": { + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRole", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRole_678DDBCB": { + "//": { + "metadata": { + "path": "root/Default/Default/test:http.get and http.fetch can preform a call to an api/Handler/IamRole", + "uniqueId": "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRole_678DDBCB" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + } + }, + "aws_iam_role_policy": { + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicy_8BF9C89F": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRolePolicy", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicy_8BF9C89F" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" + }, + "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicy_047F62EA": { + "//": { + "metadata": { + "path": "root/Default/Default/test:http.get and http.fetch can preform a call to an api/Handler/IamRolePolicy", + "uniqueId": "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicy_047F62EA" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRole_678DDBCB.name}" + } + }, + "aws_iam_role_policy_attachment": { + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicyAttachment_5383D6A2": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRolePolicyAttachment", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicyAttachment_5383D6A2" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" + }, + "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicyAttachment_328C8EF0": { + "//": { + "metadata": { + "path": "root/Default/Default/test:http.get and http.fetch can preform a call to an api/Handler/IamRolePolicyAttachment", + "uniqueId": "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicyAttachment_328C8EF0" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRole_678DDBCB.name}" + } + }, + "aws_lambda_function": { + "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/Default", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", + "WING_TARGET": "tf-aws" + } + }, + "function_name": "cloud-Api-OnRequest-cdafee6e-c8147384", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_9FEA2521": { + "//": { + "metadata": { + "path": "root/Default/Default/test:http.get and http.fetch can preform a call to an api/Handler/Default", + "uniqueId": "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_9FEA2521" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c838ce37", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c838ce37", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRole_678DDBCB.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_S3Object_88ED484E.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + } + }, + "aws_lambda_permission": { + "cloudApi_api_permission-GET-e2131352_3FDDE199": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-e2131352", + "uniqueId": "cloudApi_api_permission-GET-e2131352_3FDDE199" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/path", + "statement_id": "AllowExecutionFromAPIGateway-GET-e2131352" + } + }, + "aws_s3_bucket": { + "Code": { + "//": { + "metadata": { + "path": "root/Default/Code", + "uniqueId": "Code" + } + }, + "bucket_prefix": "code-c84a50b1-" + } + }, + "aws_s3_object": { + "cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/S3Object", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_S3Object_88ED484E": { + "//": { + "metadata": { + "path": "root/Default/Default/test:http.get and http.fetch can preform a call to an api/Handler/S3Object", + "uniqueId": "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_S3Object_88ED484E" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + } + } + } +} +``` + +## preflight.js +```js +const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); +const $outdir = process.env.WING_SYNTH_DIR ?? "."; +const $wing_is_test = process.env.WING_IS_TEST === "true"; +const std = $stdlib.std; +const cloud = $stdlib.cloud; +const http = $stdlib.http; +const util = $stdlib.util; +class $Root extends $stdlib.std.Resource { + constructor(scope, id) { + super(scope, id); + class $Closure1 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure1-1.js")({ + $body: ${context._lift(body)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure1Client = ${$Closure1._toInflightType(this)}; + const client = new $Closure1Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure1._registerBindObject(body, host, []); + } + super._registerBind(host, ops); + } + } + class $Closure2 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure2-1.js")({ + $api_url: ${context._lift(api.url)}, + $http_Util: ${context._lift(http.Util)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure2Client = ${$Closure2._toInflightType(this)}; + const client = new $Closure2Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure2._registerBindObject(api.url, host, []); + } + super._registerBind(host, ops); + } + } + const api = this.node.root.newAbstract("@winglang/sdk.cloud.Api",this,"cloud.Api",({"cors": true})); + const body = "ok!"; + (api.get("/path",new $Closure1(this,"$Closure1"))); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:http.get and http.fetch can preform a call to an api",new $Closure2(this,"$Closure2")); + } +} +const $App = $stdlib.core.App.for(process.env.WING_TARGET); +new $App({ outdir: $outdir, name: "cors", rootConstruct: $Root, plugins: $plugins, isTestEnvironment: $wing_is_test, entrypointDir: process.env['WING_SOURCE_DIR'], rootId: process.env['WING_ROOT_ID'] }).synth(); + +``` + diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/cors.w_test_sim.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/cors.w_test_sim.md new file mode 100644 index 00000000000..86b9ef34bc1 --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/cors.w_test_sim.md @@ -0,0 +1,12 @@ +# [cors.w](../../../../../../examples/tests/sdk_tests/api/cors.w) | test | sim + +## stdout.log +```log +pass ─ cors.wsim » root/env0/test:http.get and http.fetch can preform a call to an api + + +Tests 1 passed (1) +Test Files 1 passed (1) +Duration +``` + diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md index ad5a0098c83..f2fa22ee2d0 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md @@ -115,7 +115,7 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"delete\":{\"operationId\":\"delete-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"delete\":{\"operationId\":\"delete-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n {\\\"statusCode\\\": 404}\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md index bb7275b8ec8..3c8823de3ce 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md @@ -119,7 +119,7 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"get\":{\"operationId\":\"get-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"get\":{\"operationId\":\"get-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n {\\\"statusCode\\\": 404}\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md index eb752661186..149cc13cb69 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md @@ -149,7 +149,7 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $path }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"options\":{\"operationId\":\"options-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}},\"head\":{\"operationId\":\"head-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}},\"connect\":{\"operationId\":\"connect-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-3fc9280c_5DA20E7A.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"options\":{\"operationId\":\"options-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}},\"head\":{\"operationId\":\"head-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}},\"connect\":{\"operationId\":\"connect-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-3fc9280c_5DA20E7A.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n {\\\"statusCode\\\": 404}\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md index 471345931da..8dc60e45ab4 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md @@ -116,7 +116,7 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path/{id}\":{\"patch\":{\"operationId\":\"patch-path/{id}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"id\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path/{id}\":{\"patch\":{\"operationId\":\"patch-path/{id}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"id\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n {\\\"statusCode\\\": 404}\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md index 9ca1e985925..dd8f9db3dfd 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md @@ -189,7 +189,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users/{name}\":{\"get\":{\"operationId\":\"get-users/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/path/{name}\":{\"get\":{\"operationId\":\"get-path/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/users/permission/{name}\":{\"get\":{\"operationId\":\"get-users/permission/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/path/{name}/{age}\":{\"get\":{\"operationId\":\"get-path/{name}/{age}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"age\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users/{name}\":{\"get\":{\"operationId\":\"get-users/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/path/{name}\":{\"get\":{\"operationId\":\"get-path/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/users/permission/{name}\":{\"get\":{\"operationId\":\"get-users/permission/{name}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/path/{name}/{age}\":{\"get\":{\"operationId\":\"get-path/{name}/{age}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"name\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"age\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n {\\\"statusCode\\\": 404}\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md index 5c3c2344a04..d535e875a54 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md @@ -115,7 +115,7 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util, $std_ "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"post\":{\"operationId\":\"post-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path\":{\"post\":{\"operationId\":\"post-path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n {\\\"statusCode\\\": 404}\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md index 72852cd405d..6aa19413204 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md @@ -120,7 +120,7 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path/{id}/nn/{user}\":{\"put\":{\"operationId\":\"put-path/{id}/nn/{user}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"id\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"user\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/path/{id}/nn/{user}\":{\"put\":{\"operationId\":\"put-path/{id}/nn/{user}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"id\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"user\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n {\\\"statusCode\\\": 404}\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md index f8ec9aef635..75d03afb368 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md @@ -153,7 +153,7 @@ module.exports = function({ }) { "uniqueId": "A_cloudApi_api_37FCEF91" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/endpoint1\":{\"get\":{\"operationId\":\"get-endpoint1\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.A_cloudApi_cloudApi-OnRequest-73c5308f_E645B0BE.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/endpoint1\":{\"get\":{\"operationId\":\"get-endpoint1\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.A_cloudApi_cloudApi-OnRequest-73c5308f_E645B0BE.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n {\\\"statusCode\\\": 404}\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c8c7a7a3" }, "cloudApi_api_2B334D75": { @@ -163,7 +163,7 @@ module.exports = function({ }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/hello/world\":{\"get\":{\"operationId\":\"get-hello/world\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/hello/world\":{\"get\":{\"operationId\":\"get-hello/world\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n {\\\"statusCode\\\": 404}\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_cors_custom.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_cors_custom.w_compile_tf-aws.md new file mode 100644 index 00000000000..ddddf0a5289 --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_cors_custom.w_compile_tf-aws.md @@ -0,0 +1,728 @@ +# [api_cors_custom.w](../../../../../examples/tests/valid/api_cors_custom.w) | compile | tf-aws + +## inflight.$Closure1-2.js +```js +module.exports = function({ }) { + class $Closure1 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle(req) { + return ({"body": "hello world","status": 200}); + } + } + return $Closure1; +} + +``` + +## inflight.$Closure2-2.js +```js +module.exports = function({ $api_url, $http_Util, $t_Assert }) { + class $Closure2 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const response = (await $http_Util.get(($api_url + "/users"))); + const headers = response.headers; + (await $t_Assert.equalNum(response.status,200)); + (await $t_Assert.equalStr((headers)["access-control-allow-origin"],"winglang.io")); + (await $t_Assert.equalStr((headers)["access-control-allow-credentials"],"true")); + (await $t_Assert.equalStr((headers)["access-control-expose-headers"],"Content-Type")); + (await $t_Assert.isNil((headers)["access-control-allow-headers"])); + (await $t_Assert.isNil((headers)["access-control-allow-methods"])); + } + } + return $Closure2; +} + +``` + +## inflight.$Closure3-2.js +```js +module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $t_Assert }) { + class $Closure3 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const response = (await $http_Util.fetch(($api_url + "/users"),({"method": $http_HttpMethod.OPTIONS}))); + const headers = response.headers; + (await $t_Assert.equalNum(response.status,204)); + (await $t_Assert.equalStr((headers)["access-control-allow-methods"],"GET,POST,OPTIONS")); + (await $t_Assert.equalStr((headers)["access-control-allow-headers"],"Content-Type,Authorization,X-Custom-Header")); + (await $t_Assert.equalStr((headers)["access-control-allow-origin"],"winglang.io")); + (await $t_Assert.isNil((headers)["access-control-expose-headers"])); + (await $t_Assert.isNil((headers)["access-control-allow-credentials"])); + } + } + return $Closure3; +} + +``` + +## inflight.$Closure4-2.js +```js +module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $t_Assert }) { + class $Closure4 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const response = (await $http_Util.fetch(($api_url + "/users"),({"method": $http_HttpMethod.OPTIONS,"headers": ({"Access-Control-Request-Method": "PUT","Access-Control-Request-Headers": "Content-Type,Authorization,X-Custom-Foo"})}))); + const headers = response.headers; + (await $t_Assert.equalNum(response.status,204)); + (await $t_Assert.equalStr((headers)["access-control-allow-methods"],"GET,POST,OPTIONS")); + (await $t_Assert.equalStr((headers)["access-control-allow-headers"],"Content-Type,Authorization,X-Custom-Header")); + (await $t_Assert.equalStr((headers)["access-control-allow-origin"],"winglang.io")); + } + } + return $Closure4; +} + +``` + +## inflight.Assert-1.js +```js +module.exports = function({ }) { + class Assert { + static async equalStr(a, b) { + try { + {((cond) => {if (!cond) throw new Error("assertion failed: a == b")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(a,b)))}; + } + catch ($error_e) { + const e = $error_e.message; + throw new Error(String.raw({ raw: ["expected: ", " got: ", ""] }, b, a)); + } + } + static async isNil(a) { + try { + {((cond) => {if (!cond) throw new Error("assertion failed: a == nil")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(a,undefined)))}; + } + catch ($error_e) { + const e = $error_e.message; + {console.log(e)}; + throw new Error(String.raw({ raw: ["expected '", "' to be nil"] }, a)); + } + } + static async equalNum(a, b) { + try { + {((cond) => {if (!cond) throw new Error("assertion failed: a == b")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(a,b)))}; + } + catch ($error_e) { + const e = $error_e.message; + {console.log(e)}; + throw new Error(String.raw({ raw: ["expected: ", " got: ", ""] }, b, a)); + } + } + } + return Assert; +} + +``` + +## main.tf.json +```json +{ + "//": { + "metadata": { + "backend": "local", + "stackName": "root", + "version": "0.17.0" + }, + "outputs": { + "root": { + "Default": { + "cloud.TestRunner": { + "TestFunctionArns": "WING_TEST_RUNNER_FUNCTION_ARNS" + } + } + } + } + }, + "data": { + "aws_region": { + "Region": { + "//": { + "metadata": { + "path": "root/Default/Region", + "uniqueId": "Region" + } + } + } + } + }, + "output": { + "WING_TEST_RUNNER_FUNCTION_ARNS": { + "value": "[[\"root/Default/Default/test:GET --users has cors headers\",\"${aws_lambda_function.testGET--usershascorsheaders_Handler_E0F337CB.arn}\"],[\"root/Default/Default/test:OPTIONS --users has cors headers\",\"${aws_lambda_function.testOPTIONS--usershascorsheaders_Handler_3A565385.arn}\"],[\"root/Default/Default/test:OPTIONS --users responds with proper headers for requested\",\"${aws_lambda_function.testOPTIONS--usersrespondswithproperheadersforrequested_Handler_0A2AB662.arn}\"]]" + } + }, + "provider": { + "aws": [ + {} + ] + }, + "resource": { + "aws_api_gateway_deployment": { + "cloudApi_api_deployment_545514BF": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/deployment", + "uniqueId": "cloudApi_api_deployment_545514BF" + } + }, + "lifecycle": { + "create_before_destroy": true + }, + "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", + "triggers": { + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" + } + } + }, + "aws_api_gateway_rest_api": { + "cloudApi_api_2B334D75": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/api", + "uniqueId": "cloudApi_api_2B334D75" + } + }, + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users\":{\"get\":{\"operationId\":\"get-users\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{},\"headers\":{\"Access-Control-Allow-Origin\":{\"schema\":{\"type\":\"string\"}},\"Access-Control-Allow-Methods\":{\"schema\":{\"type\":\"string\"}},\"Access-Control-Allow-Headers\":{\"schema\":{\"type\":\"string\"}}}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n #if ($context.httpMethod == \\\"OPTIONS\\\")\\n {\\\"statusCode\\\": 204}\\n #else\\n {\\\"statusCode\\\": 404}\\n #end\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"204\":{\"statusCode\":\"204\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\",\"method.response.header.Access-Control-Allow-Origin\":\"'winglang.io'\",\"method.response.header.Access-Control-Allow-Methods\":\"'GET,POST,OPTIONS'\",\"method.response.header.Access-Control-Allow-Headers\":\"'Content-Type,Authorization,X-Custom-Header'\"},\"responseTemplates\":{\"application/json\":\"{}\"}},\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"204\":{\"description\":\"204 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"},\"Access-Control-Allow-Origin\":{\"type\":\"string\"},\"Access-Control-Allow-Methods\":{\"type\":\"string\"},\"Access-Control-Allow-Headers\":{\"type\":\"string\"}}},\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "name": "api-c895068c" + } + }, + "aws_api_gateway_stage": { + "cloudApi_api_stage_BBB283E4": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/stage", + "uniqueId": "cloudApi_api_stage_BBB283E4" + } + }, + "deployment_id": "${aws_api_gateway_deployment.cloudApi_api_deployment_545514BF.id}", + "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", + "stage_name": "prod" + } + }, + "aws_iam_role": { + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRole", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testGET--usershascorsheaders_Handler_IamRole_6841C3FF": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has cors headers/Handler/IamRole", + "uniqueId": "testGET--usershascorsheaders_Handler_IamRole_6841C3FF" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testOPTIONS--usershascorsheaders_Handler_IamRole_0EFF66BD": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has cors headers/Handler/IamRole", + "uniqueId": "testOPTIONS--usershascorsheaders_Handler_IamRole_0EFF66BD" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRole_4AB06A0F": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users responds with proper headers for requested/Handler/IamRole", + "uniqueId": "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRole_4AB06A0F" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + } + }, + "aws_iam_role_policy": { + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicy_8BF9C89F": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRolePolicy", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicy_8BF9C89F" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" + }, + "testGET--usershascorsheaders_Handler_IamRolePolicy_BEF25776": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has cors headers/Handler/IamRolePolicy", + "uniqueId": "testGET--usershascorsheaders_Handler_IamRolePolicy_BEF25776" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testGET--usershascorsheaders_Handler_IamRole_6841C3FF.name}" + }, + "testOPTIONS--usershascorsheaders_Handler_IamRolePolicy_F6912B4F": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has cors headers/Handler/IamRolePolicy", + "uniqueId": "testOPTIONS--usershascorsheaders_Handler_IamRolePolicy_F6912B4F" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testOPTIONS--usershascorsheaders_Handler_IamRole_0EFF66BD.name}" + }, + "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRolePolicy_00E727F2": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users responds with proper headers for requested/Handler/IamRolePolicy", + "uniqueId": "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRolePolicy_00E727F2" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRole_4AB06A0F.name}" + } + }, + "aws_iam_role_policy_attachment": { + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicyAttachment_5383D6A2": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRolePolicyAttachment", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicyAttachment_5383D6A2" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" + }, + "testGET--usershascorsheaders_Handler_IamRolePolicyAttachment_54A08CCC": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has cors headers/Handler/IamRolePolicyAttachment", + "uniqueId": "testGET--usershascorsheaders_Handler_IamRolePolicyAttachment_54A08CCC" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testGET--usershascorsheaders_Handler_IamRole_6841C3FF.name}" + }, + "testOPTIONS--usershascorsheaders_Handler_IamRolePolicyAttachment_CA58727C": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has cors headers/Handler/IamRolePolicyAttachment", + "uniqueId": "testOPTIONS--usershascorsheaders_Handler_IamRolePolicyAttachment_CA58727C" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testOPTIONS--usershascorsheaders_Handler_IamRole_0EFF66BD.name}" + }, + "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRolePolicyAttachment_F702A7D9": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users responds with proper headers for requested/Handler/IamRolePolicyAttachment", + "uniqueId": "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRolePolicyAttachment_F702A7D9" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRole_4AB06A0F.name}" + } + }, + "aws_lambda_function": { + "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/Default", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", + "WING_TARGET": "tf-aws" + } + }, + "function_name": "cloud-Api-OnRequest-cdafee6e-c8147384", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testGET--usershascorsheaders_Handler_E0F337CB": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has cors headers/Handler/Default", + "uniqueId": "testGET--usershascorsheaders_Handler_E0F337CB" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c8d51aba", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c8d51aba", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testGET--usershascorsheaders_Handler_IamRole_6841C3FF.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testGET--usershascorsheaders_Handler_S3Object_A63B28D3.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testOPTIONS--usershascorsheaders_Handler_3A565385": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has cors headers/Handler/Default", + "uniqueId": "testOPTIONS--usershascorsheaders_Handler_3A565385" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c81c750d", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c81c750d", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testOPTIONS--usershascorsheaders_Handler_IamRole_0EFF66BD.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testOPTIONS--usershascorsheaders_Handler_S3Object_7EC6E95C.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_0A2AB662": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users responds with proper headers for requested/Handler/Default", + "uniqueId": "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_0A2AB662" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c8aef6d3", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c8aef6d3", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRole_4AB06A0F.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testOPTIONS--usersrespondswithproperheadersforrequested_Handler_S3Object_0954ACCC.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + } + }, + "aws_lambda_permission": { + "cloudApi_api_permission-GET-41f0e61d_DD9B4FD0": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-41f0e61d", + "uniqueId": "cloudApi_api_permission-GET-41f0e61d_DD9B4FD0" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/users", + "statement_id": "AllowExecutionFromAPIGateway-GET-41f0e61d" + } + }, + "aws_s3_bucket": { + "Code": { + "//": { + "metadata": { + "path": "root/Default/Code", + "uniqueId": "Code" + } + }, + "bucket_prefix": "code-c84a50b1-" + } + }, + "aws_s3_object": { + "cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/S3Object", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testGET--usershascorsheaders_Handler_S3Object_A63B28D3": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has cors headers/Handler/S3Object", + "uniqueId": "testGET--usershascorsheaders_Handler_S3Object_A63B28D3" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testOPTIONS--usershascorsheaders_Handler_S3Object_7EC6E95C": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has cors headers/Handler/S3Object", + "uniqueId": "testOPTIONS--usershascorsheaders_Handler_S3Object_7EC6E95C" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_S3Object_0954ACCC": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users responds with proper headers for requested/Handler/S3Object", + "uniqueId": "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_S3Object_0954ACCC" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + } + } + } +} +``` + +## preflight.assertions-1.js +```js +module.exports = function({ $stdlib }) { + const std = $stdlib.std; + class Assert extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + } + static _toInflightType(context) { + return ` + require("./inflight.Assert-1.js")({ + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const AssertClient = ${Assert._toInflightType(this)}; + const client = new AssertClient({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["equalStr", "isNil", "equalNum", "$inflight_init"]; + } + } + return { Assert }; +}; + +``` + +## preflight.js +```js +const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); +const $outdir = process.env.WING_SYNTH_DIR ?? "."; +const $wing_is_test = process.env.WING_IS_TEST === "true"; +const std = $stdlib.std; +const cloud = $stdlib.cloud; +const ex = $stdlib.ex; +const http = $stdlib.http; +const t = require("./preflight.assertions-1.js")({ $stdlib }); +class $Root extends $stdlib.std.Resource { + constructor(scope, id) { + super(scope, id); + class $Closure1 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure1-2.js")({ + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure1Client = ${$Closure1._toInflightType(this)}; + const client = new $Closure1Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + } + class $Closure2 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure2-2.js")({ + $api_url: ${context._lift(api.url)}, + $http_Util: ${context._lift(http.Util)}, + $t_Assert: ${context._lift(t.Assert)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure2Client = ${$Closure2._toInflightType(this)}; + const client = new $Closure2Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure2._registerBindObject(api.url, host, []); + } + super._registerBind(host, ops); + } + } + class $Closure3 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure3-2.js")({ + $api_url: ${context._lift(api.url)}, + $http_HttpMethod: ${context._lift(http.HttpMethod)}, + $http_Util: ${context._lift(http.Util)}, + $t_Assert: ${context._lift(t.Assert)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure3Client = ${$Closure3._toInflightType(this)}; + const client = new $Closure3Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure3._registerBindObject(api.url, host, []); + } + super._registerBind(host, ops); + } + } + class $Closure4 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure4-2.js")({ + $api_url: ${context._lift(api.url)}, + $http_HttpMethod: ${context._lift(http.HttpMethod)}, + $http_Util: ${context._lift(http.Util)}, + $t_Assert: ${context._lift(t.Assert)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure4Client = ${$Closure4._toInflightType(this)}; + const client = new $Closure4Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure4._registerBindObject(api.url, host, []); + } + super._registerBind(host, ops); + } + } + const api = this.node.root.newAbstract("@winglang/sdk.cloud.Api",this,"cloud.Api",{ cors: true, corsOptions: ({"allowOrigin": ["winglang.io"],"allowMethods": [cloud.HttpMethod.GET, cloud.HttpMethod.POST, cloud.HttpMethod.OPTIONS],"allowHeaders": ["Content-Type", "Authorization", "X-Custom-Header"],"allowCredentials": true,"exposeHeaders": ["Content-Type"]}) }); + (api.get("/users",new $Closure1(this,"$Closure1"))); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:GET /users has cors headers",new $Closure2(this,"$Closure2")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:OPTIONS /users has cors headers",new $Closure3(this,"$Closure3")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:OPTIONS /users responds with proper headers for requested",new $Closure4(this,"$Closure4")); + } +} +const $App = $stdlib.core.App.for(process.env.WING_TARGET); +new $App({ outdir: $outdir, name: "api_cors_custom", rootConstruct: $Root, plugins: $plugins, isTestEnvironment: $wing_is_test, entrypointDir: process.env['WING_SOURCE_DIR'], rootId: process.env['WING_ROOT_ID'] }).synth(); + +``` + diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_cors_custom.w_test_sim.md b/tools/hangar/__snapshots__/test_corpus/valid/api_cors_custom.w_test_sim.md new file mode 100644 index 00000000000..99c8842c325 --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_cors_custom.w_test_sim.md @@ -0,0 +1,14 @@ +# [api_cors_custom.w](../../../../../examples/tests/valid/api_cors_custom.w) | test | sim + +## stdout.log +```log +pass ─ api_cors_custom.wsim » root/env0/test:GET --users has cors headers +pass ─ api_cors_custom.wsim » root/env1/test:OPTIONS --users has cors headers +pass ─ api_cors_custom.wsim » root/env2/test:OPTIONS --users responds with proper headers for requested + + +Tests 3 passed (3) +Test Files 1 passed (1) +Duration +``` + diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_cors_default.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_cors_default.w_compile_tf-aws.md new file mode 100644 index 00000000000..2a0040d26b0 --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_cors_default.w_compile_tf-aws.md @@ -0,0 +1,598 @@ +# [api_cors_default.w](../../../../../examples/tests/valid/api_cors_default.w) | compile | tf-aws + +## inflight.$Closure1-2.js +```js +module.exports = function({ }) { + class $Closure1 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle(req) { + return ({"body": "hello world","status": 200}); + } + } + return $Closure1; +} + +``` + +## inflight.$Closure2-2.js +```js +module.exports = function({ $apiDefaultCors_url, $http_Util, $t_Assert }) { + class $Closure2 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const response = (await $http_Util.get(($apiDefaultCors_url + "/users"))); + const headers = response.headers; + (await $t_Assert.equalNum(response.status,200)); + (await $t_Assert.equalStr((headers)["access-control-allow-origin"],"*")); + (await $t_Assert.equalStr((headers)["access-control-allow-credentials"],"false")); + (await $t_Assert.equalStr((headers)["access-control-expose-headers"],"")); + (await $t_Assert.isNil((headers)["access-control-allow-headers"])); + (await $t_Assert.isNil((headers)["access-control-allow-methods"])); + } + } + return $Closure2; +} + +``` + +## inflight.$Closure3-2.js +```js +module.exports = function({ $apiDefaultCors_url, $http_HttpMethod, $http_Util, $t_Assert }) { + class $Closure3 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const response = (await $http_Util.fetch(($apiDefaultCors_url + "/users"),({"method": $http_HttpMethod.OPTIONS}))); + const headers = response.headers; + (await $t_Assert.equalNum(response.status,204)); + (await $t_Assert.equalStr((headers)["access-control-allow-headers"],"Content-Type,Authorization,X-Requested-With")); + (await $t_Assert.equalStr((headers)["access-control-allow-methods"],"GET,POST,PUT,DELETE,HEAD,OPTIONS")); + (await $t_Assert.equalStr((headers)["access-control-allow-origin"],"*")); + (await $t_Assert.isNil((headers)["access-control-allow-credentials"])); + (await $t_Assert.isNil((headers)["access-control-expose-headers"])); + } + } + return $Closure3; +} + +``` + +## inflight.Assert-1.js +```js +module.exports = function({ }) { + class Assert { + static async equalStr(a, b) { + try { + {((cond) => {if (!cond) throw new Error("assertion failed: a == b")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(a,b)))}; + } + catch ($error_e) { + const e = $error_e.message; + throw new Error(String.raw({ raw: ["expected: ", " got: ", ""] }, b, a)); + } + } + static async isNil(a) { + try { + {((cond) => {if (!cond) throw new Error("assertion failed: a == nil")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(a,undefined)))}; + } + catch ($error_e) { + const e = $error_e.message; + {console.log(e)}; + throw new Error(String.raw({ raw: ["expected '", "' to be nil"] }, a)); + } + } + static async equalNum(a, b) { + try { + {((cond) => {if (!cond) throw new Error("assertion failed: a == b")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(a,b)))}; + } + catch ($error_e) { + const e = $error_e.message; + {console.log(e)}; + throw new Error(String.raw({ raw: ["expected: ", " got: ", ""] }, b, a)); + } + } + } + return Assert; +} + +``` + +## main.tf.json +```json +{ + "//": { + "metadata": { + "backend": "local", + "stackName": "root", + "version": "0.17.0" + }, + "outputs": { + "root": { + "Default": { + "cloud.TestRunner": { + "TestFunctionArns": "WING_TEST_RUNNER_FUNCTION_ARNS" + } + } + } + } + }, + "data": { + "aws_region": { + "Region": { + "//": { + "metadata": { + "path": "root/Default/Region", + "uniqueId": "Region" + } + } + } + } + }, + "output": { + "WING_TEST_RUNNER_FUNCTION_ARNS": { + "value": "[[\"root/Default/Default/test:GET --users has default cors headers\",\"${aws_lambda_function.testGET--usershasdefaultcorsheaders_Handler_1182379A.arn}\"],[\"root/Default/Default/test:OPTIONS --users has default cors headers\",\"${aws_lambda_function.testOPTIONS--usershasdefaultcorsheaders_Handler_D03A1BFF.arn}\"]]" + } + }, + "provider": { + "aws": [ + {} + ] + }, + "resource": { + "aws_api_gateway_deployment": { + "cloudApi_api_deployment_545514BF": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/deployment", + "uniqueId": "cloudApi_api_deployment_545514BF" + } + }, + "lifecycle": { + "create_before_destroy": true + }, + "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", + "triggers": { + "redeployment": "${sha256(aws_api_gateway_rest_api.cloudApi_api_2B334D75.body)}" + } + } + }, + "aws_api_gateway_rest_api": { + "cloudApi_api_2B334D75": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/api", + "uniqueId": "cloudApi_api_2B334D75" + } + }, + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users\":{\"get\":{\"operationId\":\"get-users\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{},\"headers\":{\"Access-Control-Allow-Origin\":{\"schema\":{\"type\":\"string\"}},\"Access-Control-Allow-Methods\":{\"schema\":{\"type\":\"string\"}},\"Access-Control-Allow-Headers\":{\"schema\":{\"type\":\"string\"}}}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n #if ($context.httpMethod == \\\"OPTIONS\\\")\\n {\\\"statusCode\\\": 204}\\n #else\\n {\\\"statusCode\\\": 404}\\n #end\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"204\":{\"statusCode\":\"204\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\",\"method.response.header.Access-Control-Allow-Origin\":\"'*'\",\"method.response.header.Access-Control-Allow-Methods\":\"'GET,POST,PUT,DELETE,HEAD,OPTIONS'\",\"method.response.header.Access-Control-Allow-Headers\":\"'Content-Type,Authorization,X-Requested-With'\"},\"responseTemplates\":{\"application/json\":\"{}\"}},\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"204\":{\"description\":\"204 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"},\"Access-Control-Allow-Origin\":{\"type\":\"string\"},\"Access-Control-Allow-Methods\":{\"type\":\"string\"},\"Access-Control-Allow-Headers\":{\"type\":\"string\"}}},\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "name": "api-c895068c" + } + }, + "aws_api_gateway_stage": { + "cloudApi_api_stage_BBB283E4": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/stage", + "uniqueId": "cloudApi_api_stage_BBB283E4" + } + }, + "deployment_id": "${aws_api_gateway_deployment.cloudApi_api_deployment_545514BF.id}", + "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", + "stage_name": "prod" + } + }, + "aws_iam_role": { + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRole", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testGET--usershasdefaultcorsheaders_Handler_IamRole_17E5D7FC": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has default cors headers/Handler/IamRole", + "uniqueId": "testGET--usershasdefaultcorsheaders_Handler_IamRole_17E5D7FC" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRole_E58DF921": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has default cors headers/Handler/IamRole", + "uniqueId": "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRole_E58DF921" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + } + }, + "aws_iam_role_policy": { + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicy_8BF9C89F": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRolePolicy", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicy_8BF9C89F" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" + }, + "testGET--usershasdefaultcorsheaders_Handler_IamRolePolicy_F382BF6B": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has default cors headers/Handler/IamRolePolicy", + "uniqueId": "testGET--usershasdefaultcorsheaders_Handler_IamRolePolicy_F382BF6B" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testGET--usershasdefaultcorsheaders_Handler_IamRole_17E5D7FC.name}" + }, + "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRolePolicy_C496A648": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has default cors headers/Handler/IamRolePolicy", + "uniqueId": "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRolePolicy_C496A648" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testOPTIONS--usershasdefaultcorsheaders_Handler_IamRole_E58DF921.name}" + } + }, + "aws_iam_role_policy_attachment": { + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicyAttachment_5383D6A2": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRolePolicyAttachment", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicyAttachment_5383D6A2" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" + }, + "testGET--usershasdefaultcorsheaders_Handler_IamRolePolicyAttachment_50A99B49": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has default cors headers/Handler/IamRolePolicyAttachment", + "uniqueId": "testGET--usershasdefaultcorsheaders_Handler_IamRolePolicyAttachment_50A99B49" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testGET--usershasdefaultcorsheaders_Handler_IamRole_17E5D7FC.name}" + }, + "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRolePolicyAttachment_CF666F56": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has default cors headers/Handler/IamRolePolicyAttachment", + "uniqueId": "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRolePolicyAttachment_CF666F56" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testOPTIONS--usershasdefaultcorsheaders_Handler_IamRole_E58DF921.name}" + } + }, + "aws_lambda_function": { + "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/Default", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", + "WING_TARGET": "tf-aws" + } + }, + "function_name": "cloud-Api-OnRequest-cdafee6e-c8147384", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testGET--usershasdefaultcorsheaders_Handler_1182379A": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has default cors headers/Handler/Default", + "uniqueId": "testGET--usershasdefaultcorsheaders_Handler_1182379A" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c80c888e", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c80c888e", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testGET--usershasdefaultcorsheaders_Handler_IamRole_17E5D7FC.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testGET--usershasdefaultcorsheaders_Handler_S3Object_ADAE18A8.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testOPTIONS--usershasdefaultcorsheaders_Handler_D03A1BFF": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has default cors headers/Handler/Default", + "uniqueId": "testOPTIONS--usershasdefaultcorsheaders_Handler_D03A1BFF" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c82f7728", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c82f7728", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testOPTIONS--usershasdefaultcorsheaders_Handler_IamRole_E58DF921.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testOPTIONS--usershasdefaultcorsheaders_Handler_S3Object_2F99FE7D.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + } + }, + "aws_lambda_permission": { + "cloudApi_api_permission-GET-41f0e61d_DD9B4FD0": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-41f0e61d", + "uniqueId": "cloudApi_api_permission-GET-41f0e61d_DD9B4FD0" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/users", + "statement_id": "AllowExecutionFromAPIGateway-GET-41f0e61d" + } + }, + "aws_s3_bucket": { + "Code": { + "//": { + "metadata": { + "path": "root/Default/Code", + "uniqueId": "Code" + } + }, + "bucket_prefix": "code-c84a50b1-" + } + }, + "aws_s3_object": { + "cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/S3Object", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testGET--usershasdefaultcorsheaders_Handler_S3Object_ADAE18A8": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has default cors headers/Handler/S3Object", + "uniqueId": "testGET--usershasdefaultcorsheaders_Handler_S3Object_ADAE18A8" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testOPTIONS--usershasdefaultcorsheaders_Handler_S3Object_2F99FE7D": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has default cors headers/Handler/S3Object", + "uniqueId": "testOPTIONS--usershasdefaultcorsheaders_Handler_S3Object_2F99FE7D" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + } + } + } +} +``` + +## preflight.assertions-1.js +```js +module.exports = function({ $stdlib }) { + const std = $stdlib.std; + class Assert extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + } + static _toInflightType(context) { + return ` + require("./inflight.Assert-1.js")({ + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const AssertClient = ${Assert._toInflightType(this)}; + const client = new AssertClient({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["equalStr", "isNil", "equalNum", "$inflight_init"]; + } + } + return { Assert }; +}; + +``` + +## preflight.js +```js +const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); +const $outdir = process.env.WING_SYNTH_DIR ?? "."; +const $wing_is_test = process.env.WING_IS_TEST === "true"; +const std = $stdlib.std; +const cloud = $stdlib.cloud; +const ex = $stdlib.ex; +const http = $stdlib.http; +const t = require("./preflight.assertions-1.js")({ $stdlib }); +class $Root extends $stdlib.std.Resource { + constructor(scope, id) { + super(scope, id); + class $Closure1 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure1-2.js")({ + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure1Client = ${$Closure1._toInflightType(this)}; + const client = new $Closure1Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + } + class $Closure2 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure2-2.js")({ + $apiDefaultCors_url: ${context._lift(apiDefaultCors.url)}, + $http_Util: ${context._lift(http.Util)}, + $t_Assert: ${context._lift(t.Assert)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure2Client = ${$Closure2._toInflightType(this)}; + const client = new $Closure2Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure2._registerBindObject(apiDefaultCors.url, host, []); + } + super._registerBind(host, ops); + } + } + class $Closure3 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure3-2.js")({ + $apiDefaultCors_url: ${context._lift(apiDefaultCors.url)}, + $http_HttpMethod: ${context._lift(http.HttpMethod)}, + $http_Util: ${context._lift(http.Util)}, + $t_Assert: ${context._lift(t.Assert)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure3Client = ${$Closure3._toInflightType(this)}; + const client = new $Closure3Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure3._registerBindObject(apiDefaultCors.url, host, []); + } + super._registerBind(host, ops); + } + } + const apiDefaultCors = this.node.root.newAbstract("@winglang/sdk.cloud.Api",this,"cloud.Api",{ cors: true }); + (apiDefaultCors.get("/users",new $Closure1(this,"$Closure1"))); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:GET /users has default cors headers",new $Closure2(this,"$Closure2")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:OPTIONS /users has default cors headers",new $Closure3(this,"$Closure3")); + } +} +const $App = $stdlib.core.App.for(process.env.WING_TARGET); +new $App({ outdir: $outdir, name: "api_cors_default", rootConstruct: $Root, plugins: $plugins, isTestEnvironment: $wing_is_test, entrypointDir: process.env['WING_SOURCE_DIR'], rootId: process.env['WING_ROOT_ID'] }).synth(); + +``` + diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_cors_default.w_test_sim.md b/tools/hangar/__snapshots__/test_corpus/valid/api_cors_default.w_test_sim.md new file mode 100644 index 00000000000..0d49eac24f9 --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_cors_default.w_test_sim.md @@ -0,0 +1,13 @@ +# [api_cors_default.w](../../../../../examples/tests/valid/api_cors_default.w) | test | sim + +## stdout.log +```log +pass ─ api_cors_default.wsim » root/env0/test:GET --users has default cors headers +pass ─ api_cors_default.wsim » root/env1/test:OPTIONS --users has default cors headers + + +Tests 2 passed (2) +Test Files 1 passed (1) +Duration +``` + diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md index c2902ae8fbd..470e0a5e6dc 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_valid_path.w_compile_tf-aws.md @@ -85,7 +85,7 @@ module.exports = function({ }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/test\":{\"get\":{\"operationId\":\"get-test\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/alphanumer1cPa_th\":{\"get\":{\"operationId\":\"get-test/alphanumer1cPa_th\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/regular/path\":{\"get\":{\"operationId\":\"get-test/regular/path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/pa-th/{with}/two/{variable_s}/f?bla=5&b=6\":{\"get\":{\"operationId\":\"get-test/pa-th/{with}/two/{variable_s}/f?bla=5&b=6\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"with\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"variable_s\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/param/is/{last}\":{\"get\":{\"operationId\":\"get-test/param/is/{last}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"last\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/{param}\":{\"get\":{\"operationId\":\"get-test/{param}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"param\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{param}\":{\"get\":{\"operationId\":\"get-{param}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"param\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/t/{param}\":{\"get\":{\"operationId\":\"get-t/{param}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"param\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/regular/path/{param}\":{\"get\":{\"operationId\":\"get-test/regular/path/{param}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"param\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/segment1/{param1}/segment2?query1=value1?query2=value2\":{\"get\":{\"operationId\":\"get-test/segment1/{param1}/segment2?query1=value1?query2=value2\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"param1\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/segment1/segment2?query=value1&query2=value2\":{\"get\":{\"operationId\":\"get-test/segment1/segment2?query=value1&query2=value2\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/test\":{\"get\":{\"operationId\":\"get-test\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/alphanumer1cPa_th\":{\"get\":{\"operationId\":\"get-test/alphanumer1cPa_th\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/regular/path\":{\"get\":{\"operationId\":\"get-test/regular/path\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/pa-th/{with}/two/{variable_s}/f?bla=5&b=6\":{\"get\":{\"operationId\":\"get-test/pa-th/{with}/two/{variable_s}/f?bla=5&b=6\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"with\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"variable_s\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/param/is/{last}\":{\"get\":{\"operationId\":\"get-test/param/is/{last}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"last\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/{param}\":{\"get\":{\"operationId\":\"get-test/{param}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"param\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{param}\":{\"get\":{\"operationId\":\"get-{param}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"param\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/t/{param}\":{\"get\":{\"operationId\":\"get-t/{param}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"param\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/regular/path/{param}\":{\"get\":{\"operationId\":\"get-test/regular/path/{param}\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"param\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/segment1/{param1}/segment2?query1=value1?query2=value2\":{\"get\":{\"operationId\":\"get-test/segment1/{param1}/segment2?query1=value1?query2=value2\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[{\"name\":\"param1\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/test/segment1/segment2?query=value1&query2=value2\":{\"get\":{\"operationId\":\"get-test/segment1/segment2?query=value1&query2=value2\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n {\\\"statusCode\\\": 404}\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/assertions.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/assertions.w_compile_tf-aws.md new file mode 100644 index 00000000000..20388291ca6 --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/valid/assertions.w_compile_tf-aws.md @@ -0,0 +1,115 @@ +# [assertions.w](../../../../../examples/tests/valid/assertions.w) | compile | tf-aws + +## inflight.Assert-1.js +```js +module.exports = function({ }) { + class Assert { + static async equalStr(a, b) { + try { + {((cond) => {if (!cond) throw new Error("assertion failed: a == b")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(a,b)))}; + } + catch ($error_e) { + const e = $error_e.message; + throw new Error(String.raw({ raw: ["expected: ", " got: ", ""] }, b, a)); + } + } + static async isNil(a) { + try { + {((cond) => {if (!cond) throw new Error("assertion failed: a == nil")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(a,undefined)))}; + } + catch ($error_e) { + const e = $error_e.message; + {console.log(e)}; + throw new Error(String.raw({ raw: ["expected '", "' to be nil"] }, a)); + } + } + static async equalNum(a, b) { + try { + {((cond) => {if (!cond) throw new Error("assertion failed: a == b")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(a,b)))}; + } + catch ($error_e) { + const e = $error_e.message; + {console.log(e)}; + throw new Error(String.raw({ raw: ["expected: ", " got: ", ""] }, b, a)); + } + } + } + return Assert; +} + +``` + +## main.tf.json +```json +{ + "//": { + "metadata": { + "backend": "local", + "stackName": "root", + "version": "0.17.0" + }, + "outputs": { + "root": { + "Default": { + "cloud.TestRunner": { + "TestFunctionArns": "WING_TEST_RUNNER_FUNCTION_ARNS" + } + } + } + } + }, + "output": { + "WING_TEST_RUNNER_FUNCTION_ARNS": { + "value": "[]" + } + }, + "provider": { + "aws": [ + {} + ] + } +} +``` + +## preflight.js +```js +const $stdlib = require('@winglang/sdk'); +const $plugins = ((s) => !s ? [] : s.split(';'))(process.env.WING_PLUGIN_PATHS); +const $outdir = process.env.WING_SYNTH_DIR ?? "."; +const $wing_is_test = process.env.WING_IS_TEST === "true"; +const std = $stdlib.std; +class $Root extends $stdlib.std.Resource { + constructor(scope, id) { + super(scope, id); + class Assert extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + } + static _toInflightType(context) { + return ` + require("./inflight.Assert-1.js")({ + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const AssertClient = ${Assert._toInflightType(this)}; + const client = new AssertClient({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["equalStr", "isNil", "equalNum", "$inflight_init"]; + } + } + } +} +const $App = $stdlib.core.App.for(process.env.WING_TARGET); +new $App({ outdir: $outdir, name: "assertions", rootConstruct: $Root, plugins: $plugins, isTestEnvironment: $wing_is_test, entrypointDir: process.env['WING_SOURCE_DIR'], rootId: process.env['WING_ROOT_ID'] }).synth(); + +``` + diff --git a/tools/hangar/__snapshots__/test_corpus/valid/assertions.w_test_sim.md b/tools/hangar/__snapshots__/test_corpus/valid/assertions.w_test_sim.md new file mode 100644 index 00000000000..8b323291d09 --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/valid/assertions.w_test_sim.md @@ -0,0 +1,12 @@ +# [assertions.w](../../../../../examples/tests/valid/assertions.w) | test | sim + +## stdout.log +```log +pass ─ assertions.wsim (no tests) + + +Tests 1 passed (1) +Test Files 1 passed (1) +Duration +``` + diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md index ad5d79e6fd6..67f5e5dc666 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md @@ -140,7 +140,7 @@ module.exports = function({ }) { "uniqueId": "MyResource_cloudApi_api_4CB9B8E3" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n {\\\"statusCode\\\": 404}\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c8ef4b64" }, "cloudApi_api_2B334D75": { @@ -150,7 +150,7 @@ module.exports = function({ }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n {\\\"statusCode\\\": 404}\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md index de168c05e50..c58edcda9a2 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/captures.w_compile_tf-aws.md @@ -117,7 +117,7 @@ module.exports = function({ $headers }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/hello\":{\"get\":{\"operationId\":\"get-hello\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/hello\":{\"get\":{\"operationId\":\"get-hello\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n {\\\"statusCode\\\": 404}\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/cors_api.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/cors_api.w_compile_tf-aws.md new file mode 100644 index 00000000000..f122fea1769 --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/valid/cors_api.w_compile_tf-aws.md @@ -0,0 +1,1123 @@ +# [cors_api.w](../../../../../examples/tests/valid/cors_api.w) | compile | tf-aws + +## inflight.$Closure1-2.js +```js +module.exports = function({ }) { + class $Closure1 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle(req) { + return ({"body": "hello world","status": 200}); + } + } + return $Closure1; +} + +``` + +## inflight.$Closure2-2.js +```js +module.exports = function({ $apiDefaultCors_url, $http_HttpMethod, $http_Util, $t_Assert }) { + class $Closure2 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const response = (await $http_Util.fetch(($apiDefaultCors_url + "/users"),({"method": $http_HttpMethod.GET,"headers": ({"Content-Type": "text/json"})}))); + const headers = response.headers; + (await $t_Assert.equalNum(response.status,200)); + (await $t_Assert.equalStr((headers)["access-control-allow-origin"],"*")); + (await $t_Assert.equalStr((headers)["access-control-allow-credentials"],"false")); + (await $t_Assert.isNil((headers)["access-control-allow-headers"])); + (await $t_Assert.isNil((headers)["access-control-expose-headers"])); + (await $t_Assert.isNil((headers)["access-control-allow-methods"])); + } + } + return $Closure2; +} + +``` + +## inflight.$Closure3-2.js +```js +module.exports = function({ $apiDefaultCors_url, $http_HttpMethod, $http_Util, $t_Assert }) { + class $Closure3 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const response = (await $http_Util.fetch(($apiDefaultCors_url + "/users"),({"method": $http_HttpMethod.OPTIONS,"headers": ({"Content-Type": "text/json"})}))); + const headers = response.headers; + (await $t_Assert.equalNum(response.status,204)); + (await $t_Assert.equalStr((headers)["access-control-allow-origin"],"*")); + (await $t_Assert.equalStr((headers)["access-control-allow-methods"],"GET,HEAD,PUT,PATCH,POST,DELETE")); + (await $t_Assert.equalStr((headers)["access-control-allow-headers"],"Content-Type,Authorization")); + (await $t_Assert.equalStr((headers)["access-control-allow-credentials"],"false")); + (await $t_Assert.isNil((headers)["access-control-expose-headers"])); + } + } + return $Closure3; +} + +``` + +## inflight.$Closure4-2.js +```js +module.exports = function({ }) { + class $Closure4 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle(req) { + return ({"body": "hello world","status": 200}); + } + } + return $Closure4; +} + +``` + +## inflight.$Closure5-2.js +```js +module.exports = function({ $apiCustomCors_url, $http_HttpMethod, $http_Util, $t_Assert }) { + class $Closure5 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const response = (await $http_Util.fetch(($apiCustomCors_url + "/users"),({"method": $http_HttpMethod.GET,"headers": ({"Content-Type": "text/json"})}))); + const headers = response.headers; + (await $t_Assert.equalNum(response.status,200)); + (await $t_Assert.equalStr((headers)["access-control-allow-origin"],"winglang.io")); + (await $t_Assert.equalStr((headers)["access-control-allow-credentials"],"true")); + (await $t_Assert.equalStr((headers)["access-control-expose-headers"],"Content-Type")); + (await $t_Assert.isNil((headers)["access-control-allow-headers"])); + (await $t_Assert.isNil((headers)["access-control-allow-methods"])); + } + } + return $Closure5; +} + +``` + +## inflight.$Closure6-2.js +```js +module.exports = function({ $apiCustomCors_url, $http_HttpMethod, $http_Util, $t_Assert }) { + class $Closure6 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const response = (await $http_Util.fetch(($apiCustomCors_url + "/users"),({"method": $http_HttpMethod.OPTIONS,"headers": ({"Content-Type": "text/json"})}))); + const headers = response.headers; + (await $t_Assert.equalNum(response.status,204)); + (await $t_Assert.equalStr((headers)["access-control-allow-origin"],"winglang.io")); + (await $t_Assert.equalStr((headers)["access-control-allow-methods"],"GET,POST,OPTIONS")); + (await $t_Assert.equalStr((headers)["access-control-allow-headers"],"Content-Type,Authorization,X-Custom-Header")); + (await $t_Assert.equalStr((headers)["access-control-allow-credentials"],"true")); + (await $t_Assert.equalStr((headers)["access-control-expose-headers"],"Content-Type")); + } + } + return $Closure6; +} + +``` + +## inflight.$Closure7-2.js +```js +module.exports = function({ $apiCustomCors_url, $http_HttpMethod, $http_Util, $t_Assert }) { + class $Closure7 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const response = (await $http_Util.fetch(($apiCustomCors_url + "/users"),({"method": $http_HttpMethod.OPTIONS,"headers": ({"Content-Type": "text/json","Access-Control-Request-Method": "PUT","Access-Control-Request-Headers": "Content-Type,Authorization,X-Custom-Foo"})}))); + const headers = response.headers; + (await $t_Assert.equalNum(response.status,204)); + (await $t_Assert.equalStr((headers)["access-control-allow-origin"],"winglang.io")); + (await $t_Assert.equalStr((headers)["access-control-allow-methods"],"GET,POST,OPTIONS")); + (await $t_Assert.equalStr((headers)["access-control-allow-headers"],"Content-Type,Authorization,X-Custom-Header")); + (await $t_Assert.equalStr((headers)["access-control-allow-credentials"],"true")); + (await $t_Assert.equalStr((headers)["access-control-expose-headers"],"Content-Type")); + } + } + return $Closure7; +} + +``` + +## inflight.Assert-1.js +```js +module.exports = function({ }) { + class Assert { + static async equalStr(a, b) { + try { + {((cond) => {if (!cond) throw new Error("assertion failed: a == b")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(a,b)))}; + } + catch ($error_e) { + const e = $error_e.message; + {((msg) => {throw new Error(msg)})(String.raw({ raw: ["expected: ", " got: ", ""] }, b, a))}; + } + } + static async isNil(a) { + try { + {((cond) => {if (!cond) throw new Error("assertion failed: a == nil")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(a,undefined)))}; + } + catch ($error_e) { + const e = $error_e.message; + {console.log(e)}; + {((msg) => {throw new Error(msg)})(String.raw({ raw: ["expected '", "' to be nil"] }, a))}; + } + } + static async equalNum(a, b) { + try { + {((cond) => {if (!cond) throw new Error("assertion failed: a == b")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(a,b)))}; + } + catch ($error_e) { + const e = $error_e.message; + {console.log(e)}; + {((msg) => {throw new Error(msg)})(String.raw({ raw: ["expected: ", " got: ", ""] }, b, a))}; + } + } + } + return Assert; +} + +``` + +## main.tf.json +```json +{ + "//": { + "metadata": { + "backend": "local", + "stackName": "root", + "version": "0.17.0" + }, + "outputs": { + "root": { + "Default": { + "cloud.TestRunner": { + "TestFunctionArns": "WING_TEST_RUNNER_FUNCTION_ARNS" + } + } + } + } + }, + "data": { + "aws_region": { + "Region": { + "//": { + "metadata": { + "path": "root/Default/Region", + "uniqueId": "Region" + } + } + } + } + }, + "output": { + "WING_TEST_RUNNER_FUNCTION_ARNS": { + "value": "[[\"root/Default/Default/test:GET --users has default cors headers\",\"${aws_lambda_function.testGET--usershasdefaultcorsheaders_Handler_1182379A.arn}\"],[\"root/Default/Default/test:OPTIONS --users has default cors headers\",\"${aws_lambda_function.testOPTIONS--usershasdefaultcorsheaders_Handler_D03A1BFF.arn}\"],[\"root/Default/Default/test:GET --users has cors headers\",\"${aws_lambda_function.testGET--usershascorsheaders_Handler_E0F337CB.arn}\"],[\"root/Default/Default/test:OPTIONS --users has cors headers\",\"${aws_lambda_function.testOPTIONS--usershascorsheaders_Handler_3A565385.arn}\"],[\"root/Default/Default/test:OPTIONS --users responds with proper headers for requested\",\"${aws_lambda_function.testOPTIONS--usersrespondswithproperheadersforrequested_Handler_0A2AB662.arn}\"]]" + } + }, + "provider": { + "aws": [ + {} + ] + }, + "resource": { + "aws_api_gateway_deployment": { + "apiCustomCors_api_deployment_05CB4F30": { + "//": { + "metadata": { + "path": "root/Default/Default/apiCustomCors/api/deployment", + "uniqueId": "apiCustomCors_api_deployment_05CB4F30" + } + }, + "lifecycle": { + "create_before_destroy": true + }, + "rest_api_id": "${aws_api_gateway_rest_api.apiCustomCors_api_D8B9CD90.id}", + "triggers": { + "redeployment": "c01de636f4118b7353903b8f0e757abf473c0518" + } + }, + "cloudApi_api_deployment_545514BF": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/deployment", + "uniqueId": "cloudApi_api_deployment_545514BF" + } + }, + "lifecycle": { + "create_before_destroy": true + }, + "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", + "triggers": { + "redeployment": "b86a15a13275d206adddc5360e513fd5d0f527e6" + } + } + }, + "aws_api_gateway_rest_api": { + "apiCustomCors_api_D8B9CD90": { + "//": { + "metadata": { + "path": "root/Default/Default/apiCustomCors/api/api", + "uniqueId": "apiCustomCors_api_D8B9CD90" + } + }, + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users\":{\"get\":{\"operationId\":\"get-users\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.apiCustomCors_apiCustomCors-OnRequest-52bc3c17_E34A40CA.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}}}}", + "name": "api-c8efe62e" + }, + "cloudApi_api_2B334D75": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/api", + "uniqueId": "cloudApi_api_2B334D75" + } + }, + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users\":{\"get\":{\"operationId\":\"get-users\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}}}}", + "name": "api-c895068c" + } + }, + "aws_api_gateway_stage": { + "apiCustomCors_api_stage_F5D92865": { + "//": { + "metadata": { + "path": "root/Default/Default/apiCustomCors/api/stage", + "uniqueId": "apiCustomCors_api_stage_F5D92865" + } + }, + "deployment_id": "${aws_api_gateway_deployment.apiCustomCors_api_deployment_05CB4F30.id}", + "rest_api_id": "${aws_api_gateway_rest_api.apiCustomCors_api_D8B9CD90.id}", + "stage_name": "prod" + }, + "cloudApi_api_stage_BBB283E4": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/stage", + "uniqueId": "cloudApi_api_stage_BBB283E4" + } + }, + "deployment_id": "${aws_api_gateway_deployment.cloudApi_api_deployment_545514BF.id}", + "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", + "stage_name": "prod" + } + }, + "aws_iam_role": { + "apiCustomCors_apiCustomCors-OnRequest-52bc3c17_IamRole_692EAD85": { + "//": { + "metadata": { + "path": "root/Default/Default/apiCustomCors/apiCustomCors-OnRequest-52bc3c17/IamRole", + "uniqueId": "apiCustomCors_apiCustomCors-OnRequest-52bc3c17_IamRole_692EAD85" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRole", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testGET--usershascorsheaders_Handler_IamRole_6841C3FF": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has cors headers/Handler/IamRole", + "uniqueId": "testGET--usershascorsheaders_Handler_IamRole_6841C3FF" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testGET--usershasdefaultcorsheaders_Handler_IamRole_17E5D7FC": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has default cors headers/Handler/IamRole", + "uniqueId": "testGET--usershasdefaultcorsheaders_Handler_IamRole_17E5D7FC" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testOPTIONS--usershascorsheaders_Handler_IamRole_0EFF66BD": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has cors headers/Handler/IamRole", + "uniqueId": "testOPTIONS--usershascorsheaders_Handler_IamRole_0EFF66BD" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRole_E58DF921": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has default cors headers/Handler/IamRole", + "uniqueId": "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRole_E58DF921" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + }, + "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRole_4AB06A0F": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users responds with proper headers for requested/Handler/IamRole", + "uniqueId": "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRole_4AB06A0F" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + } + }, + "aws_iam_role_policy": { + "apiCustomCors_apiCustomCors-OnRequest-52bc3c17_IamRolePolicy_92D18911": { + "//": { + "metadata": { + "path": "root/Default/Default/apiCustomCors/apiCustomCors-OnRequest-52bc3c17/IamRolePolicy", + "uniqueId": "apiCustomCors_apiCustomCors-OnRequest-52bc3c17_IamRolePolicy_92D18911" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.apiCustomCors_apiCustomCors-OnRequest-52bc3c17_IamRole_692EAD85.name}" + }, + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicy_8BF9C89F": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRolePolicy", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicy_8BF9C89F" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" + }, + "testGET--usershascorsheaders_Handler_IamRolePolicy_BEF25776": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has cors headers/Handler/IamRolePolicy", + "uniqueId": "testGET--usershascorsheaders_Handler_IamRolePolicy_BEF25776" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testGET--usershascorsheaders_Handler_IamRole_6841C3FF.name}" + }, + "testGET--usershasdefaultcorsheaders_Handler_IamRolePolicy_F382BF6B": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has default cors headers/Handler/IamRolePolicy", + "uniqueId": "testGET--usershasdefaultcorsheaders_Handler_IamRolePolicy_F382BF6B" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testGET--usershasdefaultcorsheaders_Handler_IamRole_17E5D7FC.name}" + }, + "testOPTIONS--usershascorsheaders_Handler_IamRolePolicy_F6912B4F": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has cors headers/Handler/IamRolePolicy", + "uniqueId": "testOPTIONS--usershascorsheaders_Handler_IamRolePolicy_F6912B4F" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testOPTIONS--usershascorsheaders_Handler_IamRole_0EFF66BD.name}" + }, + "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRolePolicy_C496A648": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has default cors headers/Handler/IamRolePolicy", + "uniqueId": "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRolePolicy_C496A648" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testOPTIONS--usershasdefaultcorsheaders_Handler_IamRole_E58DF921.name}" + }, + "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRolePolicy_00E727F2": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users responds with proper headers for requested/Handler/IamRolePolicy", + "uniqueId": "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRolePolicy_00E727F2" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRole_4AB06A0F.name}" + } + }, + "aws_iam_role_policy_attachment": { + "apiCustomCors_apiCustomCors-OnRequest-52bc3c17_IamRolePolicyAttachment_9133AE8C": { + "//": { + "metadata": { + "path": "root/Default/Default/apiCustomCors/apiCustomCors-OnRequest-52bc3c17/IamRolePolicyAttachment", + "uniqueId": "apiCustomCors_apiCustomCors-OnRequest-52bc3c17_IamRolePolicyAttachment_9133AE8C" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.apiCustomCors_apiCustomCors-OnRequest-52bc3c17_IamRole_692EAD85.name}" + }, + "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicyAttachment_5383D6A2": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/IamRolePolicyAttachment", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_IamRolePolicyAttachment_5383D6A2" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" + }, + "testGET--usershascorsheaders_Handler_IamRolePolicyAttachment_54A08CCC": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has cors headers/Handler/IamRolePolicyAttachment", + "uniqueId": "testGET--usershascorsheaders_Handler_IamRolePolicyAttachment_54A08CCC" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testGET--usershascorsheaders_Handler_IamRole_6841C3FF.name}" + }, + "testGET--usershasdefaultcorsheaders_Handler_IamRolePolicyAttachment_50A99B49": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has default cors headers/Handler/IamRolePolicyAttachment", + "uniqueId": "testGET--usershasdefaultcorsheaders_Handler_IamRolePolicyAttachment_50A99B49" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testGET--usershasdefaultcorsheaders_Handler_IamRole_17E5D7FC.name}" + }, + "testOPTIONS--usershascorsheaders_Handler_IamRolePolicyAttachment_CA58727C": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has cors headers/Handler/IamRolePolicyAttachment", + "uniqueId": "testOPTIONS--usershascorsheaders_Handler_IamRolePolicyAttachment_CA58727C" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testOPTIONS--usershascorsheaders_Handler_IamRole_0EFF66BD.name}" + }, + "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRolePolicyAttachment_CF666F56": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has default cors headers/Handler/IamRolePolicyAttachment", + "uniqueId": "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRolePolicyAttachment_CF666F56" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testOPTIONS--usershasdefaultcorsheaders_Handler_IamRole_E58DF921.name}" + }, + "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRolePolicyAttachment_F702A7D9": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users responds with proper headers for requested/Handler/IamRolePolicyAttachment", + "uniqueId": "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRolePolicyAttachment_F702A7D9" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRole_4AB06A0F.name}" + } + }, + "aws_lambda_function": { + "apiCustomCors_apiCustomCors-OnRequest-52bc3c17_E34A40CA": { + "//": { + "metadata": { + "path": "root/Default/Default/apiCustomCors/apiCustomCors-OnRequest-52bc3c17/Default", + "uniqueId": "apiCustomCors_apiCustomCors-OnRequest-52bc3c17_E34A40CA" + } + }, + "environment": { + "variables": { + "WING_FUNCTION_NAME": "apiCustomCors-OnRequest-52bc3c17-c85c85c9", + "WING_TARGET": "tf-aws" + } + }, + "function_name": "apiCustomCors-OnRequest-52bc3c17-c85c85c9", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.apiCustomCors_apiCustomCors-OnRequest-52bc3c17_IamRole_692EAD85.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.apiCustomCors_apiCustomCors-OnRequest-52bc3c17_S3Object_40199F8B.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/Default", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" + } + }, + "environment": { + "variables": { + "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", + "WING_TARGET": "tf-aws" + } + }, + "function_name": "cloud-Api-OnRequest-cdafee6e-c8147384", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testGET--usershascorsheaders_Handler_E0F337CB": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has cors headers/Handler/Default", + "uniqueId": "testGET--usershascorsheaders_Handler_E0F337CB" + } + }, + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c8d51aba", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_54": "${jsonencode(aws_api_gateway_stage.apiCustomCors_api_stage_F5D92865.invoke_url)}" + } + }, + "function_name": "Handler-c8d51aba", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testGET--usershascorsheaders_Handler_IamRole_6841C3FF.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testGET--usershascorsheaders_Handler_S3Object_A63B28D3.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testGET--usershasdefaultcorsheaders_Handler_1182379A": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has default cors headers/Handler/Default", + "uniqueId": "testGET--usershasdefaultcorsheaders_Handler_1182379A" + } + }, + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c80c888e", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_7": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c80c888e", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testGET--usershasdefaultcorsheaders_Handler_IamRole_17E5D7FC.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testGET--usershasdefaultcorsheaders_Handler_S3Object_ADAE18A8.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testOPTIONS--usershascorsheaders_Handler_3A565385": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has cors headers/Handler/Default", + "uniqueId": "testOPTIONS--usershascorsheaders_Handler_3A565385" + } + }, + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c81c750d", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_54": "${jsonencode(aws_api_gateway_stage.apiCustomCors_api_stage_F5D92865.invoke_url)}" + } + }, + "function_name": "Handler-c81c750d", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testOPTIONS--usershascorsheaders_Handler_IamRole_0EFF66BD.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testOPTIONS--usershascorsheaders_Handler_S3Object_7EC6E95C.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testOPTIONS--usershasdefaultcorsheaders_Handler_D03A1BFF": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has default cors headers/Handler/Default", + "uniqueId": "testOPTIONS--usershasdefaultcorsheaders_Handler_D03A1BFF" + } + }, + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c82f7728", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_7": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c82f7728", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testOPTIONS--usershasdefaultcorsheaders_Handler_IamRole_E58DF921.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testOPTIONS--usershasdefaultcorsheaders_Handler_S3Object_2F99FE7D.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_0A2AB662": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users responds with proper headers for requested/Handler/Default", + "uniqueId": "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_0A2AB662" + } + }, + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c8aef6d3", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_54": "${jsonencode(aws_api_gateway_stage.apiCustomCors_api_stage_F5D92865.invoke_url)}" + } + }, + "function_name": "Handler-c8aef6d3", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRole_4AB06A0F.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testOPTIONS--usersrespondswithproperheadersforrequested_Handler_S3Object_0954ACCC.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + } + }, + "aws_lambda_permission": { + "apiCustomCors_api_permission-GET-41f0e61d_B09839FA": { + "//": { + "metadata": { + "path": "root/Default/Default/apiCustomCors/api/permission-GET-41f0e61d", + "uniqueId": "apiCustomCors_api_permission-GET-41f0e61d_B09839FA" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.apiCustomCors_apiCustomCors-OnRequest-52bc3c17_E34A40CA.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.apiCustomCors_api_D8B9CD90.execution_arn}/*/GET/users", + "statement_id": "AllowExecutionFromAPIGateway-GET-41f0e61d" + }, + "cloudApi_api_permission-GET-41f0e61d_DD9B4FD0": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/api/permission-GET-41f0e61d", + "uniqueId": "cloudApi_api_permission-GET-41f0e61d_DD9B4FD0" + } + }, + "action": "lambda:InvokeFunction", + "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.function_name}", + "principal": "apigateway.amazonaws.com", + "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/users", + "statement_id": "AllowExecutionFromAPIGateway-GET-41f0e61d" + } + }, + "aws_s3_bucket": { + "Code": { + "//": { + "metadata": { + "path": "root/Default/Code", + "uniqueId": "Code" + } + }, + "bucket_prefix": "code-c84a50b1-" + } + }, + "aws_s3_object": { + "apiCustomCors_apiCustomCors-OnRequest-52bc3c17_S3Object_40199F8B": { + "//": { + "metadata": { + "path": "root/Default/Default/apiCustomCors/apiCustomCors-OnRequest-52bc3c17/S3Object", + "uniqueId": "apiCustomCors_apiCustomCors-OnRequest-52bc3c17_S3Object_40199F8B" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF": { + "//": { + "metadata": { + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/S3Object", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testGET--usershascorsheaders_Handler_S3Object_A63B28D3": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has cors headers/Handler/S3Object", + "uniqueId": "testGET--usershascorsheaders_Handler_S3Object_A63B28D3" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testGET--usershasdefaultcorsheaders_Handler_S3Object_ADAE18A8": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users has default cors headers/Handler/S3Object", + "uniqueId": "testGET--usershasdefaultcorsheaders_Handler_S3Object_ADAE18A8" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testOPTIONS--usershascorsheaders_Handler_S3Object_7EC6E95C": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has cors headers/Handler/S3Object", + "uniqueId": "testOPTIONS--usershascorsheaders_Handler_S3Object_7EC6E95C" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testOPTIONS--usershasdefaultcorsheaders_Handler_S3Object_2F99FE7D": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users has default cors headers/Handler/S3Object", + "uniqueId": "testOPTIONS--usershasdefaultcorsheaders_Handler_S3Object_2F99FE7D" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_S3Object_0954ACCC": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users responds with proper headers for requested/Handler/S3Object", + "uniqueId": "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_S3Object_0954ACCC" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + } + } + } +} +``` + +## preflight.assertions-1.js +```js +module.exports = function({ $stdlib }) { + const std = $stdlib.std; + class Assert extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + this._addInflightOps("equalStr", "isNil", "equalNum", "$inflight_init"); + } + static _toInflightType(context) { + return $stdlib.core.NodeJsCode.fromInline(` + require("./inflight.Assert-1.js")({ + }) + `); + } + _toInflight() { + return $stdlib.core.NodeJsCode.fromInline(` + (await (async () => { + const AssertClient = ${Assert._toInflightType(this).text}; + const client = new AssertClient({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `); + } + } + return { Assert }; +}; + +``` + +## preflight.js +```js +const $stdlib = require('@winglang/sdk'); +const $outdir = process.env.WING_SYNTH_DIR ?? "."; +const $wing_is_test = process.env.WING_IS_TEST === "true"; +const std = $stdlib.std; +const cloud = $stdlib.cloud; +const ex = $stdlib.ex; +const http = $stdlib.http; +const t = require("./preflight.assertions-1.js")({ $stdlib }); +class $Root extends $stdlib.std.Resource { + constructor(scope, id) { + super(scope, id); + class $Closure1 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + this._addInflightOps("handle", "$inflight_init"); + this.display.hidden = true; + } + static _toInflightType(context) { + return $stdlib.core.NodeJsCode.fromInline(` + require("./inflight.$Closure1-2.js")({ + }) + `); + } + _toInflight() { + return $stdlib.core.NodeJsCode.fromInline(` + (await (async () => { + const $Closure1Client = ${$Closure1._toInflightType(this).text}; + const client = new $Closure1Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `); + } + } + class $Closure2 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + this._addInflightOps("handle", "$inflight_init"); + this.display.hidden = true; + } + static _toInflightType(context) { + return $stdlib.core.NodeJsCode.fromInline(` + require("./inflight.$Closure2-2.js")({ + $apiDefaultCors_url: ${context._lift(apiDefaultCors.url)}, + $http_HttpMethod: ${context._lift(http.HttpMethod)}, + $http_Util: ${context._lift(http.Util)}, + $t_Assert: ${context._lift(t.Assert)}, + }) + `); + } + _toInflight() { + return $stdlib.core.NodeJsCode.fromInline(` + (await (async () => { + const $Closure2Client = ${$Closure2._toInflightType(this).text}; + const client = new $Closure2Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `); + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure2._registerBindObject(apiDefaultCors.url, host, []); + } + super._registerBind(host, ops); + } + } + class $Closure3 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + this._addInflightOps("handle", "$inflight_init"); + this.display.hidden = true; + } + static _toInflightType(context) { + return $stdlib.core.NodeJsCode.fromInline(` + require("./inflight.$Closure3-2.js")({ + $apiDefaultCors_url: ${context._lift(apiDefaultCors.url)}, + $http_HttpMethod: ${context._lift(http.HttpMethod)}, + $http_Util: ${context._lift(http.Util)}, + $t_Assert: ${context._lift(t.Assert)}, + }) + `); + } + _toInflight() { + return $stdlib.core.NodeJsCode.fromInline(` + (await (async () => { + const $Closure3Client = ${$Closure3._toInflightType(this).text}; + const client = new $Closure3Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `); + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure3._registerBindObject(apiDefaultCors.url, host, []); + } + super._registerBind(host, ops); + } + } + class $Closure4 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + this._addInflightOps("handle", "$inflight_init"); + this.display.hidden = true; + } + static _toInflightType(context) { + return $stdlib.core.NodeJsCode.fromInline(` + require("./inflight.$Closure4-2.js")({ + }) + `); + } + _toInflight() { + return $stdlib.core.NodeJsCode.fromInline(` + (await (async () => { + const $Closure4Client = ${$Closure4._toInflightType(this).text}; + const client = new $Closure4Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `); + } + } + class $Closure5 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + this._addInflightOps("handle", "$inflight_init"); + this.display.hidden = true; + } + static _toInflightType(context) { + return $stdlib.core.NodeJsCode.fromInline(` + require("./inflight.$Closure5-2.js")({ + $apiCustomCors_url: ${context._lift(apiCustomCors.url)}, + $http_HttpMethod: ${context._lift(http.HttpMethod)}, + $http_Util: ${context._lift(http.Util)}, + $t_Assert: ${context._lift(t.Assert)}, + }) + `); + } + _toInflight() { + return $stdlib.core.NodeJsCode.fromInline(` + (await (async () => { + const $Closure5Client = ${$Closure5._toInflightType(this).text}; + const client = new $Closure5Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `); + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure5._registerBindObject(apiCustomCors.url, host, []); + } + super._registerBind(host, ops); + } + } + class $Closure6 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + this._addInflightOps("handle", "$inflight_init"); + this.display.hidden = true; + } + static _toInflightType(context) { + return $stdlib.core.NodeJsCode.fromInline(` + require("./inflight.$Closure6-2.js")({ + $apiCustomCors_url: ${context._lift(apiCustomCors.url)}, + $http_HttpMethod: ${context._lift(http.HttpMethod)}, + $http_Util: ${context._lift(http.Util)}, + $t_Assert: ${context._lift(t.Assert)}, + }) + `); + } + _toInflight() { + return $stdlib.core.NodeJsCode.fromInline(` + (await (async () => { + const $Closure6Client = ${$Closure6._toInflightType(this).text}; + const client = new $Closure6Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `); + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure6._registerBindObject(apiCustomCors.url, host, []); + } + super._registerBind(host, ops); + } + } + class $Closure7 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + this._addInflightOps("handle", "$inflight_init"); + this.display.hidden = true; + } + static _toInflightType(context) { + return $stdlib.core.NodeJsCode.fromInline(` + require("./inflight.$Closure7-2.js")({ + $apiCustomCors_url: ${context._lift(apiCustomCors.url)}, + $http_HttpMethod: ${context._lift(http.HttpMethod)}, + $http_Util: ${context._lift(http.Util)}, + $t_Assert: ${context._lift(t.Assert)}, + }) + `); + } + _toInflight() { + return $stdlib.core.NodeJsCode.fromInline(` + (await (async () => { + const $Closure7Client = ${$Closure7._toInflightType(this).text}; + const client = new $Closure7Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `); + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure7._registerBindObject(apiCustomCors.url, host, []); + } + super._registerBind(host, ops); + } + } + const apiDefaultCors = this.node.root.newAbstract("@winglang/sdk.cloud.Api",this,"cloud.Api",{ cors: ({}) }); + const getHandler = new $Closure1(this,"$Closure1"); + (apiDefaultCors.get("/users",getHandler)); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:GET /users has default cors headers",new $Closure2(this,"$Closure2")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:OPTIONS /users has default cors headers",new $Closure3(this,"$Closure3")); + const apiCustomCors = this.node.root.newAbstract("@winglang/sdk.cloud.Api",this,"apiCustomCors",{ cors: ({"origins": ["winglang.io"],"methods": [cloud.HttpMethod.GET, cloud.HttpMethod.POST, cloud.HttpMethod.OPTIONS],"headers": ["Content-Type", "Authorization", "X-Custom-Header"],"allowCredentials": true,"exposedHeaders": ["Content-Type"]}) }); + const getCustomHandler = new $Closure4(this,"$Closure4"); + (apiCustomCors.get("/users",getCustomHandler)); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:GET /users has cors headers",new $Closure5(this,"$Closure5")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:OPTIONS /users has cors headers",new $Closure6(this,"$Closure6")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:OPTIONS /users responds with proper headers for requested",new $Closure7(this,"$Closure7")); + } +} +const $App = $stdlib.core.App.for(process.env.WING_TARGET); +new $App({ outdir: $outdir, name: "cors_api", rootConstruct: $Root, plugins: $plugins, isTestEnvironment: $wing_is_test, entrypointDir: process.env['WING_SOURCE_DIR'], rootId: process.env['WING_ROOT_ID'] }).synth(); + +``` + diff --git a/tools/hangar/__snapshots__/test_corpus/valid/cors_api.w_test_sim.md b/tools/hangar/__snapshots__/test_corpus/valid/cors_api.w_test_sim.md new file mode 100644 index 00000000000..41b41114956 --- /dev/null +++ b/tools/hangar/__snapshots__/test_corpus/valid/cors_api.w_test_sim.md @@ -0,0 +1,16 @@ +# [cors_api.w](../../../../../examples/tests/valid/cors_api.w) | test | sim + +## stdout.log +```log +pass ─ cors_api.wsim » root/env0/test:GET --users has default cors headers +pass ─ cors_api.wsim » root/env1/test:OPTIONS --users has default cors headers +pass ─ cors_api.wsim » root/env2/test:GET --users has cors headers +pass ─ cors_api.wsim » root/env3/test:OPTIONS --users has cors headers +pass ─ cors_api.wsim » root/env4/test:OPTIONS --users responds with proper headers for requested + + +Tests 5 passed (5) +Test Files 1 passed (1) +Duration +``` + diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md index f86901b1d16..877bd5838f5 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inference.w_compile_tf-aws.md @@ -85,7 +85,7 @@ module.exports = function({ }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/hello/world\":{\"get\":{\"operationId\":\"get-hello/world\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/hello/world\":{\"get\":{\"operationId\":\"get-hello/world\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n {\\\"statusCode\\\": 404}\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md index 1941063f61e..19a370efafd 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md @@ -107,7 +107,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/foo\":{\"get\":{\"operationId\":\"get-foo\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/foo\":{\"get\":{\"operationId\":\"get-foo\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n {\\\"statusCode\\\": 404}\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, diff --git a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md index 0db07378045..c95419f312e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md @@ -1,6 +1,6 @@ # [website_with_api.w](../../../../../examples/tests/valid/website_with_api.w) | compile | tf-aws -## inflight.$Closure1-1.js +## inflight.$Closure1-2.js ```js module.exports = function({ $std_Json, $usersTable }) { class $Closure1 { @@ -18,7 +18,7 @@ module.exports = function({ $std_Json, $usersTable }) { ``` -## inflight.$Closure2-1.js +## inflight.$Closure2-2.js ```js module.exports = function({ $std_Json, $usersTable }) { class $Closure2 { @@ -41,17 +41,24 @@ module.exports = function({ $std_Json, $usersTable }) { ``` -## inflight.$Closure3-1.js +## inflight.$Closure3-2.js ```js -module.exports = function({ }) { +module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $t_Assert }) { class $Closure3 { constructor({ }) { const $obj = (...args) => this.handle(...args); Object.setPrototypeOf($obj, this); return $obj; } - async handle(req) { - return ({"headers": ({"Access-Control-Allow-Headers": "Content-Type","Access-Control-Allow-Origin": "*","Access-Control-Allow-Methods": "OPTIONS,POST,GET"}),"status": 204}); + async handle() { + const response = (await $http_Util.fetch(($api_url + "/users"),({"method": $http_HttpMethod.GET,"headers": ({"Content-Type": "text/json"})}))); + const headers = response.headers; + (await $t_Assert.equalNum(response.status,200)); + (await $t_Assert.equalStr((headers)["access-control-allow-origin"],"*")); + (await $t_Assert.equalStr((headers)["access-control-expose-headers"],"Content-Type")); + (await $t_Assert.equalStr((headers)["access-control-allow-credentials"],"false")); + (await $t_Assert.isNil((headers)["access-control-allow-headers"])); + (await $t_Assert.isNil((headers)["access-control-allow-methods"])); } } return $Closure3; @@ -59,6 +66,67 @@ module.exports = function({ }) { ``` +## inflight.$Closure4-2.js +```js +module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $t_Assert }) { + class $Closure4 { + constructor({ }) { + const $obj = (...args) => this.handle(...args); + Object.setPrototypeOf($obj, this); + return $obj; + } + async handle() { + const response = (await $http_Util.fetch(($api_url + "/users"),({"method": $http_HttpMethod.OPTIONS,"headers": ({"Content-Type": "text/json"})}))); + const headers = response.headers; + (await $t_Assert.equalNum(response.status,204)); + (await $t_Assert.equalStr((headers)["access-control-allow-methods"],"GET,POST,OPTIONS")); + (await $t_Assert.equalStr((headers)["access-control-allow-headers"],"Content-Type")); + } + } + return $Closure4; +} + +``` + +## inflight.Assert-1.js +```js +module.exports = function({ }) { + class Assert { + static async equalStr(a, b) { + try { + {((cond) => {if (!cond) throw new Error("assertion failed: a == b")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(a,b)))}; + } + catch ($error_e) { + const e = $error_e.message; + throw new Error(String.raw({ raw: ["expected: ", " got: ", ""] }, b, a)); + } + } + static async isNil(a) { + try { + {((cond) => {if (!cond) throw new Error("assertion failed: a == nil")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(a,undefined)))}; + } + catch ($error_e) { + const e = $error_e.message; + {console.log(e)}; + throw new Error(String.raw({ raw: ["expected '", "' to be nil"] }, a)); + } + } + static async equalNum(a, b) { + try { + {((cond) => {if (!cond) throw new Error("assertion failed: a == b")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })(a,b)))}; + } + catch ($error_e) { + const e = $error_e.message; + {console.log(e)}; + throw new Error(String.raw({ raw: ["expected: ", " got: ", ""] }, b, a)); + } + } + } + return Assert; +} + +``` + ## main.tf.json ```json { @@ -129,7 +197,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[]" + "value": "[[\"root/Default/Default/test:GET --users\",\"${aws_lambda_function.testGET--users_Handler_5E592AA6.arn}\"],[\"root/Default/Default/test:OPTIONS --users\",\"${aws_lambda_function.testOPTIONS--users_Handler_01361C41.arn}\"]]" } }, "provider": { @@ -163,7 +231,7 @@ module.exports = function({ }) { "uniqueId": "cloudApi_api_2B334D75" } }, - "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users\":{\"get\":{\"operationId\":\"get-users\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}},\"post\":{\"operationId\":\"post-users\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}},\"options\":{\"operationId\":\"options-users\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-3fc9280c_5DA20E7A.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"consumes\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404}\"},\"responses\":{\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode: 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", + "body": "{\"openapi\":\"3.0.3\",\"paths\":{\"/users\":{\"get\":{\"operationId\":\"get-users\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{},\"headers\":{\"Access-Control-Allow-Origin\":{\"schema\":{\"type\":\"string\"}},\"Access-Control-Allow-Methods\":{\"schema\":{\"type\":\"string\"}},\"Access-Control-Allow-Headers\":{\"schema\":{\"type\":\"string\"}}}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}},\"post\":{\"operationId\":\"post-users\",\"responses\":{\"200\":{\"description\":\"200 response\",\"content\":{},\"headers\":{\"Access-Control-Allow-Origin\":{\"schema\":{\"type\":\"string\"}},\"Access-Control-Allow-Methods\":{\"schema\":{\"type\":\"string\"}},\"Access-Control-Allow-Headers\":{\"schema\":{\"type\":\"string\"}}}}},\"parameters\":[],\"x-amazon-apigateway-integration\":{\"uri\":\"arn:aws:apigateway:${data.aws_region.Region.name}:lambda:path/2015-03-31/functions/${aws_lambda_function.cloudApi_cloudApi-OnRequest-86898773_701F5CA7.arn}/invocations\",\"type\":\"aws_proxy\",\"httpMethod\":\"POST\",\"responses\":{\"default\":{\"statusCode\":\"200\"}},\"passthroughBehavior\":\"when_no_match\",\"contentHandling\":\"CONVERT_TO_TEXT\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"produces\":[\"application/json\"],\"x-amazon-apigateway-integration\":{\"type\":\"mock\",\"requestTemplates\":{\"application/json\":\"\\n #if ($context.httpMethod == \\\"OPTIONS\\\")\\n {\\\"statusCode\\\": 204}\\n #else\\n {\\\"statusCode\\\": 404}\\n #end\\n \"},\"passthroughBehavior\":\"never\",\"responses\":{\"204\":{\"statusCode\":\"204\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\",\"method.response.header.Access-Control-Allow-Origin\":\"'*'\",\"method.response.header.Access-Control-Allow-Methods\":\"'GET,POST,OPTIONS'\",\"method.response.header.Access-Control-Allow-Headers\":\"'Content-Type'\"},\"responseTemplates\":{\"application/json\":\"{}\"}},\"404\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}},\"default\":{\"statusCode\":\"404\",\"responseParameters\":{\"method.response.header.Content-Type\":\"'application/json'\"},\"responseTemplates\":{\"application/json\":\"{\\\"statusCode\\\": 404, \\\"message\\\": \\\"Error: Resource not found\\\"}\"}}}},\"responses\":{\"204\":{\"description\":\"204 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"},\"Access-Control-Allow-Origin\":{\"type\":\"string\"},\"Access-Control-Allow-Methods\":{\"type\":\"string\"},\"Access-Control-Allow-Headers\":{\"type\":\"string\"}}},\"404\":{\"description\":\"404 response\",\"headers\":{\"Content-Type\":{\"type\":\"string\"}}}}}}}}", "name": "api-c895068c" } }, @@ -265,15 +333,6 @@ module.exports = function({ }) { } }, "aws_iam_role": { - "cloudApi_cloudApi-OnRequest-3fc9280c_IamRole_EBC99528": { - "//": { - "metadata": { - "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-3fc9280c/IamRole", - "uniqueId": "cloudApi_cloudApi-OnRequest-3fc9280c_IamRole_EBC99528" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, "cloudApi_cloudApi-OnRequest-86898773_IamRole_6300C24F": { "//": { "metadata": { @@ -291,19 +350,27 @@ module.exports = function({ }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "cloudApi_cloudApi-OnRequest-3fc9280c_IamRolePolicy_1552D6FE": { + }, + "testGET--users_Handler_IamRole_3C6B1A52": { "//": { "metadata": { - "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-3fc9280c/IamRolePolicy", - "uniqueId": "cloudApi_cloudApi-OnRequest-3fc9280c_IamRolePolicy_1552D6FE" + "path": "root/Default/Default/test:GET --users/Handler/IamRole", + "uniqueId": "testGET--users_Handler_IamRole_3C6B1A52" } }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-3fc9280c_IamRole_EBC99528.name}" + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" }, + "testOPTIONS--users_Handler_IamRole_F9362AB0": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users/Handler/IamRole", + "uniqueId": "testOPTIONS--users_Handler_IamRole_F9362AB0" + } + }, + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" + } + }, + "aws_iam_role_policy": { "cloudApi_cloudApi-OnRequest-86898773_IamRolePolicy_DAC639E5": { "//": { "metadata": { @@ -323,19 +390,29 @@ module.exports = function({ }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:Scan\"],\"Resource\":[\"${aws_dynamodb_table.exTable.arn}\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - } - }, - "aws_iam_role_policy_attachment": { - "cloudApi_cloudApi-OnRequest-3fc9280c_IamRolePolicyAttachment_A988C18B": { + }, + "testGET--users_Handler_IamRolePolicy_70F076F2": { "//": { "metadata": { - "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-3fc9280c/IamRolePolicyAttachment", - "uniqueId": "cloudApi_cloudApi-OnRequest-3fc9280c_IamRolePolicyAttachment_A988C18B" + "path": "root/Default/Default/test:GET --users/Handler/IamRolePolicy", + "uniqueId": "testGET--users_Handler_IamRolePolicy_70F076F2" } }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-3fc9280c_IamRole_EBC99528.name}" + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testGET--users_Handler_IamRole_3C6B1A52.name}" }, + "testOPTIONS--users_Handler_IamRolePolicy_E1FFA7C9": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users/Handler/IamRolePolicy", + "uniqueId": "testOPTIONS--users_Handler_IamRolePolicy_E1FFA7C9" + } + }, + "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", + "role": "${aws_iam_role.testOPTIONS--users_Handler_IamRole_F9362AB0.name}" + } + }, + "aws_iam_role_policy_attachment": { "cloudApi_cloudApi-OnRequest-86898773_IamRolePolicyAttachment_6E485A17": { "//": { "metadata": { @@ -355,14 +432,34 @@ module.exports = function({ }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" + }, + "testGET--users_Handler_IamRolePolicyAttachment_CE57C035": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users/Handler/IamRolePolicyAttachment", + "uniqueId": "testGET--users_Handler_IamRolePolicyAttachment_CE57C035" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testGET--users_Handler_IamRole_3C6B1A52.name}" + }, + "testOPTIONS--users_Handler_IamRolePolicyAttachment_41F75288": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users/Handler/IamRolePolicyAttachment", + "uniqueId": "testOPTIONS--users_Handler_IamRolePolicyAttachment_41F75288" + } + }, + "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", + "role": "${aws_iam_role.testOPTIONS--users_Handler_IamRole_F9362AB0.name}" } }, "aws_lambda_function": { - "cloudApi_cloudApi-OnRequest-3fc9280c_5DA20E7A": { + "cloudApi_cloudApi-OnRequest-86898773_701F5CA7": { "//": { "metadata": { - "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-3fc9280c/Default", - "uniqueId": "cloudApi_cloudApi-OnRequest-3fc9280c_5DA20E7A" + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-86898773/Default", + "uniqueId": "cloudApi_cloudApi-OnRequest-86898773_701F5CA7" } }, "architectures": [ @@ -370,28 +467,31 @@ module.exports = function({ }) { ], "environment": { "variables": { - "WING_FUNCTION_NAME": "cloud-Api-OnRequest-3fc9280c-c8d3ecf9", + "DYNAMODB_TABLE_NAME_d5d44f18": "${aws_dynamodb_table.exTable.name}", + "DYNAMODB_TABLE_NAME_d5d44f18_COLUMNS": "{\"id\":0,\"name\":0,\"age\":1}", + "DYNAMODB_TABLE_NAME_d5d44f18_PRIMARY_KEY": "id", + "WING_FUNCTION_NAME": "cloud-Api-OnRequest-86898773-c8ed6547", "WING_TARGET": "tf-aws" } }, - "function_name": "cloud-Api-OnRequest-3fc9280c-c8d3ecf9", + "function_name": "cloud-Api-OnRequest-86898773-c8ed6547", "handler": "index.handler", "publish": true, - "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-3fc9280c_IamRole_EBC99528.arn}", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-86898773_IamRole_6300C24F.arn}", "runtime": "nodejs18.x", "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.cloudApi_cloudApi-OnRequest-3fc9280c_S3Object_EC722CF3.key}", + "s3_key": "${aws_s3_object.cloudApi_cloudApi-OnRequest-86898773_S3Object_12D28469.key}", "timeout": 30, "vpc_config": { "security_group_ids": [], "subnet_ids": [] } }, - "cloudApi_cloudApi-OnRequest-86898773_701F5CA7": { + "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F": { "//": { "metadata": { - "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-86898773/Default", - "uniqueId": "cloudApi_cloudApi-OnRequest-86898773_701F5CA7" + "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/Default", + "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" } }, "architectures": [ @@ -402,28 +502,28 @@ module.exports = function({ }) { "DYNAMODB_TABLE_NAME_d5d44f18": "${aws_dynamodb_table.exTable.name}", "DYNAMODB_TABLE_NAME_d5d44f18_COLUMNS": "{\"id\":0,\"name\":0,\"age\":1}", "DYNAMODB_TABLE_NAME_d5d44f18_PRIMARY_KEY": "id", - "WING_FUNCTION_NAME": "cloud-Api-OnRequest-86898773-c8ed6547", + "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", "WING_TARGET": "tf-aws" } }, - "function_name": "cloud-Api-OnRequest-86898773-c8ed6547", + "function_name": "cloud-Api-OnRequest-cdafee6e-c8147384", "handler": "index.handler", "publish": true, - "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-86898773_IamRole_6300C24F.arn}", + "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.arn}", "runtime": "nodejs18.x", "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.cloudApi_cloudApi-OnRequest-86898773_S3Object_12D28469.key}", + "s3_key": "${aws_s3_object.cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF.key}", "timeout": 30, "vpc_config": { "security_group_ids": [], "subnet_ids": [] } }, - "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F": { + "testGET--users_Handler_5E592AA6": { "//": { "metadata": { - "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-cdafee6e/Default", - "uniqueId": "cloudApi_cloudApi-OnRequest-cdafee6e_A6C8366F" + "path": "root/Default/Default/test:GET --users/Handler/Default", + "uniqueId": "testGET--users_Handler_5E592AA6" } }, "architectures": [ @@ -431,20 +531,48 @@ module.exports = function({ }) { ], "environment": { "variables": { - "DYNAMODB_TABLE_NAME_d5d44f18": "${aws_dynamodb_table.exTable.name}", - "DYNAMODB_TABLE_NAME_d5d44f18_COLUMNS": "{\"id\":0,\"name\":0,\"age\":1}", - "DYNAMODB_TABLE_NAME_d5d44f18_PRIMARY_KEY": "id", - "WING_FUNCTION_NAME": "cloud-Api-OnRequest-cdafee6e-c8147384", - "WING_TARGET": "tf-aws" + "WING_FUNCTION_NAME": "Handler-c86bda55", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" } }, - "function_name": "cloud-Api-OnRequest-cdafee6e-c8147384", + "function_name": "Handler-c86bda55", "handler": "index.handler", "publish": true, - "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.arn}", + "role": "${aws_iam_role.testGET--users_Handler_IamRole_3C6B1A52.arn}", "runtime": "nodejs18.x", "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.cloudApi_cloudApi-OnRequest-cdafee6e_S3Object_5DAAA0EF.key}", + "s3_key": "${aws_s3_object.testGET--users_Handler_S3Object_8248DE4B.key}", + "timeout": 30, + "vpc_config": { + "security_group_ids": [], + "subnet_ids": [] + } + }, + "testOPTIONS--users_Handler_01361C41": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users/Handler/Default", + "uniqueId": "testOPTIONS--users_Handler_01361C41" + } + }, + "architectures": [ + "arm64" + ], + "environment": { + "variables": { + "WING_FUNCTION_NAME": "Handler-c8b7642e", + "WING_TARGET": "tf-aws", + "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" + } + }, + "function_name": "Handler-c8b7642e", + "handler": "index.handler", + "publish": true, + "role": "${aws_iam_role.testOPTIONS--users_Handler_IamRole_F9362AB0.arn}", + "runtime": "nodejs18.x", + "s3_bucket": "${aws_s3_bucket.Code.bucket}", + "s3_key": "${aws_s3_object.testOPTIONS--users_Handler_S3Object_C0C4A75C.key}", "timeout": 30, "vpc_config": { "security_group_ids": [], @@ -466,19 +594,6 @@ module.exports = function({ }) { "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/GET/users", "statement_id": "AllowExecutionFromAPIGateway-GET-41f0e61d" }, - "cloudApi_api_permission-OPTIONS-41f0e61d_12224EFF": { - "//": { - "metadata": { - "path": "root/Default/Default/cloud.Api/api/permission-OPTIONS-41f0e61d", - "uniqueId": "cloudApi_api_permission-OPTIONS-41f0e61d_12224EFF" - } - }, - "action": "lambda:InvokeFunction", - "function_name": "${aws_lambda_function.cloudApi_cloudApi-OnRequest-3fc9280c_5DA20E7A.function_name}", - "principal": "apigateway.amazonaws.com", - "source_arn": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.execution_arn}/*/OPTIONS/users", - "statement_id": "AllowExecutionFromAPIGateway-OPTIONS-41f0e61d" - }, "cloudApi_api_permission-POST-41f0e61d_743604B6": { "//": { "metadata": { @@ -559,17 +674,6 @@ module.exports = function({ }) { } }, "aws_s3_object": { - "cloudApi_cloudApi-OnRequest-3fc9280c_S3Object_EC722CF3": { - "//": { - "metadata": { - "path": "root/Default/Default/cloud.Api/cloud.Api-OnRequest-3fc9280c/S3Object", - "uniqueId": "cloudApi_cloudApi-OnRequest-3fc9280c_S3Object_EC722CF3" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, "cloudApi_cloudApi-OnRequest-86898773_S3Object_12D28469": { "//": { "metadata": { @@ -622,12 +726,68 @@ module.exports = function({ }) { "aws_s3_bucket.cloudWebsite_WebsiteBucket_EB03D355" ], "key": "config.json" + }, + "testGET--users_Handler_S3Object_8248DE4B": { + "//": { + "metadata": { + "path": "root/Default/Default/test:GET --users/Handler/S3Object", + "uniqueId": "testGET--users_Handler_S3Object_8248DE4B" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" + }, + "testOPTIONS--users_Handler_S3Object_C0C4A75C": { + "//": { + "metadata": { + "path": "root/Default/Default/test:OPTIONS --users/Handler/S3Object", + "uniqueId": "testOPTIONS--users_Handler_S3Object_C0C4A75C" + } + }, + "bucket": "${aws_s3_bucket.Code.bucket}", + "key": "", + "source": "" } } } } ``` +## preflight.assertions-1.js +```js +module.exports = function({ $stdlib }) { + const std = $stdlib.std; + class Assert extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + } + static _toInflightType(context) { + return ` + require("./inflight.Assert-1.js")({ + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const AssertClient = ${Assert._toInflightType(this)}; + const client = new AssertClient({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["equalStr", "isNil", "equalNum", "$inflight_init"]; + } + } + return { Assert }; +}; + +``` + ## preflight.js ```js const $stdlib = require('@winglang/sdk'); @@ -637,6 +797,8 @@ const $wing_is_test = process.env.WING_IS_TEST === "true"; const std = $stdlib.std; const cloud = $stdlib.cloud; const ex = $stdlib.ex; +const http = $stdlib.http; +const t = require("./preflight.assertions-1.js")({ $stdlib }); class $Root extends $stdlib.std.Resource { constructor(scope, id) { super(scope, id); @@ -647,7 +809,7 @@ class $Root extends $stdlib.std.Resource { } static _toInflightType(context) { return ` - require("./inflight.$Closure1-1.js")({ + require("./inflight.$Closure1-2.js")({ $std_Json: ${context._lift(std.Json)}, $usersTable: ${context._lift(usersTable)}, }) @@ -681,7 +843,7 @@ class $Root extends $stdlib.std.Resource { } static _toInflightType(context) { return ` - require("./inflight.$Closure2-1.js")({ + require("./inflight.$Closure2-2.js")({ $std_Json: ${context._lift(std.Json)}, $usersTable: ${context._lift(usersTable)}, }) @@ -715,7 +877,11 @@ class $Root extends $stdlib.std.Resource { } static _toInflightType(context) { return ` - require("./inflight.$Closure3-1.js")({ + require("./inflight.$Closure3-2.js")({ + $api_url: ${context._lift(api.url)}, + $http_HttpMethod: ${context._lift(http.HttpMethod)}, + $http_Util: ${context._lift(http.Util)}, + $t_Assert: ${context._lift(t.Assert)}, }) `; } @@ -733,17 +899,59 @@ class $Root extends $stdlib.std.Resource { _getInflightOps() { return ["handle", "$inflight_init"]; } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure3._registerBindObject(api.url, host, []); + } + super._registerBind(host, ops); + } + } + class $Closure4 extends $stdlib.std.Resource { + constructor(scope, id, ) { + super(scope, id); + (std.Node.of(this)).hidden = true; + } + static _toInflightType(context) { + return ` + require("./inflight.$Closure4-2.js")({ + $api_url: ${context._lift(api.url)}, + $http_HttpMethod: ${context._lift(http.HttpMethod)}, + $http_Util: ${context._lift(http.Util)}, + $t_Assert: ${context._lift(t.Assert)}, + }) + `; + } + _toInflight() { + return ` + (await (async () => { + const $Closure4Client = ${$Closure4._toInflightType(this)}; + const client = new $Closure4Client({ + }); + if (client.$inflight_init) { await client.$inflight_init(); } + return client; + })()) + `; + } + _getInflightOps() { + return ["handle", "$inflight_init"]; + } + _registerBind(host, ops) { + if (ops.includes("handle")) { + $Closure4._registerBindObject(api.url, host, []); + } + super._registerBind(host, ops); + } } - const api = this.node.root.newAbstract("@winglang/sdk.cloud.Api",this,"cloud.Api"); + const api = this.node.root.newAbstract("@winglang/sdk.cloud.Api",this,"cloud.Api",{ cors: true, corsOptions: ({"allowOrigin": ["*"],"allowMethods": [cloud.HttpMethod.GET, cloud.HttpMethod.POST, cloud.HttpMethod.OPTIONS],"allowHeaders": ["Content-Type"],"allowCredentials": false,"exposeHeaders": ["Content-Type"]}) }); const website = this.node.root.newAbstract("@winglang/sdk.cloud.Website",this,"cloud.Website",{ path: "./website_with_api" }); const usersTable = this.node.root.newAbstract("@winglang/sdk.ex.Table",this,"ex.Table",{ name: "users-table", primaryKey: "id", columns: ({"id": ex.ColumnType.STRING,"name": ex.ColumnType.STRING,"age": ex.ColumnType.NUMBER}) }); const getHandler = new $Closure1(this,"$Closure1"); const postHandler = new $Closure2(this,"$Closure2"); - const optionsHandler = new $Closure3(this,"$Closure3"); (api.get("/users",getHandler)); (api.post("/users",postHandler)); - (api.options("/users",optionsHandler)); (website.addJson("config.json",({"apiUrl": api.url}))); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:GET /users",new $Closure3(this,"$Closure3")); + this.node.root.new("@winglang/sdk.std.Test",std.Test,this,"test:OPTIONS /users",new $Closure4(this,"$Closure4")); } } const $App = $stdlib.core.App.for(process.env.WING_TARGET); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_test_sim.md b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_test_sim.md index d722e2edca8..ea41650b9b8 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_test_sim.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_test_sim.md @@ -2,10 +2,11 @@ ## stdout.log ```log -pass ─ website_with_api.wsim (no tests) +pass ─ website_with_api.wsim » root/env0/test:GET --users +pass ─ website_with_api.wsim » root/env1/test:OPTIONS --users -Tests 1 passed (1) +Tests 2 passed (2) Test Files 1 passed (1) Duration ```