falak-app-duo 1.1.3 → 1.1.4

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/bin/falak-app-duo +15 -1
  2. package/package.json +1 -1
package/bin/falak-app-duo CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import path from "node:path";
3
+ import { realpathSync } from "node:fs";
3
4
  import { fileURLToPath } from "node:url";
4
5
  import { spawn } from "node:child_process";
5
6
  import fs from "fs-extra";
@@ -295,7 +296,20 @@ async function main() {
295
296
  await runInProject(targetDir, "npm", ["run", "dev"]).catch(() => {});
296
297
  }
297
298
 
298
- if (process.argv[1] && path.resolve(fileURLToPath(import.meta.url)) === path.resolve(process.argv[1])) {
299
+ function isMain() {
300
+ const argv1 = process.argv[1];
301
+ if (!argv1) return false;
302
+ try {
303
+ // Resolve symlinks on both sides: npx/npm exec spawn the bin through the
304
+ // `node_modules/.bin/<name>` symlink, so a raw `argv[1] === import.meta.url`
305
+ // comparison would silently skip main() when run via npx.
306
+ return realpathSync(argv1) === fileURLToPath(import.meta.url);
307
+ } catch {
308
+ return false;
309
+ }
310
+ }
311
+
312
+ if (isMain()) {
299
313
  main().catch((err) => {
300
314
  console.error(chalk.red(err));
301
315
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "falak-app-duo",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Vue 3 boilerplate scaffolder — Ably (realtime), Brevo, AES-256, Arabic/RTL, and a Laravel API client (API key + user token auth). No Firebase, no Groq/Paymob on the frontend (Groq is backend-only; Paymob dropped).",
5
5
  "type": "module",
6
6
  "bin": {