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.
Files changed (50) hide show
  1. package/README.md +35 -50
  2. package/dist/lib/api/index.cjs +1 -523
  3. package/dist/lib/api/index.d.cts +1 -271
  4. package/dist/lib/api/index.d.mts +80 -84
  5. package/dist/lib/api/index.mjs +1 -521
  6. package/dist/lib/cache/index.cjs +1 -74
  7. package/dist/lib/cache/index.d.cts +1 -48
  8. package/dist/lib/cache/index.d.mts +3 -24
  9. package/dist/lib/cache/index.mjs +1 -73
  10. package/dist/lib/cron/index.cjs +1 -735
  11. package/dist/lib/cron/index.d.cts +1 -146
  12. package/dist/lib/cron/index.d.mts +99 -36
  13. package/dist/lib/cron/index.mjs +1 -726
  14. package/dist/lib/errors/index.cjs +1 -30
  15. package/dist/lib/errors/index.d.cts +1 -2
  16. package/dist/lib/errors/index.d.mts +12 -1
  17. package/dist/lib/errors/index.mjs +1 -26
  18. package/dist/lib/i18n/index.cjs +1 -42
  19. package/dist/lib/i18n/index.d.cts +1 -28
  20. package/dist/lib/i18n/index.mjs +1 -41
  21. package/dist/lib/logging/index.cjs +1 -387
  22. package/dist/lib/logging/index.d.cts +1 -108
  23. package/dist/lib/logging/index.mjs +1 -374
  24. package/dist/lib/orm/index.cjs +1 -0
  25. package/dist/lib/orm/index.d.cts +1 -0
  26. package/dist/lib/orm/index.d.mts +404 -0
  27. package/dist/lib/orm/index.mjs +1 -0
  28. package/dist/lib/policy/index.cjs +1 -285
  29. package/dist/lib/policy/index.d.cts +1 -77
  30. package/dist/lib/policy/index.mjs +1 -265
  31. package/dist/lib/prompts/index.cjs +6 -769
  32. package/dist/lib/prompts/index.d.cts +1 -96
  33. package/dist/lib/prompts/index.d.mts +12 -33
  34. package/dist/lib/prompts/index.mjs +6 -763
  35. package/dist/lib/pubsub/index.cjs +1 -117
  36. package/dist/lib/pubsub/index.d.cts +1 -41
  37. package/dist/lib/pubsub/index.d.mts +3 -18
  38. package/dist/lib/pubsub/index.mjs +1 -116
  39. package/dist/lib/queue/index.cjs +1 -182
  40. package/dist/lib/queue/index.d.cts +1 -74
  41. package/dist/lib/queue/index.d.mts +11 -4
  42. package/dist/lib/queue/index.mjs +1 -181
  43. package/dist/lib/workflow/index.cjs +1 -534
  44. package/dist/lib/workflow/index.d.cts +1 -85
  45. package/dist/lib/workflow/index.d.mts +76 -11
  46. package/dist/lib/workflow/index.mjs +1 -533
  47. package/dist/rolldown-runtime-CMqjfN_6.cjs +1 -0
  48. package/package.json +17 -5
  49. package/dist/index-BhGNDjPq.d.mts +0 -13
  50. package/dist/index-DxSbeGP-.d.cts +0 -13
@@ -1,96 +1 @@
1
- import { i as ok, t as err } from "../../index-DxSbeGP-.cjs";
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: () => 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>;
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<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[]]>;
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 };