diff --git a/docs/examples/record_api_dart/test/record_api_test.dart b/docs/examples/record_api_dart/test/record_api_test.dart index ddd167a..279c798 100644 --- a/docs/examples/record_api_dart/test/record_api_test.dart +++ b/docs/examples/record_api_dart/test/record_api_test.dart @@ -38,7 +38,7 @@ Future connect() async { } void main() { - test('Test examples', () async { + test('Test code examples', () async { final client = await connect(); final tableStream = await subscribeAll(client); diff --git a/docs/examples/record_api_ts/eslint.config.mjs b/docs/examples/record_api_ts/eslint.config.mjs new file mode 100644 index 0000000..640b6d5 --- /dev/null +++ b/docs/examples/record_api_ts/eslint.config.mjs @@ -0,0 +1,28 @@ +import pluginJs from "@eslint/js"; +import tseslint from "typescript-eslint"; + +export default [ + pluginJs.configs.recommended, + ...tseslint.configs.recommended, + { + ignores: ["dist/", "node_modules/", "types"], + }, + { + files: ["scripts/*.{js,mjs,cjs,mts,ts,tsx,jsx}"], + rules: { + // https://typescript-eslint.io/rules/no-explicit-any/ + "@typescript-eslint/no-explicit-any": "warn", + // http://eslint.org/docs/rules/no-unused-vars + "@typescript-eslint/no-unused-vars": [ + "error", + { + vars: "all", + args: "after-used", + argsIgnorePattern: "^_", + varsIgnorePattern: "^_", + }, + ], + "no-empty": ["error", { allowEmptyCatch: true }], + }, + }, +]; diff --git a/docs/examples/record_api_ts/package.json b/docs/examples/record_api_ts/package.json new file mode 100644 index 0000000..ba63e37 --- /dev/null +++ b/docs/examples/record_api_ts/package.json @@ -0,0 +1,21 @@ +{ + "name": "record_api_ts", + "version": "1.0.0", + "description": "Example uses of record APIs for documentation purposes.", + "scripts": { + "check": "tsc --noEmit --skipLibCheck && eslint", + "test": "vitest run" + }, + "devDependencies": { + "@eslint/js": "^9.18.0", + "@types/node": "^22.10.6", + "eslint": "^9.18.0", + "prettier": "^3.4.2", + "typescript": "^5.7.3", + "typescript-eslint": "^8.20.0", + "vitest": "^2.1.8" + }, + "dependencies": { + "trailbase": "workspace:*" + } +} diff --git a/docs/examples/record_api_ts/src/create.ts b/docs/examples/record_api_ts/src/create.ts new file mode 100644 index 0000000..703c496 --- /dev/null +++ b/docs/examples/record_api_ts/src/create.ts @@ -0,0 +1,4 @@ +import { Client } from "trailbase"; + +export const create = async (client: Client): Promise => + await client.records("simple_strict_table").createId({ text_not_null: "test" }); diff --git a/docs/examples/record_api_ts/src/delete.ts b/docs/examples/record_api_ts/src/delete.ts new file mode 100644 index 0000000..33e295a --- /dev/null +++ b/docs/examples/record_api_ts/src/delete.ts @@ -0,0 +1,4 @@ +import { Client } from "trailbase"; + +export const remove = async (client: Client, id: string | number) => + await client.records("simple_strict_table").delete(id); diff --git a/docs/examples/record_api_ts/src/read.ts b/docs/examples/record_api_ts/src/read.ts new file mode 100644 index 0000000..f2d66de --- /dev/null +++ b/docs/examples/record_api_ts/src/read.ts @@ -0,0 +1,4 @@ +import { Client } from "trailbase"; + +export const read = async (client: Client, id: string | number) => + await client.records("simple_strict_table").read(id); diff --git a/docs/examples/record_api_ts/src/subscribe.ts b/docs/examples/record_api_ts/src/subscribe.ts new file mode 100644 index 0000000..0968bc6 --- /dev/null +++ b/docs/examples/record_api_ts/src/subscribe.ts @@ -0,0 +1,7 @@ +import { Client } from "trailbase"; + +export const subscribe = async (client: Client, id: string | number) => + await client.records("simple_strict_table").subscribe(id); + +export const subscribeAll = async (client: Client) => + await client.records("simple_strict_table").subscribe("*"); diff --git a/docs/examples/record_api_ts/src/update.ts b/docs/examples/record_api_ts/src/update.ts new file mode 100644 index 0000000..d46b4c1 --- /dev/null +++ b/docs/examples/record_api_ts/src/update.ts @@ -0,0 +1,4 @@ +import { Client } from "trailbase"; + +export const update = async (client: Client, id: string | number, record: object) => + await client.records("simple_strict_table").update(id, record); diff --git a/docs/examples/record_api_ts/tests/basic.test.ts b/docs/examples/record_api_ts/tests/basic.test.ts new file mode 100644 index 0000000..da34875 --- /dev/null +++ b/docs/examples/record_api_ts/tests/basic.test.ts @@ -0,0 +1,60 @@ +import { Client, type Event } from "trailbase"; +import { expect, test } from "vitest"; + +import { create } from "../src/create.ts"; +import { read } from "../src/read.ts"; +import { update } from "../src/update.ts"; +import { remove } from "../src/delete.ts"; +import { subscribe, subscribeAll } from "../src/subscribe.ts"; + +async function connect(): Promise { + const client = new Client("http://localhost:4000"); + await client.login("admin@localhost", "secret"); + return client; +} + +test("Test code examples", async () => { + const client = await connect(); + + const tableStream = await subscribeAll(client); + + const id = await create(client); + + const recordStream = await subscribe(client, id); + + { + const record = await read(client, id); + expect(record).toMatchObject({ "text_not_null": "test" }); + } + + { + await update(client, id, { "text_not_null": "updated" }); + const record = await read(client, id); + expect(record).toMatchObject({ "text_not_null": "updated" }); + } + + await remove(client, id); + + { + const events: Event[] = []; + for await (const event of tableStream) { + events.push(event); + if (events.length === 3) { + break; + } + } + tableStream.cancel(); + } + + { + const events: Event[] = []; + for await (const event of recordStream) { + events.push(event); + if (events.length === 2) { + break; + } + } + recordStream.cancel(); + } + +}); diff --git a/docs/examples/record_api_ts/tsconfig.json b/docs/examples/record_api_ts/tsconfig.json new file mode 100644 index 0000000..d88d404 --- /dev/null +++ b/docs/examples/record_api_ts/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "strict": true, + "strictNullChecks": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": false, + "moduleResolution": "bundler", + "target": "ESNext", + "module": "ESNext", + "noEmit": true, + "paths": { + "@/*": ["./src/*"], + "@bindings/*": ["../../../trailbase-core/bindings/*"] + } + }, + "include": ["src/**/*"], + "exclude": [ + "dist", + "node_modules" + ] +} diff --git a/docs/src/content/docs/documentation/APIs/record_apis.mdx b/docs/src/content/docs/documentation/APIs/record_apis.mdx index 74fb1da..0a4444a 100644 --- a/docs/src/content/docs/documentation/APIs/record_apis.mdx +++ b/docs/src/content/docs/documentation/APIs/record_apis.mdx @@ -144,8 +144,13 @@ The create endpoint lets you insert new records and potentially override existing ones depending on conflict resolution strategy. import createDartCode from "@examples/record_api_dart/lib/src/create.dart?raw"; +import createTsCode from "@examples/record_api_ts/src/create.ts?raw"; + + + + @@ -157,8 +162,13 @@ import createDartCode from "@examples/record_api_dart/lib/src/create.dart?raw"; The read endpoint lets you read specific records given their id. import readDartCode from "@examples/record_api_dart/lib/src/read.dart?raw"; +import readTsCode from "@examples/record_api_ts/src/read.ts?raw"; + + + + @@ -169,8 +179,13 @@ import readDartCode from "@examples/record_api_dart/lib/src/read.dart?raw"; The update endpoint lets you modify, i.e. partially update, existing records given their id import updateDartCode from "@examples/record_api_dart/lib/src/update.dart?raw"; +import updateTsCode from "@examples/record_api_ts/src/update.ts?raw"; + + + + @@ -179,8 +194,13 @@ import updateDartCode from "@examples/record_api_dart/lib/src/update.dart?raw"; ### Delete import deleteDartCode from "@examples/record_api_dart/lib/src/update.dart?raw"; +import deleteTsCode from "@examples/record_api_ts/src/delete.ts?raw"; + + + + @@ -230,8 +250,13 @@ an API or specific records given their id. Change events can be insertions, updates, and deletions. import subscribeDartCode from "@examples/record_api_dart/lib/src/subscribe.dart?raw"; +import subscribeTsCode from "@examples/record_api_ts/src/subscribe.ts?raw"; + + + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bbd2da0..faf7a3e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -70,11 +70,39 @@ importers: specifier: ^0.14.1 version: 0.14.1 + docs/examples/record_api_ts: + dependencies: + trailbase: + specifier: workspace:* + version: link:../../../trailbase-core/js/client + devDependencies: + '@eslint/js': + specifier: ^9.18.0 + version: 9.18.0 + '@types/node': + specifier: ^22.10.6 + version: 22.10.6 + eslint: + specifier: ^9.18.0 + version: 9.18.0(jiti@2.4.2) + prettier: + specifier: ^3.4.2 + version: 3.4.2 + typescript: + specifier: ^5.7.3 + version: 5.7.3 + typescript-eslint: + specifier: ^8.20.0 + version: 8.20.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.7.3) + vitest: + specifier: ^2.1.8 + version: 2.1.8(@types/node@22.10.6)(happy-dom@15.11.7)(jsdom@26.0.0) + examples/blog/web: dependencies: '@astrojs/tailwind': specifier: ^5.1.4 - version: 5.1.4(astro@5.1.6(@types/node@22.10.6)(jiti@2.4.2)(rollup@4.30.1)(typescript@5.7.3)(yaml@2.7.0))(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@22.10.6)(typescript@5.7.3)))(ts-node@10.9.2(@types/node@22.10.6)(typescript@5.7.3)) + version: 5.1.4(astro@5.1.6(@types/node@16.18.123)(jiti@2.4.2)(rollup@4.30.1)(typescript@4.9.4)(yaml@2.7.0))(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@16.18.123)(typescript@4.9.4)))(ts-node@10.9.2(@types/node@16.18.123)(typescript@4.9.4)) '@nanostores/persistent': specifier: ^0.10.2 version: 0.10.2(nanostores@0.11.3) @@ -83,7 +111,7 @@ importers: version: 0.5.0(nanostores@0.11.3)(solid-js@1.9.4) astro: specifier: ^5.1.6 - version: 5.1.6(@types/node@22.10.6)(jiti@2.4.2)(rollup@4.30.1)(typescript@5.7.3)(yaml@2.7.0) + version: 5.1.6(@types/node@16.18.123)(jiti@2.4.2)(rollup@4.30.1)(typescript@4.9.4)(yaml@2.7.0) astro-icon: specifier: ^1.1.5 version: 1.1.5 @@ -98,20 +126,20 @@ importers: version: 1.9.4 tailwindcss: specifier: ^3.4.17 - version: 3.4.17(ts-node@10.9.2(@types/node@22.10.6)(typescript@5.7.3)) + version: 3.4.17(ts-node@10.9.2(@types/node@16.18.123)(typescript@4.9.4)) trailbase: specifier: workspace:* version: link:../../../trailbase-core/js/client devDependencies: '@astrojs/solid-js': specifier: ^5.0.2 - version: 5.0.2(@types/node@22.10.6)(jiti@2.4.2)(solid-devtools@0.30.1(solid-js@1.9.4)(vite@5.4.11(@types/node@22.10.6)))(solid-js@1.9.4)(yaml@2.7.0) + version: 5.0.2(@types/node@16.18.123)(jiti@2.4.2)(solid-devtools@0.30.1(solid-js@1.9.4)(vite@5.4.11(@types/node@16.18.123)))(solid-js@1.9.4)(yaml@2.7.0) '@iconify-json/tabler': specifier: ^1.2.14 version: 1.2.14 '@tailwindcss/typography': specifier: ^0.5.16 - version: 0.5.16(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@22.10.6)(typescript@5.7.3))) + version: 0.5.16(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@16.18.123)(typescript@4.9.4))) '@types/dateformat': specifier: ^5.0.3 version: 5.0.3 @@ -4995,6 +5023,28 @@ snapshots: stream-replace-string: 2.0.0 zod: 3.24.1 + '@astrojs/solid-js@5.0.2(@types/node@16.18.123)(jiti@2.4.2)(solid-devtools@0.30.1(solid-js@1.9.4)(vite@5.4.11(@types/node@16.18.123)))(solid-js@1.9.4)(yaml@2.7.0)': + dependencies: + solid-js: 1.9.4 + vite: 6.0.7(@types/node@16.18.123)(jiti@2.4.2)(yaml@2.7.0) + vite-plugin-solid: 2.11.0(solid-js@1.9.4)(vite@6.0.7(@types/node@16.18.123)(jiti@2.4.2)(yaml@2.7.0)) + optionalDependencies: + solid-devtools: 0.30.1(solid-js@1.9.4)(vite@5.4.11(@types/node@16.18.123)) + transitivePeerDependencies: + - '@testing-library/jest-dom' + - '@types/node' + - jiti + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + '@astrojs/solid-js@5.0.2(@types/node@22.10.6)(jiti@2.4.2)(solid-devtools@0.30.1(solid-js@1.9.4)(vite@5.4.11(@types/node@22.10.6)))(solid-js@1.9.4)(yaml@2.7.0)': dependencies: solid-js: 1.9.4 @@ -5075,6 +5125,16 @@ snapshots: transitivePeerDependencies: - supports-color + '@astrojs/tailwind@5.1.4(astro@5.1.6(@types/node@16.18.123)(jiti@2.4.2)(rollup@4.30.1)(typescript@4.9.4)(yaml@2.7.0))(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@16.18.123)(typescript@4.9.4)))(ts-node@10.9.2(@types/node@16.18.123)(typescript@4.9.4))': + dependencies: + astro: 5.1.6(@types/node@16.18.123)(jiti@2.4.2)(rollup@4.30.1)(typescript@4.9.4)(yaml@2.7.0) + autoprefixer: 10.4.20(postcss@8.5.1) + postcss: 8.5.1 + postcss-load-config: 4.0.2(postcss@8.5.1)(ts-node@10.9.2(@types/node@16.18.123)(typescript@4.9.4)) + tailwindcss: 3.4.17(ts-node@10.9.2(@types/node@16.18.123)(typescript@4.9.4)) + transitivePeerDependencies: + - ts-node + '@astrojs/tailwind@5.1.4(astro@5.1.6(@types/node@22.10.6)(jiti@2.4.2)(rollup@4.30.1)(typescript@5.7.3)(yaml@2.7.0))(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@22.10.6)(typescript@5.7.3)))(ts-node@10.9.2(@types/node@22.10.6)(typescript@5.7.3))': dependencies: astro: 5.1.6(@types/node@22.10.6)(jiti@2.4.2)(rollup@4.30.1)(typescript@5.7.3)(yaml@2.7.0) @@ -6136,6 +6196,14 @@ snapshots: dependencies: tslib: 2.8.1 + '@tailwindcss/typography@0.5.16(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@16.18.123)(typescript@4.9.4)))': + dependencies: + lodash.castarray: 4.4.0 + lodash.isplainobject: 4.0.6 + lodash.merge: 4.6.2 + postcss-selector-parser: 6.0.10 + tailwindcss: 3.4.17(ts-node@10.9.2(@types/node@16.18.123)(typescript@4.9.4)) + '@tailwindcss/typography@0.5.16(tailwindcss@3.4.17(ts-node@10.9.2(@types/node@22.10.6)(typescript@5.7.3)))': dependencies: lodash.castarray: 4.4.0 @@ -6270,7 +6338,7 @@ snapshots: '@types/sax@1.2.7': dependencies: - '@types/node': 17.0.45 + '@types/node': 22.10.6 '@types/tar@6.1.13': dependencies: @@ -6560,6 +6628,103 @@ snapshots: valid-filename: 4.0.0 zod: 3.24.1 + astro@5.1.6(@types/node@16.18.123)(jiti@2.4.2)(rollup@4.30.1)(typescript@4.9.4)(yaml@2.7.0): + dependencies: + '@astrojs/compiler': 2.10.3 + '@astrojs/internal-helpers': 0.4.2 + '@astrojs/markdown-remark': 6.0.1 + '@astrojs/telemetry': 3.2.0 + '@oslojs/encoding': 1.1.0 + '@rollup/pluginutils': 5.1.4(rollup@4.30.1) + '@types/cookie': 0.6.0 + acorn: 8.14.0 + aria-query: 5.3.2 + axobject-query: 4.1.0 + boxen: 8.0.1 + ci-info: 4.1.0 + clsx: 2.1.1 + common-ancestor-path: 1.0.1 + cookie: 0.7.2 + cssesc: 3.0.0 + debug: 4.4.0 + deterministic-object-hash: 2.0.2 + devalue: 5.1.1 + diff: 5.2.0 + dlv: 1.1.3 + dset: 3.1.4 + es-module-lexer: 1.6.0 + esbuild: 0.21.5 + estree-walker: 3.0.3 + fast-glob: 3.3.3 + flattie: 1.1.1 + github-slugger: 2.0.0 + html-escaper: 3.0.3 + http-cache-semantics: 4.1.1 + js-yaml: 4.1.0 + kleur: 4.1.5 + magic-string: 0.30.17 + magicast: 0.3.5 + micromatch: 4.0.8 + mrmime: 2.0.0 + neotraverse: 0.6.18 + p-limit: 6.2.0 + p-queue: 8.0.1 + preferred-pm: 4.0.0 + prompts: 2.4.2 + rehype: 13.0.2 + semver: 7.6.3 + shiki: 1.27.0 + tinyexec: 0.3.2 + tsconfck: 3.1.4(typescript@4.9.4) + ultrahtml: 1.5.3 + unist-util-visit: 5.0.0 + unstorage: 1.14.4 + vfile: 6.0.3 + vite: 6.0.7(@types/node@16.18.123)(jiti@2.4.2)(yaml@2.7.0) + vitefu: 1.0.5(vite@6.0.7(@types/node@16.18.123)(jiti@2.4.2)(yaml@2.7.0)) + which-pm: 3.0.0 + xxhash-wasm: 1.1.0 + yargs-parser: 21.1.1 + yocto-spinner: 0.1.2 + zod: 3.24.1 + zod-to-json-schema: 3.24.1(zod@3.24.1) + zod-to-ts: 1.2.0(typescript@4.9.4)(zod@3.24.1) + optionalDependencies: + sharp: 0.33.5 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@types/node' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - db0 + - idb-keyval + - ioredis + - jiti + - less + - lightningcss + - rollup + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - typescript + - uploadthing + - yaml + astro@5.1.6(@types/node@22.10.6)(jiti@2.4.2)(rollup@4.30.1)(typescript@5.7.3)(yaml@2.7.0): dependencies: '@astrojs/compiler': 2.10.3 @@ -8709,6 +8874,14 @@ snapshots: camelcase-css: 2.0.1 postcss: 8.5.1 + postcss-load-config@4.0.2(postcss@8.5.1)(ts-node@10.9.2(@types/node@16.18.123)(typescript@4.9.4)): + dependencies: + lilconfig: 3.1.3 + yaml: 2.7.0 + optionalDependencies: + postcss: 8.5.1 + ts-node: 10.9.2(@types/node@16.18.123)(typescript@4.9.4) + postcss-load-config@4.0.2(postcss@8.5.1)(ts-node@10.9.2(@types/node@22.10.6)(typescript@5.7.3)): dependencies: lilconfig: 3.1.3 @@ -9209,6 +9382,20 @@ snapshots: arg: 5.0.2 sax: 1.4.1 + solid-devtools@0.30.1(solid-js@1.9.4)(vite@5.4.11(@types/node@16.18.123)): + dependencies: + '@babel/core': 7.26.0 + '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.0) + '@babel/types': 7.26.5 + '@solid-devtools/debugger': 0.23.4(solid-js@1.9.4) + '@solid-devtools/shared': 0.13.2(solid-js@1.9.4) + solid-js: 1.9.4 + optionalDependencies: + vite: 5.4.11(@types/node@16.18.123) + transitivePeerDependencies: + - supports-color + optional: true + solid-devtools@0.30.1(solid-js@1.9.4)(vite@5.4.11(@types/node@22.10.6)): dependencies: '@babel/core': 7.26.0 @@ -9393,6 +9580,33 @@ snapshots: dependencies: tailwindcss: 3.4.17(ts-node@10.9.2(@types/node@22.10.6)(typescript@5.7.3)) + tailwindcss@3.4.17(ts-node@10.9.2(@types/node@16.18.123)(typescript@4.9.4)): + dependencies: + '@alloc/quick-lru': 5.2.0 + arg: 5.0.2 + chokidar: 3.6.0 + didyoumean: 1.2.2 + dlv: 1.1.3 + fast-glob: 3.3.3 + glob-parent: 6.0.2 + is-glob: 4.0.3 + jiti: 1.21.7 + lilconfig: 3.1.3 + micromatch: 4.0.8 + normalize-path: 3.0.0 + object-hash: 3.0.0 + picocolors: 1.1.1 + postcss: 8.5.1 + postcss-import: 15.1.0(postcss@8.5.1) + postcss-js: 4.0.1(postcss@8.5.1) + postcss-load-config: 4.0.2(postcss@8.5.1)(ts-node@10.9.2(@types/node@16.18.123)(typescript@4.9.4)) + postcss-nested: 6.2.0(postcss@8.5.1) + postcss-selector-parser: 6.1.2 + resolve: 1.22.10 + sucrase: 3.35.0 + transitivePeerDependencies: + - ts-node + tailwindcss@3.4.17(ts-node@10.9.2(@types/node@22.10.6)(typescript@5.7.3)): dependencies: '@alloc/quick-lru': 5.2.0 @@ -9532,6 +9746,10 @@ snapshots: ts-poet: 6.9.0 ts-proto-descriptors: 2.0.0 + tsconfck@3.1.4(typescript@4.9.4): + optionalDependencies: + typescript: 4.9.4 + tsconfck@3.1.4(typescript@5.7.3): optionalDependencies: typescript: 5.7.3 @@ -9724,6 +9942,19 @@ snapshots: - supports-color - terser + vite-plugin-solid@2.11.0(solid-js@1.9.4)(vite@6.0.7(@types/node@16.18.123)(jiti@2.4.2)(yaml@2.7.0)): + dependencies: + '@babel/core': 7.26.0 + '@types/babel__core': 7.20.5 + babel-preset-solid: 1.9.3(@babel/core@7.26.0) + merge-anything: 5.1.7 + solid-js: 1.9.4 + solid-refresh: 0.6.3(solid-js@1.9.4) + vite: 6.0.7(@types/node@16.18.123)(jiti@2.4.2)(yaml@2.7.0) + vitefu: 1.0.5(vite@6.0.7(@types/node@16.18.123)(jiti@2.4.2)(yaml@2.7.0)) + transitivePeerDependencies: + - supports-color + vite-plugin-solid@2.11.0(solid-js@1.9.4)(vite@6.0.7(@types/node@22.10.6)(jiti@2.4.2)(yaml@2.7.0)): dependencies: '@babel/core': 7.26.0 @@ -9748,6 +9979,16 @@ snapshots: - supports-color - typescript + vite@5.4.11(@types/node@16.18.123): + dependencies: + esbuild: 0.21.5 + postcss: 8.5.1 + rollup: 4.30.1 + optionalDependencies: + '@types/node': 16.18.123 + fsevents: 2.3.3 + optional: true + vite@5.4.11(@types/node@22.10.6): dependencies: esbuild: 0.21.5 @@ -9757,6 +9998,17 @@ snapshots: '@types/node': 22.10.6 fsevents: 2.3.3 + vite@6.0.7(@types/node@16.18.123)(jiti@2.4.2)(yaml@2.7.0): + dependencies: + esbuild: 0.24.2 + postcss: 8.5.1 + rollup: 4.30.1 + optionalDependencies: + '@types/node': 16.18.123 + fsevents: 2.3.3 + jiti: 2.4.2 + yaml: 2.7.0 + vite@6.0.7(@types/node@22.10.6)(jiti@2.4.2)(yaml@2.7.0): dependencies: esbuild: 0.24.2 @@ -9768,6 +10020,10 @@ snapshots: jiti: 2.4.2 yaml: 2.7.0 + vitefu@1.0.5(vite@6.0.7(@types/node@16.18.123)(jiti@2.4.2)(yaml@2.7.0)): + optionalDependencies: + vite: 6.0.7(@types/node@16.18.123)(jiti@2.4.2)(yaml@2.7.0) + vitefu@1.0.5(vite@6.0.7(@types/node@22.10.6)(jiti@2.4.2)(yaml@2.7.0)): optionalDependencies: vite: 6.0.7(@types/node@22.10.6)(jiti@2.4.2)(yaml@2.7.0) @@ -10061,6 +10317,11 @@ snapshots: dependencies: zod: 3.24.1 + zod-to-ts@1.2.0(typescript@4.9.4)(zod@3.24.1): + dependencies: + typescript: 4.9.4 + zod: 3.24.1 + zod-to-ts@1.2.0(typescript@5.7.3)(zod@3.24.1): dependencies: typescript: 5.7.3 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 9fd2569..5fe6611 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,6 @@ packages: - 'docs' + - 'docs/examples/record_api_ts' - 'trailbase-core/js/admin' - 'trailbase-core/js/auth' - 'trailbase-core/js/client'