@plop-next/core 0.1.0 → 0.1.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/README.md +25 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/package.json +7 -4
- package/CHANGELOG.md +0 -19
package/README.md
CHANGED
|
@@ -1 +1,25 @@
|
|
|
1
|
-
# core
|
|
1
|
+
# @plop-next/core
|
|
2
|
+
|
|
3
|
+
Core internals for plop-next.
|
|
4
|
+
|
|
5
|
+
This package is primarily intended to be used by `@plop-next/cli`.
|
|
6
|
+
|
|
7
|
+
For normal usage, install and run the CLI package only:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -D @plop-next/cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
or:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
yarn add -D @plop-next/cli
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
You do not need to install or use this package directly in a typical project setup.
|
|
20
|
+
|
|
21
|
+
## Links
|
|
22
|
+
|
|
23
|
+
- Documentation: [https://nivvdiy.github.io/plop-next/](https://nivvdiy.github.io/plop-next/)
|
|
24
|
+
- Repository: [https://github.com/Nivvdiy/plop-next](https://github.com/Nivvdiy/plop-next)
|
|
25
|
+
- Issues: [https://github.com/Nivvdiy/plop-next/issues](https://github.com/Nivvdiy/plop-next/issues)
|
package/dist/index.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ type Keybinding = {
|
|
|
28
28
|
action: string;
|
|
29
29
|
description?: string;
|
|
30
30
|
};
|
|
31
|
-
declare const BUILT_IN_PROMPT_TYPES: readonly ["input", "select", "
|
|
31
|
+
declare const BUILT_IN_PROMPT_TYPES: readonly ["input", "select", "generatorList", "list", "checkbox", "confirm", "search", "password", "expand", "editor", "number", "rawlist"];
|
|
32
32
|
type PromptThemeType = (typeof BUILT_IN_PROMPT_TYPES)[number];
|
|
33
33
|
type NormalizedChoice<Value> = {
|
|
34
34
|
value: Value;
|
package/dist/index.js
CHANGED
|
@@ -489,7 +489,7 @@ import { select } from "@inquirer/prompts";
|
|
|
489
489
|
function createSelectHandler(fn) {
|
|
490
490
|
const selectFn = fn ?? select;
|
|
491
491
|
return {
|
|
492
|
-
types: ["list", "select", "
|
|
492
|
+
types: ["list", "select", "generatorList"],
|
|
493
493
|
async ask(type, config) {
|
|
494
494
|
const {
|
|
495
495
|
name: _name,
|
|
@@ -855,7 +855,7 @@ var BUILT_IN_PROMPT_THEME_SELECTORS = {
|
|
|
855
855
|
keybindings: true
|
|
856
856
|
},
|
|
857
857
|
list: { baseSelector: "select" },
|
|
858
|
-
|
|
858
|
+
generatorList: { baseSelector: "select" },
|
|
859
859
|
checkbox: {
|
|
860
860
|
prefix: true,
|
|
861
861
|
spinner: true,
|
|
@@ -1351,7 +1351,7 @@ var replacements = Object.entries(specialMainSymbols);
|
|
|
1351
1351
|
var BUILT_IN_PROMPT_TYPES = [
|
|
1352
1352
|
"input",
|
|
1353
1353
|
"select",
|
|
1354
|
-
"
|
|
1354
|
+
"generatorList",
|
|
1355
1355
|
"list",
|
|
1356
1356
|
"checkbox",
|
|
1357
1357
|
"confirm",
|
|
@@ -2072,7 +2072,7 @@ var PlopNextCore = class {
|
|
|
2072
2072
|
* Merges in order: defaultTheme → type defaults → user global theme → user type theme.
|
|
2073
2073
|
*/
|
|
2074
2074
|
resolvePromptTypeTheme(type) {
|
|
2075
|
-
if (type === "
|
|
2075
|
+
if (type === "generatorList") {
|
|
2076
2076
|
const selectDefaults = PROMPT_TYPE_THEMES["select"];
|
|
2077
2077
|
const userSelectTheme = this.resolveUserPromptTypeTheme("select");
|
|
2078
2078
|
const userGeneratorSelectTheme = this.resolveUserPromptTypeTheme(type);
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plop-next/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Core utilities and types for plop-next",
|
|
5
5
|
"bugs": {
|
|
6
|
-
"url": "https://github.com/
|
|
6
|
+
"url": "https://github.com/Nivvdiy/plop-next/issues"
|
|
7
7
|
},
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"author": "Nivvdiy <nivvdiy@gmail.com>",
|
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
"repository": {
|
|
15
15
|
"directory": "packages/core",
|
|
16
16
|
"type": "git",
|
|
17
|
-
"url": "https://github.com/
|
|
17
|
+
"url": "https://github.com/Nivvdiy/plop-next.git"
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"registry": "https://registry.npmjs.org"
|
|
18
21
|
},
|
|
19
22
|
"scripts": {
|
|
20
23
|
"build": "tsup src/index.ts --format esm --dts",
|
|
@@ -49,4 +52,4 @@
|
|
|
49
52
|
},
|
|
50
53
|
"sideEffects": false,
|
|
51
54
|
"types": "dist/index.d.ts"
|
|
52
|
-
}
|
|
55
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# @plop-next/core
|
|
2
|
-
|
|
3
|
-
## 0.1.0
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- "@plop-next/cli": minor
|
|
8
|
-
|
|
9
|
-
"@plop-next/core": minor
|
|
10
|
-
|
|
11
|
-
"@plop-next/i18n": minor
|
|
12
|
-
|
|
13
|
-
Refactor internal generator prompt handling from generator-select to generatorList across cli, core, and i18n.
|
|
14
|
-
|
|
15
|
-
Reserve generatorList for internal generator selection and improve validation and error messages.
|
|
16
|
-
|
|
17
|
-
Align theme selector flow and generated scaffold theme slots with generatorList.
|
|
18
|
-
|
|
19
|
-
Update i18n/theme integrations and tests to keep behavior consistent.
|