@lasso-ai/cli 1.2.0 → 1.2.1

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.
@@ -63,8 +63,9 @@ async function runCreateCommand(projectName, framework, typescript, packageManag
63
63
  let args;
64
64
  if (framework === "next") {
65
65
  const tsFlag = typescript ? "--ts" : "--js";
66
+ const pmFlag = packageManager === "pnpm" ? "--use-pnpm" : packageManager === "yarn" ? "--use-yarn" : "--use-npm";
66
67
  command = "npx";
67
- args = ["create-next-app@latest", projectName, tsFlag, "--tailwind", "--eslint", "--app", "--src-dir", "--import-alias", "@/*", "--no-git"];
68
+ args = ["create-next-app@latest", projectName, tsFlag, "--tailwind", "--eslint", "--app", "--src-dir", "--import-alias", "@/*", "--no-git", pmFlag];
68
69
  }
69
70
  else if (framework === "react") {
70
71
  command = "npx";
@@ -172,16 +173,17 @@ async function createProject(options) {
172
173
  }
173
174
  if (!packageManager) {
174
175
  const detected = await detectPackageManager();
176
+ const choices = [
177
+ { title: "pnpm", value: "pnpm" },
178
+ { title: "npm", value: "npm" },
179
+ { title: "yarn", value: "yarn" },
180
+ ];
175
181
  const response = await (0, prompts_1.default)({
176
182
  type: "select",
177
183
  name: "packageManager",
178
184
  message: "Package manager:",
179
- choices: [
180
- { title: "pnpm", value: "pnpm" },
181
- { title: "npm", value: "npm" },
182
- { title: "yarn", value: "yarn" },
183
- ],
184
- initial: detected,
185
+ choices,
186
+ initial: Math.max(0, choices.findIndex((c) => c.value === detected)),
185
187
  });
186
188
  packageManager = response.packageManager;
187
189
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lasso-ai/cli",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Select any part of your running app, describe a change, and let AI edit the real source code.",
5
5
  "type": "commonjs",
6
6
  "main": "dist/cli/index.js",