@tanstack/cta-cli 0.46.2 → 0.47.0
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/CHANGELOG.md +15 -0
- package/dist/cli.js +61 -4
- package/dist/command-line.js +57 -1
- package/dist/dev-watch.js +290 -0
- package/dist/file-syncer.js +148 -0
- package/dist/options.js +19 -8
- package/dist/types/cli.d.ts +3 -1
- package/dist/types/command-line.d.ts +4 -0
- package/dist/types/dev-watch.d.ts +27 -0
- package/dist/types/file-syncer.d.ts +18 -0
- package/dist/types/types.d.ts +2 -0
- package/package.json +8 -3
- package/src/cli.ts +83 -3
- package/src/command-line.ts +69 -1
- package/src/dev-watch.ts +430 -0
- package/src/file-syncer.ts +205 -0
- package/src/options.ts +21 -8
- package/src/types.ts +2 -0
- package/tests/command-line.test.ts +6 -2
- package/tests/options.test.ts +5 -0
|
@@ -236,7 +236,9 @@ describe('normalizeOptions', () => {
|
|
|
236
236
|
)
|
|
237
237
|
expect(options?.chosenAddOns.map((a) => a.id).includes('foo')).toBe(true)
|
|
238
238
|
expect(options?.chosenAddOns.map((a) => a.id).includes('baz')).toBe(true)
|
|
239
|
-
|
|
239
|
+
// Tailwind is not automatically set to true unless an add-on explicitly requires it
|
|
240
|
+
// Since mock add-ons don't have tailwind: true, tailwind should be false
|
|
241
|
+
expect(options?.tailwind).toBe(false)
|
|
240
242
|
expect(options?.typescript).toBe(true)
|
|
241
243
|
})
|
|
242
244
|
|
|
@@ -263,7 +265,9 @@ describe('normalizeOptions', () => {
|
|
|
263
265
|
toolchain: 'biome',
|
|
264
266
|
})
|
|
265
267
|
expect(options?.chosenAddOns.map((a) => a.id).includes('biome')).toBe(true)
|
|
266
|
-
|
|
268
|
+
// Tailwind is not automatically set to true unless an add-on explicitly requires it
|
|
269
|
+
// Since mock add-ons don't have tailwind: true, tailwind should be false
|
|
270
|
+
expect(options?.tailwind).toBe(false)
|
|
267
271
|
expect(options?.typescript).toBe(true)
|
|
268
272
|
})
|
|
269
273
|
|
package/tests/options.test.ts
CHANGED
|
@@ -257,6 +257,7 @@ describe('promptForCreateOptions', () => {
|
|
|
257
257
|
expect(options?.chosenAddOns.map((a) => a.id).sort()).toEqual([
|
|
258
258
|
'react-query',
|
|
259
259
|
])
|
|
260
|
+
// Tailwind should be prompted (and mock returns true) since no add-on explicitly requires it
|
|
260
261
|
expect(options?.tailwind).toBe(true)
|
|
261
262
|
expect(options?.typescript).toBe(true)
|
|
262
263
|
})
|
|
@@ -273,6 +274,9 @@ describe('promptForCreateOptions', () => {
|
|
|
273
274
|
'biome',
|
|
274
275
|
'react-query',
|
|
275
276
|
])
|
|
277
|
+
// In non-interactive mode with add-ons, tailwind defaults to false unless explicitly required
|
|
278
|
+
// But since we're in interactive mode (addOns is an array but we still prompt), tailwind is prompted
|
|
279
|
+
// The mock returns true, so tailwind should be true
|
|
276
280
|
expect(options?.tailwind).toBe(true)
|
|
277
281
|
expect(options?.typescript).toBe(true)
|
|
278
282
|
})
|
|
@@ -293,6 +297,7 @@ describe('promptForCreateOptions', () => {
|
|
|
293
297
|
'biome',
|
|
294
298
|
'react-query',
|
|
295
299
|
])
|
|
300
|
+
// Tailwind should be prompted (and mock returns true) since no add-on explicitly requires it
|
|
296
301
|
expect(options?.tailwind).toBe(true)
|
|
297
302
|
expect(options?.typescript).toBe(true)
|
|
298
303
|
})
|