flarecms 0.2.1 → 0.2.3
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/api/lib/cache.d.ts +18 -0
- package/dist/api/lib/response.d.ts +44 -0
- package/dist/api/middlewares/auth.d.ts +10 -0
- package/dist/api/middlewares/cors.d.ts +1 -0
- package/dist/api/middlewares/rbac.d.ts +21 -0
- package/dist/api/routes/auth.d.ts +6 -0
- package/dist/api/routes/collections.d.ts +6 -0
- package/dist/api/routes/content.d.ts +6 -0
- package/dist/api/routes/device.d.ts +6 -0
- package/dist/api/routes/magic.d.ts +6 -0
- package/dist/api/routes/mcp.d.ts +6 -0
- package/dist/api/routes/oauth.d.ts +6 -0
- package/dist/api/routes/plugins.d.ts +6 -0
- package/dist/api/routes/settings.d.ts +6 -0
- package/dist/api/routes/setup.d.ts +6 -0
- package/dist/api/routes/tokens.d.ts +6 -0
- package/dist/api/schemas/auth.d.ts +12 -0
- package/dist/api/schemas/index.d.ts +43 -0
- package/dist/api/schemas/tokens.d.ts +20 -0
- package/dist/auth/index.d.ts +11 -0
- package/dist/cli/commands.d.ts +3 -0
- package/dist/cli/commands.js +50 -28
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +50 -28
- package/dist/cli/mcp.d.ts +9 -0
- package/dist/cli/tests/cli.test.d.ts +1 -0
- package/dist/cli/tests/create-plugin-template.test.d.ts +1 -0
- package/dist/cli/tests/create.test.d.ts +1 -0
- package/dist/cli/tests/plugin.test.d.ts +1 -0
- package/dist/cli/tests/publish.test.d.ts +1 -0
- package/dist/client/FlareAdminRouter.d.ts +20 -0
- package/dist/client/app.d.ts +1 -0
- package/dist/client/components/app-sidebar.d.ts +5 -0
- package/dist/client/components/blocks/block-card.d.ts +7 -0
- package/dist/client/components/blocks/block-form.d.ts +7 -0
- package/dist/client/components/blocks/block-renderer.d.ts +10 -0
- package/dist/client/components/blocks/block-table.d.ts +7 -0
- package/dist/client/components/collection-modal.d.ts +6 -0
- package/dist/client/components/content-list.d.ts +3 -0
- package/dist/client/components/dynamic-form.d.ts +9 -0
- package/dist/client/components/field-modal.d.ts +8 -0
- package/dist/client/components/plugin-widget.d.ts +6 -0
- package/dist/client/components/settings/api-token-section.d.ts +1 -0
- package/dist/client/components/settings/general-section.d.ts +1 -0
- package/dist/client/components/settings/security-section.d.ts +1 -0
- package/dist/client/components/settings/seo-section.d.ts +1 -0
- package/dist/client/components/settings/signup-section.d.ts +1 -0
- package/dist/client/components/ui/accordion.d.ts +6 -0
- package/dist/client/components/ui/avatar.d.ts +11 -0
- package/dist/client/components/ui/badge.d.ts +7 -0
- package/dist/client/components/ui/button.d.ts +11 -0
- package/dist/client/components/ui/card.d.ts +11 -0
- package/dist/client/components/ui/checkbox.d.ts +3 -0
- package/dist/client/components/ui/collapsible.d.ts +5 -0
- package/dist/client/components/ui/dialog.d.ts +17 -0
- package/dist/client/components/ui/icon-picker.d.ts +27 -0
- package/dist/client/components/ui/icons-data.d.ts +5 -0
- package/dist/client/components/ui/input.d.ts +3 -0
- package/dist/client/components/ui/label.d.ts +3 -0
- package/dist/client/components/ui/popover.d.ts +10 -0
- package/dist/client/components/ui/select.d.ts +15 -0
- package/dist/client/components/ui/separator.d.ts +3 -0
- package/dist/client/components/ui/sheet.d.ts +14 -0
- package/dist/client/components/ui/sidebar.d.ts +63 -0
- package/dist/client/components/ui/skeleton.d.ts +2 -0
- package/dist/client/components/ui/sonner.d.ts +3 -0
- package/dist/client/components/ui/switch.d.ts +5 -0
- package/dist/client/components/ui/table.d.ts +10 -0
- package/dist/client/components/ui/tabs.d.ts +10 -0
- package/dist/client/components/ui/textarea.d.ts +3 -0
- package/dist/client/components/ui/tooltip.d.ts +6 -0
- package/dist/client/hooks/use-mobile.d.ts +1 -0
- package/dist/client/index.d.ts +8 -0
- package/dist/client/layouts/admin-layout.d.ts +6 -0
- package/dist/client/layouts/settings-layout.d.ts +6 -0
- package/dist/client/lib/api.d.ts +18 -0
- package/dist/client/lib/block-registry.d.ts +24 -0
- package/dist/client/lib/block-types.d.ts +132 -0
- package/dist/client/lib/utils.d.ts +2 -0
- package/dist/client/main.d.ts +1 -0
- package/dist/client/pages/collection-detail.d.ts +7 -0
- package/dist/client/pages/collections.d.ts +1 -0
- package/dist/client/pages/dashboard.d.ts +1 -0
- package/dist/client/pages/device.d.ts +1 -0
- package/dist/client/pages/document-detail-page.d.ts +1 -0
- package/dist/client/pages/documents-page.d.ts +1 -0
- package/dist/client/pages/login.d.ts +1 -0
- package/dist/client/pages/plugin-manager.d.ts +1 -0
- package/dist/client/pages/plugin-page.d.ts +6 -0
- package/dist/client/pages/settings.d.ts +1 -0
- package/dist/client/pages/setup.d.ts +1 -0
- package/dist/client/pages/signup.d.ts +1 -0
- package/dist/client/store/auth.d.ts +10 -0
- package/dist/client/store/collections.d.ts +3 -0
- package/dist/client/store/config.d.ts +4 -0
- package/dist/client/store/fetcher.d.ts +4 -0
- package/dist/client/store/plugins.d.ts +21 -0
- package/dist/client/store/router.d.ts +84 -0
- package/dist/client/store/schema.d.ts +7 -0
- package/dist/client/store/settings.d.ts +7 -0
- package/dist/client/types.d.ts +31 -0
- package/dist/db/dynamic.d.ts +5 -0
- package/dist/db/index.d.ts +8 -0
- package/dist/db/migrations/001_initial_schema.d.ts +3 -0
- package/dist/db/migrations/002_auth_tables.d.ts +3 -0
- package/dist/db/migrations/003_plugins.d.ts +3 -0
- package/dist/db/migrator.d.ts +10 -0
- package/dist/db/schema.d.ts +151 -0
- package/dist/index.d.ts +11 -0
- package/dist/plugins/adapt-entry.d.ts +5 -0
- package/dist/plugins/context.d.ts +21 -0
- package/dist/plugins/define-plugin.d.ts +22 -0
- package/dist/plugins/hooks.d.ts +37 -0
- package/dist/plugins/index.d.ts +7 -0
- package/dist/plugins/manager.d.ts +41 -0
- package/dist/plugins/middleware.d.ts +8 -0
- package/dist/plugins/noop-sandbox.d.ts +18 -0
- package/dist/plugins/routes.d.ts +32 -0
- package/dist/plugins/sandbox/bridge.d.ts +45 -0
- package/dist/plugins/sandbox/runner.d.ts +14 -0
- package/dist/plugins/sandbox/types.d.ts +71 -0
- package/dist/plugins/sandbox/wrapper.d.ts +6 -0
- package/dist/plugins/types.d.ts +725 -0
- package/dist/server/index.d.ts +18 -0
- package/dist/types.d.ts +19 -0
- package/package.json +34 -10
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { PluginCapability } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Interface for the Cloudflare Worker Loader API.
|
|
4
|
+
*/
|
|
5
|
+
export interface WorkerLoader {
|
|
6
|
+
get(id: string, configFactory: () => WorkerLoaderConfig): WorkerStub;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Configuration for a dynamic worker.
|
|
10
|
+
*/
|
|
11
|
+
export interface WorkerLoaderConfig {
|
|
12
|
+
compatibilityDate?: string;
|
|
13
|
+
compatibilityFlags?: string[];
|
|
14
|
+
mainModule: string;
|
|
15
|
+
modules: Record<string, {
|
|
16
|
+
js: string;
|
|
17
|
+
} | {
|
|
18
|
+
text: string;
|
|
19
|
+
} | {
|
|
20
|
+
data: ArrayBuffer;
|
|
21
|
+
}>;
|
|
22
|
+
env?: Record<string, any>;
|
|
23
|
+
limits?: {
|
|
24
|
+
cpuMs?: number;
|
|
25
|
+
subRequests?: number;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A stub for interacting with a dynamic worker.
|
|
30
|
+
*/
|
|
31
|
+
export interface WorkerStub {
|
|
32
|
+
fetch(request: Request | string, init?: RequestInit): Promise<Response>;
|
|
33
|
+
get(pluginId: string): any;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Metadata passed to the PluginBridge when it's instantiated.
|
|
37
|
+
*/
|
|
38
|
+
export interface PluginBridgeProps {
|
|
39
|
+
pluginId: string;
|
|
40
|
+
version: string;
|
|
41
|
+
capabilities: PluginCapability[];
|
|
42
|
+
allowedHosts: string[];
|
|
43
|
+
storageCollections: string[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Typing for the environment available to the PluginBridge.
|
|
47
|
+
*/
|
|
48
|
+
export interface PluginBridgeEnv {
|
|
49
|
+
DB: any;
|
|
50
|
+
KV: any;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The RPC interface exposed by the PluginBridge.
|
|
54
|
+
*/
|
|
55
|
+
export interface PluginBridgeInterface {
|
|
56
|
+
kvGet(key: string): Promise<any>;
|
|
57
|
+
kvSet(key: string, value: any): Promise<void>;
|
|
58
|
+
kvDelete(key: string): Promise<boolean>;
|
|
59
|
+
kvList(prefix?: string): Promise<any[]>;
|
|
60
|
+
storageGet(collection: string, id: string): Promise<any>;
|
|
61
|
+
storagePut(collection: string, id: string, data: any): Promise<void>;
|
|
62
|
+
storageDelete(collection: string, id: string): Promise<boolean>;
|
|
63
|
+
storageQuery(collection: string, opts?: any): Promise<any>;
|
|
64
|
+
contentGet(collection: string, id: string): Promise<any>;
|
|
65
|
+
contentList(collection: string, opts?: any): Promise<any>;
|
|
66
|
+
contentCreate(collection: string, data: any): Promise<any>;
|
|
67
|
+
contentUpdate(collection: string, id: string, data: any): Promise<any>;
|
|
68
|
+
contentDelete(collection: string, id: string): Promise<boolean>;
|
|
69
|
+
httpFetch(url: string, init?: any): Promise<any>;
|
|
70
|
+
log(level: string, message: string, data?: any): void;
|
|
71
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PluginManifest } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Generates the JavaScript wrapper code that runs inside the Worker Isolate.
|
|
4
|
+
* It sets up the RPC bridge to the host and provides the PluginContext.
|
|
5
|
+
*/
|
|
6
|
+
export declare function generatePluginWrapper(manifest: PluginManifest): string;
|