@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.
Files changed (2) hide show
  1. package/build.js +13 -1
  2. package/package.json +1 -1
package/build.js CHANGED
@@ -544,7 +544,19 @@ async function main() {
544
544
  }
545
545
  }
546
546
 
547
- const isEntrypoint = import.meta.url === pathToFileURL(process.argv[1] || "").href;
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)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crafter8/sdk",
3
- "version": "0.1.0-next.2",
3
+ "version": "0.1.0-next.3",
4
4
  "description": "Crafter8 artifact SDK for code-first app, module, and datapack declarations.",
5
5
  "license": "MIT",
6
6
  "type": "module",