Set up dependencies

This commit is contained in:
Savanni D'Gerinel 2025-02-16 20:50:50 -05:00
parent 8ab8cd0684
commit df1dfeaae3
9 changed files with 63 additions and 7 deletions

View File

@ -7,8 +7,8 @@ tasks:
build: build:
cmds: cmds:
- cd ../types && task build
- npm install typescript - npm install typescript
- typeshare --lang typescript --output-file gen/types.ts ../server/src
- npx tsc - npx tsc
test: test:

View File

@ -8,6 +8,9 @@
"name": "visions-client", "name": "visions-client",
"version": "0.0.1", "version": "0.0.1",
"license": "ISC", "license": "ISC",
"dependencies": {
"visions-types": "file:../types"
},
"devDependencies": { "devDependencies": {
"@types/jest": "^29.5.14", "@types/jest": "^29.5.14",
"jest": "^29.7.0", "jest": "^29.7.0",
@ -16,6 +19,17 @@
"typescript": "^5.7.3" "typescript": "^5.7.3"
} }
}, },
"../types": {
"name": "visions-types",
"version": "0.0.1",
"license": "ISC",
"dependencies": {
"typescript": "^5.7.3"
}
},
"../types/dist/lib.ts": {
"extraneous": true
},
"node_modules/@ampproject/remapping": { "node_modules/@ampproject/remapping": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
@ -3466,6 +3480,10 @@
"node": ">=10.12.0" "node": ">=10.12.0"
} }
}, },
"node_modules/visions-types": {
"resolved": "../types",
"link": true
},
"node_modules/walker": { "node_modules/walker": {
"version": "1.0.8", "version": "1.0.8",
"resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz",

View File

@ -19,5 +19,8 @@
"prettier": "^3.5.1", "prettier": "^3.5.1",
"ts-jest": "^29.2.5", "ts-jest": "^29.2.5",
"typescript": "^5.7.3" "typescript": "^5.7.3"
},
"dependencies": {
"visions-types": "file:../types"
} }
} }

View File

@ -1,4 +1,4 @@
import { Connection } from './client' import { Connection } from './lib'
describe('what happens in an authentication', () => { describe('what happens in an authentication', () => {
it('handles a successful response', async () => { it('handles a successful response', async () => {

View File

@ -1,4 +1,4 @@
import { AuthResponse, SessionId, UserOverview } from '../gen/types' import { AuthResponse, SessionId, UserOverview } from 'visions-types'
export interface Client { export interface Client {
auth: ( auth: (

View File

@ -4,5 +4,4 @@ tasks:
build: build:
cmds: cmds:
- npm install typescript - npm install typescript
- typeshare --lang typescript --output-file gen/lib.ts ../server/src - typeshare --lang typescript --output-file dist/lib.ts ../server/src
- npx tsc

View File

@ -3,6 +3,7 @@
"version": "0.0.1", "version": "0.0.1",
"description": "Shared data types for Visions", "description": "Shared data types for Visions",
"main": "visions.js", "main": "visions.js",
"types": "dist/lib.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },

View File

@ -9,7 +9,9 @@
"version": "0.0.0", "version": "0.0.0",
"dependencies": { "dependencies": {
"react": "^19.0.0", "react": "^19.0.0",
"react-dom": "^19.0.0" "react-dom": "^19.0.0",
"visions-client": "file:../client",
"visions-types": "file:../types"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.19.0", "@eslint/js": "^9.19.0",
@ -30,6 +32,29 @@
"vite": "^6.1.0" "vite": "^6.1.0"
} }
}, },
"../client": {
"name": "visions-client",
"version": "0.0.1",
"license": "ISC",
"dependencies": {
"visions-types": "file:../types"
},
"devDependencies": {
"@types/jest": "^29.5.14",
"jest": "^29.7.0",
"prettier": "^3.5.1",
"ts-jest": "^29.2.5",
"typescript": "^5.7.3"
}
},
"../types": {
"name": "visions-types",
"version": "0.0.1",
"license": "ISC",
"dependencies": {
"typescript": "^5.7.3"
}
},
"node_modules/@ampproject/remapping": { "node_modules/@ampproject/remapping": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
@ -6678,6 +6703,14 @@
"node": ">=10.12.0" "node": ">=10.12.0"
} }
}, },
"node_modules/visions-client": {
"resolved": "../client",
"link": true
},
"node_modules/visions-types": {
"resolved": "../types",
"link": true
},
"node_modules/vite": { "node_modules/vite": {
"version": "6.1.0", "version": "6.1.0",
"resolved": "https://registry.npmjs.org/vite/-/vite-6.1.0.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-6.1.0.tgz",

View File

@ -13,7 +13,9 @@
}, },
"dependencies": { "dependencies": {
"react": "^19.0.0", "react": "^19.0.0",
"react-dom": "^19.0.0" "react-dom": "^19.0.0",
"visions-client": "file:../client",
"visions-types": "file:../types"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.19.0", "@eslint/js": "^9.19.0",