@tanstack/cta-engine 0.24.0 → 0.25.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/dist/create-app.js +2 -2
- package/dist/types/custom-add-ons/add-on.d.ts +2 -1
- package/dist/types/types.d.ts +30 -15
- package/dist/types.js +2 -1
- package/package.json +1 -1
- package/src/create-app.ts +2 -2
- package/src/types.ts +2 -1
package/dist/create-app.js
CHANGED
|
@@ -35,7 +35,7 @@ async function writeFiles(environment, options) {
|
|
|
35
35
|
await writeFileBundle(options.framework);
|
|
36
36
|
environment.finishStep('write-framework-files', 'Framework files written');
|
|
37
37
|
let wroteAddonFiles = false;
|
|
38
|
-
for (const type of ['add-on', 'example', 'toolchain']) {
|
|
38
|
+
for (const type of ['add-on', 'example', 'toolchain', 'host']) {
|
|
39
39
|
for (const phase of ['setup', 'add-on', 'example']) {
|
|
40
40
|
for (const addOn of options.chosenAddOns.filter((addOn) => addOn.phase === phase && addOn.type === type)) {
|
|
41
41
|
environment.startStep({
|
|
@@ -172,7 +172,7 @@ Use the following commands to start your app:
|
|
|
172
172
|
% cd ${options.projectName}
|
|
173
173
|
% ${formatCommand(getPackageManagerScriptCommand(options.packageManager, ['dev']))}
|
|
174
174
|
|
|
175
|
-
Please
|
|
175
|
+
Please check the README.md for information on testing, styling, adding routes, etc.${errorStatement}`);
|
|
176
176
|
}
|
|
177
177
|
export async function createApp(environment, options) {
|
|
178
178
|
environment.startRun();
|
|
@@ -15,7 +15,7 @@ export declare function generateProject(persistedOptions: PersistedOptions): Pro
|
|
|
15
15
|
id: string;
|
|
16
16
|
name: string;
|
|
17
17
|
description: string;
|
|
18
|
-
type: "add-on" | "example" | "starter" | "toolchain";
|
|
18
|
+
type: "add-on" | "example" | "starter" | "toolchain" | "host";
|
|
19
19
|
modes: string[];
|
|
20
20
|
phase: "add-on" | "setup";
|
|
21
21
|
command?: {
|
|
@@ -44,6 +44,7 @@ export declare function generateProject(persistedOptions: PersistedOptions): Pro
|
|
|
44
44
|
logo?: string | undefined;
|
|
45
45
|
addOnSpecialSteps?: string[] | undefined;
|
|
46
46
|
createSpecialSteps?: string[] | undefined;
|
|
47
|
+
default?: boolean | undefined;
|
|
47
48
|
integrations?: {
|
|
48
49
|
type: string;
|
|
49
50
|
path: string;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare const AddOnBaseSchema: z.ZodObject<{
|
|
|
10
10
|
link: z.ZodOptional<z.ZodString>;
|
|
11
11
|
license: z.ZodOptional<z.ZodString>;
|
|
12
12
|
warning: z.ZodOptional<z.ZodString>;
|
|
13
|
-
type: z.ZodEnum<["add-on", "example", "starter", "toolchain"]>;
|
|
13
|
+
type: z.ZodEnum<["add-on", "example", "starter", "toolchain", "host"]>;
|
|
14
14
|
command: z.ZodOptional<z.ZodObject<{
|
|
15
15
|
command: z.ZodString;
|
|
16
16
|
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -56,11 +56,12 @@ export declare const AddOnBaseSchema: z.ZodObject<{
|
|
|
56
56
|
logo: z.ZodOptional<z.ZodString>;
|
|
57
57
|
addOnSpecialSteps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
58
58
|
createSpecialSteps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
59
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
59
60
|
}, "strip", z.ZodTypeAny, {
|
|
60
61
|
id: string;
|
|
61
62
|
name: string;
|
|
62
63
|
description: string;
|
|
63
|
-
type: "add-on" | "example" | "starter" | "toolchain";
|
|
64
|
+
type: "add-on" | "example" | "starter" | "toolchain" | "host";
|
|
64
65
|
command?: {
|
|
65
66
|
command: string;
|
|
66
67
|
args?: string[] | undefined;
|
|
@@ -87,11 +88,12 @@ export declare const AddOnBaseSchema: z.ZodObject<{
|
|
|
87
88
|
logo?: string | undefined;
|
|
88
89
|
addOnSpecialSteps?: string[] | undefined;
|
|
89
90
|
createSpecialSteps?: string[] | undefined;
|
|
91
|
+
default?: boolean | undefined;
|
|
90
92
|
}, {
|
|
91
93
|
id: string;
|
|
92
94
|
name: string;
|
|
93
95
|
description: string;
|
|
94
|
-
type: "add-on" | "example" | "starter" | "toolchain";
|
|
96
|
+
type: "add-on" | "example" | "starter" | "toolchain" | "host";
|
|
95
97
|
command?: {
|
|
96
98
|
command: string;
|
|
97
99
|
args?: string[] | undefined;
|
|
@@ -118,6 +120,7 @@ export declare const AddOnBaseSchema: z.ZodObject<{
|
|
|
118
120
|
logo?: string | undefined;
|
|
119
121
|
addOnSpecialSteps?: string[] | undefined;
|
|
120
122
|
createSpecialSteps?: string[] | undefined;
|
|
123
|
+
default?: boolean | undefined;
|
|
121
124
|
}>;
|
|
122
125
|
export declare const StarterSchema: z.ZodObject<{
|
|
123
126
|
id: z.ZodString;
|
|
@@ -128,7 +131,7 @@ export declare const StarterSchema: z.ZodObject<{
|
|
|
128
131
|
link: z.ZodOptional<z.ZodString>;
|
|
129
132
|
license: z.ZodOptional<z.ZodString>;
|
|
130
133
|
warning: z.ZodOptional<z.ZodString>;
|
|
131
|
-
type: z.ZodEnum<["add-on", "example", "starter", "toolchain"]>;
|
|
134
|
+
type: z.ZodEnum<["add-on", "example", "starter", "toolchain", "host"]>;
|
|
132
135
|
command: z.ZodOptional<z.ZodObject<{
|
|
133
136
|
command: z.ZodString;
|
|
134
137
|
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -174,6 +177,7 @@ export declare const StarterSchema: z.ZodObject<{
|
|
|
174
177
|
logo: z.ZodOptional<z.ZodString>;
|
|
175
178
|
addOnSpecialSteps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
176
179
|
createSpecialSteps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
180
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
177
181
|
} & {
|
|
178
182
|
framework: z.ZodString;
|
|
179
183
|
mode: z.ZodString;
|
|
@@ -184,7 +188,7 @@ export declare const StarterSchema: z.ZodObject<{
|
|
|
184
188
|
id: string;
|
|
185
189
|
name: string;
|
|
186
190
|
description: string;
|
|
187
|
-
type: "add-on" | "example" | "starter" | "toolchain";
|
|
191
|
+
type: "add-on" | "example" | "starter" | "toolchain" | "host";
|
|
188
192
|
framework: string;
|
|
189
193
|
mode: string;
|
|
190
194
|
typescript: boolean;
|
|
@@ -215,12 +219,13 @@ export declare const StarterSchema: z.ZodObject<{
|
|
|
215
219
|
logo?: string | undefined;
|
|
216
220
|
addOnSpecialSteps?: string[] | undefined;
|
|
217
221
|
createSpecialSteps?: string[] | undefined;
|
|
222
|
+
default?: boolean | undefined;
|
|
218
223
|
banner?: string | undefined;
|
|
219
224
|
}, {
|
|
220
225
|
id: string;
|
|
221
226
|
name: string;
|
|
222
227
|
description: string;
|
|
223
|
-
type: "add-on" | "example" | "starter" | "toolchain";
|
|
228
|
+
type: "add-on" | "example" | "starter" | "toolchain" | "host";
|
|
224
229
|
framework: string;
|
|
225
230
|
mode: string;
|
|
226
231
|
typescript: boolean;
|
|
@@ -251,6 +256,7 @@ export declare const StarterSchema: z.ZodObject<{
|
|
|
251
256
|
logo?: string | undefined;
|
|
252
257
|
addOnSpecialSteps?: string[] | undefined;
|
|
253
258
|
createSpecialSteps?: string[] | undefined;
|
|
259
|
+
default?: boolean | undefined;
|
|
254
260
|
banner?: string | undefined;
|
|
255
261
|
}>;
|
|
256
262
|
export declare const StarterCompiledSchema: z.ZodObject<{
|
|
@@ -262,7 +268,7 @@ export declare const StarterCompiledSchema: z.ZodObject<{
|
|
|
262
268
|
link: z.ZodOptional<z.ZodString>;
|
|
263
269
|
license: z.ZodOptional<z.ZodString>;
|
|
264
270
|
warning: z.ZodOptional<z.ZodString>;
|
|
265
|
-
type: z.ZodEnum<["add-on", "example", "starter", "toolchain"]>;
|
|
271
|
+
type: z.ZodEnum<["add-on", "example", "starter", "toolchain", "host"]>;
|
|
266
272
|
command: z.ZodOptional<z.ZodObject<{
|
|
267
273
|
command: z.ZodString;
|
|
268
274
|
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -308,6 +314,7 @@ export declare const StarterCompiledSchema: z.ZodObject<{
|
|
|
308
314
|
logo: z.ZodOptional<z.ZodString>;
|
|
309
315
|
addOnSpecialSteps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
310
316
|
createSpecialSteps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
317
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
311
318
|
} & {
|
|
312
319
|
framework: z.ZodString;
|
|
313
320
|
mode: z.ZodString;
|
|
@@ -321,7 +328,7 @@ export declare const StarterCompiledSchema: z.ZodObject<{
|
|
|
321
328
|
id: string;
|
|
322
329
|
name: string;
|
|
323
330
|
description: string;
|
|
324
|
-
type: "add-on" | "example" | "starter" | "toolchain";
|
|
331
|
+
type: "add-on" | "example" | "starter" | "toolchain" | "host";
|
|
325
332
|
framework: string;
|
|
326
333
|
mode: string;
|
|
327
334
|
typescript: boolean;
|
|
@@ -354,12 +361,13 @@ export declare const StarterCompiledSchema: z.ZodObject<{
|
|
|
354
361
|
logo?: string | undefined;
|
|
355
362
|
addOnSpecialSteps?: string[] | undefined;
|
|
356
363
|
createSpecialSteps?: string[] | undefined;
|
|
364
|
+
default?: boolean | undefined;
|
|
357
365
|
banner?: string | undefined;
|
|
358
366
|
}, {
|
|
359
367
|
id: string;
|
|
360
368
|
name: string;
|
|
361
369
|
description: string;
|
|
362
|
-
type: "add-on" | "example" | "starter" | "toolchain";
|
|
370
|
+
type: "add-on" | "example" | "starter" | "toolchain" | "host";
|
|
363
371
|
framework: string;
|
|
364
372
|
mode: string;
|
|
365
373
|
typescript: boolean;
|
|
@@ -392,6 +400,7 @@ export declare const StarterCompiledSchema: z.ZodObject<{
|
|
|
392
400
|
logo?: string | undefined;
|
|
393
401
|
addOnSpecialSteps?: string[] | undefined;
|
|
394
402
|
createSpecialSteps?: string[] | undefined;
|
|
403
|
+
default?: boolean | undefined;
|
|
395
404
|
banner?: string | undefined;
|
|
396
405
|
}>;
|
|
397
406
|
export declare const IntegrationSchema: z.ZodObject<{
|
|
@@ -416,7 +425,7 @@ export declare const AddOnInfoSchema: z.ZodObject<{
|
|
|
416
425
|
link: z.ZodOptional<z.ZodString>;
|
|
417
426
|
license: z.ZodOptional<z.ZodString>;
|
|
418
427
|
warning: z.ZodOptional<z.ZodString>;
|
|
419
|
-
type: z.ZodEnum<["add-on", "example", "starter", "toolchain"]>;
|
|
428
|
+
type: z.ZodEnum<["add-on", "example", "starter", "toolchain", "host"]>;
|
|
420
429
|
command: z.ZodOptional<z.ZodObject<{
|
|
421
430
|
command: z.ZodString;
|
|
422
431
|
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -462,6 +471,7 @@ export declare const AddOnInfoSchema: z.ZodObject<{
|
|
|
462
471
|
logo: z.ZodOptional<z.ZodString>;
|
|
463
472
|
addOnSpecialSteps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
464
473
|
createSpecialSteps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
474
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
465
475
|
} & {
|
|
466
476
|
modes: z.ZodArray<z.ZodString, "many">;
|
|
467
477
|
integrations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -483,7 +493,7 @@ export declare const AddOnInfoSchema: z.ZodObject<{
|
|
|
483
493
|
id: string;
|
|
484
494
|
name: string;
|
|
485
495
|
description: string;
|
|
486
|
-
type: "add-on" | "example" | "starter" | "toolchain";
|
|
496
|
+
type: "add-on" | "example" | "starter" | "toolchain" | "host";
|
|
487
497
|
modes: string[];
|
|
488
498
|
phase: "add-on" | "setup";
|
|
489
499
|
command?: {
|
|
@@ -512,6 +522,7 @@ export declare const AddOnInfoSchema: z.ZodObject<{
|
|
|
512
522
|
logo?: string | undefined;
|
|
513
523
|
addOnSpecialSteps?: string[] | undefined;
|
|
514
524
|
createSpecialSteps?: string[] | undefined;
|
|
525
|
+
default?: boolean | undefined;
|
|
515
526
|
integrations?: {
|
|
516
527
|
type: string;
|
|
517
528
|
path: string;
|
|
@@ -522,7 +533,7 @@ export declare const AddOnInfoSchema: z.ZodObject<{
|
|
|
522
533
|
id: string;
|
|
523
534
|
name: string;
|
|
524
535
|
description: string;
|
|
525
|
-
type: "add-on" | "example" | "starter" | "toolchain";
|
|
536
|
+
type: "add-on" | "example" | "starter" | "toolchain" | "host";
|
|
526
537
|
modes: string[];
|
|
527
538
|
phase: "add-on" | "setup";
|
|
528
539
|
command?: {
|
|
@@ -551,6 +562,7 @@ export declare const AddOnInfoSchema: z.ZodObject<{
|
|
|
551
562
|
logo?: string | undefined;
|
|
552
563
|
addOnSpecialSteps?: string[] | undefined;
|
|
553
564
|
createSpecialSteps?: string[] | undefined;
|
|
565
|
+
default?: boolean | undefined;
|
|
554
566
|
integrations?: {
|
|
555
567
|
type: string;
|
|
556
568
|
path: string;
|
|
@@ -567,7 +579,7 @@ export declare const AddOnCompiledSchema: z.ZodObject<{
|
|
|
567
579
|
link: z.ZodOptional<z.ZodString>;
|
|
568
580
|
license: z.ZodOptional<z.ZodString>;
|
|
569
581
|
warning: z.ZodOptional<z.ZodString>;
|
|
570
|
-
type: z.ZodEnum<["add-on", "example", "starter", "toolchain"]>;
|
|
582
|
+
type: z.ZodEnum<["add-on", "example", "starter", "toolchain", "host"]>;
|
|
571
583
|
command: z.ZodOptional<z.ZodObject<{
|
|
572
584
|
command: z.ZodString;
|
|
573
585
|
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -613,6 +625,7 @@ export declare const AddOnCompiledSchema: z.ZodObject<{
|
|
|
613
625
|
logo: z.ZodOptional<z.ZodString>;
|
|
614
626
|
addOnSpecialSteps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
615
627
|
createSpecialSteps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
628
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
616
629
|
} & {
|
|
617
630
|
modes: z.ZodArray<z.ZodString, "many">;
|
|
618
631
|
integrations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -637,7 +650,7 @@ export declare const AddOnCompiledSchema: z.ZodObject<{
|
|
|
637
650
|
id: string;
|
|
638
651
|
name: string;
|
|
639
652
|
description: string;
|
|
640
|
-
type: "add-on" | "example" | "starter" | "toolchain";
|
|
653
|
+
type: "add-on" | "example" | "starter" | "toolchain" | "host";
|
|
641
654
|
files: Record<string, string>;
|
|
642
655
|
deletedFiles: string[];
|
|
643
656
|
modes: string[];
|
|
@@ -668,6 +681,7 @@ export declare const AddOnCompiledSchema: z.ZodObject<{
|
|
|
668
681
|
logo?: string | undefined;
|
|
669
682
|
addOnSpecialSteps?: string[] | undefined;
|
|
670
683
|
createSpecialSteps?: string[] | undefined;
|
|
684
|
+
default?: boolean | undefined;
|
|
671
685
|
integrations?: {
|
|
672
686
|
type: string;
|
|
673
687
|
path: string;
|
|
@@ -678,7 +692,7 @@ export declare const AddOnCompiledSchema: z.ZodObject<{
|
|
|
678
692
|
id: string;
|
|
679
693
|
name: string;
|
|
680
694
|
description: string;
|
|
681
|
-
type: "add-on" | "example" | "starter" | "toolchain";
|
|
695
|
+
type: "add-on" | "example" | "starter" | "toolchain" | "host";
|
|
682
696
|
files: Record<string, string>;
|
|
683
697
|
deletedFiles: string[];
|
|
684
698
|
modes: string[];
|
|
@@ -709,6 +723,7 @@ export declare const AddOnCompiledSchema: z.ZodObject<{
|
|
|
709
723
|
logo?: string | undefined;
|
|
710
724
|
addOnSpecialSteps?: string[] | undefined;
|
|
711
725
|
createSpecialSteps?: string[] | undefined;
|
|
726
|
+
default?: boolean | undefined;
|
|
712
727
|
integrations?: {
|
|
713
728
|
type: string;
|
|
714
729
|
path: string;
|
package/dist/types.js
CHANGED
|
@@ -8,7 +8,7 @@ export const AddOnBaseSchema = z.object({
|
|
|
8
8
|
link: z.string().optional(),
|
|
9
9
|
license: z.string().optional(),
|
|
10
10
|
warning: z.string().optional(),
|
|
11
|
-
type: z.enum(['add-on', 'example', 'starter', 'toolchain']),
|
|
11
|
+
type: z.enum(['add-on', 'example', 'starter', 'toolchain', 'host']),
|
|
12
12
|
command: z
|
|
13
13
|
.object({
|
|
14
14
|
command: z.string(),
|
|
@@ -36,6 +36,7 @@ export const AddOnBaseSchema = z.object({
|
|
|
36
36
|
logo: z.string().optional(),
|
|
37
37
|
addOnSpecialSteps: z.array(z.string()).optional(),
|
|
38
38
|
createSpecialSteps: z.array(z.string()).optional(),
|
|
39
|
+
default: z.boolean().optional(),
|
|
39
40
|
});
|
|
40
41
|
export const StarterSchema = AddOnBaseSchema.extend({
|
|
41
42
|
framework: z.string(),
|
package/package.json
CHANGED
package/src/create-app.ts
CHANGED
|
@@ -48,7 +48,7 @@ async function writeFiles(environment: Environment, options: Options) {
|
|
|
48
48
|
environment.finishStep('write-framework-files', 'Framework files written')
|
|
49
49
|
|
|
50
50
|
let wroteAddonFiles = false
|
|
51
|
-
for (const type of ['add-on', 'example', 'toolchain']) {
|
|
51
|
+
for (const type of ['add-on', 'example', 'toolchain', 'host']) {
|
|
52
52
|
for (const phase of ['setup', 'add-on', 'example']) {
|
|
53
53
|
for (const addOn of options.chosenAddOns.filter(
|
|
54
54
|
(addOn) => addOn.phase === phase && addOn.type === type,
|
|
@@ -234,7 +234,7 @@ Use the following commands to start your app:
|
|
|
234
234
|
getPackageManagerScriptCommand(options.packageManager, ['dev']),
|
|
235
235
|
)}
|
|
236
236
|
|
|
237
|
-
Please
|
|
237
|
+
Please check the README.md for information on testing, styling, adding routes, etc.${errorStatement}`,
|
|
238
238
|
)
|
|
239
239
|
}
|
|
240
240
|
|
package/src/types.ts
CHANGED
|
@@ -18,7 +18,7 @@ export const AddOnBaseSchema = z.object({
|
|
|
18
18
|
link: z.string().optional(),
|
|
19
19
|
license: z.string().optional(),
|
|
20
20
|
warning: z.string().optional(),
|
|
21
|
-
type: z.enum(['add-on', 'example', 'starter', 'toolchain']),
|
|
21
|
+
type: z.enum(['add-on', 'example', 'starter', 'toolchain', 'host']),
|
|
22
22
|
command: z
|
|
23
23
|
.object({
|
|
24
24
|
command: z.string(),
|
|
@@ -48,6 +48,7 @@ export const AddOnBaseSchema = z.object({
|
|
|
48
48
|
logo: z.string().optional(),
|
|
49
49
|
addOnSpecialSteps: z.array(z.string()).optional(),
|
|
50
50
|
createSpecialSteps: z.array(z.string()).optional(),
|
|
51
|
+
default: z.boolean().optional(),
|
|
51
52
|
})
|
|
52
53
|
|
|
53
54
|
export const StarterSchema = AddOnBaseSchema.extend({
|