make-mp-data 2.0.14 → 2.0.15
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/index.js +3 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -67,7 +67,7 @@ async function main(config) {
|
|
|
67
67
|
jobTimer.start();
|
|
68
68
|
|
|
69
69
|
//cli mode check for positional dungeon config
|
|
70
|
-
const isCLI =
|
|
70
|
+
const isCLI = process.argv[1] === fileURLToPath(import.meta.url);
|
|
71
71
|
if (isCLI) {
|
|
72
72
|
const firstArg = config._.slice().pop()
|
|
73
73
|
if (firstArg?.endsWith('.js') && existsSync(firstArg)) {
|
|
@@ -466,7 +466,8 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
|
466
466
|
}
|
|
467
467
|
|
|
468
468
|
// CLI execution - check if this file is being run directly
|
|
469
|
-
|
|
469
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
470
|
+
if (process.argv[1] === __filename) {
|
|
470
471
|
(async () => {
|
|
471
472
|
const cliConfig = getCliParams();
|
|
472
473
|
|