appos 0.4.3-0 → 0.5.1-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/exports/api/index.d.mts +3 -3
- package/dist/exports/api/index.mjs +34 -9
- package/dist/exports/api/workflows/index.d.mts +2 -2
- package/dist/exports/api/workflows/index.mjs +2 -2
- package/dist/exports/{auth-By0xx0MI.d.mts → auth-BCOIpGDO.d.mts} +325 -214
- package/dist/exports/cli/index.d.mts +105 -106
- package/dist/exports/cli/index.mjs +87 -13
- package/dist/exports/{constants-BePPc_yF.mjs → constants-BicCnEiJ.mjs} +7 -1
- package/dist/exports/{index-Bpo5QE7k.d.mts → index-CiuTp085.d.mts} +580 -614
- package/dist/exports/{openapi-crG3j4xx.mjs → openapi-uisUTLq7.mjs} +45 -102
- package/dist/exports/{send-email-Bgcdjy-e.mjs → send-email-CXxlkfFL.mjs} +1 -1
- package/dist/exports/{server-BlNxgHUc.mjs → server-CA4aI0U6.mjs} +6 -2
- package/dist/exports/storybook/index.d.ts +40 -0
- package/dist/exports/storybook/index.js +43 -0
- package/dist/exports/tests/api.d.mts +2 -2
- package/dist/exports/tests/api.mjs +3 -3
- package/dist/exports/vite/index.d.mts +19 -3
- package/dist/exports/vite/index.mjs +82 -6
- package/dist/exports/web/index.d.ts +2247 -700
- package/dist/exports/web/index.js +2445 -754
- package/dist/exports/web/routes.d.mts +41 -43
- package/dist/exports/web/ssr.d.mts +2 -2
- package/package.json +48 -31
- package/src/storybook/.storybook/main.ts +119 -0
- package/src/storybook/.storybook/manager.ts +75 -0
- package/src/storybook/.storybook/preview.tsx +76 -0
- package/src/storybook/components/ColorGrid.tsx +324 -0
- package/src/storybook/components/IconGallery.tsx +268 -0
- package/src/storybook/components/SpacingScale.tsx +236 -0
- package/src/storybook/components/TypographyScale.tsx +277 -0
- package/src/storybook/components/index.ts +3 -0
- package/src/storybook/docs/Introduction.mdx +29 -0
- package/src/storybook/docs/foundations/Colors.mdx +27 -0
- package/src/storybook/docs/foundations/Icons.mdx +26 -0
- package/src/storybook/docs/foundations/Spacing.mdx +23 -0
- package/src/storybook/docs/foundations/Typography.mdx +39 -0
- package/src/storybook/index.ts +147 -0
- package/src/storybook/shims/void-elements.js +18 -0
- package/src/web/client/auth-paths.ts +148 -0
- package/src/web/client/auth.ts +218 -0
- package/src/web/client/i18n.d.ts +9 -0
- package/src/web/client/i18n.ts +127 -0
- package/src/web/client/react-router.ts +84 -0
- package/src/web/hooks/index.ts +1 -0
- package/src/web/hooks/use-mobile.ts +19 -0
- package/src/web/index.ts +42 -0
- package/src/web/lib/colors.ts +220 -0
- package/src/web/lib/utils.ts +52 -0
- package/src/web/routes/auth/_layout.tsx +5 -11
- package/src/web/routes.ts +101 -0
- package/src/web/server/context.ts +14 -0
- package/src/web/server/render.ts +11 -0
- package/src/web/ssr.ts +17 -0
- package/src/web/ui/accordion.stories.tsx +183 -0
- package/src/web/ui/accordion.tsx +134 -0
- package/src/web/ui/alert-dialog.stories.tsx +215 -0
- package/src/web/ui/alert-dialog.tsx +328 -0
- package/src/web/ui/alert.stories.tsx +224 -0
- package/src/web/ui/alert.tsx +136 -0
- package/src/web/ui/animated-check.stories.tsx +200 -0
- package/src/web/ui/animated-check.tsx +98 -0
- package/src/web/ui/aspect-ratio.stories.tsx +204 -0
- package/src/web/ui/aspect-ratio.tsx +36 -0
- package/src/web/ui/auth/__mocks__/auth-context.tsx +273 -0
- package/src/web/ui/auth/auth-card.stories.tsx +295 -0
- package/src/web/ui/auth/auth-card.tsx +124 -0
- package/src/web/ui/auth/auth-layout.stories.tsx +330 -0
- package/src/web/ui/auth/auth-layout.tsx +269 -0
- package/src/web/ui/auth/captcha-widget.stories.tsx +200 -0
- package/src/web/ui/auth/captcha-widget.tsx +197 -0
- package/src/web/ui/auth/context.tsx +87 -0
- package/src/web/ui/auth/email-input.stories.tsx +167 -0
- package/src/web/ui/auth/email-input.tsx +84 -0
- package/src/web/ui/auth/forms/email-otp-form.tsx +377 -0
- package/src/web/ui/auth/forms/forgot-password-form.tsx +240 -0
- package/src/web/ui/auth/forms/index.ts +40 -0
- package/src/web/ui/auth/forms/login-form.tsx +486 -0
- package/src/web/ui/auth/forms/phone-otp-form.tsx +388 -0
- package/src/web/ui/auth/forms/reset-password-form.tsx +331 -0
- package/src/web/ui/auth/forms/signup-form.tsx +499 -0
- package/src/web/ui/auth/forms/two-factor-form.tsx +410 -0
- package/src/web/ui/auth/forms/verify-email-form.tsx +373 -0
- package/src/web/ui/auth/hooks.ts +266 -0
- package/src/web/ui/auth/index.ts +31 -0
- package/src/web/ui/auth/magic-link-form.tsx +191 -0
- package/src/web/ui/auth/otp-input.stories.tsx +199 -0
- package/src/web/ui/auth/otp-input.tsx +157 -0
- package/src/web/ui/auth/passkey-button.stories.tsx +115 -0
- package/src/web/ui/auth/passkey-button.tsx +113 -0
- package/src/web/ui/auth/passkey-register-button.stories.tsx +109 -0
- package/src/web/ui/auth/passkey-register-button.tsx +106 -0
- package/src/web/ui/auth/password-input.stories.tsx +287 -0
- package/src/web/ui/auth/password-input.tsx +306 -0
- package/src/web/ui/auth/phone-input.stories.tsx +160 -0
- package/src/web/ui/auth/phone-input.tsx +89 -0
- package/src/web/ui/auth/social-buttons.stories.tsx +217 -0
- package/src/web/ui/auth/social-buttons.tsx +196 -0
- package/src/web/ui/auth/sso-button.stories.tsx +160 -0
- package/src/web/ui/auth/sso-button.tsx +108 -0
- package/src/web/ui/auth/trust-signals.stories.tsx +208 -0
- package/src/web/ui/auth/trust-signals.tsx +260 -0
- package/src/web/ui/avatar.stories.tsx +302 -0
- package/src/web/ui/avatar.tsx +189 -0
- package/src/web/ui/badge.stories.tsx +225 -0
- package/src/web/ui/badge.tsx +66 -0
- package/src/web/ui/brand.stories.tsx +266 -0
- package/src/web/ui/brand.tsx +162 -0
- package/src/web/ui/breadcrumb.stories.tsx +271 -0
- package/src/web/ui/breadcrumb.tsx +214 -0
- package/src/web/ui/button-group.stories.tsx +251 -0
- package/src/web/ui/button-group.tsx +87 -0
- package/src/web/ui/button.stories.tsx +264 -0
- package/src/web/ui/button.tsx +120 -0
- package/src/web/ui/calendar.stories.tsx +235 -0
- package/src/web/ui/calendar.tsx +221 -0
- package/src/web/ui/card.stories.tsx +262 -0
- package/src/web/ui/card.tsx +199 -0
- package/src/web/ui/carousel.stories.tsx +244 -0
- package/src/web/ui/carousel.tsx +241 -0
- package/src/web/ui/chart.stories.tsx +833 -0
- package/src/web/ui/chart.tsx +390 -0
- package/src/web/ui/checkbox.stories.tsx +208 -0
- package/src/web/ui/checkbox.tsx +39 -0
- package/src/web/ui/collapsible.stories.tsx +239 -0
- package/src/web/ui/collapsible.tsx +21 -0
- package/src/web/ui/command.stories.tsx +291 -0
- package/src/web/ui/command.tsx +189 -0
- package/src/web/ui/context-menu.stories.tsx +255 -0
- package/src/web/ui/context-menu.tsx +263 -0
- package/src/web/ui/dialog.stories.tsx +263 -0
- package/src/web/ui/dialog.tsx +273 -0
- package/src/web/ui/drawer.stories.tsx +299 -0
- package/src/web/ui/drawer.tsx +130 -0
- package/src/web/ui/dropdown-menu.stories.tsx +320 -0
- package/src/web/ui/dropdown-menu.tsx +263 -0
- package/src/web/ui/empty.stories.tsx +204 -0
- package/src/web/ui/empty.tsx +101 -0
- package/src/web/ui/error-page.stories.tsx +181 -0
- package/src/web/ui/error-page.tsx +136 -0
- package/src/web/ui/field.stories.tsx +364 -0
- package/src/web/ui/field.tsx +252 -0
- package/src/web/ui/globals.css +3 -0
- package/src/web/ui/hover-card.stories.tsx +261 -0
- package/src/web/ui/hover-card.tsx +50 -0
- package/src/web/ui/index.ts +55 -0
- package/src/web/ui/input-group.stories.tsx +290 -0
- package/src/web/ui/input-group.tsx +157 -0
- package/src/web/ui/input-otp.stories.tsx +235 -0
- package/src/web/ui/input-otp.tsx +86 -0
- package/src/web/ui/input.stories.tsx +205 -0
- package/src/web/ui/input.tsx +30 -0
- package/src/web/ui/item.stories.tsx +348 -0
- package/src/web/ui/item.tsx +200 -0
- package/src/web/ui/kbd.stories.tsx +236 -0
- package/src/web/ui/kbd.tsx +27 -0
- package/src/web/ui/label.stories.tsx +180 -0
- package/src/web/ui/label.tsx +32 -0
- package/src/web/ui/locales/en/ui.json +13 -30
- package/src/web/ui/locales/zh-CN/ui.json +17 -34
- package/src/web/ui/locales/zh-TW/ui.json +17 -34
- package/src/web/ui/menubar.stories.tsx +385 -0
- package/src/web/ui/menubar.tsx +273 -0
- package/src/web/ui/navigation-menu.stories.tsx +361 -0
- package/src/web/ui/navigation-menu.tsx +168 -0
- package/src/web/ui/pagination.stories.tsx +312 -0
- package/src/web/ui/pagination.tsx +221 -0
- package/src/web/ui/popover.stories.tsx +315 -0
- package/src/web/ui/popover.tsx +89 -0
- package/src/web/ui/progress.stories.tsx +239 -0
- package/src/web/ui/progress.tsx +128 -0
- package/src/web/ui/radio-group.stories.tsx +315 -0
- package/src/web/ui/radio-group.tsx +38 -0
- package/src/web/ui/resizable.stories.tsx +304 -0
- package/src/web/ui/resizable.tsx +53 -0
- package/src/web/ui/scroll-area.stories.tsx +276 -0
- package/src/web/ui/scroll-area.tsx +53 -0
- package/src/web/ui/select.stories.tsx +314 -0
- package/src/web/ui/select.tsx +312 -0
- package/src/web/ui/separator.stories.tsx +246 -0
- package/src/web/ui/separator.tsx +36 -0
- package/src/web/ui/sheet.stories.tsx +417 -0
- package/src/web/ui/sheet.tsx +133 -0
- package/src/web/ui/sidebar.stories.tsx +402 -0
- package/src/web/ui/sidebar.tsx +723 -0
- package/src/web/ui/skeleton.stories.tsx +235 -0
- package/src/web/ui/skeleton.tsx +26 -0
- package/src/web/ui/slider.stories.tsx +294 -0
- package/src/web/ui/slider.tsx +75 -0
- package/src/web/ui/sonner.stories.tsx +279 -0
- package/src/web/ui/sonner.tsx +46 -0
- package/src/web/ui/spinner.stories.tsx +204 -0
- package/src/web/ui/spinner.tsx +28 -0
- package/src/web/ui/switch.stories.tsx +285 -0
- package/src/web/ui/switch.tsx +43 -0
- package/src/web/ui/table.stories.tsx +362 -0
- package/src/web/ui/table.tsx +115 -0
- package/src/web/ui/tabs.stories.tsx +401 -0
- package/src/web/ui/tabs.tsx +136 -0
- package/src/web/ui/textarea.stories.tsx +272 -0
- package/src/web/ui/textarea.tsx +28 -0
- package/src/web/ui/toggle-group.stories.tsx +334 -0
- package/src/web/ui/toggle-group.tsx +88 -0
- package/src/web/ui/toggle.stories.tsx +264 -0
- package/src/web/ui/toggle.tsx +57 -0
- package/src/web/ui/tooltip.stories.tsx +342 -0
- package/src/web/ui/tooltip.tsx +116 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../auth-
|
|
2
|
-
import { z as Container } from "../index-
|
|
1
|
+
import "../auth-BCOIpGDO.mjs";
|
|
2
|
+
import { z as Container } from "../index-CiuTp085.mjs";
|
|
3
3
|
import "../orm-CJrd147z.mjs";
|
|
4
4
|
import "../instrumentation-CFIspF8-.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
@@ -7,7 +7,6 @@ import { ChildProcess } from "node:child_process";
|
|
|
7
7
|
import * as p from "@clack/prompts";
|
|
8
8
|
|
|
9
9
|
//#region src/cli/context.d.ts
|
|
10
|
-
|
|
11
10
|
/**
|
|
12
11
|
* Command context providing beautiful output, prompts, and utilities.
|
|
13
12
|
* Uses @clack/prompts for consistent, professional CLI formatting.
|
|
@@ -18,168 +17,168 @@ import * as p from "@clack/prompts";
|
|
|
18
17
|
*/
|
|
19
18
|
interface CommandContext<C extends Container = Container, A = readonly unknown[], O = Record<string, unknown>> {
|
|
20
19
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
* The parsed command-line arguments.
|
|
21
|
+
* Type is inferred from the command's Zod args schema.
|
|
22
|
+
*/
|
|
24
23
|
readonly args: A;
|
|
25
24
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
* Prompts the user for single-line text input.
|
|
26
|
+
* @see https://www.clack.cc for prompt options
|
|
27
|
+
*/
|
|
29
28
|
ask: typeof p.text;
|
|
30
29
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
* Displays a cancellation message and exits the process with code 0.
|
|
31
|
+
* @param message - Optional cancellation message (defaults to "Cancelled")
|
|
32
|
+
*/
|
|
34
33
|
cancel(message?: string): never;
|
|
35
34
|
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
* Prompts the user for dropdown selection from a list of options.
|
|
36
|
+
* @see https://www.clack.cc for prompt options
|
|
37
|
+
*/
|
|
39
38
|
choice: typeof p.select;
|
|
40
39
|
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
* Releases all container resources including database connections and cache clients.
|
|
41
|
+
* Must be called before the command exits to prevent resource leaks.
|
|
42
|
+
*/
|
|
44
43
|
cleanup(): Promise<void>;
|
|
45
44
|
/**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
* Displays a dimmed comment line for secondary information.
|
|
46
|
+
* @param message - The comment text to display
|
|
47
|
+
*/
|
|
49
48
|
comment(message: string): void;
|
|
50
49
|
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
* Prompts the user for yes/no confirmation.
|
|
51
|
+
* @see https://www.clack.cc for prompt options
|
|
52
|
+
*/
|
|
54
53
|
confirm: typeof p.confirm;
|
|
55
54
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
* The dependency injection container providing access to services.
|
|
56
|
+
* Includes database connections, cache clients, logger, mailer, and configuration.
|
|
57
|
+
*/
|
|
59
58
|
readonly container: C;
|
|
60
59
|
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
* Displays an error message with the error symbol.
|
|
61
|
+
* @param message - The error message to display
|
|
62
|
+
*/
|
|
64
63
|
error(message: string): void;
|
|
65
64
|
/**
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
* Executes a shell command asynchronously.
|
|
66
|
+
* @param command - The command to execute
|
|
67
|
+
* @param args - Array of command arguments
|
|
68
|
+
* @throws Error if the command exits with a non-zero code
|
|
69
|
+
*/
|
|
71
70
|
exec(command: string, args: string[]): Promise<void>;
|
|
72
71
|
/**
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
* Displays an error message and terminates the process with exit code 1.
|
|
73
|
+
* @param message - The error message to display before exiting
|
|
74
|
+
*/
|
|
76
75
|
fail(message: string): never;
|
|
77
76
|
/**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
* Executes a shell command with inherited stdio so output is visible.
|
|
78
|
+
* Returns both the process handle and a promise that resolves on completion.
|
|
79
|
+
* @param command - The command to execute
|
|
80
|
+
* @param args - Array of command arguments
|
|
81
|
+
* @returns Object with `proc` (ChildProcess) and `promise` (Promise)
|
|
82
|
+
*/
|
|
84
83
|
run(command: string, args: string[]): {
|
|
85
84
|
proc: ChildProcess;
|
|
86
85
|
promise: Promise<void>;
|
|
87
86
|
};
|
|
88
87
|
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
* Groups multiple prompts together for sequential execution.
|
|
89
|
+
* @see https://www.clack.cc for group options
|
|
90
|
+
*/
|
|
92
91
|
group: typeof p.group;
|
|
93
92
|
/**
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
* Displays an informational message with the info symbol.
|
|
94
|
+
* @param message - The info message to display
|
|
95
|
+
*/
|
|
97
96
|
info(message: string): void;
|
|
98
97
|
/**
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
* Displays the command intro header.
|
|
99
|
+
* @param title - The command name or title to display
|
|
100
|
+
*/
|
|
102
101
|
intro(title: string): void;
|
|
103
102
|
/**
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
* Checks if a prompt result indicates user cancellation (Ctrl+C).
|
|
104
|
+
* @param value - The prompt result to check
|
|
105
|
+
* @returns True if the user cancelled the prompt
|
|
106
|
+
*/
|
|
108
107
|
isCancel: typeof p.isCancel;
|
|
109
108
|
/**
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
* Displays a plain text line.
|
|
110
|
+
* @param message - The text to display
|
|
111
|
+
*/
|
|
113
112
|
line(message: string): void;
|
|
114
113
|
/**
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
* Prompts the user to select multiple options from a list.
|
|
115
|
+
* @see https://www.clack.cc for multiselect options
|
|
116
|
+
*/
|
|
118
117
|
multiselect: typeof p.multiselect;
|
|
119
118
|
/**
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
* Displays a formatted note box with optional title.
|
|
120
|
+
* @param message - The note content
|
|
121
|
+
* @param title - Optional title for the note
|
|
122
|
+
*/
|
|
124
123
|
note(message: string, title?: string): void;
|
|
125
124
|
/**
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
* The parsed command-line options.
|
|
126
|
+
* Type is inferred from the command's Zod opts schema.
|
|
127
|
+
*/
|
|
129
128
|
readonly opts: O;
|
|
130
129
|
/**
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
130
|
+
* Displays the command outro footer.
|
|
131
|
+
* @param message - Optional completion message (defaults to "Done")
|
|
132
|
+
*/
|
|
134
133
|
outro(message?: string): void;
|
|
135
134
|
/**
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
* Prompts the user for password input with hidden characters.
|
|
136
|
+
* @see https://www.clack.cc for prompt options
|
|
137
|
+
*/
|
|
139
138
|
secret: typeof p.password;
|
|
140
139
|
/**
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
140
|
+
* Executes an async function while displaying an animated spinner.
|
|
141
|
+
* Use for long-running operations like starting containers.
|
|
142
|
+
* @template T - Return type of the task function
|
|
143
|
+
* @param message - Message to display while spinning
|
|
144
|
+
* @param fn - Async function to execute
|
|
145
|
+
* @returns The result of the task function
|
|
146
|
+
*/
|
|
148
147
|
spinner<T>(message: string, fn: () => Promise<T>): Promise<T>;
|
|
149
148
|
/**
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
* Displays a step message indicating progress.
|
|
150
|
+
* @param message - The step description
|
|
151
|
+
*/
|
|
153
152
|
step(message: string): void;
|
|
154
153
|
/**
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
* Displays a success message with the success symbol.
|
|
155
|
+
* @param message - The success message to display
|
|
156
|
+
*/
|
|
158
157
|
success(message: string): void;
|
|
159
158
|
/**
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
159
|
+
* Displays data in a formatted note box as a table.
|
|
160
|
+
* @param headers - Array of column header strings
|
|
161
|
+
* @param rows - 2D array of cell values
|
|
162
|
+
*/
|
|
164
163
|
table(headers: string[], rows: string[][]): void;
|
|
165
164
|
/**
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
165
|
+
* Executes an async function and displays the result with timing.
|
|
166
|
+
* @template T - Return type of the task function
|
|
167
|
+
* @param name - Display name for the task
|
|
168
|
+
* @param fn - Async function to execute
|
|
169
|
+
* @returns The result of the task function
|
|
170
|
+
*/
|
|
172
171
|
task<T>(name: string, fn: () => Promise<T>): Promise<T>;
|
|
173
172
|
/**
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
* Displays a task status line without executing any function.
|
|
174
|
+
* @param name - Display name for the task
|
|
175
|
+
* @param status - Status text to display
|
|
176
|
+
*/
|
|
178
177
|
taskStatus(name: string, status: string): void;
|
|
179
178
|
/**
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
* Displays a warning message with the warning symbol.
|
|
180
|
+
* @param message - The warning message to display
|
|
181
|
+
*/
|
|
183
182
|
warn(message: string): void;
|
|
184
183
|
}
|
|
185
184
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../app-context-LF4QmPUC.mjs";
|
|
2
|
-
import { a as loadWorkflows, h as loadEvents } from "../send-email-
|
|
3
|
-
import { a as DATABASES_DIR, c as
|
|
4
|
-
import { _ as defineMigrationOpts } from "../openapi-
|
|
2
|
+
import { a as loadWorkflows, h as loadEvents } from "../send-email-CXxlkfFL.mjs";
|
|
3
|
+
import { a as DATABASES_DIR, c as FILE_EXT, d as MAIN_ENTRY, g as WEB_DIR, h as TEST_EXTENSIONS, i as COMMANDS_DIR, l as FIXTURES_DIR, n as BUILD_DIR, t as APPOS_DIR } from "../constants-BicCnEiJ.mjs";
|
|
4
|
+
import { _ as defineMigrationOpts } from "../openapi-uisUTLq7.mjs";
|
|
5
5
|
import "../instrumentation-DkoLNAtz.mjs";
|
|
6
|
-
import { t as defineServer } from "../server-
|
|
6
|
+
import { t as defineServer } from "../server-CA4aI0U6.mjs";
|
|
7
7
|
import "../ssr-BsfNjYlJ.mjs";
|
|
8
8
|
import { createRequire } from "node:module";
|
|
9
9
|
import { z } from "zod";
|
|
@@ -431,14 +431,33 @@ var build_default = defineCommand({
|
|
|
431
431
|
} catch {
|
|
432
432
|
hasWebDir = false;
|
|
433
433
|
}
|
|
434
|
-
if (hasWebDir)
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
434
|
+
if (hasWebDir) {
|
|
435
|
+
try {
|
|
436
|
+
await ctx.spinner("Building React Router app", async () => {
|
|
437
|
+
const viteBin = await findBin("vite");
|
|
438
|
+
await ctx.exec(viteBin, ["build"]);
|
|
439
|
+
});
|
|
440
|
+
ctx.success("Built React Router app successfully");
|
|
441
|
+
} catch (error) {
|
|
442
|
+
ctx.fail(error instanceof Error ? error.message : String(error));
|
|
443
|
+
}
|
|
444
|
+
const configDir = join(dirname(createRequire(import.meta.url).resolve("appos/package.json")), "src/storybook/.storybook");
|
|
445
|
+
if (existsSync(configDir)) try {
|
|
446
|
+
await ctx.spinner("Building design system", async () => {
|
|
447
|
+
const storybookBin = await findBin("storybook");
|
|
448
|
+
await ctx.exec(storybookBin, [
|
|
449
|
+
"build",
|
|
450
|
+
"-o",
|
|
451
|
+
`${BUILD_DIR}/storybook`,
|
|
452
|
+
"--config-dir",
|
|
453
|
+
configDir,
|
|
454
|
+
"--quiet"
|
|
455
|
+
]);
|
|
456
|
+
});
|
|
457
|
+
ctx.success("Built design system successfully");
|
|
458
|
+
} catch (error) {
|
|
459
|
+
ctx.warn(`Storybook build failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
460
|
+
}
|
|
442
461
|
}
|
|
443
462
|
const entryPoints = await collectEntryPoints();
|
|
444
463
|
const outdir = `./${BUILD_DIR}`;
|
|
@@ -1404,7 +1423,7 @@ var preview_default = defineCommand({
|
|
|
1404
1423
|
|
|
1405
1424
|
//#endregion
|
|
1406
1425
|
//#region package.json
|
|
1407
|
-
var version = "0.
|
|
1426
|
+
var version = "0.5.1-0";
|
|
1408
1427
|
|
|
1409
1428
|
//#endregion
|
|
1410
1429
|
//#region src/cli/commands/repl.ts
|
|
@@ -1526,6 +1545,7 @@ var start_default = defineCommand({
|
|
|
1526
1545
|
const startWorker = !opts.service || opts.service === "worker";
|
|
1527
1546
|
let server = null;
|
|
1528
1547
|
let worker = null;
|
|
1548
|
+
let storybookProc = null;
|
|
1529
1549
|
let isShuttingDown = false;
|
|
1530
1550
|
/**
|
|
1531
1551
|
* Graceful shutdown handler.
|
|
@@ -1535,6 +1555,10 @@ var start_default = defineCommand({
|
|
|
1535
1555
|
isShuttingDown = true;
|
|
1536
1556
|
logger.info(`Shutdown initiated (${signal})`);
|
|
1537
1557
|
try {
|
|
1558
|
+
if (storybookProc && !storybookProc.killed) {
|
|
1559
|
+
storybookProc.kill("SIGKILL");
|
|
1560
|
+
logger.info("Design system stopped");
|
|
1561
|
+
}
|
|
1538
1562
|
if (server) {
|
|
1539
1563
|
await server.stop();
|
|
1540
1564
|
logger.info("HTTP server stopped");
|
|
@@ -1560,6 +1584,56 @@ var start_default = defineCommand({
|
|
|
1560
1584
|
server = await defineServer({ container });
|
|
1561
1585
|
await server.start();
|
|
1562
1586
|
logger.info(`HTTP server ready at http://${server.host}:${server.port} ${runtimeInfo}`);
|
|
1587
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1588
|
+
const configDir = join(dirname(createRequire(import.meta.url).resolve("appos/package.json")), "src/storybook/.storybook");
|
|
1589
|
+
let binPath = "";
|
|
1590
|
+
let dir = process.cwd();
|
|
1591
|
+
while (dir !== "/") {
|
|
1592
|
+
const candidate = join(dir, "node_modules", ".bin");
|
|
1593
|
+
if (existsSync(candidate)) {
|
|
1594
|
+
binPath = candidate;
|
|
1595
|
+
break;
|
|
1596
|
+
}
|
|
1597
|
+
dir = dirname(dir);
|
|
1598
|
+
}
|
|
1599
|
+
const { spawn: spawn$1 } = await import("node:child_process");
|
|
1600
|
+
storybookProc = spawn$1("storybook", [
|
|
1601
|
+
"dev",
|
|
1602
|
+
"-p",
|
|
1603
|
+
"6006",
|
|
1604
|
+
"--no-open",
|
|
1605
|
+
"--config-dir",
|
|
1606
|
+
configDir
|
|
1607
|
+
], {
|
|
1608
|
+
stdio: "ignore",
|
|
1609
|
+
cwd: process.cwd(),
|
|
1610
|
+
env: {
|
|
1611
|
+
...process.env,
|
|
1612
|
+
PATH: binPath ? `${binPath}:${process.env.PATH}` : process.env.PATH
|
|
1613
|
+
}
|
|
1614
|
+
});
|
|
1615
|
+
storybookProc.on("exit", (code) => {
|
|
1616
|
+
if (code !== 0 && code !== null && !isShuttingDown) logger.error(`Design system exited with code ${code}`);
|
|
1617
|
+
storybookProc = null;
|
|
1618
|
+
});
|
|
1619
|
+
storybookProc.on("error", (err) => {
|
|
1620
|
+
if (!isShuttingDown) logger.error(`Design system spawn error: ${err.message}`);
|
|
1621
|
+
});
|
|
1622
|
+
/**
|
|
1623
|
+
* Waits for a port to become available by polling.
|
|
1624
|
+
*/
|
|
1625
|
+
const waitForPort = async (port, timeout) => {
|
|
1626
|
+
const start = Date.now();
|
|
1627
|
+
while (Date.now() - start < timeout) try {
|
|
1628
|
+
await fetch(`http://localhost:${port}`);
|
|
1629
|
+
return true;
|
|
1630
|
+
} catch {
|
|
1631
|
+
await new Promise((r) => setTimeout(r, 200));
|
|
1632
|
+
}
|
|
1633
|
+
return false;
|
|
1634
|
+
};
|
|
1635
|
+
if (!await waitForPort(6006, 3e4) && storybookProc && !storybookProc.killed) logger.warn("Design system slow to start, /design may not be ready yet");
|
|
1636
|
+
}
|
|
1563
1637
|
}
|
|
1564
1638
|
}
|
|
1565
1639
|
});
|
|
@@ -163,6 +163,12 @@ const FIXTURES_DIR = "__fixtures__";
|
|
|
163
163
|
* @default [".test.ts", ".spec.ts"]
|
|
164
164
|
*/
|
|
165
165
|
const TEST_EXTENSIONS = [".test.ts", ".spec.ts"];
|
|
166
|
+
/**
|
|
167
|
+
* URL path for Storybook design system.
|
|
168
|
+
*
|
|
169
|
+
* @default "/design"
|
|
170
|
+
*/
|
|
171
|
+
const DESIGN_SYSTEM_PATH = "/design";
|
|
166
172
|
|
|
167
173
|
//#endregion
|
|
168
|
-
export { DATABASES_DIR as a,
|
|
174
|
+
export { WORKFLOWS_DIR as _, DATABASES_DIR as a, FILE_EXT as c, MAIN_ENTRY as d, MIDDLEWARE_DIR as f, WEB_DIR as g, TEST_EXTENSIONS as h, COMMANDS_DIR as i, FIXTURES_DIR as l, ROUTES_DIR as m, BUILD_DIR as n, DESIGN_SYSTEM_PATH as o, PUBLIC_DIR as p, BUILD_OUTPUT_DIR as r, EVENTS_DIR as s, APPOS_DIR as t, LOCALES_DIR as u };
|