@apps-in-toss/cli 0.0.0-dev.1741075274147 → 0.0.0-dev.1741081345454
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/index.cjs +21 -21
- package/dist/index.js +21 -21
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -37579,31 +37579,26 @@ function transformTemplate(templateString, values) {
|
|
|
37579
37579
|
// src/InitCommand.ts
|
|
37580
37580
|
async function setupPnpm(cwd) {
|
|
37581
37581
|
p2.log.step(".npmrc \uD30C\uC77C\uC744 \uC5C5\uB370\uC774\uD2B8\uD558\uB294 \uC911...");
|
|
37582
|
-
|
|
37583
|
-
|
|
37584
|
-
|
|
37585
|
-
|
|
37586
|
-
for (const line of fileContent.split("\n")) {
|
|
37587
|
-
const trimmed = line.trim();
|
|
37588
|
-
if (trimmed && !trimmed.startsWith("#")) {
|
|
37589
|
-
const [key, ...rest] = trimmed.split("=");
|
|
37590
|
-
if (!key) {
|
|
37591
|
-
continue;
|
|
37592
|
-
}
|
|
37593
|
-
config[key.trim()] = rest.join("=").trim();
|
|
37594
|
-
}
|
|
37595
|
-
}
|
|
37596
|
-
} catch (err) {
|
|
37597
|
-
config = {};
|
|
37598
|
-
}
|
|
37599
|
-
config["auto-install-peers"] = "false";
|
|
37600
|
-
const newContent = Object.entries(config).map(([key, value]) => `${key}=${value}`).join("\n");
|
|
37601
|
-
await import_fs4.default.promises.writeFile(npmrcPath, newContent, { encoding: "utf-8" });
|
|
37582
|
+
await execa("pnpm", ["config", "--location=project", "set", "auto-install-peers", "false"], {
|
|
37583
|
+
cwd,
|
|
37584
|
+
stdio: "inherit"
|
|
37585
|
+
});
|
|
37602
37586
|
await execa("pnpm", ["install"], {
|
|
37603
37587
|
cwd,
|
|
37604
37588
|
stdio: "inherit"
|
|
37605
37589
|
});
|
|
37606
37590
|
}
|
|
37591
|
+
async function setupNpm(cwd) {
|
|
37592
|
+
p2.log.step(".npmrc \uD30C\uC77C\uC744 \uC5C5\uB370\uC774\uD2B8\uD558\uB294 \uC911...");
|
|
37593
|
+
await execa("npm", ["config", "--location=project", "set", "legacy-peer-deps", "true"], {
|
|
37594
|
+
cwd,
|
|
37595
|
+
stdio: "inherit"
|
|
37596
|
+
});
|
|
37597
|
+
await execa("npm", ["install", "--legacy-peer-deps"], {
|
|
37598
|
+
cwd,
|
|
37599
|
+
stdio: "inherit"
|
|
37600
|
+
});
|
|
37601
|
+
}
|
|
37607
37602
|
async function setupYarn(cwd) {
|
|
37608
37603
|
const yarnrcPath = import_path3.default.join(cwd, ".yarnrc.yml");
|
|
37609
37604
|
let yarnrc = {};
|
|
@@ -37736,7 +37731,8 @@ var InitCommand = class extends import_clipanion2.Command {
|
|
|
37736
37731
|
const workspaceRoot = (0, import_workspace_tools.getWorkspaceRoot)(cwd) ?? cwd;
|
|
37737
37732
|
const lockFile = [
|
|
37738
37733
|
{ path: import_path3.default.join(workspaceRoot, "pnpm-lock.yaml"), type: "pnpm" },
|
|
37739
|
-
{ path: import_path3.default.join(workspaceRoot, "yarn.lock"), type: "yarn" }
|
|
37734
|
+
{ path: import_path3.default.join(workspaceRoot, "yarn.lock"), type: "yarn" },
|
|
37735
|
+
{ path: import_path3.default.join(workspaceRoot, "package-lock.json"), type: "npm" }
|
|
37740
37736
|
].find(({ path: path9 }) => import_fs4.default.existsSync(path9));
|
|
37741
37737
|
switch (lockFile?.type) {
|
|
37742
37738
|
case "pnpm": {
|
|
@@ -37747,6 +37743,10 @@ var InitCommand = class extends import_clipanion2.Command {
|
|
|
37747
37743
|
await setupYarn(workspaceRoot);
|
|
37748
37744
|
return;
|
|
37749
37745
|
}
|
|
37746
|
+
case "npm": {
|
|
37747
|
+
await setupNpm(workspaceRoot);
|
|
37748
|
+
return;
|
|
37749
|
+
}
|
|
37750
37750
|
}
|
|
37751
37751
|
p2.outro("\u2728 \uCD08\uAE30\uD654\uAC00 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4!");
|
|
37752
37752
|
}
|
package/dist/index.js
CHANGED
|
@@ -37587,31 +37587,26 @@ function transformTemplate(templateString, values) {
|
|
|
37587
37587
|
// src/InitCommand.ts
|
|
37588
37588
|
async function setupPnpm(cwd) {
|
|
37589
37589
|
p2.log.step(".npmrc \uD30C\uC77C\uC744 \uC5C5\uB370\uC774\uD2B8\uD558\uB294 \uC911...");
|
|
37590
|
-
|
|
37591
|
-
|
|
37592
|
-
|
|
37593
|
-
|
|
37594
|
-
for (const line of fileContent.split("\n")) {
|
|
37595
|
-
const trimmed = line.trim();
|
|
37596
|
-
if (trimmed && !trimmed.startsWith("#")) {
|
|
37597
|
-
const [key, ...rest] = trimmed.split("=");
|
|
37598
|
-
if (!key) {
|
|
37599
|
-
continue;
|
|
37600
|
-
}
|
|
37601
|
-
config[key.trim()] = rest.join("=").trim();
|
|
37602
|
-
}
|
|
37603
|
-
}
|
|
37604
|
-
} catch (err) {
|
|
37605
|
-
config = {};
|
|
37606
|
-
}
|
|
37607
|
-
config["auto-install-peers"] = "false";
|
|
37608
|
-
const newContent = Object.entries(config).map(([key, value]) => `${key}=${value}`).join("\n");
|
|
37609
|
-
await fs4.promises.writeFile(npmrcPath, newContent, { encoding: "utf-8" });
|
|
37590
|
+
await execa("pnpm", ["config", "--location=project", "set", "auto-install-peers", "false"], {
|
|
37591
|
+
cwd,
|
|
37592
|
+
stdio: "inherit"
|
|
37593
|
+
});
|
|
37610
37594
|
await execa("pnpm", ["install"], {
|
|
37611
37595
|
cwd,
|
|
37612
37596
|
stdio: "inherit"
|
|
37613
37597
|
});
|
|
37614
37598
|
}
|
|
37599
|
+
async function setupNpm(cwd) {
|
|
37600
|
+
p2.log.step(".npmrc \uD30C\uC77C\uC744 \uC5C5\uB370\uC774\uD2B8\uD558\uB294 \uC911...");
|
|
37601
|
+
await execa("npm", ["config", "--location=project", "set", "legacy-peer-deps", "true"], {
|
|
37602
|
+
cwd,
|
|
37603
|
+
stdio: "inherit"
|
|
37604
|
+
});
|
|
37605
|
+
await execa("npm", ["install", "--legacy-peer-deps"], {
|
|
37606
|
+
cwd,
|
|
37607
|
+
stdio: "inherit"
|
|
37608
|
+
});
|
|
37609
|
+
}
|
|
37615
37610
|
async function setupYarn(cwd) {
|
|
37616
37611
|
const yarnrcPath = path9.join(cwd, ".yarnrc.yml");
|
|
37617
37612
|
let yarnrc = {};
|
|
@@ -37744,7 +37739,8 @@ var InitCommand = class extends Command2 {
|
|
|
37744
37739
|
const workspaceRoot = (0, import_workspace_tools.getWorkspaceRoot)(cwd) ?? cwd;
|
|
37745
37740
|
const lockFile = [
|
|
37746
37741
|
{ path: path9.join(workspaceRoot, "pnpm-lock.yaml"), type: "pnpm" },
|
|
37747
|
-
{ path: path9.join(workspaceRoot, "yarn.lock"), type: "yarn" }
|
|
37742
|
+
{ path: path9.join(workspaceRoot, "yarn.lock"), type: "yarn" },
|
|
37743
|
+
{ path: path9.join(workspaceRoot, "package-lock.json"), type: "npm" }
|
|
37748
37744
|
].find(({ path: path10 }) => fs4.existsSync(path10));
|
|
37749
37745
|
switch (lockFile?.type) {
|
|
37750
37746
|
case "pnpm": {
|
|
@@ -37755,6 +37751,10 @@ var InitCommand = class extends Command2 {
|
|
|
37755
37751
|
await setupYarn(workspaceRoot);
|
|
37756
37752
|
return;
|
|
37757
37753
|
}
|
|
37754
|
+
case "npm": {
|
|
37755
|
+
await setupNpm(workspaceRoot);
|
|
37756
|
+
return;
|
|
37757
|
+
}
|
|
37758
37758
|
}
|
|
37759
37759
|
p2.outro("\u2728 \uCD08\uAE30\uD654\uAC00 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4!");
|
|
37760
37760
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-dev.
|
|
4
|
+
"version": "0.0.0-dev.1741081345454",
|
|
5
5
|
"description": "CLI for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prepack": "yarn build",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "a55f6eb462fbf8ae6731caee7efbbfd1e5416bc2"
|
|
50
50
|
}
|