@maizzle/framework 6.0.0-rc.0 → 6.0.0-rc.2
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/bin/maizzle.mjs +1 -1
- package/dist/build.mjs +25 -7
- package/dist/build.mjs.map +1 -1
- package/dist/config/index.mjs +25 -1
- package/dist/config/index.mjs.map +1 -1
- package/dist/render/createRenderer.d.mts +4 -0
- package/dist/render/createRenderer.d.mts.map +1 -1
- package/dist/render/createRenderer.mjs +10 -4
- package/dist/render/createRenderer.mjs.map +1 -1
- package/dist/render/index.mjs +5 -1
- package/dist/render/index.mjs.map +1 -1
- package/dist/serve.mjs +4 -1
- package/dist/serve.mjs.map +1 -1
- package/dist/types/config.d.mts +20 -0
- package/dist/types/config.d.mts.map +1 -1
- package/node_modules/@clack/core/CHANGELOG.md +87 -4
- package/node_modules/@clack/core/README.md +1 -1
- package/node_modules/@clack/core/dist/index.d.mts +186 -48
- package/node_modules/@clack/core/dist/index.mjs +10 -14
- package/node_modules/@clack/core/dist/index.mjs.map +1 -1
- package/node_modules/@clack/core/package.json +7 -9
- package/node_modules/@clack/prompts/CHANGELOG.md +171 -7
- package/node_modules/@clack/prompts/README.md +66 -3
- package/node_modules/@clack/prompts/dist/index.d.mts +302 -76
- package/node_modules/@clack/prompts/dist/index.mjs +134 -84
- package/node_modules/@clack/prompts/dist/index.mjs.map +1 -1
- package/node_modules/@clack/prompts/package.json +14 -10
- package/node_modules/citty/LICENSE +0 -15
- package/node_modules/citty/README.md +166 -69
- package/node_modules/citty/dist/index.d.mts +88 -56
- package/node_modules/citty/dist/index.mjs +399 -437
- package/node_modules/citty/package.json +28 -35
- package/node_modules/giget/README.md +59 -11
- package/node_modules/giget/dist/THIRD-PARTY-LICENSES.md +205 -0
- package/node_modules/giget/dist/_chunks/giget.mjs +508 -0
- package/node_modules/giget/dist/_chunks/libs/citty.mjs +269 -0
- package/node_modules/giget/dist/_chunks/libs/nypm.d.mts +1 -0
- package/node_modules/giget/dist/_chunks/libs/nypm.mjs +669 -0
- package/node_modules/giget/dist/_chunks/libs/tar.mjs +2931 -0
- package/node_modules/giget/dist/_chunks/rolldown-runtime.mjs +14 -0
- package/node_modules/giget/dist/cli.d.mts +1 -0
- package/node_modules/giget/dist/cli.mjs +89 -111
- package/node_modules/giget/dist/index.d.mts +46 -35
- package/node_modules/giget/dist/index.mjs +2 -22
- package/node_modules/giget/package.json +32 -45
- package/node_modules/maizzle/README.md +140 -0
- package/node_modules/maizzle/bin/maizzle.mjs +5 -0
- package/node_modules/maizzle/dist/commands/new.d.mts +7 -0
- package/node_modules/maizzle/dist/commands/new.mjs +278 -0
- package/node_modules/{@maizzle/cli → maizzle}/dist/index.d.mts +1 -1
- package/node_modules/maizzle/dist/index.mjs +44 -0
- package/node_modules/{commander → maizzle/node_modules/commander}/Readme.md +94 -67
- package/node_modules/{commander → maizzle/node_modules/commander}/lib/argument.js +5 -4
- package/node_modules/{commander → maizzle/node_modules/commander}/lib/command.js +154 -39
- package/node_modules/{commander → maizzle/node_modules/commander}/lib/help.js +77 -39
- package/node_modules/{commander → maizzle/node_modules/commander}/lib/option.js +16 -3
- package/node_modules/{commander → maizzle/node_modules/commander}/package-support.json +4 -1
- package/node_modules/{commander → maizzle/node_modules/commander}/package.json +8 -8
- package/node_modules/{commander → maizzle/node_modules/commander}/typings/index.d.ts +71 -3
- package/node_modules/{@maizzle/cli → maizzle}/package.json +13 -11
- package/node_modules/tinyexec/README.md +49 -3
- package/node_modules/tinyexec/dist/main.d.mts +25 -14
- package/node_modules/tinyexec/dist/main.mjs +148 -100
- package/node_modules/tinyexec/package.json +9 -8
- package/package.json +3 -3
- package/node_modules/@clack/core/dist/index.cjs +0 -15
- package/node_modules/@clack/core/dist/index.cjs.map +0 -1
- package/node_modules/@clack/core/dist/index.d.cts +0 -211
- package/node_modules/@clack/core/dist/index.d.ts +0 -211
- package/node_modules/@clack/prompts/dist/index.cjs +0 -87
- package/node_modules/@clack/prompts/dist/index.cjs.map +0 -1
- package/node_modules/@clack/prompts/dist/index.d.cts +0 -165
- package/node_modules/@clack/prompts/dist/index.d.ts +0 -165
- package/node_modules/@maizzle/cli/README.md +0 -58
- package/node_modules/@maizzle/cli/dist/index.mjs +0 -42
- package/node_modules/citty/dist/index.cjs +0 -475
- package/node_modules/citty/dist/index.d.cts +0 -80
- package/node_modules/citty/dist/index.d.ts +0 -80
- package/node_modules/consola/LICENSE +0 -47
- package/node_modules/consola/README.md +0 -352
- package/node_modules/consola/basic.d.ts +0 -1
- package/node_modules/consola/browser.d.ts +0 -1
- package/node_modules/consola/core.d.ts +0 -1
- package/node_modules/consola/dist/basic.cjs +0 -32
- package/node_modules/consola/dist/basic.d.cts +0 -23
- package/node_modules/consola/dist/basic.d.mts +0 -21
- package/node_modules/consola/dist/basic.d.ts +0 -23
- package/node_modules/consola/dist/basic.mjs +0 -24
- package/node_modules/consola/dist/browser.cjs +0 -84
- package/node_modules/consola/dist/browser.d.cts +0 -23
- package/node_modules/consola/dist/browser.d.mts +0 -21
- package/node_modules/consola/dist/browser.d.ts +0 -23
- package/node_modules/consola/dist/browser.mjs +0 -76
- package/node_modules/consola/dist/chunks/prompt.cjs +0 -288
- package/node_modules/consola/dist/chunks/prompt.mjs +0 -280
- package/node_modules/consola/dist/core.cjs +0 -517
- package/node_modules/consola/dist/core.d.cts +0 -459
- package/node_modules/consola/dist/core.d.mts +0 -459
- package/node_modules/consola/dist/core.d.ts +0 -459
- package/node_modules/consola/dist/core.mjs +0 -512
- package/node_modules/consola/dist/index.cjs +0 -663
- package/node_modules/consola/dist/index.d.cts +0 -24
- package/node_modules/consola/dist/index.d.mts +0 -22
- package/node_modules/consola/dist/index.d.ts +0 -24
- package/node_modules/consola/dist/index.mjs +0 -651
- package/node_modules/consola/dist/shared/consola.DCGIlDNP.cjs +0 -75
- package/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +0 -72
- package/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +0 -288
- package/node_modules/consola/dist/shared/consola.DwRq1yyg.cjs +0 -312
- package/node_modules/consola/dist/utils.cjs +0 -64
- package/node_modules/consola/dist/utils.d.cts +0 -286
- package/node_modules/consola/dist/utils.d.mts +0 -286
- package/node_modules/consola/dist/utils.d.ts +0 -286
- package/node_modules/consola/dist/utils.mjs +0 -54
- package/node_modules/consola/lib/index.cjs +0 -10
- package/node_modules/consola/package.json +0 -136
- package/node_modules/consola/utils.d.ts +0 -1
- package/node_modules/create-maizzle/README.md +0 -86
- package/node_modules/create-maizzle/bin/create-maizzle.mjs +0 -4
- package/node_modules/create-maizzle/node_modules/@clack/core/CHANGELOG.md +0 -340
- package/node_modules/create-maizzle/node_modules/@clack/core/LICENSE +0 -9
- package/node_modules/create-maizzle/node_modules/@clack/core/README.md +0 -22
- package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.d.mts +0 -349
- package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.mjs +0 -11
- package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.mjs.map +0 -1
- package/node_modules/create-maizzle/node_modules/@clack/core/package.json +0 -60
- package/node_modules/create-maizzle/node_modules/@clack/prompts/CHANGELOG.md +0 -576
- package/node_modules/create-maizzle/node_modules/@clack/prompts/LICENSE +0 -9
- package/node_modules/create-maizzle/node_modules/@clack/prompts/README.md +0 -270
- package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.d.mts +0 -391
- package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.mjs +0 -137
- package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.mjs.map +0 -1
- package/node_modules/create-maizzle/node_modules/@clack/prompts/package.json +0 -65
- package/node_modules/create-maizzle/package.json +0 -47
- package/node_modules/create-maizzle/src/index.js +0 -242
- package/node_modules/defu/LICENSE +0 -21
- package/node_modules/defu/README.md +0 -171
- package/node_modules/defu/dist/defu.cjs +0 -77
- package/node_modules/defu/dist/defu.d.cts +0 -31
- package/node_modules/defu/dist/defu.d.mts +0 -29
- package/node_modules/defu/dist/defu.d.ts +0 -31
- package/node_modules/defu/dist/defu.mjs +0 -69
- package/node_modules/defu/lib/defu.cjs +0 -10
- package/node_modules/defu/lib/defu.d.cts +0 -12
- package/node_modules/defu/package.json +0 -48
- package/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +0 -468
- package/node_modules/node-fetch-native/LICENSE +0 -114
- package/node_modules/node-fetch-native/README.md +0 -225
- package/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +0 -2
- package/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +0 -2
- package/node_modules/node-fetch-native/dist/index.cjs +0 -1
- package/node_modules/node-fetch-native/dist/index.mjs +0 -1
- package/node_modules/node-fetch-native/dist/native.cjs +0 -1
- package/node_modules/node-fetch-native/dist/native.mjs +0 -1
- package/node_modules/node-fetch-native/dist/node.cjs +0 -19
- package/node_modules/node-fetch-native/dist/node.mjs +0 -19
- package/node_modules/node-fetch-native/dist/polyfill.cjs +0 -1
- package/node_modules/node-fetch-native/dist/polyfill.mjs +0 -1
- package/node_modules/node-fetch-native/dist/proxy-stub.cjs +0 -1
- package/node_modules/node-fetch-native/dist/proxy-stub.mjs +0 -1
- package/node_modules/node-fetch-native/dist/proxy.cjs +0 -58
- package/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs +0 -1
- package/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs +0 -1
- package/node_modules/node-fetch-native/index.d.ts +0 -1
- package/node_modules/node-fetch-native/lib/empty.cjs +0 -0
- package/node_modules/node-fetch-native/lib/empty.mjs +0 -0
- package/node_modules/node-fetch-native/lib/index.cjs +0 -11
- package/node_modules/node-fetch-native/lib/index.d.cts +0 -10
- package/node_modules/node-fetch-native/lib/index.d.mts +0 -10
- package/node_modules/node-fetch-native/lib/index.d.ts +0 -10
- package/node_modules/node-fetch-native/lib/native.cjs +0 -11
- package/node_modules/node-fetch-native/lib/polyfill.d.cts +0 -1
- package/node_modules/node-fetch-native/lib/polyfill.d.mts +0 -1
- package/node_modules/node-fetch-native/lib/polyfill.d.ts +0 -1
- package/node_modules/node-fetch-native/lib/proxy.d.ts +0 -32
- package/node_modules/node-fetch-native/node.d.ts +0 -1
- package/node_modules/node-fetch-native/package.json +0 -138
- package/node_modules/node-fetch-native/polyfill.d.ts +0 -1
- package/node_modules/node-fetch-native/proxy.d.ts +0 -1
- package/node_modules/nypm/node_modules/citty/LICENSE +0 -21
- package/node_modules/nypm/node_modules/citty/README.md +0 -231
- package/node_modules/nypm/node_modules/citty/dist/index.d.mts +0 -112
- package/node_modules/nypm/node_modules/citty/dist/index.mjs +0 -425
- package/node_modules/nypm/node_modules/citty/package.json +0 -42
- /package/node_modules/{nypm/node_modules/citty → citty}/dist/THIRD-PARTY-LICENSES.md +0 -0
- /package/node_modules/{nypm/node_modules/citty → citty}/dist/_chunks/libs/scule.mjs +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/LICENSE +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/component.d.mts +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/component.mjs +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/config.d.mts +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/config.mjs +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/layout.d.mts +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/layout.mjs +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/scaffold.d.mts +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/scaffold.mjs +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/stubs/component.vue +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/stubs/config.ts +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/stubs/layout.vue +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/stubs/template.vue +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/template.d.mts +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/template.mjs +0 -0
- /package/node_modules/{commander → maizzle/node_modules/commander}/LICENSE +0 -0
- /package/node_modules/{commander → maizzle/node_modules/commander}/esm.mjs +0 -0
- /package/node_modules/{commander → maizzle/node_modules/commander}/index.js +0 -0
- /package/node_modules/{commander → maizzle/node_modules/commander}/lib/error.js +0 -0
- /package/node_modules/{commander → maizzle/node_modules/commander}/lib/suggestSimilar.js +0 -0
- /package/node_modules/{commander → maizzle/node_modules/commander}/typings/esm.d.mts +0 -0
|
@@ -1,15 +1,179 @@
|
|
|
1
1
|
# @clack/prompts
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9786226: Externalize `fast-string-width` and `fast-wrap-ansi` to avoid double dependencies
|
|
8
|
+
- 090902c: Adds `date` prompt with `format` support (YMD, MDY, DMY)
|
|
4
9
|
|
|
5
10
|
### Patch Changes
|
|
6
11
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
|
|
12
|
+
- 134a1a1: Fix the `path` prompt so `directory: true` correctly enforces directory-only selection while still allowing directory navigation, and add regression tests for both directory and default file selection behavior.
|
|
13
|
+
- bdf89a5: Adds `placeholder` option to `autocomplete`. When the placeholder is set and the input is empty, pressing `tab` will set the value to `placeholder`.
|
|
14
|
+
- 336495a: Apply guide to wrapped multi-line messages in confirm prompt.
|
|
15
|
+
- 9fe8de6: Respect `withGuide: false` in autocomplete and multiselect prompts.
|
|
16
|
+
- 29a50cb: Fix `path` directory mode so pressing Enter with an existing directory `initialValue` submits that current directory instead of the first child option, and add regression coverage for immediate submit and child-directory navigation.
|
|
17
|
+
- Updated dependencies [9786226]
|
|
18
|
+
- Updated dependencies [bdf89a5]
|
|
19
|
+
- Updated dependencies [417b451]
|
|
20
|
+
- Updated dependencies [090902c]
|
|
21
|
+
- @clack/core@1.2.0
|
|
22
|
+
|
|
23
|
+
## 1.1.0
|
|
24
|
+
|
|
25
|
+
### Minor Changes
|
|
26
|
+
|
|
27
|
+
- e3333fb: Replaces `picocolors` with Node.js built-in `styleText`.
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- c3666e2: destruct `limitOption` param for better code readability, tweak types definitions
|
|
32
|
+
- ba3df8e: Fixes withGuide support in intro, outro, and cancel messages.
|
|
33
|
+
- Updated dependencies [e3333fb]
|
|
34
|
+
- @clack/core@1.1.0
|
|
35
|
+
|
|
36
|
+
## 1.0.1
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- 6404dc1: Disallows selection of `disabled` options in autocomplete.
|
|
41
|
+
- 86e36d8: Adds `withGuide` support to select prompt.
|
|
42
|
+
- c697439: Fixes line wrapping behavior in autocomplete.
|
|
43
|
+
- 0ded19c: Simplifies `withGuide` option checks.
|
|
44
|
+
- 0e4ddc9: Fixes `withGuide` support in password and path prompts.
|
|
45
|
+
- 76550d6: Adds `withGuide` support to selectKey prompt.
|
|
46
|
+
- f9b9953: Adds `withGuide` support to password prompt.
|
|
47
|
+
- 0e93ccb: Adds `vertical` arrangement option to `confirm` prompt.
|
|
48
|
+
- 4e9ae13: Adds `withGuide` support to confirm prompt.
|
|
49
|
+
- 0256238: Adds `withGuide` support to spinner prompt.
|
|
50
|
+
- Updated dependencies [6404dc1]
|
|
51
|
+
- Updated dependencies [2533180]
|
|
52
|
+
- @clack/core@1.0.1
|
|
53
|
+
|
|
54
|
+
## 1.0.0
|
|
55
|
+
|
|
56
|
+
### Major Changes
|
|
57
|
+
|
|
58
|
+
- c713fd5: The package is now distributed as ESM-only. In `v0` releases, the package was dual-published as CJS and ESM.
|
|
59
|
+
|
|
60
|
+
For existing CJS projects using Node v20+, please see Node's guide on [Loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v20.x/api/modules.html#loading-ecmascript-modules-using-require).
|
|
61
|
+
|
|
62
|
+
### Minor Changes
|
|
63
|
+
|
|
64
|
+
- 415410b: This adds a custom filter function to autocompleteMultiselect. It could be used, for example, to support fuzzy searching logic.
|
|
65
|
+
- 7bc3301: Prompts now have a `userInput` stored separately from their `value`.
|
|
66
|
+
- 8409f2c: feat: add styleFrame option for spinner
|
|
67
|
+
- 2837845: Adds suggestion and path prompts
|
|
68
|
+
- 99c3530: Adds `format` option to the note prompt to allow formatting of individual lines
|
|
69
|
+
- 0aaee4c: Added new `taskLog` prompt for log output which is cleared on success
|
|
70
|
+
- 729bbb6: Add support for customizable spinner cancel and error messages. Users can now customize these messages either per spinner instance or globally via the `updateSettings` function to support multilingual CLIs.
|
|
71
|
+
|
|
72
|
+
This update also improves the architecture by exposing the core settings to the prompts package, enabling more consistent default message handling across the codebase.
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
// Per-instance customization
|
|
76
|
+
const spinner = prompts.spinner({
|
|
77
|
+
cancelMessage: "Operación cancelada", // "Operation cancelled" in Spanish
|
|
78
|
+
errorMessage: "Se produjo un error", // "An error occurred" in Spanish
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
// Global customization via updateSettings
|
|
82
|
+
prompts.updateSettings({
|
|
83
|
+
messages: {
|
|
84
|
+
cancel: "Operación cancelada", // "Operation cancelled" in Spanish
|
|
85
|
+
error: "Se produjo un error", // "An error occurred" in Spanish
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
// Settings can now be accessed directly
|
|
90
|
+
console.log(prompts.settings.messages.cancel); // "Operación cancelada"
|
|
91
|
+
|
|
92
|
+
// Direct options take priority over global settings
|
|
93
|
+
const spinner = prompts.spinner({
|
|
94
|
+
cancelMessage: "Cancelled", // This will be used instead of the global setting
|
|
95
|
+
});
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
- 44df9af: Adds a new `groupSpacing` option to grouped multi-select prompts. If set to an integer greater than 0, it will add that number of new lines between each group.
|
|
99
|
+
- 55645c2: Support wrapping autocomplete and select prompts.
|
|
100
|
+
- 9e5bc6c: Add support for signals in prompts, allowing them to be aborted.
|
|
101
|
+
- f2c2b89: Adds `AutocompletePrompt` to core with comprehensive tests and implement both `autocomplete` and `autocomplete-multiselect` components in prompts package.
|
|
102
|
+
- 38019c7: Updates the API for stopping spinners and progress bars to be clearer
|
|
103
|
+
|
|
104
|
+
Previously, both the spinner and progress bar components used a single `stop` method that accepted a code to indicate success, cancellation, or error. This update separates these into distinct methods: `stop()`, `cancel()`, and `error()`:
|
|
105
|
+
|
|
106
|
+
```diff
|
|
107
|
+
const spinner = prompts.spinner();
|
|
108
|
+
spinner.start();
|
|
109
|
+
|
|
110
|
+
// Cancelling a spinner
|
|
111
|
+
- spinner.stop(undefined, 1);
|
|
112
|
+
+ spinner.cancel();
|
|
113
|
+
|
|
114
|
+
// Stopping with an error
|
|
115
|
+
- spinner.stop(undefined, 2);
|
|
116
|
+
+ spinner.error();
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
As before, you can pass a message to each method to customize the output displayed:
|
|
120
|
+
|
|
121
|
+
```js
|
|
122
|
+
spinner.cancel("Operation cancelled by user");
|
|
123
|
+
progressBar.error("An error occurred during processing");
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
- c45b9fb: Adds support for detecting spinner cancellation via CTRL+C. This allows for graceful handling of user interruptions during long-running operations.
|
|
127
|
+
- f10071e: Using the `group` method, task logs can now have groups which themselves can have scrolling windows of logs.
|
|
128
|
+
- df4eea1: Remove `suggestion` prompt and change `path` prompt to be an autocomplete prompt.
|
|
129
|
+
- 76fd17f: Added new `box` prompt for rendering boxed text, similar a note.
|
|
130
|
+
- 9a09318: Adds new `progress` prompt to display a progess-bar
|
|
131
|
+
- 1604f97: Add `clearOnError` option to password prompt to automatically clear input when validation fails
|
|
132
|
+
- 9bd8072: Add a `required` option to autocomplete multiselect.
|
|
133
|
+
- 19558b9: Added support for custom frames in spinner prompt
|
|
134
|
+
|
|
135
|
+
### Patch Changes
|
|
136
|
+
|
|
137
|
+
- 46dc0a4: Fixes multiselect only shows hints on the first item in the options list. Now correctly shows hints for all selected options with hint property.
|
|
138
|
+
- aea4573: Clamp scrolling windows to 5 rows.
|
|
139
|
+
- bfe0dd3: Prevents placeholder from being used as input value in text prompts
|
|
140
|
+
- 55eb280: Fix placeholder rendering when using autocomplete.
|
|
141
|
+
- 4d1d83b: Fixes rendering of multi-line messages and options in select prompt.
|
|
142
|
+
- 6176ced: Add withGuide support to note prompt
|
|
143
|
+
- 7b009df: Fix spinner clearing too many lines upwards when non-wrapping.
|
|
144
|
+
- 43aed55: Change styling of disabled multi-select options to have strikethrough.
|
|
145
|
+
- 17342d2: Exposes a new `SpinnerResult` type to describe the return type of `spinner`
|
|
146
|
+
- 282b39e: Wrap spinner output to allow for multi-line/wrapped messages.
|
|
147
|
+
- 2feaebb: Fix duplicated logs when scrolling through options with multiline messages by calculating `rowPadding` dynamically based on actual rendered lines instead of using a hardcoded value.
|
|
148
|
+
- 69681ea: Strip destructive ANSI codes from task log messages.
|
|
149
|
+
- b0fa7d8: Add support for wrapped messages in multi line prompts
|
|
150
|
+
- 9999adf: fix note component overflow bug
|
|
151
|
+
- 6868c1c: Adds a new `selectableGroups` boolean to the group multi-select prompt. Using `selectableGroups: false` will disable the ability to select a top-level group, but still allow every child to be selected individually.
|
|
152
|
+
- 7df841d: Removed all trailing space in prompt output and fixed various padding rendering bugs.
|
|
153
|
+
- 2839c66: fix(note): hard wrap text to column limit
|
|
154
|
+
- 7a556ad: Updates all prompts to accept a custom `output` and `input` stream
|
|
155
|
+
- 17d3650: Use a default import for picocolors to avoid run time errors in some environments.
|
|
156
|
+
- 7cc8a55: Messages passed to the `stop` method of a spinner no longer have dots stripped.
|
|
157
|
+
- b103ad3: Allow disabled options in multi-select and select prompts.
|
|
158
|
+
- 71b5029: Add missing nullish checks around values.
|
|
159
|
+
- 1a45f93: Switched from wrap-ansi to fast-wrap-ansi
|
|
160
|
+
- f952592: Fixes missing guide when rendering empty log lines.
|
|
161
|
+
- 372b526: Add `clear` method to spinner for stopping and clearing.
|
|
162
|
+
- d25f6d0: fix(note, box): handle CJK correctly
|
|
163
|
+
- 94fee2a: Changes `placeholder` to be a visual hint rather than a tabbable value.
|
|
164
|
+
- 7530af0: Fixes wrapping of cancelled and success messages of select prompt
|
|
165
|
+
- 4c89dd7: chore: use more accurate type to replace any in group select
|
|
166
|
+
- 0b852e1: Handle `stop` calls on spinners which have not yet been started.
|
|
167
|
+
- 42adff8: fix: add missing guide line in autocomplete-multiselect
|
|
168
|
+
- 8e2e30a: fix: fix autocomplete bar color when validate
|
|
169
|
+
- 2048eb1: Fix spinner's dots behavior with custom frames
|
|
170
|
+
- acc4c3a: Add a new `withGuide` option to all prompts to disable the default clack border
|
|
171
|
+
- 9b92161: Show symbol when withGuide is true for log messages
|
|
172
|
+
- 68dbf9b: select-key: Fixed wrapping and added new `caseSensitive` option
|
|
173
|
+
- 09e596c: refactor(progress): remove unnecessary return statement in start function
|
|
174
|
+
- 2310b43: Allow custom writables as output stream.
|
|
175
|
+
- ae84dd0: Update key binding text to show tab/space when navigating, and tab otherwise.
|
|
176
|
+
- Updated dependency on `@clack/core` to `1.0.0`
|
|
13
177
|
|
|
14
178
|
## 0.10.0
|
|
15
179
|
|
|
@@ -86,7 +86,7 @@ const projectType = await select({
|
|
|
86
86
|
message: 'Pick a project type.',
|
|
87
87
|
options: [
|
|
88
88
|
{ value: 'ts', label: 'TypeScript' },
|
|
89
|
-
{ value: 'js', label: 'JavaScript' },
|
|
89
|
+
{ value: 'js', label: 'JavaScript', disabled: true },
|
|
90
90
|
{ value: 'coffee', label: 'CoffeeScript', hint: 'oh no' },
|
|
91
91
|
],
|
|
92
92
|
});
|
|
@@ -103,13 +103,35 @@ const additionalTools = await multiselect({
|
|
|
103
103
|
message: 'Select additional tools.',
|
|
104
104
|
options: [
|
|
105
105
|
{ value: 'eslint', label: 'ESLint', hint: 'recommended' },
|
|
106
|
-
{ value: 'prettier', label: 'Prettier' },
|
|
106
|
+
{ value: 'prettier', label: 'Prettier', disabled: true },
|
|
107
107
|
{ value: 'gh-action', label: 'GitHub Action' },
|
|
108
108
|
],
|
|
109
109
|
required: false,
|
|
110
110
|
});
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
+
It is also possible to select multiple items arranged into hierarchy by using `groupMultiselect`:
|
|
114
|
+
|
|
115
|
+
```js
|
|
116
|
+
import { groupMultiselect } from '@clack/prompts';
|
|
117
|
+
|
|
118
|
+
const basket = await groupMultiselect({
|
|
119
|
+
message: 'Select your favorite fruits and vegetables:',
|
|
120
|
+
options: {
|
|
121
|
+
fruits: [
|
|
122
|
+
{ value: 'apple', label: 'apple' },
|
|
123
|
+
{ value: 'banana', label: 'banana' },
|
|
124
|
+
{ value: 'cherry', label: 'cherry' },
|
|
125
|
+
],
|
|
126
|
+
vegetables: [
|
|
127
|
+
{ value: 'carrot', label: 'carrot' },
|
|
128
|
+
{ value: 'spinach', label: 'spinach' },
|
|
129
|
+
{ value: 'potato', label: 'potato' },
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
```
|
|
134
|
+
|
|
113
135
|
### Spinner
|
|
114
136
|
|
|
115
137
|
The spinner component surfaces a pending action, such as a long-running download or dependency installation.
|
|
@@ -123,6 +145,23 @@ s.start('Installing via npm');
|
|
|
123
145
|
s.stop('Installed via npm');
|
|
124
146
|
```
|
|
125
147
|
|
|
148
|
+
### Progress
|
|
149
|
+
|
|
150
|
+
The progress component extends the spinner component to add a progress bar to visualize the progression of an action.
|
|
151
|
+
|
|
152
|
+
```js
|
|
153
|
+
import { progress } from '@clack/prompts';
|
|
154
|
+
|
|
155
|
+
const p = progress({ max: 10 });
|
|
156
|
+
p.start('Downloading archive');
|
|
157
|
+
// Do download here
|
|
158
|
+
p.advance(3, 'Downloading (30%)');
|
|
159
|
+
// ...
|
|
160
|
+
p.advance(8, 'Downloading (80%)');
|
|
161
|
+
// ...
|
|
162
|
+
p.stop('Archive downloaded');
|
|
163
|
+
```
|
|
164
|
+
|
|
126
165
|
## Utilities
|
|
127
166
|
|
|
128
167
|
### Grouping
|
|
@@ -164,7 +203,9 @@ console.log(group.name, group.age, group.color);
|
|
|
164
203
|
Execute multiple tasks in spinners.
|
|
165
204
|
|
|
166
205
|
```js
|
|
167
|
-
|
|
206
|
+
import { tasks } from '@clack/prompts';
|
|
207
|
+
|
|
208
|
+
await tasks([
|
|
168
209
|
{
|
|
169
210
|
title: 'Installing via npm',
|
|
170
211
|
task: async (message) => {
|
|
@@ -205,3 +246,25 @@ stream.message((function *() { yield 'Hello'; yield ", World" })(), { symbol: co
|
|
|
205
246
|
```
|
|
206
247
|
|
|
207
248
|

|
|
249
|
+
|
|
250
|
+
### Task Log
|
|
251
|
+
|
|
252
|
+
When executing a sub-process or a similar sub-task, `taskLog` can be used to render the output continuously and clear it at the end if it was successful.
|
|
253
|
+
|
|
254
|
+
```js
|
|
255
|
+
import { taskLog } from '@clack/prompts';
|
|
256
|
+
|
|
257
|
+
const log = taskLog({
|
|
258
|
+
title: 'Running npm install'
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
for await (const line of npmInstall()) {
|
|
262
|
+
log.message(line);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
if (success) {
|
|
266
|
+
log.success('Done!');
|
|
267
|
+
} else {
|
|
268
|
+
log.error('Failed!');
|
|
269
|
+
}
|
|
270
|
+
```
|