skillwatch 0.1.2 → 0.1.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/dist/cli.js +3 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { execFileSync } from "node:child_process";
|
|
3
|
-
import { existsSync } from "node:fs";
|
|
3
|
+
import { existsSync, realpathSync } from "node:fs";
|
|
4
4
|
import { copyFile, mkdir, rm, writeFile } from "node:fs/promises";
|
|
5
5
|
import { homedir } from "node:os";
|
|
6
6
|
import { dirname, join, resolve } from "node:path";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
//#region src/cli.ts
|
|
9
9
|
const PACKAGE_NAME = "skillwatch";
|
|
10
|
-
const PACKAGE_VERSION = "0.1.
|
|
10
|
+
const PACKAGE_VERSION = "0.1.3";
|
|
11
11
|
const ENTRYPOINT_PATH = fileURLToPath(import.meta.url);
|
|
12
12
|
const CHECKER_SOURCE_PATH = join(dirname(ENTRYPOINT_PATH), "checker.js");
|
|
13
13
|
const COMMAND_NAME = PACKAGE_NAME.split("/").at(-1) ?? "skillwatch";
|
|
@@ -234,7 +234,7 @@ const main = async () => {
|
|
|
234
234
|
};
|
|
235
235
|
const isExecutedDirectly = () => {
|
|
236
236
|
const [, entryArg] = process.argv;
|
|
237
|
-
return entryArg !== void 0 && resolve(entryArg) === ENTRYPOINT_PATH;
|
|
237
|
+
return entryArg !== void 0 && realpathSync(resolve(entryArg)) === ENTRYPOINT_PATH;
|
|
238
238
|
};
|
|
239
239
|
if (isExecutedDirectly()) try {
|
|
240
240
|
await main();
|