cognite-create 0.2.38 → 0.2.41

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/bin/index.js CHANGED
@@ -79,14 +79,14 @@ async function main() {
79
79
  }
80
80
 
81
81
  // Skip install and start prompts - we'll install our own dependencies
82
- const hasNoInstallFlag = additionalArgs.some(
83
- (arg) => arg === "--no-install" || arg === "--install"
84
- );
85
- if (!hasNoInstallFlag) {
86
- additionalArgs.push("--no-install");
82
+ const hasImmediateFlag = additionalArgs.some((arg) => arg === "--immediate");
83
+ if (!hasImmediateFlag) {
84
+ additionalArgs.push("--immediate", "false");
87
85
  }
88
86
 
89
87
  const createArgs = ["create-vite@latest", projectDir, ...additionalArgs];
88
+ console.log("\nšŸ” Running create-vite with args:", createArgs.join(" "));
89
+ console.log("šŸ“‹ Full command: npx", createArgs.join(" "), "\n");
90
90
  await runCreateVite(createArgs);
91
91
  await cleanupViteDefaults(projectDir);
92
92
  await addCogniteTemplates(projectDir);
package/bin/index.test.js CHANGED
@@ -135,7 +135,7 @@ describe("CLI Command Tests", () => {
135
135
  ]);
136
136
  });
137
137
 
138
- it("should add --no-rolldown and --no-install flags by default", () => {
138
+ it("should add --no-rolldown and --immediate false flags by default", () => {
139
139
  const args = ["my-project"];
140
140
  let projectDir;
141
141
  let additionalArgs = [];
@@ -164,11 +164,11 @@ describe("CLI Command Tests", () => {
164
164
  }
165
165
 
166
166
  // Skip install and start prompts - we'll install our own dependencies
167
- const hasNoInstallFlag = additionalArgs.some(
168
- (arg) => arg === "--no-install" || arg === "--install"
167
+ const hasImmediateFlag = additionalArgs.some(
168
+ (arg) => arg === "--immediate"
169
169
  );
170
- if (!hasNoInstallFlag) {
171
- additionalArgs.push("--no-install");
170
+ if (!hasImmediateFlag) {
171
+ additionalArgs.push("--immediate", "false");
172
172
  }
173
173
 
174
174
  const createArgs = ["create-vite@latest", projectDir, ...additionalArgs];
@@ -178,7 +178,8 @@ describe("CLI Command Tests", () => {
178
178
  "--template",
179
179
  "react-ts",
180
180
  "--no-rolldown",
181
- "--no-install",
181
+ "--immediate",
182
+ "false",
182
183
  ]);
183
184
  expect(createArgs).toEqual([
184
185
  "create-vite@latest",
@@ -186,7 +187,8 @@ describe("CLI Command Tests", () => {
186
187
  "--template",
187
188
  "react-ts",
188
189
  "--no-rolldown",
189
- "--no-install",
190
+ "--immediate",
191
+ "false",
190
192
  ]);
191
193
  });
192
194
 
@@ -219,11 +221,11 @@ describe("CLI Command Tests", () => {
219
221
  }
220
222
 
221
223
  // Skip install and start prompts
222
- const hasNoInstallFlag = additionalArgs.some(
223
- (arg) => arg === "--no-install" || arg === "--install"
224
+ const hasImmediateFlag = additionalArgs.some(
225
+ (arg) => arg === "--immediate"
224
226
  );
225
- if (!hasNoInstallFlag) {
226
- additionalArgs.push("--no-install");
227
+ if (!hasImmediateFlag) {
228
+ additionalArgs.push("--immediate", "false");
227
229
  }
228
230
 
229
231
  const createArgs = ["create-vite@latest", projectDir, ...additionalArgs];
@@ -233,7 +235,8 @@ describe("CLI Command Tests", () => {
233
235
  "--rolldown",
234
236
  "--template",
235
237
  "react-ts",
236
- "--no-install",
238
+ "--immediate",
239
+ "false",
237
240
  ]);
238
241
  expect(createArgs).toEqual([
239
242
  "create-vite@latest",
@@ -241,7 +244,8 @@ describe("CLI Command Tests", () => {
241
244
  "--rolldown",
242
245
  "--template",
243
246
  "react-ts",
244
- "--no-install",
247
+ "--immediate",
248
+ "false",
245
249
  ]);
246
250
  });
247
251
 
@@ -274,11 +278,11 @@ describe("CLI Command Tests", () => {
274
278
  }
275
279
 
276
280
  // Skip install and start prompts
277
- const hasNoInstallFlag = additionalArgs.some(
278
- (arg) => arg === "--no-install" || arg === "--install"
281
+ const hasImmediateFlag = additionalArgs.some(
282
+ (arg) => arg === "--immediate"
279
283
  );
280
- if (!hasNoInstallFlag) {
281
- additionalArgs.push("--no-install");
284
+ if (!hasImmediateFlag) {
285
+ additionalArgs.push("--immediate", "false");
282
286
  }
283
287
 
284
288
  const createArgs = ["create-vite@latest", projectDir, ...additionalArgs];
@@ -288,7 +292,8 @@ describe("CLI Command Tests", () => {
288
292
  "--no-rolldown",
289
293
  "--template",
290
294
  "react-ts",
291
- "--no-install",
295
+ "--immediate",
296
+ "false",
292
297
  ]);
293
298
  expect(createArgs).toEqual([
294
299
  "create-vite@latest",
@@ -296,7 +301,8 @@ describe("CLI Command Tests", () => {
296
301
  "--no-rolldown",
297
302
  "--template",
298
303
  "react-ts",
299
- "--no-install",
304
+ "--immediate",
305
+ "false",
300
306
  ]);
301
307
  });
302
308
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cognite-create",
3
- "version": "0.2.38",
3
+ "version": "0.2.41",
4
4
  "description": "Create a Next.js app preconfigured with Cognite defaults.",
5
5
  "bin": {
6
6
  "cognite-create": "./bin/index.js"