@lastbrain/app 0.1.25 → 0.1.27

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.
Files changed (54) hide show
  1. package/dist/app-shell/(public)/page.d.ts.map +1 -1
  2. package/dist/index.d.ts +4 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +4 -0
  5. package/dist/layouts/AdminLayoutWithSidebar.d.ts +8 -0
  6. package/dist/layouts/AdminLayoutWithSidebar.d.ts.map +1 -0
  7. package/dist/layouts/AdminLayoutWithSidebar.js +9 -0
  8. package/dist/layouts/AuthLayoutWithSidebar.d.ts +8 -0
  9. package/dist/layouts/AuthLayoutWithSidebar.d.ts.map +1 -0
  10. package/dist/layouts/AuthLayoutWithSidebar.js +9 -0
  11. package/dist/scripts/db-init.js +2 -2
  12. package/dist/scripts/dev-sync.js +23 -12
  13. package/dist/scripts/init-app.d.ts.map +1 -1
  14. package/dist/scripts/init-app.js +114 -12
  15. package/dist/scripts/module-add.d.ts.map +1 -1
  16. package/dist/scripts/module-add.js +19 -6
  17. package/dist/scripts/module-build.d.ts.map +1 -1
  18. package/dist/scripts/module-build.js +288 -30
  19. package/dist/scripts/module-create.d.ts.map +1 -1
  20. package/dist/scripts/module-create.js +25 -15
  21. package/dist/scripts/module-remove.d.ts.map +1 -1
  22. package/dist/scripts/module-remove.js +28 -15
  23. package/dist/scripts/script-runner.js +1 -1
  24. package/dist/styles.css +1 -1
  25. package/dist/templates/DefaultDoc.js +1 -7
  26. package/dist/templates/components/AppAside.d.ts +6 -0
  27. package/dist/templates/components/AppAside.d.ts.map +1 -0
  28. package/dist/templates/components/AppAside.js +9 -0
  29. package/dist/templates/layouts/admin-layout.d.ts +4 -0
  30. package/dist/templates/layouts/admin-layout.d.ts.map +1 -0
  31. package/dist/templates/layouts/admin-layout.js +6 -0
  32. package/dist/templates/layouts/auth-layout.d.ts +4 -0
  33. package/dist/templates/layouts/auth-layout.d.ts.map +1 -0
  34. package/dist/templates/layouts/auth-layout.js +6 -0
  35. package/package.json +2 -1
  36. package/src/app-shell/(public)/page.tsx +6 -2
  37. package/src/auth/useAuthSession.ts +1 -1
  38. package/src/cli.ts +1 -1
  39. package/src/index.ts +6 -0
  40. package/src/layouts/AdminLayoutWithSidebar.tsx +35 -0
  41. package/src/layouts/AppProviders.tsx +1 -1
  42. package/src/layouts/AuthLayoutWithSidebar.tsx +35 -0
  43. package/src/scripts/db-init.ts +13 -8
  44. package/src/scripts/db-migrations-sync.ts +4 -4
  45. package/src/scripts/dev-sync.ts +50 -19
  46. package/src/scripts/init-app.ts +243 -65
  47. package/src/scripts/module-add.ts +54 -22
  48. package/src/scripts/module-build.ts +412 -88
  49. package/src/scripts/module-create.ts +85 -49
  50. package/src/scripts/module-remove.ts +120 -61
  51. package/src/scripts/readme-build.ts +2 -2
  52. package/src/scripts/script-runner.ts +3 -3
  53. package/src/templates/AuthGuidePage.tsx +1 -1
  54. package/src/templates/DefaultDoc.tsx +7 -7
@@ -16,13 +16,13 @@ function resolveModuleReadme(moduleName: string) {
16
16
  projectRoot,
17
17
  "packages",
18
18
  moduleName.replace("@lastbrain/", ""),
19
- "README.md"
19
+ "README.md",
20
20
  ),
21
21
  path.join(
22
22
  projectRoot,
23
23
  "node_modules",
24
24
  ...moduleName.split("/"),
25
- "README.md"
25
+ "README.md",
26
26
  ),
27
27
  ];
28
28
 
@@ -7,10 +7,10 @@ import path from "path";
7
7
  export async function runScript(scriptName: string, args: string[] = []) {
8
8
  return new Promise<void>((resolve, reject) => {
9
9
  const scriptPath = path.join(__dirname, `${scriptName}.js`);
10
-
10
+
11
11
  const child = spawn("node", [scriptPath, ...args], {
12
12
  stdio: "inherit",
13
- env: { ...process.env, PROJECT_ROOT: process.cwd() }
13
+ env: { ...process.env, PROJECT_ROOT: process.cwd() },
14
14
  });
15
15
 
16
16
  child.on("close", (code) => {
@@ -25,4 +25,4 @@ export async function runScript(scriptName: string, args: string[] = []) {
25
25
  reject(error);
26
26
  });
27
27
  });
28
- }
28
+ }
@@ -1,6 +1,6 @@
1
1
  // GENERATED BY LASTBRAIN TEMPLATE (Auth Guide)
2
2
  import React from "react";
3
- import { Card, Code, Divider, Button, Link, Chip } from "@lastbrain/ui";
3
+ import { Card, Code, Divider, Chip } from "@lastbrain/ui";
4
4
 
5
5
  export function AuthGuidePage() {
6
6
  return (
@@ -330,13 +330,13 @@ export function DefaultDocumentation() {
330
330
  </p>
331
331
  <div className="ml-6">
332
332
  <Snippet symbol="" hideSymbol className="text-sm">
333
- {`update auth.users
334
- set raw_app_meta_data = jsonb_set(
335
- coalesce(raw_app_meta_data, '{}'::jsonb),
336
- '{roles}',
337
- '["admin"]'::jsonb
338
- )
339
- where email = 'votre@email.com';`}
333
+ <span>{`update auth.users`}</span>
334
+ <span>{`set raw_app_meta_data = jsonb_set(`}</span>
335
+ <span>{`coalesce(raw_app_meta_data, '{}'::jsonb),`}</span>
336
+ <span>{`'{roles}',`}</span>
337
+ <span>{`'["admin"]'::jsonb`}</span>
338
+ <span>{`)`}</span>
339
+ <span>{`where email = 'votre@email.com';`}</span>
340
340
  </Snippet>
341
341
  </div>
342
342
  </li>