cmx-sdk 0.2.11 → 0.2.12

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.
@@ -30,12 +30,13 @@ async function addStudio() {
30
30
  console.error(" \u518D\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3059\u308B\u5834\u5408\u306F\u5148\u306B\u524A\u9664\u3057\u3066\u304F\u3060\u3055\u3044\n");
31
31
  process.exit(1);
32
32
  }
33
- config({ path: join(projectRoot, ".env") });
33
+ const envFile = existsSync(join(projectRoot, ".env.local")) ? join(projectRoot, ".env.local") : join(projectRoot, ".env");
34
+ config({ path: envFile });
34
35
  const apiUrl = process.env.CMX_API_URL;
35
36
  const apiKey = process.env.CMX_API_KEY;
36
37
  if (!apiUrl || !apiKey) {
37
38
  console.error(" \u274C CMX_API_URL \u3068 CMX_API_KEY \u304C\u5FC5\u8981\u3067\u3059");
38
- console.error(" .env \u306B\u8A8D\u8A3C\u60C5\u5831\u3092\u8A2D\u5B9A\u3057\u3066\u304B\u3089\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\n");
39
+ console.error(" .env.local \u306B\u8A8D\u8A3C\u60C5\u5831\u3092\u8A2D\u5B9A\u3057\u3066\u304B\u3089\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\n");
39
40
  process.exit(1);
40
41
  }
41
42
  console.log(" \u23F3 Studio \u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u4E2D...");
package/dist/cli.js CHANGED
@@ -4413,15 +4413,15 @@ function requireApiCredentials() {
4413
4413
  return { apiUrl, apiKey };
4414
4414
  }
4415
4415
  program.action(async () => {
4416
- const { interactiveMenu } = await import("./interactive-menu-PYMJB5LY.js");
4416
+ const { interactiveMenu } = await import("./interactive-menu-5NJTB5LJ.js");
4417
4417
  await interactiveMenu();
4418
4418
  });
4419
4419
  program.command("init [project-name]").description("\u65B0\u3057\u3044 CMX \u30B5\u30A4\u30C8\u3092\u4F5C\u6210").option("--no-studio", "CMX Studio \u3092\u30B9\u30AD\u30C3\u30D7").option("--pm <manager>", "\u30D1\u30C3\u30B1\u30FC\u30B8\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC (npm, pnpm, yarn)").option("--key <key>", "CMX API \u30AD\u30FC\uFF08\u5FC5\u9808\u3002\u672A\u6307\u5B9A\u6642\u306F\u30D7\u30ED\u30F3\u30D7\u30C8\u8868\u793A\uFF09").option("--api-url <url>", "CMX API \u30B5\u30FC\u30D0\u30FC\u306E URL").action(async (projectName, options) => {
4420
- const { init } = await import("./init-FLRQXJX4.js");
4420
+ const { init } = await import("./init-FPFDEEXW.js");
4421
4421
  await init(projectName, options);
4422
4422
  });
4423
4423
  program.command("add-studio").description("\u65E2\u5B58\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306B CMX Studio \u3092\u8FFD\u52A0").action(async () => {
4424
- const { addStudio } = await import("./add-studio-YUDYE2OH.js");
4424
+ const { addStudio } = await import("./add-studio-QWLCCO5M.js");
4425
4425
  await addStudio();
4426
4426
  });
4427
4427
  program.command("update-studio").description("\u65E2\u5B58\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E CMX Studio \u3092\u6700\u65B0\u5316").option("--force", "\u78BA\u8A8D\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u30B9\u30AD\u30C3\u30D7").action((options) => updateStudio(options));
@@ -25,7 +25,7 @@ async function downloadAndExtractViaApi(targetDir, apiUrl, apiKey) {
25
25
  cleanupTempFile(tmpFile);
26
26
  }
27
27
  function writeEnvFile(targetDir, apiUrl, apiKey) {
28
- const envPath = join(targetDir, ".env");
28
+ const envPath = join(targetDir, ".env.local");
29
29
  const envContent = [
30
30
  "# CMX API Configuration (auto-generated by cmx-sdk init)",
31
31
  `CMX_API_URL=${apiUrl}`,
@@ -128,7 +128,7 @@ async function init(projectName, options) {
128
128
  }
129
129
  }
130
130
  writeEnvFile(targetDir, apiUrl, apiKey);
131
- console.log(" \u2713 .env \u306B API \u8A8D\u8A3C\u60C5\u5831\u3092\u66F8\u304D\u8FBC\u307F\u307E\u3057\u305F");
131
+ console.log(" \u2713 .env.local \u306B API \u8A8D\u8A3C\u60C5\u5831\u3092\u66F8\u304D\u8FBC\u307F\u307E\u3057\u305F");
132
132
  console.log(`
133
133
  \u{1F4E6} \u4F9D\u5B58\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u4E2D...`);
134
134
  const installCmd = packageManager === "yarn" ? "yarn" : `${packageManager} install`;
@@ -19,11 +19,11 @@ async function interactiveMenu() {
19
19
  });
20
20
  switch (action) {
21
21
  case "init": {
22
- const { init } = await import("./init-FLRQXJX4.js");
22
+ const { init } = await import("./init-FPFDEEXW.js");
23
23
  return init(void 0, {});
24
24
  }
25
25
  case "add-studio": {
26
- const { addStudio } = await import("./add-studio-YUDYE2OH.js");
26
+ const { addStudio } = await import("./add-studio-QWLCCO5M.js");
27
27
  return addStudio();
28
28
  }
29
29
  case "update-studio": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cmx-sdk",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
4
4
  "description": "CMX SDK - Official SDK for building content-driven websites with CMX",
5
5
  "type": "module",
6
6
  "license": "MIT",