create-shopify-firebase-app 2.0.4 → 2.0.6

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/lib/index.js CHANGED
@@ -147,8 +147,13 @@ function parseArgs(argv) {
147
147
  for (let i = 0; i < argv.length; i++) {
148
148
  const arg = argv[i];
149
149
  if (arg.startsWith("--")) {
150
- const [key, val] = arg.slice(2).split("=");
151
- args[key] = val ?? true;
150
+ const raw = arg.slice(2);
151
+ const eq = raw.indexOf("=");
152
+ if (eq >= 0) {
153
+ args[raw.slice(0, eq)] = raw.slice(eq + 1);
154
+ } else {
155
+ args[raw] = true;
156
+ }
152
157
  } else if (arg.startsWith("-") && arg.length > 1) {
153
158
  for (const ch of arg.slice(1)) args[ch] = true;
154
159
  } else if (!projectName) {
@@ -647,8 +652,6 @@ export async function run(argv) {
647
652
  }
648
653
 
649
654
  // ── Create / Link app via Shopify CLI ──────────────────────
650
- // Must `cd` into project dir — Shopify CLI uses process.cwd(),
651
- // not spawn's cwd option, for TOML generation.
652
655
  console.log();
653
656
  if (shopifyAction === "create") {
654
657
  info(`Creating a new Shopify app: ${c.cyan}${appName}${c.reset}`);
@@ -658,16 +661,12 @@ export async function run(argv) {
658
661
  }
659
662
  console.log();
660
663
 
661
- // Use `cd` to ensure Shopify CLI writes files in the project directory
662
- const cdCmd = process.platform === "win32"
663
- ? `cd /d "${outputDir}" && shopify app config link`
664
- : `cd "${outputDir}" && shopify app config link`;
665
-
664
+ // Use --path flag so Shopify CLI reads/writes config in the project dir,
665
+ // and pass cwd to ensure process.cwd() matches.
666
666
  try {
667
- await execInteractive(cdCmd);
667
+ await execInteractive(`shopify app config link --path "${outputDir}"`, outputDir);
668
668
  } catch {
669
669
  // Shopify CLI may exit non-zero even after creating/linking the app
670
- // (e.g. "directory doesn't have a package.json" warning)
671
670
  warn("Shopify CLI exited with a warning");
672
671
  }
673
672
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-shopify-firebase-app",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "Create Shopify apps powered by Firebase — multi-page dashboard, App Bridge, Polaris components, TypeScript or JavaScript. Deploy for free.",
5
5
  "keywords": [
6
6
  "shopify",
@@ -17,6 +17,7 @@ const DEFAULT_SETTINGS = {
17
17
  greeting: "Welcome to our app!",
18
18
  theme: "auto",
19
19
  notifications: true,
20
+ orderAlerts: false,
20
21
  customCss: "",
21
22
  };
22
23
 
@@ -17,6 +17,7 @@ const DEFAULT_SETTINGS = {
17
17
  greeting: "Welcome to our app!",
18
18
  theme: "auto",
19
19
  notifications: true,
20
+ orderAlerts: false,
20
21
  customCss: "",
21
22
  };
22
23