@crafter8/sdk 0.1.0-next.2 → 0.1.0-next.3
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/build.js +13 -1
- package/package.json +1 -1
package/build.js
CHANGED
|
@@ -544,7 +544,19 @@ async function main() {
|
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
|
|
547
|
-
|
|
547
|
+
function resolveArgvEntrypointUrl(argvValue) {
|
|
548
|
+
if (!argvValue) {
|
|
549
|
+
return "";
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
try {
|
|
553
|
+
return pathToFileURL(fs.realpathSync(argvValue)).href;
|
|
554
|
+
} catch {
|
|
555
|
+
return pathToFileURL(path.resolve(argvValue)).href;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
const isEntrypoint = import.meta.url === resolveArgvEntrypointUrl(process.argv[1]);
|
|
548
560
|
if (isEntrypoint) {
|
|
549
561
|
main().catch((error) => {
|
|
550
562
|
console.error(`[crafter8-build] Failed: ${error instanceof Error ? error.message : String(error)}`);
|