create-rstack 1.8.2 → 1.9.1
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/index.d.ts +66 -1
- package/dist/index.js +1858 -984
- package/package.json +9 -10
- package/template-biome/package.json +1 -1
- package/template-eslint/react-ts/package.json +1 -1
- package/template-eslint/svelte-js/package.json +1 -1
- package/template-eslint/svelte-ts/package.json +2 -2
- package/template-eslint/vanilla-ts/package.json +1 -1
- package/template-eslint/vue-ts/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AutocompletePrompt } from '@clack/core';
|
|
1
2
|
import { Readable } from 'node:stream';
|
|
2
3
|
import { Writable } from 'node:stream';
|
|
3
4
|
|
|
@@ -7,10 +8,52 @@ export declare type Argv = {
|
|
|
7
8
|
template?: string;
|
|
8
9
|
override?: boolean;
|
|
9
10
|
tools?: string | string[];
|
|
11
|
+
skill?: string | string[];
|
|
10
12
|
packageName?: string;
|
|
11
13
|
'package-name'?: string;
|
|
12
14
|
};
|
|
13
15
|
|
|
16
|
+
export declare const autocomplete: <Value>(opts: AutocompleteOptions<Value>) => Promise<Value | symbol>;
|
|
17
|
+
|
|
18
|
+
declare interface AutocompleteOptions<Value> extends AutocompleteSharedOptions<Value> {
|
|
19
|
+
/**
|
|
20
|
+
* The initial selected value.
|
|
21
|
+
*/
|
|
22
|
+
initialValue?: Value;
|
|
23
|
+
/**
|
|
24
|
+
* The initial user input
|
|
25
|
+
*/
|
|
26
|
+
initialUserInput?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare interface AutocompleteSharedOptions<Value> extends CommonOptions {
|
|
30
|
+
/**
|
|
31
|
+
* The message to display to the user.
|
|
32
|
+
*/
|
|
33
|
+
message: string;
|
|
34
|
+
/**
|
|
35
|
+
* Available options for the autocomplete prompt.
|
|
36
|
+
*/
|
|
37
|
+
options: Option_2<Value>[] | ((this: AutocompletePrompt<Option_2<Value>>) => Option_2<Value>[]);
|
|
38
|
+
/**
|
|
39
|
+
* Maximum number of items to display at once.
|
|
40
|
+
*/
|
|
41
|
+
maxItems?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Placeholder text to display when no input is provided.
|
|
44
|
+
*/
|
|
45
|
+
placeholder?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Validates the value
|
|
48
|
+
*/
|
|
49
|
+
validate?: (value: Value | Value[] | undefined) => string | Error | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Custom filter function to match options against search input.
|
|
52
|
+
* If not provided, a default filter that matches label, hint, and value is used.
|
|
53
|
+
*/
|
|
54
|
+
filter?: (search: string, option: Option_2<Value>) => boolean;
|
|
55
|
+
}
|
|
56
|
+
|
|
14
57
|
export declare const BUILTIN_TOOLS: string[];
|
|
15
58
|
|
|
16
59
|
export declare function checkCancel<T>(value: unknown): T;
|
|
@@ -46,7 +89,7 @@ export declare function copyFolder({ from, to, version, packageName, templatePar
|
|
|
46
89
|
skipFiles?: string[];
|
|
47
90
|
}): void;
|
|
48
91
|
|
|
49
|
-
export declare function create({ name, root, templates, skipFiles, getTemplateName, mapESLintTemplate, version, noteInformation, extraTools, argv: processArgv, }: {
|
|
92
|
+
export declare function create({ name, root, templates, skipFiles, getTemplateName, mapESLintTemplate, version, noteInformation, extraTools, extraSkills, argv: processArgv, }: {
|
|
50
93
|
name: string;
|
|
51
94
|
root: string;
|
|
52
95
|
skipFiles?: string[];
|
|
@@ -65,6 +108,7 @@ export declare function create({ name, root, templates, skipFiles, getTemplateNa
|
|
|
65
108
|
* Specify additional tools.
|
|
66
109
|
*/
|
|
67
110
|
extraTools?: ExtraTool[];
|
|
111
|
+
extraSkills?: ExtraSkill[];
|
|
68
112
|
/**
|
|
69
113
|
* For test purpose, override the default argv (process.argv).
|
|
70
114
|
*/
|
|
@@ -73,6 +117,15 @@ export declare function create({ name, root, templates, skipFiles, getTemplateNa
|
|
|
73
117
|
|
|
74
118
|
export declare type ESLintTemplateName = 'vanilla-js' | 'vanilla-ts' | 'react-js' | 'react-ts' | 'vue-ts' | 'vue-js' | 'svelte-js' | 'svelte-ts';
|
|
75
119
|
|
|
120
|
+
declare type ExtraSkill = {
|
|
121
|
+
value: string;
|
|
122
|
+
label: string;
|
|
123
|
+
source: string;
|
|
124
|
+
skill?: string;
|
|
125
|
+
when?: (templateName: string) => boolean;
|
|
126
|
+
order?: 'pre' | 'post';
|
|
127
|
+
};
|
|
128
|
+
|
|
76
129
|
declare type ExtraTool = {
|
|
77
130
|
/**
|
|
78
131
|
* The value of the multiselect option.
|
|
@@ -107,6 +160,18 @@ declare type ExtraTool = {
|
|
|
107
160
|
when?: (templateName: string) => boolean;
|
|
108
161
|
};
|
|
109
162
|
|
|
163
|
+
export declare const groupMultiselect: <Value>(opts: GroupMultiSelectOptions<Value>) => Promise<Value[] | symbol>;
|
|
164
|
+
|
|
165
|
+
declare interface GroupMultiSelectOptions<Value> extends CommonOptions {
|
|
166
|
+
message: string;
|
|
167
|
+
options: Record<string, Option_2<Value>[]>;
|
|
168
|
+
initialValues?: Value[];
|
|
169
|
+
required?: boolean;
|
|
170
|
+
cursorAt?: Value;
|
|
171
|
+
selectableGroups?: boolean;
|
|
172
|
+
groupSpacing?: number;
|
|
173
|
+
}
|
|
174
|
+
|
|
110
175
|
/**
|
|
111
176
|
* Merge AGENTS.md files from multiple sources
|
|
112
177
|
*/
|