From 827b768a4c8c70d120630f1afa47ae89c0e23151 Mon Sep 17 00:00:00 2001 From: Thomas Orsbourne Date: Sat, 26 Oct 2024 13:15:27 -0300 Subject: [PATCH 1/5] Upgrade to Deno 2 Update yargs Yargs updated to use globalThis rather than window Enable deno lint Upgrade to standard modules Stop using hardcoded github paths Update to serve from servehttp Upgrade build scripts --- .github/workflows/build.yml | 21 ++-- .vscode/settings.json | 3 +- deno.json | 57 +++++++--- deno.lock | 214 ++++++++++++++++++++++++++++++++++++ importMap.json | 7 -- mod.ts | 10 +- src/FileSystem.ts | 8 +- src/McProjectCore.ts | 4 +- src/WebSocket.ts | 184 +++++++++++++++---------------- src/deps.ts | 17 ++- 10 files changed, 373 insertions(+), 152 deletions(-) create mode 100644 deno.lock delete mode 100644 importMap.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9f54a10..8c57ef6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,26 +9,25 @@ jobs: runs-on: macos-latest steps: - name: Checkout 🛎️ - uses: actions/checkout@v2.3.1 + uses: actions/checkout@v4 with: persist-credentials: false - name: Install Deno 🦕 - uses: denoland/setup-deno@v1 + uses: denoland/setup-deno@v2 with: - deno-version: v1.x + deno-version: v2.x - name: 'Build Executable' run: deno task build - name: Upload Executables as Artifacts if: github.ref_type == 'branch' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: ${{ format('dash-{0}-{1}-{2}', github.run_id, github.run_number, github.run_attempt) }} - path: 'executables/*' + name: ${{ format('dash-{0}-{1}-{2}', github.run_id, github.run_number, github.run_attempt) }} + path: 'executables/*' - name: Upload Executables as Release if: github.ref_type == 'tag' - uses: AButler/upload-release-assets@v2.0 + uses: AButler/upload-release-assets@v3.0 with: - files: 'executables/*' - release-tag: ${{ github.ref_name }} - repo-token: ${{ secrets.GITHUB_TOKEN }} - + files: 'executables/*' + release-tag: ${{ github.ref_name }} + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.vscode/settings.json b/.vscode/settings.json index 43df84f..1365173 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,4 @@ { - "deno.enable": true + "deno.enable": true, + "deno.lint": true } diff --git a/deno.json b/deno.json index b618a48..9e800cb 100644 --- a/deno.json +++ b/deno.json @@ -1,5 +1,12 @@ { - "importMap": "importMap.json", + "imports": { + "@bridge-editor/common-utils": "npm:@bridge-editor/common-utils@^0.3.3", + "@bridge-editor/mc-project-core": "npm:@bridge-editor/mc-project-core@^0.4.0", + "@std/async": "jsr:@std/async@^1.0.7", + "@std/path": "jsr:@std/path@^1.0.7", + "dash-compiler-local": "../dash-compiler/dist/dash-compiler.bundled.es.js" + }, + "version": "1.0.0-alpha", "tasks": { "install": "deno install -A -f -n dash_compiler ./mod.ts", "install:full": "deno install -A --reload -f -n dash_compiler ./mod.ts", @@ -9,24 +16,42 @@ "build:windows-x86": "deno compile --target x86_64-pc-windows-msvc --output ./executables/dash.exe -A ./mod.ts" }, "fmt": { - "files": { - "include": ["*.json", "*.ts", "*.tsx", "src/"] - }, - "options": { - "useTabs": true, - "lineWidth": 80, - "indentWidth": 4, - "singleQuote": true - } + "include": [ + "*.json", + "*.ts", + "*.tsx", + "src/" + ], + "exclude": [ + "dist/", + ".vscode/", + ".github/", + "README.md", + "deno.lock" + ], + "useTabs": true, + "lineWidth": 80, + "semiColons": false, + "indentWidth": 4, + "singleQuote": true }, "lint": { - "files": { - "include": ["*.ts", "src/"], - "exclude": ["dist/", ".vscode/", ".github/"] - }, + "include": [ + "*.ts", + "src/" + ], + "exclude": [ + "dist/", + ".vscode/", + ".github/" + ], "rules": { - "tags": ["recommended"], - "include": ["ban-untagged-todo"], + "tags": [ + "recommended" + ], + "include": [ + "ban-untagged-todo" + ], "exclude": [] } } diff --git a/deno.lock b/deno.lock new file mode 100644 index 0000000..08f72db --- /dev/null +++ b/deno.lock @@ -0,0 +1,214 @@ +{ + "version": "4", + "specifiers": { + "jsr:@std/async@*": "1.0.7", + "jsr:@std/async@^1.0.7": "1.0.7", + "jsr:@std/path@^1.0.7": "1.0.7", + "npm:@bridge-editor/common-utils@~0.3.3": "0.3.3", + "npm:@bridge-editor/mc-project-core@0.4": "0.4.0" + }, + "jsr": { + "@std/async@1.0.7": { + "integrity": "f4fadc0124432e37cba11e8b3880164661a664de00a65118d976848f32f96290" + }, + "@std/path@1.0.7": { + "integrity": "76a689e07f0e15dcc6002ec39d0866797e7156629212b28f27179b8a5c3b33a1" + } + }, + "npm": { + "@bridge-editor/common-utils@0.3.3": { + "integrity": "sha512-EaOpPNoZvO7LM9lPPoT7hMb8WJrx73Wkk//V3xKgbPVPDrQHSoJyd3b1E2sARSu2UZhVo9L7Lnj13DQ2O+FAgw==", + "dependencies": [ + "compare-versions" + ] + }, + "@bridge-editor/mc-project-core@0.4.0": { + "integrity": "sha512-QwkJhYrjN09gAaVQGSaoVUgnvxOL1PptJC7sqqb3FaBHoUEZ6+8W1PNwxeO8RCPftq0aewcKJp6pAn9ss7UYqA==", + "dependencies": [ + "@bridge-editor/common-utils", + "json5", + "path-browserify" + ] + }, + "compare-versions@4.1.4": { + "integrity": "sha512-FemMreK9xNyL8gQevsdRMrvO4lFCkQP7qbuktn1q8ndcNk1+0mz7lgE7b/sNvbhVgY4w6tMN1FDp6aADjqw2rw==" + }, + "json5@2.2.3": { + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" + }, + "path-browserify@1.0.1": { + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + } + }, + "redirects": { + "https://deno.land/std/fmt/printf.ts": "https://deno.land/std@0.224.0/fmt/printf.ts", + "https://deno.land/std/path/mod.ts": "https://deno.land/std@0.224.0/path/mod.ts", + "https://deno.land/std/testing/asserts.ts": "https://deno.land/std@0.224.0/testing/asserts.ts" + }, + "remote": { + "https://cdn.skypack.dev/-/@bridge-editor/common-utils@v0.3.3-DE6ybQbQFwrWNers0hAC/dist=es2019,mode=imports/optimized/@bridge-editor/common-utils.js": "e23cd067f2253dd4e4492a733358349670a5fbe1139b8a0e9bbad3950b6f524d", + "https://cdn.skypack.dev/-/@bridge-editor/mc-project-core@v0.4.0-Wf1ZFRAqIETM71eMNR6P/dist=es2019,mode=imports/optimized/@bridge-editor/mc-project-core.js": "e519abe106447e717102ac5f3d7725df798ef520709947d0f71b76934ba20199", + "https://cdn.skypack.dev/-/json5@v2.2.3-595sOcismSLIYZuuBGYo/dist=es2019,mode=imports/optimized/json5.js": "e3902909af865e1bab65bf170d79bc0d6f72f2c3626601aed12d9b0aaee3169c", + "https://cdn.skypack.dev/-/path-browserify@v1.0.1-wRrWU436r1LRJZNW9Ao5/dist=es2019,mode=imports/optimized/path-browserify.js": "b8762ecd45a3155f72ced046f03d21d7ebeff7935c5945cae409d81f9a9b3f2f", + "https://cdn.skypack.dev/@bridge-editor/mc-project-core@0.4.0?dts": "0aeb630844bdfbf2fbb6c62a25c575768067bacbdfc58650f3fb983c0cc953e3", + "https://deno.land/std@0.224.0/assert/_constants.ts": "a271e8ef5a573f1df8e822a6eb9d09df064ad66a4390f21b3e31f820a38e0975", + "https://deno.land/std@0.224.0/assert/assert.ts": "09d30564c09de846855b7b071e62b5974b001bb72a4b797958fe0660e7849834", + "https://deno.land/std@0.224.0/assert/assert_almost_equals.ts": "9e416114322012c9a21fa68e187637ce2d7df25bcbdbfd957cd639e65d3cf293", + "https://deno.land/std@0.224.0/assert/assert_array_includes.ts": "14c5094471bc8e4a7895fc6aa5a184300d8a1879606574cb1cd715ef36a4a3c7", + "https://deno.land/std@0.224.0/assert/assert_equals.ts": "3bbca947d85b9d374a108687b1a8ba3785a7850436b5a8930d81f34a32cb8c74", + "https://deno.land/std@0.224.0/assert/assert_exists.ts": "43420cf7f956748ae6ed1230646567b3593cb7a36c5a5327269279c870c5ddfd", + "https://deno.land/std@0.224.0/assert/assert_false.ts": "3e9be8e33275db00d952e9acb0cd29481a44fa0a4af6d37239ff58d79e8edeff", + "https://deno.land/std@0.224.0/assert/assert_greater.ts": "5e57b201fd51b64ced36c828e3dfd773412c1a6120c1a5a99066c9b261974e46", + "https://deno.land/std@0.224.0/assert/assert_greater_or_equal.ts": "9870030f997a08361b6f63400273c2fb1856f5db86c0c3852aab2a002e425c5b", + "https://deno.land/std@0.224.0/assert/assert_instance_of.ts": "e22343c1fdcacfaea8f37784ad782683ec1cf599ae9b1b618954e9c22f376f2c", + "https://deno.land/std@0.224.0/assert/assert_is_error.ts": "f856b3bc978a7aa6a601f3fec6603491ab6255118afa6baa84b04426dd3cc491", + "https://deno.land/std@0.224.0/assert/assert_less.ts": "60b61e13a1982865a72726a5fa86c24fad7eb27c3c08b13883fb68882b307f68", + "https://deno.land/std@0.224.0/assert/assert_less_or_equal.ts": "d2c84e17faba4afe085e6c9123a63395accf4f9e00150db899c46e67420e0ec3", + "https://deno.land/std@0.224.0/assert/assert_match.ts": "ace1710dd3b2811c391946954234b5da910c5665aed817943d086d4d4871a8b7", + "https://deno.land/std@0.224.0/assert/assert_not_equals.ts": "78d45dd46133d76ce624b2c6c09392f6110f0df9b73f911d20208a68dee2ef29", + "https://deno.land/std@0.224.0/assert/assert_not_instance_of.ts": "3434a669b4d20cdcc5359779301a0588f941ffdc2ad68803c31eabdb4890cf7a", + "https://deno.land/std@0.224.0/assert/assert_not_match.ts": "df30417240aa2d35b1ea44df7e541991348a063d9ee823430e0b58079a72242a", + "https://deno.land/std@0.224.0/assert/assert_not_strict_equals.ts": "37f73880bd672709373d6dc2c5f148691119bed161f3020fff3548a0496f71b8", + "https://deno.land/std@0.224.0/assert/assert_object_match.ts": "411450fd194fdaabc0089ae68f916b545a49d7b7e6d0026e84a54c9e7eed2693", + "https://deno.land/std@0.224.0/assert/assert_rejects.ts": "4bee1d6d565a5b623146a14668da8f9eb1f026a4f338bbf92b37e43e0aa53c31", + "https://deno.land/std@0.224.0/assert/assert_strict_equals.ts": "b4f45f0fd2e54d9029171876bd0b42dd9ed0efd8f853ab92a3f50127acfa54f5", + "https://deno.land/std@0.224.0/assert/assert_string_includes.ts": "496b9ecad84deab72c8718735373feb6cdaa071eb91a98206f6f3cb4285e71b8", + "https://deno.land/std@0.224.0/assert/assert_throws.ts": "c6508b2879d465898dab2798009299867e67c570d7d34c90a2d235e4553906eb", + "https://deno.land/std@0.224.0/assert/assertion_error.ts": "ba8752bd27ebc51f723702fac2f54d3e94447598f54264a6653d6413738a8917", + "https://deno.land/std@0.224.0/assert/equal.ts": "bddf07bb5fc718e10bb72d5dc2c36c1ce5a8bdd3b647069b6319e07af181ac47", + "https://deno.land/std@0.224.0/assert/fail.ts": "0eba674ffb47dff083f02ced76d5130460bff1a9a68c6514ebe0cdea4abadb68", + "https://deno.land/std@0.224.0/assert/mod.ts": "48b8cb8a619ea0b7958ad7ee9376500fe902284bb36f0e32c598c3dc34cbd6f3", + "https://deno.land/std@0.224.0/assert/unimplemented.ts": "8c55a5793e9147b4f1ef68cd66496b7d5ba7a9e7ca30c6da070c1a58da723d73", + "https://deno.land/std@0.224.0/assert/unreachable.ts": "5ae3dbf63ef988615b93eb08d395dda771c96546565f9e521ed86f6510c29e19", + "https://deno.land/std@0.224.0/fmt/colors.ts": "508563c0659dd7198ba4bbf87e97f654af3c34eb56ba790260f252ad8012e1c5", + "https://deno.land/std@0.224.0/fmt/printf.ts": "8d01408076e2f956b03dd8377010c4974515d6cc909978d2edc5c8cd75077eeb", + "https://deno.land/std@0.224.0/internal/diff.ts": "6234a4b493ebe65dc67a18a0eb97ef683626a1166a1906232ce186ae9f65f4e6", + "https://deno.land/std@0.224.0/internal/format.ts": "0a98ee226fd3d43450245b1844b47003419d34d210fa989900861c79820d21c2", + "https://deno.land/std@0.224.0/internal/mod.ts": "534125398c8e7426183e12dc255bb635d94e06d0f93c60a297723abe69d3b22e", + "https://deno.land/std@0.224.0/path/_common/assert_path.ts": "dbdd757a465b690b2cc72fc5fb7698c51507dec6bfafce4ca500c46b76ff7bd8", + "https://deno.land/std@0.224.0/path/_common/basename.ts": "569744855bc8445f3a56087fd2aed56bdad39da971a8d92b138c9913aecc5fa2", + "https://deno.land/std@0.224.0/path/_common/common.ts": "ef73c2860694775fe8ffcbcdd387f9f97c7a656febf0daa8c73b56f4d8a7bd4c", + "https://deno.land/std@0.224.0/path/_common/constants.ts": "dc5f8057159f4b48cd304eb3027e42f1148cf4df1fb4240774d3492b5d12ac0c", + "https://deno.land/std@0.224.0/path/_common/dirname.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", + "https://deno.land/std@0.224.0/path/_common/format.ts": "92500e91ea5de21c97f5fe91e178bae62af524b72d5fcd246d6d60ae4bcada8b", + "https://deno.land/std@0.224.0/path/_common/from_file_url.ts": "d672bdeebc11bf80e99bf266f886c70963107bdd31134c4e249eef51133ceccf", + "https://deno.land/std@0.224.0/path/_common/glob_to_reg_exp.ts": "6cac16d5c2dc23af7d66348a7ce430e5de4e70b0eede074bdbcf4903f4374d8d", + "https://deno.land/std@0.224.0/path/_common/normalize.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", + "https://deno.land/std@0.224.0/path/_common/normalize_string.ts": "33edef773c2a8e242761f731adeb2bd6d683e9c69e4e3d0092985bede74f4ac3", + "https://deno.land/std@0.224.0/path/_common/relative.ts": "faa2753d9b32320ed4ada0733261e3357c186e5705678d9dd08b97527deae607", + "https://deno.land/std@0.224.0/path/_common/strip_trailing_separators.ts": "7024a93447efcdcfeaa9339a98fa63ef9d53de363f1fbe9858970f1bba02655a", + "https://deno.land/std@0.224.0/path/_common/to_file_url.ts": "7f76adbc83ece1bba173e6e98a27c647712cab773d3f8cbe0398b74afc817883", + "https://deno.land/std@0.224.0/path/_interface.ts": "8dfeb930ca4a772c458a8c7bbe1e33216fe91c253411338ad80c5b6fa93ddba0", + "https://deno.land/std@0.224.0/path/_os.ts": "8fb9b90fb6b753bd8c77cfd8a33c2ff6c5f5bc185f50de8ca4ac6a05710b2c15", + "https://deno.land/std@0.224.0/path/basename.ts": "7ee495c2d1ee516ffff48fb9a93267ba928b5a3486b550be73071bc14f8cc63e", + "https://deno.land/std@0.224.0/path/common.ts": "03e52e22882402c986fe97ca3b5bb4263c2aa811c515ce84584b23bac4cc2643", + "https://deno.land/std@0.224.0/path/constants.ts": "0c206169ca104938ede9da48ac952de288f23343304a1c3cb6ec7625e7325f36", + "https://deno.land/std@0.224.0/path/dirname.ts": "85bd955bf31d62c9aafdd7ff561c4b5fb587d11a9a5a45e2b01aedffa4238a7c", + "https://deno.land/std@0.224.0/path/extname.ts": "593303db8ae8c865cbd9ceec6e55d4b9ac5410c1e276bfd3131916591b954441", + "https://deno.land/std@0.224.0/path/format.ts": "6ce1779b0980296cf2bc20d66436b12792102b831fd281ab9eb08fa8a3e6f6ac", + "https://deno.land/std@0.224.0/path/from_file_url.ts": "911833ae4fd10a1c84f6271f36151ab785955849117dc48c6e43b929504ee069", + "https://deno.land/std@0.224.0/path/glob_to_regexp.ts": "7f30f0a21439cadfdae1be1bf370880b415e676097fda584a63ce319053b5972", + "https://deno.land/std@0.224.0/path/is_absolute.ts": "4791afc8bfd0c87f0526eaa616b0d16e7b3ab6a65b62942e50eac68de4ef67d7", + "https://deno.land/std@0.224.0/path/is_glob.ts": "a65f6195d3058c3050ab905705891b412ff942a292bcbaa1a807a74439a14141", + "https://deno.land/std@0.224.0/path/join.ts": "ae2ec5ca44c7e84a235fd532e4a0116bfb1f2368b394db1c4fb75e3c0f26a33a", + "https://deno.land/std@0.224.0/path/join_globs.ts": "5b3bf248b93247194f94fa6947b612ab9d3abd571ca8386cf7789038545e54a0", + "https://deno.land/std@0.224.0/path/mod.ts": "f6bd79cb08be0e604201bc9de41ac9248582699d1b2ee0ab6bc9190d472cf9cd", + "https://deno.land/std@0.224.0/path/normalize.ts": "4155743ccceeed319b350c1e62e931600272fad8ad00c417b91df093867a8352", + "https://deno.land/std@0.224.0/path/normalize_glob.ts": "cc89a77a7d3b1d01053b9dcd59462b75482b11e9068ae6c754b5cf5d794b374f", + "https://deno.land/std@0.224.0/path/parse.ts": "77ad91dcb235a66c6f504df83087ce2a5471e67d79c402014f6e847389108d5a", + "https://deno.land/std@0.224.0/path/posix/_util.ts": "1e3937da30f080bfc99fe45d7ed23c47dd8585c5e473b2d771380d3a6937cf9d", + "https://deno.land/std@0.224.0/path/posix/basename.ts": "d2fa5fbbb1c5a3ab8b9326458a8d4ceac77580961b3739cd5bfd1d3541a3e5f0", + "https://deno.land/std@0.224.0/path/posix/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4", + "https://deno.land/std@0.224.0/path/posix/constants.ts": "93481efb98cdffa4c719c22a0182b994e5a6aed3047e1962f6c2c75b7592bef1", + "https://deno.land/std@0.224.0/path/posix/dirname.ts": "76cd348ffe92345711409f88d4d8561d8645353ac215c8e9c80140069bf42f00", + "https://deno.land/std@0.224.0/path/posix/extname.ts": "e398c1d9d1908d3756a7ed94199fcd169e79466dd88feffd2f47ce0abf9d61d2", + "https://deno.land/std@0.224.0/path/posix/format.ts": "185e9ee2091a42dd39e2a3b8e4925370ee8407572cee1ae52838aed96310c5c1", + "https://deno.land/std@0.224.0/path/posix/from_file_url.ts": "951aee3a2c46fd0ed488899d024c6352b59154c70552e90885ed0c2ab699bc40", + "https://deno.land/std@0.224.0/path/posix/glob_to_regexp.ts": "76f012fcdb22c04b633f536c0b9644d100861bea36e9da56a94b9c589a742e8f", + "https://deno.land/std@0.224.0/path/posix/is_absolute.ts": "cebe561ad0ae294f0ce0365a1879dcfca8abd872821519b4fcc8d8967f888ede", + "https://deno.land/std@0.224.0/path/posix/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", + "https://deno.land/std@0.224.0/path/posix/join.ts": "7fc2cb3716aa1b863e990baf30b101d768db479e70b7313b4866a088db016f63", + "https://deno.land/std@0.224.0/path/posix/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", + "https://deno.land/std@0.224.0/path/posix/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604", + "https://deno.land/std@0.224.0/path/posix/normalize.ts": "baeb49816a8299f90a0237d214cef46f00ba3e95c0d2ceb74205a6a584b58a91", + "https://deno.land/std@0.224.0/path/posix/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", + "https://deno.land/std@0.224.0/path/posix/parse.ts": "09dfad0cae530f93627202f28c1befa78ea6e751f92f478ca2cc3b56be2cbb6a", + "https://deno.land/std@0.224.0/path/posix/relative.ts": "3907d6eda41f0ff723d336125a1ad4349112cd4d48f693859980314d5b9da31c", + "https://deno.land/std@0.224.0/path/posix/resolve.ts": "08b699cfeee10cb6857ccab38fa4b2ec703b0ea33e8e69964f29d02a2d5257cf", + "https://deno.land/std@0.224.0/path/posix/to_file_url.ts": "7aa752ba66a35049e0e4a4be5a0a31ac6b645257d2e031142abb1854de250aaf", + "https://deno.land/std@0.224.0/path/posix/to_namespaced_path.ts": "28b216b3c76f892a4dca9734ff1cc0045d135532bfd9c435ae4858bfa5a2ebf0", + "https://deno.land/std@0.224.0/path/relative.ts": "ab739d727180ed8727e34ed71d976912461d98e2b76de3d3de834c1066667add", + "https://deno.land/std@0.224.0/path/resolve.ts": "a6f977bdb4272e79d8d0ed4333e3d71367cc3926acf15ac271f1d059c8494d8d", + "https://deno.land/std@0.224.0/path/to_file_url.ts": "88f049b769bce411e2d2db5bd9e6fd9a185a5fbd6b9f5ad8f52bef517c4ece1b", + "https://deno.land/std@0.224.0/path/to_namespaced_path.ts": "b706a4103b104cfadc09600a5f838c2ba94dbcdb642344557122dda444526e40", + "https://deno.land/std@0.224.0/path/windows/_util.ts": "d5f47363e5293fced22c984550d5e70e98e266cc3f31769e1710511803d04808", + "https://deno.land/std@0.224.0/path/windows/basename.ts": "6bbc57bac9df2cec43288c8c5334919418d784243a00bc10de67d392ab36d660", + "https://deno.land/std@0.224.0/path/windows/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4", + "https://deno.land/std@0.224.0/path/windows/constants.ts": "5afaac0a1f67b68b0a380a4ef391bf59feb55856aa8c60dfc01bd3b6abb813f5", + "https://deno.land/std@0.224.0/path/windows/dirname.ts": "33e421be5a5558a1346a48e74c330b8e560be7424ed7684ea03c12c21b627bc9", + "https://deno.land/std@0.224.0/path/windows/extname.ts": "165a61b00d781257fda1e9606a48c78b06815385e7d703232548dbfc95346bef", + "https://deno.land/std@0.224.0/path/windows/format.ts": "bbb5ecf379305b472b1082cd2fdc010e44a0020030414974d6029be9ad52aeb6", + "https://deno.land/std@0.224.0/path/windows/from_file_url.ts": "ced2d587b6dff18f963f269d745c4a599cf82b0c4007356bd957cb4cb52efc01", + "https://deno.land/std@0.224.0/path/windows/glob_to_regexp.ts": "e45f1f89bf3fc36f94ab7b3b9d0026729829fabc486c77f414caebef3b7304f8", + "https://deno.land/std@0.224.0/path/windows/is_absolute.ts": "4a8f6853f8598cf91a835f41abed42112cebab09478b072e4beb00ec81f8ca8a", + "https://deno.land/std@0.224.0/path/windows/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", + "https://deno.land/std@0.224.0/path/windows/join.ts": "8d03530ab89195185103b7da9dfc6327af13eabdcd44c7c63e42e27808f50ecf", + "https://deno.land/std@0.224.0/path/windows/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", + "https://deno.land/std@0.224.0/path/windows/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604", + "https://deno.land/std@0.224.0/path/windows/normalize.ts": "78126170ab917f0ca355a9af9e65ad6bfa5be14d574c5fb09bb1920f52577780", + "https://deno.land/std@0.224.0/path/windows/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", + "https://deno.land/std@0.224.0/path/windows/parse.ts": "08804327b0484d18ab4d6781742bf374976de662f8642e62a67e93346e759707", + "https://deno.land/std@0.224.0/path/windows/relative.ts": "3e1abc7977ee6cc0db2730d1f9cb38be87b0ce4806759d271a70e4997fc638d7", + "https://deno.land/std@0.224.0/path/windows/resolve.ts": "8dae1dadfed9d46ff46cc337c9525c0c7d959fb400a6308f34595c45bdca1972", + "https://deno.land/std@0.224.0/path/windows/to_file_url.ts": "40e560ee4854fe5a3d4d12976cef2f4e8914125c81b11f1108e127934ced502e", + "https://deno.land/std@0.224.0/path/windows/to_namespaced_path.ts": "4ffa4fb6fae321448d5fe810b3ca741d84df4d7897e61ee29be961a6aac89a4c", + "https://deno.land/std@0.224.0/testing/asserts.ts": "d0cdbabadc49cc4247a50732ee0df1403fdcd0f95360294ad448ae8c240f3f5c", + "https://deno.land/x/cliui@v7.0.4-deno/build/lib/index.js": "fb6030c7b12602a4fca4d81de3ddafa301ba84fd9df73c53de6f3bdda7b482d5", + "https://deno.land/x/cliui@v7.0.4-deno/build/lib/string-utils.js": "b3eb9d2e054a43a3064af17332fb1839a7dadb205c5371af4789616afb1a117f", + "https://deno.land/x/cliui@v7.0.4-deno/deno.ts": "d07bc3338661f8011e3a5fd215061d17a52107a5383c29f40ce0c1ecb8bb8cc3", + "https://deno.land/x/escalade@v3.0.3/sync.ts": "493bc66563292c5c10c4a75a467a5933f24dad67d74b0f5a87e7b988fe97c104", + "https://deno.land/x/y18n@v5.0.0-deno/build/lib/index.js": "92c4624714aa508d33c6d21c0b0ffa072369a8b306e5f8c7727662f570bbd026", + "https://deno.land/x/y18n@v5.0.0-deno/deno.ts": "80997f0709a0b43d29931e2b33946f2bbc32b13fd82f80a5409628455427e28d", + "https://deno.land/x/y18n@v5.0.0-deno/lib/platform-shims/deno.ts": "8fa2c96ac03734966260cfd2c5bc240e41725c913e5b64a0297aede09f52b39d", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/argsert.js": "eb085555452eac3ff300935994a42f35d16e04cf698cb775cb5ad4f5653c0627", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/command.js": "6249ffd299e16a1e531ccff13a23aed7b7eef37e20b6e6ab7f254413aece6ca6", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/completion-templates.js": "d9bbed244af4394b786f8abce9efbbdc3777a73458ebd7b6bf23b2495ac11027", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/completion.js": "62e41220b5baa7c082f72638c7eab23a69fff46a78011f2c448e2a2f1fcfd05a", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/middleware.js": "6ab9c953a83264739aa50d7fa6b1ab693500336dfd593b9958865e12beb8bdeb", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/parse-command.js": "327242c0afae207b7aefa13133439e3b321d7db4229febc5b7bd5285770ac7f7", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/typings/common-types.js": "9618b81a86acb88a61fd9988e9bc3ec21c5250d94fc2231ba7d898e71500789d", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/usage.js": "31faaa7aa61e5a57a2cac5a269b773aa8b1fcab2db7cac2f8252396f3ccc2f5e", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/apply-extends.js": "64640dce92669705abead3bdbe2c46c8318c8623843a55e4726fb3c55ff9dd1d", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/is-promise.js": "be45baa3090c5106dd4e442cceef6b357a268783a2ee28ec10fe131a8cd8db72", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/levenshtein.js": "d8638efc3376b5f794b1c8df6ef4f3d484b29d919127c7fdc242400e3cfded91", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/maybe-async-result.js": "31cf4026279e14c87d16faa14ac758f35c8cc5795d29393c5ce07120f5a3caf6", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/obj-filter.js": "5523fb2288d1e86ed48c460e176770b49587554df4ae2405b468c093786b040b", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/set-blocking.js": "6fa8ffc3299f456e42902736bae35fbc1f2dc96b3905a02ba9629f5bd9f80af1", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/which-module.js": "9267633b2c9f8990b2c699101b641e59ae59932e0dee5270613c0508bfa13c5d", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/validation.js": "af040834cb9201d4238bbeb8f673eb2ebaff9611857270524a7c86dfcf2ca51b", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/yargs-factory.js": "05326932b431801d7459d5b14b21f73f13ebd74a8a74e9b7b8cec5f99ba14819", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/yerror.js": "9729aaa8bce1a0d00c57f470efb2ad76ad2988661bb48f3769e496a3435b4462", + "https://deno.land/x/yargs@v17.7.2-deno/deno.ts": "f3df0bfd08ba367ec36dc59ef6cab1a391ace49ad44387ec5fe5d76289af08af", + "https://deno.land/x/yargs@v17.7.2-deno/lib/platform-shims/deno.ts": "1d3d490a7f3c6f971a44dd92e12a042f988f1b6496df3a9c43ccc69563032dff", + "https://deno.land/x/yargs_parser@v20.2.4-deno/build/lib/string-utils.js": "12fc056b23703bc370aae5b179dc5abee53fca277abc30eaf76f78d2546d6413", + "https://deno.land/x/yargs_parser@v20.2.4-deno/build/lib/tokenize-arg-string.js": "7e0875b11795b8e217386e45f14b24a6e501ebbc62e15aa469aa8829d4d0ee61", + "https://deno.land/x/yargs_parser@v20.2.4-deno/build/lib/yargs-parser.js": "453200a7dfbb002e605d8009b7dad30f2b1d93665e046ab89c073a4fe63dfd48", + "https://deno.land/x/yargs_parser@v20.2.4-deno/deno.ts": "ad53c0c82c3982c4fc5be9472384b259e0a32ce1f7ae0f68de7b2445df5642fc", + "https://esm.sh/@bridge-editor/mc-project-core@0.4.0": "27c4799364c6e73715f317323db6ede7c0d6d7430d17ef7d13521a5d84e331b8", + "https://esm.sh/json5@2.2.3": "56ad046eba99c091fcb546d9ec3ab3463e9a889f5d52b818c91c5f2e793dbefd", + "https://esm.sh/v135/@bridge-editor/common-utils@0.3.3/denonext/common-utils.mjs": "36d6ab2b43f9988e23a1acede1870472ce46289166c2350f1d3d7c64ffd7f799", + "https://esm.sh/v135/@bridge-editor/mc-project-core@0.4.0/denonext/mc-project-core.mjs": "d19bba5f627d72a8b1ffdd55bec418fbdcec588b0298a9bfe1afb24b164e7992", + "https://esm.sh/v135/json5@2.2.3/denonext/json5.mjs": "2124ca68e182d9de859a72e9415bbc4702b8f0bb002a7a22ea06d6684a3e562b", + "https://esm.sh/v135/path-browserify@1.0.1/denonext/path-browserify.mjs": "397babbb819658714128c4dade6867153fe2a18115391c845369924aa0e3eb20", + "https://unpkg.com/@bridge-editor/dash-compiler@0.11.7/dist/dash-compiler.bundled.es.js": "fffac9708805c765df2d2b4276b90ed1aad2ceb0d8a1cf506babeca2dc131dcc", + "https://unpkg.com/@bridge-editor/dash-compiler@0.11.7/package.json": "19ea2b4b03fbe3eec35f2980ba3e67df3946880e21faad3fa4032509c93957fa" + }, + "workspace": { + "dependencies": [ + "jsr:@std/async@^1.0.7", + "jsr:@std/path@^1.0.7", + "npm:@bridge-editor/common-utils@~0.3.3", + "npm:@bridge-editor/mc-project-core@0.4" + ] + } +} diff --git a/importMap.json b/importMap.json deleted file mode 100644 index bc0e433..0000000 --- a/importMap.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "dash-compiler": "https://raw.githubusercontent.com/bridge-core/dash-compiler/main/dist/dash-compiler.bundled.es.js", - "dash-compiler-local": "../dash-compiler/dist/dash-compiler.bundled.es.js", - "mc-project-core": "npm:mc-project-core" - } -} diff --git a/mod.ts b/mod.ts index cb8931b..a2879d6 100644 --- a/mod.ts +++ b/mod.ts @@ -1,17 +1,9 @@ // deno-lint-ignore-file no-explicit-any import { CLI } from './src/CLI.ts' -import yargs from 'https://deno.land/x/yargs@v17.5.1-deno/deno.ts' +import yargs from 'https://deno.land/x/yargs@v17.7.2-deno/deno.ts' import { comMojangFolder } from './src/comMojangFolder.ts' import { initRuntimes, swcVersion } from './src/deps.ts' -// @ts-ignore: Required by some of our dependencies -window.global = window -// @ts-ignore: Required by some of our dependencies -window.process = { - cwd: () => '', - env: {}, -} - type YargsInstance = ReturnType initRuntimes(`https://esm.sh/@swc/wasm-web@${swcVersion}/wasm-web_bg.wasm`) diff --git a/src/FileSystem.ts b/src/FileSystem.ts index cb4abdd..8c0819d 100644 --- a/src/FileSystem.ts +++ b/src/FileSystem.ts @@ -30,7 +30,7 @@ export class DenoFileSystem extends FileSystem { await Deno.writeTextFile(this.resolvePath(filePath), content) else return Deno.writeFile(this.resolvePath(filePath), content) } - async readJson(filePath: string) { + override async readJson(filePath: string) { const fileContent = await Deno.readTextFile(this.resolvePath(filePath)) return json5.parse(fileContent) } @@ -42,14 +42,14 @@ export class DenoFileSystem extends FileSystem { for await (const entry of Deno.readDir(this.resolvePath(path))) { entries.push({ - name: entry.name, - kind: entry.isDirectory ? 'directory' : 'file', + name: entry.name, + kind: entry.isDirectory ? 'directory' : 'file', }) } return entries } - async copyFile(from: string, to: string, destFs = this) { + override async copyFile(from: string, to: string, destFs = this) { // Fallback to slow path if destination fs !== this if (destFs !== this) return super.copyFile(from, to, destFs) diff --git a/src/McProjectCore.ts b/src/McProjectCore.ts index 061fc78..c62aac6 100644 --- a/src/McProjectCore.ts +++ b/src/McProjectCore.ts @@ -17,13 +17,13 @@ export class FileTypeImpl extends FileType { ).then((resp) => resp.json()) } - addPluginFileType(fileDef: IFileType) { + override addPluginFileType(fileDef: IFileType) { this._cache.clear() return super.addPluginFileType(fileDef) } - get(filePath?: string, searchFileType?: string, checkFileExtension = true) { + override get(filePath?: string, searchFileType?: string, checkFileExtension = true) { if (!filePath || !checkFileExtension || searchFileType !== undefined) { return super.get(filePath, searchFileType, checkFileExtension) } diff --git a/src/WebSocket.ts b/src/WebSocket.ts index 3ebe54b..e4687ac 100644 --- a/src/WebSocket.ts +++ b/src/WebSocket.ts @@ -1,102 +1,100 @@ export class WebSocketServer { - protected socket?: WebSocket + protected socket?: WebSocket - /** - * Whether the WebSocket is open - */ - get isStarted() { - return (this.socket?.readyState === WebSocket.OPEN) - } + /** + * Whether the WebSocket is open + */ + get isStarted() { + return (this.socket?.readyState === WebSocket.OPEN) + } - /** - * Open a WebSocket on localhost - * @param port Network port to open the socket on - */ - start(port: number) { - this.setLoopbackExemption() + /** + * Open a WebSocket on localhost + * @param port Network port to open the socket on + */ + start(port: number) { + this.setLoopbackExemption() - const listener = Deno.listen({ port }) - listener.accept().then(async (connection) => { - const httpConnection = Deno.serveHttp(connection) - for await (const event of httpConnection) { - const { socket, response } = Deno.upgradeWebSocket(event.request) - this.socket = socket - await event.respondWith(response) - console.log('WebSocket connection established!') - const intervalId = this.keepAlive() - this.socket.onclose = () => { - clearInterval(intervalId) - console.log('WebSocket connection closed!') - } - } - }) - } + Deno.serve({ port: port }, (req) => { + if (req.headers.get('upgrade') != 'websocket') { + console.log('Websocket connection: Upgrade header not found') + } + const { socket, response } = Deno.upgradeWebSocket(req) + this.socket = socket + const intervalId = this.keepAlive() + socket.addEventListener('close', () => { + clearInterval(intervalId) + console.log('WebSocket connection closed!') + }) + return response + }) + } - /** - * Runs a console command inside of Minecraft, if the WebSocket is still open - * @param command The command to be run (without the slash) - * @returns The response from Minecraft after requesting the command to be run - */ - runCommand(command: string) { - const requestId = crypto.randomUUID() - const data = JSON.stringify({ - header: { - version: 1, - requestId, - messageType: 'commandRequest', - messagePurpose: 'commandRequest', - }, - body: { - commandLine: command, - }, - }) - if (this.socket && this.isStarted) { - this.socket.send(data) - return new Promise<{ message: string, status: number }>((resolve) => { - this.socket?.addEventListener('message', (event) => { - const res = JSON.parse(event.data.toString()) - if (res.header.requestId === requestId) - resolve({ - message: res.body.statusMessage, - status: res.body.statusCode, - }) - }) - }) - } - } + /** + * Runs a console command inside of Minecraft, if the WebSocket is still open + * @param command The command to be run (without the slash) + * @returns The response from Minecraft after requesting the command to be run + */ + runCommand(command: string) { + const requestId = crypto.randomUUID() + const data = JSON.stringify({ + header: { + version: 1, + requestId, + messageType: 'commandRequest', + messagePurpose: 'commandRequest', + }, + body: { + commandLine: command, + }, + }) + if (this.socket && this.isStarted) { + this.socket.send(data) + return new Promise<{ message: string, status: number }>((resolve) => { + this.socket?.addEventListener('message', (event) => { + const res = JSON.parse(event.data.toString()) + if (res.header.requestId === requestId) { + resolve({ + message: res.body.statusMessage, + status: res.body.statusCode, + }) + } + }) + } + ) + } + } - /** - * Runs console commands to set both Minecraft retail and preview clients to be exempt from UWP network loopback restrictions so that the clients can connect to a local WebSocket - */ - async setLoopbackExemption() { - // Minecraft Retail Build - const retail = Deno.run({ - cmd: ['CheckNetIsolation.exe', 'LoopbackExempt', '-a', '-n=microsoft.minecraftuwp_8wekyb3d8bbwe'], - stdout: 'null', - }) - const retailStat = await retail.status() - if (retailStat.code !== 0) - console.log('Unable to set network loopback exemption for Minecraft retail build.') - retail.close() + /** + * Runs console commands to set both Minecraft retail and preview clients to be exempt from UWP network loopback restrictions so that the clients can connect to a local WebSocket + */ + async setLoopbackExemption() { + // Minecraft Retail Build + const retailCommand = new Deno.Command('CheckNetIsolation.exe', { + args: ['LoopbackExempt', '-a', '-n=microsoft.minecraftuwp_8wekyb3d8bbwe'] + }) + const { success: retailSuccess } = await retailCommand.output() + if (!retailSuccess) { + console.log('Unable to set network loopback exemption for Minecraft retail build.') + } - // Minecraft Preview Build - const preview = Deno.run({ - cmd: ['CheckNetIsolation.exe', 'LoopbackExempt', '-a', '-n=Microsoft.MinecraftWindowsBeta_8wekyb3d8bbwe'], - stdout: 'null', - }) - const previewStat = await preview.status() - if (previewStat.code !== 0) - console.log('Unable to set network loopback exemption for Minecraft preview build.') - preview.close() - } + // Minecraft Preview Build + const previewCommand = new Deno.Command('CheckNetIsolation.exe', { + args: ['LoopbackExempt', '-a', '-n=Microsoft.MinecraftWindowsBeta_8wekyb3d8bbwe'] + }) + const { success: previewSuccess } = await previewCommand.output() + if (!previewSuccess) { + console.log('Unable to set network loopback exemption for Minecraft preview build.') + } + } - /** - * Sends empty requests to the client every 25 seconds to stop the connection from timing out - * @returns The interval id (use to cancel when WebSocket is closed) - */ - keepAlive() { - return setInterval(() => { - this.socket?.send('') - }, 25000) - } + /** + * Sends empty requests to the client every 25 seconds to stop the connection from timing out + * @returns The interval id (use to cancel when WebSocket is closed) + */ + keepAlive() { + return setInterval(() => { + this.socket?.send('') + }, 25000) + } } diff --git a/src/deps.ts b/src/deps.ts index 598352b..6ff8dea 100644 --- a/src/deps.ts +++ b/src/deps.ts @@ -1,21 +1,20 @@ -export * as flags from 'https://deno.land/std@0.121.0/flags/mod.ts' -export * as path from 'https://deno.land/std@0.121.0/path/mod.ts' +export * as path from '@std/path' export { FileType, PackType, ProjectConfig, type IFileType, -} from 'https://esm.sh/mc-project-core@0.3.21' -export { isMatch } from 'https://esm.sh/bridge-common-utils@0.3.3' -// @deno-types="https://esm.sh/dash-compiler@0.10.4" +} from 'https://esm.sh/@bridge-editor/mc-project-core@0.4.0' +export { isMatch } from '@bridge-editor/common-utils' +// @deno-types="https://esm.sh/@bridge-editor/dash-compiler@0.11.7" export { Dash, FileSystem, initRuntimes, -} from 'https://raw.githubusercontent.com/bridge-core/dash-compiler/main/dist/dash-compiler.bundled.es.js' -export { default as json5 } from 'https://esm.sh/json5@2.2.1' -export { debounce } from 'https://deno.land/std@0.156.0/async/mod.ts?s=debounce' -import { default as dashPackageJson } from 'https://raw.githubusercontent.com/bridge-core/dash-compiler/main/package.json' assert { type: 'json' } +} from 'https://unpkg.com/@bridge-editor/dash-compiler@0.11.7/dist/dash-compiler.bundled.es.js' +export { default as json5 } from 'https://esm.sh/json5@2.2.3' +export { debounce } from 'jsr:@std/async' +import { default as dashPackageJson } from 'https://unpkg.com/@bridge-editor/dash-compiler@0.11.7/package.json' with { type: 'json' } let swcVersion = dashPackageJson.dependencies['@swc/wasm-web'] if (swcVersion.startsWith('^')) swcVersion = swcVersion.slice(1) From e4616b5de714fa680241cf8b0a8a0edce9f0a28a Mon Sep 17 00:00:00 2001 From: Thomas Orsbourne Date: Sat, 9 Nov 2024 20:46:10 -0400 Subject: [PATCH 2/5] chore: Update imports --- deno.json | 1 + deno.lock | 181 ++++-------------------------------------------------- mod.ts | 3 +- 3 files changed, 14 insertions(+), 171 deletions(-) diff --git a/deno.json b/deno.json index 9e800cb..728c401 100644 --- a/deno.json +++ b/deno.json @@ -4,6 +4,7 @@ "@bridge-editor/mc-project-core": "npm:@bridge-editor/mc-project-core@^0.4.0", "@std/async": "jsr:@std/async@^1.0.7", "@std/path": "jsr:@std/path@^1.0.7", + "@std/semver": "jsr:@std/semver@^1.0.3", "dash-compiler-local": "../dash-compiler/dist/dash-compiler.bundled.es.js" }, "version": "1.0.0-alpha", diff --git a/deno.lock b/deno.lock index 08f72db..c5045f8 100644 --- a/deno.lock +++ b/deno.lock @@ -1,18 +1,21 @@ { "version": "4", "specifiers": { - "jsr:@std/async@*": "1.0.7", - "jsr:@std/async@^1.0.7": "1.0.7", - "jsr:@std/path@^1.0.7": "1.0.7", + "jsr:@std/async@^1.0.7": "1.0.8", + "jsr:@std/path@^1.0.7": "1.0.8", + "jsr:@std/semver@^1.0.3": "1.0.3", "npm:@bridge-editor/common-utils@~0.3.3": "0.3.3", "npm:@bridge-editor/mc-project-core@0.4": "0.4.0" }, "jsr": { - "@std/async@1.0.7": { - "integrity": "f4fadc0124432e37cba11e8b3880164661a664de00a65118d976848f32f96290" + "@std/async@1.0.8": { + "integrity": "c057c5211a0f1d12e7dcd111ab430091301b8d64b4250052a79d277383bc3ba7" }, - "@std/path@1.0.7": { - "integrity": "76a689e07f0e15dcc6002ec39d0866797e7156629212b28f27179b8a5c3b33a1" + "@std/path@1.0.8": { + "integrity": "548fa456bb6a04d3c1a1e7477986b6cffbce95102d0bb447c67c4ee70e0364be" + }, + "@std/semver@1.0.3": { + "integrity": "7c139c6076a080eeaa4252c78b95ca5302818d7eafab0470d34cafd9930c13c8" } }, "npm": { @@ -40,173 +43,11 @@ "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" } }, - "redirects": { - "https://deno.land/std/fmt/printf.ts": "https://deno.land/std@0.224.0/fmt/printf.ts", - "https://deno.land/std/path/mod.ts": "https://deno.land/std@0.224.0/path/mod.ts", - "https://deno.land/std/testing/asserts.ts": "https://deno.land/std@0.224.0/testing/asserts.ts" - }, - "remote": { - "https://cdn.skypack.dev/-/@bridge-editor/common-utils@v0.3.3-DE6ybQbQFwrWNers0hAC/dist=es2019,mode=imports/optimized/@bridge-editor/common-utils.js": "e23cd067f2253dd4e4492a733358349670a5fbe1139b8a0e9bbad3950b6f524d", - "https://cdn.skypack.dev/-/@bridge-editor/mc-project-core@v0.4.0-Wf1ZFRAqIETM71eMNR6P/dist=es2019,mode=imports/optimized/@bridge-editor/mc-project-core.js": "e519abe106447e717102ac5f3d7725df798ef520709947d0f71b76934ba20199", - "https://cdn.skypack.dev/-/json5@v2.2.3-595sOcismSLIYZuuBGYo/dist=es2019,mode=imports/optimized/json5.js": "e3902909af865e1bab65bf170d79bc0d6f72f2c3626601aed12d9b0aaee3169c", - "https://cdn.skypack.dev/-/path-browserify@v1.0.1-wRrWU436r1LRJZNW9Ao5/dist=es2019,mode=imports/optimized/path-browserify.js": "b8762ecd45a3155f72ced046f03d21d7ebeff7935c5945cae409d81f9a9b3f2f", - "https://cdn.skypack.dev/@bridge-editor/mc-project-core@0.4.0?dts": "0aeb630844bdfbf2fbb6c62a25c575768067bacbdfc58650f3fb983c0cc953e3", - "https://deno.land/std@0.224.0/assert/_constants.ts": "a271e8ef5a573f1df8e822a6eb9d09df064ad66a4390f21b3e31f820a38e0975", - "https://deno.land/std@0.224.0/assert/assert.ts": "09d30564c09de846855b7b071e62b5974b001bb72a4b797958fe0660e7849834", - "https://deno.land/std@0.224.0/assert/assert_almost_equals.ts": "9e416114322012c9a21fa68e187637ce2d7df25bcbdbfd957cd639e65d3cf293", - "https://deno.land/std@0.224.0/assert/assert_array_includes.ts": "14c5094471bc8e4a7895fc6aa5a184300d8a1879606574cb1cd715ef36a4a3c7", - "https://deno.land/std@0.224.0/assert/assert_equals.ts": "3bbca947d85b9d374a108687b1a8ba3785a7850436b5a8930d81f34a32cb8c74", - "https://deno.land/std@0.224.0/assert/assert_exists.ts": "43420cf7f956748ae6ed1230646567b3593cb7a36c5a5327269279c870c5ddfd", - "https://deno.land/std@0.224.0/assert/assert_false.ts": "3e9be8e33275db00d952e9acb0cd29481a44fa0a4af6d37239ff58d79e8edeff", - "https://deno.land/std@0.224.0/assert/assert_greater.ts": "5e57b201fd51b64ced36c828e3dfd773412c1a6120c1a5a99066c9b261974e46", - "https://deno.land/std@0.224.0/assert/assert_greater_or_equal.ts": "9870030f997a08361b6f63400273c2fb1856f5db86c0c3852aab2a002e425c5b", - "https://deno.land/std@0.224.0/assert/assert_instance_of.ts": "e22343c1fdcacfaea8f37784ad782683ec1cf599ae9b1b618954e9c22f376f2c", - "https://deno.land/std@0.224.0/assert/assert_is_error.ts": "f856b3bc978a7aa6a601f3fec6603491ab6255118afa6baa84b04426dd3cc491", - "https://deno.land/std@0.224.0/assert/assert_less.ts": "60b61e13a1982865a72726a5fa86c24fad7eb27c3c08b13883fb68882b307f68", - "https://deno.land/std@0.224.0/assert/assert_less_or_equal.ts": "d2c84e17faba4afe085e6c9123a63395accf4f9e00150db899c46e67420e0ec3", - "https://deno.land/std@0.224.0/assert/assert_match.ts": "ace1710dd3b2811c391946954234b5da910c5665aed817943d086d4d4871a8b7", - "https://deno.land/std@0.224.0/assert/assert_not_equals.ts": "78d45dd46133d76ce624b2c6c09392f6110f0df9b73f911d20208a68dee2ef29", - "https://deno.land/std@0.224.0/assert/assert_not_instance_of.ts": "3434a669b4d20cdcc5359779301a0588f941ffdc2ad68803c31eabdb4890cf7a", - "https://deno.land/std@0.224.0/assert/assert_not_match.ts": "df30417240aa2d35b1ea44df7e541991348a063d9ee823430e0b58079a72242a", - "https://deno.land/std@0.224.0/assert/assert_not_strict_equals.ts": "37f73880bd672709373d6dc2c5f148691119bed161f3020fff3548a0496f71b8", - "https://deno.land/std@0.224.0/assert/assert_object_match.ts": "411450fd194fdaabc0089ae68f916b545a49d7b7e6d0026e84a54c9e7eed2693", - "https://deno.land/std@0.224.0/assert/assert_rejects.ts": "4bee1d6d565a5b623146a14668da8f9eb1f026a4f338bbf92b37e43e0aa53c31", - "https://deno.land/std@0.224.0/assert/assert_strict_equals.ts": "b4f45f0fd2e54d9029171876bd0b42dd9ed0efd8f853ab92a3f50127acfa54f5", - "https://deno.land/std@0.224.0/assert/assert_string_includes.ts": "496b9ecad84deab72c8718735373feb6cdaa071eb91a98206f6f3cb4285e71b8", - "https://deno.land/std@0.224.0/assert/assert_throws.ts": "c6508b2879d465898dab2798009299867e67c570d7d34c90a2d235e4553906eb", - "https://deno.land/std@0.224.0/assert/assertion_error.ts": "ba8752bd27ebc51f723702fac2f54d3e94447598f54264a6653d6413738a8917", - "https://deno.land/std@0.224.0/assert/equal.ts": "bddf07bb5fc718e10bb72d5dc2c36c1ce5a8bdd3b647069b6319e07af181ac47", - "https://deno.land/std@0.224.0/assert/fail.ts": "0eba674ffb47dff083f02ced76d5130460bff1a9a68c6514ebe0cdea4abadb68", - "https://deno.land/std@0.224.0/assert/mod.ts": "48b8cb8a619ea0b7958ad7ee9376500fe902284bb36f0e32c598c3dc34cbd6f3", - "https://deno.land/std@0.224.0/assert/unimplemented.ts": "8c55a5793e9147b4f1ef68cd66496b7d5ba7a9e7ca30c6da070c1a58da723d73", - "https://deno.land/std@0.224.0/assert/unreachable.ts": "5ae3dbf63ef988615b93eb08d395dda771c96546565f9e521ed86f6510c29e19", - "https://deno.land/std@0.224.0/fmt/colors.ts": "508563c0659dd7198ba4bbf87e97f654af3c34eb56ba790260f252ad8012e1c5", - "https://deno.land/std@0.224.0/fmt/printf.ts": "8d01408076e2f956b03dd8377010c4974515d6cc909978d2edc5c8cd75077eeb", - "https://deno.land/std@0.224.0/internal/diff.ts": "6234a4b493ebe65dc67a18a0eb97ef683626a1166a1906232ce186ae9f65f4e6", - "https://deno.land/std@0.224.0/internal/format.ts": "0a98ee226fd3d43450245b1844b47003419d34d210fa989900861c79820d21c2", - "https://deno.land/std@0.224.0/internal/mod.ts": "534125398c8e7426183e12dc255bb635d94e06d0f93c60a297723abe69d3b22e", - "https://deno.land/std@0.224.0/path/_common/assert_path.ts": "dbdd757a465b690b2cc72fc5fb7698c51507dec6bfafce4ca500c46b76ff7bd8", - "https://deno.land/std@0.224.0/path/_common/basename.ts": "569744855bc8445f3a56087fd2aed56bdad39da971a8d92b138c9913aecc5fa2", - "https://deno.land/std@0.224.0/path/_common/common.ts": "ef73c2860694775fe8ffcbcdd387f9f97c7a656febf0daa8c73b56f4d8a7bd4c", - "https://deno.land/std@0.224.0/path/_common/constants.ts": "dc5f8057159f4b48cd304eb3027e42f1148cf4df1fb4240774d3492b5d12ac0c", - "https://deno.land/std@0.224.0/path/_common/dirname.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", - "https://deno.land/std@0.224.0/path/_common/format.ts": "92500e91ea5de21c97f5fe91e178bae62af524b72d5fcd246d6d60ae4bcada8b", - "https://deno.land/std@0.224.0/path/_common/from_file_url.ts": "d672bdeebc11bf80e99bf266f886c70963107bdd31134c4e249eef51133ceccf", - "https://deno.land/std@0.224.0/path/_common/glob_to_reg_exp.ts": "6cac16d5c2dc23af7d66348a7ce430e5de4e70b0eede074bdbcf4903f4374d8d", - "https://deno.land/std@0.224.0/path/_common/normalize.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", - "https://deno.land/std@0.224.0/path/_common/normalize_string.ts": "33edef773c2a8e242761f731adeb2bd6d683e9c69e4e3d0092985bede74f4ac3", - "https://deno.land/std@0.224.0/path/_common/relative.ts": "faa2753d9b32320ed4ada0733261e3357c186e5705678d9dd08b97527deae607", - "https://deno.land/std@0.224.0/path/_common/strip_trailing_separators.ts": "7024a93447efcdcfeaa9339a98fa63ef9d53de363f1fbe9858970f1bba02655a", - "https://deno.land/std@0.224.0/path/_common/to_file_url.ts": "7f76adbc83ece1bba173e6e98a27c647712cab773d3f8cbe0398b74afc817883", - "https://deno.land/std@0.224.0/path/_interface.ts": "8dfeb930ca4a772c458a8c7bbe1e33216fe91c253411338ad80c5b6fa93ddba0", - "https://deno.land/std@0.224.0/path/_os.ts": "8fb9b90fb6b753bd8c77cfd8a33c2ff6c5f5bc185f50de8ca4ac6a05710b2c15", - "https://deno.land/std@0.224.0/path/basename.ts": "7ee495c2d1ee516ffff48fb9a93267ba928b5a3486b550be73071bc14f8cc63e", - "https://deno.land/std@0.224.0/path/common.ts": "03e52e22882402c986fe97ca3b5bb4263c2aa811c515ce84584b23bac4cc2643", - "https://deno.land/std@0.224.0/path/constants.ts": "0c206169ca104938ede9da48ac952de288f23343304a1c3cb6ec7625e7325f36", - "https://deno.land/std@0.224.0/path/dirname.ts": "85bd955bf31d62c9aafdd7ff561c4b5fb587d11a9a5a45e2b01aedffa4238a7c", - "https://deno.land/std@0.224.0/path/extname.ts": "593303db8ae8c865cbd9ceec6e55d4b9ac5410c1e276bfd3131916591b954441", - "https://deno.land/std@0.224.0/path/format.ts": "6ce1779b0980296cf2bc20d66436b12792102b831fd281ab9eb08fa8a3e6f6ac", - "https://deno.land/std@0.224.0/path/from_file_url.ts": "911833ae4fd10a1c84f6271f36151ab785955849117dc48c6e43b929504ee069", - "https://deno.land/std@0.224.0/path/glob_to_regexp.ts": "7f30f0a21439cadfdae1be1bf370880b415e676097fda584a63ce319053b5972", - "https://deno.land/std@0.224.0/path/is_absolute.ts": "4791afc8bfd0c87f0526eaa616b0d16e7b3ab6a65b62942e50eac68de4ef67d7", - "https://deno.land/std@0.224.0/path/is_glob.ts": "a65f6195d3058c3050ab905705891b412ff942a292bcbaa1a807a74439a14141", - "https://deno.land/std@0.224.0/path/join.ts": "ae2ec5ca44c7e84a235fd532e4a0116bfb1f2368b394db1c4fb75e3c0f26a33a", - "https://deno.land/std@0.224.0/path/join_globs.ts": "5b3bf248b93247194f94fa6947b612ab9d3abd571ca8386cf7789038545e54a0", - "https://deno.land/std@0.224.0/path/mod.ts": "f6bd79cb08be0e604201bc9de41ac9248582699d1b2ee0ab6bc9190d472cf9cd", - "https://deno.land/std@0.224.0/path/normalize.ts": "4155743ccceeed319b350c1e62e931600272fad8ad00c417b91df093867a8352", - "https://deno.land/std@0.224.0/path/normalize_glob.ts": "cc89a77a7d3b1d01053b9dcd59462b75482b11e9068ae6c754b5cf5d794b374f", - "https://deno.land/std@0.224.0/path/parse.ts": "77ad91dcb235a66c6f504df83087ce2a5471e67d79c402014f6e847389108d5a", - "https://deno.land/std@0.224.0/path/posix/_util.ts": "1e3937da30f080bfc99fe45d7ed23c47dd8585c5e473b2d771380d3a6937cf9d", - "https://deno.land/std@0.224.0/path/posix/basename.ts": "d2fa5fbbb1c5a3ab8b9326458a8d4ceac77580961b3739cd5bfd1d3541a3e5f0", - "https://deno.land/std@0.224.0/path/posix/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4", - "https://deno.land/std@0.224.0/path/posix/constants.ts": "93481efb98cdffa4c719c22a0182b994e5a6aed3047e1962f6c2c75b7592bef1", - "https://deno.land/std@0.224.0/path/posix/dirname.ts": "76cd348ffe92345711409f88d4d8561d8645353ac215c8e9c80140069bf42f00", - "https://deno.land/std@0.224.0/path/posix/extname.ts": "e398c1d9d1908d3756a7ed94199fcd169e79466dd88feffd2f47ce0abf9d61d2", - "https://deno.land/std@0.224.0/path/posix/format.ts": "185e9ee2091a42dd39e2a3b8e4925370ee8407572cee1ae52838aed96310c5c1", - "https://deno.land/std@0.224.0/path/posix/from_file_url.ts": "951aee3a2c46fd0ed488899d024c6352b59154c70552e90885ed0c2ab699bc40", - "https://deno.land/std@0.224.0/path/posix/glob_to_regexp.ts": "76f012fcdb22c04b633f536c0b9644d100861bea36e9da56a94b9c589a742e8f", - "https://deno.land/std@0.224.0/path/posix/is_absolute.ts": "cebe561ad0ae294f0ce0365a1879dcfca8abd872821519b4fcc8d8967f888ede", - "https://deno.land/std@0.224.0/path/posix/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", - "https://deno.land/std@0.224.0/path/posix/join.ts": "7fc2cb3716aa1b863e990baf30b101d768db479e70b7313b4866a088db016f63", - "https://deno.land/std@0.224.0/path/posix/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", - "https://deno.land/std@0.224.0/path/posix/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604", - "https://deno.land/std@0.224.0/path/posix/normalize.ts": "baeb49816a8299f90a0237d214cef46f00ba3e95c0d2ceb74205a6a584b58a91", - "https://deno.land/std@0.224.0/path/posix/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", - "https://deno.land/std@0.224.0/path/posix/parse.ts": "09dfad0cae530f93627202f28c1befa78ea6e751f92f478ca2cc3b56be2cbb6a", - "https://deno.land/std@0.224.0/path/posix/relative.ts": "3907d6eda41f0ff723d336125a1ad4349112cd4d48f693859980314d5b9da31c", - "https://deno.land/std@0.224.0/path/posix/resolve.ts": "08b699cfeee10cb6857ccab38fa4b2ec703b0ea33e8e69964f29d02a2d5257cf", - "https://deno.land/std@0.224.0/path/posix/to_file_url.ts": "7aa752ba66a35049e0e4a4be5a0a31ac6b645257d2e031142abb1854de250aaf", - "https://deno.land/std@0.224.0/path/posix/to_namespaced_path.ts": "28b216b3c76f892a4dca9734ff1cc0045d135532bfd9c435ae4858bfa5a2ebf0", - "https://deno.land/std@0.224.0/path/relative.ts": "ab739d727180ed8727e34ed71d976912461d98e2b76de3d3de834c1066667add", - "https://deno.land/std@0.224.0/path/resolve.ts": "a6f977bdb4272e79d8d0ed4333e3d71367cc3926acf15ac271f1d059c8494d8d", - "https://deno.land/std@0.224.0/path/to_file_url.ts": "88f049b769bce411e2d2db5bd9e6fd9a185a5fbd6b9f5ad8f52bef517c4ece1b", - "https://deno.land/std@0.224.0/path/to_namespaced_path.ts": "b706a4103b104cfadc09600a5f838c2ba94dbcdb642344557122dda444526e40", - "https://deno.land/std@0.224.0/path/windows/_util.ts": "d5f47363e5293fced22c984550d5e70e98e266cc3f31769e1710511803d04808", - "https://deno.land/std@0.224.0/path/windows/basename.ts": "6bbc57bac9df2cec43288c8c5334919418d784243a00bc10de67d392ab36d660", - "https://deno.land/std@0.224.0/path/windows/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4", - "https://deno.land/std@0.224.0/path/windows/constants.ts": "5afaac0a1f67b68b0a380a4ef391bf59feb55856aa8c60dfc01bd3b6abb813f5", - "https://deno.land/std@0.224.0/path/windows/dirname.ts": "33e421be5a5558a1346a48e74c330b8e560be7424ed7684ea03c12c21b627bc9", - "https://deno.land/std@0.224.0/path/windows/extname.ts": "165a61b00d781257fda1e9606a48c78b06815385e7d703232548dbfc95346bef", - "https://deno.land/std@0.224.0/path/windows/format.ts": "bbb5ecf379305b472b1082cd2fdc010e44a0020030414974d6029be9ad52aeb6", - "https://deno.land/std@0.224.0/path/windows/from_file_url.ts": "ced2d587b6dff18f963f269d745c4a599cf82b0c4007356bd957cb4cb52efc01", - "https://deno.land/std@0.224.0/path/windows/glob_to_regexp.ts": "e45f1f89bf3fc36f94ab7b3b9d0026729829fabc486c77f414caebef3b7304f8", - "https://deno.land/std@0.224.0/path/windows/is_absolute.ts": "4a8f6853f8598cf91a835f41abed42112cebab09478b072e4beb00ec81f8ca8a", - "https://deno.land/std@0.224.0/path/windows/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", - "https://deno.land/std@0.224.0/path/windows/join.ts": "8d03530ab89195185103b7da9dfc6327af13eabdcd44c7c63e42e27808f50ecf", - "https://deno.land/std@0.224.0/path/windows/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", - "https://deno.land/std@0.224.0/path/windows/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604", - "https://deno.land/std@0.224.0/path/windows/normalize.ts": "78126170ab917f0ca355a9af9e65ad6bfa5be14d574c5fb09bb1920f52577780", - "https://deno.land/std@0.224.0/path/windows/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", - "https://deno.land/std@0.224.0/path/windows/parse.ts": "08804327b0484d18ab4d6781742bf374976de662f8642e62a67e93346e759707", - "https://deno.land/std@0.224.0/path/windows/relative.ts": "3e1abc7977ee6cc0db2730d1f9cb38be87b0ce4806759d271a70e4997fc638d7", - "https://deno.land/std@0.224.0/path/windows/resolve.ts": "8dae1dadfed9d46ff46cc337c9525c0c7d959fb400a6308f34595c45bdca1972", - "https://deno.land/std@0.224.0/path/windows/to_file_url.ts": "40e560ee4854fe5a3d4d12976cef2f4e8914125c81b11f1108e127934ced502e", - "https://deno.land/std@0.224.0/path/windows/to_namespaced_path.ts": "4ffa4fb6fae321448d5fe810b3ca741d84df4d7897e61ee29be961a6aac89a4c", - "https://deno.land/std@0.224.0/testing/asserts.ts": "d0cdbabadc49cc4247a50732ee0df1403fdcd0f95360294ad448ae8c240f3f5c", - "https://deno.land/x/cliui@v7.0.4-deno/build/lib/index.js": "fb6030c7b12602a4fca4d81de3ddafa301ba84fd9df73c53de6f3bdda7b482d5", - "https://deno.land/x/cliui@v7.0.4-deno/build/lib/string-utils.js": "b3eb9d2e054a43a3064af17332fb1839a7dadb205c5371af4789616afb1a117f", - "https://deno.land/x/cliui@v7.0.4-deno/deno.ts": "d07bc3338661f8011e3a5fd215061d17a52107a5383c29f40ce0c1ecb8bb8cc3", - "https://deno.land/x/escalade@v3.0.3/sync.ts": "493bc66563292c5c10c4a75a467a5933f24dad67d74b0f5a87e7b988fe97c104", - "https://deno.land/x/y18n@v5.0.0-deno/build/lib/index.js": "92c4624714aa508d33c6d21c0b0ffa072369a8b306e5f8c7727662f570bbd026", - "https://deno.land/x/y18n@v5.0.0-deno/deno.ts": "80997f0709a0b43d29931e2b33946f2bbc32b13fd82f80a5409628455427e28d", - "https://deno.land/x/y18n@v5.0.0-deno/lib/platform-shims/deno.ts": "8fa2c96ac03734966260cfd2c5bc240e41725c913e5b64a0297aede09f52b39d", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/argsert.js": "eb085555452eac3ff300935994a42f35d16e04cf698cb775cb5ad4f5653c0627", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/command.js": "6249ffd299e16a1e531ccff13a23aed7b7eef37e20b6e6ab7f254413aece6ca6", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/completion-templates.js": "d9bbed244af4394b786f8abce9efbbdc3777a73458ebd7b6bf23b2495ac11027", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/completion.js": "62e41220b5baa7c082f72638c7eab23a69fff46a78011f2c448e2a2f1fcfd05a", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/middleware.js": "6ab9c953a83264739aa50d7fa6b1ab693500336dfd593b9958865e12beb8bdeb", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/parse-command.js": "327242c0afae207b7aefa13133439e3b321d7db4229febc5b7bd5285770ac7f7", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/typings/common-types.js": "9618b81a86acb88a61fd9988e9bc3ec21c5250d94fc2231ba7d898e71500789d", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/usage.js": "31faaa7aa61e5a57a2cac5a269b773aa8b1fcab2db7cac2f8252396f3ccc2f5e", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/apply-extends.js": "64640dce92669705abead3bdbe2c46c8318c8623843a55e4726fb3c55ff9dd1d", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/is-promise.js": "be45baa3090c5106dd4e442cceef6b357a268783a2ee28ec10fe131a8cd8db72", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/levenshtein.js": "d8638efc3376b5f794b1c8df6ef4f3d484b29d919127c7fdc242400e3cfded91", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/maybe-async-result.js": "31cf4026279e14c87d16faa14ac758f35c8cc5795d29393c5ce07120f5a3caf6", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/obj-filter.js": "5523fb2288d1e86ed48c460e176770b49587554df4ae2405b468c093786b040b", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/set-blocking.js": "6fa8ffc3299f456e42902736bae35fbc1f2dc96b3905a02ba9629f5bd9f80af1", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/which-module.js": "9267633b2c9f8990b2c699101b641e59ae59932e0dee5270613c0508bfa13c5d", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/validation.js": "af040834cb9201d4238bbeb8f673eb2ebaff9611857270524a7c86dfcf2ca51b", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/yargs-factory.js": "05326932b431801d7459d5b14b21f73f13ebd74a8a74e9b7b8cec5f99ba14819", - "https://deno.land/x/yargs@v17.7.2-deno/build/lib/yerror.js": "9729aaa8bce1a0d00c57f470efb2ad76ad2988661bb48f3769e496a3435b4462", - "https://deno.land/x/yargs@v17.7.2-deno/deno.ts": "f3df0bfd08ba367ec36dc59ef6cab1a391ace49ad44387ec5fe5d76289af08af", - "https://deno.land/x/yargs@v17.7.2-deno/lib/platform-shims/deno.ts": "1d3d490a7f3c6f971a44dd92e12a042f988f1b6496df3a9c43ccc69563032dff", - "https://deno.land/x/yargs_parser@v20.2.4-deno/build/lib/string-utils.js": "12fc056b23703bc370aae5b179dc5abee53fca277abc30eaf76f78d2546d6413", - "https://deno.land/x/yargs_parser@v20.2.4-deno/build/lib/tokenize-arg-string.js": "7e0875b11795b8e217386e45f14b24a6e501ebbc62e15aa469aa8829d4d0ee61", - "https://deno.land/x/yargs_parser@v20.2.4-deno/build/lib/yargs-parser.js": "453200a7dfbb002e605d8009b7dad30f2b1d93665e046ab89c073a4fe63dfd48", - "https://deno.land/x/yargs_parser@v20.2.4-deno/deno.ts": "ad53c0c82c3982c4fc5be9472384b259e0a32ce1f7ae0f68de7b2445df5642fc", - "https://esm.sh/@bridge-editor/mc-project-core@0.4.0": "27c4799364c6e73715f317323db6ede7c0d6d7430d17ef7d13521a5d84e331b8", - "https://esm.sh/json5@2.2.3": "56ad046eba99c091fcb546d9ec3ab3463e9a889f5d52b818c91c5f2e793dbefd", - "https://esm.sh/v135/@bridge-editor/common-utils@0.3.3/denonext/common-utils.mjs": "36d6ab2b43f9988e23a1acede1870472ce46289166c2350f1d3d7c64ffd7f799", - "https://esm.sh/v135/@bridge-editor/mc-project-core@0.4.0/denonext/mc-project-core.mjs": "d19bba5f627d72a8b1ffdd55bec418fbdcec588b0298a9bfe1afb24b164e7992", - "https://esm.sh/v135/json5@2.2.3/denonext/json5.mjs": "2124ca68e182d9de859a72e9415bbc4702b8f0bb002a7a22ea06d6684a3e562b", - "https://esm.sh/v135/path-browserify@1.0.1/denonext/path-browserify.mjs": "397babbb819658714128c4dade6867153fe2a18115391c845369924aa0e3eb20", - "https://unpkg.com/@bridge-editor/dash-compiler@0.11.7/dist/dash-compiler.bundled.es.js": "fffac9708805c765df2d2b4276b90ed1aad2ceb0d8a1cf506babeca2dc131dcc", - "https://unpkg.com/@bridge-editor/dash-compiler@0.11.7/package.json": "19ea2b4b03fbe3eec35f2980ba3e67df3946880e21faad3fa4032509c93957fa" - }, "workspace": { "dependencies": [ "jsr:@std/async@^1.0.7", "jsr:@std/path@^1.0.7", + "jsr:@std/semver@^1.0.3", "npm:@bridge-editor/common-utils@~0.3.3", "npm:@bridge-editor/mc-project-core@0.4" ] diff --git a/mod.ts b/mod.ts index c8dc143..21a28a6 100644 --- a/mod.ts +++ b/mod.ts @@ -1,11 +1,12 @@ // deno-lint-ignore-file no-explicit-any import { CLI } from './src/CLI.ts' import yargs from 'https://deno.land/x/yargs@v17.7.2-deno/deno.ts' +import { parse as semverParse, compare as semverCompare } from '@std/semver' import { comMojangFolder } from './src/comMojangFolder.ts' import { initRuntimes, swcVersion } from './src/deps.ts' type YargsInstance = ReturnType -const CURRENT_VERSION = `0.4.7` +const CURRENT_VERSION = `1.0.0` async function fetchLatestVersion(): Promise { try { From d86b35818487ee90f32ec4670f660c3a0c96a090 Mon Sep 17 00:00:00 2001 From: Thomas Orsbourne Date: Sat, 9 Nov 2024 20:47:05 -0400 Subject: [PATCH 3/5] Update version number to 1 --- deno.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deno.json b/deno.json index 728c401..ffac5f3 100644 --- a/deno.json +++ b/deno.json @@ -7,7 +7,7 @@ "@std/semver": "jsr:@std/semver@^1.0.3", "dash-compiler-local": "../dash-compiler/dist/dash-compiler.bundled.es.js" }, - "version": "1.0.0-alpha", + "version": "1.0.0", "tasks": { "install": "deno install -A -f -n dash_compiler ./mod.ts", "install:full": "deno install -A --reload -f -n dash_compiler ./mod.ts", From 1478ae5203e222033930093f49d00886a87706eb Mon Sep 17 00:00:00 2001 From: Thomas Orsbourne Date: Sat, 9 Nov 2024 20:48:22 -0400 Subject: [PATCH 4/5] Change readme to include deno 2s global change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4e0108d..9de17d4 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Releases page](https://github.com/bridge-core/deno-dash-compiler/releases). Open your terminal and run: ```shell -deno install -A -f --reload -n dash_compiler https://raw.githubusercontent.com/bridge-core/deno-dash-compiler/main/mod.ts +deno install -A --global -f --reload -n dash_compiler https://raw.githubusercontent.com/bridge-core/deno-dash-compiler/main/mod.ts ``` #### Via Deno's Task Runner From d97488e10431769aa44c2c135bac1ca7d4c06044 Mon Sep 17 00:00:00 2001 From: Outer Cloud Studio Date: Mon, 11 Nov 2024 12:53:28 -0600 Subject: [PATCH 5/5] Fix some issues with packages missing registries --- deno.json | 38 ++++++++------------------------------ deno.lock | 33 ++++++++++++++++++++++++++++++++- mod.ts | 2 +- src/deps.ts | 4 ++-- 4 files changed, 43 insertions(+), 34 deletions(-) diff --git a/deno.json b/deno.json index ffac5f3..ab936fc 100644 --- a/deno.json +++ b/deno.json @@ -9,27 +9,16 @@ }, "version": "1.0.0", "tasks": { - "install": "deno install -A -f -n dash_compiler ./mod.ts", - "install:full": "deno install -A --reload -f -n dash_compiler ./mod.ts", + "install": "deno install --global -A -f -n dash_compiler ./mod.ts", + "install:full": "deno install --global -A --reload -f -n dash_compiler ./mod.ts", "build": "deno task build:apple-x86 && deno task build:apple-aarch64 && deno task build:windows-x86", "build:apple-x86": "deno compile --target x86_64-apple-darwin --output ./executables/dash-apple-x64 -A ./mod.ts", "build:apple-aarch64": "deno compile --target aarch64-apple-darwin --output ./executables/dash-apple-aarch64 -A ./mod.ts", "build:windows-x86": "deno compile --target x86_64-pc-windows-msvc --output ./executables/dash.exe -A ./mod.ts" }, "fmt": { - "include": [ - "*.json", - "*.ts", - "*.tsx", - "src/" - ], - "exclude": [ - "dist/", - ".vscode/", - ".github/", - "README.md", - "deno.lock" - ], + "include": ["*.json", "*.ts", "*.tsx", "src/"], + "exclude": ["dist/", ".vscode/", ".github/", "README.md", "deno.lock"], "useTabs": true, "lineWidth": 80, "semiColons": false, @@ -37,22 +26,11 @@ "singleQuote": true }, "lint": { - "include": [ - "*.ts", - "src/" - ], - "exclude": [ - "dist/", - ".vscode/", - ".github/" - ], + "include": ["*.ts", "src/"], + "exclude": ["dist/", ".vscode/", ".github/"], "rules": { - "tags": [ - "recommended" - ], - "include": [ - "ban-untagged-todo" - ], + "tags": ["recommended"], + "include": ["ban-untagged-todo"], "exclude": [] } } diff --git a/deno.lock b/deno.lock index c5045f8..00c1232 100644 --- a/deno.lock +++ b/deno.lock @@ -1,11 +1,14 @@ { "version": "4", "specifiers": { + "jsr:@std/async@*": "1.0.8", "jsr:@std/async@^1.0.7": "1.0.8", + "jsr:@std/path@*": "1.0.8", "jsr:@std/path@^1.0.7": "1.0.8", "jsr:@std/semver@^1.0.3": "1.0.3", "npm:@bridge-editor/common-utils@~0.3.3": "0.3.3", - "npm:@bridge-editor/mc-project-core@0.4": "0.4.0" + "npm:@bridge-editor/mc-project-core@0.4": "0.4.0", + "npm:@types/node@*": "22.5.4" }, "jsr": { "@std/async@1.0.8": { @@ -33,6 +36,12 @@ "path-browserify" ] }, + "@types/node@22.5.4": { + "integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==", + "dependencies": [ + "undici-types" + ] + }, "compare-versions@4.1.4": { "integrity": "sha512-FemMreK9xNyL8gQevsdRMrvO4lFCkQP7qbuktn1q8ndcNk1+0mz7lgE7b/sNvbhVgY4w6tMN1FDp6aADjqw2rw==" }, @@ -41,8 +50,30 @@ }, "path-browserify@1.0.1": { "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + }, + "undici-types@6.19.8": { + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" } }, + "remote": { + "https://esm.sh/@bridge-editor/dash-compiler@0.11.7": "9022b115079e7eba6c29b2ce64e5cce3f4609bf37ae75be70dcceff20ee0931c", + "https://esm.sh/@bridge-editor/mc-project-core@0.4.0": "27c4799364c6e73715f317323db6ede7c0d6d7430d17ef7d13521a5d84e331b8", + "https://esm.sh/json5@2.2.3": "56ad046eba99c091fcb546d9ec3ab3463e9a889f5d52b818c91c5f2e793dbefd", + "https://esm.sh/v135/@bridge-editor/common-utils@0.3.3/denonext/common-utils.mjs": "36d6ab2b43f9988e23a1acede1870472ce46289166c2350f1d3d7c64ffd7f799", + "https://esm.sh/v135/@bridge-editor/dash-compiler@0.11.7/denonext/dash-compiler.mjs": "e16980e14a7fab10a171e9f6321407a797598f5a6dd25fc513a8c4a2967c7711", + "https://esm.sh/v135/@bridge-editor/js-runtime@0.4.5/denonext/js-runtime.mjs": "5e904804cb222a9e0fd6ad7994d9c4b72ffff247392e02381ae09621c06e9c30", + "https://esm.sh/v135/@bridge-editor/mc-project-core@0.4.0/denonext/mc-project-core.mjs": "d19bba5f627d72a8b1ffdd55bec418fbdcec588b0298a9bfe1afb24b164e7992", + "https://esm.sh/v135/@bridge-editor/molang@2.0.2/denonext/molang.mjs": "0e11083e84d6c9c12636d6090fc171db45701afb7d2bf7f80643e00fd00ccebd", + "https://esm.sh/v135/@swc/wasm-web@1.6.5/denonext/wasm-web.mjs": "328d0bd0fc0e62914ccd85d4001bbeb2f5354c0638a53a26dec9f0d62c74e947", + "https://esm.sh/v135/is-extglob@2.1.1/denonext/is-extglob.mjs": "43b399da3b6384e348c08e894003bd598e511c77e6079e76328085d7081a9595", + "https://esm.sh/v135/is-glob@4.0.3/denonext/is-glob.mjs": "f2ee9ce4250a5727fb81e5a0c96efa7f0566166a4d9ac6acb3107821b9f5f52d", + "https://esm.sh/v135/json5@2.2.3/denonext/json5.mjs": "2124ca68e182d9de859a72e9415bbc4702b8f0bb002a7a22ea06d6684a3e562b", + "https://esm.sh/v135/magic-string@0.26.7/denonext/magic-string.mjs": "7ab76b1d4f529e3321e4696c66e3beabc6ada3f3d8ddb8d585c884e9e8fecc31", + "https://esm.sh/v135/path-browserify@1.0.1/denonext/path-browserify.mjs": "397babbb819658714128c4dade6867153fe2a18115391c845369924aa0e3eb20", + "https://esm.sh/v135/sourcemap-codec@1.4.8/denonext/sourcemap-codec.mjs": "4fe24182fb99746cc4fe4092e0f78eca97819fe99b9b9c097ccdd86d07da3551", + "https://unpkg.com/@bridge-editor/dash-compiler@0.11.7/dist/dash-compiler.bundled.es.js": "fffac9708805c765df2d2b4276b90ed1aad2ceb0d8a1cf506babeca2dc131dcc", + "https://unpkg.com/@bridge-editor/dash-compiler@0.11.7/package.json": "19ea2b4b03fbe3eec35f2980ba3e67df3946880e21faad3fa4032509c93957fa" + }, "workspace": { "dependencies": [ "jsr:@std/async@^1.0.7", diff --git a/mod.ts b/mod.ts index 21a28a6..a13bf91 100644 --- a/mod.ts +++ b/mod.ts @@ -1,7 +1,7 @@ // deno-lint-ignore-file no-explicit-any import { CLI } from './src/CLI.ts' import yargs from 'https://deno.land/x/yargs@v17.7.2-deno/deno.ts' -import { parse as semverParse, compare as semverCompare } from '@std/semver' +import { parse as semverParse, compare as semverCompare } from 'jsr:@std/semver' import { comMojangFolder } from './src/comMojangFolder.ts' import { initRuntimes, swcVersion } from './src/deps.ts' diff --git a/src/deps.ts b/src/deps.ts index 6ff8dea..0afe4fa 100644 --- a/src/deps.ts +++ b/src/deps.ts @@ -1,11 +1,11 @@ -export * as path from '@std/path' +export * as path from 'jsr:@std/path' export { FileType, PackType, ProjectConfig, type IFileType, } from 'https://esm.sh/@bridge-editor/mc-project-core@0.4.0' -export { isMatch } from '@bridge-editor/common-utils' +export { isMatch } from 'npm:@bridge-editor/common-utils' // @deno-types="https://esm.sh/@bridge-editor/dash-compiler@0.11.7" export { Dash,