@amadeus-dlc/setup 0.1.0 → 0.1.1

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/dist/cli.js +13 -4
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/cli.ts
4
- import { readFileSync } from "node:fs";
5
- import { dirname as dirname4, join as join10, resolve as resolve3 } from "node:path";
4
+ import { readFileSync, realpathSync } from "node:fs";
5
+ import { dirname as dirname4, join as join10 } from "node:path";
6
6
  import { fileURLToPath } from "node:url";
7
7
 
8
8
  // src/domain/command.ts
@@ -2239,8 +2239,17 @@ async function runUpgrade(parsed, ports) {
2239
2239
  return 0;
2240
2240
  });
2241
2241
  }
2242
- var isEntryPoint = process.argv[1] !== undefined && resolve3(process.argv[1]) === fileURLToPath(import.meta.url);
2243
- if (isEntryPoint) {
2242
+ function isEntryPoint() {
2243
+ const argv1 = process.argv[1];
2244
+ if (argv1 === undefined)
2245
+ return false;
2246
+ try {
2247
+ return realpathSync(argv1) === realpathSync(fileURLToPath(import.meta.url));
2248
+ } catch {
2249
+ return false;
2250
+ }
2251
+ }
2252
+ if (isEntryPoint()) {
2244
2253
  const exitCode = await main(process.argv.slice(2));
2245
2254
  process.exit(exitCode);
2246
2255
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amadeus-dlc/setup",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Installer CLI for Amadeus-DLC — fetches a tagged Amadeus distribution from GitHub and installs it into your project.",
5
5
  "type": "module",
6
6
  "bin": {