everything-dev 1.42.2 → 1.44.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/api-contract.cjs +11 -20
- package/dist/api-contract.cjs.map +1 -1
- package/dist/api-contract.mjs +11 -20
- package/dist/api-contract.mjs.map +1 -1
- package/dist/cli/infra.cjs +11 -4
- package/dist/cli/infra.cjs.map +1 -1
- package/dist/cli/infra.mjs +11 -4
- package/dist/cli/infra.mjs.map +1 -1
- package/dist/cli/init.cjs +4 -2
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.d.cts.map +1 -1
- package/dist/cli/init.d.mts.map +1 -1
- package/dist/cli/init.mjs +4 -2
- package/dist/cli/init.mjs.map +1 -1
- package/dist/cli/status.cjs +5 -10
- package/dist/cli/status.cjs.map +1 -1
- package/dist/cli/status.mjs +5 -10
- package/dist/cli/status.mjs.map +1 -1
- package/dist/cli/upgrade.cjs +2 -15
- package/dist/cli/upgrade.cjs.map +1 -1
- package/dist/cli/upgrade.mjs +2 -15
- package/dist/cli/upgrade.mjs.map +1 -1
- package/dist/config.cjs +6 -24
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +6 -24
- package/dist/config.mjs.map +1 -1
- package/dist/contract.d.cts +0 -60
- package/dist/contract.d.cts.map +1 -1
- package/dist/contract.d.mts +0 -60
- package/dist/contract.d.mts.map +1 -1
- package/dist/fastkv.cjs +12 -29
- package/dist/fastkv.cjs.map +1 -1
- package/dist/fastkv.mjs +13 -29
- package/dist/fastkv.mjs.map +1 -1
- package/dist/http-client.cjs +82 -0
- package/dist/http-client.cjs.map +1 -0
- package/dist/http-client.mjs +80 -0
- package/dist/http-client.mjs.map +1 -0
- package/dist/index.cjs +0 -5
- package/dist/index.d.cts +2 -3
- package/dist/index.d.mts +2 -3
- package/dist/index.mjs +2 -3
- package/dist/integrity.cjs +3 -2
- package/dist/integrity.cjs.map +1 -1
- package/dist/integrity.d.cts.map +1 -1
- package/dist/integrity.d.mts.map +1 -1
- package/dist/integrity.mjs +3 -2
- package/dist/integrity.mjs.map +1 -1
- package/dist/mf.cjs +10 -2
- package/dist/mf.cjs.map +1 -1
- package/dist/mf.d.cts.map +1 -1
- package/dist/mf.d.mts.map +1 -1
- package/dist/mf.mjs +10 -2
- package/dist/mf.mjs.map +1 -1
- package/dist/near-cli.cjs +1 -1
- package/dist/near-cli.mjs +1 -1
- package/dist/orchestrator.cjs +17 -4
- package/dist/orchestrator.cjs.map +1 -1
- package/dist/orchestrator.mjs +17 -4
- package/dist/orchestrator.mjs.map +1 -1
- package/dist/plugin.cjs +5 -6
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +0 -60
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts +0 -60
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +5 -6
- package/dist/plugin.mjs.map +1 -1
- package/dist/types.cjs +2 -21
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +1 -129
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +1 -129
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +3 -20
- package/dist/types.mjs.map +1 -1
- package/package.json +1 -1
- package/skills/cli-reference/SKILL.md +1 -1
- package/skills/plugin-development/SKILL.md +2 -10
- package/skills/ui-integration/SKILL.md +17 -18
- package/dist/sidebar.cjs +0 -116
- package/dist/sidebar.cjs.map +0 -1
- package/dist/sidebar.d.cts +0 -8
- package/dist/sidebar.d.cts.map +0 -1
- package/dist/sidebar.d.mts +0 -8
- package/dist/sidebar.d.mts.map +0 -1
- package/dist/sidebar.mjs +0 -114
- package/dist/sidebar.mjs.map +0 -1
package/dist/types.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","names":[],"sources":["../src/types.ts"],"sourcesContent":["import * as z from \"zod\";\n\nexport type JsonPrimitive = string | number | boolean | null;\nexport interface JsonObject {\n [key: string]: JsonValue;\n}\nexport type JsonValue = JsonPrimitive | JsonObject | JsonValue[];\n\nexport const JsonValueSchema: z.ZodType<JsonValue> = z.lazy(() =>\n z.union([\n z.string(),\n z.number(),\n z.boolean(),\n z.null(),\n z.array(JsonValueSchema),\n z.record(z.string(), JsonValueSchema),\n ]),\n);\nexport const JsonObjectSchema = z.record(z.string(), JsonValueSchema);\n\nexport const ExtendsSchema = z.union([\n z.string(),\n z.object({\n development: z.string().optional(),\n production: z.string().optional(),\n staging: z.string().optional(),\n }),\n]);\nexport type Extends = z.infer<typeof ExtendsSchema>;\nexport type ExtendsConfig = Extract<Extends, Record<string, string | undefined>>;\n\nexport const SourceModeSchema = z.enum([\"local\", \"remote\"]);\nexport type SourceMode = z.infer<typeof SourceModeSchema>;\n\nexport const SharedConfigSchema = z.object({\n version: z.string(),\n requiredVersion: z.string().optional(),\n singleton: z.boolean().optional(),\n eager: z.boolean().optional(),\n strictVersion: z.boolean().optional(),\n shareScope: z.string().optional(),\n});\nexport type SharedConfig = z.infer<typeof SharedConfigSchema>;\nexport type SharedDepConfig = SharedConfig;\nexport const SharedDepConfigSchema = SharedConfigSchema;\nexport const SharedDepMapSchema = z.record(z.string(), SharedConfigSchema);\n\nexport const FederationEntrySchema = z.object({\n name: z.string(),\n url: z.string(),\n entry: z.string(),\n source: SourceModeSchema,\n integrity: z.string().optional(),\n});\nexport type FederationEntry = z.infer<typeof FederationEntrySchema>;\n\nexport const SidebarRoleSchema = z.enum([\"anon\", \"member\", \"admin\"]);\nexport type SidebarRole = z.infer<typeof SidebarRoleSchema>;\n\nexport const SidebarItemSchema = z.object({\n icon: z.string(),\n label: z.string(),\n to: z.string().optional(),\n roleRequired: SidebarRoleSchema.optional(),\n});\nexport type SidebarItem = z.infer<typeof SidebarItemSchema>;\n\nexport const ComposableAppEntrySchema = z.object({\n extends: ExtendsSchema.optional(),\n name: z.string().optional(),\n development: z.string().optional(),\n production: z.string().optional(),\n integrity: z.string().optional(),\n proxy: z.string().optional(),\n variables: JsonObjectSchema.optional(),\n secrets: z.array(z.string()).optional(),\n sidebar: z.array(SidebarItemSchema).optional(),\n routes: z.array(z.string()).optional(),\n shared: SharedDepMapSchema.optional(),\n});\nexport type ComposableAppEntry = z.infer<typeof ComposableAppEntrySchema>;\n\nexport const ApiPluginConfigSchema = ComposableAppEntrySchema;\nexport type ApiPluginConfig = z.infer<typeof ApiPluginConfigSchema>;\n\nexport const PluginUiConfigSchema = z.object({\n name: z.string(),\n development: z.string().optional(),\n production: z.string().optional(),\n integrity: z.string().optional(),\n});\nexport type PluginUiConfig = z.infer<typeof PluginUiConfigSchema>;\n\nexport const BosPluginRefSchema = ComposableAppEntrySchema.extend({\n version: z.string().optional(),\n app: z.record(z.string(), z.unknown()).optional(),\n plugins: z.record(z.string(), z.unknown()).optional(),\n});\nexport type BosPluginRef = z.infer<typeof BosPluginRefSchema>;\nexport type PluginEntryValue = string | BosPluginRef;\nexport type PluginEntries = Record<string, PluginEntryValue>;\n\nconst PluginRuntimeUiSchema = z.object({\n name: z.string(),\n url: z.string(),\n entry: z.string(),\n source: SourceModeSchema,\n localPath: z.string().optional(),\n port: z.number().optional(),\n integrity: z.string().optional(),\n});\nexport type PluginRuntimeUi = z.infer<typeof PluginRuntimeUiSchema>;\n\nexport const RuntimePluginConfigSchema = z.object({\n name: z.string(),\n url: z.string(),\n entry: z.string(),\n source: SourceModeSchema,\n extendsRef: z.string().optional(),\n localPath: z.string().optional(),\n port: z.number().optional(),\n proxy: z.string().optional(),\n variables: JsonObjectSchema.optional(),\n secrets: z.array(z.string()).optional(),\n integrity: z.string().optional(),\n shared: SharedDepMapSchema.optional(),\n ui: PluginRuntimeUiSchema.optional(),\n sidebar: z.array(SidebarItemSchema).optional(),\n routes: z.array(z.string()).optional(),\n});\nexport type RuntimePluginConfig = z.infer<typeof RuntimePluginConfigSchema>;\n\nexport const UiConfigSchema = z\n .object({\n name: z.string().optional(),\n development: z.string().optional(),\n production: z.string().optional(),\n integrity: z.string().optional(),\n ssr: z.string().optional(),\n ssrIntegrity: z.string().optional(),\n })\n .strict();\nexport type UiConfig = z.infer<typeof UiConfigSchema>;\n\nexport const HostConfigSchema = z.object({\n development: z.string(),\n production: z.string(),\n integrity: z.string().optional(),\n secrets: z.array(z.string()).optional(),\n});\nexport type HostConfig = z.infer<typeof HostConfigSchema>;\n\nexport const ClientRuntimeInfoSchema = z.object({\n accountId: z.string(),\n gatewayId: z.string(),\n runtimeBasePath: z.string(),\n title: z.string().nullable(),\n description: z.string().nullable(),\n hostUrl: z.string().nullable(),\n});\nexport type ClientRuntimeInfo = z.infer<typeof ClientRuntimeInfoSchema>;\n\nexport const RuntimeLineageSchema = z.object({\n parent: z.string().nullable(),\n root: z.string().nullable(),\n depth: z.number().int().nonnegative(),\n extendsChain: z.array(z.string()),\n});\nexport type RuntimeLineage = z.infer<typeof RuntimeLineageSchema>;\n\nexport const BosStagingSchema = z.object({\n domain: z.string(),\n});\nexport type BosStaging = z.infer<typeof BosStagingSchema>;\n\nconst BosConfigInputAppEntrySchema = z.record(z.string(), z.unknown());\nexport type BosConfigInputAppEntry = z.infer<typeof BosConfigInputAppEntrySchema>;\n\nexport const BosConfigInputSchema: z.ZodType<BosConfigInput> = z.lazy(() =>\n z.object({\n extends: ExtendsSchema.optional(),\n account: z.string().optional(),\n domain: z.string().optional(),\n testnet: z.string().optional(),\n template: z.string().optional(),\n gateway: z\n .object({\n development: z.string().optional(),\n production: z.string().optional(),\n account: z.string().optional(),\n })\n .optional(),\n development: z.string().optional(),\n production: z.string().optional(),\n integrity: z.string().optional(),\n name: z.string().optional(),\n version: z.string().optional(),\n proxy: z.string().optional(),\n variables: JsonObjectSchema.optional(),\n secrets: z.array(z.string()).optional(),\n routes: z.array(z.string()).optional(),\n sidebar: z.array(SidebarItemSchema).optional(),\n app: z.record(z.string(), BosConfigInputAppEntrySchema).optional(),\n plugins: z.record(z.string(), z.union([z.string(), BosConfigInputSchema])).optional(),\n ci: CiConfigSchema.optional(),\n }),\n);\n\nexport interface BosConfigInput {\n extends?: string | ExtendsConfig;\n account?: string;\n domain?: string;\n title?: string;\n description?: string;\n testnet?: string;\n template?: string;\n gateway?: {\n development?: string;\n production?: string;\n account?: string;\n };\n development?: string;\n production?: string;\n integrity?: string;\n name?: string;\n version?: string;\n proxy?: string;\n variables?: JsonObject;\n secrets?: string[];\n routes?: string[];\n sidebar?: SidebarItem[];\n app?: Record<string, BosConfigInputAppEntry>;\n plugins?: Record<string, string | BosConfigInput>;\n ci?: CiConfig;\n}\n\nexport const RailwayCiSchema = z.object({\n service: z.string(),\n});\nexport type RailwayCi = z.infer<typeof RailwayCiSchema>;\n\nexport const CiConfigSchema = z.object({\n railway: RailwayCiSchema.optional(),\n});\nexport type CiConfig = z.infer<typeof CiConfigSchema>;\n\nexport const BosConfigSchema = z.object({\n account: z.string(),\n extends: ExtendsSchema.optional(),\n domain: z.string().optional(),\n title: z.string().optional(),\n description: z.string().optional(),\n testnet: z.string().optional(),\n staging: BosStagingSchema.optional(),\n repository: z.string().optional(),\n ci: CiConfigSchema.optional(),\n plugins: z.record(z.string(), z.union([z.string(), BosPluginRefSchema])).optional(),\n app: z.object({\n host: HostConfigSchema,\n ui: UiConfigSchema,\n api: ComposableAppEntrySchema,\n auth: ComposableAppEntrySchema.optional(),\n }),\n});\nexport type BosConfig = z.infer<typeof BosConfigSchema>;\n\nexport const RuntimeConfigSchema = z.object({\n env: z.enum([\"development\", \"production\", \"staging\"]),\n account: z.string(),\n domain: z.string().optional(),\n networkId: z.enum([\"mainnet\", \"testnet\"]),\n title: z.string().optional(),\n description: z.string().optional(),\n repository: z.string().optional(),\n host: FederationEntrySchema.extend({\n localPath: z.string().optional(),\n port: z.number().optional(),\n secrets: z.array(z.string()).optional(),\n remoteUrl: z.string().optional(),\n }),\n ui: FederationEntrySchema.extend({\n localPath: z.string().optional(),\n port: z.number().optional(),\n ssrUrl: z.string().optional(),\n ssrIntegrity: z.string().optional(),\n }),\n api: FederationEntrySchema.extend({\n localPath: z.string().optional(),\n port: z.number().optional(),\n proxy: z.string().optional(),\n variables: JsonObjectSchema.optional(),\n secrets: z.array(z.string()).optional(),\n shared: SharedDepMapSchema.optional(),\n }),\n auth: FederationEntrySchema.extend({\n extendsRef: z.string().optional(),\n localPath: z.string().optional(),\n port: z.number().optional(),\n proxy: z.string().optional(),\n variables: JsonObjectSchema.optional(),\n secrets: z.array(z.string()).optional(),\n sidebar: z.array(SidebarItemSchema).optional(),\n shared: SharedDepMapSchema.optional(),\n }).optional(),\n plugins: z.record(z.string(), RuntimePluginConfigSchema).optional(),\n});\nexport type RuntimeConfig = z.infer<typeof RuntimeConfigSchema>;\n\nexport const ClientRuntimeConfigSchema = z.object({\n env: z.enum([\"development\", \"production\", \"staging\"]),\n account: z.string(),\n networkId: z.enum([\"mainnet\", \"testnet\"]),\n hostUrl: z.string().optional(),\n assetsUrl: z.string(),\n apiBase: z.string(),\n rpcBase: z.string(),\n repository: z.string().optional(),\n authAvailable: z.boolean().optional(),\n runtime: ClientRuntimeInfoSchema.optional(),\n ui: z\n .object({\n name: z.string(),\n url: z.string(),\n entry: z.string(),\n integrity: z.string().optional(),\n })\n .optional(),\n api: z\n .object({\n name: z.string(),\n url: z.string(),\n entry: z.string(),\n integrity: z.string().optional(),\n variables: JsonObjectSchema.optional(),\n })\n .optional(),\n auth: z\n .object({\n name: z.string(),\n url: z.string(),\n entry: z.string(),\n integrity: z.string().optional(),\n variables: JsonObjectSchema.optional(),\n sidebar: z.array(SidebarItemSchema).optional(),\n })\n .optional(),\n plugins: z\n .record(\n z.string(),\n z.object({\n name: z.string(),\n url: z.string(),\n entry: z.string(),\n integrity: z.string().optional(),\n variables: JsonObjectSchema.optional(),\n ui: z\n .object({\n name: z.string(),\n url: z.string(),\n entry: z.string(),\n source: SourceModeSchema,\n integrity: z.string().optional(),\n })\n .optional(),\n sidebar: z.array(SidebarItemSchema).optional(),\n }),\n )\n .optional(),\n});\nexport type Cl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ts"],"sourcesContent":["import * as z from \"zod\";\n\nexport type JsonPrimitive = string | number | boolean | null;\nexport interface JsonObject {\n [key: string]: JsonValue;\n}\nexport type JsonValue = JsonPrimitive | JsonObject | JsonValue[];\n\nexport const JsonValueSchema: z.ZodType<JsonValue> = z.lazy(() =>\n z.union([\n z.string(),\n z.number(),\n z.boolean(),\n z.null(),\n z.array(JsonValueSchema),\n z.record(z.string(), JsonValueSchema),\n ]),\n);\nexport const JsonObjectSchema = z.record(z.string(), JsonValueSchema);\n\nexport const ExtendsSchema = z.union([\n z.string(),\n z.object({\n development: z.string().optional(),\n production: z.string().optional(),\n staging: z.string().optional(),\n }),\n]);\nexport type Extends = z.infer<typeof ExtendsSchema>;\nexport type ExtendsConfig = Extract<Extends, Record<string, string | undefined>>;\n\nexport const SourceModeSchema = z.enum([\"local\", \"remote\"]);\nexport type SourceMode = z.infer<typeof SourceModeSchema>;\n\nexport const SharedConfigSchema = z.object({\n version: z.string(),\n requiredVersion: z.string().optional(),\n singleton: z.boolean().optional(),\n eager: z.boolean().optional(),\n strictVersion: z.boolean().optional(),\n shareScope: z.string().optional(),\n});\nexport type SharedConfig = z.infer<typeof SharedConfigSchema>;\nexport type SharedDepConfig = SharedConfig;\nexport const SharedDepConfigSchema = SharedConfigSchema;\nexport const SharedDepMapSchema = z.record(z.string(), SharedConfigSchema);\n\nexport const FederationEntrySchema = z.object({\n name: z.string(),\n url: z.string(),\n entry: z.string(),\n source: SourceModeSchema,\n integrity: z.string().optional(),\n});\nexport type FederationEntry = z.infer<typeof FederationEntrySchema>;\n\nexport const ComposableAppEntrySchema = z.object({\n extends: ExtendsSchema.optional(),\n name: z.string().optional(),\n development: z.string().optional(),\n production: z.string().optional(),\n integrity: z.string().optional(),\n proxy: z.string().optional(),\n variables: JsonObjectSchema.optional(),\n secrets: z.array(z.string()).optional(),\n routes: z.array(z.string()).optional(),\n shared: SharedDepMapSchema.optional(),\n});\nexport type ComposableAppEntry = z.infer<typeof ComposableAppEntrySchema>;\n\nexport const ApiPluginConfigSchema = ComposableAppEntrySchema;\nexport type ApiPluginConfig = z.infer<typeof ApiPluginConfigSchema>;\n\nexport const PluginUiConfigSchema = z.object({\n name: z.string(),\n development: z.string().optional(),\n production: z.string().optional(),\n integrity: z.string().optional(),\n});\nexport type PluginUiConfig = z.infer<typeof PluginUiConfigSchema>;\n\nexport const BosPluginRefSchema = ComposableAppEntrySchema.extend({\n version: z.string().optional(),\n app: z.record(z.string(), z.unknown()).optional(),\n plugins: z.record(z.string(), z.unknown()).optional(),\n});\nexport type BosPluginRef = z.infer<typeof BosPluginRefSchema>;\nexport type PluginEntryValue = string | BosPluginRef;\nexport type PluginEntries = Record<string, PluginEntryValue>;\n\nconst PluginRuntimeUiSchema = z.object({\n name: z.string(),\n url: z.string(),\n entry: z.string(),\n source: SourceModeSchema,\n localPath: z.string().optional(),\n port: z.number().optional(),\n integrity: z.string().optional(),\n});\nexport type PluginRuntimeUi = z.infer<typeof PluginRuntimeUiSchema>;\n\nexport const RuntimePluginConfigSchema = z.object({\n name: z.string(),\n url: z.string(),\n entry: z.string(),\n source: SourceModeSchema,\n extendsRef: z.string().optional(),\n localPath: z.string().optional(),\n port: z.number().optional(),\n proxy: z.string().optional(),\n variables: JsonObjectSchema.optional(),\n secrets: z.array(z.string()).optional(),\n integrity: z.string().optional(),\n shared: SharedDepMapSchema.optional(),\n ui: PluginRuntimeUiSchema.optional(),\n routes: z.array(z.string()).optional(),\n});\nexport type RuntimePluginConfig = z.infer<typeof RuntimePluginConfigSchema>;\n\nexport const UiConfigSchema = z\n .object({\n name: z.string().optional(),\n development: z.string().optional(),\n production: z.string().optional(),\n integrity: z.string().optional(),\n ssr: z.string().optional(),\n ssrIntegrity: z.string().optional(),\n })\n .strict();\nexport type UiConfig = z.infer<typeof UiConfigSchema>;\n\nexport const HostConfigSchema = z.object({\n development: z.string(),\n production: z.string(),\n integrity: z.string().optional(),\n secrets: z.array(z.string()).optional(),\n});\nexport type HostConfig = z.infer<typeof HostConfigSchema>;\n\nexport const ClientRuntimeInfoSchema = z.object({\n accountId: z.string(),\n gatewayId: z.string(),\n runtimeBasePath: z.string(),\n title: z.string().nullable(),\n description: z.string().nullable(),\n hostUrl: z.string().nullable(),\n});\nexport type ClientRuntimeInfo = z.infer<typeof ClientRuntimeInfoSchema>;\n\nexport const RuntimeLineageSchema = z.object({\n parent: z.string().nullable(),\n root: z.string().nullable(),\n depth: z.number().int().nonnegative(),\n extendsChain: z.array(z.string()),\n});\nexport type RuntimeLineage = z.infer<typeof RuntimeLineageSchema>;\n\nexport const BosStagingSchema = z.object({\n domain: z.string(),\n});\nexport type BosStaging = z.infer<typeof BosStagingSchema>;\n\nconst BosConfigInputAppEntrySchema = z.record(z.string(), z.unknown());\nexport type BosConfigInputAppEntry = z.infer<typeof BosConfigInputAppEntrySchema>;\n\nexport const BosConfigInputSchema: z.ZodType<BosConfigInput> = z.lazy(() =>\n z.object({\n extends: ExtendsSchema.optional(),\n account: z.string().optional(),\n domain: z.string().optional(),\n testnet: z.string().optional(),\n template: z.string().optional(),\n gateway: z\n .object({\n development: z.string().optional(),\n production: z.string().optional(),\n account: z.string().optional(),\n })\n .optional(),\n development: z.string().optional(),\n production: z.string().optional(),\n integrity: z.string().optional(),\n name: z.string().optional(),\n version: z.string().optional(),\n proxy: z.string().optional(),\n variables: JsonObjectSchema.optional(),\n secrets: z.array(z.string()).optional(),\n routes: z.array(z.string()).optional(),\n app: z.record(z.string(), BosConfigInputAppEntrySchema).optional(),\n plugins: z.record(z.string(), z.union([z.string(), BosConfigInputSchema])).optional(),\n ci: CiConfigSchema.optional(),\n }),\n);\n\nexport interface BosConfigInput {\n extends?: string | ExtendsConfig;\n account?: string;\n domain?: string;\n title?: string;\n description?: string;\n testnet?: string;\n template?: string;\n gateway?: {\n development?: string;\n production?: string;\n account?: string;\n };\n development?: string;\n production?: string;\n integrity?: string;\n name?: string;\n version?: string;\n proxy?: string;\n variables?: JsonObject;\n secrets?: string[];\n routes?: string[];\n app?: Record<string, BosConfigInputAppEntry>;\n plugins?: Record<string, string | BosConfigInput>;\n ci?: CiConfig;\n}\n\nexport const RailwayCiSchema = z.object({\n service: z.string(),\n});\nexport type RailwayCi = z.infer<typeof RailwayCiSchema>;\n\nexport const CiConfigSchema = z.object({\n railway: RailwayCiSchema.optional(),\n});\nexport type CiConfig = z.infer<typeof CiConfigSchema>;\n\nexport const BosConfigSchema = z.object({\n account: z.string(),\n extends: ExtendsSchema.optional(),\n domain: z.string().optional(),\n title: z.string().optional(),\n description: z.string().optional(),\n testnet: z.string().optional(),\n staging: BosStagingSchema.optional(),\n repository: z.string().optional(),\n ci: CiConfigSchema.optional(),\n plugins: z.record(z.string(), z.union([z.string(), BosPluginRefSchema])).optional(),\n app: z.object({\n host: HostConfigSchema,\n ui: UiConfigSchema,\n api: ComposableAppEntrySchema,\n auth: ComposableAppEntrySchema.optional(),\n }),\n});\nexport type BosConfig = z.infer<typeof BosConfigSchema>;\n\nexport const RuntimeConfigSchema = z.object({\n env: z.enum([\"development\", \"production\", \"staging\"]),\n account: z.string(),\n domain: z.string().optional(),\n networkId: z.enum([\"mainnet\", \"testnet\"]),\n title: z.string().optional(),\n description: z.string().optional(),\n repository: z.string().optional(),\n host: FederationEntrySchema.extend({\n localPath: z.string().optional(),\n port: z.number().optional(),\n secrets: z.array(z.string()).optional(),\n remoteUrl: z.string().optional(),\n }),\n ui: FederationEntrySchema.extend({\n localPath: z.string().optional(),\n port: z.number().optional(),\n ssrUrl: z.string().optional(),\n ssrIntegrity: z.string().optional(),\n }),\n api: FederationEntrySchema.extend({\n localPath: z.string().optional(),\n port: z.number().optional(),\n proxy: z.string().optional(),\n variables: JsonObjectSchema.optional(),\n secrets: z.array(z.string()).optional(),\n shared: SharedDepMapSchema.optional(),\n }),\n auth: FederationEntrySchema.extend({\n extendsRef: z.string().optional(),\n localPath: z.string().optional(),\n port: z.number().optional(),\n proxy: z.string().optional(),\n variables: JsonObjectSchema.optional(),\n secrets: z.array(z.string()).optional(),\n shared: SharedDepMapSchema.optional(),\n }).optional(),\n plugins: z.record(z.string(), RuntimePluginConfigSchema).optional(),\n});\nexport type RuntimeConfig = z.infer<typeof RuntimeConfigSchema>;\n\nexport const ClientRuntimeConfigSchema = z.object({\n env: z.enum([\"development\", \"production\", \"staging\"]),\n account: z.string(),\n networkId: z.enum([\"mainnet\", \"testnet\"]),\n hostUrl: z.string().optional(),\n assetsUrl: z.string(),\n apiBase: z.string(),\n rpcBase: z.string(),\n repository: z.string().optional(),\n authAvailable: z.boolean().optional(),\n runtime: ClientRuntimeInfoSchema.optional(),\n ui: z\n .object({\n name: z.string(),\n url: z.string(),\n entry: z.string(),\n integrity: z.string().optional(),\n })\n .optional(),\n api: z\n .object({\n name: z.string(),\n url: z.string(),\n entry: z.string(),\n integrity: z.string().optional(),\n variables: JsonObjectSchema.optional(),\n })\n .optional(),\n auth: z\n .object({\n name: z.string(),\n url: z.string(),\n entry: z.string(),\n integrity: z.string().optional(),\n variables: JsonObjectSchema.optional(),\n })\n .optional(),\n plugins: z\n .record(\n z.string(),\n z.object({\n name: z.string(),\n url: z.string(),\n entry: z.string(),\n integrity: z.string().optional(),\n variables: JsonObjectSchema.optional(),\n ui: z\n .object({\n name: z.string(),\n url: z.string(),\n entry: z.string(),\n source: SourceModeSchema,\n integrity: z.string().optional(),\n })\n .optional(),\n }),\n )\n .optional(),\n});\nexport type ClientRuntimeConfig = z.infer<typeof ClientRuntimeConfigSchema>;\n"],"mappings":";;;AAQA,MAAa,kBAAwC,EAAE,WACrD,EAAE,MAAM;CACN,EAAE,QAAQ;CACV,EAAE,QAAQ;CACV,EAAE,SAAS;CACX,EAAE,MAAM;CACR,EAAE,MAAM,gBAAgB;CACxB,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB;CACtC,CAAC,CACH;AACD,MAAa,mBAAmB,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB;AAErE,MAAa,gBAAgB,EAAE,MAAM,CACnC,EAAE,QAAQ,EACV,EA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AE,QAAQ;EACf,OAAO,EAAE,QAAQ;EACjB,WAAW,EAAE,QAAQ,CAAC,UAAU;EAChC,WAAW,iBAAiB,UAAU;EACtC,IAAI,EACD,OAAO;GACN,MAAM,EAAE,QAAQ;GAChB,KAAK,EAAE,QAAQ;GACf,OAAO,EAAE,QAAQ;GACjB,QAAQ;GACR,WAAW,EAAE,QAAQ,CAAC,UAAU;GACjC,CAAC,CACD,UAAU;EACd,CAAC,CACH,CACA,UAAU;CACd,CAAC"}
|
package/package.json
CHANGED
|
@@ -232,7 +232,7 @@ bos types gen --env production # production mode (remote sources only)
|
|
|
232
232
|
bos types gen --dry-run # preview without writing files
|
|
233
233
|
```
|
|
234
234
|
|
|
235
|
-
Generated files: `api-types.gen.ts`, `auth-types.gen.ts` (ui, api, host), `plugins-types.gen.ts
|
|
235
|
+
Generated files: `api-types.gen.ts`, `auth-types.gen.ts` (ui, api, host), `plugins-types.gen.ts`. Uses `local:` sources in dev and production URLs in production mode.
|
|
236
236
|
|
|
237
237
|
### `bos db studio`
|
|
238
238
|
|
|
@@ -309,15 +309,7 @@ Add a plugin entry:
|
|
|
309
309
|
"timeout": 5000
|
|
310
310
|
},
|
|
311
311
|
"secrets": ["YOURPLUGIN_API_KEY"],
|
|
312
|
-
"
|
|
313
|
-
{
|
|
314
|
-
"label": "Your Plugin",
|
|
315
|
-
"icon": "Activity",
|
|
316
|
-
"to": "/your-plugin",
|
|
317
|
-
"roleRequired": "member"
|
|
318
|
-
}
|
|
319
|
-
],
|
|
320
|
-
"routes": ["/your-plugin/*"],
|
|
312
|
+
"routes": ["ui/src/routes/_layout/_authenticated/your-plugin/**"],
|
|
321
313
|
"shared": {
|
|
322
314
|
"react": { "version": "^19.0.0", "singleton": true },
|
|
323
315
|
"react-dom": { "version": "^19.0.0", "singleton": true }
|
|
@@ -458,7 +450,7 @@ Use `createPlugin.withPlugins<PluginsClient>()` to get typed access to other plu
|
|
|
458
450
|
|
|
459
451
|
## Plugin UI
|
|
460
452
|
|
|
461
|
-
Add a UI remote via the `ui` field in `bos.config.json`. Sidebar
|
|
453
|
+
Add a UI remote via the `ui` field in `bos.config.json`. Sidebar items are defined manually in `ui/src/routes/_layout.tsx`.
|
|
462
454
|
|
|
463
455
|
## Deploy
|
|
464
456
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: ui-integration
|
|
3
3
|
description: Route creation, API client usage, auth client, SSR hydration, sidebar system, and the @/app module surface. Use when adding new UI routes, fetching data from the API, implementing auth flows, or customizing sidebar navigation.
|
|
4
4
|
metadata:
|
|
5
|
-
sources: "ui/src/app.ts,ui/src/lib/api.ts,ui/src/lib/auth.ts,ui/src/router.tsx,ui/src/router.server.tsx,ui/src/hydrate.tsx,ui/src/routes/__root.tsx,ui/src/routes/_layout.tsx,ui/src/routes/_layout/_authenticated.tsx
|
|
5
|
+
sources: "ui/src/app.ts,ui/src/lib/api.ts,ui/src/lib/auth.ts,ui/src/router.tsx,ui/src/router.server.tsx,ui/src/hydrate.tsx,ui/src/routes/__root.tsx,ui/src/routes/_layout.tsx,ui/src/routes/_layout/_authenticated.tsx"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# UI Integration
|
|
@@ -271,27 +271,24 @@ Nest routes under `_layout/_authenticated/` to inherit this guard. Unauthenticat
|
|
|
271
271
|
|
|
272
272
|
## Sidebar System
|
|
273
273
|
|
|
274
|
-
Sidebar items are
|
|
274
|
+
Sidebar items are defined inline in `ui/src/routes/_layout.tsx` as a `sidebarItems` array:
|
|
275
275
|
|
|
276
|
-
|
|
276
|
+
```ts
|
|
277
|
+
import { Globe, Home } from "lucide-react";
|
|
277
278
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
}
|
|
279
|
+
type SidebarRole = "anon" | "member" | "admin";
|
|
280
|
+
|
|
281
|
+
interface SidebarItem {
|
|
282
|
+
icon: React.ComponentType<{ className?: string }>;
|
|
283
|
+
label: string;
|
|
284
|
+
to: string;
|
|
285
|
+
roleRequired: SidebarRole;
|
|
287
286
|
}
|
|
288
287
|
```
|
|
289
288
|
|
|
290
|
-
### Role filtering
|
|
289
|
+
### Role filtering:
|
|
291
290
|
|
|
292
291
|
```ts
|
|
293
|
-
import { pluginSidebarItems, type SidebarItem, type SidebarRole } from "@/lib/plugin-sidebar.gen";
|
|
294
|
-
|
|
295
292
|
function filterSidebarByRole(items: SidebarItem[], userRole: SidebarRole): SidebarItem[] {
|
|
296
293
|
return items.filter((item) => {
|
|
297
294
|
if (item.roleRequired === "anon") return true;
|
|
@@ -301,11 +298,13 @@ function filterSidebarByRole(items: SidebarItem[], userRole: SidebarRole): Sideb
|
|
|
301
298
|
});
|
|
302
299
|
}
|
|
303
300
|
|
|
304
|
-
const
|
|
305
|
-
|
|
301
|
+
const sidebarItems: SidebarItem[] = [
|
|
302
|
+
{ icon: Home, label: "home", to: "/home", roleRequired: "anon" },
|
|
303
|
+
];
|
|
304
|
+
const visibleItems = filterSidebarByRole(sidebarItems, userRole);
|
|
306
305
|
```
|
|
307
306
|
|
|
308
|
-
Available icons: any `lucide-react` icon name
|
|
307
|
+
Add items manually to the `sidebarItems` array. Available icons: any `lucide-react` icon name.
|
|
309
308
|
|
|
310
309
|
## SSR Architecture
|
|
311
310
|
|
package/dist/sidebar.cjs
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
2
|
-
let node_fs = require("node:fs");
|
|
3
|
-
let node_path = require("node:path");
|
|
4
|
-
|
|
5
|
-
//#region src/sidebar.ts
|
|
6
|
-
const ICON_IMPORTS = {
|
|
7
|
-
Home: "lucide-react",
|
|
8
|
-
Globe: "lucide-react",
|
|
9
|
-
FolderKanban: "lucide-react",
|
|
10
|
-
Building2: "lucide-react",
|
|
11
|
-
Settings: "lucide-react",
|
|
12
|
-
User: "lucide-react",
|
|
13
|
-
Users: "lucide-react",
|
|
14
|
-
Shield: "lucide-react",
|
|
15
|
-
LayoutDashboard: "lucide-react",
|
|
16
|
-
CreditCard: "lucide-react",
|
|
17
|
-
Bell: "lucide-react",
|
|
18
|
-
Key: "lucide-react",
|
|
19
|
-
FileText: "lucide-react",
|
|
20
|
-
Database: "lucide-react",
|
|
21
|
-
Activity: "lucide-react",
|
|
22
|
-
BarChart3: "lucide-react",
|
|
23
|
-
Zap: "lucide-react",
|
|
24
|
-
Terminal: "lucide-react",
|
|
25
|
-
Code: "lucide-react",
|
|
26
|
-
Package: "lucide-react",
|
|
27
|
-
Store: "lucide-react",
|
|
28
|
-
ShoppingBag: "lucide-react",
|
|
29
|
-
Wallet: "lucide-react",
|
|
30
|
-
Coins: "lucide-react",
|
|
31
|
-
Plug: "lucide-react",
|
|
32
|
-
Link: "lucide-react",
|
|
33
|
-
ExternalLink: "lucide-react",
|
|
34
|
-
Puzzle: "lucide-react",
|
|
35
|
-
Layers: "lucide-react",
|
|
36
|
-
Grid3X3: "lucide-react",
|
|
37
|
-
AppWindow: "lucide-react"
|
|
38
|
-
};
|
|
39
|
-
function resolveIconModule(iconName) {
|
|
40
|
-
if (ICON_IMPORTS[iconName]) return ICON_IMPORTS[iconName];
|
|
41
|
-
return "lucide-react";
|
|
42
|
-
}
|
|
43
|
-
function collectIconImports(items) {
|
|
44
|
-
const moduleMap = /* @__PURE__ */ new Map();
|
|
45
|
-
for (const item of items) {
|
|
46
|
-
const module = resolveIconModule(item.icon);
|
|
47
|
-
if (!moduleMap.has(module)) moduleMap.set(module, /* @__PURE__ */ new Set());
|
|
48
|
-
moduleMap.get(module).add(item.icon);
|
|
49
|
-
}
|
|
50
|
-
return moduleMap;
|
|
51
|
-
}
|
|
52
|
-
function generatePluginSidebarContent(runtimeConfig) {
|
|
53
|
-
const coreItems = [{
|
|
54
|
-
icon: "Home",
|
|
55
|
-
label: "home",
|
|
56
|
-
to: "/home",
|
|
57
|
-
roleRequired: "anon"
|
|
58
|
-
}];
|
|
59
|
-
if (runtimeConfig.auth?.sidebar) for (const item of runtimeConfig.auth.sidebar) coreItems.push({
|
|
60
|
-
...item,
|
|
61
|
-
to: item.to ?? "/auth",
|
|
62
|
-
roleRequired: item.roleRequired ?? "member"
|
|
63
|
-
});
|
|
64
|
-
const pluginItems = [];
|
|
65
|
-
if (runtimeConfig.plugins) for (const [key, entry] of Object.entries(runtimeConfig.plugins)) {
|
|
66
|
-
const sidebar = entry.sidebar;
|
|
67
|
-
if (!sidebar) continue;
|
|
68
|
-
for (const item of sidebar) pluginItems.push({
|
|
69
|
-
...item,
|
|
70
|
-
to: item.to ?? `/${key}`,
|
|
71
|
-
roleRequired: item.roleRequired ?? "member"
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
const allItems = [...coreItems, ...pluginItems];
|
|
75
|
-
const moduleMap = collectIconImports(allItems);
|
|
76
|
-
const importLines = [];
|
|
77
|
-
for (const [module, icons] of moduleMap) {
|
|
78
|
-
const iconList = [...icons].join(", ");
|
|
79
|
-
importLines.push(`import { ${iconList} } from "${module}";`);
|
|
80
|
-
}
|
|
81
|
-
const itemsCode = allItems.map((item) => ` { icon: ${item.icon}, label: "${item.label}", to: "${item.to}" as const, roleRequired: "${item.roleRequired}" as const },`).join("\n");
|
|
82
|
-
return `// Auto-generated by bos sync/pluginAdd/pluginRemove. Do not edit.
|
|
83
|
-
${importLines.join("\n")}
|
|
84
|
-
|
|
85
|
-
export type SidebarRole = "anon" | "member" | "admin";
|
|
86
|
-
|
|
87
|
-
export interface SidebarItem {
|
|
88
|
-
icon: React.ComponentType<{ className?: string }>;
|
|
89
|
-
label: string;
|
|
90
|
-
to: string;
|
|
91
|
-
roleRequired: SidebarRole;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export const pluginSidebarItems: SidebarItem[] = [
|
|
95
|
-
${itemsCode}
|
|
96
|
-
];
|
|
97
|
-
`;
|
|
98
|
-
}
|
|
99
|
-
function writePluginSidebarGen(configDir, runtimeConfig) {
|
|
100
|
-
const outputPath = (0, node_path.join)(configDir, "ui/src/lib/plugin-sidebar.gen.ts");
|
|
101
|
-
const content = generatePluginSidebarContent(runtimeConfig);
|
|
102
|
-
const outputDir = (0, node_path.dirname)(outputPath);
|
|
103
|
-
if (!(0, node_fs.existsSync)(outputDir)) (0, node_fs.mkdirSync)(outputDir, { recursive: true });
|
|
104
|
-
let existingContent = null;
|
|
105
|
-
try {
|
|
106
|
-
existingContent = (0, node_fs.existsSync)(outputPath) ? (0, node_fs.readFileSync)(outputPath, "utf-8") : null;
|
|
107
|
-
} catch {}
|
|
108
|
-
if (existingContent === content) return outputPath;
|
|
109
|
-
(0, node_fs.writeFileSync)(outputPath, content);
|
|
110
|
-
return outputPath;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
//#endregion
|
|
114
|
-
exports.generatePluginSidebarContent = generatePluginSidebarContent;
|
|
115
|
-
exports.writePluginSidebarGen = writePluginSidebarGen;
|
|
116
|
-
//# sourceMappingURL=sidebar.cjs.map
|
package/dist/sidebar.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.cjs","names":[],"sources":["../src/sidebar.ts"],"sourcesContent":["import { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\nimport type { RuntimeConfig, SidebarItem } from \"./types\";\n\nconst ICON_IMPORTS: Record<string, string> = {\n Home: \"lucide-react\",\n Globe: \"lucide-react\",\n FolderKanban: \"lucide-react\",\n Building2: \"lucide-react\",\n Settings: \"lucide-react\",\n User: \"lucide-react\",\n Users: \"lucide-react\",\n Shield: \"lucide-react\",\n LayoutDashboard: \"lucide-react\",\n CreditCard: \"lucide-react\",\n Bell: \"lucide-react\",\n Key: \"lucide-react\",\n FileText: \"lucide-react\",\n Database: \"lucide-react\",\n Activity: \"lucide-react\",\n BarChart3: \"lucide-react\",\n Zap: \"lucide-react\",\n Terminal: \"lucide-react\",\n Code: \"lucide-react\",\n Package: \"lucide-react\",\n Store: \"lucide-react\",\n ShoppingBag: \"lucide-react\",\n Wallet: \"lucide-react\",\n Coins: \"lucide-react\",\n Plug: \"lucide-react\",\n Link: \"lucide-react\",\n ExternalLink: \"lucide-react\",\n Puzzle: \"lucide-react\",\n Layers: \"lucide-react\",\n Grid3X3: \"lucide-react\",\n AppWindow: \"lucide-react\",\n};\n\nfunction resolveIconModule(iconName: string): string {\n if (ICON_IMPORTS[iconName]) return ICON_IMPORTS[iconName];\n return \"lucide-react\";\n}\n\nfunction collectIconImports(items: SidebarItem[]): Map<string, Set<string>> {\n const moduleMap = new Map<string, Set<string>>();\n for (const item of items) {\n const module = resolveIconModule(item.icon);\n if (!moduleMap.has(module)) moduleMap.set(module, new Set());\n moduleMap.get(module)!.add(item.icon);\n }\n return moduleMap;\n}\n\nexport function generatePluginSidebarContent(runtimeConfig: RuntimeConfig): string {\n const coreItems: SidebarItem[] = [\n { icon: \"Home\", label: \"home\", to: \"/home\", roleRequired: \"anon\" },\n ];\n\n if (runtimeConfig.auth?.sidebar) {\n for (const item of runtimeConfig.auth.sidebar) {\n coreItems.push({\n ...item,\n to: item.to ?? \"/auth\",\n roleRequired: item.roleRequired ?? \"member\",\n });\n }\n }\n\n const pluginItems: SidebarItem[] = [];\n if (runtimeConfig.plugins) {\n for (const [key, entry] of Object.entries(runtimeConfig.plugins)) {\n const sidebar = entry.sidebar;\n if (!sidebar) continue;\n for (const item of sidebar) {\n pluginItems.push({\n ...item,\n to: item.to ?? `/${key}`,\n roleRequired: item.roleRequired ?? \"member\",\n });\n }\n }\n }\n\n const allItems = [...coreItems, ...pluginItems];\n const moduleMap = collectIconImports(allItems);\n\n const importLines: string[] = [];\n for (const [module, icons] of moduleMap) {\n const iconList = [...icons].join(\", \");\n importLines.push(`import { ${iconList} } from \"${module}\";`);\n }\n\n const itemsCode = allItems\n .map(\n (item) =>\n ` { icon: ${item.icon}, label: \"${item.label}\", to: \"${item.to}\" as const, roleRequired: \"${item.roleRequired}\" as const },`,\n )\n .join(\"\\n\");\n\n return `// Auto-generated by bos sync/pluginAdd/pluginRemove. Do not edit.\n${importLines.join(\"\\n\")}\n\nexport type SidebarRole = \"anon\" | \"member\" | \"admin\";\n\nexport interface SidebarItem {\n icon: React.ComponentType<{ className?: string }>;\n label: string;\n to: string;\n roleRequired: SidebarRole;\n}\n\nexport const pluginSidebarItems: SidebarItem[] = [\n${itemsCode}\n];\n`;\n}\n\nexport function writePluginSidebarGen(configDir: string, runtimeConfig: RuntimeConfig): string {\n const outputPath = join(configDir, \"ui/src/lib/plugin-sidebar.gen.ts\");\n\n const content = generatePluginSidebarContent(runtimeConfig);\n\n const outputDir = dirname(outputPath);\n if (!existsSync(outputDir)) {\n mkdirSync(outputDir, { recursive: true });\n }\n\n let existingContent: string | null = null;\n try {\n existingContent = existsSync(outputPath)\n ? // eslint-disable-next-line no-restricted-syntax\n readFileSync(outputPath, \"utf-8\")\n : null;\n } catch {\n // file doesn't exist yet\n }\n\n if (existingContent === content) return outputPath;\n\n writeFileSync(outputPath, content);\n return outputPath;\n}\n"],"mappings":";;;;;AAIA,MAAM,eAAuC;CAC3C,MAAM;CACN,OAAO;CACP,cAAc;CACd,WAAW;CACX,UAAU;CACV,MAAM;CACN,OAAO;CACP,QAAQ;CACR,iBAAiB;CACjB,YAAY;CACZ,MAAM;CACN,KAAK;CACL,UAAU;CACV,UAAU;CACV,UAAU;CACV,WAAW;CACX,KAAK;CACL,UAAU;CACV,MAAM;CACN,SAAS;CACT,OAAO;CACP,aAAa;CACb,QAAQ;CACR,OAAO;CACP,MAAM;CACN,MAAM;CACN,cAAc;CACd,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,WAAW;CACZ;AAED,SAAS,kBAAkB,UAA0B;AACnD,KAAI,aAAa,UAAW,QAAO,aAAa;AAChD,QAAO;;AAGT,SAAS,mBAAmB,OAAgD;CAC1E,MAAM,4BAAY,IAAI,KAA0B;AAChD,MAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,SAA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kB,WAAW,mCAAmC;CAEtE,MAAM,UAAU,6BAA6B,cAAc;CAE3D,MAAM,mCAAoB,WAAW;AACrC,KAAI,yBAAY,UAAU,CACxB,wBAAU,WAAW,EAAE,WAAW,MAAM,CAAC;CAG3C,IAAI,kBAAiC;AACrC,KAAI;AACF,4CAA6B,WAAW,6BAEvB,YAAY,QAAQ,GACjC;SACE;AAIR,KAAI,oBAAoB,QAAS,QAAO;AAExC,4BAAc,YAAY,QAAQ;AAClC,QAAO"}
|
package/dist/sidebar.d.cts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { RuntimeConfig } from "./types.cjs";
|
|
2
|
-
|
|
3
|
-
//#region src/sidebar.d.ts
|
|
4
|
-
declare function generatePluginSidebarContent(runtimeConfig: RuntimeConfig): string;
|
|
5
|
-
declare function writePluginSidebarGen(configDir: string, runtimeConfig: RuntimeConfig): string;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { generatePluginSidebarContent, writePluginSidebarGen };
|
|
8
|
-
//# sourceMappingURL=sidebar.d.cts.map
|
package/dist/sidebar.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.d.cts","names":[],"sources":["../src/sidebar.ts"],"mappings":";;;iBAqDgB,4BAAA,CAA6B,aAAA,EAAe,aAAA;AAAA,iBAgE5C,qBAAA,CAAsB,SAAA,UAAmB,aAAA,EAAe,aAAA"}
|
package/dist/sidebar.d.mts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { RuntimeConfig } from "./types.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/sidebar.d.ts
|
|
4
|
-
declare function generatePluginSidebarContent(runtimeConfig: RuntimeConfig): string;
|
|
5
|
-
declare function writePluginSidebarGen(configDir: string, runtimeConfig: RuntimeConfig): string;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { generatePluginSidebarContent, writePluginSidebarGen };
|
|
8
|
-
//# sourceMappingURL=sidebar.d.mts.map
|
package/dist/sidebar.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.d.mts","names":[],"sources":["../src/sidebar.ts"],"mappings":";;;iBAqDgB,4BAAA,CAA6B,aAAA,EAAe,aAAA;AAAA,iBAgE5C,qBAAA,CAAsB,SAAA,UAAmB,aAAA,EAAe,aAAA"}
|
package/dist/sidebar.mjs
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { dirname, join } from "node:path";
|
|
3
|
-
|
|
4
|
-
//#region src/sidebar.ts
|
|
5
|
-
const ICON_IMPORTS = {
|
|
6
|
-
Home: "lucide-react",
|
|
7
|
-
Globe: "lucide-react",
|
|
8
|
-
FolderKanban: "lucide-react",
|
|
9
|
-
Building2: "lucide-react",
|
|
10
|
-
Settings: "lucide-react",
|
|
11
|
-
User: "lucide-react",
|
|
12
|
-
Users: "lucide-react",
|
|
13
|
-
Shield: "lucide-react",
|
|
14
|
-
LayoutDashboard: "lucide-react",
|
|
15
|
-
CreditCard: "lucide-react",
|
|
16
|
-
Bell: "lucide-react",
|
|
17
|
-
Key: "lucide-react",
|
|
18
|
-
FileText: "lucide-react",
|
|
19
|
-
Database: "lucide-react",
|
|
20
|
-
Activity: "lucide-react",
|
|
21
|
-
BarChart3: "lucide-react",
|
|
22
|
-
Zap: "lucide-react",
|
|
23
|
-
Terminal: "lucide-react",
|
|
24
|
-
Code: "lucide-react",
|
|
25
|
-
Package: "lucide-react",
|
|
26
|
-
Store: "lucide-react",
|
|
27
|
-
ShoppingBag: "lucide-react",
|
|
28
|
-
Wallet: "lucide-react",
|
|
29
|
-
Coins: "lucide-react",
|
|
30
|
-
Plug: "lucide-react",
|
|
31
|
-
Link: "lucide-react",
|
|
32
|
-
ExternalLink: "lucide-react",
|
|
33
|
-
Puzzle: "lucide-react",
|
|
34
|
-
Layers: "lucide-react",
|
|
35
|
-
Grid3X3: "lucide-react",
|
|
36
|
-
AppWindow: "lucide-react"
|
|
37
|
-
};
|
|
38
|
-
function resolveIconModule(iconName) {
|
|
39
|
-
if (ICON_IMPORTS[iconName]) return ICON_IMPORTS[iconName];
|
|
40
|
-
return "lucide-react";
|
|
41
|
-
}
|
|
42
|
-
function collectIconImports(items) {
|
|
43
|
-
const moduleMap = /* @__PURE__ */ new Map();
|
|
44
|
-
for (const item of items) {
|
|
45
|
-
const module = resolveIconModule(item.icon);
|
|
46
|
-
if (!moduleMap.has(module)) moduleMap.set(module, /* @__PURE__ */ new Set());
|
|
47
|
-
moduleMap.get(module).add(item.icon);
|
|
48
|
-
}
|
|
49
|
-
return moduleMap;
|
|
50
|
-
}
|
|
51
|
-
function generatePluginSidebarContent(runtimeConfig) {
|
|
52
|
-
const coreItems = [{
|
|
53
|
-
icon: "Home",
|
|
54
|
-
label: "home",
|
|
55
|
-
to: "/home",
|
|
56
|
-
roleRequired: "anon"
|
|
57
|
-
}];
|
|
58
|
-
if (runtimeConfig.auth?.sidebar) for (const item of runtimeConfig.auth.sidebar) coreItems.push({
|
|
59
|
-
...item,
|
|
60
|
-
to: item.to ?? "/auth",
|
|
61
|
-
roleRequired: item.roleRequired ?? "member"
|
|
62
|
-
});
|
|
63
|
-
const pluginItems = [];
|
|
64
|
-
if (runtimeConfig.plugins) for (const [key, entry] of Object.entries(runtimeConfig.plugins)) {
|
|
65
|
-
const sidebar = entry.sidebar;
|
|
66
|
-
if (!sidebar) continue;
|
|
67
|
-
for (const item of sidebar) pluginItems.push({
|
|
68
|
-
...item,
|
|
69
|
-
to: item.to ?? `/${key}`,
|
|
70
|
-
roleRequired: item.roleRequired ?? "member"
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
const allItems = [...coreItems, ...pluginItems];
|
|
74
|
-
const moduleMap = collectIconImports(allItems);
|
|
75
|
-
const importLines = [];
|
|
76
|
-
for (const [module, icons] of moduleMap) {
|
|
77
|
-
const iconList = [...icons].join(", ");
|
|
78
|
-
importLines.push(`import { ${iconList} } from "${module}";`);
|
|
79
|
-
}
|
|
80
|
-
const itemsCode = allItems.map((item) => ` { icon: ${item.icon}, label: "${item.label}", to: "${item.to}" as const, roleRequired: "${item.roleRequired}" as const },`).join("\n");
|
|
81
|
-
return `// Auto-generated by bos sync/pluginAdd/pluginRemove. Do not edit.
|
|
82
|
-
${importLines.join("\n")}
|
|
83
|
-
|
|
84
|
-
export type SidebarRole = "anon" | "member" | "admin";
|
|
85
|
-
|
|
86
|
-
export interface SidebarItem {
|
|
87
|
-
icon: React.ComponentType<{ className?: string }>;
|
|
88
|
-
label: string;
|
|
89
|
-
to: string;
|
|
90
|
-
roleRequired: SidebarRole;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export const pluginSidebarItems: SidebarItem[] = [
|
|
94
|
-
${itemsCode}
|
|
95
|
-
];
|
|
96
|
-
`;
|
|
97
|
-
}
|
|
98
|
-
function writePluginSidebarGen(configDir, runtimeConfig) {
|
|
99
|
-
const outputPath = join(configDir, "ui/src/lib/plugin-sidebar.gen.ts");
|
|
100
|
-
const content = generatePluginSidebarContent(runtimeConfig);
|
|
101
|
-
const outputDir = dirname(outputPath);
|
|
102
|
-
if (!existsSync(outputDir)) mkdirSync(outputDir, { recursive: true });
|
|
103
|
-
let existingContent = null;
|
|
104
|
-
try {
|
|
105
|
-
existingContent = existsSync(outputPath) ? readFileSync(outputPath, "utf-8") : null;
|
|
106
|
-
} catch {}
|
|
107
|
-
if (existingContent === content) return outputPath;
|
|
108
|
-
writeFileSync(outputPath, content);
|
|
109
|
-
return outputPath;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
//#endregion
|
|
113
|
-
export { generatePluginSidebarContent, writePluginSidebarGen };
|
|
114
|
-
//# sourceMappingURL=sidebar.mjs.map
|
package/dist/sidebar.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.mjs","names":[],"sources":["../src/sidebar.ts"],"sourcesContent":["import { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\nimport type { RuntimeConfig, SidebarItem } from \"./types\";\n\nconst ICON_IMPORTS: Record<string, string> = {\n Home: \"lucide-react\",\n Globe: \"lucide-react\",\n FolderKanban: \"lucide-react\",\n Building2: \"lucide-react\",\n Settings: \"lucide-react\",\n User: \"lucide-react\",\n Users: \"lucide-react\",\n Shield: \"lucide-react\",\n LayoutDashboard: \"lucide-react\",\n CreditCard: \"lucide-react\",\n Bell: \"lucide-react\",\n Key: \"lucide-react\",\n FileText: \"lucide-react\",\n Database: \"lucide-react\",\n Activity: \"lucide-react\",\n BarChart3: \"lucide-react\",\n Zap: \"lucide-react\",\n Terminal: \"lucide-react\",\n Code: \"lucide-react\",\n Package: \"lucide-react\",\n Store: \"lucide-react\",\n ShoppingBag: \"lucide-react\",\n Wallet: \"lucide-react\",\n Coins: \"lucide-react\",\n Plug: \"lucide-react\",\n Link: \"lucide-react\",\n ExternalLink: \"lucide-react\",\n Puzzle: \"lucide-react\",\n Layers: \"lucide-react\",\n Grid3X3: \"lucide-react\",\n AppWindow: \"lucide-react\",\n};\n\nfunction resolveIconModule(iconName: string): string {\n if (ICON_IMPORTS[iconName]) return ICON_IMPORTS[iconName];\n return \"lucide-react\";\n}\n\nfunction collectIconImports(items: SidebarItem[]): Map<string, Set<string>> {\n const moduleMap = new Map<string, Set<string>>();\n for (const item of items) {\n const module = resolveIconModule(item.icon);\n if (!moduleMap.has(module)) moduleMap.set(module, new Set());\n moduleMap.get(module)!.add(item.icon);\n }\n return moduleMap;\n}\n\nexport function generatePluginSidebarContent(runtimeConfig: RuntimeConfig): string {\n const coreItems: SidebarItem[] = [\n { icon: \"Home\", label: \"home\", to: \"/home\", roleRequired: \"anon\" },\n ];\n\n if (runtimeConfig.auth?.sidebar) {\n for (const item of runtimeConfig.auth.sidebar) {\n coreItems.push({\n ...item,\n to: item.to ?? \"/auth\",\n roleRequired: item.roleRequired ?? \"member\",\n });\n }\n }\n\n const pluginItems: SidebarItem[] = [];\n if (runtimeConfig.plugins) {\n for (const [key, entry] of Object.entries(runtimeConfig.plugins)) {\n const sidebar = entry.sidebar;\n if (!sidebar) continue;\n for (const item of sidebar) {\n pluginItems.push({\n ...item,\n to: item.to ?? `/${key}`,\n roleRequired: item.roleRequired ?? \"member\",\n });\n }\n }\n }\n\n const allItems = [...coreItems, ...pluginItems];\n const moduleMap = collectIconImports(allItems);\n\n const importLines: string[] = [];\n for (const [module, icons] of moduleMap) {\n const iconList = [...icons].join(\", \");\n importLines.push(`import { ${iconList} } from \"${module}\";`);\n }\n\n const itemsCode = allItems\n .map(\n (item) =>\n ` { icon: ${item.icon}, label: \"${item.label}\", to: \"${item.to}\" as const, roleRequired: \"${item.roleRequired}\" as const },`,\n )\n .join(\"\\n\");\n\n return `// Auto-generated by bos sync/pluginAdd/pluginRemove. Do not edit.\n${importLines.join(\"\\n\")}\n\nexport type SidebarRole = \"anon\" | \"member\" | \"admin\";\n\nexport interface SidebarItem {\n icon: React.ComponentType<{ className?: string }>;\n label: string;\n to: string;\n roleRequired: SidebarRole;\n}\n\nexport const pluginSidebarItems: SidebarItem[] = [\n${itemsCode}\n];\n`;\n}\n\nexport function writePluginSidebarGen(configDir: string, runtimeConfig: RuntimeConfig): string {\n const outputPath = join(configDir, \"ui/src/lib/plugin-sidebar.gen.ts\");\n\n const content = generatePluginSidebarContent(runtimeConfig);\n\n const outputDir = dirname(outputPath);\n if (!existsSync(outputDir)) {\n mkdirSync(outputDir, { recursive: true });\n }\n\n let existingContent: string | null = null;\n try {\n existingContent = existsSync(outputPath)\n ? // eslint-disable-next-line no-restricted-syntax\n readFileSync(outputPath, \"utf-8\")\n : null;\n } catch {\n // file doesn't exist yet\n }\n\n if (existingContent === content) return outputPath;\n\n writeFileSync(outputPath, content);\n return outputPath;\n}\n"],"mappings":";;;;AAIA,MAAM,eAAuC;CAC3C,MAAM;CACN,OAAO;CACP,cAAc;CACd,WAAW;CACX,UAA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