vxrn 1.1.165 → 1.1.166
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/react-native-template.js +12 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxrn",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.166",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"@babel/core": "^7.21.8",
|
|
41
41
|
"@hono/node-server": "^1.11.1",
|
|
42
42
|
"@vitejs/plugin-react-swc": "^3.7.0",
|
|
43
|
-
"@vxrn/react-native-prebuilt": "1.1.
|
|
44
|
-
"@vxrn/safe-area": "1.1.
|
|
45
|
-
"@vxrn/vendor": "1.1.
|
|
46
|
-
"@vxrn/vite-flow": "1.1.
|
|
47
|
-
"@vxrn/vite-native-swc": "1.1.
|
|
43
|
+
"@vxrn/react-native-prebuilt": "1.1.166",
|
|
44
|
+
"@vxrn/safe-area": "1.1.166",
|
|
45
|
+
"@vxrn/vendor": "1.1.166",
|
|
46
|
+
"@vxrn/vite-flow": "1.1.166",
|
|
47
|
+
"@vxrn/vite-native-swc": "1.1.166",
|
|
48
48
|
"citty": "^0.1.6",
|
|
49
49
|
"crossws": "^0.2.4",
|
|
50
50
|
"es-module-lexer": "^1.3.0",
|
package/react-native-template.js
CHANGED
|
@@ -34,19 +34,31 @@ function printError(err) {
|
|
|
34
34
|
return `${err instanceof Error ? `${err.message}\n${err.stack}` : err}`
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
const __runningModules = new Map()
|
|
38
|
+
|
|
37
39
|
function __getRequire(absPath) {
|
|
38
40
|
absPath = ___vxrnAbsoluteToRelative___[absPath] || absPath
|
|
39
41
|
|
|
40
42
|
if (!__cachedModules[absPath]) {
|
|
41
43
|
const runModule = ___modules___[absPath]
|
|
42
44
|
|
|
45
|
+
// do not run again if the module is already running, avoids stack overflow on circular dependencies
|
|
46
|
+
if (__runningModules.has(absPath)) {
|
|
47
|
+
// TODO we can probably print a circular dependency warning for this
|
|
48
|
+
return __runningModules.get(absPath).exports
|
|
49
|
+
}
|
|
50
|
+
|
|
43
51
|
if (runModule) {
|
|
44
52
|
const mod = { exports: {} }
|
|
53
|
+
__runningModules.set(absPath, mod)
|
|
54
|
+
|
|
45
55
|
try {
|
|
46
56
|
runModule(mod.exports, mod)
|
|
47
57
|
} catch (err) {
|
|
48
58
|
console.error(`Error running module: "${absPath}"\n${printError(err)}`)
|
|
49
59
|
return {}
|
|
60
|
+
} finally {
|
|
61
|
+
__runningModules.delete(absPath)
|
|
50
62
|
}
|
|
51
63
|
|
|
52
64
|
__cachedModules[absPath] = mod.exports || mod
|