@tanstack/create 0.68.2 → 0.68.3
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 +6 -0
- package/dist/edge-add-ons.js +106 -0
- package/dist/edge-config-file.js +15 -0
- package/dist/edge-create-app.js +438 -0
- package/dist/edge-environment.js +141 -0
- package/dist/edge-file-helpers.js +88 -0
- package/dist/edge-frameworks.js +33 -0
- package/dist/edge-package-json.js +146 -0
- package/dist/edge-path.js +62 -0
- package/dist/edge-render.js +31 -0
- package/dist/edge-template-file.js +141 -0
- package/dist/edge.js +7 -0
- package/dist/frameworks/react/add-ons/storybook/info.json +5 -10
- package/dist/generated/create-manifest.js +4683 -0
- package/dist/manifest-types.js +1 -0
- package/dist/manifest.js +1 -0
- package/dist/types/custom-add-ons/add-on.d.ts +5 -3
- package/dist/types/edge-add-ons.d.ts +5 -0
- package/dist/types/edge-config-file.d.ts +8 -0
- package/dist/types/edge-create-app.d.ts +2 -0
- package/dist/types/edge-environment.d.ts +19 -0
- package/dist/types/edge-file-helpers.d.ts +7 -0
- package/dist/types/edge-frameworks.d.ts +7 -0
- package/dist/types/edge-package-json.d.ts +3 -0
- package/dist/types/edge-path.d.ts +5 -0
- package/dist/types/edge-render.d.ts +1 -0
- package/dist/types/edge-template-file.d.ts +2 -0
- package/dist/types/edge.d.ts +9 -0
- package/dist/types/generated/create-manifest.d.ts +36 -0
- package/dist/types/manifest-types.d.ts +4 -0
- package/dist/types/manifest.d.ts +1 -0
- package/dist/types/types.d.ts +96 -56
- package/dist/types.js +5 -3
- package/package.json +25 -5
- package/scripts/generate-manifest.mjs +407 -0
- package/src/edge-add-ons.ts +138 -0
- package/src/edge-config-file.ts +35 -0
- package/src/edge-create-app.ts +594 -0
- package/src/edge-environment.ts +175 -0
- package/src/edge-file-helpers.ts +112 -0
- package/src/edge-frameworks.ts +54 -0
- package/src/edge-package-json.ts +212 -0
- package/src/edge-path.ts +77 -0
- package/src/edge-render.ts +32 -0
- package/src/edge-template-file.ts +204 -0
- package/src/edge.ts +43 -0
- package/src/frameworks/react/add-ons/storybook/info.json +5 -10
- package/src/generated/create-manifest.ts +6490 -0
- package/src/manifest-types.ts +8 -0
- package/src/manifest.ts +1 -0
- package/src/types.ts +5 -3
- package/tests/edge-import.test.ts +31 -0
- package/tests/edge-manifest.test.ts +168 -0
- package/dist/frameworks/react/add-ons/storybook/assets/_dot_storybook/main.ts +0 -17
- package/dist/frameworks/react/add-ons/storybook/assets/_dot_storybook/preview.ts +0 -15
- package/dist/frameworks/react/add-ons/storybook/assets/src/components/storybook/button.stories.ts +0 -67
- package/dist/frameworks/react/add-ons/storybook/assets/src/components/storybook/button.tsx +0 -47
- package/dist/frameworks/react/add-ons/storybook/assets/src/components/storybook/dialog.stories.tsx +0 -92
- package/dist/frameworks/react/add-ons/storybook/assets/src/components/storybook/dialog.tsx +0 -29
- package/dist/frameworks/react/add-ons/storybook/assets/src/components/storybook/index.ts +0 -14
- package/dist/frameworks/react/add-ons/storybook/assets/src/components/storybook/input.stories.ts +0 -43
- package/dist/frameworks/react/add-ons/storybook/assets/src/components/storybook/input.tsx +0 -39
- package/dist/frameworks/react/add-ons/storybook/assets/src/components/storybook/radio-group.stories.ts +0 -53
- package/dist/frameworks/react/add-ons/storybook/assets/src/components/storybook/radio-group.tsx +0 -52
- package/dist/frameworks/react/add-ons/storybook/assets/src/components/storybook/slider.stories.ts +0 -55
- package/dist/frameworks/react/add-ons/storybook/assets/src/components/storybook/slider.tsx +0 -57
- package/dist/frameworks/react/add-ons/storybook/assets/src/routes/demo/storybook.tsx +0 -93
- package/dist/frameworks/react/add-ons/storybook/package.json +0 -10
- package/src/frameworks/react/add-ons/storybook/assets/_dot_storybook/main.ts +0 -17
- package/src/frameworks/react/add-ons/storybook/assets/_dot_storybook/preview.ts +0 -15
- package/src/frameworks/react/add-ons/storybook/assets/src/components/storybook/button.stories.ts +0 -67
- package/src/frameworks/react/add-ons/storybook/assets/src/components/storybook/button.tsx +0 -47
- package/src/frameworks/react/add-ons/storybook/assets/src/components/storybook/dialog.stories.tsx +0 -92
- package/src/frameworks/react/add-ons/storybook/assets/src/components/storybook/dialog.tsx +0 -29
- package/src/frameworks/react/add-ons/storybook/assets/src/components/storybook/index.ts +0 -14
- package/src/frameworks/react/add-ons/storybook/assets/src/components/storybook/input.stories.ts +0 -43
- package/src/frameworks/react/add-ons/storybook/assets/src/components/storybook/input.tsx +0 -39
- package/src/frameworks/react/add-ons/storybook/assets/src/components/storybook/radio-group.stories.ts +0 -53
- package/src/frameworks/react/add-ons/storybook/assets/src/components/storybook/radio-group.tsx +0 -52
- package/src/frameworks/react/add-ons/storybook/assets/src/components/storybook/slider.stories.ts +0 -55
- package/src/frameworks/react/add-ons/storybook/assets/src/components/storybook/slider.tsx +0 -57
- package/src/frameworks/react/add-ons/storybook/assets/src/routes/demo/storybook.tsx +0 -93
- package/src/frameworks/react/add-ons/storybook/package.json +0 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/manifest.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './edge.js';
|
|
@@ -17,7 +17,7 @@ export declare function generateProject(persistedOptions: PersistedOptions): Pro
|
|
|
17
17
|
id: string;
|
|
18
18
|
name: string;
|
|
19
19
|
modes: string[];
|
|
20
|
-
phase: "add-on" | "setup";
|
|
20
|
+
phase: "add-on" | "example" | "setup";
|
|
21
21
|
command?: {
|
|
22
22
|
command: string;
|
|
23
23
|
args?: string[] | undefined;
|
|
@@ -44,16 +44,18 @@ export declare function generateProject(persistedOptions: PersistedOptions): Pro
|
|
|
44
44
|
color?: string | undefined;
|
|
45
45
|
priority?: number | undefined;
|
|
46
46
|
routes?: {
|
|
47
|
-
path
|
|
48
|
-
jsName: string;
|
|
47
|
+
path?: string | undefined;
|
|
49
48
|
name?: string | undefined;
|
|
50
49
|
url?: string | undefined;
|
|
50
|
+
jsName?: string | undefined;
|
|
51
|
+
icon?: string | undefined;
|
|
51
52
|
}[] | undefined;
|
|
52
53
|
packageAdditions?: {
|
|
53
54
|
dependencies?: Record<string, string> | undefined;
|
|
54
55
|
devDependencies?: Record<string, string> | undefined;
|
|
55
56
|
scripts?: Record<string, string> | undefined;
|
|
56
57
|
} | undefined;
|
|
58
|
+
variables?: unknown[] | undefined;
|
|
57
59
|
shadcnComponents?: string[] | undefined;
|
|
58
60
|
dependsOn?: string[] | undefined;
|
|
59
61
|
smallLogo?: string | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AddOn, Framework } from './types.js';
|
|
2
|
+
export declare function getAllAddOns(framework: Framework, mode: string): Array<AddOn>;
|
|
3
|
+
export declare function finalizeAddOns(framework: Framework, mode: string, chosenAddOnIDs: Array<string>): Promise<Array<AddOn>>;
|
|
4
|
+
export declare function populateAddOnOptionsDefaults(chosenAddOns: Array<AddOn>): Record<string, Record<string, unknown>>;
|
|
5
|
+
export declare function loadRemoteAddOn(url: string): Promise<AddOn>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Environment, Options } from './types.js';
|
|
2
|
+
export type PersistedOptions = Omit<Partial<Options>, 'addOns' | 'chosenAddOns' | 'framework' | 'starter' | 'targetDir'> & {
|
|
3
|
+
framework: string;
|
|
4
|
+
version: number;
|
|
5
|
+
chosenAddOns: Array<string>;
|
|
6
|
+
starter?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function writeConfigFileToEnvironment(environment: Environment, options: Options): Promise<void>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { basenamePath, dirnamePath, joinPaths } from './edge-path.js';
|
|
2
|
+
import type { Environment } from './types.js';
|
|
3
|
+
export interface MemoryEnvironmentOutput {
|
|
4
|
+
files: Record<string, string>;
|
|
5
|
+
deletedFiles: Array<string>;
|
|
6
|
+
commands: Array<{
|
|
7
|
+
command: string;
|
|
8
|
+
args: Array<string>;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
export declare function createMemoryEnvironment(returnPathsRelativeTo?: string): {
|
|
12
|
+
environment: Environment;
|
|
13
|
+
output: MemoryEnvironmentOutput;
|
|
14
|
+
paths: {
|
|
15
|
+
basename: typeof basenamePath;
|
|
16
|
+
dirname: typeof dirnamePath;
|
|
17
|
+
join: typeof joinPaths;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function isBinaryFile(path: string): boolean;
|
|
2
|
+
export declare function isBase64(content: string): boolean;
|
|
3
|
+
export declare function toCleanPath(absolutePath: string, baseDir: string): string;
|
|
4
|
+
export declare function relativePath(from: string, to: string, stripExtension?: boolean): string;
|
|
5
|
+
export declare function isDemoFilePath(path?: string): boolean;
|
|
6
|
+
export declare function cleanUpFiles(files: Record<string, string>, targetDir?: string): Record<string, string>;
|
|
7
|
+
export declare function cleanUpFileArray(files: Array<string>, targetDir?: string): string[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AddOnCompiled, Framework, FrameworkDefinition } from './types.js';
|
|
2
|
+
export declare function createFrameworkFromManifest(framework: Omit<FrameworkDefinition, 'addOns'> & {
|
|
3
|
+
addOns: Array<AddOnCompiled>;
|
|
4
|
+
}): Framework;
|
|
5
|
+
export declare function getFrameworkById(id: string): Framework | undefined;
|
|
6
|
+
export declare function getFrameworkByName(name: string): Framework | undefined;
|
|
7
|
+
export declare function getFrameworks(): Framework[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Options } from './types.js';
|
|
2
|
+
export declare function mergePackageJSON(packageJSON: Record<string, unknown>, overlayPackageJSON?: Record<string, unknown>): Record<string, unknown>;
|
|
3
|
+
export declare function createPackageJSON(options: Options): Record<string, unknown>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function normalizePath(path: string): string;
|
|
2
|
+
export declare function joinPaths(...paths: Array<string | undefined>): string;
|
|
3
|
+
export declare function basenamePath(path: string): string;
|
|
4
|
+
export declare function dirnamePath(path: string): string;
|
|
5
|
+
export declare function extnamePath(path: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function render(template: string, data?: Record<string, any>): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { createApp } from './edge-create-app.js';
|
|
2
|
+
export { createMemoryEnvironment, type MemoryEnvironmentOutput, } from './edge-environment.js';
|
|
3
|
+
export { getFrameworkById, getFrameworkByName, getFrameworks, } from './edge-frameworks.js';
|
|
4
|
+
export { finalizeAddOns, getAllAddOns, loadRemoteAddOn, populateAddOnOptionsDefaults, } from './edge-add-ons.js';
|
|
5
|
+
export { createSerializedOptions } from './options.js';
|
|
6
|
+
export { CONFIG_FILE } from './constants.js';
|
|
7
|
+
export { DEFAULT_PACKAGE_MANAGER, SUPPORTED_PACKAGE_MANAGERS, getPackageManagerExecuteCommand, getPackageManagerInstallCommand, getPackageManagerScriptCommand, translateExecuteCommand, } from './package-manager.js';
|
|
8
|
+
export type { AddOn, AddOnOption, AddOnOptions, AddOnSelectOption, AddOnSelection, Environment, FileBundleHandler, Framework, FrameworkDefinition, Options, SerializedOptions, Starter, StarterCompiled, } from './types.js';
|
|
9
|
+
export type { PackageManager } from './package-manager.js';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ManifestFrameworkDefinition } from '../manifest-types.js';
|
|
2
|
+
type TemplateRecord = Record<string, any>;
|
|
3
|
+
type TemplateAddOn = TemplateRecord & {
|
|
4
|
+
integrations?: Array<TemplateRecord>;
|
|
5
|
+
routes?: Array<TemplateRecord>;
|
|
6
|
+
};
|
|
7
|
+
type TemplateRenderContext = {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
packageManager: any;
|
|
10
|
+
projectName: any;
|
|
11
|
+
typescript: any;
|
|
12
|
+
tailwind: any;
|
|
13
|
+
js: any;
|
|
14
|
+
jsx: any;
|
|
15
|
+
fileRouter: any;
|
|
16
|
+
codeRouter: any;
|
|
17
|
+
routerOnly: any;
|
|
18
|
+
includeExamples: any;
|
|
19
|
+
addOnEnabled: Record<string, any>;
|
|
20
|
+
addOnOption: Record<string, any>;
|
|
21
|
+
addOns: Array<TemplateAddOn>;
|
|
22
|
+
integrations: Array<TemplateRecord>;
|
|
23
|
+
routes: Array<TemplateRecord>;
|
|
24
|
+
getPackageManagerAddScript: (...args: Array<any>) => string;
|
|
25
|
+
getPackageManagerRunScript: (...args: Array<any>) => string;
|
|
26
|
+
getPackageManagerExecuteScript: (...args: Array<any>) => string;
|
|
27
|
+
relativePath: (...args: Array<any>) => string;
|
|
28
|
+
integrationImportContent: (...args: Array<any>) => string;
|
|
29
|
+
integrationImportCode: (...args: Array<any>) => string;
|
|
30
|
+
renderTemplate: (content: string) => string;
|
|
31
|
+
ignoreFile: () => never;
|
|
32
|
+
};
|
|
33
|
+
export declare function getManifestTemplateKey(template: string): string;
|
|
34
|
+
export declare function renderManifestTemplate(template: string, context: TemplateRenderContext): string;
|
|
35
|
+
export declare const createManifestFrameworks: () => Array<ManifestFrameworkDefinition>;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './edge.js';
|
package/dist/types/types.d.ts
CHANGED
|
@@ -131,18 +131,21 @@ export declare const AddOnBaseSchema: z.ZodObject<{
|
|
|
131
131
|
routes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
132
132
|
url: z.ZodOptional<z.ZodString>;
|
|
133
133
|
name: z.ZodOptional<z.ZodString>;
|
|
134
|
-
path: z.ZodString
|
|
135
|
-
jsName: z.ZodString
|
|
134
|
+
path: z.ZodOptional<z.ZodString>;
|
|
135
|
+
jsName: z.ZodOptional<z.ZodString>;
|
|
136
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
136
137
|
}, "strip", z.ZodTypeAny, {
|
|
137
|
-
path
|
|
138
|
-
jsName: string;
|
|
138
|
+
path?: string | undefined;
|
|
139
139
|
name?: string | undefined;
|
|
140
140
|
url?: string | undefined;
|
|
141
|
+
jsName?: string | undefined;
|
|
142
|
+
icon?: string | undefined;
|
|
141
143
|
}, {
|
|
142
|
-
path
|
|
143
|
-
jsName: string;
|
|
144
|
+
path?: string | undefined;
|
|
144
145
|
name?: string | undefined;
|
|
145
146
|
url?: string | undefined;
|
|
147
|
+
jsName?: string | undefined;
|
|
148
|
+
icon?: string | undefined;
|
|
146
149
|
}>, "many">>;
|
|
147
150
|
packageAdditions: z.ZodOptional<z.ZodObject<{
|
|
148
151
|
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -157,6 +160,7 @@ export declare const AddOnBaseSchema: z.ZodObject<{
|
|
|
157
160
|
devDependencies?: Record<string, string> | undefined;
|
|
158
161
|
scripts?: Record<string, string> | undefined;
|
|
159
162
|
}>>;
|
|
163
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
160
164
|
shadcnComponents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
161
165
|
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
162
166
|
smallLogo: z.ZodOptional<z.ZodString>;
|
|
@@ -252,16 +256,18 @@ export declare const AddOnBaseSchema: z.ZodObject<{
|
|
|
252
256
|
color?: string | undefined;
|
|
253
257
|
priority?: number | undefined;
|
|
254
258
|
routes?: {
|
|
255
|
-
path
|
|
256
|
-
jsName: string;
|
|
259
|
+
path?: string | undefined;
|
|
257
260
|
name?: string | undefined;
|
|
258
261
|
url?: string | undefined;
|
|
262
|
+
jsName?: string | undefined;
|
|
263
|
+
icon?: string | undefined;
|
|
259
264
|
}[] | undefined;
|
|
260
265
|
packageAdditions?: {
|
|
261
266
|
dependencies?: Record<string, string> | undefined;
|
|
262
267
|
devDependencies?: Record<string, string> | undefined;
|
|
263
268
|
scripts?: Record<string, string> | undefined;
|
|
264
269
|
} | undefined;
|
|
270
|
+
variables?: unknown[] | undefined;
|
|
265
271
|
shadcnComponents?: string[] | undefined;
|
|
266
272
|
dependsOn?: string[] | undefined;
|
|
267
273
|
smallLogo?: string | undefined;
|
|
@@ -308,16 +314,18 @@ export declare const AddOnBaseSchema: z.ZodObject<{
|
|
|
308
314
|
color?: string | undefined;
|
|
309
315
|
priority?: number | undefined;
|
|
310
316
|
routes?: {
|
|
311
|
-
path
|
|
312
|
-
jsName: string;
|
|
317
|
+
path?: string | undefined;
|
|
313
318
|
name?: string | undefined;
|
|
314
319
|
url?: string | undefined;
|
|
320
|
+
jsName?: string | undefined;
|
|
321
|
+
icon?: string | undefined;
|
|
315
322
|
}[] | undefined;
|
|
316
323
|
packageAdditions?: {
|
|
317
324
|
dependencies?: Record<string, string> | undefined;
|
|
318
325
|
devDependencies?: Record<string, string> | undefined;
|
|
319
326
|
scripts?: Record<string, string> | undefined;
|
|
320
327
|
} | undefined;
|
|
328
|
+
variables?: unknown[] | undefined;
|
|
321
329
|
shadcnComponents?: string[] | undefined;
|
|
322
330
|
dependsOn?: string[] | undefined;
|
|
323
331
|
smallLogo?: string | undefined;
|
|
@@ -362,18 +370,21 @@ export declare const StarterSchema: z.ZodObject<{
|
|
|
362
370
|
routes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
363
371
|
url: z.ZodOptional<z.ZodString>;
|
|
364
372
|
name: z.ZodOptional<z.ZodString>;
|
|
365
|
-
path: z.ZodString
|
|
366
|
-
jsName: z.ZodString
|
|
373
|
+
path: z.ZodOptional<z.ZodString>;
|
|
374
|
+
jsName: z.ZodOptional<z.ZodString>;
|
|
375
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
367
376
|
}, "strip", z.ZodTypeAny, {
|
|
368
|
-
path
|
|
369
|
-
jsName: string;
|
|
377
|
+
path?: string | undefined;
|
|
370
378
|
name?: string | undefined;
|
|
371
379
|
url?: string | undefined;
|
|
380
|
+
jsName?: string | undefined;
|
|
381
|
+
icon?: string | undefined;
|
|
372
382
|
}, {
|
|
373
|
-
path
|
|
374
|
-
jsName: string;
|
|
383
|
+
path?: string | undefined;
|
|
375
384
|
name?: string | undefined;
|
|
376
385
|
url?: string | undefined;
|
|
386
|
+
jsName?: string | undefined;
|
|
387
|
+
icon?: string | undefined;
|
|
377
388
|
}>, "many">>;
|
|
378
389
|
packageAdditions: z.ZodOptional<z.ZodObject<{
|
|
379
390
|
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -388,6 +399,7 @@ export declare const StarterSchema: z.ZodObject<{
|
|
|
388
399
|
devDependencies?: Record<string, string> | undefined;
|
|
389
400
|
scripts?: Record<string, string> | undefined;
|
|
390
401
|
}>>;
|
|
402
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
391
403
|
shadcnComponents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
392
404
|
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
393
405
|
smallLogo: z.ZodOptional<z.ZodString>;
|
|
@@ -491,16 +503,18 @@ export declare const StarterSchema: z.ZodObject<{
|
|
|
491
503
|
color?: string | undefined;
|
|
492
504
|
priority?: number | undefined;
|
|
493
505
|
routes?: {
|
|
494
|
-
path
|
|
495
|
-
jsName: string;
|
|
506
|
+
path?: string | undefined;
|
|
496
507
|
name?: string | undefined;
|
|
497
508
|
url?: string | undefined;
|
|
509
|
+
jsName?: string | undefined;
|
|
510
|
+
icon?: string | undefined;
|
|
498
511
|
}[] | undefined;
|
|
499
512
|
packageAdditions?: {
|
|
500
513
|
dependencies?: Record<string, string> | undefined;
|
|
501
514
|
devDependencies?: Record<string, string> | undefined;
|
|
502
515
|
scripts?: Record<string, string> | undefined;
|
|
503
516
|
} | undefined;
|
|
517
|
+
variables?: unknown[] | undefined;
|
|
504
518
|
shadcnComponents?: string[] | undefined;
|
|
505
519
|
dependsOn?: string[] | undefined;
|
|
506
520
|
smallLogo?: string | undefined;
|
|
@@ -551,16 +565,18 @@ export declare const StarterSchema: z.ZodObject<{
|
|
|
551
565
|
color?: string | undefined;
|
|
552
566
|
priority?: number | undefined;
|
|
553
567
|
routes?: {
|
|
554
|
-
path
|
|
555
|
-
jsName: string;
|
|
568
|
+
path?: string | undefined;
|
|
556
569
|
name?: string | undefined;
|
|
557
570
|
url?: string | undefined;
|
|
571
|
+
jsName?: string | undefined;
|
|
572
|
+
icon?: string | undefined;
|
|
558
573
|
}[] | undefined;
|
|
559
574
|
packageAdditions?: {
|
|
560
575
|
dependencies?: Record<string, string> | undefined;
|
|
561
576
|
devDependencies?: Record<string, string> | undefined;
|
|
562
577
|
scripts?: Record<string, string> | undefined;
|
|
563
578
|
} | undefined;
|
|
579
|
+
variables?: unknown[] | undefined;
|
|
564
580
|
shadcnComponents?: string[] | undefined;
|
|
565
581
|
dependsOn?: string[] | undefined;
|
|
566
582
|
smallLogo?: string | undefined;
|
|
@@ -606,18 +622,21 @@ export declare const StarterCompiledSchema: z.ZodObject<{
|
|
|
606
622
|
routes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
607
623
|
url: z.ZodOptional<z.ZodString>;
|
|
608
624
|
name: z.ZodOptional<z.ZodString>;
|
|
609
|
-
path: z.ZodString
|
|
610
|
-
jsName: z.ZodString
|
|
625
|
+
path: z.ZodOptional<z.ZodString>;
|
|
626
|
+
jsName: z.ZodOptional<z.ZodString>;
|
|
627
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
611
628
|
}, "strip", z.ZodTypeAny, {
|
|
612
|
-
path
|
|
613
|
-
jsName: string;
|
|
629
|
+
path?: string | undefined;
|
|
614
630
|
name?: string | undefined;
|
|
615
631
|
url?: string | undefined;
|
|
632
|
+
jsName?: string | undefined;
|
|
633
|
+
icon?: string | undefined;
|
|
616
634
|
}, {
|
|
617
|
-
path
|
|
618
|
-
jsName: string;
|
|
635
|
+
path?: string | undefined;
|
|
619
636
|
name?: string | undefined;
|
|
620
637
|
url?: string | undefined;
|
|
638
|
+
jsName?: string | undefined;
|
|
639
|
+
icon?: string | undefined;
|
|
621
640
|
}>, "many">>;
|
|
622
641
|
packageAdditions: z.ZodOptional<z.ZodObject<{
|
|
623
642
|
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -632,6 +651,7 @@ export declare const StarterCompiledSchema: z.ZodObject<{
|
|
|
632
651
|
devDependencies?: Record<string, string> | undefined;
|
|
633
652
|
scripts?: Record<string, string> | undefined;
|
|
634
653
|
}>>;
|
|
654
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
635
655
|
shadcnComponents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
636
656
|
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
637
657
|
smallLogo: z.ZodOptional<z.ZodString>;
|
|
@@ -740,16 +760,18 @@ export declare const StarterCompiledSchema: z.ZodObject<{
|
|
|
740
760
|
color?: string | undefined;
|
|
741
761
|
priority?: number | undefined;
|
|
742
762
|
routes?: {
|
|
743
|
-
path
|
|
744
|
-
jsName: string;
|
|
763
|
+
path?: string | undefined;
|
|
745
764
|
name?: string | undefined;
|
|
746
765
|
url?: string | undefined;
|
|
766
|
+
jsName?: string | undefined;
|
|
767
|
+
icon?: string | undefined;
|
|
747
768
|
}[] | undefined;
|
|
748
769
|
packageAdditions?: {
|
|
749
770
|
dependencies?: Record<string, string> | undefined;
|
|
750
771
|
devDependencies?: Record<string, string> | undefined;
|
|
751
772
|
scripts?: Record<string, string> | undefined;
|
|
752
773
|
} | undefined;
|
|
774
|
+
variables?: unknown[] | undefined;
|
|
753
775
|
shadcnComponents?: string[] | undefined;
|
|
754
776
|
dependsOn?: string[] | undefined;
|
|
755
777
|
smallLogo?: string | undefined;
|
|
@@ -802,16 +824,18 @@ export declare const StarterCompiledSchema: z.ZodObject<{
|
|
|
802
824
|
color?: string | undefined;
|
|
803
825
|
priority?: number | undefined;
|
|
804
826
|
routes?: {
|
|
805
|
-
path
|
|
806
|
-
jsName: string;
|
|
827
|
+
path?: string | undefined;
|
|
807
828
|
name?: string | undefined;
|
|
808
829
|
url?: string | undefined;
|
|
830
|
+
jsName?: string | undefined;
|
|
831
|
+
icon?: string | undefined;
|
|
809
832
|
}[] | undefined;
|
|
810
833
|
packageAdditions?: {
|
|
811
834
|
dependencies?: Record<string, string> | undefined;
|
|
812
835
|
devDependencies?: Record<string, string> | undefined;
|
|
813
836
|
scripts?: Record<string, string> | undefined;
|
|
814
837
|
} | undefined;
|
|
838
|
+
variables?: unknown[] | undefined;
|
|
815
839
|
shadcnComponents?: string[] | undefined;
|
|
816
840
|
dependsOn?: string[] | undefined;
|
|
817
841
|
smallLogo?: string | undefined;
|
|
@@ -876,18 +900,21 @@ export declare const AddOnInfoSchema: z.ZodObject<{
|
|
|
876
900
|
routes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
877
901
|
url: z.ZodOptional<z.ZodString>;
|
|
878
902
|
name: z.ZodOptional<z.ZodString>;
|
|
879
|
-
path: z.ZodString
|
|
880
|
-
jsName: z.ZodString
|
|
903
|
+
path: z.ZodOptional<z.ZodString>;
|
|
904
|
+
jsName: z.ZodOptional<z.ZodString>;
|
|
905
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
881
906
|
}, "strip", z.ZodTypeAny, {
|
|
882
|
-
path
|
|
883
|
-
jsName: string;
|
|
907
|
+
path?: string | undefined;
|
|
884
908
|
name?: string | undefined;
|
|
885
909
|
url?: string | undefined;
|
|
910
|
+
jsName?: string | undefined;
|
|
911
|
+
icon?: string | undefined;
|
|
886
912
|
}, {
|
|
887
|
-
path
|
|
888
|
-
jsName: string;
|
|
913
|
+
path?: string | undefined;
|
|
889
914
|
name?: string | undefined;
|
|
890
915
|
url?: string | undefined;
|
|
916
|
+
jsName?: string | undefined;
|
|
917
|
+
icon?: string | undefined;
|
|
891
918
|
}>, "many">>;
|
|
892
919
|
packageAdditions: z.ZodOptional<z.ZodObject<{
|
|
893
920
|
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -902,6 +929,7 @@ export declare const AddOnInfoSchema: z.ZodObject<{
|
|
|
902
929
|
devDependencies?: Record<string, string> | undefined;
|
|
903
930
|
scripts?: Record<string, string> | undefined;
|
|
904
931
|
}>>;
|
|
932
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
905
933
|
shadcnComponents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
906
934
|
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
907
935
|
smallLogo: z.ZodOptional<z.ZodString>;
|
|
@@ -987,7 +1015,7 @@ export declare const AddOnInfoSchema: z.ZodObject<{
|
|
|
987
1015
|
jsName?: string | undefined;
|
|
988
1016
|
import?: string | undefined;
|
|
989
1017
|
}>, "many">>;
|
|
990
|
-
phase: z.ZodEnum<["setup", "add-on"]>;
|
|
1018
|
+
phase: z.ZodEnum<["setup", "add-on", "example"]>;
|
|
991
1019
|
readme: z.ZodOptional<z.ZodString>;
|
|
992
1020
|
readmeIsEjs: z.ZodOptional<z.ZodBoolean>;
|
|
993
1021
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -996,7 +1024,7 @@ export declare const AddOnInfoSchema: z.ZodObject<{
|
|
|
996
1024
|
id: string;
|
|
997
1025
|
name: string;
|
|
998
1026
|
modes: string[];
|
|
999
|
-
phase: "add-on" | "setup";
|
|
1027
|
+
phase: "add-on" | "example" | "setup";
|
|
1000
1028
|
command?: {
|
|
1001
1029
|
command: string;
|
|
1002
1030
|
args?: string[] | undefined;
|
|
@@ -1023,16 +1051,18 @@ export declare const AddOnInfoSchema: z.ZodObject<{
|
|
|
1023
1051
|
color?: string | undefined;
|
|
1024
1052
|
priority?: number | undefined;
|
|
1025
1053
|
routes?: {
|
|
1026
|
-
path
|
|
1027
|
-
jsName: string;
|
|
1054
|
+
path?: string | undefined;
|
|
1028
1055
|
name?: string | undefined;
|
|
1029
1056
|
url?: string | undefined;
|
|
1057
|
+
jsName?: string | undefined;
|
|
1058
|
+
icon?: string | undefined;
|
|
1030
1059
|
}[] | undefined;
|
|
1031
1060
|
packageAdditions?: {
|
|
1032
1061
|
dependencies?: Record<string, string> | undefined;
|
|
1033
1062
|
devDependencies?: Record<string, string> | undefined;
|
|
1034
1063
|
scripts?: Record<string, string> | undefined;
|
|
1035
1064
|
} | undefined;
|
|
1065
|
+
variables?: unknown[] | undefined;
|
|
1036
1066
|
shadcnComponents?: string[] | undefined;
|
|
1037
1067
|
dependsOn?: string[] | undefined;
|
|
1038
1068
|
smallLogo?: string | undefined;
|
|
@@ -1063,7 +1093,7 @@ export declare const AddOnInfoSchema: z.ZodObject<{
|
|
|
1063
1093
|
id: string;
|
|
1064
1094
|
name: string;
|
|
1065
1095
|
modes: string[];
|
|
1066
|
-
phase: "add-on" | "setup";
|
|
1096
|
+
phase: "add-on" | "example" | "setup";
|
|
1067
1097
|
command?: {
|
|
1068
1098
|
command: string;
|
|
1069
1099
|
args?: string[] | undefined;
|
|
@@ -1090,16 +1120,18 @@ export declare const AddOnInfoSchema: z.ZodObject<{
|
|
|
1090
1120
|
color?: string | undefined;
|
|
1091
1121
|
priority?: number | undefined;
|
|
1092
1122
|
routes?: {
|
|
1093
|
-
path
|
|
1094
|
-
jsName: string;
|
|
1123
|
+
path?: string | undefined;
|
|
1095
1124
|
name?: string | undefined;
|
|
1096
1125
|
url?: string | undefined;
|
|
1126
|
+
jsName?: string | undefined;
|
|
1127
|
+
icon?: string | undefined;
|
|
1097
1128
|
}[] | undefined;
|
|
1098
1129
|
packageAdditions?: {
|
|
1099
1130
|
dependencies?: Record<string, string> | undefined;
|
|
1100
1131
|
devDependencies?: Record<string, string> | undefined;
|
|
1101
1132
|
scripts?: Record<string, string> | undefined;
|
|
1102
1133
|
} | undefined;
|
|
1134
|
+
variables?: unknown[] | undefined;
|
|
1103
1135
|
shadcnComponents?: string[] | undefined;
|
|
1104
1136
|
dependsOn?: string[] | undefined;
|
|
1105
1137
|
smallLogo?: string | undefined;
|
|
@@ -1153,18 +1185,21 @@ export declare const AddOnCompiledSchema: z.ZodObject<{
|
|
|
1153
1185
|
routes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1154
1186
|
url: z.ZodOptional<z.ZodString>;
|
|
1155
1187
|
name: z.ZodOptional<z.ZodString>;
|
|
1156
|
-
path: z.ZodString
|
|
1157
|
-
jsName: z.ZodString
|
|
1188
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1189
|
+
jsName: z.ZodOptional<z.ZodString>;
|
|
1190
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1158
1191
|
}, "strip", z.ZodTypeAny, {
|
|
1159
|
-
path
|
|
1160
|
-
jsName: string;
|
|
1192
|
+
path?: string | undefined;
|
|
1161
1193
|
name?: string | undefined;
|
|
1162
1194
|
url?: string | undefined;
|
|
1195
|
+
jsName?: string | undefined;
|
|
1196
|
+
icon?: string | undefined;
|
|
1163
1197
|
}, {
|
|
1164
|
-
path
|
|
1165
|
-
jsName: string;
|
|
1198
|
+
path?: string | undefined;
|
|
1166
1199
|
name?: string | undefined;
|
|
1167
1200
|
url?: string | undefined;
|
|
1201
|
+
jsName?: string | undefined;
|
|
1202
|
+
icon?: string | undefined;
|
|
1168
1203
|
}>, "many">>;
|
|
1169
1204
|
packageAdditions: z.ZodOptional<z.ZodObject<{
|
|
1170
1205
|
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -1179,6 +1214,7 @@ export declare const AddOnCompiledSchema: z.ZodObject<{
|
|
|
1179
1214
|
devDependencies?: Record<string, string> | undefined;
|
|
1180
1215
|
scripts?: Record<string, string> | undefined;
|
|
1181
1216
|
}>>;
|
|
1217
|
+
variables: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
1182
1218
|
shadcnComponents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1183
1219
|
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1184
1220
|
smallLogo: z.ZodOptional<z.ZodString>;
|
|
@@ -1264,7 +1300,7 @@ export declare const AddOnCompiledSchema: z.ZodObject<{
|
|
|
1264
1300
|
jsName?: string | undefined;
|
|
1265
1301
|
import?: string | undefined;
|
|
1266
1302
|
}>, "many">>;
|
|
1267
|
-
phase: z.ZodEnum<["setup", "add-on"]>;
|
|
1303
|
+
phase: z.ZodEnum<["setup", "add-on", "example"]>;
|
|
1268
1304
|
readme: z.ZodOptional<z.ZodString>;
|
|
1269
1305
|
readmeIsEjs: z.ZodOptional<z.ZodBoolean>;
|
|
1270
1306
|
} & {
|
|
@@ -1279,7 +1315,7 @@ export declare const AddOnCompiledSchema: z.ZodObject<{
|
|
|
1279
1315
|
files: Record<string, string>;
|
|
1280
1316
|
deletedFiles: string[];
|
|
1281
1317
|
modes: string[];
|
|
1282
|
-
phase: "add-on" | "setup";
|
|
1318
|
+
phase: "add-on" | "example" | "setup";
|
|
1283
1319
|
command?: {
|
|
1284
1320
|
command: string;
|
|
1285
1321
|
args?: string[] | undefined;
|
|
@@ -1306,16 +1342,18 @@ export declare const AddOnCompiledSchema: z.ZodObject<{
|
|
|
1306
1342
|
color?: string | undefined;
|
|
1307
1343
|
priority?: number | undefined;
|
|
1308
1344
|
routes?: {
|
|
1309
|
-
path
|
|
1310
|
-
jsName: string;
|
|
1345
|
+
path?: string | undefined;
|
|
1311
1346
|
name?: string | undefined;
|
|
1312
1347
|
url?: string | undefined;
|
|
1348
|
+
jsName?: string | undefined;
|
|
1349
|
+
icon?: string | undefined;
|
|
1313
1350
|
}[] | undefined;
|
|
1314
1351
|
packageAdditions?: {
|
|
1315
1352
|
dependencies?: Record<string, string> | undefined;
|
|
1316
1353
|
devDependencies?: Record<string, string> | undefined;
|
|
1317
1354
|
scripts?: Record<string, string> | undefined;
|
|
1318
1355
|
} | undefined;
|
|
1356
|
+
variables?: unknown[] | undefined;
|
|
1319
1357
|
shadcnComponents?: string[] | undefined;
|
|
1320
1358
|
dependsOn?: string[] | undefined;
|
|
1321
1359
|
smallLogo?: string | undefined;
|
|
@@ -1349,7 +1387,7 @@ export declare const AddOnCompiledSchema: z.ZodObject<{
|
|
|
1349
1387
|
files: Record<string, string>;
|
|
1350
1388
|
deletedFiles: string[];
|
|
1351
1389
|
modes: string[];
|
|
1352
|
-
phase: "add-on" | "setup";
|
|
1390
|
+
phase: "add-on" | "example" | "setup";
|
|
1353
1391
|
command?: {
|
|
1354
1392
|
command: string;
|
|
1355
1393
|
args?: string[] | undefined;
|
|
@@ -1376,16 +1414,18 @@ export declare const AddOnCompiledSchema: z.ZodObject<{
|
|
|
1376
1414
|
color?: string | undefined;
|
|
1377
1415
|
priority?: number | undefined;
|
|
1378
1416
|
routes?: {
|
|
1379
|
-
path
|
|
1380
|
-
jsName: string;
|
|
1417
|
+
path?: string | undefined;
|
|
1381
1418
|
name?: string | undefined;
|
|
1382
1419
|
url?: string | undefined;
|
|
1420
|
+
jsName?: string | undefined;
|
|
1421
|
+
icon?: string | undefined;
|
|
1383
1422
|
}[] | undefined;
|
|
1384
1423
|
packageAdditions?: {
|
|
1385
1424
|
dependencies?: Record<string, string> | undefined;
|
|
1386
1425
|
devDependencies?: Record<string, string> | undefined;
|
|
1387
1426
|
scripts?: Record<string, string> | undefined;
|
|
1388
1427
|
} | undefined;
|
|
1428
|
+
variables?: unknown[] | undefined;
|
|
1389
1429
|
shadcnComponents?: string[] | undefined;
|
|
1390
1430
|
dependsOn?: string[] | undefined;
|
|
1391
1431
|
smallLogo?: string | undefined;
|
package/dist/types.js
CHANGED
|
@@ -56,8 +56,9 @@ export const AddOnBaseSchema = z.object({
|
|
|
56
56
|
.array(z.object({
|
|
57
57
|
url: z.string().optional(),
|
|
58
58
|
name: z.string().optional(),
|
|
59
|
-
path: z.string(),
|
|
60
|
-
jsName: z.string(),
|
|
59
|
+
path: z.string().optional(),
|
|
60
|
+
jsName: z.string().optional(),
|
|
61
|
+
icon: z.string().optional(),
|
|
61
62
|
}))
|
|
62
63
|
.optional(),
|
|
63
64
|
packageAdditions: z
|
|
@@ -67,6 +68,7 @@ export const AddOnBaseSchema = z.object({
|
|
|
67
68
|
scripts: z.record(z.string(), z.string()).optional(),
|
|
68
69
|
})
|
|
69
70
|
.optional(),
|
|
71
|
+
variables: z.array(z.unknown()).optional(),
|
|
70
72
|
shadcnComponents: z.array(z.string()).optional(),
|
|
71
73
|
dependsOn: z.array(z.string()).optional(),
|
|
72
74
|
smallLogo: z.string().optional(),
|
|
@@ -107,7 +109,7 @@ export const IntegrationSchema = z.object({
|
|
|
107
109
|
export const AddOnInfoSchema = AddOnBaseSchema.extend({
|
|
108
110
|
modes: z.array(z.string()),
|
|
109
111
|
integrations: z.array(IntegrationSchema).optional(),
|
|
110
|
-
phase: z.enum(['setup', 'add-on']),
|
|
112
|
+
phase: z.enum(['setup', 'add-on', 'example']),
|
|
111
113
|
readme: z.string().optional(),
|
|
112
114
|
readmeIsEjs: z.boolean().optional(),
|
|
113
115
|
});
|