@motiadev/workbench 0.13.0-beta.162-846200 → 0.13.0-beta.162-813224
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/LICENSE +93 -21
- package/dist/index.d.ts +10 -189
- package/dist/index.html +1 -1
- package/dist/index.js +7 -1065
- package/dist/middleware.d.ts +8 -66
- package/dist/middleware.js +86 -684
- package/dist/motia-plugin/__tests__/generator.test.d.ts +1 -0
- package/dist/motia-plugin/__tests__/generator.test.js +97 -0
- package/dist/motia-plugin/__tests__/resolver.test.d.ts +1 -0
- package/dist/motia-plugin/__tests__/resolver.test.js +64 -0
- package/dist/motia-plugin/__tests__/validator.test.d.ts +1 -0
- package/dist/motia-plugin/__tests__/validator.test.js +59 -0
- package/dist/motia-plugin/generator.d.ts +78 -0
- package/dist/motia-plugin/{generator.ts → generator.js} +35 -37
- package/dist/motia-plugin/hmr.d.ts +22 -0
- package/dist/motia-plugin/hmr.js +100 -0
- package/dist/motia-plugin/index.d.ts +3 -0
- package/dist/motia-plugin/index.js +153 -0
- package/dist/motia-plugin/{resolver.ts → resolver.d.ts} +5 -38
- package/dist/motia-plugin/resolver.js +92 -0
- package/dist/motia-plugin/types.d.ts +169 -0
- package/dist/motia-plugin/types.js +36 -0
- package/dist/motia-plugin/{utils.ts → utils.d.ts} +4 -17
- package/dist/motia-plugin/utils.js +75 -0
- package/dist/motia-plugin/validator.d.ts +19 -0
- package/dist/motia-plugin/validator.js +163 -0
- package/dist/src/App.d.ts +2 -0
- package/dist/src/App.js +35 -0
- package/dist/src/components/NotFoundPage.d.ts +1 -0
- package/dist/src/components/NotFoundPage.js +3 -0
- package/dist/src/components/bottom-panel.d.ts +1 -0
- package/dist/src/components/bottom-panel.js +15 -0
- package/dist/src/components/flow/base-edge.d.ts +3 -0
- package/dist/src/components/flow/base-edge.js +39 -0
- package/dist/src/components/flow/flow-loader.d.ts +1 -0
- package/dist/src/components/flow/flow-loader.js +4 -0
- package/dist/src/components/flow/flow-page.d.ts +1 -0
- package/dist/src/components/flow/flow-page.js +25 -0
- package/dist/src/components/flow/flow-tab-menu-item.d.ts +1 -0
- package/dist/src/components/flow/flow-tab-menu-item.js +18 -0
- package/dist/src/components/flow/flow-view.d.ts +12 -0
- package/dist/src/components/flow/flow-view.js +22 -0
- package/dist/src/components/flow/hooks/use-get-flow-state.d.ts +10 -0
- package/dist/src/components/flow/hooks/use-get-flow-state.js +133 -0
- package/dist/src/components/flow/hooks/use-save-workflow-config.d.ts +2 -0
- package/dist/src/components/flow/hooks/use-save-workflow-config.js +22 -0
- package/dist/src/components/flow/node-organizer.d.ts +10 -0
- package/dist/src/components/flow/node-organizer.js +82 -0
- package/dist/src/components/flow/nodes/api-flow-node.d.ts +2 -0
- package/dist/src/components/flow/nodes/api-flow-node.js +5 -0
- package/dist/src/components/flow/nodes/cron-flow-node.d.ts +2 -0
- package/dist/src/components/flow/nodes/cron-flow-node.js +5 -0
- package/dist/src/components/flow/nodes/event-flow-node.d.ts +2 -0
- package/dist/src/components/flow/nodes/event-flow-node.js +5 -0
- package/dist/src/components/flow/nodes/noop-flow-node.d.ts +2 -0
- package/dist/src/components/flow/nodes/noop-flow-node.js +5 -0
- package/dist/src/components/header/deploy-button.d.ts +1 -0
- package/dist/src/components/header/deploy-button.js +28 -0
- package/dist/src/components/header/header.d.ts +2 -0
- package/dist/src/components/header/header.js +23 -0
- package/dist/src/components/root-motia.d.ts +2 -0
- package/dist/src/components/root-motia.js +7 -0
- package/dist/src/components/top-panel.d.ts +1 -0
- package/dist/src/components/top-panel.js +15 -0
- package/dist/src/components/tutorial/engine/tutorial-engine.d.ts +12 -0
- package/dist/src/components/tutorial/engine/tutorial-engine.js +36 -0
- package/dist/src/components/tutorial/engine/tutorial-types.d.ts +22 -0
- package/dist/src/components/tutorial/engine/tutorial-types.js +1 -0
- package/dist/src/components/tutorial/engine/workbench-xpath.d.ts +45 -0
- package/dist/src/components/tutorial/engine/workbench-xpath.js +45 -0
- package/dist/src/components/tutorial/hooks/tutorial-utils.d.ts +1 -0
- package/dist/src/components/tutorial/hooks/tutorial-utils.js +17 -0
- package/dist/src/components/tutorial/hooks/use-tutorial-engine.d.ts +15 -0
- package/dist/src/components/tutorial/hooks/use-tutorial-engine.js +183 -0
- package/dist/src/components/tutorial/hooks/use-tutorial.d.ts +5 -0
- package/dist/src/components/tutorial/hooks/use-tutorial.js +10 -0
- package/dist/src/components/tutorial/tutorial-button.d.ts +2 -0
- package/dist/src/components/tutorial/tutorial-button.js +21 -0
- package/dist/src/components/tutorial/tutorial-step.d.ts +14 -0
- package/dist/src/components/tutorial/tutorial-step.js +19 -0
- package/dist/src/components/tutorial/tutorial.css +2 -2
- package/dist/src/components/tutorial/tutorial.d.ts +2 -0
- package/dist/src/components/tutorial/tutorial.js +32 -0
- package/dist/src/components/ui/json-editor.d.ts +12 -0
- package/dist/src/components/ui/json-editor.js +35 -0
- package/dist/src/components/ui/table.d.ts +10 -0
- package/dist/src/components/ui/table.js +20 -0
- package/dist/src/components/ui/theme-toggle.d.ts +2 -0
- package/dist/src/components/ui/theme-toggle.js +19 -0
- package/dist/src/components/ui/tooltip.d.ts +6 -0
- package/dist/src/components/ui/tooltip.js +3 -0
- package/dist/src/hooks/use-debounced.d.ts +1 -0
- package/dist/src/hooks/use-debounced.js +18 -0
- package/dist/src/hooks/use-fetch-flows.d.ts +1 -0
- package/dist/src/hooks/use-fetch-flows.js +26 -0
- package/dist/src/hooks/use-mobile.d.ts +1 -0
- package/dist/src/hooks/use-mobile.js +15 -0
- package/dist/src/hooks/use-update-handle-positions.d.ts +10 -0
- package/dist/src/hooks/use-update-handle-positions.js +35 -0
- package/dist/src/index.css +5 -5
- package/dist/src/lib/__tests__/utils.test.d.ts +1 -0
- package/dist/src/lib/__tests__/utils.test.js +94 -0
- package/dist/src/lib/motia-analytics.d.ts +38 -0
- package/dist/src/lib/motia-analytics.js +132 -0
- package/dist/src/lib/plugins.d.ts +2 -0
- package/dist/src/lib/plugins.js +105 -0
- package/dist/src/lib/utils.d.ts +7 -0
- package/dist/src/lib/utils.js +34 -0
- package/dist/src/main.d.ts +2 -0
- package/dist/src/main.js +17 -0
- package/dist/src/project-view-mode.d.ts +1 -0
- package/dist/src/project-view-mode.js +20 -0
- package/dist/src/publicComponents/api-node.d.ts +5 -0
- package/dist/src/publicComponents/api-node.js +5 -0
- package/dist/src/publicComponents/base-node/base-handle.d.ts +9 -0
- package/dist/src/publicComponents/base-node/base-handle.js +8 -0
- package/dist/src/publicComponents/base-node/base-node.d.ts +15 -0
- package/dist/src/publicComponents/base-node/base-node.js +30 -0
- package/dist/src/publicComponents/base-node/code-display.d.ts +9 -0
- package/dist/src/publicComponents/base-node/code-display.js +64 -0
- package/dist/src/publicComponents/base-node/emits.d.ts +5 -0
- package/dist/src/publicComponents/base-node/emits.js +5 -0
- package/dist/src/publicComponents/base-node/feature-card.d.ts +10 -0
- package/dist/src/publicComponents/base-node/feature-card.js +5 -0
- package/dist/src/publicComponents/base-node/language-indicator.d.ts +10 -0
- package/dist/src/publicComponents/base-node/language-indicator.js +29 -0
- package/dist/src/publicComponents/base-node/node-header.d.ts +13 -0
- package/dist/src/publicComponents/base-node/node-header.js +30 -0
- package/dist/src/publicComponents/base-node/node-sidebar.d.ts +14 -0
- package/dist/src/publicComponents/base-node/node-sidebar.js +9 -0
- package/dist/src/publicComponents/base-node/subscribe.d.ts +4 -0
- package/dist/src/publicComponents/base-node/subscribe.js +4 -0
- package/dist/src/publicComponents/cron-node.d.ts +4 -0
- package/dist/src/publicComponents/cron-node.js +6 -0
- package/dist/src/publicComponents/event-node.d.ts +4 -0
- package/dist/src/publicComponents/event-node.js +5 -0
- package/dist/src/publicComponents/node-props.d.ts +21 -0
- package/dist/src/publicComponents/node-props.js +1 -0
- package/dist/src/publicComponents/noop-node.d.ts +4 -0
- package/dist/src/publicComponents/noop-node.js +5 -0
- package/dist/src/setupTests.d.ts +1 -0
- package/dist/src/setupTests.js +1 -0
- package/dist/src/stores/use-app-tabs-store.d.ts +16 -0
- package/dist/src/stores/use-app-tabs-store.js +31 -0
- package/dist/src/stores/use-flow-store.d.ts +21 -0
- package/dist/src/stores/use-flow-store.js +16 -0
- package/dist/src/stores/use-global-store.d.ts +18 -0
- package/dist/src/stores/use-global-store.js +12 -0
- package/dist/src/stores/use-motia-config-store.d.ts +12 -0
- package/dist/src/stores/use-motia-config-store.js +24 -0
- package/dist/src/stores/use-tabs-store.d.ts +19 -0
- package/dist/src/stores/use-tabs-store.js +22 -0
- package/dist/src/system-view-mode.d.ts +1 -0
- package/dist/src/system-view-mode.js +10 -0
- package/dist/src/types/endpoint.d.ts +14 -0
- package/dist/src/types/endpoint.js +1 -0
- package/dist/src/types/file.d.ts +7 -0
- package/dist/src/types/file.js +1 -0
- package/dist/src/types/flow.d.ts +115 -0
- package/dist/src/types/flow.js +1 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -0
- package/dist/tsconfig.node.tsbuildinfo +1 -0
- package/package.json +51 -55
- package/dist/motia-plugin/__tests__/generator.test.ts +0 -129
- package/dist/motia-plugin/__tests__/resolver.test.ts +0 -82
- package/dist/motia-plugin/__tests__/validator.test.ts +0 -71
- package/dist/motia-plugin/hmr.ts +0 -123
- package/dist/motia-plugin/index.ts +0 -183
- package/dist/motia-plugin/types.ts +0 -198
- package/dist/motia-plugin/validator.ts +0 -197
- package/dist/src/App.tsx +0 -41
- package/dist/src/components/NotFoundPage.tsx +0 -11
- package/dist/src/components/bottom-panel.tsx +0 -39
- package/dist/src/components/flow/base-edge.tsx +0 -61
- package/dist/src/components/flow/flow-loader.tsx +0 -3
- package/dist/src/components/flow/flow-page.tsx +0 -75
- package/dist/src/components/flow/flow-tab-menu-item.tsx +0 -50
- package/dist/src/components/flow/flow-view.tsx +0 -66
- package/dist/src/components/flow/hooks/use-get-flow-state.tsx +0 -171
- package/dist/src/components/flow/hooks/use-save-workflow-config.ts +0 -25
- package/dist/src/components/flow/node-organizer.tsx +0 -103
- package/dist/src/components/flow/nodes/api-flow-node.tsx +0 -6
- package/dist/src/components/flow/nodes/cron-flow-node.tsx +0 -6
- package/dist/src/components/flow/nodes/event-flow-node.tsx +0 -6
- package/dist/src/components/flow/nodes/noop-flow-node.tsx +0 -6
- package/dist/src/components/header/deploy-button.tsx +0 -110
- package/dist/src/components/header/header.tsx +0 -39
- package/dist/src/components/root-motia.tsx +0 -10
- package/dist/src/components/top-panel.tsx +0 -40
- package/dist/src/components/tutorial/engine/tutorial-engine.ts +0 -26
- package/dist/src/components/tutorial/engine/tutorial-types.ts +0 -26
- package/dist/src/components/tutorial/engine/workbench-xpath.ts +0 -53
- package/dist/src/components/tutorial/hooks/tutorial-utils.ts +0 -26
- package/dist/src/components/tutorial/hooks/use-tutorial-engine.ts +0 -213
- package/dist/src/components/tutorial/hooks/use-tutorial.ts +0 -14
- package/dist/src/components/tutorial/tutorial-button.tsx +0 -46
- package/dist/src/components/tutorial/tutorial-step.tsx +0 -82
- package/dist/src/components/tutorial/tutorial.tsx +0 -59
- package/dist/src/components/ui/json-editor.tsx +0 -68
- package/dist/src/components/ui/table.tsx +0 -75
- package/dist/src/components/ui/theme-toggle.tsx +0 -54
- package/dist/src/components/ui/tooltip.tsx +0 -26
- package/dist/src/hooks/use-debounced.ts +0 -22
- package/dist/src/hooks/use-fetch-flows.ts +0 -33
- package/dist/src/hooks/use-mobile.ts +0 -19
- package/dist/src/hooks/use-update-handle-positions.ts +0 -42
- package/dist/src/lib/__tests__/utils.test.ts +0 -110
- package/dist/src/lib/motia-analytics.ts +0 -140
- package/dist/src/lib/plugins.tsx +0 -132
- package/dist/src/lib/utils.ts +0 -37
- package/dist/src/main.tsx +0 -30
- package/dist/src/project-view-mode.tsx +0 -32
- package/dist/src/publicComponents/api-node.tsx +0 -26
- package/dist/src/publicComponents/base-node/base-handle.tsx +0 -50
- package/dist/src/publicComponents/base-node/base-node.tsx +0 -114
- package/dist/src/publicComponents/base-node/code-display.tsx +0 -119
- package/dist/src/publicComponents/base-node/emits.tsx +0 -17
- package/dist/src/publicComponents/base-node/feature-card.tsx +0 -32
- package/dist/src/publicComponents/base-node/language-indicator.tsx +0 -131
- package/dist/src/publicComponents/base-node/node-header.tsx +0 -49
- package/dist/src/publicComponents/base-node/node-sidebar.tsx +0 -41
- package/dist/src/publicComponents/base-node/subscribe.tsx +0 -13
- package/dist/src/publicComponents/cron-node.tsx +0 -24
- package/dist/src/publicComponents/event-node.tsx +0 -20
- package/dist/src/publicComponents/node-props.tsx +0 -15
- package/dist/src/publicComponents/noop-node.tsx +0 -19
- package/dist/src/setupTests.ts +0 -1
- package/dist/src/stores/use-app-tabs-store.ts +0 -49
- package/dist/src/stores/use-flow-store.ts +0 -31
- package/dist/src/stores/use-global-store.ts +0 -24
- package/dist/src/stores/use-motia-config-store.ts +0 -36
- package/dist/src/stores/use-tabs-store.ts +0 -34
- package/dist/src/system-view-mode.tsx +0 -28
- package/dist/src/types/endpoint.ts +0 -12
- package/dist/src/types/file.ts +0 -7
- package/dist/src/types/flow.ts +0 -103
- package/eslint.config.cjs +0 -22
package/dist/middleware.d.ts
CHANGED
|
@@ -1,67 +1,9 @@
|
|
|
1
|
-
import { Express } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
interface WorkbenchPlugin {
|
|
10
|
-
/**
|
|
11
|
-
* The package name or local path to the plugin.
|
|
12
|
-
* - For npm packages: use the package name (e.g., '@my-org/my-plugin')
|
|
13
|
-
* - For local plugins: use the tilde prefix (e.g., '~/plugins/my-plugin')
|
|
14
|
-
*/
|
|
15
|
-
packageName: string;
|
|
16
|
-
/**
|
|
17
|
-
* Optional named export to use from the plugin package.
|
|
18
|
-
* If not specified, the default export will be used.
|
|
19
|
-
* Can be overridden by the plugin's own config.
|
|
20
|
-
*/
|
|
21
|
-
componentName?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Position where the plugin tab should appear in the workbench.
|
|
24
|
-
* - 'top': Display in the top tab bar
|
|
25
|
-
* - 'bottom': Display in the bottom tab bar
|
|
26
|
-
* @default 'top'
|
|
27
|
-
*/
|
|
28
|
-
position?: "top" | "bottom";
|
|
29
|
-
/**
|
|
30
|
-
* Display label for the plugin tab.
|
|
31
|
-
* Can be overridden by the plugin's own config.
|
|
32
|
-
*/
|
|
33
|
-
label?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Icon name from lucide-react to display next to the label.
|
|
36
|
-
* Can be overridden by the plugin's own config.
|
|
37
|
-
* @default 'toy-brick'
|
|
38
|
-
*/
|
|
39
|
-
labelIcon?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Array of CSS package imports to inject into the workbench.
|
|
42
|
-
* These will be added to the main index.css file.
|
|
43
|
-
* Example: ['@my-org/my-plugin/styles.css']
|
|
44
|
-
*/
|
|
45
|
-
cssImports?: string[];
|
|
46
|
-
/**
|
|
47
|
-
* Props to pass to the plugin component when it's rendered.
|
|
48
|
-
* Can be overridden by the plugin's own config.
|
|
49
|
-
*/
|
|
50
|
-
props?: Record<string, any>;
|
|
51
|
-
}
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region middleware.d.ts
|
|
54
|
-
type ApplyMiddlewareParams = {
|
|
55
|
-
app: Express;
|
|
56
|
-
port: number;
|
|
57
|
-
workbenchBase: string;
|
|
58
|
-
plugins: WorkbenchPlugin[];
|
|
1
|
+
import type { Express } from 'express';
|
|
2
|
+
import type { WorkbenchPlugin } from './motia-plugin/types';
|
|
3
|
+
export type ApplyMiddlewareParams = {
|
|
4
|
+
app: Express;
|
|
5
|
+
port: number;
|
|
6
|
+
workbenchBase: string;
|
|
7
|
+
plugins: WorkbenchPlugin[];
|
|
59
8
|
};
|
|
60
|
-
declare const applyMiddleware: ({
|
|
61
|
-
app,
|
|
62
|
-
port,
|
|
63
|
-
workbenchBase,
|
|
64
|
-
plugins
|
|
65
|
-
}: ApplyMiddlewareParams) => Promise<void>;
|
|
66
|
-
//#endregion
|
|
67
|
-
export { ApplyMiddlewareParams, applyMiddleware };
|
|
9
|
+
export declare const applyMiddleware: ({ app, port, workbenchBase, plugins }: ApplyMiddlewareParams) => Promise<void>;
|