@better-openclaw/db 1.0.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.
@@ -0,0 +1,57 @@
1
+ name: Service Proposal
2
+ description: Propose a new service or tool for better-openclaw
3
+ title: "[Service] "
4
+ labels: ["service-proposal"]
5
+ body:
6
+ - type: input
7
+ id: name
8
+ attributes:
9
+ label: Service Name
10
+ validations:
11
+ required: true
12
+ - type: input
13
+ id: image
14
+ attributes:
15
+ label: Docker Image
16
+ validations:
17
+ required: true
18
+ - type: dropdown
19
+ id: category
20
+ attributes:
21
+ label: Category
22
+ options:
23
+ - AI / Local Models
24
+ - AI Platforms
25
+ - Automation
26
+ - Browser Automation
27
+ - Coding Agents
28
+ - Communication
29
+ - Database
30
+ - Dev Tools
31
+ - Knowledge
32
+ - Media
33
+ - Monitoring
34
+ - Proxy
35
+ - Search
36
+ - Social Media
37
+ - Storage
38
+ - Vector DB
39
+ - Analytics
40
+ validations:
41
+ required: true
42
+ - type: textarea
43
+ id: description
44
+ attributes:
45
+ label: Description
46
+ validations:
47
+ required: true
48
+ - type: input
49
+ id: website
50
+ attributes:
51
+ label: Website URL
52
+ - type: textarea
53
+ id: why
54
+ attributes:
55
+ label: Why should this be included?
56
+ validations:
57
+ required: true
@@ -0,0 +1,32 @@
1
+ name: Stack Submission
2
+ description: Submit your better-openclaw stack to the showcase
3
+ title: "[Showcase] "
4
+ labels: ["showcase"]
5
+ body:
6
+ - type: input
7
+ id: name
8
+ attributes:
9
+ label: Project Name
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: description
14
+ attributes:
15
+ label: Description
16
+ validations:
17
+ required: true
18
+ - type: input
19
+ id: github
20
+ attributes:
21
+ label: GitHub URL
22
+ validations:
23
+ required: true
24
+ - type: input
25
+ id: screenshot
26
+ attributes:
27
+ label: Screenshot URL
28
+ - type: input
29
+ id: services
30
+ attributes:
31
+ label: Services Used
32
+ description: Comma-separated list of service IDs
@@ -0,0 +1,32 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: npm
9
+ directory: /
10
+ schedule:
11
+ interval: weekly
12
+ day: monday
13
+ open-pull-requests-limit: 10
14
+ groups:
15
+ dev-dependencies:
16
+ dependency-type: development
17
+ update-types:
18
+ - minor
19
+ - patch
20
+ production-dependencies:
21
+ dependency-type: production
22
+ update-types:
23
+ - patch
24
+ labels:
25
+ - dependencies
26
+
27
+ - package-ecosystem: github-actions
28
+ directory: /
29
+ schedule:
30
+ interval: weekly
31
+ labels:
32
+ - ci
@@ -0,0 +1,57 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v6
14
+ - uses: pnpm/action-setup@v4
15
+ - uses: actions/setup-node@v6
16
+ with:
17
+ node-version: 22
18
+ cache: pnpm
19
+ - run: pnpm install --no-lockfile
20
+ - run: pnpm lint
21
+
22
+ typecheck:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v6
26
+ - uses: pnpm/action-setup@v4
27
+ - uses: actions/setup-node@v6
28
+ with:
29
+ node-version: 22
30
+ cache: pnpm
31
+ - run: pnpm install --no-lockfile
32
+ - run: pnpm typecheck
33
+
34
+ test:
35
+ runs-on: ubuntu-latest
36
+ steps:
37
+ - uses: actions/checkout@v6
38
+ - uses: pnpm/action-setup@v4
39
+ - uses: actions/setup-node@v6
40
+ with:
41
+ node-version: 22
42
+ cache: pnpm
43
+ - run: pnpm install --no-lockfile
44
+ - run: pnpm test
45
+
46
+ build:
47
+ runs-on: ubuntu-latest
48
+ needs: [lint, typecheck, test]
49
+ steps:
50
+ - uses: actions/checkout@v6
51
+ - uses: pnpm/action-setup@v4
52
+ - uses: actions/setup-node@v6
53
+ with:
54
+ node-version: 22
55
+ cache: pnpm
56
+ - run: pnpm install --no-lockfile
57
+ - run: pnpm build
@@ -0,0 +1,37 @@
1
+ name: Publish-DB
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ publish-npm:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: read
12
+ id-token: write
13
+ steps:
14
+ - uses: actions/checkout@v6
15
+ - uses: actions/setup-node@v6
16
+ with:
17
+ node-version: "20.x"
18
+ registry-url: "https://registry.npmjs.org"
19
+
20
+ - uses: pnpm/action-setup@v4
21
+ with:
22
+ version: 10.30.3
23
+ run_install: false
24
+
25
+ - name: Install dependencies
26
+ run: pnpm install --no-lockfile
27
+ env:
28
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
30
+
31
+ - name: Build and Publish DB Typescript Packages
32
+ run: |
33
+ pnpm --filter @better-openclaw/db build
34
+ npm publish --access=public
35
+ env:
36
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
37
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,18 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) {
6
+ __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ }
11
+ if (!no_symbols) {
12
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
13
+ }
14
+ return target;
15
+ };
16
+
17
+ //#endregion
18
+ export { __exportAll as t };
@@ -0,0 +1,53 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __exportAll = (all, no_symbols) => {
9
+ let target = {};
10
+ for (var name in all) {
11
+ __defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
15
+ }
16
+ if (!no_symbols) {
17
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
18
+ }
19
+ return target;
20
+ };
21
+ var __copyProps = (to, from, except, desc) => {
22
+ if (from && typeof from === "object" || typeof from === "function") {
23
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
24
+ key = keys[i];
25
+ if (!__hasOwnProp.call(to, key) && key !== except) {
26
+ __defProp(to, key, {
27
+ get: ((k) => from[k]).bind(null, key),
28
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
29
+ });
30
+ }
31
+ }
32
+ }
33
+ return to;
34
+ };
35
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
36
+ value: mod,
37
+ enumerable: true
38
+ }) : target, mod));
39
+
40
+ //#endregion
41
+
42
+ Object.defineProperty(exports, '__exportAll', {
43
+ enumerable: true,
44
+ get: function () {
45
+ return __exportAll;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, '__toESM', {
49
+ enumerable: true,
50
+ get: function () {
51
+ return __toESM;
52
+ }
53
+ });
package/dist/index.cjs ADDED
@@ -0,0 +1,28 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_chunk = require('./chunk-uaV2rQ02.cjs');
3
+ const require_schema = require('./schema.cjs');
4
+ let drizzle_orm_postgres_js = require("drizzle-orm/postgres-js");
5
+ let postgres = require("postgres");
6
+ postgres = require_chunk.__toESM(postgres);
7
+
8
+ //#region src/index.ts
9
+ const connectionString = process.env.DATABASE_URL;
10
+ if (!connectionString) throw new Error("DATABASE_URL environment variable is required");
11
+ const client = (0, postgres.default)(connectionString, { max: 10 });
12
+ const db = (0, drizzle_orm_postgres_js.drizzle)(client, { schema: require_schema.schema_exports });
13
+
14
+ //#endregion
15
+ exports.account = require_schema.account;
16
+ exports.db = db;
17
+ exports.favorite = require_schema.favorite;
18
+ exports.savedStack = require_schema.savedStack;
19
+ Object.defineProperty(exports, 'schema', {
20
+ enumerable: true,
21
+ get: function () {
22
+ return require_schema.schema_exports;
23
+ }
24
+ });
25
+ exports.session = require_schema.session;
26
+ exports.user = require_schema.user;
27
+ exports.verification = require_schema.verification;
28
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { drizzle } from \"drizzle-orm/postgres-js\";\nimport postgres from \"postgres\";\nimport * as schema from \"./schema.js\";\n\nconst connectionString = process.env.DATABASE_URL;\nif (!connectionString) {\n\tthrow new Error(\"DATABASE_URL environment variable is required\");\n}\n\nconst client = postgres(connectionString, { max: 10 });\nexport const db = drizzle(client, { schema });\n\nexport * from \"./schema.js\";\nexport { schema };\n"],"mappings":";;;;;;;;AAIA,MAAM,mBAAmB,QAAQ,IAAI;AACrC,IAAI,CAAC,iBACJ,OAAM,IAAI,MAAM,gDAAgD;AAGjE,MAAM,+BAAkB,kBAAkB,EAAE,KAAK,IAAI,CAAC;AACtD,MAAa,0CAAa,QAAQ,EAAE,uCAAQ,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { Favorite, SavedStack, Session, User, account, favorite, savedStack, session, t as schema_d_exports, user, verification } from "./schema.cjs";
2
+ import * as drizzle_orm_postgres_js0 from "drizzle-orm/postgres-js";
3
+ import postgres from "postgres";
4
+
5
+ //#region src/index.d.ts
6
+ declare const db: drizzle_orm_postgres_js0.PostgresJsDatabase<typeof schema_d_exports> & {
7
+ $client: postgres.Sql<{}>;
8
+ };
9
+ //#endregion
10
+ export { Favorite, SavedStack, Session, User, account, db, favorite, savedStack, schema_d_exports as schema, session, user, verification };
11
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;cAUa,EAAA,EAAE,wBAAA,CAAA,kBAAA,QAAA,gBAAA"}
@@ -0,0 +1,11 @@
1
+ import { Favorite, SavedStack, Session, User, account, favorite, savedStack, session, t as schema_d_exports, user, verification } from "./schema.mjs";
2
+ import * as drizzle_orm_postgres_js0 from "drizzle-orm/postgres-js";
3
+ import postgres from "postgres";
4
+
5
+ //#region src/index.d.ts
6
+ declare const db: drizzle_orm_postgres_js0.PostgresJsDatabase<typeof schema_d_exports> & {
7
+ $client: postgres.Sql<{}>;
8
+ };
9
+ //#endregion
10
+ export { Favorite, SavedStack, Session, User, account, db, favorite, savedStack, schema_d_exports as schema, session, user, verification };
11
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;cAUa,EAAA,EAAE,wBAAA,CAAA,kBAAA,QAAA,gBAAA"}
package/dist/index.mjs ADDED
@@ -0,0 +1,13 @@
1
+ import { account, favorite, savedStack, session, t as schema_exports, user, verification } from "./schema.mjs";
2
+ import { drizzle } from "drizzle-orm/postgres-js";
3
+ import postgres from "postgres";
4
+
5
+ //#region src/index.ts
6
+ const connectionString = process.env.DATABASE_URL;
7
+ if (!connectionString) throw new Error("DATABASE_URL environment variable is required");
8
+ const client = postgres(connectionString, { max: 10 });
9
+ const db = drizzle(client, { schema: schema_exports });
10
+
11
+ //#endregion
12
+ export { account, db, favorite, savedStack, schema_exports as schema, session, user, verification };
13
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { drizzle } from \"drizzle-orm/postgres-js\";\nimport postgres from \"postgres\";\nimport * as schema from \"./schema.js\";\n\nconst connectionString = process.env.DATABASE_URL;\nif (!connectionString) {\n\tthrow new Error(\"DATABASE_URL environment variable is required\");\n}\n\nconst client = postgres(connectionString, { max: 10 });\nexport const db = drizzle(client, { schema });\n\nexport * from \"./schema.js\";\nexport { schema };\n"],"mappings":";;;;;AAIA,MAAM,mBAAmB,QAAQ,IAAI;AACrC,IAAI,CAAC,iBACJ,OAAM,IAAI,MAAM,gDAAgD;AAGjE,MAAM,SAAS,SAAS,kBAAkB,EAAE,KAAK,IAAI,CAAC;AACtD,MAAa,KAAK,QAAQ,QAAQ,EAAE,wBAAQ,CAAC"}
@@ -0,0 +1,86 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_chunk = require('./chunk-uaV2rQ02.cjs');
3
+ let drizzle_orm_pg_core = require("drizzle-orm/pg-core");
4
+
5
+ //#region src/schema.ts
6
+ var schema_exports = /* @__PURE__ */ require_chunk.__exportAll({
7
+ account: () => account,
8
+ favorite: () => favorite,
9
+ savedStack: () => savedStack,
10
+ session: () => session,
11
+ user: () => user,
12
+ verification: () => verification
13
+ });
14
+ const user = (0, drizzle_orm_pg_core.pgTable)("user", {
15
+ id: (0, drizzle_orm_pg_core.text)("id").primaryKey(),
16
+ name: (0, drizzle_orm_pg_core.text)("name").notNull(),
17
+ email: (0, drizzle_orm_pg_core.text)("email").notNull().unique(),
18
+ emailVerified: (0, drizzle_orm_pg_core.boolean)("email_verified").notNull(),
19
+ image: (0, drizzle_orm_pg_core.text)("image"),
20
+ createdAt: (0, drizzle_orm_pg_core.timestamp)("created_at").notNull(),
21
+ updatedAt: (0, drizzle_orm_pg_core.timestamp)("updated_at").notNull()
22
+ });
23
+ const session = (0, drizzle_orm_pg_core.pgTable)("session", {
24
+ id: (0, drizzle_orm_pg_core.text)("id").primaryKey(),
25
+ expiresAt: (0, drizzle_orm_pg_core.timestamp)("expires_at").notNull(),
26
+ token: (0, drizzle_orm_pg_core.text)("token").notNull().unique(),
27
+ createdAt: (0, drizzle_orm_pg_core.timestamp)("created_at").notNull(),
28
+ updatedAt: (0, drizzle_orm_pg_core.timestamp)("updated_at").notNull(),
29
+ ipAddress: (0, drizzle_orm_pg_core.text)("ip_address"),
30
+ userAgent: (0, drizzle_orm_pg_core.text)("user_agent"),
31
+ userId: (0, drizzle_orm_pg_core.text)("user_id").notNull().references(() => user.id, { onDelete: "cascade" })
32
+ });
33
+ const account = (0, drizzle_orm_pg_core.pgTable)("account", {
34
+ id: (0, drizzle_orm_pg_core.text)("id").primaryKey(),
35
+ accountId: (0, drizzle_orm_pg_core.text)("account_id").notNull(),
36
+ providerId: (0, drizzle_orm_pg_core.text)("provider_id").notNull(),
37
+ userId: (0, drizzle_orm_pg_core.text)("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
38
+ accessToken: (0, drizzle_orm_pg_core.text)("access_token"),
39
+ refreshToken: (0, drizzle_orm_pg_core.text)("refresh_token"),
40
+ idToken: (0, drizzle_orm_pg_core.text)("id_token"),
41
+ accessTokenExpiresAt: (0, drizzle_orm_pg_core.timestamp)("access_token_expires_at"),
42
+ refreshTokenExpiresAt: (0, drizzle_orm_pg_core.timestamp)("refresh_token_expires_at"),
43
+ scope: (0, drizzle_orm_pg_core.text)("scope"),
44
+ password: (0, drizzle_orm_pg_core.text)("password"),
45
+ createdAt: (0, drizzle_orm_pg_core.timestamp)("created_at").notNull(),
46
+ updatedAt: (0, drizzle_orm_pg_core.timestamp)("updated_at").notNull()
47
+ });
48
+ const verification = (0, drizzle_orm_pg_core.pgTable)("verification", {
49
+ id: (0, drizzle_orm_pg_core.text)("id").primaryKey(),
50
+ identifier: (0, drizzle_orm_pg_core.text)("identifier").notNull(),
51
+ value: (0, drizzle_orm_pg_core.text)("value").notNull(),
52
+ expiresAt: (0, drizzle_orm_pg_core.timestamp)("expires_at").notNull(),
53
+ createdAt: (0, drizzle_orm_pg_core.timestamp)("created_at"),
54
+ updatedAt: (0, drizzle_orm_pg_core.timestamp)("updated_at")
55
+ });
56
+ const savedStack = (0, drizzle_orm_pg_core.pgTable)("saved_stack", {
57
+ id: (0, drizzle_orm_pg_core.uuid)("id").primaryKey().defaultRandom(),
58
+ userId: (0, drizzle_orm_pg_core.text)("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
59
+ name: (0, drizzle_orm_pg_core.text)("name").notNull(),
60
+ description: (0, drizzle_orm_pg_core.text)("description"),
61
+ services: (0, drizzle_orm_pg_core.jsonb)("services").notNull().$type().default([]),
62
+ config: (0, drizzle_orm_pg_core.jsonb)("config").notNull().$type().default({}),
63
+ createdAt: (0, drizzle_orm_pg_core.timestamp)("created_at").notNull().defaultNow(),
64
+ updatedAt: (0, drizzle_orm_pg_core.timestamp)("updated_at").notNull().defaultNow()
65
+ });
66
+ const favorite = (0, drizzle_orm_pg_core.pgTable)("favorite", {
67
+ id: (0, drizzle_orm_pg_core.uuid)("id").primaryKey().defaultRandom(),
68
+ userId: (0, drizzle_orm_pg_core.text)("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
69
+ stackId: (0, drizzle_orm_pg_core.uuid)("stack_id").notNull().references(() => savedStack.id, { onDelete: "cascade" }),
70
+ createdAt: (0, drizzle_orm_pg_core.timestamp)("created_at").notNull().defaultNow()
71
+ });
72
+
73
+ //#endregion
74
+ exports.account = account;
75
+ exports.favorite = favorite;
76
+ exports.savedStack = savedStack;
77
+ Object.defineProperty(exports, 'schema_exports', {
78
+ enumerable: true,
79
+ get: function () {
80
+ return schema_exports;
81
+ }
82
+ });
83
+ exports.session = session;
84
+ exports.user = user;
85
+ exports.verification = verification;
86
+ //# sourceMappingURL=schema.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.cjs","names":[],"sources":["../src/schema.ts"],"sourcesContent":["import { pgTable, text, timestamp, boolean, jsonb, uuid } from \"drizzle-orm/pg-core\";\n\n// ── better-auth required tables ────────────────────────────────────────────────\n\nexport const user = pgTable(\"user\", {\n\tid: text(\"id\").primaryKey(),\n\tname: text(\"name\").notNull(),\n\temail: text(\"email\").notNull().unique(),\n\temailVerified: boolean(\"email_verified\").notNull(),\n\timage: text(\"image\"),\n\tcreatedAt: timestamp(\"created_at\").notNull(),\n\tupdatedAt: timestamp(\"updated_at\").notNull(),\n});\n\nexport const session = pgTable(\"session\", {\n\tid: text(\"id\").primaryKey(),\n\texpiresAt: timestamp(\"expires_at\").notNull(),\n\ttoken: text(\"token\").notNull().unique(),\n\tcreatedAt: timestamp(\"created_at\").notNull(),\n\tupdatedAt: timestamp(\"updated_at\").notNull(),\n\tipAddress: text(\"ip_address\"),\n\tuserAgent: text(\"user_agent\"),\n\tuserId: text(\"user_id\")\n\t\t.notNull()\n\t\t.references(() => user.id, { onDelete: \"cascade\" }),\n});\n\nexport const account = pgTable(\"account\", {\n\tid: text(\"id\").primaryKey(),\n\taccountId: text(\"account_id\").notNull(),\n\tproviderId: text(\"provider_id\").notNull(),\n\tuserId: text(\"user_id\")\n\t\t.notNull()\n\t\t.references(() => user.id, { onDelete: \"cascade\" }),\n\taccessToken: text(\"access_token\"),\n\trefreshToken: text(\"refresh_token\"),\n\tidToken: text(\"id_token\"),\n\taccessTokenExpiresAt: timestamp(\"access_token_expires_at\"),\n\trefreshTokenExpiresAt: timestamp(\"refresh_token_expires_at\"),\n\tscope: text(\"scope\"),\n\tpassword: text(\"password\"),\n\tcreatedAt: timestamp(\"created_at\").notNull(),\n\tupdatedAt: timestamp(\"updated_at\").notNull(),\n});\n\nexport const verification = pgTable(\"verification\", {\n\tid: text(\"id\").primaryKey(),\n\tidentifier: text(\"identifier\").notNull(),\n\tvalue: text(\"value\").notNull(),\n\texpiresAt: timestamp(\"expires_at\").notNull(),\n\tcreatedAt: timestamp(\"created_at\"),\n\tupdatedAt: timestamp(\"updated_at\"),\n});\n\n// ── App-specific tables ─────────────────────────────────────────────────────────\n\nexport const savedStack = pgTable(\"saved_stack\", {\n\tid: uuid(\"id\").primaryKey().defaultRandom(),\n\tuserId: text(\"user_id\")\n\t\t.notNull()\n\t\t.references(() => user.id, { onDelete: \"cascade\" }),\n\tname: text(\"name\").notNull(),\n\tdescription: text(\"description\"),\n\t/** Array of selected service IDs */\n\tservices: jsonb(\"services\").notNull().$type<string[]>().default([]),\n\t/** The full GenerationInput config stored as JSON */\n\tconfig: jsonb(\"config\").notNull().$type<Record<string, unknown>>().default({}),\n\tcreatedAt: timestamp(\"created_at\").notNull().defaultNow(),\n\tupdatedAt: timestamp(\"updated_at\").notNull().defaultNow(),\n});\n\nexport const favorite = pgTable(\"favorite\", {\n\tid: uuid(\"id\").primaryKey().defaultRandom(),\n\tuserId: text(\"user_id\")\n\t\t.notNull()\n\t\t.references(() => user.id, { onDelete: \"cascade\" }),\n\tstackId: uuid(\"stack_id\")\n\t\t.notNull()\n\t\t.references(() => savedStack.id, { onDelete: \"cascade\" }),\n\tcreatedAt: timestamp(\"created_at\").notNull().defaultNow(),\n});\n\nexport type User = typeof user.$inferSelect;\nexport type Session = typeof session.$inferSelect;\nexport type SavedStack = typeof savedStack.$inferSelect;\nexport type Favorite = typeof favorite.$inferSelect;\n"],"mappings":";;;;;;;;;;;;;AAIA,MAAa,wCAAe,QAAQ;CACnC,kCAAS,KAAK,CAAC,YAAY;CAC3B,oCAAW,OAAO,CAAC,SAAS;CAC5B,qCAAY,QAAQ,CAAC,SAAS,CAAC,QAAQ;CACvC,gDAAuB,iBAAiB,CAAC,SAAS;CAClD,qCAAY,QAAQ;CACpB,8CAAqB,aAAa,CAAC,SAAS;CAC5C,8CAAqB,aAAa,CAAC,SAAS;CAC5C,CAAC;AAEF,MAAa,2CAAkB,WAAW;CACzC,kCAAS,KAAK,CAAC,YAAY;CAC3B,8CAAqB,aAAa,CAAC,SAAS;CAC5C,qCAAY,QAAQ,CAAC,SAAS,CAAC,QAAQ;CACvC,8CAAqB,aAAa,CAAC,SAAS;CAC5C,8CAAqB,aAAa,CAAC,SAAS;CAC5C,yCAAgB,aAAa;CAC7B,yCAAgB,aAAa;CAC7B,sCAAa,UAAU,CACrB,SAAS,CACT,iBAAiB,KAAK,IAAI,EAAE,UAAU,WAAW,CAAC;CACpD,CAAC;AAEF,MAAa,2CAAkB,WAAW;CACzC,kCAAS,KAAK,CAAC,YAAY;CAC3B,yCAAgB,aAAa,CAAC,SAAS;CACvC,0CAAiB,cAAc,CAAC,SAAS;CACzC,sCAAa,UAAU,CACrB,SAAS,CACT,iBAAiB,KAAK,IAAI,EAAE,UAAU,WAAW,CAAC;CACpD,2CAAkB,eAAe;CACjC,4CAAmB,gBAAgB;CACnC,uCAAc,WAAW;CACzB,yDAAgC,0BAA0B;CAC1D,0DAAiC,2BAA2B;CAC5D,qCAAY,QAAQ;CACpB,wCAAe,WAAW;CAC1B,8CAAqB,aAAa,CAAC,SAAS;CAC5C,8CAAqB,aAAa,CAAC,SAAS;CAC5C,CAAC;AAEF,MAAa,gDAAuB,gBAAgB;CACnD,kCAAS,KAAK,CAAC,YAAY;CAC3B,0CAAiB,aAAa,CAAC,SAAS;CACxC,qCAAY,QAAQ,CAAC,SAAS;CAC9B,8CAAqB,aAAa,CAAC,SAAS;CAC5C,8CAAqB,aAAa;CAClC,8CAAqB,aAAa;CAClC,CAAC;AAIF,MAAa,8CAAqB,eAAe;CAChD,kCAAS,KAAK,CAAC,YAAY,CAAC,eAAe;CAC3C,sCAAa,UAAU,CACrB,SAAS,CACT,iBAAiB,KAAK,IAAI,EAAE,UAAU,WAAW,CAAC;CACpD,oCAAW,OAAO,CAAC,SAAS;CAC5B,2CAAkB,cAAc;CAEhC,yCAAgB,WAAW,CAAC,SAAS,CAAC,OAAiB,CAAC,QAAQ,EAAE,CAAC;CAEnE,uCAAc,SAAS,CAAC,SAAS,CAAC,OAAgC,CAAC,QAAQ,EAAE,CAAC;CAC9E,8CAAqB,aAAa,CAAC,SAAS,CAAC,YAAY;CACzD,8CAAqB,aAAa,CAAC,SAAS,CAAC,YAAY;CACzD,CAAC;AAEF,MAAa,4CAAmB,YAAY;CAC3C,kCAAS,KAAK,CAAC,YAAY,CAAC,eAAe;CAC3C,sCAAa,UAAU,CACrB,SAAS,CACT,iBAAiB,KAAK,IAAI,EAAE,UAAU,WAAW,CAAC;CACpD,uCAAc,WAAW,CACvB,SAAS,CACT,iBAAiB,WAAW,IAAI,EAAE,UAAU,WAAW,CAAC;CAC1D,8CAAqB,aAAa,CAAC,SAAS,CAAC,YAAY;CACzD,CAAC"}