create-rstack 1.0.6 → 1.0.7
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 +63 -19
- package/dist/index.js +7 -15
- package/package.json +9 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
export declare type Argv = {
|
|
2
|
+
help?: boolean;
|
|
3
|
+
dir?: string;
|
|
4
|
+
template?: string;
|
|
5
|
+
override?: boolean;
|
|
6
|
+
tools?: string | string[];
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export declare function checkCancel<T>(value: unknown): T;
|
|
10
|
+
|
|
11
|
+
export declare function create({ name, root, templates, skipFiles, getTemplateName, mapESLintTemplate, }: {
|
|
12
|
+
name: string;
|
|
13
|
+
root: string;
|
|
14
|
+
skipFiles?: string[];
|
|
15
|
+
templates: string[];
|
|
16
|
+
getTemplateName: (argv: Argv) => Promise<string>;
|
|
17
|
+
mapESLintTemplate: (templateName: string) => ESLintTemplateName | null;
|
|
18
|
+
}): Promise<void>;
|
|
19
|
+
|
|
20
|
+
export declare type ESLintTemplateName = 'vanilla-js' | 'vanilla-ts' | 'react-js' | 'react-ts' | 'vue-ts' | 'vue-js' | 'svelte-js' | 'svelte-ts';
|
|
21
|
+
|
|
22
|
+
export declare const multiselect: <Options extends Option_2<Value>[], Value>(opts: MultiSelectOptions<Options, Value>) => Promise<symbol | Value[]>;
|
|
23
|
+
|
|
24
|
+
declare interface MultiSelectOptions<Options extends Option_2<Value>[], Value> {
|
|
25
|
+
message: string;
|
|
26
|
+
options: Options;
|
|
27
|
+
initialValues?: Value[];
|
|
28
|
+
required?: boolean;
|
|
29
|
+
cursorAt?: Value;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare type Option_2<Value> = Value extends Primitive ? {
|
|
33
|
+
value: Value;
|
|
34
|
+
label?: string;
|
|
35
|
+
hint?: string;
|
|
36
|
+
} : {
|
|
37
|
+
value: Value;
|
|
38
|
+
label: string;
|
|
39
|
+
hint?: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
declare type Primitive = Readonly<string | boolean | number>;
|
|
43
|
+
|
|
44
|
+
export declare const select: <Options extends Option_2<Value>[], Value>(opts: SelectOptions<Options, Value>) => Promise<symbol | Value>;
|
|
45
|
+
|
|
46
|
+
declare interface SelectOptions<Options extends Option_2<Value>[], Value> {
|
|
47
|
+
message: string;
|
|
48
|
+
options: Options;
|
|
49
|
+
initialValue?: Value;
|
|
50
|
+
maxItems?: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export declare const text: (opts: TextOptions) => Promise<string | symbol>;
|
|
54
|
+
|
|
55
|
+
declare interface TextOptions {
|
|
56
|
+
message: string;
|
|
57
|
+
placeholder?: string;
|
|
58
|
+
defaultValue?: string;
|
|
59
|
+
initialValue?: string;
|
|
60
|
+
validate?: (value: string) => string | void;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { }
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
// Rslib ESM shims
|
|
2
|
+
import __rslib_shim_module__ from 'module';
|
|
3
|
+
const require = /*#__PURE__*/ __rslib_shim_module__.createRequire(import.meta.url);
|
|
3
4
|
import * as __WEBPACK_EXTERNAL_MODULE_tty__ from "tty";
|
|
4
5
|
import * as __WEBPACK_EXTERNAL_MODULE_node_fs__ from "node:fs";
|
|
5
6
|
import * as __WEBPACK_EXTERNAL_MODULE_node_path__ from "node:path";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_url__ from "node:url";
|
|
6
8
|
import * as __WEBPACK_EXTERNAL_MODULE_node_process__ from "node:process";
|
|
7
9
|
import * as __WEBPACK_EXTERNAL_MODULE_node_readline__ from "node:readline";
|
|
8
10
|
import * as __WEBPACK_EXTERNAL_MODULE_node_tty__ from "node:tty";
|
|
@@ -287,7 +289,7 @@ var __webpack_modules__ = {
|
|
|
287
289
|
},
|
|
288
290
|
"./node_modules/.pnpm/picocolors@1.0.1/node_modules/picocolors/picocolors.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
289
291
|
let argv = process.argv || [], env = process.env;
|
|
290
|
-
let isColorSupported = !("NO_COLOR" in env || argv.includes("--no-color")) && ("FORCE_COLOR" in env || argv.includes("--color") || "win32" === process.platform || null !=
|
|
292
|
+
let isColorSupported = !("NO_COLOR" in env || argv.includes("--no-color")) && ("FORCE_COLOR" in env || argv.includes("--color") || "win32" === process.platform || null != require && __webpack_require__("tty")/* .isatty */ .isatty(1) && "dumb" !== env.TERM || "CI" in env);
|
|
291
293
|
let formatter = (open, close, replace = open)=>(input)=>{
|
|
292
294
|
let string = "" + input;
|
|
293
295
|
let index = string.indexOf(close, open.length);
|
|
@@ -337,17 +339,6 @@ var __webpack_modules__ = {
|
|
|
337
339
|
module.exports = createColors();
|
|
338
340
|
module.exports.createColors = createColors;
|
|
339
341
|
},
|
|
340
|
-
"./node_modules/.pnpm/picocolors@1.0.1/node_modules/picocolors sync recursive": function(module) {
|
|
341
|
-
function webpackEmptyContext(req) {
|
|
342
|
-
var e = new Error("Cannot find module '" + req + "'");
|
|
343
|
-
e.code = 'MODULE_NOT_FOUND';
|
|
344
|
-
throw e;
|
|
345
|
-
}
|
|
346
|
-
webpackEmptyContext.keys = ()=>[];
|
|
347
|
-
webpackEmptyContext.resolve = webpackEmptyContext;
|
|
348
|
-
webpackEmptyContext.id = "./node_modules/.pnpm/picocolors@1.0.1/node_modules/picocolors sync recursive";
|
|
349
|
-
module.exports = webpackEmptyContext;
|
|
350
|
-
},
|
|
351
342
|
"./node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js": function(module) {
|
|
352
343
|
const ESC = '\x1B';
|
|
353
344
|
const CSI = `${ESC}[`;
|
|
@@ -1513,7 +1504,8 @@ ${gray(rest.join("\n"))}`;
|
|
|
1513
1504
|
};
|
|
1514
1505
|
// src/index.ts
|
|
1515
1506
|
var logger = createLogger();
|
|
1516
|
-
|
|
1507
|
+
const src_filename = (0, __WEBPACK_EXTERNAL_MODULE_node_url__.fileURLToPath)(import.meta.url);
|
|
1508
|
+
const src_dirname = (0, __WEBPACK_EXTERNAL_MODULE_node_path__.dirname)(src_filename);
|
|
1517
1509
|
function cancelAndExit() {
|
|
1518
1510
|
ue('Operation cancelled.');
|
|
1519
1511
|
process.exit(0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rstack",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Create a new Rstack project",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,7 +16,12 @@
|
|
|
16
16
|
},
|
|
17
17
|
"main": "./dist/index.js",
|
|
18
18
|
"types": "./dist/index.d.ts",
|
|
19
|
-
"files": [
|
|
19
|
+
"files": [
|
|
20
|
+
"template-biome",
|
|
21
|
+
"template-eslint",
|
|
22
|
+
"template-prettier",
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
20
25
|
"scripts": {
|
|
21
26
|
"build": "rslib build",
|
|
22
27
|
"dev": "rslib build --watch",
|
|
@@ -37,7 +42,8 @@
|
|
|
37
42
|
"devDependencies": {
|
|
38
43
|
"@biomejs/biome": "^1.9.3",
|
|
39
44
|
"@clack/prompts": "^0.7.0",
|
|
40
|
-
"@
|
|
45
|
+
"@microsoft/api-extractor": "^7.47.10",
|
|
46
|
+
"@rslib/core": "0.0.12",
|
|
41
47
|
"@types/minimist": "^1.2.5",
|
|
42
48
|
"@types/node": "18.19.55",
|
|
43
49
|
"deepmerge": "^4.3.1",
|