everything-dev 1.28.11 → 1.29.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/cli/init.cjs +134 -88
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.d.cts +12 -2
- package/dist/cli/init.d.cts.map +1 -1
- package/dist/cli/init.d.mts +12 -2
- package/dist/cli/init.d.mts.map +1 -1
- package/dist/cli/init.mjs +134 -89
- package/dist/cli/init.mjs.map +1 -1
- package/dist/cli/sync.cjs +24 -26
- package/dist/cli/sync.cjs.map +1 -1
- package/dist/cli/sync.mjs +26 -28
- package/dist/cli/sync.mjs.map +1 -1
- package/dist/cli/upgrade.cjs +16 -21
- package/dist/cli/upgrade.cjs.map +1 -1
- package/dist/cli/upgrade.mjs +17 -22
- package/dist/cli/upgrade.mjs.map +1 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/config.cjs +20 -5
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts +13 -3
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +13 -3
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +19 -5
- package/dist/config.mjs.map +1 -1
- package/dist/contract.cjs +6 -5
- package/dist/contract.cjs.map +1 -1
- package/dist/contract.d.cts +17 -13
- package/dist/contract.d.cts.map +1 -1
- package/dist/contract.d.mts +16 -12
- package/dist/contract.d.mts.map +1 -1
- package/dist/contract.meta.cjs +2 -3
- package/dist/contract.meta.cjs.map +1 -1
- package/dist/contract.meta.d.cts +5 -6
- package/dist/contract.meta.d.mts +5 -6
- package/dist/contract.meta.mjs +2 -3
- package/dist/contract.meta.mjs.map +1 -1
- package/dist/contract.mjs +7 -7
- package/dist/contract.mjs.map +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/plugin.cjs +17 -12
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +9 -8
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts +9 -8
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +18 -13
- package/dist/plugin.mjs.map +1 -1
- package/dist/sidebar.cjs +1 -1
- package/dist/sidebar.cjs.map +1 -1
- package/dist/sidebar.d.cts.map +1 -1
- package/dist/sidebar.d.mts.map +1 -1
- package/dist/sidebar.mjs +1 -1
- package/dist/sidebar.mjs.map +1 -1
- package/dist/types.d.cts +2 -2
- package/dist/types.d.mts +2 -2
- package/package.json +1 -1
package/dist/sidebar.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.d.cts","names":[],"sources":["../src/sidebar.ts"],"mappings":";;;iBAqDgB,4BAAA,CAA6B,aAAA,EAAe,aAAA;AAAA,
|
|
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.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.d.mts","names":[],"sources":["../src/sidebar.ts"],"mappings":";;;iBAqDgB,4BAAA,CAA6B,aAAA,EAAe,aAAA;AAAA,
|
|
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
CHANGED
|
@@ -52,7 +52,7 @@ function generatePluginSidebarContent(runtimeConfig) {
|
|
|
52
52
|
const coreItems = [{
|
|
53
53
|
icon: "Home",
|
|
54
54
|
label: "home",
|
|
55
|
-
to: "/",
|
|
55
|
+
to: "/home",
|
|
56
56
|
roleRequired: "anon"
|
|
57
57
|
}];
|
|
58
58
|
if (runtimeConfig.auth?.sidebar) for (const item of runtimeConfig.auth.sidebar) coreItems.push({
|
package/dist/sidebar.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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[] = [{ icon: \"Home\", label: \"home\", to: \"
|
|
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,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,SAAS,kBAAkB,KAAK,KAAK;AAC3C,MAAI,CAAC,UAAU,IAAI,OAAO,CAAE,WAAU,IAAI,wBAAQ,IAAI,KAAK,CAAC;AAC5D,YAAU,IAAI,OAAO,CAAE,IAAI,KAAK,KAAK;;AAEvC,QAAO;;AAGT,SAAgB,6BAA6B,eAAsC;CACjF,MAAM,YAA2B,CAC/B;EAAE,MAAM;EAAQ,OAAO;EAAQ,IAAI;EAAS,cAAc;EAAQ,CACnE;AAED,KAAI,cAAc,MAAM,QACtB,MAAK,MAAM,QAAQ,cAAc,KAAK,QACpC,WAAU,KAAK;EACb,GAAG;EACH,IAAI,KAAK,MAAM;EACf,cAAc,KAAK,gBAAgB;EACpC,CAAC;CAIN,MAAM,cAA6B,EAAE;AACrC,KAAI,cAAc,QAChB,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,cAAc,QAAQ,EAAE;EAChE,MAAM,UAAU,MAAM;AACtB,MAAI,CAAC,QAAS;AACd,OAAK,MAAM,QAAQ,QACjB,aAAY,KAAK;GACf,GAAG;GACH,IAAI,KAAK,MAAM,IAAI;GACnB,cAAc,KAAK,gBAAgB;GACpC,CAAC;;CAKR,MAAM,WAAW,CAAC,GAAG,WAAW,GAAG,YAAY;CAC/C,MAAM,YAAY,mBAAmB,SAAS;CAE9C,MAAM,cAAwB,EAAE;AAChC,MAAK,MAAM,CAAC,QAAQ,UAAU,WAAW;EACvC,MAAM,WAAW,CAAC,GAAG,MAAM,CAAC,KAAK,KAAK;AACtC,cAAY,KAAK,YAAY,SAAS,WAAW,OAAO,IAAI;;CAG9D,MAAM,YAAY,SACf,KACE,SACC,aAAa,KAAK,KAAK,YAAY,KAAK,MAAM,UAAU,KAAK,GAAG,6BAA6B,KAAK,aAAa,eAClH,CACA,KAAK,KAAK;AAEb,QAAO;EACP,YAAY,KAAK,KAAK,CAAC;;;;;;;;;;;;EAYvB,UAAU;;;;AAKZ,SAAgB,sBAAsB,WAAmB,eAAsC;CAC7F,MAAM,aAAa,KAAK,WAAW,mCAAmC;CAEtE,MAAM,UAAU,6BAA6B,cAAc;CAE3D,MAAM,YAAY,QAAQ,WAAW;AACrC,KAAI,CAAC,WAAW,UAAU,CACxB,WAAU,WAAW,EAAE,WAAW,MAAM,CAAC;CAG3C,IAAI,kBAAiC;AACrC,KAAI;AACF,oBAAkB,WAAW,WAAW,GAEpC,aAAa,YAAY,QAAQ,GACjC;SACE;AAIR,KAAI,oBAAoB,QAAS,QAAO;AAExC,eAAc,YAAY,QAAQ;AAClC,QAAO"}
|
package/dist/types.d.cts
CHANGED
|
@@ -397,8 +397,8 @@ declare const BosConfigSchema: z.ZodObject<{
|
|
|
397
397
|
type BosConfig = z.infer<typeof BosConfigSchema>;
|
|
398
398
|
declare const RuntimeConfigSchema: z.ZodObject<{
|
|
399
399
|
env: z.ZodEnum<{
|
|
400
|
-
production: "production";
|
|
401
400
|
development: "development";
|
|
401
|
+
production: "production";
|
|
402
402
|
staging: "staging";
|
|
403
403
|
}>;
|
|
404
404
|
account: z.ZodString;
|
|
@@ -539,8 +539,8 @@ type RuntimeConfig = z.infer<typeof RuntimeConfigSchema>;
|
|
|
539
539
|
declare const ClientRuntimeConfigSchema: z.ZodObject<{
|
|
540
540
|
cspNonce: z.ZodOptional<z.ZodString>;
|
|
541
541
|
env: z.ZodEnum<{
|
|
542
|
-
production: "production";
|
|
543
542
|
development: "development";
|
|
543
|
+
production: "production";
|
|
544
544
|
staging: "staging";
|
|
545
545
|
}>;
|
|
546
546
|
account: z.ZodString;
|
package/dist/types.d.mts
CHANGED
|
@@ -397,8 +397,8 @@ declare const BosConfigSchema: z.ZodObject<{
|
|
|
397
397
|
type BosConfig = z.infer<typeof BosConfigSchema>;
|
|
398
398
|
declare const RuntimeConfigSchema: z.ZodObject<{
|
|
399
399
|
env: z.ZodEnum<{
|
|
400
|
-
production: "production";
|
|
401
400
|
development: "development";
|
|
401
|
+
production: "production";
|
|
402
402
|
staging: "staging";
|
|
403
403
|
}>;
|
|
404
404
|
account: z.ZodString;
|
|
@@ -539,8 +539,8 @@ type RuntimeConfig = z.infer<typeof RuntimeConfigSchema>;
|
|
|
539
539
|
declare const ClientRuntimeConfigSchema: z.ZodObject<{
|
|
540
540
|
cspNonce: z.ZodOptional<z.ZodString>;
|
|
541
541
|
env: z.ZodEnum<{
|
|
542
|
-
production: "production";
|
|
543
542
|
development: "development";
|
|
543
|
+
production: "production";
|
|
544
544
|
staging: "staging";
|
|
545
545
|
}>;
|
|
546
546
|
account: z.ZodString;
|