@guanwenai/high-tech-project-cli 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guanwenai/high-tech-project-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Gateway-only CLI for Chinese high-tech enterprise project declarations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { randomUUID } from 'node:crypto';
4
- import { resolve } from 'node:path';
4
+ import { realpathSync } from 'node:fs';
5
+ import { resolve } from 'node:path';
5
6
  import { pathToFileURL } from 'node:url';
6
7
 
7
8
  import { parseArguments } from './cli/arguments.mjs';
@@ -266,7 +267,9 @@ export async function main(argv = process.argv.slice(2)) {
266
267
  process.exitCode = result.exitCode;
267
268
  }
268
269
 
269
- const invokedPath = process.argv[1] ? pathToFileURL(resolve(process.argv[1])).href : '';
270
- if (invokedPath === import.meta.url) {
270
+ const invokedPath = process.argv[1]
271
+ ? pathToFileURL(realpathSync(resolve(process.argv[1]))).href
272
+ : '';
273
+ if (invokedPath === import.meta.url) {
271
274
  await main();
272
275
  }