@procedures/mark 0.34.0 → 0.35.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/dist/prompts.js DELETED
@@ -1,124 +0,0 @@
1
- /**
2
- * Interactive Prompts
3
- *
4
- * Wraps @clack/prompts for beautiful, modern CLI prompts.
5
- * Used by Vite, Astro, and other modern tools.
6
- */
7
- import * as p from "@clack/prompts";
8
- import chalk from "chalk";
9
- /**
10
- * Text input prompt
11
- */
12
- function text(message, options) {
13
- const opts = { message };
14
- if (options?.placeholder !== undefined)
15
- opts.placeholder = options.placeholder;
16
- if (options?.defaultValue !== undefined)
17
- opts.defaultValue = options.defaultValue;
18
- return p.text(opts);
19
- }
20
- /**
21
- * Yes/No confirmation prompt
22
- */
23
- function confirm(message, options) {
24
- const opts = { message };
25
- if (options?.initialValue !== undefined)
26
- opts.initialValue = options.initialValue;
27
- return p.confirm(opts);
28
- }
29
- /**
30
- * Single select prompt
31
- */
32
- function select(message, options) {
33
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
34
- return p.select({ message, options });
35
- }
36
- /**
37
- * Multi-select prompt
38
- */
39
- function multiselect(message, options) {
40
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
41
- return p.multiselect({ message, options });
42
- }
43
- /**
44
- * Password/hidden input prompt
45
- */
46
- function password(message) {
47
- return p.password({ message });
48
- }
49
- /**
50
- * Intro banner
51
- */
52
- function intro(msg) {
53
- p.intro(chalk.bgCyan.black(` ${msg} `));
54
- }
55
- /**
56
- * Outro banner
57
- */
58
- function outro(msg) {
59
- p.outro(chalk.green(msg));
60
- }
61
- /**
62
- * Spinner for async operations
63
- */
64
- function spinner() {
65
- return p.spinner();
66
- }
67
- /**
68
- * Cancel operation
69
- */
70
- function cancel(msg) {
71
- p.cancel(msg ?? "Operation cancelled");
72
- }
73
- /**
74
- * Note/info box
75
- */
76
- function note(message, title) {
77
- p.note(message, title);
78
- }
79
- /**
80
- * Log message within prompt flow
81
- */
82
- const log = {
83
- info: (msg) => {
84
- p.log.info(msg);
85
- },
86
- success: (msg) => {
87
- p.log.success(msg);
88
- },
89
- warn: (msg) => {
90
- p.log.warn(msg);
91
- },
92
- error: (msg) => {
93
- p.log.error(msg);
94
- },
95
- message: (msg) => {
96
- p.log.message(msg);
97
- },
98
- step: (msg) => {
99
- p.log.step(msg);
100
- },
101
- };
102
- /**
103
- * Prompt utilities
104
- */
105
- export const prompts = {
106
- text: text,
107
- confirm: confirm,
108
- select: select,
109
- multiselect: multiselect,
110
- password: password,
111
- group: p.group,
112
- intro: intro,
113
- outro: outro,
114
- spinner: spinner,
115
- log: log,
116
- isCancel: p.isCancel,
117
- cancel: cancel,
118
- note: note,
119
- };
120
- /**
121
- * Re-export for direct access
122
- */
123
- export { p as clack };
124
- //# sourceMappingURL=prompts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAwC1B;;GAEG;AACH,SAAS,IAAI,CACX,OAAe,EACf,OAAyD;IAEzD,MAAM,IAAI,GAAiC,EAAE,OAAO,EAAE,CAAC;IACvD,IAAI,OAAO,EAAE,WAAW,KAAK,SAAS;QAAE,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAC/E,IAAI,OAAO,EAAE,YAAY,KAAK,SAAS;QAAE,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAClF,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,SAAS,OAAO,CAAC,OAAe,EAAE,OAAoC;IACpE,MAAM,IAAI,GAAoC,EAAE,OAAO,EAAE,CAAC;IAC1D,IAAI,OAAO,EAAE,YAAY,KAAK,SAAS;QAAE,IAAI,CAAC,YA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Used by Vite, Astro, and other modern tools.
6
- */
7
-
8
- import * as p from "@clack/prompts";
9
- import chalk from "chalk";
10
-
11
- // Types
12
- type TextResult = Promise<string | symbol>;
13
- type ConfirmResult = Promise<boolean | symbol>;
14
- type SelectResult<T> = Promise<T | symbol>;
15
- type MultiselectResult<T> = Promise<T[] | symbol>;
16
- type PasswordResult = Promise<string | symbol>;
17
- type SpinnerInstance = ReturnType<typeof p.spinner>;
18
-
19
- /** Prompts interface for type annotation */
20
- export interface Prompts {
21
- text: (message: string, options?: { placeholder?: string; defaultValue?: string }) => TextResult;
22
- confirm: (message: string, options?: { initialValue?: boolean }) => ConfirmResult;
23
- select: <T extends string>(
24
- message: string,
25
- options: Array<{ value: T; label: string; hint?: string }>
26
- ) => SelectResult<T>;
27
- multiselect: <T extends string>(
28
- message: string,
29
- options: Array<{ value: T; label: string; hint?: string }>
30
- ) => MultiselectResult<T>;
31
- password: (message: string) => PasswordResult;
32
- group: typeof p.group;
33
- intro: (msg: string) => void;
34
- outro: (msg: string) => void;
35
- spinner: () => SpinnerInstance;
36
- log: {
37
- info: (msg: string) => void;
38
- success: (msg: string) => void;
39
- warn: (msg: string) => void;
40
- error: (msg: string) => void;
41
- message: (msg: string) => void;
42
- step: (msg: string) => void;
43
- };
44
- isCancel: typeof p.isCancel;
45
- cancel: (msg?: string) => void;
46
- note: (message: string, title?: string) => void;
47
- }
48
-
49
- /**
50
- * Text input prompt
51
- */
52
- function text(
53
- message: string,
54
- options?: { placeholder?: string; defaultValue?: string }
55
- ): TextResult {
56
- const opts: Parameters<typeof p.text>[0] = { message };
57
- if (options?.placeholder !== undefined) opts.placeholder = options.placeholder;
58
- if (options?.defaultValue !== undefined) opts.defaultValue = options.defaultValue;
59
- return p.text(opts);
60
- }
61
-
62
- /**
63
- * Yes/No confirmation prompt
64
- */
65
- function confirm(message: string, options?: { initialValue?: boolean }): ConfirmResult {
66
- const opts: Parameters<typeof p.confirm>[0] = { message };
67
- if (options?.initialValue !== undefined) opts.initialValue = options.initialValue;
68
- return p.confirm(opts);
69
- }
70
-
71
- /**
72
- * Single select prompt
73
- */
74
- function select<T extends string>(
75
- message: string,
76
- options: Array<{ value: T; label: string; hint?: string }>
77
- ): SelectResult<T> {
78
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
79
- return p.select({ message, options } as any) as SelectResult<T>;
80
- }
81
-
82
- /**
83
- * Multi-select prompt
84
- */
85
- function multiselect<T extends string>(
86
- message: string,
87
- options: Array<{ value: T; label: string; hint?: string }>
88
- ): MultiselectResult<T> {
89
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
90
- return p.multiselect({ message, options } as any) as MultiselectResult<T>;
91
- }
92
-
93
- /**
94
- * Password/hidden input prompt
95
- */
96
- function password(message: string): PasswordResult {
97
- return p.password({ message });
98
- }
99
-
100
- /**
101
- * Intro banner
102
- */
103
- function intro(msg: string): void {
104
- p.intro(chalk.bgCyan.black(` ${msg} `));
105
- }
106
-
107
- /**
108
- * Outro banner
109
- */
110
- function outro(msg: string): void {
111
- p.outro(chalk.green(msg));
112
- }
113
-
114
- /**
115
- * Spinner for async operations
116
- */
117
- function spinner(): SpinnerInstance {
118
- return p.spinner();
119
- }
120
-
121
- /**
122
- * Cancel operation
123
- */
124
- function cancel(msg?: string): void {
125
- p.cancel(msg ?? "Operation cancelled");
126
- }
127
-
128
- /**
129
- * Note/info box
130
- */
131
- function note(message: string, title?: string): void {
132
- p.note(message, title);
133
- }
134
-
135
- /**
136
- * Log message within prompt flow
137
- */
138
- const log = {
139
- info: (msg: string): void => {
140
- p.log.info(msg);
141
- },
142
- success: (msg: string): void => {
143
- p.log.success(msg);
144
- },
145
- warn: (msg: string): void => {
146
- p.log.warn(msg);
147
- },
148
- error: (msg: string): void => {
149
- p.log.error(msg);
150
- },
151
- message: (msg: string): void => {
152
- p.log.message(msg);
153
- },
154
- step: (msg: string): void => {
155
- p.log.step(msg);
156
- },
157
- };
158
-
159
- /**
160
- * Prompt utilities
161
- */
162
- export const prompts: Prompts = {
163
- text: text,
164
- confirm: confirm,
165
- select: select,
166
- multiselect: multiselect,
167
- password: password,
168
- group: p.group,
169
- intro: intro,
170
- outro: outro,
171
- spinner: spinner,
172
- log: log,
173
- isCancel: p.isCancel,
174
- cancel: cancel,
175
- note: note,
176
- };
177
-
178
- /**
179
- * Re-export for direct access
180
- */
181
- export { p as clack };