@holo-js/core 0.3.0 → 0.3.2
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.
|
@@ -179,14 +179,18 @@ async function importModule(specifier) {
|
|
|
179
179
|
);
|
|
180
180
|
}
|
|
181
181
|
var runtimeModuleRequire = createRequire(import.meta.url);
|
|
182
|
+
function resolveRuntimeModuleSearchPaths(projectRoot, runtimeModuleUrl = import.meta.url) {
|
|
183
|
+
const runtimeModulePath = normalizeImportTarget(runtimeModuleUrl);
|
|
184
|
+
return runtimeModulePath.includes("/node_modules/@holo-js/core/") ? void 0 : [projectRoot];
|
|
185
|
+
}
|
|
182
186
|
function resolveOptionalImportSpecifier(specifier, projectRoot) {
|
|
183
187
|
if (!projectRoot) {
|
|
184
188
|
return specifier;
|
|
185
189
|
}
|
|
186
190
|
try {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
191
|
+
const paths = resolveRuntimeModuleSearchPaths(projectRoot);
|
|
192
|
+
const resolved = paths ? runtimeModuleRequire.resolve(specifier, { paths: [...paths] }) : runtimeModuleRequire.resolve(specifier);
|
|
193
|
+
return pathToFileURL(resolved).href;
|
|
190
194
|
} catch {
|
|
191
195
|
return specifier;
|
|
192
196
|
}
|
|
@@ -204,6 +208,16 @@ function normalizeImportSpecifier(specifier) {
|
|
|
204
208
|
function normalizeImportTarget(value) {
|
|
205
209
|
return normalizeImportSpecifier(value).replace(/\\/g, "/");
|
|
206
210
|
}
|
|
211
|
+
function resolvePackageRootSpecifier(specifier) {
|
|
212
|
+
if (specifier.startsWith("@")) {
|
|
213
|
+
const [scope, packageName] = specifier.split("/");
|
|
214
|
+
return scope && packageName ? `${scope}/${packageName}` : void 0;
|
|
215
|
+
}
|
|
216
|
+
if (specifier.startsWith(".") || specifier.startsWith("/") || specifier.includes(":")) {
|
|
217
|
+
return void 0;
|
|
218
|
+
}
|
|
219
|
+
return specifier.split("/")[0];
|
|
220
|
+
}
|
|
207
221
|
function matchesRelativeImportTarget(failedTarget, specifier) {
|
|
208
222
|
if (!failedTarget || !specifier.startsWith(".")) {
|
|
209
223
|
return false;
|
|
@@ -223,6 +237,10 @@ function isMissingOptionalModule(error, specifier, resolvedSpecifier) {
|
|
|
223
237
|
normalizeImportTarget(specifier),
|
|
224
238
|
normalizeImportTarget(resolvedSpecifier)
|
|
225
239
|
]);
|
|
240
|
+
const packageRootSpecifier = resolvePackageRootSpecifier(specifier);
|
|
241
|
+
if (packageRootSpecifier) {
|
|
242
|
+
expectedTargets.add(packageRootSpecifier);
|
|
243
|
+
}
|
|
226
244
|
const normalizedFailedTarget = typeof failedTarget === "string" ? normalizeImportTarget(failedTarget) : void 0;
|
|
227
245
|
const matchesRequestedTarget = typeof normalizedFailedTarget === "string" && (expectedTargets.has(normalizedFailedTarget) || matchesRelativeImportTarget(normalizedFailedTarget, specifier));
|
|
228
246
|
return "code" in error && error.code === "ERR_MODULE_NOT_FOUND" && matchesRequestedTarget || message.startsWith("Cannot find package '") && matchesRequestedTarget || message.startsWith("Cannot find module '") && matchesRequestedTarget || message.includes("Does the file exist?") && message.startsWith("Failed to load url ") && matchesRequestedTarget || message.startsWith('Could not resolve "') && matchesRequestedTarget;
|
|
@@ -340,8 +358,10 @@ var runtimeModuleInternals = {
|
|
|
340
358
|
bundleRuntimeModule,
|
|
341
359
|
importModule,
|
|
342
360
|
importOptionalRuntimeModule,
|
|
361
|
+
isMissingOptionalModule,
|
|
343
362
|
loadEsbuild,
|
|
344
363
|
pathExists,
|
|
364
|
+
resolveRuntimeModuleSearchPaths,
|
|
345
365
|
runEsbuild,
|
|
346
366
|
writeLoaderTsconfig
|
|
347
367
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
resolveGeneratedProjectRegistryPath,
|
|
18
18
|
resolveRuntimeConnectionManagerOptions,
|
|
19
19
|
resolveStorageKeyPath
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-34VBLRNF.mjs";
|
|
21
21
|
|
|
22
22
|
// src/adapter.ts
|
|
23
23
|
import { readdir, stat } from "node:fs/promises";
|
package/dist/runtime/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holo-js/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Holo-JS Framework - Portable runtime core",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,28 +33,28 @@
|
|
|
33
33
|
"test": "vitest --run"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@holo-js/config": "^0.3.
|
|
37
|
-
"@holo-js/db": "^0.3.
|
|
38
|
-
"@holo-js/kernel": "^0.3.
|
|
36
|
+
"@holo-js/config": "^0.3.2",
|
|
37
|
+
"@holo-js/db": "^0.3.2",
|
|
38
|
+
"@holo-js/kernel": "^0.3.2",
|
|
39
39
|
"esbuild": "^0.27.4"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@holo-js/auth": "^0.3.
|
|
43
|
-
"@holo-js/auth-clerk": "^0.3.
|
|
44
|
-
"@holo-js/auth-social": "^0.3.
|
|
45
|
-
"@holo-js/auth-workos": "^0.3.
|
|
46
|
-
"@holo-js/authorization": "^0.3.
|
|
47
|
-
"@holo-js/broadcast": "^0.3.
|
|
48
|
-
"@holo-js/cache": "^0.3.
|
|
49
|
-
"@holo-js/events": "^0.3.
|
|
50
|
-
"@holo-js/mail": "^0.3.
|
|
51
|
-
"@holo-js/media": "^0.3.
|
|
52
|
-
"@holo-js/notifications": "^0.3.
|
|
53
|
-
"@holo-js/queue": "^0.3.
|
|
54
|
-
"@holo-js/queue-db": "^0.3.
|
|
55
|
-
"@holo-js/security": "^0.3.
|
|
56
|
-
"@holo-js/session": "^0.3.
|
|
57
|
-
"@holo-js/storage": "^0.3.
|
|
42
|
+
"@holo-js/auth": "^0.3.2",
|
|
43
|
+
"@holo-js/auth-clerk": "^0.3.2",
|
|
44
|
+
"@holo-js/auth-social": "^0.3.2",
|
|
45
|
+
"@holo-js/auth-workos": "^0.3.2",
|
|
46
|
+
"@holo-js/authorization": "^0.3.2",
|
|
47
|
+
"@holo-js/broadcast": "^0.3.2",
|
|
48
|
+
"@holo-js/cache": "^0.3.2",
|
|
49
|
+
"@holo-js/events": "^0.3.2",
|
|
50
|
+
"@holo-js/mail": "^0.3.2",
|
|
51
|
+
"@holo-js/media": "^0.3.2",
|
|
52
|
+
"@holo-js/notifications": "^0.3.2",
|
|
53
|
+
"@holo-js/queue": "^0.3.2",
|
|
54
|
+
"@holo-js/queue-db": "^0.3.2",
|
|
55
|
+
"@holo-js/security": "^0.3.2",
|
|
56
|
+
"@holo-js/session": "^0.3.2",
|
|
57
|
+
"@holo-js/storage": "^0.3.2"
|
|
58
58
|
},
|
|
59
59
|
"peerDependenciesMeta": {
|
|
60
60
|
"@holo-js/auth": {
|
|
@@ -107,15 +107,15 @@
|
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
110
|
-
"@holo-js/auth": "^0.3.
|
|
111
|
-
"@holo-js/auth-social-google": "^0.3.
|
|
112
|
-
"@holo-js/authorization": "^0.3.
|
|
113
|
-
"@holo-js/events": "^0.3.
|
|
114
|
-
"@holo-js/mail": "^0.3.
|
|
115
|
-
"@holo-js/notifications": "^0.3.
|
|
116
|
-
"@holo-js/queue-db": "^0.3.
|
|
117
|
-
"@holo-js/session": "^0.3.
|
|
118
|
-
"@holo-js/storage": "^0.3.
|
|
110
|
+
"@holo-js/auth": "^0.3.2",
|
|
111
|
+
"@holo-js/auth-social-google": "^0.3.2",
|
|
112
|
+
"@holo-js/authorization": "^0.3.2",
|
|
113
|
+
"@holo-js/events": "^0.3.2",
|
|
114
|
+
"@holo-js/mail": "^0.3.2",
|
|
115
|
+
"@holo-js/notifications": "^0.3.2",
|
|
116
|
+
"@holo-js/queue-db": "^0.3.2",
|
|
117
|
+
"@holo-js/session": "^0.3.2",
|
|
118
|
+
"@holo-js/storage": "^0.3.2",
|
|
119
119
|
"@types/node": "^22.10.2",
|
|
120
120
|
"tsup": "^8.3.5",
|
|
121
121
|
"typescript": "^5.7.2",
|