diff --git a/.pnp.cjs b/.pnp.cjs index 9bbd728..792ea51 100644 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -1,6 +1,11 @@ #!/usr/bin/env node /* eslint-disable */ -"use strict"; + +try { + Object.freeze({}).detectStrictMode = true; +} catch (error) { + throw new Error(`The whole PnP file got strict-mode-ified, which is known to break (Emscripten libraries aren't strict mode). This usually happens when the file goes through Babel.`); +} function $$SETUP_STATE(hydrateRuntimeState, basePath) { return hydrateRuntimeState(JSON.parse('{\ @@ -44,7 +49,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@types/chrome", "npm:0.0.227"],\ ["@types/jest", "npm:29.5.0"],\ ["@types/node", "npm:18.14.6"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["@types/react-dom", "npm:18.0.11"],\ ["@types/testing-library__jest-dom", "npm:5.14.5"],\ ["@types/three", "npm:0.149.0"],\ @@ -62,7 +67,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["react-scripts", "virtual:ff5ad3439f8ec237c0c86796b437c422a681ce7f1211bc52c84c467fd5c19025673469e4b3bd047db74cf4144d670522e4013a081fcd63cc449dbcb3b5b92460#npm:5.0.1"],\ ["styled-components", "virtual:ff5ad3439f8ec237c0c86796b437c422a681ce7f1211bc52c84c467fd5c19025673469e4b3bd047db74cf4144d670522e4013a081fcd63cc449dbcb3b5b92460#npm:5.3.8"],\ ["three", "npm:0.149.0"],\ - ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76"]\ + ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=a1c5e5"]\ ],\ "linkType": "SOFT"\ }]\ @@ -317,7 +322,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@types/babel__core", null],\ ["debug", "virtual:ac3d8e680759ce54399273724d44e041d6c9b73454d191d411a8c44bb27e22f02aaf6ed9d3ad0ac1c298eac4833cff369c9c7b84c573016112c4f84be2cd8543#npm:4.3.4"],\ ["lodash.debounce", "npm:4.0.8"],\ - ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=c3c19d"],\ + ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b"],\ ["semver", "npm:6.3.0"]\ ],\ "packagePeers": [\ @@ -4169,7 +4174,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [\ ["@playwright/test", "npm:1.32.1"],\ ["@types/node", "npm:18.14.6"],\ - ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1"],\ + ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=18f3a7"],\ ["playwright-core", "npm:1.32.1"]\ ],\ "linkType": "HARD"\ @@ -4258,7 +4263,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@primer-octicons-react-virtual-d9b623413f/0/cache/@primer-octicons-react-npm-17.12.0-f2e14562a0-6af48465d2.zip/node_modules/@primer/octicons-react/",\ "packageDependencies": [\ ["@primer/octicons-react", "virtual:02566b438c0e6066eb17807a9417eeeedfbeb730ff352bda25ea97131eff644f0590fd6ae4db6c892c79cc0e255483e826b0af8d4ec33f107675e1a30c98c4b8#npm:17.12.0"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["react", "npm:18.2.0"]\ ],\ "packagePeers": [\ @@ -4271,7 +4276,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@primer-octicons-react-virtual-dd8ad50232/0/cache/@primer-octicons-react-npm-18.2.0-4922167f1d-95f1770f44.zip/node_modules/@primer/octicons-react/",\ "packageDependencies": [\ ["@primer/octicons-react", "virtual:ff5ad3439f8ec237c0c86796b437c422a681ce7f1211bc52c84c467fd5c19025673469e4b3bd047db74cf4144d670522e4013a081fcd63cc449dbcb3b5b92460#npm:18.2.0"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["react", "npm:18.2.0"]\ ],\ "packagePeers": [\ @@ -4314,7 +4319,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@styled-system/css", "npm:5.1.5"],\ ["@styled-system/props", "npm:5.1.5"],\ ["@styled-system/theme-get", "npm:5.1.2"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["@types/react-dom", "npm:18.0.11"],\ ["@types/styled-components", "npm:5.1.26"],\ ["@types/styled-system", "npm:5.1.16"],\ @@ -4355,7 +4360,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [\ ["@react-aria/ssr", "virtual:02566b438c0e6066eb17807a9417eeeedfbeb730ff352bda25ea97131eff644f0590fd6ae4db6c892c79cc0e255483e826b0af8d4ec33f107675e1a30c98c4b8#npm:3.5.0"],\ ["@swc/helpers", "npm:0.4.14"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["react", "npm:18.2.0"]\ ],\ "packagePeers": [\ @@ -4379,7 +4384,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@react-spring/animated", "virtual:e5336996b5ce14b04066e45ce29d5b8de746c8b02da510dec555faa0487922fa3a84f120c79065f4b08660fde49dcaeb51aa01e0fbf6451d784c9b666559c93d#npm:9.6.1"],\ ["@react-spring/shared", "virtual:e5336996b5ce14b04066e45ce29d5b8de746c8b02da510dec555faa0487922fa3a84f120c79065f4b08660fde49dcaeb51aa01e0fbf6451d784c9b666559c93d#npm:9.6.1"],\ ["@react-spring/types", "npm:9.6.1"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["react", "npm:18.2.0"]\ ],\ "packagePeers": [\ @@ -4405,7 +4410,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@react-spring/rafz", "npm:9.6.1"],\ ["@react-spring/shared", "virtual:e5336996b5ce14b04066e45ce29d5b8de746c8b02da510dec555faa0487922fa3a84f120c79065f4b08660fde49dcaeb51aa01e0fbf6451d784c9b666559c93d#npm:9.6.1"],\ ["@react-spring/types", "npm:9.6.1"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["react", "npm:18.2.0"]\ ],\ "packagePeers": [\ @@ -4438,7 +4443,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@react-spring/shared", "virtual:e5336996b5ce14b04066e45ce29d5b8de746c8b02da510dec555faa0487922fa3a84f120c79065f4b08660fde49dcaeb51aa01e0fbf6451d784c9b666559c93d#npm:9.6.1"],\ ["@react-spring/rafz", "npm:9.6.1"],\ ["@react-spring/types", "npm:9.6.1"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["react", "npm:18.2.0"]\ ],\ "packagePeers": [\ @@ -4465,7 +4470,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@react-spring/shared", "virtual:e5336996b5ce14b04066e45ce29d5b8de746c8b02da510dec555faa0487922fa3a84f120c79065f4b08660fde49dcaeb51aa01e0fbf6451d784c9b666559c93d#npm:9.6.1"],\ ["@react-spring/types", "npm:9.6.1"],\ ["@react-three/fiber", "virtual:ff5ad3439f8ec237c0c86796b437c422a681ce7f1211bc52c84c467fd5c19025673469e4b3bd047db74cf4144d670522e4013a081fcd63cc449dbcb3b5b92460#npm:8.12.0"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["@types/react-three__fiber", null],\ ["@types/three", "npm:0.149.0"],\ ["react", "npm:18.2.0"],\ @@ -4506,7 +4511,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@babel/runtime", "npm:7.21.0"],\ ["@react-spring/three", "virtual:29c3c4240323f5bf8136b0c1a1012bc3e3d9588d3498f13510f3afbd0efe5063183229512909a2c0e61a30445f0fb0073f778c20e19439a9a9c3fb42e065e599#npm:9.6.1"],\ ["@react-three/fiber", "virtual:ff5ad3439f8ec237c0c86796b437c422a681ce7f1211bc52c84c467fd5c19025673469e4b3bd047db74cf4144d670522e4013a081fcd63cc449dbcb3b5b92460#npm:8.12.0"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["@types/react-dom", "npm:18.0.11"],\ ["@types/react-three__fiber", null],\ ["@types/three", "npm:0.149.0"],\ @@ -4561,7 +4566,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@types/expo", null],\ ["@types/expo-asset", null],\ ["@types/expo-gl", null],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["@types/react-dom", "npm:18.0.11"],\ ["@types/react-native", null],\ ["@types/react-reconciler", "npm:0.26.7"],\ @@ -4645,7 +4650,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["builtin-modules", "npm:3.3.0"],\ ["deepmerge", "npm:4.3.0"],\ ["is-module", "npm:1.0.0"],\ - ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=c3c19d"],\ + ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b"],\ ["rollup", "npm:2.79.1"]\ ],\ "packagePeers": [\ @@ -5124,7 +5129,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@testing-library/react", "virtual:ff5ad3439f8ec237c0c86796b437c422a681ce7f1211bc52c84c467fd5c19025673469e4b3bd047db74cf4144d670522e4013a081fcd63cc449dbcb3b5b92460#npm:14.0.0"],\ ["@babel/runtime", "npm:7.21.0"],\ ["@testing-library/dom", "npm:9.0.1"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["@types/react-dom", "npm:18.0.11"],\ ["react", "npm:18.2.0"],\ ["react-dom", "virtual:ff5ad3439f8ec237c0c86796b437c422a681ce7f1211bc52c84c467fd5c19025673469e4b3bd047db74cf4144d670522e4013a081fcd63cc449dbcb3b5b92460#npm:18.2.0"]\ @@ -5624,6 +5629,16 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["csstype", "npm:3.1.1"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:18.0.31", {\ + "packageLocation": "./.yarn/cache/@types-react-npm-18.0.31-1422c39149-6befbd5587.zip/node_modules/@types/react/",\ + "packageDependencies": [\ + ["@types/react", "npm:18.0.31"],\ + ["@types/prop-types", "npm:15.7.5"],\ + ["@types/scheduler", "npm:0.16.2"],\ + ["csstype", "npm:3.1.1"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@types/react-dom", [\ @@ -5874,7 +5889,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["regexpp", "npm:3.2.0"],\ ["semver", "npm:7.3.8"],\ ["tsutils", "virtual:9698d22773cab376c7f8ae25f4e88560fd2f806c59021b1894ba59e3165fb61902e4429f862b965d57c4d54ffb7b8c48510de79474c51edb6ba70c6b41633d9b#npm:3.21.0"],\ - ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76"]\ + ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=a1c5e5"]\ ],\ "packagePeers": [\ "@types/eslint",\ @@ -5929,7 +5944,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@typescript-eslint/typescript-estree", "virtual:74bdcd90bb2a85faabd3486ebdc3b59af455da792937582d4df44f05efb03878b45723b9eb3f29f6c05588558dd0a21dc205fd9320daed174f57074b47ef41a1#npm:5.54.1"],\ ["debug", "virtual:ac3d8e680759ce54399273724d44e041d6c9b73454d191d411a8c44bb27e22f02aaf6ed9d3ad0ac1c298eac4833cff369c9c7b84c573016112c4f84be2cd8543#npm:4.3.4"],\ ["eslint", "npm:8.37.0"],\ - ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76"]\ + ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=a1c5e5"]\ ],\ "packagePeers": [\ "@types/eslint",\ @@ -5970,7 +5985,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["debug", "virtual:ac3d8e680759ce54399273724d44e041d6c9b73454d191d411a8c44bb27e22f02aaf6ed9d3ad0ac1c298eac4833cff369c9c7b84c573016112c4f84be2cd8543#npm:4.3.4"],\ ["eslint", "npm:8.37.0"],\ ["tsutils", "virtual:9698d22773cab376c7f8ae25f4e88560fd2f806c59021b1894ba59e3165fb61902e4429f862b965d57c4d54ffb7b8c48510de79474c51edb6ba70c6b41633d9b#npm:3.21.0"],\ - ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76"]\ + ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=a1c5e5"]\ ],\ "packagePeers": [\ "@types/eslint",\ @@ -6010,7 +6025,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["is-glob", "npm:4.0.3"],\ ["semver", "npm:7.3.8"],\ ["tsutils", "virtual:9698d22773cab376c7f8ae25f4e88560fd2f806c59021b1894ba59e3165fb61902e4429f862b965d57c4d54ffb7b8c48510de79474c51edb6ba70c6b41633d9b#npm:3.21.0"],\ - ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76"]\ + ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=a1c5e5"]\ ],\ "packagePeers": [\ "@types/typescript",\ @@ -6101,7 +6116,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@use-gesture-react-virtual-39a6d54b44/0/cache/@use-gesture-react-npm-10.2.24-274fed4d8e-f8e651aa2e.zip/node_modules/@use-gesture/react/",\ "packageDependencies": [\ ["@use-gesture/react", "virtual:29c3c4240323f5bf8136b0c1a1012bc3e3d9588d3498f13510f3afbd0efe5063183229512909a2c0e61a30445f0fb0073f778c20e19439a9a9c3fb42e065e599#npm:10.2.24"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["@use-gesture/core", "npm:10.2.24"],\ ["react", "npm:18.2.0"]\ ],\ @@ -7019,7 +7034,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["babel-plugin-macros", "npm:3.1.0"],\ ["@babel/runtime", "npm:7.21.0"],\ ["cosmiconfig", "npm:7.1.0"],\ - ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=c3c19d"]\ + ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b"]\ ],\ "linkType": "HARD"\ }]\ @@ -7729,7 +7744,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["chokidar", "npm:3.5.3"],\ ["anymatch", "npm:3.1.3"],\ ["braces", "npm:3.0.2"],\ - ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1"],\ + ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=18f3a7"],\ ["glob-parent", "npm:5.1.2"],\ ["is-binary-path", "npm:2.1.0"],\ ["is-glob", "npm:4.0.3"],\ @@ -8996,7 +9011,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@types/chrome", "npm:0.0.227"],\ ["@types/jest", "npm:29.5.0"],\ ["@types/node", "npm:18.14.6"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["@types/react-dom", "npm:18.0.11"],\ ["@types/testing-library__jest-dom", "npm:5.14.5"],\ ["@types/three", "npm:0.149.0"],\ @@ -9014,7 +9029,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["react-scripts", "virtual:ff5ad3439f8ec237c0c86796b437c422a681ce7f1211bc52c84c467fd5c19025673469e4b3bd047db74cf4144d670522e4013a081fcd63cc449dbcb3b5b92460#npm:5.0.1"],\ ["styled-components", "virtual:ff5ad3439f8ec237c0c86796b437c422a681ce7f1211bc52c84c467fd5c19025673469e4b3bd047db74cf4144d670522e4013a081fcd63cc449dbcb3b5b92460#npm:5.3.8"],\ ["three", "npm:0.149.0"],\ - ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76"]\ + ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=a1c5e5"]\ ],\ "linkType": "SOFT"\ }]\ @@ -9639,7 +9654,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint-plugin-react", "virtual:ff5ad3439f8ec237c0c86796b437c422a681ce7f1211bc52c84c467fd5c19025673469e4b3bd047db74cf4144d670522e4013a081fcd63cc449dbcb3b5b92460#npm:7.32.2"],\ ["eslint-plugin-react-hooks", "virtual:36c3befe1d472956b514499ce1e4a73095ed0f246cfe87692d25c86c8df5acd8b2aa4e89e7fd95a9fa38d2001eae09b4865f122f1e3cd7ed381406217d407428#npm:4.6.0"],\ ["eslint-plugin-testing-library", "virtual:36c3befe1d472956b514499ce1e4a73095ed0f246cfe87692d25c86c8df5acd8b2aa4e89e7fd95a9fa38d2001eae09b4865f122f1e3cd7ed381406217d407428#npm:5.10.2"],\ - ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76"]\ + ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=a1c5e5"]\ ],\ "packagePeers": [\ "@types/eslint",\ @@ -9657,7 +9672,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint-import-resolver-node", "npm:0.3.7"],\ ["debug", "virtual:65bed195431eadffc59e2238eb20cc12d9a1665bc7458ce780a9320ff795091b03cb5c4c2094938315ddd967b5b02c0f1df67b3ed435c69b7457092b7cc06ed8#npm:3.2.7"],\ ["is-core-module", "npm:2.11.0"],\ - ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=c3c19d"]\ + ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b"]\ ],\ "linkType": "HARD"\ }]\ @@ -9761,7 +9776,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["is-glob", "npm:4.0.3"],\ ["minimatch", "npm:3.1.2"],\ ["object.values", "npm:1.1.6"],\ - ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=c3c19d"],\ + ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b"],\ ["semver", "npm:6.3.0"],\ ["tsconfig-paths", "npm:3.14.2"]\ ],\ @@ -9869,7 +9884,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["object.hasown", "npm:1.1.2"],\ ["object.values", "npm:1.1.6"],\ ["prop-types", "npm:15.8.1"],\ - ["resolve", "patch:resolve@npm%3A2.0.0-next.4#~builtin::version=2.0.0-next.4&hash=c3c19d"],\ + ["resolve", "patch:resolve@npm%3A2.0.0-next.4#~builtin::version=2.0.0-next.4&hash=07638b"],\ ["semver", "npm:6.3.0"],\ ["string.prototype.matchall", "npm:4.0.8"]\ ],\ @@ -10504,7 +10519,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["schema-utils", "npm:2.7.0"],\ ["semver", "npm:7.3.8"],\ ["tapable", "npm:1.1.3"],\ - ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76"],\ + ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=a1c5e5"],\ ["vue-template-compiler", null],\ ["webpack", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:5.76.0"]\ ],\ @@ -10612,10 +10627,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["fsevents", [\ - ["patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1", {\ - "packageLocation": "./.yarn/unplugged/fsevents-patch-2882183fbf/node_modules/fsevents/",\ + ["patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=18f3a7", {\ + "packageLocation": "./.yarn/unplugged/fsevents-patch-3340e2eb10/node_modules/fsevents/",\ "packageDependencies": [\ - ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1"],\ + ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=18f3a7"],\ ["node-gyp", "npm:9.3.1"]\ ],\ "linkType": "HARD"\ @@ -11994,7 +12009,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/its-fine-virtual-8e9126b81a/0/cache/its-fine-npm-1.0.10-3be897027d-825e90d1dc.zip/node_modules/its-fine/",\ "packageDependencies": [\ ["its-fine", "virtual:f601f6d383d6c72eb7360ffde364b288c0eeb14d754919b7217678dbbe16fd9ac6d0eb1a10b1a7e09fd0b8ac96a4f26f7ba0caba75ab6bd801299716e0f36a91#npm:1.0.10"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["@types/react-reconciler", "npm:0.28.2"],\ ["react", "npm:18.2.0"]\ ],\ @@ -12268,7 +12283,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@types/node", "npm:18.14.6"],\ ["anymatch", "npm:3.1.3"],\ ["fb-watchman", "npm:2.0.2"],\ - ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1"],\ + ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=18f3a7"],\ ["graceful-fs", "npm:4.2.10"],\ ["jest-regex-util", "npm:27.5.1"],\ ["jest-serializer", "npm:27.5.1"],\ @@ -12452,7 +12467,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["jest-pnp-resolver", "virtual:a0a4a415f59ab1a920949fe4f9ac7174aa7df535addf97fcdc124f36cb0389a80c8f31f99ad52fa0c7aaa53f66726b763a7b2a27b93255cb52f9164322c0788e#npm:1.2.3"],\ ["jest-util", "npm:27.5.1"],\ ["jest-validate", "npm:27.5.1"],\ - ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=c3c19d"],\ + ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b"],\ ["resolve.exports", "npm:1.1.1"],\ ["slash", "npm:3.0.0"]\ ],\ @@ -14997,7 +15012,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["postcss", "npm:8.4.21"],\ ["postcss-value-parser", "npm:4.2.0"],\ ["read-cache", "npm:1.0.0"],\ - ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=c3c19d"]\ + ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b"]\ ],\ "packagePeers": [\ "@types/postcss",\ @@ -16382,7 +16397,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/react-composer-virtual-2ef42973cf/0/cache/react-composer-npm-5.0.3-68281c1ebc-ef7c52dc61.zip/node_modules/react-composer/",\ "packageDependencies": [\ ["react-composer", "virtual:29c3c4240323f5bf8136b0c1a1012bc3e3d9588d3498f13510f3afbd0efe5063183229512909a2c0e61a30445f0fb0073f778c20e19439a9a9c3fb42e065e599#npm:5.0.3"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["prop-types", "npm:15.8.1"],\ ["react", "npm:18.2.0"]\ ],\ @@ -16431,7 +16446,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["shell-quote", "npm:1.8.0"],\ ["strip-ansi", "npm:6.0.1"],\ ["text-table", "npm:0.2.0"],\ - ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76"],\ + ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=a1c5e5"],\ ["webpack", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:5.76.0"]\ ],\ "packagePeers": [\ @@ -16455,7 +16470,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/react-dom-virtual-e7522fee28/0/cache/react-dom-npm-18.2.0-dd675bca1c-7d323310be.zip/node_modules/react-dom/",\ "packageDependencies": [\ ["react-dom", "virtual:ff5ad3439f8ec237c0c86796b437c422a681ce7f1211bc52c84c467fd5c19025673469e4b3bd047db74cf4144d670522e4013a081fcd63cc449dbcb3b5b92460#npm:18.2.0"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["loose-envify", "npm:1.4.0"],\ ["react", "npm:18.2.0"],\ ["scheduler", "npm:0.23.0"]\ @@ -16488,7 +16503,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/react-intersection-observer-virtual-5af5b15740/0/cache/react-intersection-observer-npm-9.4.1-d6fc91f3de-13d1c36658.zip/node_modules/react-intersection-observer/",\ "packageDependencies": [\ ["react-intersection-observer", "virtual:02566b438c0e6066eb17807a9417eeeedfbeb730ff352bda25ea97131eff644f0590fd6ae4db6c892c79cc0e255483e826b0af8d4ec33f107675e1a30c98c4b8#npm:9.4.1"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["react", "npm:18.2.0"]\ ],\ "packagePeers": [\ @@ -16542,7 +16557,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/react-reconciler-virtual-d08affe6c8/0/cache/react-reconciler-npm-0.27.0-4851288844-c2ae111f15.zip/node_modules/react-reconciler/",\ "packageDependencies": [\ ["react-reconciler", "virtual:f601f6d383d6c72eb7360ffde364b288c0eeb14d754919b7217678dbbe16fd9ac6d0eb1a10b1a7e09fd0b8ac96a4f26f7ba0caba75ab6bd801299716e0f36a91#npm:0.27.0"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["loose-envify", "npm:1.4.0"],\ ["react", "npm:18.2.0"],\ ["scheduler", "npm:0.21.0"]\ @@ -16579,7 +16594,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@pmmmwh/react-refresh-webpack-plugin", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:0.5.10"],\ ["@svgr/webpack", "npm:5.5.0"],\ ["@types/eslint", null],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["@types/typescript", null],\ ["babel-jest", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:27.5.1"],\ ["babel-loader", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:8.3.0"],\ @@ -16598,7 +16613,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint-webpack-plugin", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:3.2.0"],\ ["file-loader", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:6.2.0"],\ ["fs-extra", "npm:10.1.0"],\ - ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1"],\ + ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=18f3a7"],\ ["html-webpack-plugin", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:5.5.0"],\ ["identity-obj-proxy", "npm:3.0.0"],\ ["jest", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:27.5.1"],\ @@ -16615,7 +16630,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["react-app-polyfill", "npm:3.0.0"],\ ["react-dev-utils", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:12.0.1"],\ ["react-refresh", "npm:0.11.0"],\ - ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=c3c19d"],\ + ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b"],\ ["resolve-url-loader", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:4.0.0"],\ ["sass-loader", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:12.6.0"],\ ["semver", "npm:7.3.8"],\ @@ -16623,7 +16638,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["style-loader", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:3.3.1"],\ ["tailwindcss", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:3.2.7"],\ ["terser-webpack-plugin", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:5.3.7"],\ - ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76"],\ + ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=a1c5e5"],\ ["webpack", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:5.76.0"],\ ["webpack-dev-server", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:4.11.1"],\ ["webpack-manifest-plugin", "virtual:b887c16a9b3e080455598836bd004e969a104720b605f110640fc7a73cf5e804e79e0505c6ba9dbd22582f5c638669cfa8efa4ba5504af62e17acc45c6742ba4#npm:4.1.1"],\ @@ -16652,7 +16667,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/react-use-measure-virtual-aab994bab9/0/cache/react-use-measure-npm-2.1.1-7e53301142-b8e8939229.zip/node_modules/react-use-measure/",\ "packageDependencies": [\ ["react-use-measure", "virtual:f601f6d383d6c72eb7360ffde364b288c0eeb14d754919b7217678dbbe16fd9ac6d0eb1a10b1a7e09fd0b8ac96a4f26f7ba0caba75ab6bd801299716e0f36a91#npm:2.1.1"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["@types/react-dom", "npm:18.0.11"],\ ["debounce", "npm:1.2.1"],\ ["react", "npm:18.2.0"],\ @@ -16887,20 +16902,20 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["resolve", [\ - ["patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=c3c19d", {\ - "packageLocation": "./.yarn/cache/resolve-patch-0c52e0e4f7-5656f4d0be.zip/node_modules/resolve/",\ + ["patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b", {\ + "packageLocation": "./.yarn/cache/resolve-patch-46f9469d0d-5656f4d0be.zip/node_modules/resolve/",\ "packageDependencies": [\ - ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=c3c19d"],\ + ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b"],\ ["is-core-module", "npm:2.11.0"],\ ["path-parse", "npm:1.0.7"],\ ["supports-preserve-symlinks-flag", "npm:1.0.0"]\ ],\ "linkType": "HARD"\ }],\ - ["patch:resolve@npm%3A2.0.0-next.4#~builtin::version=2.0.0-next.4&hash=c3c19d", {\ - "packageLocation": "./.yarn/cache/resolve-patch-34cda421ec-4bf9f4f8a4.zip/node_modules/resolve/",\ + ["patch:resolve@npm%3A2.0.0-next.4#~builtin::version=2.0.0-next.4&hash=07638b", {\ + "packageLocation": "./.yarn/cache/resolve-patch-bdbf6a2444-4bf9f4f8a4.zip/node_modules/resolve/",\ "packageDependencies": [\ - ["resolve", "patch:resolve@npm%3A2.0.0-next.4#~builtin::version=2.0.0-next.4&hash=c3c19d"],\ + ["resolve", "patch:resolve@npm%3A2.0.0-next.4#~builtin::version=2.0.0-next.4&hash=07638b"],\ ["is-core-module", "npm:2.11.0"],\ ["path-parse", "npm:1.0.7"],\ ["supports-preserve-symlinks-flag", "npm:1.0.0"]\ @@ -17014,7 +17029,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/cache/rollup-npm-2.79.1-94e707a9a3-6a2bf167b3.zip/node_modules/rollup/",\ "packageDependencies": [\ ["rollup", "npm:2.79.1"],\ - ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1"]\ + ["fsevents", "patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=18f3a7"]\ ],\ "linkType": "HARD"\ }]\ @@ -17917,7 +17932,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@emotion/is-prop-valid", "npm:1.2.0"],\ ["@emotion/stylis", "npm:0.8.5"],\ ["@emotion/unitless", "npm:0.7.5"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["@types/react-dom", "npm:18.0.11"],\ ["@types/react-is", null],\ ["babel-plugin-styled-components", "virtual:78dabf8a6eb6b1eed615d82aee38544c1fc8ca333ebb891bbaac3654e66b1bff94f9b19012a509b69a53e5306c4de4a2776ca92384b80d2ccc1c6ec41ed54d57#npm:2.0.7"],\ @@ -18044,7 +18059,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/suspend-react-virtual-310cf27b52/0/cache/suspend-react-npm-0.0.8-1962c8b944-173a56c8df.zip/node_modules/suspend-react/",\ "packageDependencies": [\ ["suspend-react", "virtual:29c3c4240323f5bf8136b0c1a1012bc3e3d9588d3498f13510f3afbd0efe5063183229512909a2c0e61a30445f0fb0073f778c20e19439a9a9c3fb42e065e599#npm:0.0.8"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["react", "npm:18.2.0"]\ ],\ "packagePeers": [\ @@ -18143,7 +18158,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["postcss-selector-parser", "npm:6.0.11"],\ ["postcss-value-parser", "npm:4.2.0"],\ ["quick-lru", "npm:5.1.1"],\ - ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=c3c19d"]\ + ["resolve", "patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b"]\ ],\ "packagePeers": [\ "@types/postcss",\ @@ -18616,7 +18631,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["tsutils", "virtual:9698d22773cab376c7f8ae25f4e88560fd2f806c59021b1894ba59e3165fb61902e4429f862b965d57c4d54ffb7b8c48510de79474c51edb6ba70c6b41633d9b#npm:3.21.0"],\ ["@types/typescript", null],\ ["tslib", "npm:1.14.1"],\ - ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76"]\ + ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=a1c5e5"]\ ],\ "packagePeers": [\ "@types/typescript",\ @@ -18723,10 +18738,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["typescript", [\ - ["patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76", {\ - "packageLocation": "./.yarn/cache/typescript-patch-72dc6f164f-ab417a2f39.zip/node_modules/typescript/",\ + ["patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=a1c5e5", {\ + "packageLocation": "./.yarn/cache/typescript-patch-b5c51365ca-2eee5c37ca.zip/node_modules/typescript/",\ "packageDependencies": [\ - ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76"]\ + ["typescript", "patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=a1c5e5"]\ ],\ "linkType": "HARD"\ }]\ @@ -19898,7 +19913,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/zustand-virtual-e70fca6ab2/0/cache/zustand-npm-3.7.2-4cb33a3ae6-18f025b1b6.zip/node_modules/zustand/",\ "packageDependencies": [\ ["zustand", "virtual:29c3c4240323f5bf8136b0c1a1012bc3e3d9588d3498f13510f3afbd0efe5063183229512909a2c0e61a30445f0fb0073f778c20e19439a9a9c3fb42e065e599#npm:3.7.2"],\ - ["@types/react", "npm:18.0.28"],\ + ["@types/react", "npm:18.0.31"],\ ["react", "npm:18.2.0"]\ ],\ "packagePeers": [\ @@ -19919,8 +19934,6 @@ const StringDecoder = require('string_decoder'); const url = require('url'); const os = require('os'); const nodeUtils = require('util'); -const readline = require('readline'); -const assert = require('assert'); const stream = require('stream'); const zlib = require('zlib'); const events = require('events'); @@ -19950,7 +19963,6 @@ const path__default = /*#__PURE__*/_interopDefaultLegacy(path); const require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0); const StringDecoder__default = /*#__PURE__*/_interopDefaultLegacy(StringDecoder); const nodeUtils__namespace = /*#__PURE__*/_interopNamespace(nodeUtils); -const assert__default = /*#__PURE__*/_interopDefaultLegacy(assert); const zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib); const S_IFMT = 61440; @@ -20142,10 +20154,15 @@ function areStatsEqual(a, b) { return true; } +var PathType; +(function(PathType2) { + PathType2[PathType2["File"] = 0] = "File"; + PathType2[PathType2["Portable"] = 1] = "Portable"; + PathType2[PathType2["Native"] = 2] = "Native"; +})(PathType || (PathType = {})); const PortablePath = { root: `/`, - dot: `.`, - parent: `..` + dot: `.` }; const Filename = { nodeModules: `node_modules`, @@ -20215,16 +20232,40 @@ function convertPath(targetPathUtils, sourcePath) { return targetPathUtils === npath ? fromPortablePath(sourcePath) : toPortablePath(sourcePath); } +var __defProp$5 = Object.defineProperty; +var __defProps$3 = Object.defineProperties; +var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols; +var __hasOwnProp$6 = Object.prototype.hasOwnProperty; +var __propIsEnum$6 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value; +var __spreadValues$5 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$6.call(b, prop)) + __defNormalProp$5(a, prop, b[prop]); + if (__getOwnPropSymbols$6) + for (var prop of __getOwnPropSymbols$6(b)) { + if (__propIsEnum$6.call(b, prop)) + __defNormalProp$5(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b)); const defaultTime = new Date(SAFE_TIME * 1e3); +var LinkStrategy; +(function(LinkStrategy2) { + LinkStrategy2["Allow"] = `allow`; + LinkStrategy2["ReadOnly"] = `readOnly`; +})(LinkStrategy || (LinkStrategy = {})); async function copyPromise(destinationFs, destination, sourceFs, source, opts) { const normalizedDestination = destinationFs.pathUtils.normalize(destination); const normalizedSource = sourceFs.pathUtils.normalize(source); const prelayout = []; const postlayout = []; - const { atime, mtime } = opts.stableTime ? { atime: defaultTime, mtime: defaultTime } : await sourceFs.lstatPromise(normalizedSource); - await destinationFs.mkdirpPromise(destinationFs.pathUtils.dirname(destination), { utimes: [atime, mtime] }); + const {atime, mtime} = opts.stableTime ? {atime: defaultTime, mtime: defaultTime} : await sourceFs.lstatPromise(normalizedSource); + await destinationFs.mkdirpPromise(destinationFs.pathUtils.dirname(destination), {utimes: [atime, mtime]}); const updateTime = typeof destinationFs.lutimesPromise === `function` ? destinationFs.lutimesPromise.bind(destinationFs) : destinationFs.utimesPromise.bind(destinationFs); - await copyImpl(prelayout, postlayout, updateTime, destinationFs, normalizedDestination, sourceFs, normalizedSource, { ...opts, didParentExist: true }); + await copyImpl(prelayout, postlayout, updateTime, destinationFs, normalizedDestination, sourceFs, normalizedSource, __spreadProps$3(__spreadValues$5({}, opts), {didParentExist: true})); for (const operation of prelayout) await operation(); await Promise.all(postlayout.map((operation) => { @@ -20235,7 +20276,7 @@ async function copyImpl(prelayout, postlayout, updateTime, destinationFs, destin var _a, _b; const destinationStat = opts.didParentExist ? await maybeLStat(destinationFs, destination) : null; const sourceStat = await sourceFs.lstatPromise(source); - const { atime, mtime } = opts.stableTime ? { atime: defaultTime, mtime: defaultTime } : sourceStat; + const {atime, mtime} = opts.stableTime ? {atime: defaultTime, mtime: defaultTime} : sourceStat; let updated; switch (true) { case sourceStat.isDirectory(): @@ -20288,7 +20329,7 @@ async function copyFolder(prelayout, postlayout, updateTime, destinationFs, dest if (destinationStat === null) { prelayout.push(async () => { try { - await destinationFs.mkdirPromise(destination, { mode: sourceStat.mode }); + await destinationFs.mkdirPromise(destination, {mode: sourceStat.mode}); } catch (err) { if (err.code !== `EEXIST`) { throw err; @@ -20298,7 +20339,7 @@ async function copyFolder(prelayout, postlayout, updateTime, destinationFs, dest updated = true; } const entries = await sourceFs.readdirPromise(source); - const nextOpts = opts.didParentExist && !destinationStat ? { ...opts, didParentExist: false } : opts; + const nextOpts = opts.didParentExist && !destinationStat ? __spreadProps$3(__spreadValues$5({}, opts), {didParentExist: false}) : opts; if (opts.stableSort) { for (const entry of entries.sort()) { if (await copyImpl(prelayout, postlayout, updateTime, destinationFs, destinationFs.pathUtils.join(destination, entry), sourceFs, sourceFs.pathUtils.join(source, entry), nextOpts)) { @@ -20315,11 +20356,11 @@ async function copyFolder(prelayout, postlayout, updateTime, destinationFs, dest } return updated; } -const isCloneSupportedCache = /* @__PURE__ */ new WeakMap(); +const isCloneSupportedCache = new WeakMap(); function makeLinkOperation(opFs, destination, source, sourceStat, linkStrategy) { return async () => { await opFs.linkPromise(source, destination); - if (linkStrategy === "readOnly" /* ReadOnly */) { + if (linkStrategy === LinkStrategy.ReadOnly) { sourceStat.mode &= ~146; await opFs.chmodPromise(destination, sourceStat.mode); } @@ -20380,7 +20421,7 @@ async function copySymlink(prelayout, postlayout, updateTime, destinationFs, des } function makeError$1(code, message) { - return Object.assign(new Error(`${code}: ${message}`), { code }); + return Object.assign(new Error(`${code}: ${message}`), {code}); } function EBUSY(message) { return makeError$1(`EBUSY`, message); @@ -20487,7 +20528,7 @@ class FakeFS { constructor(pathUtils) { this.pathUtils = pathUtils; } - async *genTraversePromise(init, { stableSort = false } = {}) { + async *genTraversePromise(init, {stableSort = false} = {}) { const stack = [init]; while (stack.length > 0) { const p = stack.shift(); @@ -20506,7 +20547,7 @@ class FakeFS { } } } - async removePromise(p, { recursive = true, maxRetries = 5 } = {}) { + async removePromise(p, {recursive = true, maxRetries = 5} = {}) { let stat; try { stat = await this.lstatPromise(p); @@ -20540,7 +20581,7 @@ class FakeFS { await this.unlinkPromise(p); } } - removeSync(p, { recursive = true } = {}) { + removeSync(p, {recursive = true} = {}) { let stat; try { stat = this.lstatSync(p); @@ -20560,7 +20601,7 @@ class FakeFS { this.unlinkSync(p); } } - async mkdirpPromise(p, { chmod, utimes } = {}) { + async mkdirpPromise(p, {chmod, utimes} = {}) { p = this.resolve(p); if (p === this.pathUtils.dirname(p)) return void 0; @@ -20591,7 +20632,7 @@ class FakeFS { } return createdDirectory; } - mkdirpSync(p, { chmod, utimes } = {}) { + mkdirpSync(p, {chmod, utimes} = {}) { p = this.resolve(p); if (p === this.pathUtils.dirname(p)) return void 0; @@ -20622,17 +20663,17 @@ class FakeFS { } return createdDirectory; } - async copyPromise(destination, source, { baseFs = this, overwrite = true, stableSort = false, stableTime = false, linkStrategy = null } = {}) { - return await copyPromise(this, destination, baseFs, source, { overwrite, stableSort, stableTime, linkStrategy }); + async copyPromise(destination, source, {baseFs = this, overwrite = true, stableSort = false, stableTime = false, linkStrategy = null} = {}) { + return await copyPromise(this, destination, baseFs, source, {overwrite, stableSort, stableTime, linkStrategy}); } - copySync(destination, source, { baseFs = this, overwrite = true } = {}) { + copySync(destination, source, {baseFs = this, overwrite = true} = {}) { const stat = baseFs.lstatSync(source); const exists = this.existsSync(destination); if (stat.isDirectory()) { this.mkdirpSync(destination); const directoryListing = baseFs.readdirSync(source); for (const entry of directoryListing) { - this.copySync(this.pathUtils.join(destination, entry), baseFs.pathUtils.join(source, entry), { baseFs, overwrite }); + this.copySync(this.pathUtils.join(destination, entry), baseFs.pathUtils.join(source, entry), {baseFs, overwrite}); } } else if (stat.isFile()) { if (!exists || overwrite) { @@ -20661,7 +20702,7 @@ class FakeFS { return this.changeFileTextPromise(p, content, opts); } } - async changeFileBufferPromise(p, content, { mode } = {}) { + async changeFileBufferPromise(p, content, {mode} = {}) { let current = Buffer.alloc(0); try { current = await this.readFilePromise(p); @@ -20669,9 +20710,9 @@ class FakeFS { } if (Buffer.compare(current, content) === 0) return; - await this.writeFilePromise(p, content, { mode }); + await this.writeFilePromise(p, content, {mode}); } - async changeFileTextPromise(p, content, { automaticNewlines, mode } = {}) { + async changeFileTextPromise(p, content, {automaticNewlines, mode} = {}) { let current = ``; try { current = await this.readFilePromise(p, `utf8`); @@ -20680,7 +20721,7 @@ class FakeFS { const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; if (current === normalizedContent) return; - await this.writeFilePromise(p, normalizedContent, { mode }); + await this.writeFilePromise(p, normalizedContent, {mode}); } changeFileSync(p, content, opts = {}) { if (Buffer.isBuffer(content)) { @@ -20689,7 +20730,7 @@ class FakeFS { return this.changeFileTextSync(p, content, opts); } } - changeFileBufferSync(p, content, { mode } = {}) { + changeFileBufferSync(p, content, {mode} = {}) { let current = Buffer.alloc(0); try { current = this.readFileSync(p); @@ -20697,9 +20738,9 @@ class FakeFS { } if (Buffer.compare(current, content) === 0) return; - this.writeFileSync(p, content, { mode }); + this.writeFileSync(p, content, {mode}); } - changeFileTextSync(p, content, { automaticNewlines = false, mode } = {}) { + changeFileTextSync(p, content, {automaticNewlines = false, mode} = {}) { let current = ``; try { current = this.readFileSync(p, `utf8`); @@ -20708,7 +20749,7 @@ class FakeFS { const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; if (current === normalizedContent) return; - this.writeFileSync(p, normalizedContent, { mode }); + this.writeFileSync(p, normalizedContent, {mode}); } async movePromise(fromP, toP) { try { @@ -20889,12 +20930,12 @@ class NodeFS extends BasePortableFakeFS { this.realFs.opendir(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); } }).then((dir) => { - return Object.defineProperty(dir, `path`, { value: p, configurable: true, writable: true }); + return Object.defineProperty(dir, `path`, {value: p, configurable: true, writable: true}); }); } opendirSync(p, opts) { const dir = typeof opts !== `undefined` ? this.realFs.opendirSync(npath.fromPortablePath(p), opts) : this.realFs.opendirSync(npath.fromPortablePath(p)); - return Object.defineProperty(dir, `path`, { value: p, configurable: true, writable: true }); + return Object.defineProperty(dir, `path`, {value: p, configurable: true, writable: true}); } async readPromise(fd, buffer, offset = 0, length = 0, position = -1) { return await new Promise((resolve, reject) => { @@ -21032,14 +21073,6 @@ class NodeFS extends BasePortableFakeFS { chmodSync(p, mask) { return this.realFs.chmodSync(npath.fromPortablePath(p), mask); } - async fchownPromise(fd, uid, gid) { - return await new Promise((resolve, reject) => { - this.realFs.fchown(fd, uid, gid, this.makeCallback(resolve, reject)); - }); - } - fchownSync(fd, uid, gid) { - return this.realFs.fchownSync(fd, uid, gid); - } async chownPromise(p, uid, gid) { return await new Promise((resolve, reject) => { this.realFs.chown(npath.fromPortablePath(p), uid, gid, this.makeCallback(resolve, reject)); @@ -21179,7 +21212,7 @@ class NodeFS extends BasePortableFakeFS { async readdirPromise(p, opts) { return await new Promise((resolve, reject) => { if (opts == null ? void 0 : opts.withFileTypes) { - this.realFs.readdir(npath.fromPortablePath(p), { withFileTypes: true }, this.makeCallback(resolve, reject)); + this.realFs.readdir(npath.fromPortablePath(p), {withFileTypes: true}, this.makeCallback(resolve, reject)); } else { this.realFs.readdir(npath.fromPortablePath(p), this.makeCallback((value) => resolve(value), reject)); } @@ -21187,7 +21220,7 @@ class NodeFS extends BasePortableFakeFS { } readdirSync(p, opts) { if (opts == null ? void 0 : opts.withFileTypes) { - return this.realFs.readdirSync(npath.fromPortablePath(p), { withFileTypes: true }); + return this.realFs.readdirSync(npath.fromPortablePath(p), {withFileTypes: true}); } else { return this.realFs.readdirSync(npath.fromPortablePath(p)); } @@ -21219,18 +21252,10 @@ class NodeFS extends BasePortableFakeFS { return this.realFs.ftruncateSync(fd, len); } watch(p, a, b) { - return this.realFs.watch( - npath.fromPortablePath(p), - a, - b - ); + return this.realFs.watch(npath.fromPortablePath(p), a, b); } watchFile(p, a, b) { - return this.realFs.watchFile( - npath.fromPortablePath(p), - a, - b - ); + return this.realFs.watchFile(npath.fromPortablePath(p), a, b); } unwatchFile(p, cb) { return this.realFs.unwatchFile(npath.fromPortablePath(p), cb); @@ -21246,16 +21271,27 @@ class NodeFS extends BasePortableFakeFS { } } +var Event; +(function(Event2) { + Event2["Change"] = `change`; + Event2["Stop"] = `stop`; +})(Event || (Event = {})); +var Status; +(function(Status2) { + Status2["Ready"] = `ready`; + Status2["Running"] = `running`; + Status2["Stopped"] = `stopped`; +})(Status || (Status = {})); function assertStatus(current, expected) { if (current !== expected) { throw new Error(`Invalid StatWatcher status: expected '${expected}', got '${current}'`); } } class CustomStatWatcher extends events.EventEmitter { - constructor(fakeFs, path, { bigint = false } = {}) { + constructor(fakeFs, path, {bigint = false} = {}) { super(); - this.status = "ready" /* Ready */; - this.changeListeners = /* @__PURE__ */ new Map(); + this.status = Status.Ready; + this.changeListeners = new Map(); this.startTimeout = null; this.fakeFs = fakeFs; this.path = path; @@ -21268,27 +21304,27 @@ class CustomStatWatcher extends events.EventEmitter { return statWatcher; } start() { - assertStatus(this.status, "ready" /* Ready */); - this.status = "running" /* Running */; + assertStatus(this.status, Status.Ready); + this.status = Status.Running; this.startTimeout = setTimeout(() => { this.startTimeout = null; if (!this.fakeFs.existsSync(this.path)) { - this.emit("change" /* Change */, this.lastStats, this.lastStats); + this.emit(Event.Change, this.lastStats, this.lastStats); } }, 3); } stop() { - assertStatus(this.status, "running" /* Running */); - this.status = "stopped" /* Stopped */; + assertStatus(this.status, Status.Running); + this.status = Status.Stopped; if (this.startTimeout !== null) { clearTimeout(this.startTimeout); this.startTimeout = null; } - this.emit("stop" /* Stop */); + this.emit(Event.Stop); } stat() { try { - return this.fakeFs.statSync(this.path, { bigint: this.bigint }); + return this.fakeFs.statSync(this.path, {bigint: this.bigint}); } catch (error) { const statInstance = this.bigint ? new BigIntStatsEntry() : new StatEntry(); return clearStats(statInstance); @@ -21301,16 +21337,16 @@ class CustomStatWatcher extends events.EventEmitter { if (areStatsEqual(currentStats, previousStats)) return; this.lastStats = currentStats; - this.emit("change" /* Change */, currentStats, previousStats); + this.emit(Event.Change, currentStats, previousStats); }, opts.interval); return opts.persistent ? interval : interval.unref(); } registerChangeListener(listener, opts) { - this.addListener("change" /* Change */, listener); + this.addListener(Event.Change, listener); this.changeListeners.set(listener, this.makeInterval(opts)); } unregisterChangeListener(listener) { - this.removeListener("change" /* Change */, listener); + this.removeListener(Event.Change, listener); const interval = this.changeListeners.get(listener); if (typeof interval !== `undefined`) clearInterval(interval); @@ -21336,7 +21372,7 @@ class CustomStatWatcher extends events.EventEmitter { } } -const statWatchersByFakeFS = /* @__PURE__ */ new WeakMap(); +const statWatchersByFakeFS = new WeakMap(); function watchFile(fakeFs, path, a, b) { let bigint; let persistent; @@ -21364,13 +21400,13 @@ function watchFile(fakeFs, path, a, b) { } let statWatchers = statWatchersByFakeFS.get(fakeFs); if (typeof statWatchers === `undefined`) - statWatchersByFakeFS.set(fakeFs, statWatchers = /* @__PURE__ */ new Map()); + statWatchersByFakeFS.set(fakeFs, statWatchers = new Map()); let statWatcher = statWatchers.get(path); if (typeof statWatcher === `undefined`) { - statWatcher = CustomStatWatcher.create(fakeFs, path, { bigint }); + statWatcher = CustomStatWatcher.create(fakeFs, path, {bigint}); statWatchers.set(path, statWatcher); } - statWatcher.registerChangeListener(listener, { persistent, interval }); + statWatcher.registerChangeListener(listener, {persistent, interval}); return statWatcher; } function unwatchFile(fakeFs, path, cb) { @@ -21398,6 +21434,22 @@ function unwatchAllFiles(fakeFs) { } } +var __defProp$4 = Object.defineProperty; +var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols; +var __hasOwnProp$5 = Object.prototype.hasOwnProperty; +var __propIsEnum$5 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value; +var __spreadValues$4 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$5.call(b, prop)) + __defNormalProp$4(a, prop, b[prop]); + if (__getOwnPropSymbols$5) + for (var prop of __getOwnPropSymbols$5(b)) { + if (__propIsEnum$5.call(b, prop)) + __defNormalProp$4(a, prop, b[prop]); + } + return a; +}; const DEFAULT_COMPRESSION_LEVEL = `mixed`; function toUnixTimestamp(time) { if (typeof time === `string` && String(+time) === time) @@ -21443,10 +21495,10 @@ class ZipFS extends BasePortableFakeFS { constructor(source, opts) { super(); this.lzSource = null; - this.listings = /* @__PURE__ */ new Map(); - this.entries = /* @__PURE__ */ new Map(); - this.fileSources = /* @__PURE__ */ new Map(); - this.fds = /* @__PURE__ */ new Map(); + this.listings = new Map(); + this.entries = new Map(); + this.fileSources = new Map(); + this.fds = new Map(); this.nextFd = 0; this.ready = false; this.readOnly = false; @@ -21455,7 +21507,7 @@ class ZipFS extends BasePortableFakeFS { this.level = typeof pathOptions.level !== `undefined` ? pathOptions.level : DEFAULT_COMPRESSION_LEVEL; source != null ? source : source = makeEmptyArchive(); if (typeof source === `string`) { - const { baseFs = new NodeFS() } = pathOptions; + const {baseFs = new NodeFS()} = pathOptions; this.baseFs = baseFs; this.path = source; } else { @@ -21508,7 +21560,7 @@ class ZipFS extends BasePortableFakeFS { } finally { this.libzip.free(errPtr); } - this.listings.set(PortablePath.root, /* @__PURE__ */ new Set()); + this.listings.set(PortablePath.root, new Set()); const entryCount = this.libzip.getNumEntries(this.zip, 0); for (let t = 0; t < entryCount; ++t) { const raw = this.libzip.getName(this.zip, t, 0); @@ -21554,10 +21606,6 @@ class ZipFS extends BasePortableFakeFS { this.prepareClose(); if (!this.lzSource) throw new Error(`ZipFS was not created from a Buffer`); - if (this.entries.size === 0) { - this.discardAndClose(); - return makeEmptyArchive(); - } try { this.libzip.source.keep(this.lzSource); if (this.libzip.close(this.zip) === -1) @@ -21609,7 +21657,7 @@ class ZipFS extends BasePortableFakeFS { const newMode = this.baseFs.existsSync(this.path) || this.stats.mode === DEFAULT_MODE ? void 0 : this.stats.mode; if (this.entries.size === 0) { this.discardAndClose(); - this.baseFs.writeFileSync(this.path, makeEmptyArchive(), { mode: newMode }); + this.baseFs.writeFileSync(this.path, makeEmptyArchive(), {mode: newMode}); } else { const rc = this.libzip.close(this.zip); if (rc === -1) @@ -21633,7 +21681,7 @@ class ZipFS extends BasePortableFakeFS { } openSync(p, flags, mode) { const fd = this.nextFd++; - this.fds.set(fd, { cursor: 0, p }); + this.fds.set(fd, {cursor: 0, p}); return fd; } hasOpenFileHandles() { @@ -21654,7 +21702,7 @@ class ZipFS extends BasePortableFakeFS { const onClose = () => { this.closeSync(fd); }; - return opendir(this, resolvedP, entries, { onClose }); + return opendir(this, resolvedP, entries, {onClose}); } async readPromise(fd, buffer, offset, length, position) { return this.readSync(fd, buffer, offset, length, position); @@ -21693,28 +21741,25 @@ class ZipFS extends BasePortableFakeFS { throw EBADF(`read`); this.fds.delete(fd); } - createReadStream(p, { encoding } = {}) { + createReadStream(p, {encoding} = {}) { if (p === null) throw new Error(`Unimplemented`); const fd = this.openSync(p, `r`); - const stream$1 = Object.assign( - new stream.PassThrough({ - emitClose: true, - autoDestroy: true, - destroy: (error, callback) => { - clearImmediate(immediate); - this.closeSync(fd); - callback(error); - } - }), - { - close() { - stream$1.destroy(); - }, - bytesRead: 0, - path: p + const stream$1 = Object.assign(new stream.PassThrough({ + emitClose: true, + autoDestroy: true, + destroy: (error, callback) => { + clearImmediate(immediate); + this.closeSync(fd); + callback(error); } - ); + }), { + close() { + stream$1.destroy(); + }, + bytesRead: 0, + path: p + }); const immediate = setImmediate(async () => { try { const data = await this.readFilePromise(p, encoding); @@ -21726,40 +21771,37 @@ class ZipFS extends BasePortableFakeFS { }); return stream$1; } - createWriteStream(p, { encoding } = {}) { + createWriteStream(p, {encoding} = {}) { if (this.readOnly) throw EROFS(`open '${p}'`); if (p === null) throw new Error(`Unimplemented`); const chunks = []; const fd = this.openSync(p, `w`); - const stream$1 = Object.assign( - new stream.PassThrough({ - autoDestroy: true, - emitClose: true, - destroy: (error, callback) => { - try { - if (error) { - callback(error); - } else { - this.writeFileSync(p, Buffer.concat(chunks), encoding); - callback(null); - } - } catch (err) { - callback(err); - } finally { - this.closeSync(fd); + const stream$1 = Object.assign(new stream.PassThrough({ + autoDestroy: true, + emitClose: true, + destroy: (error, callback) => { + try { + if (error) { + callback(error); + } else { + this.writeFileSync(p, Buffer.concat(chunks), encoding); + callback(null); } - } - }), - { - bytesWritten: 0, - path: p, - close() { - stream$1.destroy(); + } catch (err) { + callback(err); + } finally { + this.closeSync(fd); } } - ); + }), { + bytesWritten: 0, + path: p, + close() { + stream$1.destroy(); + } + }); stream$1.on(`data`, (chunk) => { const chunkBuffer = Buffer.from(chunk); stream$1.bytesWritten += chunkBuffer.length; @@ -21807,12 +21849,12 @@ class ZipFS extends BasePortableFakeFS { throw EROFS(`access '${p}'`); } } - async statPromise(p, opts = { bigint: false }) { + async statPromise(p, opts = {bigint: false}) { if (opts.bigint) - return this.statSync(p, { bigint: true }); + return this.statSync(p, {bigint: true}); return this.statSync(p); } - statSync(p, opts = { bigint: false, throwIfNoEntry: true }) { + statSync(p, opts = {bigint: false, throwIfNoEntry: true}) { const resolvedP = this.resolveFilename(`stat '${p}'`, p, void 0, opts.throwIfNoEntry); if (resolvedP === void 0) return void 0; @@ -21832,7 +21874,7 @@ class ZipFS extends BasePortableFakeFS { const entry = this.fds.get(fd); if (typeof entry === `undefined`) throw EBADF(`fstatSync`); - const { p } = entry; + const {p} = entry; const resolvedP = this.resolveFilename(`stat '${p}'`, p); if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) throw ENOENT(`stat '${p}'`); @@ -21840,12 +21882,12 @@ class ZipFS extends BasePortableFakeFS { throw ENOTDIR(`stat '${p}'`); return this.statImpl(`fstat '${p}'`, resolvedP, opts); } - async lstatPromise(p, opts = { bigint: false }) { + async lstatPromise(p, opts = {bigint: false}) { if (opts.bigint) - return this.lstatSync(p, { bigint: true }); + return this.lstatSync(p, {bigint: true}); return this.lstatSync(p); } - lstatSync(p, opts = { bigint: false, throwIfNoEntry: true }) { + lstatSync(p, opts = {bigint: false, throwIfNoEntry: true}) { const resolvedP = this.resolveFilename(`lstat '${p}'`, p, false, opts.throwIfNoEntry); if (resolvedP === void 0) return void 0; @@ -21882,7 +21924,7 @@ class ZipFS extends BasePortableFakeFS { const defaultMode = type === S_IFDIR ? 493 : 420; const mode = type | this.getUnixMode(entry, defaultMode) & 511; const crc = this.libzip.struct.statCrc(stat); - const statInstance = Object.assign(new StatEntry(), { uid, gid, size, blksize, blocks, atime, birthtime, ctime, mtime, atimeMs, birthtimeMs, ctimeMs, mtimeMs, mode, crc }); + const statInstance = Object.assign(new StatEntry(), {uid, gid, size, blksize, blocks, atime, birthtime, ctime, mtime, atimeMs, birthtimeMs, ctimeMs, mtimeMs, mode, crc}); return opts.bigint === true ? convertToBigIntStats(statInstance) : statInstance; } if (this.listings.has(p)) { @@ -21901,7 +21943,7 @@ class ZipFS extends BasePortableFakeFS { const mtime = new Date(mtimeMs); const mode = S_IFDIR | 493; const crc = 0; - const statInstance = Object.assign(new StatEntry(), { uid, gid, size, blksize, blocks, atime, birthtime, ctime, mtime, atimeMs, birthtimeMs, ctimeMs, mtimeMs, mode, crc }); + const statInstance = Object.assign(new StatEntry(), {uid, gid, size, blksize, blocks, atime, birthtime, ctime, mtime, atimeMs, birthtimeMs, ctimeMs, mtimeMs, mode, crc}); return opts.bigint === true ? convertToBigIntStats(statInstance) : statInstance; } throw new Error(`Unreachable`); @@ -21921,7 +21963,7 @@ class ZipFS extends BasePortableFakeFS { return existingListing; const parentListing = this.registerListing(ppath.dirname(p)); parentListing.add(ppath.basename(p)); - const newListing = /* @__PURE__ */ new Set(); + const newListing = new Set(); this.listings.set(p, newListing); return newListing; } @@ -22004,11 +22046,11 @@ class ZipFS extends BasePortableFakeFS { throw new Error(`Couldn't allocate enough memory`); const heap = new Uint8Array(this.libzip.HEAPU8.buffer, buffer, content.byteLength); heap.set(content); - return { buffer, byteLength: content.byteLength }; + return {buffer, byteLength: content.byteLength}; } allocateUnattachedSource(content) { const error = this.libzip.struct.errorS(); - const { buffer, byteLength } = this.allocateBuffer(content); + const {buffer, byteLength} = this.allocateBuffer(content); const source = this.libzip.source.fromUnattachedBuffer(buffer, byteLength, 0, true, error); if (source === 0) { this.libzip.free(error); @@ -22017,7 +22059,7 @@ class ZipFS extends BasePortableFakeFS { return source; } allocateSource(content) { - const { buffer, byteLength } = this.allocateBuffer(content); + const {buffer, byteLength} = this.allocateBuffer(content); const source = this.libzip.source.fromBuffer(this.zip, buffer, byteLength, 0, true); if (source === 0) { this.libzip.free(buffer); @@ -22059,7 +22101,7 @@ class ZipFS extends BasePortableFakeFS { const attributes = this.libzip.getValue(this.libzip.uint32S, `i32`) >>> 16; return (attributes & S_IFMT) === S_IFLNK; } - getFileSource(index, opts = { asyncDecompress: false }) { + getFileSource(index, opts = {asyncDecompress: false}) { const cachedFileSource = this.fileSources.get(index); if (typeof cachedFileSource !== `undefined`) return cachedFileSource; @@ -22134,12 +22176,6 @@ class ZipFS extends BasePortableFakeFS { throw this.makeLibzipError(this.libzip.getError(this.zip)); } } - async fchownPromise(fd, uid, gid) { - return this.chownPromise(this.fdToPath(fd, `fchown`), uid, gid); - } - fchownSync(fd, uid, gid) { - return this.chownSync(this.fdToPath(fd, `fchownSync`), uid, gid); - } async chownPromise(p, uid, gid) { return this.chownSync(p, uid, gid); } @@ -22153,15 +22189,15 @@ class ZipFS extends BasePortableFakeFS { throw new Error(`Unimplemented`); } async copyFilePromise(sourceP, destP, flags) { - const { indexSource, indexDest, resolvedDestP } = this.prepareCopyFile(sourceP, destP, flags); - const source = await this.getFileSource(indexSource, { asyncDecompress: true }); + const {indexSource, indexDest, resolvedDestP} = this.prepareCopyFile(sourceP, destP, flags); + const source = await this.getFileSource(indexSource, {asyncDecompress: true}); const newIndex = this.setFileSource(resolvedDestP, source); if (newIndex !== indexDest) { this.registerEntry(resolvedDestP, newIndex); } } copyFileSync(sourceP, destP, flags = 0) { - const { indexSource, indexDest, resolvedDestP } = this.prepareCopyFile(sourceP, destP, flags); + const {indexSource, indexDest, resolvedDestP} = this.prepareCopyFile(sourceP, destP, flags); const source = this.getFileSource(indexSource); const newIndex = this.setFileSource(resolvedDestP, source); if (newIndex !== indexDest) { @@ -22191,22 +22227,22 @@ class ZipFS extends BasePortableFakeFS { if (this.readOnly) throw EROFS(`open '${p}'`); if (typeof opts === `undefined`) - opts = { flag: `a` }; + opts = {flag: `a`}; else if (typeof opts === `string`) - opts = { flag: `a`, encoding: opts }; + opts = {flag: `a`, encoding: opts}; else if (typeof opts.flag === `undefined`) - opts = { flag: `a`, ...opts }; + opts = __spreadValues$4({flag: `a`}, opts); return this.writeFilePromise(p, content, opts); } appendFileSync(p, content, opts = {}) { if (this.readOnly) throw EROFS(`open '${p}'`); if (typeof opts === `undefined`) - opts = { flag: `a` }; + opts = {flag: `a`}; else if (typeof opts === `string`) - opts = { flag: `a`, encoding: opts }; + opts = {flag: `a`, encoding: opts}; else if (typeof opts.flag === `undefined`) - opts = { flag: `a`, ...opts }; + opts = __spreadValues$4({flag: `a`}, opts); return this.writeFileSync(p, content, opts); } fdToPath(fd, reason) { @@ -22217,9 +22253,9 @@ class ZipFS extends BasePortableFakeFS { return path; } async writeFilePromise(p, content, opts) { - const { encoding, mode, index, resolvedP } = this.prepareWriteFile(p, opts); + const {encoding, mode, index, resolvedP} = this.prepareWriteFile(p, opts); if (index !== void 0 && typeof opts === `object` && opts.flag && opts.flag.includes(`a`)) - content = Buffer.concat([await this.getFileSource(index, { asyncDecompress: true }), Buffer.from(content)]); + content = Buffer.concat([await this.getFileSource(index, {asyncDecompress: true}), Buffer.from(content)]); if (encoding !== null) content = content.toString(encoding); const newIndex = this.setFileSource(resolvedP, content); @@ -22230,7 +22266,7 @@ class ZipFS extends BasePortableFakeFS { } } writeFileSync(p, content, opts) { - const { encoding, mode, index, resolvedP } = this.prepareWriteFile(p, opts); + const {encoding, mode, index, resolvedP} = this.prepareWriteFile(p, opts); if (index !== void 0 && typeof opts === `object` && opts.flag && opts.flag.includes(`a`)) content = Buffer.concat([this.getFileSource(index), Buffer.from(content)]); if (encoding !== null) @@ -22315,9 +22351,9 @@ class ZipFS extends BasePortableFakeFS { async mkdirPromise(p, opts) { return this.mkdirSync(p, opts); } - mkdirSync(p, { mode = 493, recursive = false } = {}) { + mkdirSync(p, {mode = 493, recursive = false} = {}) { if (recursive) - return this.mkdirpSync(p, { chmod: mode }); + return this.mkdirpSync(p, {chmod: mode}); if (this.readOnly) throw EROFS(`mkdir '${p}'`); const resolvedP = this.resolveFilename(`mkdir '${p}'`, p); @@ -22330,7 +22366,7 @@ class ZipFS extends BasePortableFakeFS { async rmdirPromise(p, opts) { return this.rmdirSync(p, opts); } - rmdirSync(p, { recursive = false } = {}) { + rmdirSync(p, {recursive = false} = {}) { if (this.readOnly) throw EROFS(`rmdir '${p}'`); if (recursive) { @@ -22383,7 +22419,7 @@ class ZipFS extends BasePortableFakeFS { async readFilePromise(p, encoding) { if (typeof encoding === `object`) encoding = encoding ? encoding.encoding : void 0; - const data = await this.readFileBuffer(p, { asyncDecompress: true }); + const data = await this.readFileBuffer(p, {asyncDecompress: true}); return encoding ? data.toString(encoding) : data; } readFileSync(p, encoding) { @@ -22392,7 +22428,7 @@ class ZipFS extends BasePortableFakeFS { const data = this.readFileBuffer(p); return encoding ? data.toString(encoding) : data; } - readFileBuffer(p, opts = { asyncDecompress: false }) { + readFileBuffer(p, opts = {asyncDecompress: false}) { if (typeof p === `number`) p = this.fdToPath(p, `read`); const resolvedP = this.resolveFilename(`open '${p}'`, p); @@ -22428,7 +22464,7 @@ class ZipFS extends BasePortableFakeFS { } async readlinkPromise(p) { const entry = this.prepareReadlink(p); - return (await this.getFileSource(entry, { asyncDecompress: true })).toString(); + return (await this.getFileSource(entry, {asyncDecompress: true})).toString(); } readlinkSync(p) { const entry = this.prepareReadlink(p); @@ -22454,7 +22490,7 @@ class ZipFS extends BasePortableFakeFS { const index = this.entries.get(resolvedP); if (typeof index === `undefined`) throw EINVAL(`open '${p}'`); - const source = await this.getFileSource(index, { asyncDecompress: true }); + const source = await this.getFileSource(index, {asyncDecompress: true}); const truncated = Buffer.alloc(len, 0); source.copy(truncated); return await this.writeFilePromise(p, truncated); @@ -22487,20 +22523,20 @@ class ZipFS extends BasePortableFakeFS { break; default: { - ({ persistent = true } = a); + ({persistent = true} = a); } break; } if (!persistent) - return { on: () => { + return {on: () => { }, close: () => { - } }; + }}; const interval = setInterval(() => { }, 24 * 60 * 60 * 1e3); - return { on: () => { + return {on: () => { }, close: () => { clearInterval(interval); - } }; + }}; } watchFile(p, a, b) { const resolvedP = ppath.resolve(PortablePath.root, p); @@ -22529,10 +22565,10 @@ class ProxiedFS extends FakeFS { return this.baseFs.openSync(this.mapToBase(p), flags, mode); } async opendirPromise(p, opts) { - return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(p), opts), { path: p }); + return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(p), opts), {path: p}); } opendirSync(p, opts) { - return Object.assign(this.baseFs.opendirSync(this.mapToBase(p), opts), { path: p }); + return Object.assign(this.baseFs.opendirSync(this.mapToBase(p), opts), {path: p}); } async readPromise(fd, buffer, offset, length, position) { return await this.baseFs.readPromise(fd, buffer, offset, length, position); @@ -22614,12 +22650,6 @@ class ProxiedFS extends FakeFS { chmodSync(p, mask) { return this.baseFs.chmodSync(this.mapToBase(p), mask); } - async fchownPromise(fd, uid, gid) { - return this.baseFs.fchownPromise(fd, uid, gid); - } - fchownSync(fd, uid, gid) { - return this.baseFs.fchownSync(fd, uid, gid); - } async chownPromise(p, uid, gid) { return this.baseFs.chownPromise(this.mapToBase(p), uid, gid); } @@ -22735,18 +22765,10 @@ class ProxiedFS extends FakeFS { return this.baseFs.ftruncateSync(fd, len); } watch(p, a, b) { - return this.baseFs.watch( - this.mapToBase(p), - a, - b - ); + return this.baseFs.watch(this.mapToBase(p), a, b); } watchFile(p, a, b) { - return this.baseFs.watchFile( - this.mapToBase(p), - a, - b - ); + return this.baseFs.watchFile(this.mapToBase(p), a, b); } unwatchFile(p, cb) { return this.baseFs.unwatchFile(this.mapToBase(p), cb); @@ -22777,10 +22799,6 @@ const NUMBER_REGEXP = /^[0-9]+$/; const VIRTUAL_REGEXP = /^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/; const VALID_COMPONENT = /^([^/]+-)?[a-f0-9]+$/; class VirtualFS extends ProxiedFS { - constructor({ baseFs = new NodeFS() } = {}) { - super(ppath); - this.baseFs = baseFs; - } static makeVirtualPath(base, component, to) { if (ppath.basename(base) !== `__virtual__`) throw new Error(`Assertion failed: Virtual folders must be named "__virtual__"`); @@ -22810,6 +22828,10 @@ class VirtualFS extends ProxiedFS { const subpath = match[5] || `.`; return VirtualFS.resolveVirtual(ppath.join(target, backstep, subpath)); } + constructor({baseFs = new NodeFS()} = {}) { + super(ppath); + this.baseFs = baseFs; + } getExtractHint(hints) { return this.baseFs.getExtractHint(hints); } @@ -22868,17 +22890,17 @@ const getArchivePart = (path, extension) => { return path.slice(0, nextCharIdx); }; class ZipOpenFS extends BasePortableFakeFS { - constructor({ libzip, baseFs = new NodeFS(), filter = null, maxOpenFiles = Infinity, readOnlyArchives = false, useCache = true, maxAge = 5e3, fileExtensions = null }) { + constructor({libzip, baseFs = new NodeFS(), filter = null, maxOpenFiles = Infinity, readOnlyArchives = false, useCache = true, maxAge = 5e3, fileExtensions = null}) { super(); - this.fdMap = /* @__PURE__ */ new Map(); + this.fdMap = new Map(); this.nextFd = 3; - this.isZip = /* @__PURE__ */ new Set(); - this.notZip = /* @__PURE__ */ new Set(); - this.realPaths = /* @__PURE__ */ new Map(); + this.isZip = new Set(); + this.notZip = new Set(); + this.realPaths = new Map(); this.limitOpenFilesTimeout = null; this.libzipFactory = typeof libzip !== `function` ? () => libzip : libzip; this.baseFs = baseFs; - this.zipInstances = useCache ? /* @__PURE__ */ new Map() : null; + this.zipInstances = useCache ? new Map() : null; this.filter = filter; this.maxOpenFiles = maxOpenFiles; this.readOnlyArchives = readOnlyArchives; @@ -22907,7 +22929,7 @@ class ZipOpenFS extends BasePortableFakeFS { saveAndClose() { unwatchAllFiles(this); if (this.zipInstances) { - for (const [path, { zipFs }] of this.zipInstances.entries()) { + for (const [path, {zipFs}] of this.zipInstances.entries()) { zipFs.saveAndClose(); this.zipInstances.delete(path); } @@ -22916,7 +22938,7 @@ class ZipOpenFS extends BasePortableFakeFS { discardAndClose() { unwatchAllFiles(this); if (this.zipInstances) { - for (const [path, { zipFs }] of this.zipInstances.entries()) { + for (const [path, {zipFs}] of this.zipInstances.entries()) { zipFs.discardAndClose(); this.zipInstances.delete(path); } @@ -22933,21 +22955,21 @@ class ZipOpenFS extends BasePortableFakeFS { async openPromise(p, flags, mode) { return await this.makeCallPromise(p, async () => { return await this.baseFs.openPromise(p, flags, mode); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return this.remapFd(zipFs, await zipFs.openPromise(subPath, flags, mode)); }); } openSync(p, flags, mode) { return this.makeCallSync(p, () => { return this.baseFs.openSync(p, flags, mode); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return this.remapFd(zipFs, zipFs.openSync(subPath, flags, mode)); }); } async opendirPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.opendirPromise(p, opts); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.opendirPromise(subPath, opts); }, { requireSubpath: false @@ -22956,7 +22978,7 @@ class ZipOpenFS extends BasePortableFakeFS { opendirSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.opendirSync(p, opts); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.opendirSync(subPath, opts); }, { requireSubpath: false @@ -23041,7 +23063,7 @@ class ZipOpenFS extends BasePortableFakeFS { return this.baseFs.createReadStream(p, opts); return this.makeCallSync(p, () => { return this.baseFs.createReadStream(p, opts); - }, (zipFs, { archivePath, subPath }) => { + }, (zipFs, {archivePath, subPath}) => { const stream = zipFs.createReadStream(subPath, opts); stream.path = npath.fromPortablePath(this.pathUtils.join(archivePath, subPath)); return stream; @@ -23052,14 +23074,14 @@ class ZipOpenFS extends BasePortableFakeFS { return this.baseFs.createWriteStream(p, opts); return this.makeCallSync(p, () => { return this.baseFs.createWriteStream(p, opts); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.createWriteStream(subPath, opts); }); } async realpathPromise(p) { return await this.makeCallPromise(p, async () => { return await this.baseFs.realpathPromise(p); - }, async (zipFs, { archivePath, subPath }) => { + }, async (zipFs, {archivePath, subPath}) => { let realArchivePath = this.realPaths.get(archivePath); if (typeof realArchivePath === `undefined`) { realArchivePath = await this.baseFs.realpathPromise(archivePath); @@ -23071,7 +23093,7 @@ class ZipOpenFS extends BasePortableFakeFS { realpathSync(p) { return this.makeCallSync(p, () => { return this.baseFs.realpathSync(p); - }, (zipFs, { archivePath, subPath }) => { + }, (zipFs, {archivePath, subPath}) => { let realArchivePath = this.realPaths.get(archivePath); if (typeof realArchivePath === `undefined`) { realArchivePath = this.baseFs.realpathSync(archivePath); @@ -23083,42 +23105,42 @@ class ZipOpenFS extends BasePortableFakeFS { async existsPromise(p) { return await this.makeCallPromise(p, async () => { return await this.baseFs.existsPromise(p); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.existsPromise(subPath); }); } existsSync(p) { return this.makeCallSync(p, () => { return this.baseFs.existsSync(p); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.existsSync(subPath); }); } async accessPromise(p, mode) { return await this.makeCallPromise(p, async () => { return await this.baseFs.accessPromise(p, mode); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.accessPromise(subPath, mode); }); } accessSync(p, mode) { return this.makeCallSync(p, () => { return this.baseFs.accessSync(p, mode); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.accessSync(subPath, mode); }); } async statPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.statPromise(p, opts); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.statPromise(subPath, opts); }); } statSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.statSync(p, opts); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.statSync(subPath, opts); }); } @@ -23143,14 +23165,14 @@ class ZipOpenFS extends BasePortableFakeFS { async lstatPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.lstatPromise(p, opts); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.lstatPromise(subPath, opts); }); } lstatSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.lstatSync(p, opts); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.lstatSync(subPath, opts); }); } @@ -23175,46 +23197,28 @@ class ZipOpenFS extends BasePortableFakeFS { async chmodPromise(p, mask) { return await this.makeCallPromise(p, async () => { return await this.baseFs.chmodPromise(p, mask); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.chmodPromise(subPath, mask); }); } chmodSync(p, mask) { return this.makeCallSync(p, () => { return this.baseFs.chmodSync(p, mask); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.chmodSync(subPath, mask); }); } - async fchownPromise(fd, uid, gid) { - if ((fd & ZIP_MASK) !== ZIP_MAGIC) - return this.baseFs.fchownPromise(fd, uid, gid); - const entry = this.fdMap.get(fd); - if (typeof entry === `undefined`) - throw EBADF(`fchown`); - const [zipFs, realFd] = entry; - return zipFs.fchownPromise(realFd, uid, gid); - } - fchownSync(fd, uid, gid) { - if ((fd & ZIP_MASK) !== ZIP_MAGIC) - return this.baseFs.fchownSync(fd, uid, gid); - const entry = this.fdMap.get(fd); - if (typeof entry === `undefined`) - throw EBADF(`fchownSync`); - const [zipFs, realFd] = entry; - return zipFs.fchownSync(realFd, uid, gid); - } async chownPromise(p, uid, gid) { return await this.makeCallPromise(p, async () => { return await this.baseFs.chownPromise(p, uid, gid); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.chownPromise(subPath, uid, gid); }); } chownSync(p, uid, gid) { return this.makeCallSync(p, () => { return this.baseFs.chownSync(p, uid, gid); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.chownSync(subPath, uid, gid); }); } @@ -23223,14 +23227,14 @@ class ZipOpenFS extends BasePortableFakeFS { return await this.makeCallPromise(newP, async () => { return await this.baseFs.renamePromise(oldP, newP); }, async () => { - throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), {code: `EEXDEV`}); }); - }, async (zipFsO, { subPath: subPathO }) => { + }, async (zipFsO, {subPath: subPathO}) => { return await this.makeCallPromise(newP, async () => { - throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); - }, async (zipFsN, { subPath: subPathN }) => { + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), {code: `EEXDEV`}); + }, async (zipFsN, {subPath: subPathN}) => { if (zipFsO !== zipFsN) { - throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), {code: `EEXDEV`}); } else { return await zipFsO.renamePromise(subPathO, subPathN); } @@ -23242,14 +23246,14 @@ class ZipOpenFS extends BasePortableFakeFS { return this.makeCallSync(newP, () => { return this.baseFs.renameSync(oldP, newP); }, () => { - throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), {code: `EEXDEV`}); }); - }, (zipFsO, { subPath: subPathO }) => { + }, (zipFsO, {subPath: subPathO}) => { return this.makeCallSync(newP, () => { - throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); - }, (zipFsN, { subPath: subPathN }) => { + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), {code: `EEXDEV`}); + }, (zipFsN, {subPath: subPathN}) => { if (zipFsO !== zipFsN) { - throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), {code: `EEXDEV`}); } else { return zipFsO.renameSync(subPathO, subPathN); } @@ -23259,27 +23263,27 @@ class ZipOpenFS extends BasePortableFakeFS { async copyFilePromise(sourceP, destP, flags = 0) { const fallback = async (sourceFs, sourceP2, destFs, destP2) => { if ((flags & fs.constants.COPYFILE_FICLONE_FORCE) !== 0) - throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${sourceP2}' -> ${destP2}'`), { code: `EXDEV` }); + throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${sourceP2}' -> ${destP2}'`), {code: `EXDEV`}); if (flags & fs.constants.COPYFILE_EXCL && await this.existsPromise(sourceP2)) - throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EEXIST` }); + throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${sourceP2}' -> '${destP2}'`), {code: `EEXIST`}); let content; try { content = await sourceFs.readFilePromise(sourceP2); } catch (error) { - throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EINVAL` }); + throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP2}' -> '${destP2}'`), {code: `EINVAL`}); } await destFs.writeFilePromise(destP2, content); }; return await this.makeCallPromise(sourceP, async () => { return await this.makeCallPromise(destP, async () => { return await this.baseFs.copyFilePromise(sourceP, destP, flags); - }, async (zipFsD, { subPath: subPathD }) => { + }, async (zipFsD, {subPath: subPathD}) => { return await fallback(this.baseFs, sourceP, zipFsD, subPathD); }); - }, async (zipFsS, { subPath: subPathS }) => { + }, async (zipFsS, {subPath: subPathS}) => { return await this.makeCallPromise(destP, async () => { return await fallback(zipFsS, subPathS, this.baseFs, destP); - }, async (zipFsD, { subPath: subPathD }) => { + }, async (zipFsD, {subPath: subPathD}) => { if (zipFsS !== zipFsD) { return await fallback(zipFsS, subPathS, zipFsD, subPathD); } else { @@ -23291,27 +23295,27 @@ class ZipOpenFS extends BasePortableFakeFS { copyFileSync(sourceP, destP, flags = 0) { const fallback = (sourceFs, sourceP2, destFs, destP2) => { if ((flags & fs.constants.COPYFILE_FICLONE_FORCE) !== 0) - throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${sourceP2}' -> ${destP2}'`), { code: `EXDEV` }); + throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${sourceP2}' -> ${destP2}'`), {code: `EXDEV`}); if (flags & fs.constants.COPYFILE_EXCL && this.existsSync(sourceP2)) - throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EEXIST` }); + throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${sourceP2}' -> '${destP2}'`), {code: `EEXIST`}); let content; try { content = sourceFs.readFileSync(sourceP2); } catch (error) { - throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EINVAL` }); + throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP2}' -> '${destP2}'`), {code: `EINVAL`}); } destFs.writeFileSync(destP2, content); }; return this.makeCallSync(sourceP, () => { return this.makeCallSync(destP, () => { return this.baseFs.copyFileSync(sourceP, destP, flags); - }, (zipFsD, { subPath: subPathD }) => { + }, (zipFsD, {subPath: subPathD}) => { return fallback(this.baseFs, sourceP, zipFsD, subPathD); }); - }, (zipFsS, { subPath: subPathS }) => { + }, (zipFsS, {subPath: subPathS}) => { return this.makeCallSync(destP, () => { return fallback(zipFsS, subPathS, this.baseFs, destP); - }, (zipFsD, { subPath: subPathD }) => { + }, (zipFsD, {subPath: subPathD}) => { if (zipFsS !== zipFsD) { return fallback(zipFsS, subPathS, zipFsD, subPathD); } else { @@ -23323,112 +23327,112 @@ class ZipOpenFS extends BasePortableFakeFS { async appendFilePromise(p, content, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.appendFilePromise(p, content, opts); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.appendFilePromise(subPath, content, opts); }); } appendFileSync(p, content, opts) { return this.makeCallSync(p, () => { return this.baseFs.appendFileSync(p, content, opts); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.appendFileSync(subPath, content, opts); }); } async writeFilePromise(p, content, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.writeFilePromise(p, content, opts); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.writeFilePromise(subPath, content, opts); }); } writeFileSync(p, content, opts) { return this.makeCallSync(p, () => { return this.baseFs.writeFileSync(p, content, opts); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.writeFileSync(subPath, content, opts); }); } async unlinkPromise(p) { return await this.makeCallPromise(p, async () => { return await this.baseFs.unlinkPromise(p); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.unlinkPromise(subPath); }); } unlinkSync(p) { return this.makeCallSync(p, () => { return this.baseFs.unlinkSync(p); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.unlinkSync(subPath); }); } async utimesPromise(p, atime, mtime) { return await this.makeCallPromise(p, async () => { return await this.baseFs.utimesPromise(p, atime, mtime); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.utimesPromise(subPath, atime, mtime); }); } utimesSync(p, atime, mtime) { return this.makeCallSync(p, () => { return this.baseFs.utimesSync(p, atime, mtime); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.utimesSync(subPath, atime, mtime); }); } async mkdirPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.mkdirPromise(p, opts); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.mkdirPromise(subPath, opts); }); } mkdirSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.mkdirSync(p, opts); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.mkdirSync(subPath, opts); }); } async rmdirPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.rmdirPromise(p, opts); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.rmdirPromise(subPath, opts); }); } rmdirSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.rmdirSync(p, opts); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.rmdirSync(subPath, opts); }); } async linkPromise(existingP, newP) { return await this.makeCallPromise(newP, async () => { return await this.baseFs.linkPromise(existingP, newP); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.linkPromise(existingP, subPath); }); } linkSync(existingP, newP) { return this.makeCallSync(newP, () => { return this.baseFs.linkSync(existingP, newP); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.linkSync(existingP, subPath); }); } async symlinkPromise(target, p, type) { return await this.makeCallPromise(p, async () => { return await this.baseFs.symlinkPromise(target, p, type); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.symlinkPromise(target, subPath); }); } symlinkSync(target, p, type) { return this.makeCallSync(p, () => { return this.baseFs.symlinkSync(target, p, type); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.symlinkSync(target, subPath); }); } @@ -23440,7 +23444,7 @@ class ZipOpenFS extends BasePortableFakeFS { default: return await this.baseFs.readFilePromise(p, encoding); } - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.readFilePromise(subPath, encoding); }); } @@ -23452,14 +23456,14 @@ class ZipOpenFS extends BasePortableFakeFS { default: return this.baseFs.readFileSync(p, encoding); } - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.readFileSync(subPath, encoding); }); } async readdirPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.readdirPromise(p, opts); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.readdirPromise(subPath, opts); }, { requireSubpath: false @@ -23468,7 +23472,7 @@ class ZipOpenFS extends BasePortableFakeFS { readdirSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.readdirSync(p, opts); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.readdirSync(subPath, opts); }, { requireSubpath: false @@ -23477,28 +23481,28 @@ class ZipOpenFS extends BasePortableFakeFS { async readlinkPromise(p) { return await this.makeCallPromise(p, async () => { return await this.baseFs.readlinkPromise(p); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.readlinkPromise(subPath); }); } readlinkSync(p) { return this.makeCallSync(p, () => { return this.baseFs.readlinkSync(p); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.readlinkSync(subPath); }); } async truncatePromise(p, len) { return await this.makeCallPromise(p, async () => { return await this.baseFs.truncatePromise(p, len); - }, async (zipFs, { subPath }) => { + }, async (zipFs, {subPath}) => { return await zipFs.truncatePromise(subPath, len); }); } truncateSync(p, len) { return this.makeCallSync(p, () => { return this.baseFs.truncateSync(p, len); - }, (zipFs, { subPath }) => { + }, (zipFs, {subPath}) => { return zipFs.truncateSync(subPath, len); }); } @@ -23522,26 +23526,14 @@ class ZipOpenFS extends BasePortableFakeFS { } watch(p, a, b) { return this.makeCallSync(p, () => { - return this.baseFs.watch( - p, - a, - b - ); - }, (zipFs, { subPath }) => { - return zipFs.watch( - subPath, - a, - b - ); + return this.baseFs.watch(p, a, b); + }, (zipFs, {subPath}) => { + return zipFs.watch(subPath, a, b); }); } watchFile(p, a, b) { return this.makeCallSync(p, () => { - return this.baseFs.watchFile( - p, - a, - b - ); + return this.baseFs.watchFile(p, a, b); }, () => { return watchFile(this, p, a, b); }); @@ -23553,7 +23545,7 @@ class ZipOpenFS extends BasePortableFakeFS { return unwatchFile(this, p, cb); }); } - async makeCallPromise(p, discard, accept, { requireSubpath = true } = {}) { + async makeCallPromise(p, discard, accept, {requireSubpath = true} = {}) { if (typeof p !== `string`) return await discard(); const normalizedP = this.resolve(p); @@ -23564,7 +23556,7 @@ class ZipOpenFS extends BasePortableFakeFS { return await discard(); return await this.getZipPromise(zipInfo.archivePath, async (zipFs) => await accept(zipFs, zipInfo)); } - makeCallSync(p, discard, accept, { requireSubpath = true } = {}) { + makeCallSync(p, discard, accept, {requireSubpath = true} = {}) { if (typeof p !== `string`) return discard(); const normalizedP = this.resolve(p); @@ -23620,7 +23612,7 @@ class ZipOpenFS extends BasePortableFakeFS { const now = Date.now(); let nextExpiresAt = now + this.maxAge; let closeCount = max === null ? 0 : this.zipInstances.size - max; - for (const [path, { zipFs, expiresAt, refCount }] of this.zipInstances.entries()) { + for (const [path, {zipFs, expiresAt, refCount}] of this.zipInstances.entries()) { if (refCount !== 0 || zipFs.hasOpenFileHandles()) { continue; } else if (now >= expiresAt) { @@ -23714,7 +23706,7 @@ class ZipOpenFS extends BasePortableFakeFS { } } -class NodePathFS extends ProxiedFS { +class URLFS extends ProxiedFS { constructor(baseFs) { super(npath); this.baseFs = baseFs; @@ -23723,20 +23715,31 @@ class NodePathFS extends ProxiedFS { return path; } mapToBase(path) { - if (typeof path === `string`) - return path; if (path instanceof url.URL) return url.fileURLToPath(path); - if (Buffer.isBuffer(path)) { - const str = path.toString(); - if (Buffer.byteLength(str) !== path.byteLength) - throw new Error(`Non-utf8 buffers are not supported at the moment. Please upvote the following issue if you encounter this error: https://github.com/yarnpkg/berry/issues/4942`); - return str; - } - throw new Error(`Unsupported path type: ${nodeUtils.inspect(path)}`); + return path; } } +var __defProp$3 = Object.defineProperty; +var __defProps$2 = Object.defineProperties; +var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols; +var __hasOwnProp$4 = Object.prototype.hasOwnProperty; +var __propIsEnum$4 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value; +var __spreadValues$3 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$4.call(b, prop)) + __defNormalProp$3(a, prop, b[prop]); + if (__getOwnPropSymbols$4) + for (var prop of __getOwnPropSymbols$4(b)) { + if (__propIsEnum$4.call(b, prop)) + __defNormalProp$3(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b)); var _a, _b, _c, _d; const kBaseFs = Symbol(`kBaseFs`); const kFd = Symbol(`kFd`); @@ -23763,18 +23766,13 @@ class FileHandle { try { this[kRef](this.appendFile); const encoding = (_a2 = typeof options === `string` ? options : options == null ? void 0 : options.encoding) != null ? _a2 : void 0; - return await this[kBaseFs].appendFilePromise(this.fd, data, encoding ? { encoding } : void 0); + return await this[kBaseFs].appendFilePromise(this.fd, data, encoding ? {encoding} : void 0); } finally { this[kUnref](); } } - async chown(uid, gid) { - try { - this[kRef](this.chown); - return await this[kBaseFs].fchownPromise(this.fd, uid, gid); - } finally { - this[kUnref](); - } + chown(uid, gid) { + throw new Error(`Method not implemented.`); } async chmod(mode) { try { @@ -23785,10 +23783,10 @@ class FileHandle { } } createReadStream(options) { - return this[kBaseFs].createReadStream(null, { ...options, fd: this.fd }); + return this[kBaseFs].createReadStream(null, __spreadProps$2(__spreadValues$3({}, options), {fd: this.fd})); } createWriteStream(options) { - return this[kBaseFs].createWriteStream(null, { ...options, fd: this.fd }); + return this[kBaseFs].createWriteStream(null, __spreadProps$2(__spreadValues$3({}, options), {fd: this.fd})); } datasync() { throw new Error(`Method not implemented.`); @@ -23837,12 +23835,6 @@ class FileHandle { this[kUnref](); } } - readLines(options) { - return readline.createInterface({ - input: this.createReadStream(options), - crlfDelay: Infinity - }); - } async stat(opts) { try { this[kRef](this.stat); @@ -23878,11 +23870,11 @@ class FileHandle { if (ArrayBuffer.isView(args[0])) { const [buffer, offset, length, position] = args; const bytesWritten = await this[kBaseFs].writePromise(this.fd, buffer, offset != null ? offset : void 0, length != null ? length : void 0, position != null ? position : void 0); - return { bytesWritten, buffer }; + return {bytesWritten, buffer}; } else { const [data, position, encoding] = args; const bytesWritten = await this[kBaseFs].writePromise(this.fd, data, position, encoding); - return { bytesWritten, buffer: data }; + return {bytesWritten, buffer: data}; } } finally { this[kUnref](); @@ -23958,7 +23950,7 @@ class FileHandle { } } -const SYNC_IMPLEMENTATIONS = /* @__PURE__ */ new Set([ +const SYNC_IMPLEMENTATIONS = new Set([ `accessSync`, `appendFileSync`, `createReadStream`, @@ -23966,7 +23958,6 @@ const SYNC_IMPLEMENTATIONS = /* @__PURE__ */ new Set([ `chmodSync`, `fchmodSync`, `chownSync`, - `fchownSync`, `closeSync`, `copyFileSync`, `linkSync`, @@ -23995,12 +23986,11 @@ const SYNC_IMPLEMENTATIONS = /* @__PURE__ */ new Set([ `writeFileSync`, `writeSync` ]); -const ASYNC_IMPLEMENTATIONS = /* @__PURE__ */ new Set([ +const ASYNC_IMPLEMENTATIONS = new Set([ `accessPromise`, `appendFilePromise`, `fchmodPromise`, `chmodPromise`, - `fchownPromise`, `chownPromise`, `closePromise`, `copyFilePromise`, @@ -24028,7 +24018,7 @@ const ASYNC_IMPLEMENTATIONS = /* @__PURE__ */ new Set([ `writeSync` ]); function patchFs(patchedFs, fakeFs) { - fakeFs = new NodePathFS(fakeFs); + fakeFs = new URLFS(fakeFs); const setupFn = (target, name, replacement) => { const orig = target[name]; target[name] = replacement; @@ -24120,7 +24110,7 @@ function patchFs(patchedFs, fakeFs) { let [fd, buffer, offset, length, position] = args; if (args.length <= 3) { const options = args[2] || {}; - ({ offset = 0, length = buffer.byteLength, position } = options); + ({offset = 0, length = buffer.byteLength, position} = options); } if (offset == null) offset = 0; @@ -24179,11 +24169,11 @@ function patchFs(patchedFs, fakeFs) { { patchedFs.read[nodeUtils.promisify.custom] = async (fd, buffer, ...args) => { const res = fakeFs.readPromise(fd, buffer, ...args); - return { bytesRead: await res, buffer }; + return {bytesRead: await res, buffer}; }; patchedFs.write[nodeUtils.promisify.custom] = async (fd, buffer, ...args) => { const res = fakeFs.writePromise(fd, buffer, ...args); - return { bytesWritten: await res, buffer }; + return {bytesWritten: await res, buffer}; }; } } @@ -24313,10 +24303,7 @@ var createModule = function() { } function getCFunc(ident) { var func = Module["_" + ident]; - assert( - func, - "Cannot call unknown function " + ident + ", make sure it is exported" - ); + assert(func, "Cannot call unknown function " + ident + ", make sure it is exported"); return func; } function ccall(ident, returnType, argTypes, args, opts) { @@ -24615,16 +24602,14 @@ var createModule = function() { var str = e.toString(); err("failed to compile wasm module: " + str); if (str.includes("imported Memory") || str.includes("memory import")) { - err( - "Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)." - ); + err("Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)."); } throw e; } return [instance, module2]; } function createWasm() { - var info = { a: asmLibraryArg }; + var info = {a: asmLibraryArg}; function receiveInstance(instance, module2) { var exports3 = instance.exports; Module["asm"] = exports3; @@ -24719,12 +24704,9 @@ var createModule = function() { }, normalize: function(path) { var isAbsolute = path.charAt(0) === "/", trailingSlash = path.substr(-1) === "/"; - path = PATH.normalizeArray( - path.split("/").filter(function(p) { - return !!p; - }), - !isAbsolute - ).join("/"); + path = PATH.normalizeArray(path.split("/").filter(function(p) { + return !!p; + }), !isAbsolute).join("/"); if (!path && !isAbsolute) { path = "."; } @@ -24791,12 +24773,9 @@ var createModule = function() { resolvedPath = path + "/" + resolvedPath; resolvedAbsolute = path.charAt(0) === "/"; } - resolvedPath = PATH.normalizeArray( - resolvedPath.split("/").filter(function(p) { - return !!p; - }), - !resolvedAbsolute - ).join("/"); + resolvedPath = PATH.normalizeArray(resolvedPath.split("/").filter(function(p) { + return !!p; + }), !resolvedAbsolute).join("/"); return (resolvedAbsolute ? "/" : "") + resolvedPath || "."; }, relative: function(from, to) { @@ -24842,7 +24821,7 @@ var createModule = function() { shutdown: function() { }, register: function(dev, ops) { - TTY.ttys[dev] = { input: [], output: [], ops }; + TTY.ttys[dev] = {input: [], output: [], ops}; FS.registerDevice(dev, TTY.stream_ops); }, stream_ops: { @@ -24911,13 +24890,7 @@ var createModule = function() { var buf = Buffer.alloc ? Buffer.alloc(BUFSIZE) : new Buffer(BUFSIZE); var bytesRead = 0; try { - bytesRead = nodeFS.readSync( - process.stdin.fd, - buf, - 0, - BUFSIZE, - null - ); + bytesRead = nodeFS.readSync(process.stdin.fd, buf, 0, BUFSIZE, null); } catch (e) { if (e.toString().includes("EOF")) bytesRead = 0; @@ -25001,7 +24974,7 @@ var createModule = function() { readdir: MEMFS.node_ops.readdir, symlink: MEMFS.node_ops.symlink }, - stream: { llseek: MEMFS.stream_ops.llseek } + stream: {llseek: MEMFS.stream_ops.llseek} }, file: { node: { @@ -25070,10 +25043,7 @@ var createModule = function() { if (prevCapacity >= newCapacity) return; var CAPACITY_DOUBLING_MAX = 1024 * 1024; - newCapacity = Math.max( - newCapacity, - prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2 : 1.125) >>> 0 - ); + newCapacity = Math.max(newCapacity, prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2 : 1.125) >>> 0); if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); var oldContents = node.contents; @@ -25091,9 +25061,7 @@ var createModule = function() { var oldContents = node.contents; node.contents = new Uint8Array(newSize); if (oldContents) { - node.contents.set( - oldContents.subarray(0, Math.min(newSize, node.usedBytes)) - ); + node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); } node.usedBytes = newSize; } @@ -25227,19 +25195,13 @@ var createModule = function() { node.usedBytes = length; return length; } else if (position + length <= node.usedBytes) { - node.contents.set( - buffer2.subarray(offset, offset + length), - position - ); + node.contents.set(buffer2.subarray(offset, offset + length), position); return length; } } MEMFS.expandFileStorage(node, position + length); if (node.contents.subarray && buffer2.subarray) { - node.contents.set( - buffer2.subarray(offset, offset + length), - position - ); + node.contents.set(buffer2.subarray(offset, offset + length), position); } else { for (var i = 0; i < length; i++) { node.contents[position + i] = buffer2[offset + i]; @@ -25264,10 +25226,7 @@ var createModule = function() { }, allocate: function(stream, offset, length) { MEMFS.expandFileStorage(stream.node, offset + length); - stream.node.usedBytes = Math.max( - stream.node.usedBytes, - offset + length - ); + stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); }, mmap: function(stream, address, length, position, prot, flags) { if (address !== 0) { @@ -25287,11 +25246,7 @@ var createModule = function() { if (contents.subarray) { contents = contents.subarray(position, position + length); } else { - contents = Array.prototype.slice.call( - contents, - position, - position + length - ); + contents = Array.prototype.slice.call(contents, position, position + length); } } allocated = true; @@ -25301,7 +25256,7 @@ var createModule = function() { } HEAP8.set(contents, ptr); } - return { ptr, allocated }; + return {ptr, allocated}; }, msync: function(stream, buffer2, offset, length, mmapFlags) { if (!FS.isFile(stream.node.mode)) { @@ -25310,14 +25265,7 @@ var createModule = function() { if (mmapFlags & 2) { return 0; } - MEMFS.stream_ops.write( - stream, - buffer2, - 0, - length, - offset, - false - ); + MEMFS.stream_ops.write(stream, buffer2, 0, length, offset, false); return 0; } } @@ -25449,7 +25397,7 @@ var createModule = function() { isWindows: false, staticInit: function() { NODEFS.isWindows = !!process.platform.match(/^win/); - var flags = { fs: fs.constants }; + var flags = {fs: fs.constants}; if (flags["fs"]) { flags = flags["fs"]; } @@ -25591,7 +25539,7 @@ var createModule = function() { if (FS.isDir(node.mode)) { fs.mkdirSync(path, node.mode); } else { - fs.writeFileSync(path, "", { mode: node.mode }); + fs.writeFileSync(path, "", {mode: node.mode}); } } catch (e) { if (!e.code) @@ -25656,10 +25604,7 @@ var createModule = function() { var path = NODEFS.realPath(node); try { path = fs.readlinkSync(path); - path = NODEJS_PATH.relative( - NODEJS_PATH.resolve(node.mount.opts.root), - path - ); + path = NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root), path); return path; } catch (e) { if (!e.code) @@ -25696,26 +25641,14 @@ var createModule = function() { if (length === 0) return 0; try { - return fs.readSync( - stream.nfd, - NODEFS.bufferFrom(buffer2.buffer), - offset, - length, - position - ); + return fs.readSync(stream.nfd, NODEFS.bufferFrom(buffer2.buffer), offset, length, position); } catch (e) { throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } }, write: function(stream, buffer2, offset, length, position) { try { - return fs.writeSync( - stream.nfd, - NODEFS.bufferFrom(buffer2.buffer), - offset, - length, - position - ); + return fs.writeSync(stream.nfd, NODEFS.bufferFrom(buffer2.buffer), offset, length, position); } catch (e) { throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } @@ -25748,7 +25681,7 @@ var createModule = function() { } var ptr = mmapAlloc(length); NODEFS.stream_ops.read(stream, HEAP8, ptr, length, position); - return { ptr, allocated: true }; + return {ptr, allocated: true}; }, msync: function(stream, buffer2, offset, length, mmapFlags) { if (!FS.isFile(stream.node.mode)) { @@ -25757,21 +25690,14 @@ var createModule = function() { if (mmapFlags & 2) { return 0; } - NODEFS.stream_ops.write( - stream, - buffer2, - 0, - length, - offset, - false - ); + NODEFS.stream_ops.write(stream, buffer2, 0, length, offset, false); return 0; } } }; var NODERAWFS = { lookupPath: function(path) { - return { path, node: { mode: NODEFS.getMode(path) } }; + return {path, node: {mode: NODEFS.getMode(path)}}; }, createStandardStreams: function() { FS.streams[0] = { @@ -25805,7 +25731,7 @@ var createModule = function() { if (FS.isDir(path)) { fs.mkdirSync(path, mode); } else { - fs.writeFileSync(path, "", { mode }); + fs.writeFileSync(path, "", {mode}); } }, mkdir: function() { @@ -25907,13 +25833,7 @@ var createModule = function() { var seeking = typeof position !== "undefined"; if (!seeking && stream.seekable) position = stream.position; - var bytesRead = fs.readSync( - stream.nfd, - NODEFS.bufferFrom(buffer2.buffer), - offset, - length, - position - ); + var bytesRead = fs.readSync(stream.nfd, NODEFS.bufferFrom(buffer2.buffer), offset, length, position); if (!seeking) stream.position += bytesRead; return bytesRead; @@ -25928,13 +25848,7 @@ var createModule = function() { var seeking = typeof position !== "undefined"; if (!seeking && stream.seekable) position = stream.position; - var bytesWritten = fs.writeSync( - stream.nfd, - NODEFS.bufferFrom(buffer2.buffer), - offset, - length, - position - ); + var bytesWritten = fs.writeSync(stream.nfd, NODEFS.bufferFrom(buffer2.buffer), offset, length, position); if (!seeking) stream.position += bytesWritten; return bytesWritten; @@ -25951,7 +25865,7 @@ var createModule = function() { } var ptr = mmapAlloc(length); FS.read(stream, HEAP8, ptr, length, position); - return { ptr, allocated: true }; + return {ptr, allocated: true}; }, msync: function(stream, buffer2, offset, length, mmapFlags) { if (stream.stream_ops) { @@ -25981,7 +25895,7 @@ var createModule = function() { initialized: false, ignorePermissions: true, trackingDelegate: {}, - tracking: { openFlags: { READ: 1, WRITE: 2 } }, + tracking: {openFlags: {READ: 1, WRITE: 2}}, ErrnoError: null, genericErrors: {}, filesystems: null, @@ -25990,8 +25904,8 @@ var createModule = function() { path = PATH_FS.resolve(FS.cwd(), path); opts = opts || {}; if (!path) - return { path: "", node: null }; - var defaults = { follow_mount: true, recurse_count: 0 }; + return {path: "", node: null}; + var defaults = {follow_mount: true, recurse_count: 0}; for (var key2 in defaults) { if (opts[key2] === void 0) { opts[key2] = defaults[key2]; @@ -26000,12 +25914,9 @@ var createModule = function() { if (opts.recurse_count > 8) { throw new FS.ErrnoError(32); } - var parts = PATH.normalizeArray( - path.split("/").filter(function(p) { - return !!p; - }), - false - ); + var parts = PATH.normalizeArray(path.split("/").filter(function(p) { + return !!p; + }), false); var current = FS.root; var current_path = "/"; for (var i = 0; i < parts.length; i++) { @@ -26035,7 +25946,7 @@ var createModule = function() { } } } - return { path: current_path, node: current }; + return {path: current_path, node: current}; }, getPath: function(node) { var path; @@ -26126,7 +26037,7 @@ var createModule = function() { isSocket: function(mode) { return (mode & 49152) === 49152; }, - flagModes: { r: 0, "r+": 2, w: 577, "w+": 578, a: 1089, "a+": 1090 }, + flagModes: {r: 0, "r+": 2, w: 577, "w+": 578, a: 1089, "a+": 1090}, modeStringToFlags: function(str) { var flags = FS.flagModes[str]; if (typeof flags === "undefined") { @@ -26287,7 +26198,7 @@ var createModule = function() { return ma << 8 | mi; }, registerDevice: function(dev, ops) { - FS.devices[dev] = { stream_ops: ops }; + FS.devices[dev] = {stream_ops: ops}; }, getDevice: function(dev) { return FS.devices[dev]; @@ -26309,9 +26220,7 @@ var createModule = function() { } FS.syncFSRequests++; if (FS.syncFSRequests > 1) { - err( - "warning: " + FS.syncFSRequests + " FS.syncfs operations in flight at once, probably just doing extra work" - ); + err("warning: " + FS.syncFSRequests + " FS.syncfs operations in flight at once, probably just doing extra work"); } var mounts = FS.getMounts(FS.root.mount); var completed = 0; @@ -26345,7 +26254,7 @@ var createModule = function() { if (root && FS.root) { throw new FS.ErrnoError(10); } else if (!root && !pseudo) { - var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); + var lookup = FS.lookupPath(mountpoint, {follow_mount: false}); mountpoint = lookup.path; node = lookup.node; if (FS.isMountpoint(node)) { @@ -26375,7 +26284,7 @@ var createModule = function() { return mountRoot; }, unmount: function(mountpoint) { - var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); + var lookup = FS.lookupPath(mountpoint, {follow_mount: false}); if (!FS.isMountpoint(lookup.node)) { throw new FS.ErrnoError(28); } @@ -26400,7 +26309,7 @@ var createModule = function() { return parent.node_ops.lookup(parent, name); }, mknod: function(path, mode, dev) { - var lookup = FS.lookupPath(path, { parent: true }); + var lookup = FS.lookupPath(path, {parent: true}); var parent = lookup.node; var name = PATH.basename(path); if (!name || name === "." || name === "..") { @@ -26454,7 +26363,7 @@ var createModule = function() { if (!PATH_FS.resolve(oldpath)) { throw new FS.ErrnoError(44); } - var lookup = FS.lookupPath(newpath, { parent: true }); + var lookup = FS.lookupPath(newpath, {parent: true}); var parent = lookup.node; if (!parent) { throw new FS.ErrnoError(44); @@ -26475,9 +26384,9 @@ var createModule = function() { var old_name = PATH.basename(old_path); var new_name = PATH.basename(new_path); var lookup, old_dir, new_dir; - lookup = FS.lookupPath(old_path, { parent: true }); + lookup = FS.lookupPath(old_path, {parent: true}); old_dir = lookup.node; - lookup = FS.lookupPath(new_path, { parent: true }); + lookup = FS.lookupPath(new_path, {parent: true}); new_dir = lookup.node; if (!old_dir || !new_dir) throw new FS.ErrnoError(44); @@ -26527,9 +26436,7 @@ var createModule = function() { FS.trackingDelegate["willMovePath"](old_path, new_path); } } catch (e) { - err( - "FS.trackingDelegate['willMovePath']('" + old_path + "', '" + new_path + "') threw an exception: " + e.message - ); + err("FS.trackingDelegate['willMovePath']('" + old_path + "', '" + new_path + "') threw an exception: " + e.message); } FS.hashRemoveNode(old_node); try { @@ -26543,13 +26450,11 @@ var createModule = function() { if (FS.trackingDelegate["onMovePath"]) FS.trackingDelegate["onMovePath"](old_path, new_path); } catch (e) { - err( - "FS.trackingDelegate['onMovePath']('" + old_path + "', '" + new_path + "') threw an exception: " + e.message - ); + err("FS.trackingDelegate['onMovePath']('" + old_path + "', '" + new_path + "') threw an exception: " + e.message); } }, rmdir: function(path) { - var lookup = FS.lookupPath(path, { parent: true }); + var lookup = FS.lookupPath(path, {parent: true}); var parent = lookup.node; var name = PATH.basename(path); var node = FS.lookupNode(parent, name); @@ -26568,9 +26473,7 @@ var createModule = function() { FS.trackingDelegate["willDeletePath"](path); } } catch (e) { - err( - "FS.trackingDelegate['willDeletePath']('" + path + "') threw an exception: " + e.message - ); + err("FS.trackingDelegate['willDeletePath']('" + path + "') threw an exception: " + e.message); } parent.node_ops.rmdir(parent, name); FS.destroyNode(node); @@ -26578,13 +26481,11 @@ var createModule = function() { if (FS.trackingDelegate["onDeletePath"]) FS.trackingDelegate["onDeletePath"](path); } catch (e) { - err( - "FS.trackingDelegate['onDeletePath']('" + path + "') threw an exception: " + e.message - ); + err("FS.trackingDelegate['onDeletePath']('" + path + "') threw an exception: " + e.message); } }, readdir: function(path) { - var lookup = FS.lookupPath(path, { follow: true }); + var lookup = FS.lookupPath(path, {follow: true}); var node = lookup.node; if (!node.node_ops.readdir) { throw new FS.ErrnoError(54); @@ -26592,7 +26493,7 @@ var createModule = function() { return node.node_ops.readdir(node); }, unlink: function(path) { - var lookup = FS.lookupPath(path, { parent: true }); + var lookup = FS.lookupPath(path, {parent: true}); var parent = lookup.node; var name = PATH.basename(path); var node = FS.lookupNode(parent, name); @@ -26611,9 +26512,7 @@ var createModule = function() { FS.trackingDelegate["willDeletePath"](path); } } catch (e) { - err( - "FS.trackingDelegate['willDeletePath']('" + path + "') threw an exception: " + e.message - ); + err("FS.trackingDelegate['willDeletePath']('" + path + "') threw an exception: " + e.message); } parent.node_ops.unlink(parent, name); FS.destroyNode(node); @@ -26621,9 +26520,7 @@ var createModule = function() { if (FS.trackingDelegate["onDeletePath"]) FS.trackingDelegate["onDeletePath"](path); } catch (e) { - err( - "FS.trackingDelegate['onDeletePath']('" + path + "') threw an exception: " + e.message - ); + err("FS.trackingDelegate['onDeletePath']('" + path + "') threw an exception: " + e.message); } }, readlink: function(path) { @@ -26635,13 +26532,10 @@ var createModule = function() { if (!link.node_ops.readlink) { throw new FS.ErrnoError(28); } - return PATH_FS.resolve( - FS.getPath(link.parent), - link.node_ops.readlink(link) - ); + return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); }, stat: function(path, dontFollow) { - var lookup = FS.lookupPath(path, { follow: !dontFollow }); + var lookup = FS.lookupPath(path, {follow: !dontFollow}); var node = lookup.node; if (!node) { throw new FS.ErrnoError(44); @@ -26657,7 +26551,7 @@ var createModule = function() { chmod: function(path, mode, dontFollow) { var node; if (typeof path === "string") { - var lookup = FS.lookupPath(path, { follow: !dontFollow }); + var lookup = FS.lookupPath(path, {follow: !dontFollow}); node = lookup.node; } else { node = path; @@ -26683,7 +26577,7 @@ var createModule = function() { chown: function(path, uid, gid, dontFollow) { var node; if (typeof path === "string") { - var lookup = FS.lookupPath(path, { follow: !dontFollow }); + var lookup = FS.lookupPath(path, {follow: !dontFollow}); node = lookup.node; } else { node = path; @@ -26691,7 +26585,7 @@ var createModule = function() { if (!node.node_ops.setattr) { throw new FS.ErrnoError(63); } - node.node_ops.setattr(node, { timestamp: Date.now() }); + node.node_ops.setattr(node, {timestamp: Date.now()}); }, lchown: function(path, uid, gid) { FS.chown(path, uid, gid, true); @@ -26709,7 +26603,7 @@ var createModule = function() { } var node; if (typeof path === "string") { - var lookup = FS.lookupPath(path, { follow: true }); + var lookup = FS.lookupPath(path, {follow: true}); node = lookup.node; } else { node = path; @@ -26727,7 +26621,7 @@ var createModule = function() { if (errCode) { throw new FS.ErrnoError(errCode); } - node.node_ops.setattr(node, { size: len, timestamp: Date.now() }); + node.node_ops.setattr(node, {size: len, timestamp: Date.now()}); }, ftruncate: function(fd, len) { var stream = FS.getStream(fd); @@ -26740,9 +26634,9 @@ var createModule = function() { FS.truncate(stream.node, len); }, utime: function(path, atime, mtime) { - var lookup = FS.lookupPath(path, { follow: true }); + var lookup = FS.lookupPath(path, {follow: true}); var node = lookup.node; - node.node_ops.setattr(node, { timestamp: Math.max(atime, mtime) }); + node.node_ops.setattr(node, {timestamp: Math.max(atime, mtime)}); }, open: function(path, flags, mode, fd_start, fd_end) { if (path === "") { @@ -26761,7 +26655,7 @@ var createModule = function() { } else { path = PATH.normalize(path); try { - var lookup = FS.lookupPath(path, { follow: !(flags & 131072) }); + var lookup = FS.lookupPath(path, {follow: !(flags & 131072)}); node = lookup.node; } catch (e) { } @@ -26796,20 +26690,16 @@ var createModule = function() { FS.truncate(node, 0); } flags &= ~(128 | 512 | 131072); - var stream = FS.createStream( - { - node, - path: FS.getPath(node), - flags, - seekable: true, - position: 0, - stream_ops: node.stream_ops, - ungotten: [], - error: false - }, - fd_start, - fd_end - ); + var stream = FS.createStream({ + node, + path: FS.getPath(node), + flags, + seekable: true, + position: 0, + stream_ops: node.stream_ops, + ungotten: [], + error: false + }, fd_start, fd_end); if (stream.stream_ops.open) { stream.stream_ops.open(stream); } @@ -26833,9 +26723,7 @@ var createModule = function() { FS.trackingDelegate["onOpenFile"](path, trackingFlags); } } catch (e) { - err( - "FS.trackingDelegate['onOpenFile']('" + path + "', flags) threw an exception: " + e.message - ); + err("FS.trackingDelegate['onOpenFile']('" + path + "', flags) threw an exception: " + e.message); } return stream; }, @@ -26895,13 +26783,7 @@ var createModule = function() { } else if (!stream.seekable) { throw new FS.ErrnoError(70); } - var bytesRead = stream.stream_ops.read( - stream, - buffer2, - offset, - length, - position - ); + var bytesRead = stream.stream_ops.read(stream, buffer2, offset, length, position); if (!seeking) stream.position += bytesRead; return bytesRead; @@ -26931,23 +26813,14 @@ var createModule = function() { } else if (!stream.seekable) { throw new FS.ErrnoError(70); } - var bytesWritten = stream.stream_ops.write( - stream, - buffer2, - offset, - length, - position, - canOwn - ); + var bytesWritten = stream.stream_ops.write(stream, buffer2, offset, length, position, canOwn); if (!seeking) stream.position += bytesWritten; try { if (stream.path && FS.trackingDelegate["onWriteToFile"]) FS.trackingDelegate["onWriteToFile"](stream.path); } catch (e) { - err( - "FS.trackingDelegate['onWriteToFile']('" + stream.path + "') threw an exception: " + e.message - ); + err("FS.trackingDelegate['onWriteToFile']('" + stream.path + "') threw an exception: " + e.message); } return bytesWritten; }, @@ -26979,26 +26852,13 @@ var createModule = function() { if (!stream.stream_ops.mmap) { throw new FS.ErrnoError(43); } - return stream.stream_ops.mmap( - stream, - address, - length, - position, - prot, - flags - ); + return stream.stream_ops.mmap(stream, address, length, position, prot, flags); }, msync: function(stream, buffer2, offset, length, mmapFlags) { if (!stream || !stream.stream_ops.msync) { return 0; } - return stream.stream_ops.msync( - stream, - buffer2, - offset, - length, - mmapFlags - ); + return stream.stream_ops.msync(stream, buffer2, offset, length, mmapFlags); }, munmap: function(stream) { return 0; @@ -27049,7 +26909,7 @@ var createModule = function() { return FS.currentPath; }, chdir: function(path) { - var lookup = FS.lookupPath(path, { follow: true }); + var lookup = FS.lookupPath(path, {follow: true}); if (lookup.node === null) { throw new FS.ErrnoError(44); } @@ -27092,35 +26952,31 @@ var createModule = function() { FS.mkdir("/proc"); var proc_self = FS.mkdir("/proc/self"); FS.mkdir("/proc/self/fd"); - FS.mount( - { - mount: function() { - var node = FS.createNode(proc_self, "fd", 16384 | 511, 73); - node.node_ops = { - lookup: function(parent, name) { - var fd = +name; - var stream = FS.getStream(fd); - if (!stream) - throw new FS.ErrnoError(8); - var ret = { - parent: null, - mount: { mountpoint: "fake" }, - node_ops: { - readlink: function() { - return stream.path; - } + FS.mount({ + mount: function() { + var node = FS.createNode(proc_self, "fd", 16384 | 511, 73); + node.node_ops = { + lookup: function(parent, name) { + var fd = +name; + var stream = FS.getStream(fd); + if (!stream) + throw new FS.ErrnoError(8); + var ret = { + parent: null, + mount: {mountpoint: "fake"}, + node_ops: { + readlink: function() { + return stream.path; } - }; - ret.parent = ret; - return ret; - } - }; - return node; - } - }, - {}, - "/proc/self/fd" - ); + } + }; + ret.parent = ret; + return ret; + } + }; + return node; + } + }, {}, "/proc/self/fd"); }, createStandardStreams: function() { if (Module["stdin"]) { @@ -27167,7 +27023,7 @@ var createModule = function() { FS.createDefaultDirectories(); FS.createDefaultDevices(); FS.createSpecialDirectories(); - FS.filesystems = { MEMFS, NODEFS }; + FS.filesystems = {MEMFS, NODEFS}; }, init: function(input, output, error) { FS.init.initialized = true; @@ -27208,7 +27064,7 @@ var createModule = function() { }, analyzePath: function(path, dontResolveLastLink) { try { - var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); + var lookup = FS.lookupPath(path, {follow: !dontResolveLastLink}); path = lookup.path; } catch (e) { } @@ -27224,12 +27080,12 @@ var createModule = function() { parentObject: null }; try { - var lookup = FS.lookupPath(path, { parent: true }); + var lookup = FS.lookupPath(path, {parent: true}); ret.parentExists = true; ret.parentPath = lookup.path; ret.parentObject = lookup.node; ret.name = PATH.basename(path); - lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); + lookup = FS.lookupPath(path, {follow: !dontResolveLastLink}); ret.exists = true; ret.path = lookup.path; ret.object = lookup.node; @@ -27257,18 +27113,12 @@ var createModule = function() { return current; }, createFile: function(parent, name, properties, canRead, canWrite) { - var path = PATH.join2( - typeof parent === "string" ? parent : FS.getPath(parent), - name - ); + var path = PATH.join2(typeof parent === "string" ? parent : FS.getPath(parent), name); var mode = FS.getMode(canRead, canWrite); return FS.create(path, mode); }, createDataFile: function(parent, name, data, canRead, canWrite, canOwn) { - var path = name ? PATH.join2( - typeof parent === "string" ? parent : FS.getPath(parent), - name - ) : parent; + var path = name ? PATH.join2(typeof parent === "string" ? parent : FS.getPath(parent), name) : parent; var mode = FS.getMode(canRead, canWrite); var node = FS.create(path, mode); if (data) { @@ -27287,10 +27137,7 @@ var createModule = function() { return node; }, createDevice: function(parent, name, input, output) { - var path = PATH.join2( - typeof parent === "string" ? parent : FS.getPath(parent), - name - ); + var path = PATH.join2(typeof parent === "string" ? parent : FS.getPath(parent), name); var mode = FS.getMode(!!input, !!output); if (!FS.createDevice.major) FS.createDevice.major = 64; @@ -27358,7 +27205,7 @@ var createModule = function() { }, createLazyFile: function(parent, name, url, canRead, canWrite) { var properties; { - var properties = { isDevice: false, url }; + var properties = {isDevice: false, url}; } var node = FS.createFile(parent, name, properties, canRead, canWrite); if (properties.contents) { @@ -27411,14 +27258,7 @@ var createModule = function() { if (preFinish) preFinish(); if (!dontCreateFile) { - FS.createDataFile( - parent, - name, - byteArray2, - canRead, - canWrite, - canOwn - ); + FS.createDataFile(parent, name, byteArray2, canRead, canWrite, canOwn); } if (onload) onload(); @@ -27442,13 +27282,9 @@ var createModule = function() { } addRunDependency(); if (typeof url == "string") { - Browser.asyncLoad( - url, - function(byteArray) { - processData(byteArray); - }, - onerror - ); + Browser.asyncLoad(url, function(byteArray) { + processData(byteArray); + }, onerror); } else { processData(url); } @@ -27489,10 +27325,7 @@ var createModule = function() { onerror(); } paths.forEach(function(path) { - var putRequest = files.put( - FS.analyzePath(path).object.contents, - path - ); + var putRequest = files.put(FS.analyzePath(path).object.contents, path); putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) @@ -27542,14 +27375,7 @@ var createModule = function() { if (FS.analyzePath(path).exists) { FS.unlink(path); } - FS.createDataFile( - PATH.dirname(path), - PATH.basename(path), - getRequest.result, - true, - true, - true - ); + FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true); ok++; if (ok + fail == total) finish(); @@ -27610,9 +27436,7 @@ var createModule = function() { HEAP32[buf + 32 >> 2] = 0; tempI64 = [ stat.size >>> 0, - (tempDouble = stat.size, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil( - (tempDouble - +(~~tempDouble >>> 0)) / 4294967296 - ) >>> 0 : 0) + (tempDouble = stat.size, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) ], HEAP32[buf + 40 >> 2] = tempI64[0], HEAP32[buf + 44 >> 2] = tempI64[1]; HEAP32[buf + 48 >> 2] = 4096; HEAP32[buf + 52 >> 2] = stat.blocks; @@ -27624,9 +27448,7 @@ var createModule = function() { HEAP32[buf + 76 >> 2] = 0; tempI64 = [ stat.ino >>> 0, - (tempDouble = stat.ino, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil( - (tempDouble - +(~~tempDouble >>> 0)) / 4294967296 - ) >>> 0 : 0) + (tempDouble = stat.ino, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) ], HEAP32[buf + 80 >> 2] = tempI64[0], HEAP32[buf + 84 >> 2] = tempI64[1]; return 0; }, @@ -27670,7 +27492,7 @@ var createModule = function() { return -28; } var node; - var lookup = FS.lookupPath(path, { follow: true }); + var lookup = FS.lookupPath(path, {follow: true}); node = lookup.node; if (!node) { return -44; @@ -27946,14 +27768,8 @@ var createModule = function() { } for (var cutDown = 1; cutDown <= 4; cutDown *= 2) { var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); - overGrownHeapSize = Math.min( - overGrownHeapSize, - requestedSize + 100663296 - ); - var newSize = Math.min( - maxHeapSize, - alignUp(Math.max(requestedSize, overGrownHeapSize), 65536) - ); + overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296); + var newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536)); var replacement = emscripten_realloc_buffer(newSize); if (replacement) { return true; @@ -28008,9 +27824,7 @@ var createModule = function() { FS.llseek(stream, offset, whence); tempI64 = [ stream.position >>> 0, - (tempDouble = stream.position, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil( - (tempDouble - +(~~tempDouble >>> 0)) / 4294967296 - ) >>> 0 : 0) + (tempDouble = stream.position, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) ], HEAP32[newOffset >> 2] = tempI64[0], HEAP32[newOffset + 4 >> 2] = tempI64[1]; if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; @@ -28072,15 +27886,7 @@ var createModule = function() { } function _timegm(tmPtr) { _tzset(); - var time = Date.UTC( - HEAP32[tmPtr + 20 >> 2] + 1900, - HEAP32[tmPtr + 16 >> 2], - HEAP32[tmPtr + 12 >> 2], - HEAP32[tmPtr + 8 >> 2], - HEAP32[tmPtr + 4 >> 2], - HEAP32[tmPtr >> 2], - 0 - ); + var time = Date.UTC(HEAP32[tmPtr + 20 >> 2] + 1900, HEAP32[tmPtr + 16 >> 2], HEAP32[tmPtr + 12 >> 2], HEAP32[tmPtr + 8 >> 2], HEAP32[tmPtr + 4 >> 2], HEAP32[tmPtr >> 2], 0); var date = new Date(time); HEAP32[tmPtr + 24 >> 2] = date.getUTCDay(); var start = Date.UTC(date.getUTCFullYear(), 0, 1, 0, 0, 0, 0); @@ -28158,12 +27964,7 @@ var createModule = function() { function intArrayFromString(stringy, dontAddNull, length) { var len = length > 0 ? length : lengthBytesUTF8(stringy) + 1; var u8array = new Array(len); - var numBytesWritten = stringToUTF8Array( - stringy, - u8array, - 0, - u8array.length - ); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); if (dontAddNull) u8array.length = numBytesWritten; return u8array; @@ -28176,11 +27977,7 @@ var createModule = function() { } catch (_) { buf = new Buffer(s, "base64"); } - return new Uint8Array( - buf["buffer"], - buf["byteOffset"], - buf["byteLength"] - ); + return new Uint8Array(buf["buffer"], buf["byteOffset"], buf["byteLength"]); } } function tryParseAsDataURI(filename) { @@ -28333,7 +28130,8 @@ const number64 = [ `number`, `number` ]; -var Errors = /* @__PURE__ */ ((Errors2) => { +var Errors; +(function(Errors2) { Errors2[Errors2["ZIP_ER_OK"] = 0] = "ZIP_ER_OK"; Errors2[Errors2["ZIP_ER_MULTIDISK"] = 1] = "ZIP_ER_MULTIDISK"; Errors2[Errors2["ZIP_ER_RENAME"] = 2] = "ZIP_ER_RENAME"; @@ -28366,8 +28164,7 @@ var Errors = /* @__PURE__ */ ((Errors2) => { Errors2[Errors2["ZIP_ER_INUSE"] = 29] = "ZIP_ER_INUSE"; Errors2[Errors2["ZIP_ER_TELL"] = 30] = "ZIP_ER_TELL"; Errors2[Errors2["ZIP_ER_COMPRESSED_DATA"] = 31] = "ZIP_ER_COMPRESSED_DATA"; - return Errors2; -})(Errors || {}); +})(Errors || (Errors = {})); const makeInterface = (libzip) => ({ get HEAP8() { return libzip.HEAP8; @@ -28487,7 +28284,27 @@ function getLibzipSync() { return mod; } -var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => { +var __defProp$2 = Object.defineProperty; +var __defProps$1 = Object.defineProperties; +var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols; +var __hasOwnProp$3 = Object.prototype.hasOwnProperty; +var __propIsEnum$3 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value; +var __spreadValues$2 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$3.call(b, prop)) + __defNormalProp$2(a, prop, b[prop]); + if (__getOwnPropSymbols$3) + for (var prop of __getOwnPropSymbols$3(b)) { + if (__propIsEnum$3.call(b, prop)) + __defNormalProp$2(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b)); +var ErrorCode; +(function(ErrorCode2) { ErrorCode2["API_ERROR"] = `API_ERROR`; ErrorCode2["BUILTIN_NODE_RESOLUTION_FAILED"] = `BUILTIN_NODE_RESOLUTION_FAILED`; ErrorCode2["EXPORTS_RESOLUTION_FAILED"] = `EXPORTS_RESOLUTION_FAILED`; @@ -28497,14 +28314,13 @@ var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => { ErrorCode2["INTERNAL"] = `INTERNAL`; ErrorCode2["UNDECLARED_DEPENDENCY"] = `UNDECLARED_DEPENDENCY`; ErrorCode2["UNSUPPORTED"] = `UNSUPPORTED`; - return ErrorCode2; -})(ErrorCode || {}); -const MODULE_NOT_FOUND_ERRORS = /* @__PURE__ */ new Set([ - "BUILTIN_NODE_RESOLUTION_FAILED" /* BUILTIN_NODE_RESOLUTION_FAILED */, - "MISSING_DEPENDENCY" /* MISSING_DEPENDENCY */, - "MISSING_PEER_DEPENDENCY" /* MISSING_PEER_DEPENDENCY */, - "QUALIFIED_PATH_RESOLUTION_FAILED" /* QUALIFIED_PATH_RESOLUTION_FAILED */, - "UNDECLARED_DEPENDENCY" /* UNDECLARED_DEPENDENCY */ +})(ErrorCode || (ErrorCode = {})); +const MODULE_NOT_FOUND_ERRORS = new Set([ + ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, + ErrorCode.MISSING_DEPENDENCY, + ErrorCode.MISSING_PEER_DEPENDENCY, + ErrorCode.QUALIFIED_PATH_RESOLUTION_FAILED, + ErrorCode.UNDECLARED_DEPENDENCY ]); function makeError(pnpCode, message, data = {}, code) { code != null ? code : code = MODULE_NOT_FOUND_ERRORS.has(pnpCode) ? `MODULE_NOT_FOUND` : pnpCode; @@ -28514,18 +28330,15 @@ function makeError(pnpCode, message, data = {}, code) { enumerable: false }; return Object.defineProperties(new Error(message), { - code: { - ...propertySpec, + code: __spreadProps$1(__spreadValues$2({}, propertySpec), { value: code - }, - pnpCode: { - ...propertySpec, + }), + pnpCode: __spreadProps$1(__spreadValues$2({}, propertySpec), { value: pnpCode - }, - data: { - ...propertySpec, + }), + data: __spreadProps$1(__spreadValues$2({}, propertySpec), { value: data - } + }) }); } function getIssuerModule(parent) { @@ -28538,9 +28351,6 @@ function getPathForDisplay(p) { return npath.normalize(npath.fromPortablePath(p)); } -const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10)); -const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 || major === 18 && minor >= 13; - const builtinModules = new Set(require$$0.Module.builtinModules || Object.keys(process.binding(`natives`))); const isBuiltinModule = (request) => request.startsWith(`node:`) || builtinModules.has(request); function readPackageScope(checkPath) { @@ -28575,19 +28385,22 @@ Instead change the require of ${basename} in ${parentPath} to a dynamic import() err.code = `ERR_REQUIRE_ESM`; return err; } -function reportRequiredFilesToWatchMode(files) { - if (process.env.WATCH_REPORT_DEPENDENCIES && process.send) { - files = files.map((filename) => npath.fromPortablePath(VirtualFS.resolveVirtual(npath.toPortablePath(filename)))); - if (WATCH_MODE_MESSAGE_USES_ARRAYS) { - process.send({ "watch:require": files }); - } else { - for (const filename of files) { - process.send({ "watch:require": filename }); - } - } - } -} +var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols; +var __hasOwnProp$2 = Object.prototype.hasOwnProperty; +var __propIsEnum$2 = Object.prototype.propertyIsEnumerable; +var __objRest$1 = (source, exclude) => { + var target = {}; + for (var prop in source) + if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0) + target[prop] = source[prop]; + if (source != null && __getOwnPropSymbols$2) + for (var prop of __getOwnPropSymbols$2(source)) { + if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop)) + target[prop] = source[prop]; + } + return target; +}; function applyPatch(pnpapi, opts) { const defaultCache = {}; let enableNativeHooks = true; @@ -28628,7 +28441,7 @@ function applyPatch(pnpapi, opts) { const modulePath = require$$0.Module._resolveFilename(request, parent, isMain); const isOwnedByRuntime = parentApi !== null ? parentApi.findPackageLocator(modulePath) !== null : false; const moduleApiPath = isOwnedByRuntime ? parentApiPath : opts.manager.findApiPathFor(npath.dirname(modulePath)); - const entry = moduleApiPath !== null ? opts.manager.getApiEntry(moduleApiPath) : { instance: null, cache: defaultCache }; + const entry = moduleApiPath !== null ? opts.manager.getApiEntry(moduleApiPath) : {instance: null, cache: defaultCache}; const cacheEntry = entry.cache[modulePath]; if (cacheEntry) { if (cacheEntry.loaded === false && cacheEntry.isLoading !== true) { @@ -28647,7 +28460,6 @@ function applyPatch(pnpapi, opts) { } const module = new require$$0.Module(modulePath, parent != null ? parent : void 0); module.pnpApiPath = moduleApiPath; - reportRequiredFilesToWatchMode([modulePath]); entry.cache[modulePath] = module; if (isMain) { process.mainModule = module; @@ -28686,11 +28498,11 @@ function applyPatch(pnpapi, opts) { if (issuer !== null) { const path = npath.dirname(issuer.filename); const apiPath = opts.manager.getApiPathFromParent(issuer); - return [{ apiPath, path, module }]; + return [{apiPath, path, module}]; } else { const path = process.cwd(); const apiPath = (_a = opts.manager.findApiPathFor(npath.join(path, `[file]`))) != null ? _a : opts.manager.getApiPathFromParent(null); - return [{ apiPath, path, module }]; + return [{apiPath, path, module}]; } } function makeFakeParent(path) { @@ -28707,7 +28519,7 @@ function applyPatch(pnpapi, opts) { if (!enableNativeHooks) return originalModuleResolveFilename.call(require$$0.Module, request, parent, isMain, options); if (options && options.plugnplay === false) { - const { plugnplay, ...rest } = options; + const _a = options, rest = __objRest$1(_a, ["plugnplay"]); const forwardedOptions = Object.keys(rest).length > 0 ? rest : void 0; try { enableNativeHooks = false; @@ -28721,10 +28533,7 @@ function applyPatch(pnpapi, opts) { optionNames.delete(`paths`); optionNames.delete(`plugnplay`); if (optionNames.size > 0) { - throw makeError( - ErrorCode.UNSUPPORTED, - `Some options passed to require() aren't supported by PnP yet (${Array.from(optionNames).join(`, `)})` - ); + throw makeError(ErrorCode.UNSUPPORTED, `Some options passed to require() aren't supported by PnP yet (${Array.from(optionNames).join(`, `)})`); } } const issuerSpecs = options && options.paths ? getIssuerSpecsFromPaths(options.paths) : getIssuerSpecsFromModule(parent); @@ -28743,7 +28552,7 @@ function applyPatch(pnpapi, opts) { } } let firstError; - for (const { apiPath, path, module } of issuerSpecs) { + for (const {apiPath, path, module} of issuerSpecs) { let resolution; const issuerApi = apiPath !== null ? opts.manager.getApiEntry(apiPath, true).instance : null; try { @@ -28824,12 +28633,7 @@ Require stack: const originalDlopen = process.dlopen; process.dlopen = function(...args) { const [module, filename, ...rest] = args; - return originalDlopen.call( - this, - module, - npath.fromPortablePath(VirtualFS.resolveVirtual(npath.toPortablePath(filename))), - ...rest - ); + return originalDlopen.call(this, module, npath.fromPortablePath(VirtualFS.resolveVirtual(npath.toPortablePath(filename))), ...rest); }; const originalEmit = process.emit; process.emit = function(name, data, ...args) { @@ -28840,21 +28644,21 @@ Require stack: patchFs(fs__default.default, new PosixFS(opts.fakeFs)); } -function hydrateRuntimeState(data, { basePath }) { +function hydrateRuntimeState(data, {basePath}) { const portablePath = npath.toPortablePath(basePath); const absolutePortablePath = ppath.resolve(portablePath); const ignorePattern = data.ignorePatternData !== null ? new RegExp(data.ignorePatternData) : null; - const packageLocatorsByLocations = /* @__PURE__ */ new Map(); + const packageLocatorsByLocations = new Map(); const packageRegistry = new Map(data.packageRegistryData.map(([packageName, packageStoreData]) => { return [packageName, new Map(packageStoreData.map(([packageReference, packageInformationData]) => { var _a; if (packageName === null !== (packageReference === null)) throw new Error(`Assertion failed: The name and reference should be null, or neither should`); const discardFromLookup = (_a = packageInformationData.discardFromLookup) != null ? _a : false; - const packageLocator = { name: packageName, reference: packageReference }; + const packageLocator = {name: packageName, reference: packageReference}; const entry = packageLocatorsByLocations.get(packageInformationData.packageLocation); if (!entry) { - packageLocatorsByLocations.set(packageInformationData.packageLocation, { locator: packageLocator, discardFromLookup }); + packageLocatorsByLocations.set(packageInformationData.packageLocation, {locator: packageLocator, discardFromLookup}); } else { entry.discardFromLookup = entry.discardFromLookup && discardFromLookup; if (!discardFromLookup) { @@ -29003,744 +28807,25 @@ function resolve(pkg, entry='.', options={}) { } } -const ArrayIsArray = Array.isArray; -const JSONStringify = JSON.stringify; -const ObjectGetOwnPropertyNames = Object.getOwnPropertyNames; -const ObjectPrototypeHasOwnProperty = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop); -const RegExpPrototypeExec = (obj, string) => RegExp.prototype.exec.call(obj, string); -const RegExpPrototypeSymbolReplace = (obj, ...rest) => RegExp.prototype[Symbol.replace].apply(obj, rest); -const StringPrototypeEndsWith = (str, ...rest) => String.prototype.endsWith.apply(str, rest); -const StringPrototypeIncludes = (str, ...rest) => String.prototype.includes.apply(str, rest); -const StringPrototypeLastIndexOf = (str, ...rest) => String.prototype.lastIndexOf.apply(str, rest); -const StringPrototypeIndexOf = (str, ...rest) => String.prototype.indexOf.apply(str, rest); -const StringPrototypeReplace = (str, ...rest) => String.prototype.replace.apply(str, rest); -const StringPrototypeSlice = (str, ...rest) => String.prototype.slice.apply(str, rest); -const StringPrototypeStartsWith = (str, ...rest) => String.prototype.startsWith.apply(str, rest); -const SafeMap = Map; -const JSONParse = JSON.parse; - -function createErrorType(code, messageCreator, errorType) { - return class extends errorType { - constructor(...args) { - super(messageCreator(...args)); - this.code = code; - this.name = `${errorType.name} [${code}]`; +var __defProp$1 = Object.defineProperty; +var __defProps = Object.defineProperties; +var __getOwnPropDescs = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols; +var __hasOwnProp$1 = Object.prototype.hasOwnProperty; +var __propIsEnum$1 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value; +var __spreadValues$1 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$1.call(b, prop)) + __defNormalProp$1(a, prop, b[prop]); + if (__getOwnPropSymbols$1) + for (var prop of __getOwnPropSymbols$1(b)) { + if (__propIsEnum$1.call(b, prop)) + __defNormalProp$1(a, prop, b[prop]); } - }; -} -const ERR_PACKAGE_IMPORT_NOT_DEFINED = createErrorType( - `ERR_PACKAGE_IMPORT_NOT_DEFINED`, - (specifier, packagePath, base) => { - return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ``} imported from ${base}`; - }, - TypeError -); -const ERR_INVALID_MODULE_SPECIFIER = createErrorType( - `ERR_INVALID_MODULE_SPECIFIER`, - (request, reason, base = void 0) => { - return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ``}`; - }, - TypeError -); -const ERR_INVALID_PACKAGE_TARGET = createErrorType( - `ERR_INVALID_PACKAGE_TARGET`, - (pkgPath, key, target, isImport = false, base = void 0) => { - const relError = typeof target === `string` && !isImport && target.length && !StringPrototypeStartsWith(target, `./`); - if (key === `.`) { - assert__default.default(isImport === false); - return `Invalid "exports" main target ${JSONStringify(target)} defined in the package config ${pkgPath}package.json${base ? ` imported from ${base}` : ``}${relError ? `; targets must start with "./"` : ``}`; - } - return `Invalid "${isImport ? `imports` : `exports`}" target ${JSONStringify( - target - )} defined for '${key}' in the package config ${pkgPath}package.json${base ? ` imported from ${base}` : ``}${relError ? `; targets must start with "./"` : ``}`; - }, - Error -); -const ERR_INVALID_PACKAGE_CONFIG = createErrorType( - `ERR_INVALID_PACKAGE_CONFIG`, - (path, base, message) => { - return `Invalid package config ${path}${base ? ` while importing ${base}` : ``}${message ? `. ${message}` : ``}`; - }, - Error -); - -function filterOwnProperties(source, keys) { - const filtered = /* @__PURE__ */ Object.create(null); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (ObjectPrototypeHasOwnProperty(source, key)) { - filtered[key] = source[key]; - } - } - return filtered; -} - -const packageJSONCache = new SafeMap(); -function getPackageConfig(path, specifier, base, readFileSyncFn) { - const existing = packageJSONCache.get(path); - if (existing !== void 0) { - return existing; - } - const source = readFileSyncFn(path); - if (source === void 0) { - const packageConfig2 = { - pjsonPath: path, - exists: false, - main: void 0, - name: void 0, - type: "none", - exports: void 0, - imports: void 0 - }; - packageJSONCache.set(path, packageConfig2); - return packageConfig2; - } - let packageJSON; - try { - packageJSON = JSONParse(source); - } catch (error) { - throw new ERR_INVALID_PACKAGE_CONFIG( - path, - (base ? `"${specifier}" from ` : "") + url.fileURLToPath(base || specifier), - error.message - ); - } - let { imports, main, name, type } = filterOwnProperties(packageJSON, [ - "imports", - "main", - "name", - "type" - ]); - const exports = ObjectPrototypeHasOwnProperty(packageJSON, "exports") ? packageJSON.exports : void 0; - if (typeof imports !== "object" || imports === null) { - imports = void 0; - } - if (typeof main !== "string") { - main = void 0; - } - if (typeof name !== "string") { - name = void 0; - } - if (type !== "module" && type !== "commonjs") { - type = "none"; - } - const packageConfig = { - pjsonPath: path, - exists: true, - main, - name, - type, - exports, - imports - }; - packageJSONCache.set(path, packageConfig); - return packageConfig; -} -function getPackageScopeConfig(resolved, readFileSyncFn) { - let packageJSONUrl = new URL("./package.json", resolved); - while (true) { - const packageJSONPath2 = packageJSONUrl.pathname; - if (StringPrototypeEndsWith(packageJSONPath2, "node_modules/package.json")) { - break; - } - const packageConfig2 = getPackageConfig( - url.fileURLToPath(packageJSONUrl), - resolved, - void 0, - readFileSyncFn - ); - if (packageConfig2.exists) { - return packageConfig2; - } - const lastPackageJSONUrl = packageJSONUrl; - packageJSONUrl = new URL("../package.json", packageJSONUrl); - if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) { - break; - } - } - const packageJSONPath = url.fileURLToPath(packageJSONUrl); - const packageConfig = { - pjsonPath: packageJSONPath, - exists: false, - main: void 0, - name: void 0, - type: "none", - exports: void 0, - imports: void 0 - }; - packageJSONCache.set(packageJSONPath, packageConfig); - return packageConfig; -} - -/** - @license - Copyright Node.js contributors. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. -*/ -function throwImportNotDefined(specifier, packageJSONUrl, base) { - throw new ERR_PACKAGE_IMPORT_NOT_DEFINED( - specifier, - packageJSONUrl && url.fileURLToPath(new URL(".", packageJSONUrl)), - url.fileURLToPath(base) - ); -} -function throwInvalidSubpath(subpath, packageJSONUrl, internal, base) { - const reason = `request is not a valid subpath for the "${internal ? "imports" : "exports"}" resolution of ${url.fileURLToPath(packageJSONUrl)}`; - throw new ERR_INVALID_MODULE_SPECIFIER( - subpath, - reason, - base && url.fileURLToPath(base) - ); -} -function throwInvalidPackageTarget(subpath, target, packageJSONUrl, internal, base) { - if (typeof target === "object" && target !== null) { - target = JSONStringify(target, null, ""); - } else { - target = `${target}`; - } - throw new ERR_INVALID_PACKAGE_TARGET( - url.fileURLToPath(new URL(".", packageJSONUrl)), - subpath, - target, - internal, - base && url.fileURLToPath(base) - ); -} -const invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i; -const patternRegEx = /\*/g; -function resolvePackageTargetString(target, subpath, match, packageJSONUrl, base, pattern, internal, conditions) { - if (subpath !== "" && !pattern && target[target.length - 1] !== "/") - throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); - if (!StringPrototypeStartsWith(target, "./")) { - if (internal && !StringPrototypeStartsWith(target, "../") && !StringPrototypeStartsWith(target, "/")) { - let isURL = false; - try { - new URL(target); - isURL = true; - } catch { - } - if (!isURL) { - const exportTarget = pattern ? RegExpPrototypeSymbolReplace(patternRegEx, target, () => subpath) : target + subpath; - return exportTarget; - } - } - throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); - } - if (RegExpPrototypeExec( - invalidSegmentRegEx, - StringPrototypeSlice(target, 2) - ) !== null) - throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); - const resolved = new URL(target, packageJSONUrl); - const resolvedPath = resolved.pathname; - const packagePath = new URL(".", packageJSONUrl).pathname; - if (!StringPrototypeStartsWith(resolvedPath, packagePath)) - throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); - if (subpath === "") - return resolved; - if (RegExpPrototypeExec(invalidSegmentRegEx, subpath) !== null) { - const request = pattern ? StringPrototypeReplace(match, "*", () => subpath) : match + subpath; - throwInvalidSubpath(request, packageJSONUrl, internal, base); - } - if (pattern) { - return new URL( - RegExpPrototypeSymbolReplace(patternRegEx, resolved.href, () => subpath) - ); - } - return new URL(subpath, resolved); -} -function isArrayIndex(key) { - const keyNum = +key; - if (`${keyNum}` !== key) - return false; - return keyNum >= 0 && keyNum < 4294967295; -} -function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath, base, pattern, internal, conditions) { - if (typeof target === "string") { - return resolvePackageTargetString( - target, - subpath, - packageSubpath, - packageJSONUrl, - base, - pattern, - internal); - } else if (ArrayIsArray(target)) { - if (target.length === 0) { - return null; - } - let lastException; - for (let i = 0; i < target.length; i++) { - const targetItem = target[i]; - let resolveResult; - try { - resolveResult = resolvePackageTarget( - packageJSONUrl, - targetItem, - subpath, - packageSubpath, - base, - pattern, - internal, - conditions - ); - } catch (e) { - lastException = e; - if (e.code === "ERR_INVALID_PACKAGE_TARGET") { - continue; - } - throw e; - } - if (resolveResult === void 0) { - continue; - } - if (resolveResult === null) { - lastException = null; - continue; - } - return resolveResult; - } - if (lastException === void 0 || lastException === null) - return lastException; - throw lastException; - } else if (typeof target === "object" && target !== null) { - const keys = ObjectGetOwnPropertyNames(target); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (isArrayIndex(key)) { - throw new ERR_INVALID_PACKAGE_CONFIG( - url.fileURLToPath(packageJSONUrl), - base, - '"exports" cannot contain numeric property keys.' - ); - } - } - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key === "default" || conditions.has(key)) { - const conditionalTarget = target[key]; - const resolveResult = resolvePackageTarget( - packageJSONUrl, - conditionalTarget, - subpath, - packageSubpath, - base, - pattern, - internal, - conditions - ); - if (resolveResult === void 0) - continue; - return resolveResult; - } - } - return void 0; - } else if (target === null) { - return null; - } - throwInvalidPackageTarget( - packageSubpath, - target, - packageJSONUrl, - internal, - base - ); -} -function patternKeyCompare(a, b) { - const aPatternIndex = StringPrototypeIndexOf(a, "*"); - const bPatternIndex = StringPrototypeIndexOf(b, "*"); - const baseLenA = aPatternIndex === -1 ? a.length : aPatternIndex + 1; - const baseLenB = bPatternIndex === -1 ? b.length : bPatternIndex + 1; - if (baseLenA > baseLenB) - return -1; - if (baseLenB > baseLenA) - return 1; - if (aPatternIndex === -1) - return 1; - if (bPatternIndex === -1) - return -1; - if (a.length > b.length) - return -1; - if (b.length > a.length) - return 1; - return 0; -} -function packageImportsResolve({ - name, - base, - conditions, - readFileSyncFn -}) { - if (name === "#" || StringPrototypeStartsWith(name, "#/") || StringPrototypeEndsWith(name, "/")) { - const reason = "is not a valid internal imports specifier name"; - throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, url.fileURLToPath(base)); - } - let packageJSONUrl; - const packageConfig = getPackageScopeConfig(base, readFileSyncFn); - if (packageConfig.exists) { - packageJSONUrl = url.pathToFileURL(packageConfig.pjsonPath); - const imports = packageConfig.imports; - if (imports) { - if (ObjectPrototypeHasOwnProperty(imports, name) && !StringPrototypeIncludes(name, "*")) { - const resolveResult = resolvePackageTarget( - packageJSONUrl, - imports[name], - "", - name, - base, - false, - true, - conditions - ); - if (resolveResult != null) { - return resolveResult; - } - } else { - let bestMatch = ""; - let bestMatchSubpath; - const keys = ObjectGetOwnPropertyNames(imports); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - const patternIndex = StringPrototypeIndexOf(key, "*"); - if (patternIndex !== -1 && StringPrototypeStartsWith( - name, - StringPrototypeSlice(key, 0, patternIndex) - )) { - const patternTrailer = StringPrototypeSlice(key, patternIndex + 1); - if (name.length >= key.length && StringPrototypeEndsWith(name, patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && StringPrototypeLastIndexOf(key, "*") === patternIndex) { - bestMatch = key; - bestMatchSubpath = StringPrototypeSlice( - name, - patternIndex, - name.length - patternTrailer.length - ); - } - } - } - if (bestMatch) { - const target = imports[bestMatch]; - const resolveResult = resolvePackageTarget( - packageJSONUrl, - target, - bestMatchSubpath, - bestMatch, - base, - true, - true, - conditions - ); - if (resolveResult != null) { - return resolveResult; - } - } - } - } - } - throwImportNotDefined(name, packageJSONUrl, base); -} - -const flagSymbol = Symbol('arg flag'); - -class ArgError extends Error { - constructor(msg, code) { - super(msg); - this.name = 'ArgError'; - this.code = code; - - Object.setPrototypeOf(this, ArgError.prototype); - } -} - -function arg( - opts, - { - argv = process.argv.slice(2), - permissive = false, - stopAtPositional = false - } = {} -) { - if (!opts) { - throw new ArgError( - 'argument specification object is required', - 'ARG_CONFIG_NO_SPEC' - ); - } - - const result = { _: [] }; - - const aliases = {}; - const handlers = {}; - - for (const key of Object.keys(opts)) { - if (!key) { - throw new ArgError( - 'argument key cannot be an empty string', - 'ARG_CONFIG_EMPTY_KEY' - ); - } - - if (key[0] !== '-') { - throw new ArgError( - `argument key must start with '-' but found: '${key}'`, - 'ARG_CONFIG_NONOPT_KEY' - ); - } - - if (key.length === 1) { - throw new ArgError( - `argument key must have a name; singular '-' keys are not allowed: ${key}`, - 'ARG_CONFIG_NONAME_KEY' - ); - } - - if (typeof opts[key] === 'string') { - aliases[key] = opts[key]; - continue; - } - - let type = opts[key]; - let isFlag = false; - - if ( - Array.isArray(type) && - type.length === 1 && - typeof type[0] === 'function' - ) { - const [fn] = type; - type = (value, name, prev = []) => { - prev.push(fn(value, name, prev[prev.length - 1])); - return prev; - }; - isFlag = fn === Boolean || fn[flagSymbol] === true; - } else if (typeof type === 'function') { - isFlag = type === Boolean || type[flagSymbol] === true; - } else { - throw new ArgError( - `type missing or not a function or valid array type: ${key}`, - 'ARG_CONFIG_VAD_TYPE' - ); - } - - if (key[1] !== '-' && key.length > 2) { - throw new ArgError( - `short argument keys (with a single hyphen) must have only one character: ${key}`, - 'ARG_CONFIG_SHORTOPT_TOOLONG' - ); - } - - handlers[key] = [type, isFlag]; - } - - for (let i = 0, len = argv.length; i < len; i++) { - const wholeArg = argv[i]; - - if (stopAtPositional && result._.length > 0) { - result._ = result._.concat(argv.slice(i)); - break; - } - - if (wholeArg === '--') { - result._ = result._.concat(argv.slice(i + 1)); - break; - } - - if (wholeArg.length > 1 && wholeArg[0] === '-') { - /* eslint-disable operator-linebreak */ - const separatedArguments = - wholeArg[1] === '-' || wholeArg.length === 2 - ? [wholeArg] - : wholeArg - .slice(1) - .split('') - .map((a) => `-${a}`); - /* eslint-enable operator-linebreak */ - - for (let j = 0; j < separatedArguments.length; j++) { - const arg = separatedArguments[j]; - const [originalArgName, argStr] = - arg[1] === '-' ? arg.split(/=(.*)/, 2) : [arg, undefined]; - - let argName = originalArgName; - while (argName in aliases) { - argName = aliases[argName]; - } - - if (!(argName in handlers)) { - if (permissive) { - result._.push(arg); - continue; - } else { - throw new ArgError( - `unknown or unexpected option: ${originalArgName}`, - 'ARG_UNKNOWN_OPTION' - ); - } - } - - const [type, isFlag] = handlers[argName]; - - if (!isFlag && j + 1 < separatedArguments.length) { - throw new ArgError( - `option requires argument (but was followed by another short argument): ${originalArgName}`, - 'ARG_MISSING_REQUIRED_SHORTARG' - ); - } - - if (isFlag) { - result[argName] = type(true, argName, result[argName]); - } else if (argStr === undefined) { - if ( - argv.length < i + 2 || - (argv[i + 1].length > 1 && - argv[i + 1][0] === '-' && - !( - argv[i + 1].match(/^-?\d*(\.(?=\d))?\d*$/) && - (type === Number || - // eslint-disable-next-line no-undef - (typeof BigInt !== 'undefined' && type === BigInt)) - )) - ) { - const extended = - originalArgName === argName ? '' : ` (alias for ${argName})`; - throw new ArgError( - `option requires argument: ${originalArgName}${extended}`, - 'ARG_MISSING_REQUIRED_LONGARG' - ); - } - - result[argName] = type(argv[i + 1], argName, result[argName]); - ++i; - } else { - result[argName] = type(argStr, argName, result[argName]); - } - } - } else { - result._.push(wholeArg); - } - } - - return result; -} - -arg.flag = (fn) => { - fn[flagSymbol] = true; - return fn; + return a; }; - -// Utility types -arg.COUNT = arg.flag((v, name, existingCount) => (existingCount || 0) + 1); - -// Expose error class -arg.ArgError = ArgError; - -var arg_1 = arg; - -/** - @license - The MIT License (MIT) - - Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -*/ -function getOptionValue(opt) { - parseOptions(); - return options[opt]; -} -let options; -function parseOptions() { - if (!options) { - options = { - "--conditions": [], - ...parseArgv(getNodeOptionsEnvArgv()), - ...parseArgv(process.execArgv) - }; - } -} -function parseArgv(argv) { - return arg_1( - { - "--conditions": [String], - "-C": "--conditions" - }, - { - argv, - permissive: true - } - ); -} -function getNodeOptionsEnvArgv() { - const errors = []; - const envArgv = ParseNodeOptionsEnvVar(process.env.NODE_OPTIONS || "", errors); - if (errors.length !== 0) ; - return envArgv; -} -function ParseNodeOptionsEnvVar(node_options, errors) { - const env_argv = []; - let is_in_string = false; - let will_start_new_arg = true; - for (let index = 0; index < node_options.length; ++index) { - let c = node_options[index]; - if (c === "\\" && is_in_string) { - if (index + 1 === node_options.length) { - errors.push("invalid value for NODE_OPTIONS (invalid escape)\n"); - return env_argv; - } else { - c = node_options[++index]; - } - } else if (c === " " && !is_in_string) { - will_start_new_arg = true; - continue; - } else if (c === '"') { - is_in_string = !is_in_string; - continue; - } - if (will_start_new_arg) { - env_argv.push(c); - will_start_new_arg = false; - } else { - env_argv[env_argv.length - 1] += c; - } - } - if (is_in_string) { - errors.push("invalid value for NODE_OPTIONS (unterminated string)\n"); - } - return env_argv; -} - +var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); function makeApi(runtimeState, opts) { const alwaysWarnOnFallback = Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK) > 0; const debugLevel = Number(process.env.PNP_DEBUG_LEVEL); @@ -29748,9 +28833,9 @@ function makeApi(runtimeState, opts) { const isStrictRegExp = /^(\/|\.{1,2}(\/|$))/; const isDirRegExp = /\/$/; const isRelativeRegexp = /^\.{0,2}\//; - const topLevelLocator = { name: null, reference: null }; + const topLevelLocator = {name: null, reference: null}; const fallbackLocators = []; - const emittedWarnings = /* @__PURE__ */ new Set(); + const emittedWarnings = new Set(); if (runtimeState.enableTopLevelFallback === true) fallbackLocators.push(topLevelLocator); if (opts.compatibilityMode !== false) { @@ -29761,7 +28846,7 @@ function makeApi(runtimeState, opts) { if (reference === null) { throw new Error(`Assertion failed: This reference shouldn't be null`); } else { - fallbackLocators.push({ name, reference }); + fallbackLocators.push({name, reference}); } } } @@ -29783,7 +28868,7 @@ function makeApi(runtimeState, opts) { function trace(entry) { var _a, _b, _c, _d, _e, _f; const colors = (_c = (_b = (_a = process.stderr) == null ? void 0 : _a.hasColors) == null ? void 0 : _b.call(_a)) != null ? _c : process.stdout.isTTY; - const c = (n, str) => `\x1B[${n}m${str}\x1B[0m`; + const c = (n, str) => `[${n}m${str}`; const error = entry.error; if (error) console.error(c(`31;1`, `\u2716 ${(_d = entry.error) == null ? void 0 : _d.message.replace(/\n.*/s, ``)}`)); @@ -29792,10 +28877,10 @@ function makeApi(runtimeState, opts) { if (entry.args.length > 0) console.error(); for (const arg of entry.args) - console.error(` ${c(`37;1`, `In \u2190`)} ${nodeUtils.inspect(arg, { colors, compact: true })}`); + console.error(` ${c(`37;1`, `In \u2190`)} ${nodeUtils.inspect(arg, {colors, compact: true})}`); if (entry.result) { console.error(); - console.error(` ${c(`37;1`, `Out \u2192`)} ${nodeUtils.inspect(entry.result, { colors, compact: true })}`); + console.error(` ${c(`37;1`, `Out \u2192`)} ${nodeUtils.inspect(entry.result, {colors, compact: true})}`); } const stack = (_f = (_e = new Error().stack.match(/(?<=^ +)at.*/gm)) == null ? void 0 : _e.slice(2)) != null ? _f : []; if (stack.length > 0) { @@ -29839,10 +28924,7 @@ function makeApi(runtimeState, opts) { function getPackageInformationSafe(packageLocator) { const packageInformation = getPackageInformation(packageLocator); if (!packageInformation) { - throw makeError( - ErrorCode.INTERNAL, - `Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)` - ); + throw makeError(ErrorCode.INTERNAL, `Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)`); } return packageInformation; } @@ -29854,34 +28936,23 @@ function makeApi(runtimeState, opts) { return true; return false; } - const defaultExportsConditions = /* @__PURE__ */ new Set([ - `default`, - `node`, - `require`, - ...getOptionValue(`--conditions`) - ]); + const defaultExportsConditions = new Set([`default`, `node`, `require`]); function applyNodeExportsResolution(unqualifiedPath, conditions = defaultExportsConditions) { const locator = findPackageLocator(ppath.join(unqualifiedPath, `internal.js`), { resolveIgnored: true, includeDiscardFromLookup: true }); if (locator === null) { - throw makeError( - ErrorCode.INTERNAL, - `The locator that owns the "${unqualifiedPath}" path can't be found inside the dependency tree (this is probably an internal error)` - ); + throw makeError(ErrorCode.INTERNAL, `The locator that owns the "${unqualifiedPath}" path can't be found inside the dependency tree (this is probably an internal error)`); } - const { packageLocation } = getPackageInformationSafe(locator); + const {packageLocation} = getPackageInformationSafe(locator); const manifestPath = ppath.join(packageLocation, Filename.manifest); if (!opts.fakeFs.existsSync(manifestPath)) return null; const pkgJson = JSON.parse(opts.fakeFs.readFileSync(manifestPath, `utf8`)); let subpath = ppath.contains(packageLocation, unqualifiedPath); if (subpath === null) { - throw makeError( - ErrorCode.INTERNAL, - `unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)` - ); + throw makeError(ErrorCode.INTERNAL, `unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)`); } if (!isRelativeRegexp.test(subpath)) subpath = `./${subpath}`; @@ -29892,18 +28963,13 @@ function makeApi(runtimeState, opts) { unsafe: true }); } catch (error) { - throw makeError( - ErrorCode.EXPORTS_RESOLUTION_FAILED, - error.message, - { unqualifiedPath: getPathForDisplay(unqualifiedPath), locator, pkgJson, subpath: getPathForDisplay(subpath), conditions }, - `ERR_PACKAGE_PATH_NOT_EXPORTED` - ); + throw makeError(ErrorCode.EXPORTS_RESOLUTION_FAILED, error.message, {unqualifiedPath: getPathForDisplay(unqualifiedPath), locator, pkgJson, subpath: getPathForDisplay(subpath), conditions}, `ERR_PACKAGE_PATH_NOT_EXPORTED`); } if (typeof resolvedExport === `string`) return ppath.join(packageLocation, resolvedExport); return null; } - function applyNodeExtensionResolution(unqualifiedPath, candidates, { extensions }) { + function applyNodeExtensionResolution(unqualifiedPath, candidates, {extensions}) { let stat; try { candidates.push(unqualifiedPath); @@ -29922,7 +28988,7 @@ function makeApi(runtimeState, opts) { if (pkgJson && pkgJson.main) nextUnqualifiedPath = ppath.resolve(unqualifiedPath, pkgJson.main); if (nextUnqualifiedPath && nextUnqualifiedPath !== unqualifiedPath) { - const resolution = applyNodeExtensionResolution(nextUnqualifiedPath, candidates, { extensions }); + const resolution = applyNodeExtensionResolution(nextUnqualifiedPath, candidates, {extensions}); if (resolution !== null) { return resolution; } @@ -29937,7 +29003,7 @@ function makeApi(runtimeState, opts) { } if (stat && stat.isDirectory()) { for (let i = 0, length = extensions.length; i < length; i++) { - const candidateFile = ppath.format({ dir: unqualifiedPath, name: `index`, ext: extensions[i] }); + const candidateFile = ppath.format({dir: unqualifiedPath, name: `index`, ext: extensions[i]}); candidates.push(candidateFile); if (opts.fakeFs.existsSync(candidateFile)) { return candidateFile; @@ -29955,7 +29021,7 @@ function makeApi(runtimeState, opts) { function callNativeResolution(request, issuer) { if (issuer.endsWith(`/`)) issuer = ppath.join(issuer, `internal.js`); - return require$$0.Module._resolveFilename(npath.fromPortablePath(request), makeFakeModule(npath.fromPortablePath(issuer)), false, { plugnplay: false }); + return require$$0.Module._resolveFilename(npath.fromPortablePath(request), makeFakeModule(npath.fromPortablePath(issuer)), false, {plugnplay: false}); } function isPathIgnored(path) { if (ignorePattern === null) @@ -29969,9 +29035,9 @@ function makeApi(runtimeState, opts) { return false; } } - const VERSIONS = { std: 3, resolveVirtual: 1, getAllLocators: 1 }; + const VERSIONS = {std: 3, resolveVirtual: 1, getAllLocators: 1}; const topLevel = topLevelLocator; - function getPackageInformation({ name, reference }) { + function getPackageInformation({name, reference}) { const packageInformationStore = packageRegistry.get(name); if (!packageInformationStore) return null; @@ -29980,7 +29046,7 @@ function makeApi(runtimeState, opts) { return null; return packageInformation; } - function findPackageDependents({ name, reference }) { + function findPackageDependents({name, reference}) { const dependents = []; for (const [dependentName, packageInformationStore] of packageRegistry) { if (dependentName === null) @@ -30002,8 +29068,8 @@ function makeApi(runtimeState, opts) { return dependents; } function findBrokenPeerDependencies(dependency, initialPackage) { - const brokenPackages = /* @__PURE__ */ new Map(); - const alreadyVisited = /* @__PURE__ */ new Set(); + const brokenPackages = new Map(); + const alreadyVisited = new Set(); const traversal = (currentPackage) => { const identifier = JSON.stringify(currentPackage.name); if (alreadyVisited.has(identifier)) @@ -30017,7 +29083,7 @@ function makeApi(runtimeState, opts) { } else { let brokenSet = brokenPackages.get(dependent.name); if (typeof brokenSet === `undefined`) - brokenPackages.set(dependent.name, brokenSet = /* @__PURE__ */ new Set()); + brokenPackages.set(dependent.name, brokenSet = new Set()); brokenSet.add(dependent.reference); } } @@ -30026,10 +29092,10 @@ function makeApi(runtimeState, opts) { const brokenList = []; for (const name of [...brokenPackages.keys()].sort()) for (const reference of [...brokenPackages.get(name)].sort()) - brokenList.push({ name, reference }); + brokenList.push({name, reference}); return brokenList; } - function findPackageLocator(location, { resolveIgnored = false, includeDiscardFromLookup = false } = {}) { + function findPackageLocator(location, {resolveIgnored = false, includeDiscardFromLookup = false} = {}) { if (isPathIgnored(location) && !resolveIgnored) return null; let relativeLocation = ppath.relative(runtimeState.basePath, location); @@ -30047,18 +29113,7 @@ function makeApi(runtimeState, opts) { } while (relativeLocation !== ``); return null; } - function tryReadFile(filePath) { - try { - return opts.fakeFs.readFileSync(npath.toPortablePath(filePath), `utf8`); - } catch (err) { - if (err.code === `ENOENT`) - return void 0; - throw err; - } - } - function resolveToUnqualified(request, issuer, { considerBuiltins = true } = {}) { - if (request.startsWith(`#`)) - throw new Error(`resolveToUnqualified can not handle private import mappings`); + function resolveToUnqualified(request, issuer, {considerBuiltins = true} = {}) { if (request === `pnpapi`) return npath.toPortablePath(opts.pnpapiResolution); if (considerBuiltins && isBuiltinModule(request)) @@ -30069,15 +29124,11 @@ function makeApi(runtimeState, opts) { if (!ppath.isAbsolute(request) || findPackageLocator(request) === null) { const result = callNativeResolution(request, issuer); if (result === false) { - throw makeError( - ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, - `The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp) + throw makeError(ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, `The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp) Require request: "${requestForDisplay}" Required by: ${issuerForDisplay} -`, - { request: requestForDisplay, issuer: issuerForDisplay } - ); +`, {request: requestForDisplay, issuer: issuerForDisplay}); } return npath.toPortablePath(result); } @@ -30089,11 +29140,7 @@ Required by: ${issuerForDisplay} unqualifiedPath = ppath.normalize(request); } else { if (!issuer) { - throw makeError( - ErrorCode.API_ERROR, - `The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute`, - { request: requestForDisplay, issuer: issuerForDisplay } - ); + throw makeError(ErrorCode.API_ERROR, `The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute`, {request: requestForDisplay, issuer: issuerForDisplay}); } const absoluteIssuer = ppath.resolve(issuer); if (issuer.match(isDirRegExp)) { @@ -30104,26 +29151,18 @@ Required by: ${issuerForDisplay} } } else { if (!issuer) { - throw makeError( - ErrorCode.API_ERROR, - `The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute`, - { request: requestForDisplay, issuer: issuerForDisplay } - ); + throw makeError(ErrorCode.API_ERROR, `The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute`, {request: requestForDisplay, issuer: issuerForDisplay}); } const [, dependencyName, subPath] = dependencyNameMatch; const issuerLocator = findPackageLocator(issuer); if (!issuerLocator) { const result = callNativeResolution(request, issuer); if (result === false) { - throw makeError( - ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, - `The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree). + throw makeError(ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, `The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree). Require path: "${requestForDisplay}" Required by: ${issuerForDisplay} -`, - { request: requestForDisplay, issuer: issuerForDisplay } - ); +`, {request: requestForDisplay, issuer: issuerForDisplay}); } return npath.toPortablePath(result); } @@ -30160,88 +29199,60 @@ Required by: ${issuerForDisplay} let error = null; if (dependencyReference === null) { if (isDependencyTreeRoot(issuerLocator)) { - error = makeError( - ErrorCode.MISSING_PEER_DEPENDENCY, - `Your application tried to access ${dependencyName} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed. + error = makeError(ErrorCode.MISSING_PEER_DEPENDENCY, `Your application tried to access ${dependencyName} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed. Required package: ${dependencyName}${dependencyName !== requestForDisplay ? ` (via "${requestForDisplay}")` : ``} Required by: ${issuerForDisplay} -`, - { request: requestForDisplay, issuer: issuerForDisplay, dependencyName } - ); +`, {request: requestForDisplay, issuer: issuerForDisplay, dependencyName}); } else { const brokenAncestors = findBrokenPeerDependencies(dependencyName, issuerLocator); if (brokenAncestors.every((ancestor) => isDependencyTreeRoot(ancestor))) { - error = makeError( - ErrorCode.MISSING_PEER_DEPENDENCY, - `${issuerLocator.name} tried to access ${dependencyName} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound. + error = makeError(ErrorCode.MISSING_PEER_DEPENDENCY, `${issuerLocator.name} tried to access ${dependencyName} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound. Required package: ${dependencyName}${dependencyName !== requestForDisplay ? ` (via "${requestForDisplay}")` : ``} Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDisplay}) ${brokenAncestors.map((ancestorLocator) => `Ancestor breaking the chain: ${ancestorLocator.name}@${ancestorLocator.reference} `).join(``)} -`, - { request: requestForDisplay, issuer: issuerForDisplay, issuerLocator: Object.assign({}, issuerLocator), dependencyName, brokenAncestors } - ); +`, {request: requestForDisplay, issuer: issuerForDisplay, issuerLocator: Object.assign({}, issuerLocator), dependencyName, brokenAncestors}); } else { - error = makeError( - ErrorCode.MISSING_PEER_DEPENDENCY, - `${issuerLocator.name} tried to access ${dependencyName} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound. + error = makeError(ErrorCode.MISSING_PEER_DEPENDENCY, `${issuerLocator.name} tried to access ${dependencyName} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound. Required package: ${dependencyName}${dependencyName !== requestForDisplay ? ` (via "${requestForDisplay}")` : ``} Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDisplay}) ${brokenAncestors.map((ancestorLocator) => `Ancestor breaking the chain: ${ancestorLocator.name}@${ancestorLocator.reference} `).join(``)} -`, - { request: requestForDisplay, issuer: issuerForDisplay, issuerLocator: Object.assign({}, issuerLocator), dependencyName, brokenAncestors } - ); +`, {request: requestForDisplay, issuer: issuerForDisplay, issuerLocator: Object.assign({}, issuerLocator), dependencyName, brokenAncestors}); } } } else if (dependencyReference === void 0) { if (!considerBuiltins && isBuiltinModule(request)) { if (isDependencyTreeRoot(issuerLocator)) { - error = makeError( - ErrorCode.UNDECLARED_DEPENDENCY, - `Your application tried to access ${dependencyName}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${dependencyName} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound. + error = makeError(ErrorCode.UNDECLARED_DEPENDENCY, `Your application tried to access ${dependencyName}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${dependencyName} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound. Required package: ${dependencyName}${dependencyName !== requestForDisplay ? ` (via "${requestForDisplay}")` : ``} Required by: ${issuerForDisplay} -`, - { request: requestForDisplay, issuer: issuerForDisplay, dependencyName } - ); +`, {request: requestForDisplay, issuer: issuerForDisplay, dependencyName}); } else { - error = makeError( - ErrorCode.UNDECLARED_DEPENDENCY, - `${issuerLocator.name} tried to access ${dependencyName}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${dependencyName} isn't otherwise declared in ${issuerLocator.name}'s dependencies, this makes the require call ambiguous and unsound. + error = makeError(ErrorCode.UNDECLARED_DEPENDENCY, `${issuerLocator.name} tried to access ${dependencyName}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${dependencyName} isn't otherwise declared in ${issuerLocator.name}'s dependencies, this makes the require call ambiguous and unsound. Required package: ${dependencyName}${dependencyName !== requestForDisplay ? ` (via "${requestForDisplay}")` : ``} Required by: ${issuerForDisplay} -`, - { request: requestForDisplay, issuer: issuerForDisplay, issuerLocator: Object.assign({}, issuerLocator), dependencyName } - ); +`, {request: requestForDisplay, issuer: issuerForDisplay, issuerLocator: Object.assign({}, issuerLocator), dependencyName}); } } else { if (isDependencyTreeRoot(issuerLocator)) { - error = makeError( - ErrorCode.UNDECLARED_DEPENDENCY, - `Your application tried to access ${dependencyName}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound. + error = makeError(ErrorCode.UNDECLARED_DEPENDENCY, `Your application tried to access ${dependencyName}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound. Required package: ${dependencyName}${dependencyName !== requestForDisplay ? ` (via "${requestForDisplay}")` : ``} Required by: ${issuerForDisplay} -`, - { request: requestForDisplay, issuer: issuerForDisplay, dependencyName } - ); +`, {request: requestForDisplay, issuer: issuerForDisplay, dependencyName}); } else { - error = makeError( - ErrorCode.UNDECLARED_DEPENDENCY, - `${issuerLocator.name} tried to access ${dependencyName}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound. + error = makeError(ErrorCode.UNDECLARED_DEPENDENCY, `${issuerLocator.name} tried to access ${dependencyName}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound. Required package: ${dependencyName}${dependencyName !== requestForDisplay ? ` (via "${requestForDisplay}")` : ``} Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDisplay}) -`, - { request: requestForDisplay, issuer: issuerForDisplay, issuerLocator: Object.assign({}, issuerLocator), dependencyName } - ); +`, {request: requestForDisplay, issuer: issuerForDisplay, issuerLocator: Object.assign({}, issuerLocator), dependencyName}); } } } @@ -30256,18 +29267,14 @@ Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDi process.emitWarning(error); } } - const dependencyLocator = Array.isArray(dependencyReference) ? { name: dependencyReference[0], reference: dependencyReference[1] } : { name: dependencyName, reference: dependencyReference }; + const dependencyLocator = Array.isArray(dependencyReference) ? {name: dependencyReference[0], reference: dependencyReference[1]} : {name: dependencyName, reference: dependencyReference}; const dependencyInformation = getPackageInformationSafe(dependencyLocator); if (!dependencyInformation.packageLocation) { - throw makeError( - ErrorCode.MISSING_DEPENDENCY, - `A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod. + throw makeError(ErrorCode.MISSING_DEPENDENCY, `A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod. Required package: ${dependencyLocator.name}@${dependencyLocator.reference}${dependencyLocator.name !== requestForDisplay ? ` (via "${requestForDisplay}")` : ``} Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDisplay}) -`, - { request: requestForDisplay, issuer: issuerForDisplay, dependencyLocator: Object.assign({}, dependencyLocator) } - ); +`, {request: requestForDisplay, issuer: issuerForDisplay, dependencyLocator: Object.assign({}, dependencyLocator)}); } const dependencyLocation = dependencyInformation.packageLocation; if (subPath) { @@ -30288,18 +29295,17 @@ Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDi return unqualifiedPath; } } - function resolveUnqualified(unqualifiedPath, { extensions = Object.keys(require$$0.Module._extensions) } = {}) { + function resolveUnqualified(unqualifiedPath, {extensions = Object.keys(require$$0.Module._extensions)} = {}) { var _a, _b; const candidates = []; - const qualifiedPath = applyNodeExtensionResolution(unqualifiedPath, candidates, { extensions }); + const qualifiedPath = applyNodeExtensionResolution(unqualifiedPath, candidates, {extensions}); if (qualifiedPath) { return ppath.normalize(qualifiedPath); } else { - reportRequiredFilesToWatchMode(candidates.map((candidate) => npath.fromPortablePath(candidate))); const unqualifiedPathForDisplay = getPathForDisplay(unqualifiedPath); const containingPackage = findPackageLocator(unqualifiedPath); if (containingPackage) { - const { packageLocation } = getPackageInformationSafe(containingPackage); + const {packageLocation} = getPackageInformationSafe(containingPackage); let exists = true; try { opts.fakeFs.accessSync(packageLocation); @@ -30312,67 +29318,38 @@ Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDi Missing package: ${containingPackage.name}@${containingPackage.reference} Expected package location: ${getPathForDisplay(packageLocation)} -`, { unqualifiedPath: unqualifiedPathForDisplay, extensions }); +`, {unqualifiedPath: unqualifiedPathForDisplay, extensions}); } } if (!exists) { const errorMessage = packageLocation.includes(`/unplugged/`) ? `Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).` : `Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.`; - throw makeError( - ErrorCode.QUALIFIED_PATH_RESOLUTION_FAILED, - `${errorMessage} + throw makeError(ErrorCode.QUALIFIED_PATH_RESOLUTION_FAILED, `${errorMessage} Missing package: ${containingPackage.name}@${containingPackage.reference} Expected package location: ${getPathForDisplay(packageLocation)} -`, - { unqualifiedPath: unqualifiedPathForDisplay, extensions } - ); +`, {unqualifiedPath: unqualifiedPathForDisplay, extensions}); } } - throw makeError( - ErrorCode.QUALIFIED_PATH_RESOLUTION_FAILED, - `Qualified path resolution failed: we looked for the following paths, but none could be accessed. + throw makeError(ErrorCode.QUALIFIED_PATH_RESOLUTION_FAILED, `Qualified path resolution failed: we looked for the following paths, but none could be accessed. Source path: ${unqualifiedPathForDisplay} ${candidates.map((candidate) => `Not found: ${getPathForDisplay(candidate)} -`).join(``)}`, - { unqualifiedPath: unqualifiedPathForDisplay, extensions } - ); +`).join(``)}`, {unqualifiedPath: unqualifiedPathForDisplay, extensions}); } } - function resolvePrivateRequest(request, issuer, opts2) { - var _a; - if (!issuer) - throw new Error(`Assertion failed: An issuer is required to resolve private import mappings`); - const resolved = packageImportsResolve({ - name: request, - base: url.pathToFileURL(npath.fromPortablePath(issuer)), - conditions: (_a = opts2.conditions) != null ? _a : defaultExportsConditions, - readFileSyncFn: tryReadFile - }); - if (resolved instanceof URL) { - return resolveUnqualified(npath.toPortablePath(url.fileURLToPath(resolved)), { extensions: opts2.extensions }); - } else { - if (resolved.startsWith(`#`)) - throw new Error(`Mapping from one private import to another isn't allowed`); - return resolveRequest(resolved, issuer, opts2); - } - } - function resolveRequest(request, issuer, opts2 = {}) { + function resolveRequest(request, issuer, {considerBuiltins, extensions, conditions} = {}) { try { - if (request.startsWith(`#`)) - return resolvePrivateRequest(request, issuer, opts2); - const { considerBuiltins, extensions, conditions } = opts2; - const unqualifiedPath = resolveToUnqualified(request, issuer, { considerBuiltins }); + const unqualifiedPath = resolveToUnqualified(request, issuer, {considerBuiltins}); if (request === `pnpapi`) return unqualifiedPath; if (unqualifiedPath === null) return null; const isIssuerIgnored = () => issuer !== null ? isPathIgnored(issuer) : false; const remappedPath = (!considerBuiltins || !isBuiltinModule(request)) && !isIssuerIgnored() ? resolveUnqualifiedExport(request, unqualifiedPath, conditions) : unqualifiedPath; - return resolveUnqualified(remappedPath, { extensions }); + return resolveUnqualified(remappedPath, {extensions}); } catch (error) { if (Object.prototype.hasOwnProperty.call(error, `pnpCode`)) - Object.assign(error.data, { request: getPathForDisplay(request), issuer: issuer && getPathForDisplay(issuer) }); + Object.assign(error.data, {request: getPathForDisplay(request), issuer: issuer && getPathForDisplay(issuer)}); throw error; } } @@ -30386,9 +29363,9 @@ ${candidates.map((candidate) => `Not found: ${getPathForDisplay(candidate)} topLevel, getLocator: (name, referencish) => { if (Array.isArray(referencish)) { - return { name: referencish[0], reference: referencish[1] }; + return {name: referencish[0], reference: referencish[1]}; } else { - return { name, reference: referencish }; + return {name, reference: referencish}; } }, getDependencyTreeRoots: () => { @@ -30399,7 +29376,7 @@ ${candidates.map((candidate) => `Not found: ${getPathForDisplay(candidate)} for (const [name, entry] of packageRegistry) for (const reference of entry.keys()) if (name !== null && reference !== null) - locators.push({ name, reference }); + locators.push({name, reference}); return locators; }, getPackageInformation: (locator) => { @@ -30407,7 +29384,7 @@ ${candidates.map((candidate) => `Not found: ${getPathForDisplay(candidate)} if (info === null) return null; const packageLocation = npath.fromPortablePath(info.packageLocation); - const nativeInfo = { ...info, packageLocation }; + const nativeInfo = __spreadProps(__spreadValues$1({}, info), {packageLocation}); return nativeInfo; }, findPackageLocator: (path) => { @@ -30444,7 +29421,7 @@ ${candidates.map((candidate) => `Not found: ${getPathForDisplay(candidate)} function makeManager(pnpapi, opts) { const initialApiPath = npath.toPortablePath(pnpapi.resolveToUnqualified(`pnpapi`, null)); const initialApiStats = opts.fakeFs.statSync(npath.toPortablePath(initialApiPath)); - const apiMetadata = /* @__PURE__ */ new Map([ + const apiMetadata = new Map([ [initialApiPath, { cache: require$$0.Module._cache, instance: pnpapi, @@ -30486,7 +29463,7 @@ function makeManager(pnpapi, opts) { } return apiEntry; } - const findApiPathCache = /* @__PURE__ */ new Map(); + const findApiPathCache = new Map(); function addToCacheAndReturn(start, end, target) { if (target !== null) target = VirtualFS.resolveVirtual(target); @@ -30511,11 +29488,11 @@ function makeManager(pnpapi, opts) { if (!packageInformation) throw new Error(`Assertion failed: Couldn't get package information for '${modulePath}'`); if (!bestCandidate) - bestCandidate = { packageLocation: packageInformation.packageLocation, apiPaths: [] }; + bestCandidate = {packageLocation: packageInformation.packageLocation, apiPaths: []}; if (packageInformation.packageLocation === bestCandidate.packageLocation) { bestCandidate.apiPaths.push(apiPath); } else if (packageInformation.packageLocation.length > bestCandidate.packageLocation.length) { - bestCandidate = { packageLocation: packageInformation.packageLocation, apiPaths: [apiPath] }; + bestCandidate = {packageLocation: packageInformation.packageLocation, apiPaths: [apiPath]}; } } if (bestCandidate) { @@ -30569,7 +29546,35 @@ ${controlSegment} }; } -const localFs = { ...fs__default.default }; +var __defProp = Object.defineProperty; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value; +var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; +}; +var __objRest = (source, exclude) => { + var target = {}; + for (var prop in source) + if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) + target[prop] = source[prop]; + if (source != null && __getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(source)) { + if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) + target[prop] = source[prop]; + } + return target; +}; +const localFs = __spreadValues({}, fs__default.default); const nodeFs = new NodeFS(localFs); const defaultRuntimeState = $$SETUP_STATE(hydrateRuntimeState); const defaultPnpapiResolution = __filename; @@ -30599,18 +29604,21 @@ const defaultApi = Object.assign(makeApi(defaultRuntimeState, { fakeFs: dynamicFsLayer, pnpapiResolution: defaultPnpapiResolution }), { - makeApi: ({ - basePath = void 0, - fakeFs = dynamicFsLayer, - pnpapiResolution = defaultPnpapiResolution, - ...rest - }) => { + makeApi: (_a) => { + var _b = _a, { + basePath = void 0, + fakeFs = dynamicFsLayer, + pnpapiResolution = defaultPnpapiResolution + } = _b, rest = __objRest(_b, [ + "basePath", + "fakeFs", + "pnpapiResolution" + ]); const apiRuntimeState = typeof basePath !== `undefined` ? $$SETUP_STATE(hydrateRuntimeState, basePath) : defaultRuntimeState; - return makeApi(apiRuntimeState, { + return makeApi(apiRuntimeState, __spreadValues({ fakeFs, - pnpapiResolution, - ...rest - }); + pnpapiResolution + }, rest)); }, setup: (api) => { applyPatch(api || defaultApi, { @@ -30631,7 +29639,7 @@ if (module.parent && module.parent.id === `internal/preload`) { } if (process.mainModule === module) { const reportError = (code, message, data) => { - process.stdout.write(`${JSON.stringify([{ code, message, data }, null])} + process.stdout.write(`${JSON.stringify([{code, message, data}, null])} `); }; const reportSuccess = (resolution) => { diff --git a/package.json b/package.json index 806f440..1a1cb44 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "@types/chrome": "^0.0.227", "@types/jest": "^29.5.0", "@types/node": "^18.14.6", - "@types/react": "^18.0.0", + "@types/react": "^18.0.31", "@types/react-dom": "^18.0.11", "@types/testing-library__jest-dom": "^5.14.5", "@types/three": "^0.149.0", diff --git a/yarn.lock b/yarn.lock index dcbcfd7..9e91b77 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3623,7 +3623,7 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:*, @types/react@npm:^18.0.0": +"@types/react@npm:*": version: 18.0.28 resolution: "@types/react@npm:18.0.28" dependencies: @@ -3634,6 +3634,17 @@ __metadata: languageName: node linkType: hard +"@types/react@npm:^18.0.31": + version: 18.0.31 + resolution: "@types/react@npm:18.0.31" + dependencies: + "@types/prop-types": "*" + "@types/scheduler": "*" + csstype: ^3.0.2 + checksum: 6befbd5587e266905b50fd6bbd7c1cacd557bddf99e6a9862ca2f1d06df3dca71b9d485a37d010479730f021aab93b852d417c714de5efc2f41be0ff4c09b4db + languageName: node + linkType: hard + "@types/resolve@npm:1.17.1": version: 1.17.1 resolution: "@types/resolve@npm:1.17.1" @@ -6177,7 +6188,7 @@ __metadata: "@types/chrome": ^0.0.227 "@types/jest": ^29.5.0 "@types/node": ^18.14.6 - "@types/react": ^18.0.0 + "@types/react": ^18.0.31 "@types/react-dom": ^18.0.11 "@types/testing-library__jest-dom": ^5.14.5 "@types/three": ^0.149.0 @@ -7546,7 +7557,7 @@ __metadata: "fsevents@patch:fsevents@2.3.2#~builtin, fsevents@patch:fsevents@^2.3.2#~builtin, fsevents@patch:fsevents@~2.3.2#~builtin": version: 2.3.2 - resolution: "fsevents@patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1" + resolution: "fsevents@patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=18f3a7" dependencies: node-gyp: latest conditions: os=darwin @@ -12388,7 +12399,7 @@ __metadata: "resolve@patch:resolve@^1.1.7#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin": version: 1.22.1 - resolution: "resolve@patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=c3c19d" + resolution: "resolve@patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b" dependencies: is-core-module: ^2.9.0 path-parse: ^1.0.7 @@ -12401,7 +12412,7 @@ __metadata: "resolve@patch:resolve@^2.0.0-next.4#~builtin": version: 2.0.0-next.4 - resolution: "resolve@patch:resolve@npm%3A2.0.0-next.4#~builtin::version=2.0.0-next.4&hash=c3c19d" + resolution: "resolve@patch:resolve@npm%3A2.0.0-next.4#~builtin::version=2.0.0-next.4&hash=07638b" dependencies: is-core-module: ^2.9.0 path-parse: ^1.0.7 @@ -13851,11 +13862,11 @@ __metadata: "typescript@patch:typescript@^4.4.2#~builtin": version: 4.9.5 - resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76" + resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=a1c5e5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: ab417a2f398380c90a6cf5a5f74badd17866adf57f1165617d6a551f059c3ba0a3e4da0d147b3ac5681db9ac76a303c5876394b13b3de75fdd5b1eaa06181c9d + checksum: 2eee5c37cad4390385db5db5a8e81470e42e8f1401b0358d7390095d6f681b410f2c4a0c496c6ff9ebd775423c7785cdace7bcdad76c7bee283df3d9718c0f20 languageName: node linkType: hard