chore: drop unused TanStack Vue Query and ts-rest client
Some checks failed
CI / verify (push) Failing after 1m2s
Some checks failed
CI / verify (push) Failing after 1m2s
VueQueryPlugin was mounted but no useQuery/useMutation calls existed, and the noteRouter ts-rest contract was never imported. The callers of api.remanso.space all use plain fetch(), so the three packages (@tanstack/vue-query, @ts-rest/core, @ts-rest/vue-query) and the src/modules/post directory can go.
This commit is contained in:
@@ -25,7 +25,7 @@ Run a single test file: `pnpm test src/modules/repo/services/resolvePath.spec.ts
|
|||||||
- **Vue 3** (3.5) with Composition API, **Pinia** for state, **Vue Router**
|
- **Vue 3** (3.5) with Composition API, **Pinia** for state, **Vue Router**
|
||||||
- **Vite 7** build tool, **TypeScript** strict mode
|
- **Vite 7** build tool, **TypeScript** strict mode
|
||||||
- **Tailwind CSS v4** + **DaisyUI v5** for styling (PostCSS plugin approach, not tailwind.config.js)
|
- **Tailwind CSS v4** + **DaisyUI v5** for styling (PostCSS plugin approach, not tailwind.config.js)
|
||||||
- **TanStack Vue Query** + **ts-rest** + **arktype** for typed API contracts
|
- **arktype** for runtime type validation (used by the ATProto module)
|
||||||
- **PouchDB** (IndexedDB) for local persistence
|
- **PouchDB** (IndexedDB) for local persistence
|
||||||
- **Octokit** for GitHub API integration
|
- **Octokit** for GitHub API integration
|
||||||
- **markdown-it** with plugins (KaTeX, Shikiji, Mermaid, checkboxes, GitHub alerts)
|
- **markdown-it** with plugins (KaTeX, Shikiji, Mermaid, checkboxes, GitHub alerts)
|
||||||
@@ -50,8 +50,7 @@ src/
|
|||||||
│ ├── user/ # Authentication, user settings
|
│ ├── user/ # Authentication, user settings
|
||||||
│ ├── card/ # Spaced repetition
|
│ ├── card/ # Spaced repetition
|
||||||
│ ├── history/ # Edit history tracking
|
│ ├── history/ # Edit history tracking
|
||||||
│ ├── atproto/ # ATProto/Bluesky integration (DID resolution, blob URLs)
|
│ └── atproto/ # ATProto/Bluesky integration (DID resolution, blob URLs)
|
||||||
│ └── post/ # ts-rest API client for public note publishing (api.remanso.space)
|
|
||||||
├── hooks/ # Composition hooks (useMarkdown, useBacklinks, useGitHubContent, etc.)
|
├── hooks/ # Composition hooks (useMarkdown, useBacklinks, useGitHubContent, etc.)
|
||||||
├── data/ # PouchDB wrapper and data models
|
├── data/ # PouchDB wrapper and data models
|
||||||
├── utils/ # Utilities including custom markdown-it plugins
|
├── utils/ # Utilities including custom markdown-it plugins
|
||||||
@@ -73,7 +72,6 @@ src/
|
|||||||
- `src/modules/repo/store/userRepo.store.ts` - Central Pinia store for repo/file state
|
- `src/modules/repo/store/userRepo.store.ts` - Central Pinia store for repo/file state
|
||||||
- `src/modules/repo/services/octo.ts` - Octokit wrapper for GitHub API
|
- `src/modules/repo/services/octo.ts` - Octokit wrapper for GitHub API
|
||||||
- `src/hooks/useMarkdown.hook.ts` - Markdown rendering with all plugins
|
- `src/hooks/useMarkdown.hook.ts` - Markdown rendering with all plugins
|
||||||
- `src/modules/post/data/client.ts` - ts-rest API contract definitions with arktype validation
|
|
||||||
- `src/data/data.ts` - PouchDB database wrapper
|
- `src/data/data.ts` - PouchDB database wrapper
|
||||||
|
|
||||||
### Patterns
|
### Patterns
|
||||||
@@ -81,5 +79,4 @@ src/
|
|||||||
- All components use Composition API (`<script setup lang="ts">`)
|
- All components use Composition API (`<script setup lang="ts">`)
|
||||||
- Custom hooks encapsulate feature logic (`use*.hook.ts` or `use*.ts`)
|
- Custom hooks encapsulate feature logic (`use*.hook.ts` or `use*.ts`)
|
||||||
- Event buses (`noteEventBus`, `backlinkEventBus`) for cross-component communication
|
- Event buses (`noteEventBus`, `backlinkEventBus`) for cross-component communication
|
||||||
- ts-rest contracts use arktype schemas for request/response validation
|
|
||||||
- Path alias: `@` maps to `src/`
|
- Path alias: `@` maps to `src/`
|
||||||
|
|||||||
@@ -26,10 +26,7 @@
|
|||||||
"@octokit/rest": "^22.0.1",
|
"@octokit/rest": "^22.0.1",
|
||||||
"@openpanel/web": "^1.3.0",
|
"@openpanel/web": "^1.3.0",
|
||||||
"@tailwindcss/postcss": "^4.1.16",
|
"@tailwindcss/postcss": "^4.1.16",
|
||||||
"@tanstack/vue-query": "^5.92.9",
|
|
||||||
"@toycode/markdown-it-class": "^1.2.4",
|
"@toycode/markdown-it-class": "^1.2.4",
|
||||||
"@ts-rest/core": "^3.52.1",
|
|
||||||
"@ts-rest/vue-query": "^3.52.1",
|
|
||||||
"@vscode/markdown-it-katex": "^1.1.2",
|
"@vscode/markdown-it-katex": "^1.1.2",
|
||||||
"@vueuse/components": "^14.2.1",
|
"@vueuse/components": "^14.2.1",
|
||||||
"@vueuse/core": "^13.6.0",
|
"@vueuse/core": "^13.6.0",
|
||||||
|
|||||||
88
pnpm-lock.yaml
generated
88
pnpm-lock.yaml
generated
@@ -35,18 +35,9 @@ importers:
|
|||||||
'@tailwindcss/postcss':
|
'@tailwindcss/postcss':
|
||||||
specifier: ^4.1.16
|
specifier: ^4.1.16
|
||||||
version: 4.1.16
|
version: 4.1.16
|
||||||
'@tanstack/vue-query':
|
|
||||||
specifier: ^5.92.9
|
|
||||||
version: 5.92.9(vue@3.5.18(typescript@5.9.3))
|
|
||||||
'@toycode/markdown-it-class':
|
'@toycode/markdown-it-class':
|
||||||
specifier: ^1.2.4
|
specifier: ^1.2.4
|
||||||
version: 1.2.4
|
version: 1.2.4
|
||||||
'@ts-rest/core':
|
|
||||||
specifier: ^3.52.1
|
|
||||||
version: 3.52.1(@types/node@22.15.24)(zod@3.25.76)
|
|
||||||
'@ts-rest/vue-query':
|
|
||||||
specifier: ^3.52.1
|
|
||||||
version: 3.52.1(@tanstack/vue-query@5.92.9(vue@3.5.18(typescript@5.9.3)))(@ts-rest/core@3.52.1(@types/node@22.15.24)(zod@3.25.76))(zod@3.25.76)
|
|
||||||
'@vscode/markdown-it-katex':
|
'@vscode/markdown-it-katex':
|
||||||
specifier: ^1.1.2
|
specifier: ^1.1.2
|
||||||
version: 1.1.2
|
version: 1.1.2
|
||||||
@@ -2218,46 +2209,9 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
tailwindcss: '>=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1'
|
tailwindcss: '>=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1'
|
||||||
|
|
||||||
'@tanstack/match-sorter-utils@8.19.4':
|
|
||||||
resolution: {integrity: sha512-Wo1iKt2b9OT7d+YGhvEPD3DXvPv2etTusIMhMUoG7fbhmxcXCtIjJDEygy91Y2JFlwGyjqiBPRozme7UD8hoqg==}
|
|
||||||
engines: {node: '>=12'}
|
|
||||||
|
|
||||||
'@tanstack/query-core@5.90.20':
|
|
||||||
resolution: {integrity: sha512-OMD2HLpNouXEfZJWcKeVKUgQ5n+n3A2JFmBaScpNDUqSrQSjiveC7dKMe53uJUg1nDG16ttFPz2xfilz6i2uVg==}
|
|
||||||
|
|
||||||
'@tanstack/vue-query@5.92.9':
|
|
||||||
resolution: {integrity: sha512-jjAZcqKveyX0C4w/6zUqbnqk/XzuxNWaFsWjGTJWULVFizUNeLGME2gf9vVSDclIyiBhR13oZJPPs6fJgfpIJQ==}
|
|
||||||
peerDependencies:
|
|
||||||
'@vue/composition-api': ^1.1.2
|
|
||||||
vue: ^2.6.0 || ^3.3.0
|
|
||||||
peerDependenciesMeta:
|
|
||||||
'@vue/composition-api':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@toycode/markdown-it-class@1.2.4':
|
'@toycode/markdown-it-class@1.2.4':
|
||||||
resolution: {integrity: sha512-hA4gHBK8moObkOYdWTjhy1wYcYy0MJeM3JjSKbsXHRpRMvIKhk6Jm+t3bXsSScTdz/byWqQbs8YIwVYjHp+SlQ==}
|
resolution: {integrity: sha512-hA4gHBK8moObkOYdWTjhy1wYcYy0MJeM3JjSKbsXHRpRMvIKhk6Jm+t3bXsSScTdz/byWqQbs8YIwVYjHp+SlQ==}
|
||||||
|
|
||||||
'@ts-rest/core@3.52.1':
|
|
||||||
resolution: {integrity: sha512-tAjz7Kxq/grJodcTA1Anop4AVRDlD40fkksEV5Mmal88VoZeRKAG8oMHsDwdwPZz+B/zgnz0q2sF+cm5M7Bc7g==}
|
|
||||||
peerDependencies:
|
|
||||||
'@types/node': ^18.18.7 || >=20.8.4
|
|
||||||
zod: ^3.22.3
|
|
||||||
peerDependenciesMeta:
|
|
||||||
'@types/node':
|
|
||||||
optional: true
|
|
||||||
zod:
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@ts-rest/vue-query@3.52.1':
|
|
||||||
resolution: {integrity: sha512-89u7aS9LGDC7uNUC5CagWX1EB7vTwyXohYcizLi1D9v7MD/Cnu5OTQNf8SY3PuAK62RcFJXB2XZGsMAPC0svNw==}
|
|
||||||
peerDependencies:
|
|
||||||
'@tanstack/vue-query': ^4.0.0
|
|
||||||
'@ts-rest/core': ~3.52.0
|
|
||||||
zod: ^3.22.3
|
|
||||||
peerDependenciesMeta:
|
|
||||||
zod:
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@tybys/wasm-util@0.10.1':
|
'@tybys/wasm-util@0.10.1':
|
||||||
resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==}
|
resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==}
|
||||||
|
|
||||||
@@ -4027,7 +3981,7 @@ packages:
|
|||||||
|
|
||||||
glob@7.2.3:
|
glob@7.2.3:
|
||||||
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
|
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
|
||||||
deprecated: Glob versions prior to v9 are no longer supported
|
deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
|
||||||
|
|
||||||
globals@13.20.0:
|
globals@13.20.0:
|
||||||
resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==}
|
resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==}
|
||||||
@@ -5032,7 +4986,7 @@ packages:
|
|||||||
|
|
||||||
markdown-it-shikiji@0.10.2:
|
markdown-it-shikiji@0.10.2:
|
||||||
resolution: {integrity: sha512-Y2Zfp6GblTuGBlirnBms2xS6+C3iFiUzCsVp+nZaMWavBcS9ZFxEglWdSpfjt4gqWlQunWmIEX1OUt9WaqFNvw==}
|
resolution: {integrity: sha512-Y2Zfp6GblTuGBlirnBms2xS6+C3iFiUzCsVp+nZaMWavBcS9ZFxEglWdSpfjt4gqWlQunWmIEX1OUt9WaqFNvw==}
|
||||||
deprecated: Shikiji is merged back to Shiki v1.0, please migrate over to get the latest updates
|
deprecated: Deprecated, use @shikijs/markdown-it instead
|
||||||
|
|
||||||
markdown-it@14.1.0:
|
markdown-it@14.1.0:
|
||||||
resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==}
|
resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==}
|
||||||
@@ -5704,9 +5658,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==}
|
resolution: {integrity: sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
remove-accents@0.5.0:
|
|
||||||
resolution: {integrity: sha512-8g3/Otx1eJaVD12e31UbJj1YzdtVvzH85HV7t+9MJYk/u3XmkOUJ5Ys9wQrf9PCPK8+xn4ymzqYCiZl6QWKn+A==}
|
|
||||||
|
|
||||||
remove-trailing-separator@1.1.0:
|
remove-trailing-separator@1.1.0:
|
||||||
resolution: {integrity: sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==}
|
resolution: {integrity: sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==}
|
||||||
|
|
||||||
@@ -5932,10 +5883,11 @@ packages:
|
|||||||
|
|
||||||
shikiji-transformers@0.10.2:
|
shikiji-transformers@0.10.2:
|
||||||
resolution: {integrity: sha512-7IVTwl1af205ywYEq5bOAYOTOFW4V1dVX1EablP0nWKErqZeD1o93VMytxmtJomqS+YwbB8doY8SE3MFMn0aPQ==}
|
resolution: {integrity: sha512-7IVTwl1af205ywYEq5bOAYOTOFW4V1dVX1EablP0nWKErqZeD1o93VMytxmtJomqS+YwbB8doY8SE3MFMn0aPQ==}
|
||||||
|
deprecated: Deprecated, use @shikijs/transformers instead
|
||||||
|
|
||||||
shikiji@0.10.2:
|
shikiji@0.10.2:
|
||||||
resolution: {integrity: sha512-wtZg3T0vtYV2PnqusWQs3mDaJBdCPWxFDrBM/SE5LfrX92gjUvfEMlc+vJnoKY6Z/S44OWaCRzNIsdBRWcTAiw==}
|
resolution: {integrity: sha512-wtZg3T0vtYV2PnqusWQs3mDaJBdCPWxFDrBM/SE5LfrX92gjUvfEMlc+vJnoKY6Z/S44OWaCRzNIsdBRWcTAiw==}
|
||||||
deprecated: Shikiji is merged back to Shiki v1.0, please migrate over to get the latest updates
|
deprecated: Deprecated, use shiki instead
|
||||||
|
|
||||||
side-channel-list@1.0.0:
|
side-channel-list@1.0.0:
|
||||||
resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==}
|
resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==}
|
||||||
@@ -6482,11 +6434,12 @@ packages:
|
|||||||
|
|
||||||
uuid@3.4.0:
|
uuid@3.4.0:
|
||||||
resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==}
|
resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==}
|
||||||
deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
|
deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
uuid@8.3.2:
|
uuid@8.3.2:
|
||||||
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
|
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
|
||||||
|
deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
validate-npm-package-license@3.0.4:
|
validate-npm-package-license@3.0.4:
|
||||||
@@ -6661,6 +6614,7 @@ packages:
|
|||||||
vue-i18n@11.1.11:
|
vue-i18n@11.1.11:
|
||||||
resolution: {integrity: sha512-LvyteQoXeQiuILbzqv13LbyBna/TEv2Ha+4ZWK2AwGHUzZ8+IBaZS0TJkCgn5izSPLcgZwXy9yyTrewCb2u/MA==}
|
resolution: {integrity: sha512-LvyteQoXeQiuILbzqv13LbyBna/TEv2Ha+4ZWK2AwGHUzZ8+IBaZS0TJkCgn5izSPLcgZwXy9yyTrewCb2u/MA==}
|
||||||
engines: {node: '>= 16'}
|
engines: {node: '>= 16'}
|
||||||
|
deprecated: This version is NOT deprecated. Previous deprecation was a mistake.
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
vue: ^3.0.0
|
vue: ^3.0.0
|
||||||
|
|
||||||
@@ -8747,34 +8701,8 @@ snapshots:
|
|||||||
postcss-selector-parser: 6.0.10
|
postcss-selector-parser: 6.0.10
|
||||||
tailwindcss: 4.2.2
|
tailwindcss: 4.2.2
|
||||||
|
|
||||||
'@tanstack/match-sorter-utils@8.19.4':
|
|
||||||
dependencies:
|
|
||||||
remove-accents: 0.5.0
|
|
||||||
|
|
||||||
'@tanstack/query-core@5.90.20': {}
|
|
||||||
|
|
||||||
'@tanstack/vue-query@5.92.9(vue@3.5.18(typescript@5.9.3))':
|
|
||||||
dependencies:
|
|
||||||
'@tanstack/match-sorter-utils': 8.19.4
|
|
||||||
'@tanstack/query-core': 5.90.20
|
|
||||||
'@vue/devtools-api': 6.6.4
|
|
||||||
vue: 3.5.18(typescript@5.9.3)
|
|
||||||
vue-demi: 0.14.10(vue@3.5.18(typescript@5.9.3))
|
|
||||||
|
|
||||||
'@toycode/markdown-it-class@1.2.4': {}
|
'@toycode/markdown-it-class@1.2.4': {}
|
||||||
|
|
||||||
'@ts-rest/core@3.52.1(@types/node@22.15.24)(zod@3.25.76)':
|
|
||||||
optionalDependencies:
|
|
||||||
'@types/node': 22.15.24
|
|
||||||
zod: 3.25.76
|
|
||||||
|
|
||||||
'@ts-rest/vue-query@3.52.1(@tanstack/vue-query@5.92.9(vue@3.5.18(typescript@5.9.3)))(@ts-rest/core@3.52.1(@types/node@22.15.24)(zod@3.25.76))(zod@3.25.76)':
|
|
||||||
dependencies:
|
|
||||||
'@tanstack/vue-query': 5.92.9(vue@3.5.18(typescript@5.9.3))
|
|
||||||
'@ts-rest/core': 3.52.1(@types/node@22.15.24)(zod@3.25.76)
|
|
||||||
optionalDependencies:
|
|
||||||
zod: 3.25.76
|
|
||||||
|
|
||||||
'@tybys/wasm-util@0.10.1':
|
'@tybys/wasm-util@0.10.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
tslib: 2.8.1
|
tslib: 2.8.1
|
||||||
@@ -12704,8 +12632,6 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
jsesc: 3.1.0
|
jsesc: 3.1.0
|
||||||
|
|
||||||
remove-accents@0.5.0: {}
|
|
||||||
|
|
||||||
remove-trailing-separator@1.1.0: {}
|
remove-trailing-separator@1.1.0: {}
|
||||||
|
|
||||||
repeat-element@1.1.4: {}
|
repeat-element@1.1.4: {}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import "notyf/notyf.min.css"
|
|||||||
import "./styles/app.css"
|
import "./styles/app.css"
|
||||||
import "@/analytics/openpanel"
|
import "@/analytics/openpanel"
|
||||||
|
|
||||||
import { VueQueryPlugin } from "@tanstack/vue-query"
|
|
||||||
import { createPinia } from "pinia"
|
import { createPinia } from "pinia"
|
||||||
import { createApp } from "vue"
|
import { createApp } from "vue"
|
||||||
import { createI18n } from "vue-i18n"
|
import { createI18n } from "vue-i18n"
|
||||||
@@ -19,7 +18,6 @@ const i18n = createI18n({
|
|||||||
|
|
||||||
createApp(App)
|
createApp(App)
|
||||||
.use(router)
|
.use(router)
|
||||||
.use(VueQueryPlugin)
|
|
||||||
.use(i18n)
|
.use(i18n)
|
||||||
.use(createPinia())
|
.use(createPinia())
|
||||||
.mount("#app")
|
.mount("#app")
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
import { initContract } from "@ts-rest/core"
|
|
||||||
import { initQueryClient } from "@ts-rest/vue-query"
|
|
||||||
import { type } from "arktype"
|
|
||||||
|
|
||||||
const PublicNoteListItem = type({
|
|
||||||
did: "string",
|
|
||||||
rkey: "string",
|
|
||||||
title: "string",
|
|
||||||
publishedAt: "string",
|
|
||||||
createdAt: "string"
|
|
||||||
})
|
|
||||||
|
|
||||||
export type PublicNoteListItem = typeof PublicNoteListItem.infer
|
|
||||||
|
|
||||||
const PublicNote = type({
|
|
||||||
did: "string",
|
|
||||||
rkey: "string",
|
|
||||||
title: "string",
|
|
||||||
content: "string",
|
|
||||||
publishedAt: "string",
|
|
||||||
createdAt: "string"
|
|
||||||
})
|
|
||||||
|
|
||||||
export type PublicNote = typeof PublicNote.infer
|
|
||||||
|
|
||||||
const contract = initContract()
|
|
||||||
|
|
||||||
export const noteRouter = contract.router({
|
|
||||||
noteLists: {
|
|
||||||
method: "GET",
|
|
||||||
path: "/notes",
|
|
||||||
query: contract.type<{ cursor?: string; limit?: number }>(),
|
|
||||||
responses: {
|
|
||||||
200: contract.type<{ notes: PublicNoteListItem[] }>()
|
|
||||||
},
|
|
||||||
summary: "List all notes"
|
|
||||||
},
|
|
||||||
noteListsByDid: {
|
|
||||||
method: "GET",
|
|
||||||
path: "/:did/notes",
|
|
||||||
pathParams: contract.type<{ did: string }>(),
|
|
||||||
query: contract.type<{ cursor?: string; limit?: number }>(),
|
|
||||||
responses: {
|
|
||||||
200: contract.type<{ notes: PublicNoteListItem[] }>()
|
|
||||||
},
|
|
||||||
summary: "List all notes"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
export const client = initQueryClient(noteRouter, {
|
|
||||||
baseUrl: "https://api.remanso.space"
|
|
||||||
})
|
|
||||||
Reference in New Issue
Block a user