semola 0.5.4 → 0.6.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/README.md +35 -50
- package/dist/lib/api/index.cjs +1 -523
- package/dist/lib/api/index.d.cts +1 -271
- package/dist/lib/api/index.d.mts +80 -84
- package/dist/lib/api/index.mjs +1 -521
- package/dist/lib/cache/index.cjs +1 -74
- package/dist/lib/cache/index.d.cts +1 -48
- package/dist/lib/cache/index.d.mts +3 -24
- package/dist/lib/cache/index.mjs +1 -73
- package/dist/lib/cron/index.cjs +1 -735
- package/dist/lib/cron/index.d.cts +1 -146
- package/dist/lib/cron/index.d.mts +99 -36
- package/dist/lib/cron/index.mjs +1 -726
- package/dist/lib/errors/index.cjs +1 -30
- package/dist/lib/errors/index.d.cts +1 -2
- package/dist/lib/errors/index.d.mts +12 -1
- package/dist/lib/errors/index.mjs +1 -26
- package/dist/lib/i18n/index.cjs +1 -42
- package/dist/lib/i18n/index.d.cts +1 -28
- package/dist/lib/i18n/index.mjs +1 -41
- package/dist/lib/logging/index.cjs +1 -387
- package/dist/lib/logging/index.d.cts +1 -108
- package/dist/lib/logging/index.mjs +1 -374
- package/dist/lib/orm/index.cjs +1 -0
- package/dist/lib/orm/index.d.cts +1 -0
- package/dist/lib/orm/index.d.mts +404 -0
- package/dist/lib/orm/index.mjs +1 -0
- package/dist/lib/policy/index.cjs +1 -285
- package/dist/lib/policy/index.d.cts +1 -77
- package/dist/lib/policy/index.mjs +1 -265
- package/dist/lib/prompts/index.cjs +6 -769
- package/dist/lib/prompts/index.d.cts +1 -96
- package/dist/lib/prompts/index.d.mts +12 -33
- package/dist/lib/prompts/index.mjs +6 -763
- package/dist/lib/pubsub/index.cjs +1 -117
- package/dist/lib/pubsub/index.d.cts +1 -41
- package/dist/lib/pubsub/index.d.mts +3 -18
- package/dist/lib/pubsub/index.mjs +1 -116
- package/dist/lib/queue/index.cjs +1 -182
- package/dist/lib/queue/index.d.cts +1 -74
- package/dist/lib/queue/index.d.mts +11 -4
- package/dist/lib/queue/index.mjs +1 -181
- package/dist/lib/workflow/index.cjs +1 -534
- package/dist/lib/workflow/index.d.cts +1 -85
- package/dist/lib/workflow/index.d.mts +76 -11
- package/dist/lib/workflow/index.mjs +1 -533
- package/dist/rolldown-runtime-CMqjfN_6.cjs +1 -0
- package/package.json +17 -5
- package/dist/index-BhGNDjPq.d.mts +0 -13
- package/dist/index-DxSbeGP-.d.cts +0 -13
|
@@ -1,96 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//#region src/lib/prompts/core/types.d.ts
|
|
4
|
-
type PromptResultLike<T> = ReturnType<typeof err<string>> | ReturnType<typeof ok<T>>;
|
|
5
|
-
type KeyName = "character" | "enter" | "backspace" | "delete" | "up" | "down" | "left" | "right" | "ctrl_left" | "ctrl_right" | "shift_left" | "shift_right" | "space" | "escape" | "ctrl_c" | "ctrl_backspace" | "ctrl_a" | "home" | "end" | "shift_ctrl_left" | "shift_ctrl_right" | "tab";
|
|
6
|
-
type Key = {
|
|
7
|
-
name: KeyName;
|
|
8
|
-
value?: string;
|
|
9
|
-
};
|
|
10
|
-
type PromptRuntime = {
|
|
11
|
-
isInteractive: () => boolean;
|
|
12
|
-
init: () => PromptResultLike<void>;
|
|
13
|
-
readKey: () => Promise<PromptResultLike<Key>>;
|
|
14
|
-
render: (frame: string) => PromptResultLike<void>;
|
|
15
|
-
done: (frame: string) => PromptResultLike<void>;
|
|
16
|
-
close: () => PromptResultLike<void>;
|
|
17
|
-
interrupt?: (message: string) => PromptResultLike<undefined>;
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/lib/prompts/types.d.ts
|
|
21
|
-
type PromptErrorType = "PromptEnvironmentError" | "PromptValidationError" | "PromptCancelledError" | "PromptIOError" | (string & {});
|
|
22
|
-
type MaybePromise<T> = T | Promise<T>;
|
|
23
|
-
type Validate<TValue> = ((value: TValue) => MaybePromise<string | null | undefined>) | undefined;
|
|
24
|
-
type Transform<TValue> = ((value: TValue) => MaybePromise<TValue>) | undefined;
|
|
25
|
-
type BasePromptOptions<TValue> = {
|
|
26
|
-
message: string;
|
|
27
|
-
validate?: Validate<TValue>;
|
|
28
|
-
transform?: Transform<TValue>;
|
|
29
|
-
};
|
|
30
|
-
type InputOptions = BasePromptOptions<string> & {
|
|
31
|
-
defaultValue?: string;
|
|
32
|
-
placeholder?: string;
|
|
33
|
-
required?: boolean;
|
|
34
|
-
requiredMessage?: string;
|
|
35
|
-
};
|
|
36
|
-
type PasswordOptions = InputOptions & {
|
|
37
|
-
mask?: string;
|
|
38
|
-
};
|
|
39
|
-
type ConfirmOptions = BasePromptOptions<boolean> & {
|
|
40
|
-
defaultValue?: boolean;
|
|
41
|
-
activeLabel?: string;
|
|
42
|
-
inactiveLabel?: string;
|
|
43
|
-
};
|
|
44
|
-
type NumberOptions = BasePromptOptions<number> & {
|
|
45
|
-
defaultValue?: number;
|
|
46
|
-
min?: number;
|
|
47
|
-
max?: number;
|
|
48
|
-
requiredMessage?: string;
|
|
49
|
-
invalidMessage?: string;
|
|
50
|
-
minMessage?: string;
|
|
51
|
-
maxMessage?: string;
|
|
52
|
-
};
|
|
53
|
-
type SelectChoice<TValue extends string> = {
|
|
54
|
-
value: TValue;
|
|
55
|
-
label?: string;
|
|
56
|
-
hint?: string;
|
|
57
|
-
disabled?: boolean;
|
|
58
|
-
};
|
|
59
|
-
type SelectOptions<TValue extends string> = BasePromptOptions<TValue> & {
|
|
60
|
-
choices: readonly [SelectChoice<TValue>, ...SelectChoice<TValue>[]];
|
|
61
|
-
defaultValue?: TValue;
|
|
62
|
-
};
|
|
63
|
-
type MultiselectOptions<TValue extends string> = BasePromptOptions<TValue[]> & {
|
|
64
|
-
choices: readonly [SelectChoice<TValue>, ...SelectChoice<TValue>[]];
|
|
65
|
-
defaultValue?: readonly TValue[];
|
|
66
|
-
min?: number;
|
|
67
|
-
max?: number;
|
|
68
|
-
};
|
|
69
|
-
//#endregion
|
|
70
|
-
//#region src/lib/prompts/index.d.ts
|
|
71
|
-
declare const input: (options: InputOptions, runtime?: PromptRuntime) => Promise<readonly [null, string] | readonly [{
|
|
72
|
-
readonly type: string;
|
|
73
|
-
readonly message: string;
|
|
74
|
-
}, null]>;
|
|
75
|
-
declare const password: (options: PasswordOptions, runtime?: PromptRuntime) => Promise<readonly [null, string] | readonly [{
|
|
76
|
-
readonly type: string;
|
|
77
|
-
readonly message: string;
|
|
78
|
-
}, null]>;
|
|
79
|
-
declare const confirm: (options: ConfirmOptions, runtime?: PromptRuntime) => Promise<readonly [null, boolean] | readonly [{
|
|
80
|
-
readonly type: string;
|
|
81
|
-
readonly message: string;
|
|
82
|
-
}, null]>;
|
|
83
|
-
declare const number: (options: NumberOptions, runtime?: PromptRuntime) => Promise<readonly [null, number] | readonly [{
|
|
84
|
-
readonly type: string;
|
|
85
|
-
readonly message: string;
|
|
86
|
-
}, null]>;
|
|
87
|
-
declare const select: <TValue extends string>(options: SelectOptions<TValue>, runtime?: PromptRuntime) => Promise<readonly [{
|
|
88
|
-
readonly type: string;
|
|
89
|
-
readonly message: string;
|
|
90
|
-
}, null] | readonly [null, TValue]>;
|
|
91
|
-
declare const multiselect: <TValue extends string>(options: MultiselectOptions<TValue>, runtime?: PromptRuntime) => Promise<readonly [{
|
|
92
|
-
readonly type: string;
|
|
93
|
-
readonly message: string;
|
|
94
|
-
}, null] | readonly [null, TValue[]]>;
|
|
95
|
-
//#endregion
|
|
96
|
-
export { type ConfirmOptions, type InputOptions, type MultiselectOptions, type NumberOptions, type PasswordOptions, type PromptErrorType, type PromptRuntime, type SelectChoice, type SelectOptions, confirm, input, multiselect, number, password, select };
|
|
1
|
+
export type * from './index.d.mts'
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { i as ok, t as err } from "../../index-BhGNDjPq.mjs";
|
|
2
|
-
|
|
3
1
|
//#region src/lib/prompts/core/types.d.ts
|
|
4
|
-
type PromptResultLike<T> = ReturnType<typeof err<string>> | ReturnType<typeof ok<T>>;
|
|
5
2
|
type KeyName = "character" | "enter" | "backspace" | "delete" | "up" | "down" | "left" | "right" | "ctrl_left" | "ctrl_right" | "shift_left" | "shift_right" | "space" | "escape" | "ctrl_c" | "ctrl_backspace" | "ctrl_a" | "home" | "end" | "shift_ctrl_left" | "shift_ctrl_right" | "tab";
|
|
6
3
|
type Key = {
|
|
7
4
|
name: KeyName;
|
|
@@ -9,12 +6,12 @@ type Key = {
|
|
|
9
6
|
};
|
|
10
7
|
type PromptRuntime = {
|
|
11
8
|
isInteractive: () => boolean;
|
|
12
|
-
init: () =>
|
|
13
|
-
readKey: () => Promise<
|
|
14
|
-
render: (frame: string) =>
|
|
15
|
-
done: (frame: string) =>
|
|
16
|
-
close: () =>
|
|
17
|
-
interrupt?: (message: string) =>
|
|
9
|
+
init: () => void;
|
|
10
|
+
readKey: () => Promise<Key>;
|
|
11
|
+
render: (frame: string) => void;
|
|
12
|
+
done: (frame: string) => void;
|
|
13
|
+
close: () => void;
|
|
14
|
+
interrupt?: (message: string) => void;
|
|
18
15
|
};
|
|
19
16
|
//#endregion
|
|
20
17
|
//#region src/lib/prompts/types.d.ts
|
|
@@ -68,29 +65,11 @@ type MultiselectOptions<TValue extends string> = BasePromptOptions<TValue[]> & {
|
|
|
68
65
|
};
|
|
69
66
|
//#endregion
|
|
70
67
|
//#region src/lib/prompts/index.d.ts
|
|
71
|
-
declare const input: (options: InputOptions, runtime?: PromptRuntime) => Promise<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
declare const
|
|
76
|
-
|
|
77
|
-
readonly message: string;
|
|
78
|
-
}, null]>;
|
|
79
|
-
declare const confirm: (options: ConfirmOptions, runtime?: PromptRuntime) => Promise<readonly [null, boolean] | readonly [{
|
|
80
|
-
readonly type: string;
|
|
81
|
-
readonly message: string;
|
|
82
|
-
}, null]>;
|
|
83
|
-
declare const number: (options: NumberOptions, runtime?: PromptRuntime) => Promise<readonly [null, number] | readonly [{
|
|
84
|
-
readonly type: string;
|
|
85
|
-
readonly message: string;
|
|
86
|
-
}, null]>;
|
|
87
|
-
declare const select: <TValue extends string>(options: SelectOptions<TValue>, runtime?: PromptRuntime) => Promise<readonly [{
|
|
88
|
-
readonly type: string;
|
|
89
|
-
readonly message: string;
|
|
90
|
-
}, null] | readonly [null, TValue]>;
|
|
91
|
-
declare const multiselect: <TValue extends string>(options: MultiselectOptions<TValue>, runtime?: PromptRuntime) => Promise<readonly [{
|
|
92
|
-
readonly type: string;
|
|
93
|
-
readonly message: string;
|
|
94
|
-
}, null] | readonly [null, TValue[]]>;
|
|
68
|
+
declare const input: (options: InputOptions, runtime?: PromptRuntime) => Promise<string>;
|
|
69
|
+
declare const password: (options: PasswordOptions, runtime?: PromptRuntime) => Promise<string>;
|
|
70
|
+
declare const confirm: (options: ConfirmOptions, runtime?: PromptRuntime) => Promise<boolean>;
|
|
71
|
+
declare const number: (options: NumberOptions, runtime?: PromptRuntime) => Promise<number>;
|
|
72
|
+
declare const select: <TValue extends string>(options: SelectOptions<TValue>, runtime?: PromptRuntime) => Promise<Awaited<TValue> & ({} | undefined)>;
|
|
73
|
+
declare const multiselect: <TValue extends string>(options: MultiselectOptions<TValue>, runtime?: PromptRuntime) => Promise<TValue[]>;
|
|
95
74
|
//#endregion
|
|
96
75
|
export { type ConfirmOptions, type InputOptions, type MultiselectOptions, type NumberOptions, type PasswordOptions, type PromptErrorType, type PromptRuntime, type SelectChoice, type SelectOptions, confirm, input, multiselect, number, password, select };
|