@lastbrain/app 0.1.25 → 0.1.26
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/app-shell/(public)/page.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/layouts/AdminLayoutWithSidebar.d.ts +8 -0
- package/dist/layouts/AdminLayoutWithSidebar.d.ts.map +1 -0
- package/dist/layouts/AdminLayoutWithSidebar.js +9 -0
- package/dist/layouts/AuthLayoutWithSidebar.d.ts +8 -0
- package/dist/layouts/AuthLayoutWithSidebar.d.ts.map +1 -0
- package/dist/layouts/AuthLayoutWithSidebar.js +9 -0
- package/dist/scripts/db-init.js +1 -1
- package/dist/scripts/dev-sync.js +21 -10
- package/dist/scripts/init-app.d.ts.map +1 -1
- package/dist/scripts/init-app.js +114 -12
- package/dist/scripts/module-add.d.ts.map +1 -1
- package/dist/scripts/module-add.js +19 -6
- package/dist/scripts/module-build.d.ts.map +1 -1
- package/dist/scripts/module-build.js +285 -30
- package/dist/scripts/module-create.d.ts.map +1 -1
- package/dist/scripts/module-create.js +25 -15
- package/dist/scripts/module-remove.d.ts.map +1 -1
- package/dist/scripts/module-remove.js +24 -11
- package/dist/scripts/script-runner.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/templates/DefaultDoc.js +1 -7
- package/dist/templates/components/AppAside.d.ts +6 -0
- package/dist/templates/components/AppAside.d.ts.map +1 -0
- package/dist/templates/components/AppAside.js +9 -0
- package/dist/templates/layouts/admin-layout.d.ts +4 -0
- package/dist/templates/layouts/admin-layout.d.ts.map +1 -0
- package/dist/templates/layouts/admin-layout.js +6 -0
- package/dist/templates/layouts/auth-layout.d.ts +4 -0
- package/dist/templates/layouts/auth-layout.d.ts.map +1 -0
- package/dist/templates/layouts/auth-layout.js +6 -0
- package/package.json +2 -1
- package/src/app-shell/(public)/page.tsx +6 -2
- package/src/auth/useAuthSession.ts +1 -1
- package/src/cli.ts +1 -1
- package/src/index.ts +6 -0
- package/src/layouts/AdminLayoutWithSidebar.tsx +35 -0
- package/src/layouts/AppProviders.tsx +1 -1
- package/src/layouts/AuthLayoutWithSidebar.tsx +35 -0
- package/src/scripts/db-init.ts +12 -7
- package/src/scripts/db-migrations-sync.ts +3 -3
- package/src/scripts/dev-sync.ts +49 -18
- package/src/scripts/init-app.ts +235 -65
- package/src/scripts/module-add.ts +50 -22
- package/src/scripts/module-build.ts +393 -88
- package/src/scripts/module-create.ts +85 -49
- package/src/scripts/module-remove.ts +116 -57
- package/src/scripts/readme-build.ts +2 -2
- package/src/scripts/script-runner.ts +3 -3
- package/src/templates/AuthGuidePage.tsx +1 -1
- package/src/templates/DefaultDoc.tsx +7 -7
|
@@ -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
|
+
}
|
|
@@ -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
|
-
|
|
336
|
-
|
|
337
|
-
|
|
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>
|