create-krispya 0.8.0 → 0.10.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/README.md +28 -6
- package/dist/cli.cjs +1302 -1576
- package/dist/cli.d.cts +36 -0
- package/dist/cli.d.mts +36 -0
- package/dist/cli.d.ts +36 -0
- package/dist/cli.mjs +1326 -1600
- package/dist/index.cjs +52 -15
- package/dist/index.d.cts +81 -172
- package/dist/index.d.mts +81 -172
- package/dist/index.d.ts +81 -172
- package/dist/index.mjs +34 -1
- package/dist/{chunks/index.mjs → shared/create-krispya.DKKVmsqH.mjs} +1358 -741
- package/dist/{chunks/index.cjs → shared/create-krispya.DTHeUlq4.cjs} +1381 -754
- package/dist/shared/create-krispya.to8NBxeJ.d.cts +237 -0
- package/dist/shared/create-krispya.to8NBxeJ.d.mts +237 -0
- package/dist/shared/create-krispya.to8NBxeJ.d.ts +237 -0
- package/package.json +7 -3
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
type Template = 'vanilla' | 'vanilla-js' | 'react' | 'react-js' | 'r3f' | 'r3f-js';
|
|
2
|
+
type BaseTemplate = 'vanilla' | 'react' | 'r3f';
|
|
3
|
+
type ProjectType = 'app' | 'library' | 'monorepo';
|
|
4
|
+
type LibraryBundler = 'unbuild' | 'tsdown';
|
|
5
|
+
type PackageManagerName = 'pnpm' | 'npm' | 'yarn';
|
|
6
|
+
type PackageManagerSpec = {
|
|
7
|
+
name: PackageManagerName;
|
|
8
|
+
version?: string;
|
|
9
|
+
};
|
|
10
|
+
type EngineName = string;
|
|
11
|
+
type EngineSpec = {
|
|
12
|
+
name: EngineName;
|
|
13
|
+
version?: string;
|
|
14
|
+
};
|
|
15
|
+
type PackageVersions = Record<string, string>;
|
|
16
|
+
type VersionRangePrefix = '^' | '~' | '';
|
|
17
|
+
type DependencyVersionOptions = {
|
|
18
|
+
prefix?: VersionRangePrefix;
|
|
19
|
+
version?: string;
|
|
20
|
+
};
|
|
21
|
+
type VirtualFile = {
|
|
22
|
+
type: 'text';
|
|
23
|
+
content: string;
|
|
24
|
+
} | {
|
|
25
|
+
type: 'remote';
|
|
26
|
+
url: string;
|
|
27
|
+
};
|
|
28
|
+
type FileRenderer<Input> = (input: Input) => VirtualFile;
|
|
29
|
+
type VirtualFileMap = Record<string, VirtualFile>;
|
|
30
|
+
type Linter = 'eslint' | 'oxlint' | 'biome';
|
|
31
|
+
type Formatter = 'prettier' | 'oxfmt' | 'biome';
|
|
32
|
+
type Testing = 'vitest' | 'none';
|
|
33
|
+
type ConfigStrategy = 'stealth' | 'root';
|
|
34
|
+
type Ide = 'vscode' | 'none';
|
|
35
|
+
type FormatterMetaConfig = {
|
|
36
|
+
printWidth: number;
|
|
37
|
+
tabWidth: number;
|
|
38
|
+
useTabs: boolean;
|
|
39
|
+
semi: boolean;
|
|
40
|
+
singleQuote: boolean;
|
|
41
|
+
trailingComma: 'none' | 'es5' | 'all';
|
|
42
|
+
bracketSpacing: boolean;
|
|
43
|
+
arrowParens: 'always' | 'avoid';
|
|
44
|
+
ignorePatterns: string[];
|
|
45
|
+
};
|
|
46
|
+
type LinterMetaConfig = {
|
|
47
|
+
ignorePatterns: string[];
|
|
48
|
+
rules: {
|
|
49
|
+
noUnusedVars: {
|
|
50
|
+
level: 'off' | 'warn' | 'error';
|
|
51
|
+
argsIgnorePattern: string;
|
|
52
|
+
varsIgnorePattern: string;
|
|
53
|
+
caughtErrorsIgnorePattern: string;
|
|
54
|
+
};
|
|
55
|
+
noUnusedExpressions: {
|
|
56
|
+
level: 'off' | 'warn' | 'error';
|
|
57
|
+
allowShortCircuit: boolean;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
type TypeScriptMetaConfig = {
|
|
62
|
+
configStrategy?: ConfigStrategy;
|
|
63
|
+
};
|
|
64
|
+
type EditorMetaConfig = Record<string, never>;
|
|
65
|
+
type TestingMetaConfig = Record<string, never>;
|
|
66
|
+
type LibraryBundlerMetaConfig = Record<string, never>;
|
|
67
|
+
type PackageManagerMetaConfig = {
|
|
68
|
+
version?: string;
|
|
69
|
+
pnpmManageVersions?: boolean;
|
|
70
|
+
};
|
|
71
|
+
type ToolConfig<Tool extends string, Config> = {
|
|
72
|
+
tool: Tool;
|
|
73
|
+
config: Config;
|
|
74
|
+
};
|
|
75
|
+
type CodeInjectionLocation = 'vite-config-import' | 'import' | 'global-start' | 'global-end' | 'dom-start' | 'dom' | 'dom-end' | 'scene-start' | 'scene' | 'scene-end' | 'readme-start' | 'readme-end' | 'readme-libraries' | 'readme-tools' | 'readme-commands' | 'vscode-extension-suggestion' | 'vscode-setting';
|
|
76
|
+
type PlanFiberOptions = {
|
|
77
|
+
/** @default true */
|
|
78
|
+
addExample?: boolean;
|
|
79
|
+
} | boolean;
|
|
80
|
+
type PlanDreiOptions = {} | boolean;
|
|
81
|
+
type PlanHandleOptions = {} | boolean;
|
|
82
|
+
type PlanKootaOptions = {
|
|
83
|
+
/** @default true */
|
|
84
|
+
addExample?: boolean;
|
|
85
|
+
} | boolean;
|
|
86
|
+
type PlanLevaOptions = {} | boolean;
|
|
87
|
+
type PlanOffscreenOptions = {} | boolean;
|
|
88
|
+
type PlanPostprocessingOptions = {} | boolean;
|
|
89
|
+
type PlanRapierOptions = {} | boolean;
|
|
90
|
+
type PlanTriplexOptions = {} | boolean;
|
|
91
|
+
type PlanUikitOptions = {} | boolean;
|
|
92
|
+
type PlanViverseOptions = {} | boolean;
|
|
93
|
+
type PlanXrOptions = {
|
|
94
|
+
storeOptions?: unknown;
|
|
95
|
+
} | boolean;
|
|
96
|
+
type PlanZustandOptions = {
|
|
97
|
+
/** @default true */
|
|
98
|
+
addExample?: boolean;
|
|
99
|
+
} | boolean;
|
|
100
|
+
type PlanGithubPagesOptions = {} | boolean;
|
|
101
|
+
type AiPlatform = 'agents' | 'claude';
|
|
102
|
+
type AiAgentsMetaConfig = {
|
|
103
|
+
platforms: AiPlatform[];
|
|
104
|
+
};
|
|
105
|
+
type ProjectMetaConfig = {
|
|
106
|
+
githubUserName?: string;
|
|
107
|
+
githubRepoName?: string;
|
|
108
|
+
name: string;
|
|
109
|
+
projectType?: ProjectType;
|
|
110
|
+
template?: Template;
|
|
111
|
+
};
|
|
112
|
+
type FeatureSelections = {
|
|
113
|
+
fiber?: PlanFiberOptions;
|
|
114
|
+
handle?: PlanHandleOptions;
|
|
115
|
+
drei?: PlanDreiOptions;
|
|
116
|
+
koota?: PlanKootaOptions;
|
|
117
|
+
leva?: PlanLevaOptions;
|
|
118
|
+
offscreen?: PlanOffscreenOptions;
|
|
119
|
+
postprocessing?: PlanPostprocessingOptions;
|
|
120
|
+
rapier?: PlanRapierOptions;
|
|
121
|
+
triplex?: PlanTriplexOptions;
|
|
122
|
+
viverse?: PlanViverseOptions;
|
|
123
|
+
uikit?: PlanUikitOptions;
|
|
124
|
+
xr?: PlanXrOptions;
|
|
125
|
+
zustand?: PlanZustandOptions;
|
|
126
|
+
githubPages?: PlanGithubPagesOptions;
|
|
127
|
+
};
|
|
128
|
+
type ProjectPlanContext = {
|
|
129
|
+
dependencies?: Record<string, string>;
|
|
130
|
+
engine?: EngineSpec;
|
|
131
|
+
files?: VirtualFileMap;
|
|
132
|
+
injections?: Array<{
|
|
133
|
+
location: CodeInjectionLocation;
|
|
134
|
+
code: string;
|
|
135
|
+
}>;
|
|
136
|
+
replacements?: Array<{
|
|
137
|
+
search: string;
|
|
138
|
+
replace: string;
|
|
139
|
+
}>;
|
|
140
|
+
versions?: PackageVersions;
|
|
141
|
+
workspaceRoot?: string;
|
|
142
|
+
workspaceDependencies?: string[];
|
|
143
|
+
};
|
|
144
|
+
type ProjectPlanInput = {
|
|
145
|
+
project: ProjectMetaConfig;
|
|
146
|
+
aiAgents: ToolConfig<'ai-agents', AiAgentsMetaConfig>;
|
|
147
|
+
formatter: ToolConfig<Formatter, FormatterMetaConfig>;
|
|
148
|
+
linter: ToolConfig<Linter, LinterMetaConfig>;
|
|
149
|
+
testing: ToolConfig<Testing, TestingMetaConfig>;
|
|
150
|
+
typescript: ToolConfig<'typescript', TypeScriptMetaConfig>;
|
|
151
|
+
ide: ToolConfig<Ide, EditorMetaConfig>;
|
|
152
|
+
packageManager: ToolConfig<PackageManagerName, PackageManagerMetaConfig>;
|
|
153
|
+
libraryBundler: ToolConfig<LibraryBundler, LibraryBundlerMetaConfig>;
|
|
154
|
+
features: FeatureSelections;
|
|
155
|
+
context: ProjectPlanContext;
|
|
156
|
+
};
|
|
157
|
+
type WorkspacePlanContext = {
|
|
158
|
+
engine?: EngineSpec;
|
|
159
|
+
pnpmManageVersions?: boolean;
|
|
160
|
+
versions?: PackageVersions;
|
|
161
|
+
};
|
|
162
|
+
type WorkspacePlanInput = {
|
|
163
|
+
project: Pick<ProjectMetaConfig, 'name'>;
|
|
164
|
+
aiAgents: ToolConfig<'ai-agents', AiAgentsMetaConfig>;
|
|
165
|
+
formatter: ToolConfig<Formatter, FormatterMetaConfig>;
|
|
166
|
+
linter: ToolConfig<Linter, LinterMetaConfig>;
|
|
167
|
+
ide: ToolConfig<Ide, EditorMetaConfig>;
|
|
168
|
+
packageManager: ToolConfig<PackageManagerName, PackageManagerMetaConfig>;
|
|
169
|
+
context: WorkspacePlanContext;
|
|
170
|
+
};
|
|
171
|
+
type ProjectOptions = {
|
|
172
|
+
githubUserName?: string;
|
|
173
|
+
githubRepoName?: string;
|
|
174
|
+
name: string;
|
|
175
|
+
projectType?: ProjectType;
|
|
176
|
+
libraryBundler?: LibraryBundler;
|
|
177
|
+
template?: Template;
|
|
178
|
+
linter?: Linter;
|
|
179
|
+
formatter?: Formatter;
|
|
180
|
+
testing?: Testing;
|
|
181
|
+
configStrategy?: ConfigStrategy;
|
|
182
|
+
ide?: Ide;
|
|
183
|
+
/** AI platforms to generate pointer files for */
|
|
184
|
+
aiPlatforms?: AiPlatform[];
|
|
185
|
+
versions?: PackageVersions;
|
|
186
|
+
fiber?: PlanFiberOptions;
|
|
187
|
+
handle?: PlanHandleOptions;
|
|
188
|
+
drei?: PlanDreiOptions;
|
|
189
|
+
koota?: PlanKootaOptions;
|
|
190
|
+
leva?: PlanLevaOptions;
|
|
191
|
+
offscreen?: PlanOffscreenOptions;
|
|
192
|
+
postprocessing?: PlanPostprocessingOptions;
|
|
193
|
+
rapier?: PlanRapierOptions;
|
|
194
|
+
triplex?: PlanTriplexOptions;
|
|
195
|
+
viverse?: PlanViverseOptions;
|
|
196
|
+
uikit?: PlanUikitOptions;
|
|
197
|
+
xr?: PlanXrOptions;
|
|
198
|
+
zustand?: PlanZustandOptions;
|
|
199
|
+
githubPages?: PlanGithubPagesOptions;
|
|
200
|
+
dependencies?: Record<string, string>;
|
|
201
|
+
files?: VirtualFileMap;
|
|
202
|
+
injections?: Array<{
|
|
203
|
+
location: CodeInjectionLocation;
|
|
204
|
+
code: string;
|
|
205
|
+
}>;
|
|
206
|
+
replacements?: Array<{
|
|
207
|
+
search: string;
|
|
208
|
+
replace: string;
|
|
209
|
+
}>;
|
|
210
|
+
packageManager?: PackageManagerSpec;
|
|
211
|
+
pnpmManageVersions?: boolean;
|
|
212
|
+
engine?: EngineSpec;
|
|
213
|
+
workspaceRoot?: string;
|
|
214
|
+
workspaceDependencies?: string[];
|
|
215
|
+
};
|
|
216
|
+
type PlanBuilder = {
|
|
217
|
+
get options(): ProjectOptions;
|
|
218
|
+
get versions(): PackageVersions;
|
|
219
|
+
getVersion(name: string): string;
|
|
220
|
+
/** Returns true if using stealth config strategy (configs in .config/) */
|
|
221
|
+
isStealthConfig(): boolean;
|
|
222
|
+
addDependency(name: string, options?: DependencyVersionOptions): void;
|
|
223
|
+
addDevDependency(name: string, options?: DependencyVersionOptions): void;
|
|
224
|
+
addPeerDependency(name: string, semver: string): void;
|
|
225
|
+
addFile(path: string, file: VirtualFile): void;
|
|
226
|
+
addScripts(scripts: Record<string, string>): void;
|
|
227
|
+
addScript(name: string, command: string): void;
|
|
228
|
+
inject(location: CodeInjectionLocation, code: string): void;
|
|
229
|
+
replace(search: string, replace: string): void;
|
|
230
|
+
configureVite(object: unknown): void;
|
|
231
|
+
addVscodeSetting(key: string, value: unknown): void;
|
|
232
|
+
};
|
|
233
|
+
declare function getLanguageFromTemplate(template: Template): 'javascript' | 'typescript';
|
|
234
|
+
declare function getBaseTemplate(template: Template): BaseTemplate;
|
|
235
|
+
|
|
236
|
+
export { getLanguageFromTemplate as $, getBaseTemplate as _ };
|
|
237
|
+
export type { AiPlatform as A, BaseTemplate as B, CodeInjectionLocation as C, DependencyVersionOptions as D, EngineSpec as E, FormatterMetaConfig as F, PlanTriplexOptions as G, PlanUikitOptions as H, Ide as I, PlanViverseOptions as J, PlanXrOptions as K, LinterMetaConfig as L, PlanZustandOptions as M, ProjectMetaConfig as N, ProjectPlanContext as O, ProjectType as P, Template as Q, TestingMetaConfig as R, ToolConfig as S, Testing as T, TypeScriptMetaConfig as U, VirtualFileMap as V, WorkspacePlanInput as W, VersionRangePrefix as X, VirtualFile as Y, WorkspacePlanContext as Z, ConfigStrategy as a, PackageVersions as b, Linter as c, Formatter as d, LibraryBundler as e, PackageManagerSpec as f, ProjectPlanInput as g, ProjectOptions as h, AiAgentsMetaConfig as i, EditorMetaConfig as j, EngineName as k, FeatureSelections as l, FileRenderer as m, LibraryBundlerMetaConfig as n, PackageManagerMetaConfig as o, PackageManagerName as p, PlanBuilder as q, PlanDreiOptions as r, PlanFiberOptions as s, PlanGithubPagesOptions as t, PlanHandleOptions as u, PlanKootaOptions as v, PlanLevaOptions as w, PlanOffscreenOptions as x, PlanPostprocessingOptions as y, PlanRapierOptions as z };
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
type Template = 'vanilla' | 'vanilla-js' | 'react' | 'react-js' | 'r3f' | 'r3f-js';
|
|
2
|
+
type BaseTemplate = 'vanilla' | 'react' | 'r3f';
|
|
3
|
+
type ProjectType = 'app' | 'library' | 'monorepo';
|
|
4
|
+
type LibraryBundler = 'unbuild' | 'tsdown';
|
|
5
|
+
type PackageManagerName = 'pnpm' | 'npm' | 'yarn';
|
|
6
|
+
type PackageManagerSpec = {
|
|
7
|
+
name: PackageManagerName;
|
|
8
|
+
version?: string;
|
|
9
|
+
};
|
|
10
|
+
type EngineName = string;
|
|
11
|
+
type EngineSpec = {
|
|
12
|
+
name: EngineName;
|
|
13
|
+
version?: string;
|
|
14
|
+
};
|
|
15
|
+
type PackageVersions = Record<string, string>;
|
|
16
|
+
type VersionRangePrefix = '^' | '~' | '';
|
|
17
|
+
type DependencyVersionOptions = {
|
|
18
|
+
prefix?: VersionRangePrefix;
|
|
19
|
+
version?: string;
|
|
20
|
+
};
|
|
21
|
+
type VirtualFile = {
|
|
22
|
+
type: 'text';
|
|
23
|
+
content: string;
|
|
24
|
+
} | {
|
|
25
|
+
type: 'remote';
|
|
26
|
+
url: string;
|
|
27
|
+
};
|
|
28
|
+
type FileRenderer<Input> = (input: Input) => VirtualFile;
|
|
29
|
+
type VirtualFileMap = Record<string, VirtualFile>;
|
|
30
|
+
type Linter = 'eslint' | 'oxlint' | 'biome';
|
|
31
|
+
type Formatter = 'prettier' | 'oxfmt' | 'biome';
|
|
32
|
+
type Testing = 'vitest' | 'none';
|
|
33
|
+
type ConfigStrategy = 'stealth' | 'root';
|
|
34
|
+
type Ide = 'vscode' | 'none';
|
|
35
|
+
type FormatterMetaConfig = {
|
|
36
|
+
printWidth: number;
|
|
37
|
+
tabWidth: number;
|
|
38
|
+
useTabs: boolean;
|
|
39
|
+
semi: boolean;
|
|
40
|
+
singleQuote: boolean;
|
|
41
|
+
trailingComma: 'none' | 'es5' | 'all';
|
|
42
|
+
bracketSpacing: boolean;
|
|
43
|
+
arrowParens: 'always' | 'avoid';
|
|
44
|
+
ignorePatterns: string[];
|
|
45
|
+
};
|
|
46
|
+
type LinterMetaConfig = {
|
|
47
|
+
ignorePatterns: string[];
|
|
48
|
+
rules: {
|
|
49
|
+
noUnusedVars: {
|
|
50
|
+
level: 'off' | 'warn' | 'error';
|
|
51
|
+
argsIgnorePattern: string;
|
|
52
|
+
varsIgnorePattern: string;
|
|
53
|
+
caughtErrorsIgnorePattern: string;
|
|
54
|
+
};
|
|
55
|
+
noUnusedExpressions: {
|
|
56
|
+
level: 'off' | 'warn' | 'error';
|
|
57
|
+
allowShortCircuit: boolean;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
type TypeScriptMetaConfig = {
|
|
62
|
+
configStrategy?: ConfigStrategy;
|
|
63
|
+
};
|
|
64
|
+
type EditorMetaConfig = Record<string, never>;
|
|
65
|
+
type TestingMetaConfig = Record<string, never>;
|
|
66
|
+
type LibraryBundlerMetaConfig = Record<string, never>;
|
|
67
|
+
type PackageManagerMetaConfig = {
|
|
68
|
+
version?: string;
|
|
69
|
+
pnpmManageVersions?: boolean;
|
|
70
|
+
};
|
|
71
|
+
type ToolConfig<Tool extends string, Config> = {
|
|
72
|
+
tool: Tool;
|
|
73
|
+
config: Config;
|
|
74
|
+
};
|
|
75
|
+
type CodeInjectionLocation = 'vite-config-import' | 'import' | 'global-start' | 'global-end' | 'dom-start' | 'dom' | 'dom-end' | 'scene-start' | 'scene' | 'scene-end' | 'readme-start' | 'readme-end' | 'readme-libraries' | 'readme-tools' | 'readme-commands' | 'vscode-extension-suggestion' | 'vscode-setting';
|
|
76
|
+
type PlanFiberOptions = {
|
|
77
|
+
/** @default true */
|
|
78
|
+
addExample?: boolean;
|
|
79
|
+
} | boolean;
|
|
80
|
+
type PlanDreiOptions = {} | boolean;
|
|
81
|
+
type PlanHandleOptions = {} | boolean;
|
|
82
|
+
type PlanKootaOptions = {
|
|
83
|
+
/** @default true */
|
|
84
|
+
addExample?: boolean;
|
|
85
|
+
} | boolean;
|
|
86
|
+
type PlanLevaOptions = {} | boolean;
|
|
87
|
+
type PlanOffscreenOptions = {} | boolean;
|
|
88
|
+
type PlanPostprocessingOptions = {} | boolean;
|
|
89
|
+
type PlanRapierOptions = {} | boolean;
|
|
90
|
+
type PlanTriplexOptions = {} | boolean;
|
|
91
|
+
type PlanUikitOptions = {} | boolean;
|
|
92
|
+
type PlanViverseOptions = {} | boolean;
|
|
93
|
+
type PlanXrOptions = {
|
|
94
|
+
storeOptions?: unknown;
|
|
95
|
+
} | boolean;
|
|
96
|
+
type PlanZustandOptions = {
|
|
97
|
+
/** @default true */
|
|
98
|
+
addExample?: boolean;
|
|
99
|
+
} | boolean;
|
|
100
|
+
type PlanGithubPagesOptions = {} | boolean;
|
|
101
|
+
type AiPlatform = 'agents' | 'claude';
|
|
102
|
+
type AiAgentsMetaConfig = {
|
|
103
|
+
platforms: AiPlatform[];
|
|
104
|
+
};
|
|
105
|
+
type ProjectMetaConfig = {
|
|
106
|
+
githubUserName?: string;
|
|
107
|
+
githubRepoName?: string;
|
|
108
|
+
name: string;
|
|
109
|
+
projectType?: ProjectType;
|
|
110
|
+
template?: Template;
|
|
111
|
+
};
|
|
112
|
+
type FeatureSelections = {
|
|
113
|
+
fiber?: PlanFiberOptions;
|
|
114
|
+
handle?: PlanHandleOptions;
|
|
115
|
+
drei?: PlanDreiOptions;
|
|
116
|
+
koota?: PlanKootaOptions;
|
|
117
|
+
leva?: PlanLevaOptions;
|
|
118
|
+
offscreen?: PlanOffscreenOptions;
|
|
119
|
+
postprocessing?: PlanPostprocessingOptions;
|
|
120
|
+
rapier?: PlanRapierOptions;
|
|
121
|
+
triplex?: PlanTriplexOptions;
|
|
122
|
+
viverse?: PlanViverseOptions;
|
|
123
|
+
uikit?: PlanUikitOptions;
|
|
124
|
+
xr?: PlanXrOptions;
|
|
125
|
+
zustand?: PlanZustandOptions;
|
|
126
|
+
githubPages?: PlanGithubPagesOptions;
|
|
127
|
+
};
|
|
128
|
+
type ProjectPlanContext = {
|
|
129
|
+
dependencies?: Record<string, string>;
|
|
130
|
+
engine?: EngineSpec;
|
|
131
|
+
files?: VirtualFileMap;
|
|
132
|
+
injections?: Array<{
|
|
133
|
+
location: CodeInjectionLocation;
|
|
134
|
+
code: string;
|
|
135
|
+
}>;
|
|
136
|
+
replacements?: Array<{
|
|
137
|
+
search: string;
|
|
138
|
+
replace: string;
|
|
139
|
+
}>;
|
|
140
|
+
versions?: PackageVersions;
|
|
141
|
+
workspaceRoot?: string;
|
|
142
|
+
workspaceDependencies?: string[];
|
|
143
|
+
};
|
|
144
|
+
type ProjectPlanInput = {
|
|
145
|
+
project: ProjectMetaConfig;
|
|
146
|
+
aiAgents: ToolConfig<'ai-agents', AiAgentsMetaConfig>;
|
|
147
|
+
formatter: ToolConfig<Formatter, FormatterMetaConfig>;
|
|
148
|
+
linter: ToolConfig<Linter, LinterMetaConfig>;
|
|
149
|
+
testing: ToolConfig<Testing, TestingMetaConfig>;
|
|
150
|
+
typescript: ToolConfig<'typescript', TypeScriptMetaConfig>;
|
|
151
|
+
ide: ToolConfig<Ide, EditorMetaConfig>;
|
|
152
|
+
packageManager: ToolConfig<PackageManagerName, PackageManagerMetaConfig>;
|
|
153
|
+
libraryBundler: ToolConfig<LibraryBundler, LibraryBundlerMetaConfig>;
|
|
154
|
+
features: FeatureSelections;
|
|
155
|
+
context: ProjectPlanContext;
|
|
156
|
+
};
|
|
157
|
+
type WorkspacePlanContext = {
|
|
158
|
+
engine?: EngineSpec;
|
|
159
|
+
pnpmManageVersions?: boolean;
|
|
160
|
+
versions?: PackageVersions;
|
|
161
|
+
};
|
|
162
|
+
type WorkspacePlanInput = {
|
|
163
|
+
project: Pick<ProjectMetaConfig, 'name'>;
|
|
164
|
+
aiAgents: ToolConfig<'ai-agents', AiAgentsMetaConfig>;
|
|
165
|
+
formatter: ToolConfig<Formatter, FormatterMetaConfig>;
|
|
166
|
+
linter: ToolConfig<Linter, LinterMetaConfig>;
|
|
167
|
+
ide: ToolConfig<Ide, EditorMetaConfig>;
|
|
168
|
+
packageManager: ToolConfig<PackageManagerName, PackageManagerMetaConfig>;
|
|
169
|
+
context: WorkspacePlanContext;
|
|
170
|
+
};
|
|
171
|
+
type ProjectOptions = {
|
|
172
|
+
githubUserName?: string;
|
|
173
|
+
githubRepoName?: string;
|
|
174
|
+
name: string;
|
|
175
|
+
projectType?: ProjectType;
|
|
176
|
+
libraryBundler?: LibraryBundler;
|
|
177
|
+
template?: Template;
|
|
178
|
+
linter?: Linter;
|
|
179
|
+
formatter?: Formatter;
|
|
180
|
+
testing?: Testing;
|
|
181
|
+
configStrategy?: ConfigStrategy;
|
|
182
|
+
ide?: Ide;
|
|
183
|
+
/** AI platforms to generate pointer files for */
|
|
184
|
+
aiPlatforms?: AiPlatform[];
|
|
185
|
+
versions?: PackageVersions;
|
|
186
|
+
fiber?: PlanFiberOptions;
|
|
187
|
+
handle?: PlanHandleOptions;
|
|
188
|
+
drei?: PlanDreiOptions;
|
|
189
|
+
koota?: PlanKootaOptions;
|
|
190
|
+
leva?: PlanLevaOptions;
|
|
191
|
+
offscreen?: PlanOffscreenOptions;
|
|
192
|
+
postprocessing?: PlanPostprocessingOptions;
|
|
193
|
+
rapier?: PlanRapierOptions;
|
|
194
|
+
triplex?: PlanTriplexOptions;
|
|
195
|
+
viverse?: PlanViverseOptions;
|
|
196
|
+
uikit?: PlanUikitOptions;
|
|
197
|
+
xr?: PlanXrOptions;
|
|
198
|
+
zustand?: PlanZustandOptions;
|
|
199
|
+
githubPages?: PlanGithubPagesOptions;
|
|
200
|
+
dependencies?: Record<string, string>;
|
|
201
|
+
files?: VirtualFileMap;
|
|
202
|
+
injections?: Array<{
|
|
203
|
+
location: CodeInjectionLocation;
|
|
204
|
+
code: string;
|
|
205
|
+
}>;
|
|
206
|
+
replacements?: Array<{
|
|
207
|
+
search: string;
|
|
208
|
+
replace: string;
|
|
209
|
+
}>;
|
|
210
|
+
packageManager?: PackageManagerSpec;
|
|
211
|
+
pnpmManageVersions?: boolean;
|
|
212
|
+
engine?: EngineSpec;
|
|
213
|
+
workspaceRoot?: string;
|
|
214
|
+
workspaceDependencies?: string[];
|
|
215
|
+
};
|
|
216
|
+
type PlanBuilder = {
|
|
217
|
+
get options(): ProjectOptions;
|
|
218
|
+
get versions(): PackageVersions;
|
|
219
|
+
getVersion(name: string): string;
|
|
220
|
+
/** Returns true if using stealth config strategy (configs in .config/) */
|
|
221
|
+
isStealthConfig(): boolean;
|
|
222
|
+
addDependency(name: string, options?: DependencyVersionOptions): void;
|
|
223
|
+
addDevDependency(name: string, options?: DependencyVersionOptions): void;
|
|
224
|
+
addPeerDependency(name: string, semver: string): void;
|
|
225
|
+
addFile(path: string, file: VirtualFile): void;
|
|
226
|
+
addScripts(scripts: Record<string, string>): void;
|
|
227
|
+
addScript(name: string, command: string): void;
|
|
228
|
+
inject(location: CodeInjectionLocation, code: string): void;
|
|
229
|
+
replace(search: string, replace: string): void;
|
|
230
|
+
configureVite(object: unknown): void;
|
|
231
|
+
addVscodeSetting(key: string, value: unknown): void;
|
|
232
|
+
};
|
|
233
|
+
declare function getLanguageFromTemplate(template: Template): 'javascript' | 'typescript';
|
|
234
|
+
declare function getBaseTemplate(template: Template): BaseTemplate;
|
|
235
|
+
|
|
236
|
+
export { getLanguageFromTemplate as $, getBaseTemplate as _ };
|
|
237
|
+
export type { AiPlatform as A, BaseTemplate as B, CodeInjectionLocation as C, DependencyVersionOptions as D, EngineSpec as E, FormatterMetaConfig as F, PlanTriplexOptions as G, PlanUikitOptions as H, Ide as I, PlanViverseOptions as J, PlanXrOptions as K, LinterMetaConfig as L, PlanZustandOptions as M, ProjectMetaConfig as N, ProjectPlanContext as O, ProjectType as P, Template as Q, TestingMetaConfig as R, ToolConfig as S, Testing as T, TypeScriptMetaConfig as U, VirtualFileMap as V, WorkspacePlanInput as W, VersionRangePrefix as X, VirtualFile as Y, WorkspacePlanContext as Z, ConfigStrategy as a, PackageVersions as b, Linter as c, Formatter as d, LibraryBundler as e, PackageManagerSpec as f, ProjectPlanInput as g, ProjectOptions as h, AiAgentsMetaConfig as i, EditorMetaConfig as j, EngineName as k, FeatureSelections as l, FileRenderer as m, LibraryBundlerMetaConfig as n, PackageManagerMetaConfig as o, PackageManagerName as p, PlanBuilder as q, PlanDreiOptions as r, PlanFiberOptions as s, PlanGithubPagesOptions as t, PlanHandleOptions as u, PlanKootaOptions as v, PlanLevaOptions as w, PlanOffscreenOptions as x, PlanPostprocessingOptions as y, PlanRapierOptions as z };
|