Compare commits
3 Commits
c4e6232462
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 3282d3ab17 | |||
| 9055c9ba6f | |||
| 83081b47d9 |
@@ -13,9 +13,11 @@
|
|||||||
"@tanstack/react-router-devtools": "^1.114.29",
|
"@tanstack/react-router-devtools": "^1.114.29",
|
||||||
"@tanstack/react-start": "^1.114.30",
|
"@tanstack/react-start": "^1.114.30",
|
||||||
"@tanstack/router-plugin": "^1.114.30",
|
"@tanstack/router-plugin": "^1.114.30",
|
||||||
|
"lowdb": "^7.0.1",
|
||||||
"match-sorter": "^8.0.0",
|
"match-sorter": "^8.0.0",
|
||||||
"react": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.0",
|
||||||
|
"server-only": "^0.0.1",
|
||||||
"sort-by": "^1.2.0",
|
"sort-by": "^1.2.0",
|
||||||
"tiny-invariant": "^1.3.3",
|
"tiny-invariant": "^1.3.3",
|
||||||
"vinxi": "^0.5.3"
|
"vinxi": "^0.5.3"
|
||||||
@@ -25,6 +27,7 @@
|
|||||||
"@tanstack/eslint-plugin-router": "^1.114.29",
|
"@tanstack/eslint-plugin-router": "^1.114.29",
|
||||||
"@testing-library/dom": "^10.4.0",
|
"@testing-library/dom": "^10.4.0",
|
||||||
"@testing-library/react": "^16.2.0",
|
"@testing-library/react": "^16.2.0",
|
||||||
|
"@types/node": "^22.13.17",
|
||||||
"@types/react": "^19.0.12",
|
"@types/react": "^19.0.12",
|
||||||
"@types/react-dom": "^19.0.4",
|
"@types/react-dom": "^19.0.4",
|
||||||
"@vitejs/plugin-react": "^4.3.4",
|
"@vitejs/plugin-react": "^4.3.4",
|
||||||
|
|||||||
161
pnpm-lock.yaml
generated
161
pnpm-lock.yaml
generated
@@ -16,10 +16,13 @@ importers:
|
|||||||
version: 1.114.29(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(@tanstack/router-core@1.114.29)(csstype@3.1.3)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(tiny-invariant@1.3.3)
|
version: 1.114.29(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(@tanstack/router-core@1.114.29)(csstype@3.1.3)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(tiny-invariant@1.3.3)
|
||||||
'@tanstack/react-start':
|
'@tanstack/react-start':
|
||||||
specifier: ^1.114.30
|
specifier: ^1.114.30
|
||||||
version: 1.114.30(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(terser@5.39.0)(tsx@4.19.3)(vite@6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))
|
version: 1.114.30(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(@types/node@22.13.17)(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(terser@5.39.0)(tsx@4.19.3)(vite@6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))
|
||||||
'@tanstack/router-plugin':
|
'@tanstack/router-plugin':
|
||||||
specifier: ^1.114.30
|
specifier: ^1.114.30
|
||||||
version: 1.114.30(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(vite@6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))
|
version: 1.114.30(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(vite@6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))
|
||||||
|
lowdb:
|
||||||
|
specifier: ^7.0.1
|
||||||
|
version: 7.0.1
|
||||||
match-sorter:
|
match-sorter:
|
||||||
specifier: ^8.0.0
|
specifier: ^8.0.0
|
||||||
version: 8.0.0
|
version: 8.0.0
|
||||||
@@ -29,6 +32,9 @@ importers:
|
|||||||
react-dom:
|
react-dom:
|
||||||
specifier: ^19.1.0
|
specifier: ^19.1.0
|
||||||
version: 19.1.0(react@19.1.0)
|
version: 19.1.0(react@19.1.0)
|
||||||
|
server-only:
|
||||||
|
specifier: ^0.0.1
|
||||||
|
version: 0.0.1
|
||||||
sort-by:
|
sort-by:
|
||||||
specifier: ^1.2.0
|
specifier: ^1.2.0
|
||||||
version: 1.2.0
|
version: 1.2.0
|
||||||
@@ -37,7 +43,7 @@ importers:
|
|||||||
version: 1.3.3
|
version: 1.3.3
|
||||||
vinxi:
|
vinxi:
|
||||||
specifier: ^0.5.3
|
specifier: ^0.5.3
|
||||||
version: 0.5.3(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
version: 0.5.3(@types/node@22.13.17)(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@eslint/js':
|
'@eslint/js':
|
||||||
specifier: ^9.23.0
|
specifier: ^9.23.0
|
||||||
@@ -51,6 +57,9 @@ importers:
|
|||||||
'@testing-library/react':
|
'@testing-library/react':
|
||||||
specifier: ^16.2.0
|
specifier: ^16.2.0
|
||||||
version: 16.2.0(@testing-library/dom@10.4.0)(@types/react-dom@19.0.4(@types/react@19.0.12))(@types/react@19.0.12)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
version: 16.2.0(@testing-library/dom@10.4.0)(@types/react-dom@19.0.4(@types/react@19.0.12))(@types/react@19.0.12)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||||
|
'@types/node':
|
||||||
|
specifier: ^22.13.17
|
||||||
|
version: 22.13.17
|
||||||
'@types/react':
|
'@types/react':
|
||||||
specifier: ^19.0.12
|
specifier: ^19.0.12
|
||||||
version: 19.0.12
|
version: 19.0.12
|
||||||
@@ -59,7 +68,7 @@ importers:
|
|||||||
version: 19.0.4(@types/react@19.0.12)
|
version: 19.0.4(@types/react@19.0.12)
|
||||||
'@vitejs/plugin-react':
|
'@vitejs/plugin-react':
|
||||||
specifier: ^4.3.4
|
specifier: ^4.3.4
|
||||||
version: 4.3.4(vite@6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))
|
version: 4.3.4(vite@6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))
|
||||||
eslint:
|
eslint:
|
||||||
specifier: ^9.23.0
|
specifier: ^9.23.0
|
||||||
version: 9.23.0(jiti@2.4.2)
|
version: 9.23.0(jiti@2.4.2)
|
||||||
@@ -80,13 +89,13 @@ importers:
|
|||||||
version: 8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)
|
version: 8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)
|
||||||
vite:
|
vite:
|
||||||
specifier: ^6.2.4
|
specifier: ^6.2.4
|
||||||
version: 6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
version: 6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
vite-tsconfig-paths:
|
vite-tsconfig-paths:
|
||||||
specifier: ^5.1.4
|
specifier: ^5.1.4
|
||||||
version: 5.1.4(typescript@5.8.2)(vite@6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))
|
version: 5.1.4(typescript@5.8.2)(vite@6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))
|
||||||
vitest:
|
vitest:
|
||||||
specifier: ^3.1.1
|
specifier: ^3.1.1
|
||||||
version: 3.1.1(jiti@2.4.2)(jsdom@26.0.0)(terser@5.39.0)(tsx@4.19.3)
|
version: 3.1.1(@types/node@22.13.17)(jiti@2.4.2)(jsdom@26.0.0)(terser@5.39.0)(tsx@4.19.3)
|
||||||
web-vitals:
|
web-vitals:
|
||||||
specifier: ^4.2.4
|
specifier: ^4.2.4
|
||||||
version: 4.2.4
|
version: 4.2.4
|
||||||
@@ -1289,6 +1298,9 @@ packages:
|
|||||||
'@types/micromatch@4.0.9':
|
'@types/micromatch@4.0.9':
|
||||||
resolution: {integrity: sha512-7V+8ncr22h4UoYRLnLXSpTxjQrNUXtWHGeMPRJt1nULXI57G9bIcpyrHlmrQ7QK24EyyuXvYcSSWAM8GA9nqCg==}
|
resolution: {integrity: sha512-7V+8ncr22h4UoYRLnLXSpTxjQrNUXtWHGeMPRJt1nULXI57G9bIcpyrHlmrQ7QK24EyyuXvYcSSWAM8GA9nqCg==}
|
||||||
|
|
||||||
|
'@types/node@22.13.17':
|
||||||
|
resolution: {integrity: sha512-nAJuQXoyPj04uLgu+obZcSmsfOenUg6DxPKogeUy6yNCFwWaj5sBF8/G/pNo8EtBJjAfSVgfIlugR/BCOleO+g==}
|
||||||
|
|
||||||
'@types/react-dom@19.0.4':
|
'@types/react-dom@19.0.4':
|
||||||
resolution: {integrity: sha512-4fSQ8vWFkg+TGhePfUzVmat3eC14TXYSsiiDSLI0dVLsrm9gZFABjPy/Qu6TKgl1tq1Bu1yDsuQgY3A3DOjCcg==}
|
resolution: {integrity: sha512-4fSQ8vWFkg+TGhePfUzVmat3eC14TXYSsiiDSLI0dVLsrm9gZFABjPy/Qu6TKgl1tq1Bu1yDsuQgY3A3DOjCcg==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -2622,6 +2634,10 @@ packages:
|
|||||||
loupe@3.1.3:
|
loupe@3.1.3:
|
||||||
resolution: {integrity: sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==}
|
resolution: {integrity: sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==}
|
||||||
|
|
||||||
|
lowdb@7.0.1:
|
||||||
|
resolution: {integrity: sha512-neJAj8GwF0e8EpycYIDFqEPcx9Qz4GUho20jWFR7YiFeXzF1YMLdxB36PypcTSPMA+4+LvgyMacYhlr18Zlymw==}
|
||||||
|
engines: {node: '>=18'}
|
||||||
|
|
||||||
lru-cache@10.4.3:
|
lru-cache@10.4.3:
|
||||||
resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
|
resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
|
||||||
|
|
||||||
@@ -3159,6 +3175,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==}
|
resolution: {integrity: sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==}
|
||||||
engines: {node: '>= 0.8.0'}
|
engines: {node: '>= 0.8.0'}
|
||||||
|
|
||||||
|
server-only@0.0.1:
|
||||||
|
resolution: {integrity: sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==}
|
||||||
|
|
||||||
set-function-length@1.2.2:
|
set-function-length@1.2.2:
|
||||||
resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==}
|
resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
@@ -3246,6 +3265,10 @@ packages:
|
|||||||
std-env@3.8.1:
|
std-env@3.8.1:
|
||||||
resolution: {integrity: sha512-vj5lIj3Mwf9D79hBkltk5qmkFI+biIKWS2IBxEyEU3AX1tUf7AoL8nSazCOiiqQsGKIq01SClsKEzweu34uwvA==}
|
resolution: {integrity: sha512-vj5lIj3Mwf9D79hBkltk5qmkFI+biIKWS2IBxEyEU3AX1tUf7AoL8nSazCOiiqQsGKIq01SClsKEzweu34uwvA==}
|
||||||
|
|
||||||
|
steno@4.0.2:
|
||||||
|
resolution: {integrity: sha512-yhPIQXjrlt1xv7dyPQg2P17URmXbuM5pdGkpiMB3RenprfiBlvK415Lctfe0eshk90oA7/tNq7WEiMK8RSP39A==}
|
||||||
|
engines: {node: '>=18'}
|
||||||
|
|
||||||
streamx@2.22.0:
|
streamx@2.22.0:
|
||||||
resolution: {integrity: sha512-sLh1evHOzBy/iWRiR6d1zRcLao4gGZr3C1kzNz4fopCOKJb6xD9ub8Mpi9Mr1R6id5o43S+d93fI48UC5uM9aw==}
|
resolution: {integrity: sha512-sLh1evHOzBy/iWRiR6d1zRcLao4gGZr3C1kzNz4fopCOKJb6xD9ub8Mpi9Mr1R6id5o43S+d93fI48UC5uM9aw==}
|
||||||
|
|
||||||
@@ -3469,6 +3492,9 @@ packages:
|
|||||||
undici-types@5.28.4:
|
undici-types@5.28.4:
|
||||||
resolution: {integrity: sha512-3OeMF5Lyowe8VW0skf5qaIE7Or3yS9LS7fvMUI0gg4YxpIBVg0L8BxCmROw2CcYhSkpR68Epz7CGc8MPj94Uww==}
|
resolution: {integrity: sha512-3OeMF5Lyowe8VW0skf5qaIE7Or3yS9LS7fvMUI0gg4YxpIBVg0L8BxCmROw2CcYhSkpR68Epz7CGc8MPj94Uww==}
|
||||||
|
|
||||||
|
undici-types@6.20.0:
|
||||||
|
resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==}
|
||||||
|
|
||||||
unenv@1.10.0:
|
unenv@1.10.0:
|
||||||
resolution: {integrity: sha512-wY5bskBQFL9n3Eca5XnhH6KbUo/tfvkwm9OpcdCvLaeA7piBNbavbOKJySEwQ1V0RH6HvNlSAFRTpvTqgKRQXQ==}
|
resolution: {integrity: sha512-wY5bskBQFL9n3Eca5XnhH6KbUo/tfvkwm9OpcdCvLaeA7piBNbavbOKJySEwQ1V0RH6HvNlSAFRTpvTqgKRQXQ==}
|
||||||
|
|
||||||
@@ -4574,7 +4600,7 @@ snapshots:
|
|||||||
|
|
||||||
'@speed-highlight/core@1.2.7': {}
|
'@speed-highlight/core@1.2.7': {}
|
||||||
|
|
||||||
'@tanstack/directive-functions-plugin@1.114.30(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)':
|
'@tanstack/directive-functions-plugin@1.114.30(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/code-frame': 7.26.2
|
'@babel/code-frame': 7.26.2
|
||||||
'@babel/core': 7.26.10
|
'@babel/core': 7.26.10
|
||||||
@@ -4587,7 +4613,7 @@ snapshots:
|
|||||||
babel-dead-code-elimination: 1.0.10
|
babel-dead-code-elimination: 1.0.10
|
||||||
dedent: 1.5.3
|
dedent: 1.5.3
|
||||||
tiny-invariant: 1.3.3
|
tiny-invariant: 1.3.3
|
||||||
vite: 6.1.2(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
vite: 6.1.2(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@types/node'
|
- '@types/node'
|
||||||
- babel-plugin-macros
|
- babel-plugin-macros
|
||||||
@@ -4636,7 +4662,7 @@ snapshots:
|
|||||||
tiny-invariant: 1.3.3
|
tiny-invariant: 1.3.3
|
||||||
tiny-warning: 1.0.3
|
tiny-warning: 1.0.3
|
||||||
|
|
||||||
'@tanstack/react-start-client@1.114.29(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(terser@5.39.0)(tsx@4.19.3)':
|
'@tanstack/react-start-client@1.114.29(@types/node@22.13.17)(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(terser@5.39.0)(tsx@4.19.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tanstack/react-router': 1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
'@tanstack/react-router': 1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||||
'@tanstack/router-core': 1.114.29
|
'@tanstack/router-core': 1.114.29
|
||||||
@@ -4647,7 +4673,7 @@ snapshots:
|
|||||||
react-dom: 19.1.0(react@19.1.0)
|
react-dom: 19.1.0(react@19.1.0)
|
||||||
tiny-invariant: 1.3.3
|
tiny-invariant: 1.3.3
|
||||||
tiny-warning: 1.0.3
|
tiny-warning: 1.0.3
|
||||||
vinxi: 0.5.3(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
vinxi: 0.5.3(@types/node@22.13.17)(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@azure/app-configuration'
|
- '@azure/app-configuration'
|
||||||
- '@azure/cosmos'
|
- '@azure/cosmos'
|
||||||
@@ -4690,22 +4716,22 @@ snapshots:
|
|||||||
- xml2js
|
- xml2js
|
||||||
- yaml
|
- yaml
|
||||||
|
|
||||||
'@tanstack/react-start-config@1.114.30(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(terser@5.39.0)(tsx@4.19.3)(vite@6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))':
|
'@tanstack/react-start-config@1.114.30(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(@types/node@22.13.17)(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(terser@5.39.0)(tsx@4.19.3)(vite@6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tanstack/react-start-plugin': 1.114.30(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
'@tanstack/react-start-plugin': 1.114.30(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
'@tanstack/router-core': 1.114.29
|
'@tanstack/router-core': 1.114.29
|
||||||
'@tanstack/router-generator': 1.114.29(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
|
'@tanstack/router-generator': 1.114.29(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
|
||||||
'@tanstack/router-plugin': 1.114.30(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(vite@6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))
|
'@tanstack/router-plugin': 1.114.30(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(vite@6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))
|
||||||
'@tanstack/server-functions-plugin': 1.114.30(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
'@tanstack/server-functions-plugin': 1.114.30(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
'@tanstack/start-server-functions-handler': 1.114.29
|
'@tanstack/start-server-functions-handler': 1.114.29
|
||||||
'@vitejs/plugin-react': 4.3.4(vite@6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))
|
'@vitejs/plugin-react': 4.3.4(vite@6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))
|
||||||
import-meta-resolve: 4.1.0
|
import-meta-resolve: 4.1.0
|
||||||
nitropack: 2.11.8
|
nitropack: 2.11.8
|
||||||
ofetch: 1.4.1
|
ofetch: 1.4.1
|
||||||
react: 19.1.0
|
react: 19.1.0
|
||||||
react-dom: 19.1.0(react@19.1.0)
|
react-dom: 19.1.0(react@19.1.0)
|
||||||
vinxi: 0.5.3(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
vinxi: 0.5.3(@types/node@22.13.17)(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
vite: 6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
vite: 6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
zod: 3.24.2
|
zod: 3.24.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@azure/app-configuration'
|
- '@azure/app-configuration'
|
||||||
@@ -4754,7 +4780,7 @@ snapshots:
|
|||||||
- xml2js
|
- xml2js
|
||||||
- yaml
|
- yaml
|
||||||
|
|
||||||
'@tanstack/react-start-plugin@1.114.30(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)':
|
'@tanstack/react-start-plugin@1.114.30(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/code-frame': 7.26.2
|
'@babel/code-frame': 7.26.2
|
||||||
'@babel/core': 7.26.10
|
'@babel/core': 7.26.10
|
||||||
@@ -4766,7 +4792,7 @@ snapshots:
|
|||||||
'@tanstack/router-utils': 1.114.29
|
'@tanstack/router-utils': 1.114.29
|
||||||
babel-dead-code-elimination: 1.0.10
|
babel-dead-code-elimination: 1.0.10
|
||||||
tiny-invariant: 1.3.3
|
tiny-invariant: 1.3.3
|
||||||
vite: 6.1.2(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
vite: 6.1.2(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@types/node'
|
- '@types/node'
|
||||||
- jiti
|
- jiti
|
||||||
@@ -4781,11 +4807,11 @@ snapshots:
|
|||||||
- tsx
|
- tsx
|
||||||
- yaml
|
- yaml
|
||||||
|
|
||||||
'@tanstack/react-start-router-manifest@1.114.29(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)':
|
'@tanstack/react-start-router-manifest@1.114.29(@types/node@22.13.17)(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tanstack/router-core': 1.114.29
|
'@tanstack/router-core': 1.114.29
|
||||||
tiny-invariant: 1.3.3
|
tiny-invariant: 1.3.3
|
||||||
vinxi: 0.5.3(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
vinxi: 0.5.3(@types/node@22.13.17)(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@azure/app-configuration'
|
- '@azure/app-configuration'
|
||||||
- '@azure/cosmos'
|
- '@azure/cosmos'
|
||||||
@@ -4843,20 +4869,20 @@ snapshots:
|
|||||||
tiny-warning: 1.0.3
|
tiny-warning: 1.0.3
|
||||||
unctx: 2.4.1
|
unctx: 2.4.1
|
||||||
|
|
||||||
'@tanstack/react-start@1.114.30(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(terser@5.39.0)(tsx@4.19.3)(vite@6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))':
|
'@tanstack/react-start@1.114.30(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(@types/node@22.13.17)(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(terser@5.39.0)(tsx@4.19.3)(vite@6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tanstack/react-start-client': 1.114.29(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(terser@5.39.0)(tsx@4.19.3)
|
'@tanstack/react-start-client': 1.114.29(@types/node@22.13.17)(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(terser@5.39.0)(tsx@4.19.3)
|
||||||
'@tanstack/react-start-config': 1.114.30(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(terser@5.39.0)(tsx@4.19.3)(vite@6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))
|
'@tanstack/react-start-config': 1.114.30(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(@types/node@22.13.17)(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(terser@5.39.0)(tsx@4.19.3)(vite@6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))
|
||||||
'@tanstack/react-start-router-manifest': 1.114.29(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
'@tanstack/react-start-router-manifest': 1.114.29(@types/node@22.13.17)(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
'@tanstack/react-start-server': 1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
'@tanstack/react-start-server': 1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||||
'@tanstack/start-api-routes': 1.114.29(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
'@tanstack/start-api-routes': 1.114.29(@types/node@22.13.17)(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
'@tanstack/start-server-functions-client': 1.114.30(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
'@tanstack/start-server-functions-client': 1.114.30(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
'@tanstack/start-server-functions-handler': 1.114.29
|
'@tanstack/start-server-functions-handler': 1.114.29
|
||||||
'@tanstack/start-server-functions-server': 1.114.30(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
'@tanstack/start-server-functions-server': 1.114.30(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
'@tanstack/start-server-functions-ssr': 1.114.30(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
'@tanstack/start-server-functions-ssr': 1.114.30(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
react: 19.1.0
|
react: 19.1.0
|
||||||
react-dom: 19.1.0(react@19.1.0)
|
react-dom: 19.1.0(react@19.1.0)
|
||||||
vite: 6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
vite: 6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@azure/app-configuration'
|
- '@azure/app-configuration'
|
||||||
- '@azure/cosmos'
|
- '@azure/cosmos'
|
||||||
@@ -4936,7 +4962,7 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@tanstack/react-router': 1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
'@tanstack/react-router': 1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||||
|
|
||||||
'@tanstack/router-plugin@1.114.30(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(vite@6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))':
|
'@tanstack/router-plugin@1.114.30(@tanstack/react-router@1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(vite@6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.26.10
|
'@babel/core': 7.26.10
|
||||||
'@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.10)
|
'@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.10)
|
||||||
@@ -4957,7 +4983,7 @@ snapshots:
|
|||||||
zod: 3.24.2
|
zod: 3.24.2
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@tanstack/react-router': 1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
'@tanstack/react-router': 1.114.29(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||||
vite: 6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
vite: 6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
@@ -4968,7 +4994,7 @@ snapshots:
|
|||||||
ansis: 3.17.0
|
ansis: 3.17.0
|
||||||
diff: 7.0.0
|
diff: 7.0.0
|
||||||
|
|
||||||
'@tanstack/server-functions-plugin@1.114.30(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)':
|
'@tanstack/server-functions-plugin@1.114.30(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/code-frame': 7.26.2
|
'@babel/code-frame': 7.26.2
|
||||||
'@babel/core': 7.26.10
|
'@babel/core': 7.26.10
|
||||||
@@ -4977,7 +5003,7 @@ snapshots:
|
|||||||
'@babel/template': 7.27.0
|
'@babel/template': 7.27.0
|
||||||
'@babel/traverse': 7.27.0
|
'@babel/traverse': 7.27.0
|
||||||
'@babel/types': 7.27.0
|
'@babel/types': 7.27.0
|
||||||
'@tanstack/directive-functions-plugin': 1.114.30(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
'@tanstack/directive-functions-plugin': 1.114.30(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
babel-dead-code-elimination: 1.0.10
|
babel-dead-code-elimination: 1.0.10
|
||||||
dedent: 1.5.3
|
dedent: 1.5.3
|
||||||
tiny-invariant: 1.3.3
|
tiny-invariant: 1.3.3
|
||||||
@@ -4996,11 +5022,11 @@ snapshots:
|
|||||||
- tsx
|
- tsx
|
||||||
- yaml
|
- yaml
|
||||||
|
|
||||||
'@tanstack/start-api-routes@1.114.29(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)':
|
'@tanstack/start-api-routes@1.114.29(@types/node@22.13.17)(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tanstack/router-core': 1.114.29
|
'@tanstack/router-core': 1.114.29
|
||||||
'@tanstack/start-server-core': 1.114.29
|
'@tanstack/start-server-core': 1.114.29
|
||||||
vinxi: 0.5.3(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
vinxi: 0.5.3(@types/node@22.13.17)(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@azure/app-configuration'
|
- '@azure/app-configuration'
|
||||||
- '@azure/cosmos'
|
- '@azure/cosmos'
|
||||||
@@ -5061,9 +5087,9 @@ snapshots:
|
|||||||
tiny-warning: 1.0.3
|
tiny-warning: 1.0.3
|
||||||
unctx: 2.4.1
|
unctx: 2.4.1
|
||||||
|
|
||||||
'@tanstack/start-server-functions-client@1.114.30(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)':
|
'@tanstack/start-server-functions-client@1.114.30(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tanstack/server-functions-plugin': 1.114.30(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
'@tanstack/server-functions-plugin': 1.114.30(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
'@tanstack/start-server-functions-fetcher': 1.114.29
|
'@tanstack/start-server-functions-fetcher': 1.114.29
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@types/node'
|
- '@types/node'
|
||||||
@@ -5092,9 +5118,9 @@ snapshots:
|
|||||||
'@tanstack/start-server-core': 1.114.29
|
'@tanstack/start-server-core': 1.114.29
|
||||||
tiny-invariant: 1.3.3
|
tiny-invariant: 1.3.3
|
||||||
|
|
||||||
'@tanstack/start-server-functions-server@1.114.30(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)':
|
'@tanstack/start-server-functions-server@1.114.30(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tanstack/server-functions-plugin': 1.114.30(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
'@tanstack/server-functions-plugin': 1.114.30(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
tiny-invariant: 1.3.3
|
tiny-invariant: 1.3.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@types/node'
|
- '@types/node'
|
||||||
@@ -5111,9 +5137,9 @@ snapshots:
|
|||||||
- tsx
|
- tsx
|
||||||
- yaml
|
- yaml
|
||||||
|
|
||||||
'@tanstack/start-server-functions-ssr@1.114.30(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)':
|
'@tanstack/start-server-functions-ssr@1.114.30(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tanstack/server-functions-plugin': 1.114.30(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
'@tanstack/server-functions-plugin': 1.114.30(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
'@tanstack/start-client-core': 1.114.29
|
'@tanstack/start-client-core': 1.114.29
|
||||||
'@tanstack/start-server-core': 1.114.29
|
'@tanstack/start-server-core': 1.114.29
|
||||||
'@tanstack/start-server-functions-fetcher': 1.114.29
|
'@tanstack/start-server-functions-fetcher': 1.114.29
|
||||||
@@ -5191,6 +5217,10 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@types/braces': 3.0.5
|
'@types/braces': 3.0.5
|
||||||
|
|
||||||
|
'@types/node@22.13.17':
|
||||||
|
dependencies:
|
||||||
|
undici-types: 6.20.0
|
||||||
|
|
||||||
'@types/react-dom@19.0.4(@types/react@19.0.12)':
|
'@types/react-dom@19.0.4(@types/react@19.0.12)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/react': 19.0.12
|
'@types/react': 19.0.12
|
||||||
@@ -5317,14 +5347,14 @@ snapshots:
|
|||||||
untun: 0.1.3
|
untun: 0.1.3
|
||||||
uqr: 0.1.2
|
uqr: 0.1.2
|
||||||
|
|
||||||
'@vitejs/plugin-react@4.3.4(vite@6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))':
|
'@vitejs/plugin-react@4.3.4(vite@6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.26.10
|
'@babel/core': 7.26.10
|
||||||
'@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.10)
|
'@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.10)
|
||||||
'@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.10)
|
'@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.10)
|
||||||
'@types/babel__core': 7.20.5
|
'@types/babel__core': 7.20.5
|
||||||
react-refresh: 0.14.2
|
react-refresh: 0.14.2
|
||||||
vite: 6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
vite: 6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
@@ -5335,13 +5365,13 @@ snapshots:
|
|||||||
chai: 5.2.0
|
chai: 5.2.0
|
||||||
tinyrainbow: 2.0.0
|
tinyrainbow: 2.0.0
|
||||||
|
|
||||||
'@vitest/mocker@3.1.1(vite@6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))':
|
'@vitest/mocker@3.1.1(vite@6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vitest/spy': 3.1.1
|
'@vitest/spy': 3.1.1
|
||||||
estree-walker: 3.0.3
|
estree-walker: 3.0.3
|
||||||
magic-string: 0.30.17
|
magic-string: 0.30.17
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
vite: 6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
vite: 6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
|
|
||||||
'@vitest/pretty-format@3.1.1':
|
'@vitest/pretty-format@3.1.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -6776,6 +6806,10 @@ snapshots:
|
|||||||
|
|
||||||
loupe@3.1.3: {}
|
loupe@3.1.3: {}
|
||||||
|
|
||||||
|
lowdb@7.0.1:
|
||||||
|
dependencies:
|
||||||
|
steno: 4.0.2
|
||||||
|
|
||||||
lru-cache@10.4.3: {}
|
lru-cache@10.4.3: {}
|
||||||
|
|
||||||
lru-cache@5.1.1:
|
lru-cache@5.1.1:
|
||||||
@@ -7398,6 +7432,8 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
|
server-only@0.0.1: {}
|
||||||
|
|
||||||
set-function-length@1.2.2:
|
set-function-length@1.2.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
define-data-property: 1.1.4
|
define-data-property: 1.1.4
|
||||||
@@ -7493,6 +7529,8 @@ snapshots:
|
|||||||
|
|
||||||
std-env@3.8.1: {}
|
std-env@3.8.1: {}
|
||||||
|
|
||||||
|
steno@4.0.2: {}
|
||||||
|
|
||||||
streamx@2.22.0:
|
streamx@2.22.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
fast-fifo: 1.3.2
|
fast-fifo: 1.3.2
|
||||||
@@ -7749,6 +7787,8 @@ snapshots:
|
|||||||
|
|
||||||
undici-types@5.28.4: {}
|
undici-types@5.28.4: {}
|
||||||
|
|
||||||
|
undici-types@6.20.0: {}
|
||||||
|
|
||||||
unenv@1.10.0:
|
unenv@1.10.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
consola: 3.4.2
|
consola: 3.4.2
|
||||||
@@ -7854,7 +7894,7 @@ snapshots:
|
|||||||
|
|
||||||
util-deprecate@1.0.2: {}
|
util-deprecate@1.0.2: {}
|
||||||
|
|
||||||
vinxi@0.5.3(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3):
|
vinxi@0.5.3(@types/node@22.13.17)(db0@0.3.1)(ioredis@5.6.0)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.26.10
|
'@babel/core': 7.26.10
|
||||||
'@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.10)
|
'@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.10)
|
||||||
@@ -7888,7 +7928,7 @@ snapshots:
|
|||||||
unctx: 2.4.1
|
unctx: 2.4.1
|
||||||
unenv: 1.10.0
|
unenv: 1.10.0
|
||||||
unstorage: 1.15.0(db0@0.3.1)(ioredis@5.6.0)
|
unstorage: 1.15.0(db0@0.3.1)(ioredis@5.6.0)
|
||||||
vite: 6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
vite: 6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
zod: 3.24.2
|
zod: 3.24.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@azure/app-configuration'
|
- '@azure/app-configuration'
|
||||||
@@ -7932,13 +7972,13 @@ snapshots:
|
|||||||
- xml2js
|
- xml2js
|
||||||
- yaml
|
- yaml
|
||||||
|
|
||||||
vite-node@3.1.1(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3):
|
vite-node@3.1.1(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
cac: 6.7.14
|
cac: 6.7.14
|
||||||
debug: 4.4.0
|
debug: 4.4.0
|
||||||
es-module-lexer: 1.6.0
|
es-module-lexer: 1.6.0
|
||||||
pathe: 2.0.3
|
pathe: 2.0.3
|
||||||
vite: 6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
vite: 6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@types/node'
|
- '@types/node'
|
||||||
- jiti
|
- jiti
|
||||||
@@ -7953,43 +7993,45 @@ snapshots:
|
|||||||
- tsx
|
- tsx
|
||||||
- yaml
|
- yaml
|
||||||
|
|
||||||
vite-tsconfig-paths@5.1.4(typescript@5.8.2)(vite@6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)):
|
vite-tsconfig-paths@5.1.4(typescript@5.8.2)(vite@6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.4.0
|
debug: 4.4.0
|
||||||
globrex: 0.1.2
|
globrex: 0.1.2
|
||||||
tsconfck: 3.1.5(typescript@5.8.2)
|
tsconfck: 3.1.5(typescript@5.8.2)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
vite: 6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
vite: 6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
- typescript
|
- typescript
|
||||||
|
|
||||||
vite@6.1.2(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3):
|
vite@6.1.2(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
esbuild: 0.24.2
|
esbuild: 0.24.2
|
||||||
postcss: 8.5.3
|
postcss: 8.5.3
|
||||||
rollup: 4.38.0
|
rollup: 4.38.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
|
'@types/node': 22.13.17
|
||||||
fsevents: 2.3.3
|
fsevents: 2.3.3
|
||||||
jiti: 2.4.2
|
jiti: 2.4.2
|
||||||
terser: 5.39.0
|
terser: 5.39.0
|
||||||
tsx: 4.19.3
|
tsx: 4.19.3
|
||||||
|
|
||||||
vite@6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3):
|
vite@6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
esbuild: 0.25.2
|
esbuild: 0.25.2
|
||||||
postcss: 8.5.3
|
postcss: 8.5.3
|
||||||
rollup: 4.38.0
|
rollup: 4.38.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
|
'@types/node': 22.13.17
|
||||||
fsevents: 2.3.3
|
fsevents: 2.3.3
|
||||||
jiti: 2.4.2
|
jiti: 2.4.2
|
||||||
terser: 5.39.0
|
terser: 5.39.0
|
||||||
tsx: 4.19.3
|
tsx: 4.19.3
|
||||||
|
|
||||||
vitest@3.1.1(jiti@2.4.2)(jsdom@26.0.0)(terser@5.39.0)(tsx@4.19.3):
|
vitest@3.1.1(@types/node@22.13.17)(jiti@2.4.2)(jsdom@26.0.0)(terser@5.39.0)(tsx@4.19.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vitest/expect': 3.1.1
|
'@vitest/expect': 3.1.1
|
||||||
'@vitest/mocker': 3.1.1(vite@6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))
|
'@vitest/mocker': 3.1.1(vite@6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3))
|
||||||
'@vitest/pretty-format': 3.1.1
|
'@vitest/pretty-format': 3.1.1
|
||||||
'@vitest/runner': 3.1.1
|
'@vitest/runner': 3.1.1
|
||||||
'@vitest/snapshot': 3.1.1
|
'@vitest/snapshot': 3.1.1
|
||||||
@@ -8005,10 +8047,11 @@ snapshots:
|
|||||||
tinyexec: 0.3.2
|
tinyexec: 0.3.2
|
||||||
tinypool: 1.0.2
|
tinypool: 1.0.2
|
||||||
tinyrainbow: 2.0.0
|
tinyrainbow: 2.0.0
|
||||||
vite: 6.2.4(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
vite: 6.2.4(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
vite-node: 3.1.1(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
vite-node: 3.1.1(@types/node@22.13.17)(jiti@2.4.2)(terser@5.39.0)(tsx@4.19.3)
|
||||||
why-is-node-running: 2.3.0
|
why-is-node-running: 2.3.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
|
'@types/node': 22.13.17
|
||||||
jsdom: 26.0.0
|
jsdom: 26.0.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- jiti
|
- jiti
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
539
src/data.ts
539
src/data.ts
@@ -2,11 +2,14 @@
|
|||||||
// 🛑 Nothing in here has anything to do with React Router, it's just a fake database
|
// 🛑 Nothing in here has anything to do with React Router, it's just a fake database
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// noinspection UnnecessaryLocalVariableJS,JSUnusedGlobalSymbols
|
// noinspection UnnecessaryLocalVariableJS,JSUnusedGlobalSymbols
|
||||||
|
|
||||||
import { matchSorter } from "match-sorter";
|
import { matchSorter } from "match-sorter";
|
||||||
// @ts-expect-error - no types, but it's a tiny function
|
// @ts-expect-error - no types, but it's a tiny function
|
||||||
import sortBy from "sort-by";
|
import sortBy from "sort-by";
|
||||||
import invariant from "tiny-invariant";
|
import invariant from "tiny-invariant";
|
||||||
|
import { Low } from "lowdb";
|
||||||
|
import { JSONFile } from "lowdb/node";
|
||||||
|
import { join } from "node:path";
|
||||||
|
import { mkdir } from "node:fs/promises";
|
||||||
|
|
||||||
type ContactMutation = {
|
type ContactMutation = {
|
||||||
id?: string;
|
id?: string;
|
||||||
@@ -23,42 +26,97 @@ export type ContactRecord = ContactMutation & {
|
|||||||
createdAt: string;
|
createdAt: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
// Define the database schema
|
||||||
// This is just a fake DB table. In a real app you'd be talking to a real db or
|
type Schema = {
|
||||||
// fetching from an existing API.
|
records: Record<string, ContactRecord>;
|
||||||
const fakeContacts = {
|
};
|
||||||
records: {} as Record<string, ContactRecord>,
|
|
||||||
|
|
||||||
|
// Set up lowdb
|
||||||
|
const initDb = async (): Promise<Low<Schema>> => {
|
||||||
|
// Ensure the db directory exists
|
||||||
|
const dbDir = join(process.cwd(), '.db');
|
||||||
|
await mkdir(dbDir, { recursive: true });
|
||||||
|
|
||||||
|
const file = join(dbDir, 'contacts.json');
|
||||||
|
const adapter = new JSONFile<Schema>(file);
|
||||||
|
const defaultData: Schema = { records: {} };
|
||||||
|
const db = new Low<Schema>(adapter, defaultData);
|
||||||
|
|
||||||
|
// Load existing data
|
||||||
|
await db.read();
|
||||||
|
|
||||||
|
// Initialize if needed
|
||||||
|
if (!db.data) {
|
||||||
|
db.data = defaultData;
|
||||||
|
}
|
||||||
|
|
||||||
|
return db;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Create a singleton instance of the database
|
||||||
|
let dbPromise: Promise<Low<Schema>> | null = null;
|
||||||
|
|
||||||
|
const getDb = () => {
|
||||||
|
if (!dbPromise) {
|
||||||
|
dbPromise = initDb();
|
||||||
|
}
|
||||||
|
return dbPromise;
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// This is a DB wrapper using lowdb for persistence
|
||||||
|
const fakeContacts = {
|
||||||
async getAll(): Promise<ContactRecord[]> {
|
async getAll(): Promise<ContactRecord[]> {
|
||||||
return Object.keys(fakeContacts.records)
|
const db = await getDb();
|
||||||
.map((key) => fakeContacts.records[key])
|
return Object.keys(db.data.records)
|
||||||
|
.map((key) => db.data.records[key])
|
||||||
.sort(sortBy("-createdAt", "last"));
|
.sort(sortBy("-createdAt", "last"));
|
||||||
},
|
},
|
||||||
|
|
||||||
async get(id: string): Promise<ContactRecord | null> {
|
async get(id: string): Promise<ContactRecord | null> {
|
||||||
return fakeContacts.records[id] || null;
|
const db = await getDb();
|
||||||
|
return db.data.records[id] || null;
|
||||||
},
|
},
|
||||||
|
|
||||||
async create(values: ContactMutation): Promise<ContactRecord> {
|
async create(values: ContactMutation): Promise<ContactRecord> {
|
||||||
|
const db = await getDb();
|
||||||
const id = values.id || Math.random().toString(36).substring(2, 9);
|
const id = values.id || Math.random().toString(36).substring(2, 9);
|
||||||
const createdAt = new Date().toISOString();
|
const createdAt = new Date().toISOString();
|
||||||
const newContact = { id, createdAt, ...values };
|
const newContact = { id, createdAt, ...values };
|
||||||
fakeContacts.records[id] = newContact;
|
db.data.records[id] = newContact;
|
||||||
|
await db.write();
|
||||||
return newContact;
|
return newContact;
|
||||||
},
|
},
|
||||||
|
|
||||||
async set(id: string, values: ContactMutation): Promise<ContactRecord> {
|
async set(id: string, values: ContactMutation): Promise<ContactRecord> {
|
||||||
const contact = await fakeContacts.get(id);
|
const db = await getDb();
|
||||||
|
const contact = await this.get(id);
|
||||||
invariant(contact, `No contact found for ${id}`);
|
invariant(contact, `No contact found for ${id}`);
|
||||||
const updatedContact = { ...contact, ...values };
|
const updatedContact = { ...contact, ...values };
|
||||||
fakeContacts.records[id] = updatedContact;
|
db.data.records[id] = updatedContact;
|
||||||
|
await db.write();
|
||||||
return updatedContact;
|
return updatedContact;
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy(id: string): null {
|
async destroy(id: string): Promise<null> {
|
||||||
delete fakeContacts.records[id];
|
const db = await getDb();
|
||||||
|
delete db.data.records[id];
|
||||||
|
await db.write();
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// New reset function to restore the initial data
|
||||||
|
async reset(): Promise<void> {
|
||||||
|
const db = await getDb();
|
||||||
|
db.data.records = {};
|
||||||
|
await db.write();
|
||||||
|
|
||||||
|
// Restore initial data
|
||||||
|
const initialContacts = getInitialContacts();
|
||||||
|
for (const contact of initialContacts) {
|
||||||
|
await this.create(contact);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -93,228 +151,243 @@ export async function updateContact(id: string, updates: ContactMutation) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function deleteContact(id: string) {
|
export async function deleteContact(id: string) {
|
||||||
fakeContacts.destroy(id);
|
await fakeContacts.destroy(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
[
|
// New function to reset the database to initial state
|
||||||
{
|
export async function resetDatabase() {
|
||||||
avatar:
|
console.log("RESET DATABASE");
|
||||||
"https://sessionize.com/image/124e-400o400o2-wHVdAuNaxi8KJrgtN3ZKci.jpg",
|
await fakeContacts.reset();
|
||||||
first: "Shruti",
|
}
|
||||||
last: "Kapoor",
|
|
||||||
twitter: "@shrutikapoor08",
|
// Helper function to get initial contacts data
|
||||||
},
|
function getInitialContacts() {
|
||||||
{
|
return [
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/1940-400o400o2-Enh9dnYmrLYhJSTTPSw3MH.jpg",
|
avatar:
|
||||||
first: "Glenn",
|
"https://sessionize.com/image/124e-400o400o2-wHVdAuNaxi8KJrgtN3ZKci.jpg",
|
||||||
last: "Reyes",
|
first: "Shruti",
|
||||||
twitter: "@glnnrys",
|
last: "Kapoor",
|
||||||
},
|
twitter: "@shrutikapoor08",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/9273-400o400o2-3tyrUE3HjsCHJLU5aUJCja.jpg",
|
avatar:
|
||||||
first: "Ryan",
|
"https://sessionize.com/image/1940-400o400o2-Enh9dnYmrLYhJSTTPSw3MH.jpg",
|
||||||
last: "Florence",
|
first: "Glenn",
|
||||||
},
|
last: "Reyes",
|
||||||
{
|
twitter: "@glnnrys",
|
||||||
avatar:
|
},
|
||||||
"https://sessionize.com/image/d14d-400o400o2-pyB229HyFPCnUcZhHf3kWS.png",
|
{
|
||||||
first: "Oscar",
|
avatar:
|
||||||
last: "Newman",
|
"https://sessionize.com/image/9273-400o400o2-3tyrUE3HjsCHJLU5aUJCja.jpg",
|
||||||
twitter: "@__oscarnewman",
|
first: "Ryan",
|
||||||
},
|
last: "Florence",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/fd45-400o400o2-fw91uCdGU9hFP334dnyVCr.jpg",
|
avatar:
|
||||||
first: "Michael",
|
"https://sessionize.com/image/d14d-400o400o2-pyB229HyFPCnUcZhHf3kWS.png",
|
||||||
last: "Jackson",
|
first: "Oscar",
|
||||||
},
|
last: "Newman",
|
||||||
{
|
twitter: "@__oscarnewman",
|
||||||
avatar:
|
},
|
||||||
"https://sessionize.com/image/b07e-400o400o2-KgNRF3S9sD5ZR4UsG7hG4g.jpg",
|
{
|
||||||
first: "Christopher",
|
avatar:
|
||||||
last: "Chedeau",
|
"https://sessionize.com/image/fd45-400o400o2-fw91uCdGU9hFP334dnyVCr.jpg",
|
||||||
twitter: "@Vjeux",
|
first: "Michael",
|
||||||
},
|
last: "Jackson",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/262f-400o400o2-UBPQueK3fayaCmsyUc1Ljf.jpg",
|
avatar:
|
||||||
first: "Cameron",
|
"https://sessionize.com/image/b07e-400o400o2-KgNRF3S9sD5ZR4UsG7hG4g.jpg",
|
||||||
last: "Matheson",
|
first: "Christopher",
|
||||||
twitter: "@cmatheson",
|
last: "Chedeau",
|
||||||
},
|
twitter: "@Vjeux",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/820b-400o400o2-Ja1KDrBAu5NzYTPLSC3GW8.jpg",
|
avatar:
|
||||||
first: "Brooks",
|
"https://sessionize.com/image/262f-400o400o2-UBPQueK3fayaCmsyUc1Ljf.jpg",
|
||||||
last: "Lybrand",
|
first: "Cameron",
|
||||||
twitter: "@BrooksLybrand",
|
last: "Matheson",
|
||||||
},
|
twitter: "@cmatheson",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/df38-400o400o2-JwbChVUj6V7DwZMc9vJEHc.jpg",
|
avatar:
|
||||||
first: "Alex",
|
"https://sessionize.com/image/820b-400o400o2-Ja1KDrBAu5NzYTPLSC3GW8.jpg",
|
||||||
last: "Anderson",
|
first: "Brooks",
|
||||||
twitter: "@ralex1993",
|
last: "Lybrand",
|
||||||
},
|
twitter: "@BrooksLybrand",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/5578-400o400o2-BMT43t5kd2U1XstaNnM6Ax.jpg",
|
avatar:
|
||||||
first: "Kent C.",
|
"https://sessionize.com/image/df38-400o400o2-JwbChVUj6V7DwZMc9vJEHc.jpg",
|
||||||
last: "Dodds",
|
first: "Alex",
|
||||||
twitter: "@kentcdodds",
|
last: "Anderson",
|
||||||
},
|
twitter: "@ralex1993",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/c9d5-400o400o2-Sri5qnQmscaJXVB8m3VBgf.jpg",
|
avatar:
|
||||||
first: "Nevi",
|
"https://sessionize.com/image/5578-400o400o2-BMT43t5kd2U1XstaNnM6Ax.jpg",
|
||||||
last: "Shah",
|
first: "Kent C.",
|
||||||
twitter: "@nevikashah",
|
last: "Dodds",
|
||||||
},
|
twitter: "@kentcdodds",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/2694-400o400o2-MYYTsnszbLKTzyqJV17w2q.png",
|
avatar:
|
||||||
first: "Andrew",
|
"https://sessionize.com/image/c9d5-400o400o2-Sri5qnQmscaJXVB8m3VBgf.jpg",
|
||||||
last: "Petersen",
|
first: "Nevi",
|
||||||
},
|
last: "Shah",
|
||||||
{
|
twitter: "@nevikashah",
|
||||||
avatar:
|
},
|
||||||
"https://sessionize.com/image/907a-400o400o2-9TM2CCmvrw6ttmJiTw4Lz8.jpg",
|
{
|
||||||
first: "Scott",
|
avatar:
|
||||||
last: "Smerchek",
|
"https://sessionize.com/image/2694-400o400o2-MYYTsnszbLKTzyqJV17w2q.png",
|
||||||
twitter: "@smerchek",
|
first: "Andrew",
|
||||||
},
|
last: "Petersen",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/08be-400o400o2-WtYGFFR1ZUJHL9tKyVBNPV.jpg",
|
avatar:
|
||||||
first: "Giovanni",
|
"https://sessionize.com/image/907a-400o400o2-9TM2CCmvrw6ttmJiTw4Lz8.jpg",
|
||||||
last: "Benussi",
|
first: "Scott",
|
||||||
twitter: "@giovannibenussi",
|
last: "Smerchek",
|
||||||
},
|
twitter: "@smerchek",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/f814-400o400o2-n2ua5nM9qwZA2hiGdr1T7N.jpg",
|
avatar:
|
||||||
first: "Igor",
|
"https://sessionize.com/image/08be-400o400o2-WtYGFFR1ZUJHL9tKyVBNPV.jpg",
|
||||||
last: "Minar",
|
first: "Giovanni",
|
||||||
twitter: "@IgorMinar",
|
last: "Benussi",
|
||||||
},
|
twitter: "@giovannibenussi",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/fb82-400o400o2-LbvwhTVMrYLDdN3z4iEFMp.jpeg",
|
avatar:
|
||||||
first: "Brandon",
|
"https://sessionize.com/image/f814-400o400o2-n2ua5nM9qwZA2hiGdr1T7N.jpg",
|
||||||
last: "Kish",
|
first: "Igor",
|
||||||
},
|
last: "Minar",
|
||||||
{
|
twitter: "@IgorMinar",
|
||||||
avatar:
|
},
|
||||||
"https://sessionize.com/image/fcda-400o400o2-XiYRtKK5Dvng5AeyC8PiUA.png",
|
{
|
||||||
first: "Arisa",
|
avatar:
|
||||||
last: "Fukuzaki",
|
"https://sessionize.com/image/fb82-400o400o2-LbvwhTVMrYLDdN3z4iEFMp.jpeg",
|
||||||
twitter: "@arisa_dev",
|
first: "Brandon",
|
||||||
},
|
last: "Kish",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/c8c3-400o400o2-PR5UsgApAVEADZRixV4H8e.jpeg",
|
avatar:
|
||||||
first: "Alexandra",
|
"https://sessionize.com/image/fcda-400o400o2-XiYRtKK5Dvng5AeyC8PiUA.png",
|
||||||
last: "Spalato",
|
first: "Arisa",
|
||||||
twitter: "@alexadark",
|
last: "Fukuzaki",
|
||||||
},
|
twitter: "@arisa_dev",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/7594-400o400o2-hWtdCjbdFdLgE2vEXBJtyo.jpg",
|
avatar:
|
||||||
first: "Cat",
|
"https://sessionize.com/image/c8c3-400o400o2-PR5UsgApAVEADZRixV4H8e.jpeg",
|
||||||
last: "Johnson",
|
first: "Alexandra",
|
||||||
},
|
last: "Spalato",
|
||||||
{
|
twitter: "@alexadark",
|
||||||
avatar:
|
},
|
||||||
"https://sessionize.com/image/5636-400o400o2-TWgi8vELMFoB3hB9uPw62d.jpg",
|
{
|
||||||
first: "Ashley",
|
avatar:
|
||||||
last: "Narcisse",
|
"https://sessionize.com/image/7594-400o400o2-hWtdCjbdFdLgE2vEXBJtyo.jpg",
|
||||||
twitter: "@_darkfadr",
|
first: "Cat",
|
||||||
},
|
last: "Johnson",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/6aeb-400o400o2-Q5tAiuzKGgzSje9ZsK3Yu5.JPG",
|
avatar:
|
||||||
first: "Edmund",
|
"https://sessionize.com/image/5636-400o400o2-TWgi8vELMFoB3hB9uPw62d.jpg",
|
||||||
last: "Hung",
|
first: "Ashley",
|
||||||
twitter: "@_edmundhung",
|
last: "Narcisse",
|
||||||
},
|
twitter: "@_darkfadr",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/30f1-400o400o2-wJBdJ6sFayjKmJycYKoHSe.jpg",
|
avatar:
|
||||||
first: "Clifford",
|
"https://sessionize.com/image/6aeb-400o400o2-Q5tAiuzKGgzSje9ZsK3Yu5.JPG",
|
||||||
last: "Fajardo",
|
first: "Edmund",
|
||||||
twitter: "@cliffordfajard0",
|
last: "Hung",
|
||||||
},
|
twitter: "@_edmundhung",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/6faa-400o400o2-amseBRDkdg7wSK5tjsFDiG.jpg",
|
avatar:
|
||||||
first: "Erick",
|
"https://sessionize.com/image/30f1-400o400o2-wJBdJ6sFayjKmJycYKoHSe.jpg",
|
||||||
last: "Tamayo",
|
first: "Clifford",
|
||||||
twitter: "@ericktamayo",
|
last: "Fajardo",
|
||||||
},
|
twitter: "@cliffordfajard0",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/feba-400o400o2-R4GE7eqegJNFf3cQ567obs.jpg",
|
avatar:
|
||||||
first: "Paul",
|
"https://sessionize.com/image/6faa-400o400o2-amseBRDkdg7wSK5tjsFDiG.jpg",
|
||||||
last: "Bratslavsky",
|
first: "Erick",
|
||||||
twitter: "@codingthirty",
|
last: "Tamayo",
|
||||||
},
|
twitter: "@ericktamayo",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/c315-400o400o2-spjM5A6VVfVNnQsuwvX3DY.jpg",
|
avatar:
|
||||||
first: "Pedro",
|
"https://sessionize.com/image/feba-400o400o2-R4GE7eqegJNFf3cQ567obs.jpg",
|
||||||
last: "Cattori",
|
first: "Paul",
|
||||||
twitter: "@pcattori",
|
last: "Bratslavsky",
|
||||||
},
|
twitter: "@codingthirty",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/eec1-400o400o2-HkvWKLFqecmFxLwqR9KMRw.jpg",
|
avatar:
|
||||||
first: "Andre",
|
"https://sessionize.com/image/c315-400o400o2-spjM5A6VVfVNnQsuwvX3DY.jpg",
|
||||||
last: "Landgraf",
|
first: "Pedro",
|
||||||
twitter: "@AndreLandgraf94",
|
last: "Cattori",
|
||||||
},
|
twitter: "@pcattori",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/c73a-400o400o2-4MTaTq6ftC15hqwtqUJmTC.jpg",
|
avatar:
|
||||||
first: "Monica",
|
"https://sessionize.com/image/eec1-400o400o2-HkvWKLFqecmFxLwqR9KMRw.jpg",
|
||||||
last: "Powell",
|
first: "Andre",
|
||||||
twitter: "@indigitalcolor",
|
last: "Landgraf",
|
||||||
},
|
twitter: "@AndreLandgraf94",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/cef7-400o400o2-KBZUydbjfkfGACQmjbHEvX.jpeg",
|
avatar:
|
||||||
first: "Brian",
|
"https://sessionize.com/image/c73a-400o400o2-4MTaTq6ftC15hqwtqUJmTC.jpg",
|
||||||
last: "Lee",
|
first: "Monica",
|
||||||
twitter: "@brian_dlee",
|
last: "Powell",
|
||||||
},
|
twitter: "@indigitalcolor",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/f83b-400o400o2-Pyw3chmeHMxGsNoj3nQmWU.jpg",
|
avatar:
|
||||||
first: "Sean",
|
"https://sessionize.com/image/cef7-400o400o2-KBZUydbjfkfGACQmjbHEvX.jpeg",
|
||||||
last: "McQuaid",
|
first: "Brian",
|
||||||
twitter: "@SeanMcQuaidCode",
|
last: "Lee",
|
||||||
},
|
twitter: "@brian_dlee",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/a9fc-400o400o2-JHBnWZRoxp7QX74Hdac7AZ.jpg",
|
avatar:
|
||||||
first: "Shane",
|
"https://sessionize.com/image/f83b-400o400o2-Pyw3chmeHMxGsNoj3nQmWU.jpg",
|
||||||
last: "Walker",
|
first: "Sean",
|
||||||
twitter: "@swalker326",
|
last: "McQuaid",
|
||||||
},
|
twitter: "@SeanMcQuaidCode",
|
||||||
{
|
},
|
||||||
avatar:
|
{
|
||||||
"https://sessionize.com/image/6644-400o400o2-aHnGHb5Pdu3D32MbfrnQbj.jpg",
|
avatar:
|
||||||
first: "Jon",
|
"https://sessionize.com/image/a9fc-400o400o2-JHBnWZRoxp7QX74Hdac7AZ.jpg",
|
||||||
last: "Jensen",
|
first: "Shane",
|
||||||
twitter: "@jenseng",
|
last: "Walker",
|
||||||
},
|
twitter: "@swalker326",
|
||||||
].forEach((contact) => {
|
},
|
||||||
fakeContacts.create({
|
{
|
||||||
|
avatar:
|
||||||
|
"https://sessionize.com/image/6644-400o400o2-aHnGHb5Pdu3D32MbfrnQbj.jpg",
|
||||||
|
first: "Jon",
|
||||||
|
last: "Jensen",
|
||||||
|
twitter: "@jenseng",
|
||||||
|
},
|
||||||
|
].map(contact => ({
|
||||||
...contact,
|
...contact,
|
||||||
id: `${contact.first
|
id: `${contact.first
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.split(" ")
|
.split(" ")
|
||||||
.join("_")}-${contact.last.toLocaleLowerCase()}`,
|
.join("_")}-${contact.last.toLowerCase()}`,
|
||||||
});
|
}));
|
||||||
});
|
}
|
||||||
|
|
||||||
|
// Initialize with seed data on first load
|
||||||
|
(async () => {
|
||||||
|
const db = await getDb();
|
||||||
|
if (Object.keys(db.data.records).length === 0) {
|
||||||
|
await resetDatabase();
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ import { Route as rootRoute } from './routes/__root'
|
|||||||
import { Route as AboutImport } from './routes/about'
|
import { Route as AboutImport } from './routes/about'
|
||||||
import { Route as SidebarImport } from './routes/_sidebar'
|
import { Route as SidebarImport } from './routes/_sidebar'
|
||||||
import { Route as SidebarIndexImport } from './routes/_sidebar/index'
|
import { Route as SidebarIndexImport } from './routes/_sidebar/index'
|
||||||
import { Route as SidebarContactsContractIdImport } from './routes/_sidebar/contacts.$contractId'
|
import { Route as SidebarContactsImport } from './routes/_sidebar/contacts'
|
||||||
|
import { Route as SidebarContactsContactIdImport } from './routes/_sidebar/contacts.$contactId'
|
||||||
|
|
||||||
// Create/Update Routes
|
// Create/Update Routes
|
||||||
|
|
||||||
@@ -35,12 +36,18 @@ const SidebarIndexRoute = SidebarIndexImport.update({
|
|||||||
getParentRoute: () => SidebarRoute,
|
getParentRoute: () => SidebarRoute,
|
||||||
} as any)
|
} as any)
|
||||||
|
|
||||||
const SidebarContactsContractIdRoute = SidebarContactsContractIdImport.update({
|
const SidebarContactsRoute = SidebarContactsImport.update({
|
||||||
id: '/contacts/$contractId',
|
id: '/contacts',
|
||||||
path: '/contacts/$contractId',
|
path: '/contacts',
|
||||||
getParentRoute: () => SidebarRoute,
|
getParentRoute: () => SidebarRoute,
|
||||||
} as any)
|
} as any)
|
||||||
|
|
||||||
|
const SidebarContactsContactIdRoute = SidebarContactsContactIdImport.update({
|
||||||
|
id: '/$contactId',
|
||||||
|
path: '/$contactId',
|
||||||
|
getParentRoute: () => SidebarContactsRoute,
|
||||||
|
} as any)
|
||||||
|
|
||||||
// Populate the FileRoutesByPath interface
|
// Populate the FileRoutesByPath interface
|
||||||
|
|
||||||
declare module '@tanstack/react-router' {
|
declare module '@tanstack/react-router' {
|
||||||
@@ -59,6 +66,13 @@ declare module '@tanstack/react-router' {
|
|||||||
preLoaderRoute: typeof AboutImport
|
preLoaderRoute: typeof AboutImport
|
||||||
parentRoute: typeof rootRoute
|
parentRoute: typeof rootRoute
|
||||||
}
|
}
|
||||||
|
'/_sidebar/contacts': {
|
||||||
|
id: '/_sidebar/contacts'
|
||||||
|
path: '/contacts'
|
||||||
|
fullPath: '/contacts'
|
||||||
|
preLoaderRoute: typeof SidebarContactsImport
|
||||||
|
parentRoute: typeof SidebarImport
|
||||||
|
}
|
||||||
'/_sidebar/': {
|
'/_sidebar/': {
|
||||||
id: '/_sidebar/'
|
id: '/_sidebar/'
|
||||||
path: '/'
|
path: '/'
|
||||||
@@ -66,26 +80,38 @@ declare module '@tanstack/react-router' {
|
|||||||
preLoaderRoute: typeof SidebarIndexImport
|
preLoaderRoute: typeof SidebarIndexImport
|
||||||
parentRoute: typeof SidebarImport
|
parentRoute: typeof SidebarImport
|
||||||
}
|
}
|
||||||
'/_sidebar/contacts/$contractId': {
|
'/_sidebar/contacts/$contactId': {
|
||||||
id: '/_sidebar/contacts/$contractId'
|
id: '/_sidebar/contacts/$contactId'
|
||||||
path: '/contacts/$contractId'
|
path: '/$contactId'
|
||||||
fullPath: '/contacts/$contractId'
|
fullPath: '/contacts/$contactId'
|
||||||
preLoaderRoute: typeof SidebarContactsContractIdImport
|
preLoaderRoute: typeof SidebarContactsContactIdImport
|
||||||
parentRoute: typeof SidebarImport
|
parentRoute: typeof SidebarContactsImport
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create and export the route tree
|
// Create and export the route tree
|
||||||
|
|
||||||
|
interface SidebarContactsRouteChildren {
|
||||||
|
SidebarContactsContactIdRoute: typeof SidebarContactsContactIdRoute
|
||||||
|
}
|
||||||
|
|
||||||
|
const SidebarContactsRouteChildren: SidebarContactsRouteChildren = {
|
||||||
|
SidebarContactsContactIdRoute: SidebarContactsContactIdRoute,
|
||||||
|
}
|
||||||
|
|
||||||
|
const SidebarContactsRouteWithChildren = SidebarContactsRoute._addFileChildren(
|
||||||
|
SidebarContactsRouteChildren,
|
||||||
|
)
|
||||||
|
|
||||||
interface SidebarRouteChildren {
|
interface SidebarRouteChildren {
|
||||||
|
SidebarContactsRoute: typeof SidebarContactsRouteWithChildren
|
||||||
SidebarIndexRoute: typeof SidebarIndexRoute
|
SidebarIndexRoute: typeof SidebarIndexRoute
|
||||||
SidebarContactsContractIdRoute: typeof SidebarContactsContractIdRoute
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const SidebarRouteChildren: SidebarRouteChildren = {
|
const SidebarRouteChildren: SidebarRouteChildren = {
|
||||||
|
SidebarContactsRoute: SidebarContactsRouteWithChildren,
|
||||||
SidebarIndexRoute: SidebarIndexRoute,
|
SidebarIndexRoute: SidebarIndexRoute,
|
||||||
SidebarContactsContractIdRoute: SidebarContactsContractIdRoute,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const SidebarRouteWithChildren =
|
const SidebarRouteWithChildren =
|
||||||
@@ -94,35 +120,39 @@ const SidebarRouteWithChildren =
|
|||||||
export interface FileRoutesByFullPath {
|
export interface FileRoutesByFullPath {
|
||||||
'': typeof SidebarRouteWithChildren
|
'': typeof SidebarRouteWithChildren
|
||||||
'/about': typeof AboutRoute
|
'/about': typeof AboutRoute
|
||||||
|
'/contacts': typeof SidebarContactsRouteWithChildren
|
||||||
'/': typeof SidebarIndexRoute
|
'/': typeof SidebarIndexRoute
|
||||||
'/contacts/$contractId': typeof SidebarContactsContractIdRoute
|
'/contacts/$contactId': typeof SidebarContactsContactIdRoute
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FileRoutesByTo {
|
export interface FileRoutesByTo {
|
||||||
'/about': typeof AboutRoute
|
'/about': typeof AboutRoute
|
||||||
|
'/contacts': typeof SidebarContactsRouteWithChildren
|
||||||
'/': typeof SidebarIndexRoute
|
'/': typeof SidebarIndexRoute
|
||||||
'/contacts/$contractId': typeof SidebarContactsContractIdRoute
|
'/contacts/$contactId': typeof SidebarContactsContactIdRoute
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FileRoutesById {
|
export interface FileRoutesById {
|
||||||
__root__: typeof rootRoute
|
__root__: typeof rootRoute
|
||||||
'/_sidebar': typeof SidebarRouteWithChildren
|
'/_sidebar': typeof SidebarRouteWithChildren
|
||||||
'/about': typeof AboutRoute
|
'/about': typeof AboutRoute
|
||||||
|
'/_sidebar/contacts': typeof SidebarContactsRouteWithChildren
|
||||||
'/_sidebar/': typeof SidebarIndexRoute
|
'/_sidebar/': typeof SidebarIndexRoute
|
||||||
'/_sidebar/contacts/$contractId': typeof SidebarContactsContractIdRoute
|
'/_sidebar/contacts/$contactId': typeof SidebarContactsContactIdRoute
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FileRouteTypes {
|
export interface FileRouteTypes {
|
||||||
fileRoutesByFullPath: FileRoutesByFullPath
|
fileRoutesByFullPath: FileRoutesByFullPath
|
||||||
fullPaths: '' | '/about' | '/' | '/contacts/$contractId'
|
fullPaths: '' | '/about' | '/contacts' | '/' | '/contacts/$contactId'
|
||||||
fileRoutesByTo: FileRoutesByTo
|
fileRoutesByTo: FileRoutesByTo
|
||||||
to: '/about' | '/' | '/contacts/$contractId'
|
to: '/about' | '/contacts' | '/' | '/contacts/$contactId'
|
||||||
id:
|
id:
|
||||||
| '__root__'
|
| '__root__'
|
||||||
| '/_sidebar'
|
| '/_sidebar'
|
||||||
| '/about'
|
| '/about'
|
||||||
|
| '/_sidebar/contacts'
|
||||||
| '/_sidebar/'
|
| '/_sidebar/'
|
||||||
| '/_sidebar/contacts/$contractId'
|
| '/_sidebar/contacts/$contactId'
|
||||||
fileRoutesById: FileRoutesById
|
fileRoutesById: FileRoutesById
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,20 +183,27 @@ export const routeTree = rootRoute
|
|||||||
"/_sidebar": {
|
"/_sidebar": {
|
||||||
"filePath": "_sidebar.tsx",
|
"filePath": "_sidebar.tsx",
|
||||||
"children": [
|
"children": [
|
||||||
"/_sidebar/",
|
"/_sidebar/contacts",
|
||||||
"/_sidebar/contacts/$contractId"
|
"/_sidebar/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"/about": {
|
"/about": {
|
||||||
"filePath": "about.tsx"
|
"filePath": "about.tsx"
|
||||||
},
|
},
|
||||||
|
"/_sidebar/contacts": {
|
||||||
|
"filePath": "_sidebar/contacts.tsx",
|
||||||
|
"parent": "/_sidebar",
|
||||||
|
"children": [
|
||||||
|
"/_sidebar/contacts/$contactId"
|
||||||
|
]
|
||||||
|
},
|
||||||
"/_sidebar/": {
|
"/_sidebar/": {
|
||||||
"filePath": "_sidebar/index.tsx",
|
"filePath": "_sidebar/index.tsx",
|
||||||
"parent": "/_sidebar"
|
"parent": "/_sidebar"
|
||||||
},
|
},
|
||||||
"/_sidebar/contacts/$contractId": {
|
"/_sidebar/contacts/$contactId": {
|
||||||
"filePath": "_sidebar/contacts.$contractId.tsx",
|
"filePath": "_sidebar/contacts.$contactId.tsx",
|
||||||
"parent": "/_sidebar"
|
"parent": "/_sidebar/contacts"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,14 @@ export const Route = createRootRoute({
|
|||||||
}]
|
}]
|
||||||
}),
|
}),
|
||||||
component: RootLayout,
|
component: RootLayout,
|
||||||
notFoundComponent: NotFoundComponent,
|
notFoundComponent: () => {
|
||||||
|
return (
|
||||||
|
<main id="error-page">
|
||||||
|
<h1>404</h1>
|
||||||
|
<p>The requested page could not be found.</p>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function RootLayout() {
|
function RootLayout() {
|
||||||
@@ -48,12 +55,3 @@ function RootDocument({ children }: Readonly<{ children: ReactNode }>) {
|
|||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function NotFoundComponent() {
|
|
||||||
return (
|
|
||||||
<main id="error-page">
|
|
||||||
<h1>404</h1>
|
|
||||||
<p>The requested page could not be found.</p>
|
|
||||||
</main>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,18 +1,26 @@
|
|||||||
import { createFileRoute, Link, Outlet } from '@tanstack/react-router';
|
import { createFileRoute, Link, Outlet } from '@tanstack/react-router';
|
||||||
import { getContacts } from "@/data";
|
import { fetchContacts } from "@/utils/contacts.tsx";
|
||||||
|
|
||||||
async function fetchContacts() {
|
|
||||||
const contacts = await getContacts();
|
|
||||||
return { contacts };
|
|
||||||
}
|
|
||||||
|
|
||||||
export const Route = createFileRoute('/_sidebar')({
|
export const Route = createFileRoute('/_sidebar')({
|
||||||
component: Sidebar,
|
component: Sidebar,
|
||||||
loader: fetchContacts,
|
loader: async () => fetchContacts(),
|
||||||
|
notFoundComponent: () => <div>Not Found</div>,
|
||||||
});
|
});
|
||||||
|
|
||||||
function Sidebar() {
|
function Sidebar() {
|
||||||
const { contacts } = Route.useLoaderData();
|
const contacts = Route.useLoaderData();
|
||||||
|
if (contacts === undefined) {
|
||||||
|
console.log("SIDEBAR ERROR!?");
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div id="sidebar">UNDEFINED LOADER DATA IN SIDEBAR</div>
|
||||||
|
<div id={'detail'}>
|
||||||
|
<Outlet/>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -40,7 +48,7 @@ function Sidebar() {
|
|||||||
<ul>
|
<ul>
|
||||||
{contacts.map((contact) => (
|
{contacts.map((contact) => (
|
||||||
<li key={contact.id}>
|
<li key={contact.id}>
|
||||||
<Link to="/contacts/$contractId" params={{ contractId: contact.id }}>
|
<Link to="/contacts/$contactId" params={{ contactId: contact.id }}>
|
||||||
{contact.first || contact.last ? (
|
{contact.first || contact.last ? (
|
||||||
<>
|
<>
|
||||||
{contact.first} {contact.last}
|
{contact.first} {contact.last}
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router';
|
import { createFileRoute } from '@tanstack/react-router';
|
||||||
import type { ContactRecord } from "@/data.ts";
|
import { type ContactRecord, fetchContact } from "@/utils/contacts.tsx";
|
||||||
|
|
||||||
export const Route = createFileRoute('/_sidebar/contacts/$contractId')({
|
export const Route = createFileRoute('/_sidebar/contacts/$contactId')({
|
||||||
|
loader: async ({ params }) => {
|
||||||
|
const contact = await fetchContact({ data: params.contactId });
|
||||||
|
return { contact };
|
||||||
|
},
|
||||||
component: Contact,
|
component: Contact,
|
||||||
|
notFoundComponent: () => {
|
||||||
|
return <p>Post not found!</p>;
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
function Contact() {
|
function Contact() {
|
||||||
const contact = {
|
const { contact } = Route.useLoaderData();
|
||||||
first: "Your",
|
|
||||||
last: "Name",
|
|
||||||
avatar: "https://placecats.com/200/200",
|
|
||||||
twitter: "your_handle",
|
|
||||||
notes: "Some notes",
|
|
||||||
favorite: true,
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="contact">
|
<div id="contact">
|
||||||
19
src/routes/_sidebar/contacts.tsx
Normal file
19
src/routes/_sidebar/contacts.tsx
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import { createFileRoute, Outlet } from '@tanstack/react-router';
|
||||||
|
|
||||||
|
export const Route = createFileRoute('/_sidebar/contacts')({
|
||||||
|
component: RouteComponent,
|
||||||
|
notFoundComponent: NotFoundContact,
|
||||||
|
});
|
||||||
|
|
||||||
|
function RouteComponent() {
|
||||||
|
return <Outlet/>;
|
||||||
|
}
|
||||||
|
|
||||||
|
function NotFoundContact() {
|
||||||
|
return (
|
||||||
|
<main id="error-page">
|
||||||
|
<h1>404</h1>
|
||||||
|
<p>The requested page could not be found.</p>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
20
src/utils/contacts.tsx
Normal file
20
src/utils/contacts.tsx
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import { createServerFn } from "@tanstack/react-start";
|
||||||
|
import { getContact, getContacts } from "@/data.ts";
|
||||||
|
import { notFound } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
export type { ContactRecord } from "@/data.ts";
|
||||||
|
|
||||||
|
export const fetchContacts = createServerFn({ method: 'GET' })
|
||||||
|
.handler(async () => {
|
||||||
|
console.log("Fetch Contacts");
|
||||||
|
return await getContacts();
|
||||||
|
});
|
||||||
|
|
||||||
|
export const fetchContact = createServerFn({ method: 'GET' })
|
||||||
|
.validator((data: string) => data)
|
||||||
|
.handler(async (ctx) => {
|
||||||
|
console.log(`Fetch Contact ${ctx.data}`);
|
||||||
|
const contact = await getContact(ctx.data);
|
||||||
|
if (contact === null) throw notFound();
|
||||||
|
return contact;
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user