1
0
Fork 0
mirror of https://github.com/classchartsapi/classcharts-api-js.git synced 2026-05-14 03:56:59 +00:00

chore: pnpm

This commit is contained in:
James Cook 2021-10-29 14:59:24 +01:00
parent 18c80a13b9
commit 67fe788090
4 changed files with 33 additions and 87 deletions

66
package-lock.json generated
View file

@ -1,66 +0,0 @@
{
"name": "classcharts-api",
"version": "0.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "classcharts-api",
"version": "0.0.1",
"license": "ISC",
"dependencies": {
"undici": "^4.9.1"
},
"devDependencies": {
"@types/node": "^16.11.6",
"typescript": "^4.4.4"
}
},
"node_modules/@types/node": {
"version": "16.11.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.6.tgz",
"integrity": "sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==",
"dev": true
},
"node_modules/typescript": {
"version": "4.4.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz",
"integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=4.2.0"
}
},
"node_modules/undici": {
"version": "4.9.1",
"resolved": "https://registry.npmjs.org/undici/-/undici-4.9.1.tgz",
"integrity": "sha512-2idBVoUuxp5ByT15DDs3BjmU278D9gr6gDh3tNwOMw8TiHfueq+qHdhHHj8vNIi1UTTmn1cxL2VF3ONry+eS2w==",
"engines": {
"node": ">=12.18"
}
}
},
"dependencies": {
"@types/node": {
"version": "16.11.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.6.tgz",
"integrity": "sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==",
"dev": true
},
"typescript": {
"version": "4.4.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz",
"integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==",
"dev": true
},
"undici": {
"version": "4.9.1",
"resolved": "https://registry.npmjs.org/undici/-/undici-4.9.1.tgz",
"integrity": "sha512-2idBVoUuxp5ByT15DDs3BjmU278D9gr6gDh3tNwOMw8TiHfueq+qHdhHHj8vNIi1UTTmn1cxL2VF3ONry+eS2w=="
}
}
}

View file

@ -7,17 +7,16 @@
},
"main": "./index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"prepublishOnly": "npx tsc && node dist/release.js"
"prepublishOnly": "pnpm tsc && node dist/release.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"undici": "^4.9.1"
"undici": "^4.9.2"
},
"devDependencies": {
"@types/node": "^16.11.6",
"typescript": "^4.4.4"
},
"types": "./index.d.ts"
}
}

30
pnpm-lock.yaml generated Normal file
View file

@ -0,0 +1,30 @@
lockfileVersion: 5.3
specifiers:
'@types/node': ^16.11.6
typescript: ^4.4.4
undici: ^4.9.2
dependencies:
undici: 4.9.2
devDependencies:
'@types/node': 16.11.6
typescript: 4.4.4
packages:
/@types/node/16.11.6:
resolution: {integrity: sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==}
dev: true
/typescript/4.4.4:
resolution: {integrity: sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==}
engines: {node: '>=4.2.0'}
hasBin: true
dev: true
/undici/4.9.2:
resolution: {integrity: sha512-O8D4fp0cT7/bOMe7XE2oc0PaBCyc0GsahzQ+nMSeWW0o0+EB2ykXYNhU0kY2nKP589zzS91pLj979NtJrBRwFQ==}
engines: {node: '>=12.18'}
dev: false

View file

@ -82,11 +82,6 @@ export class ClasschartsClient {
this.studentId = user.id
this.studentName = user.name
}
/**
*
* @returns {Promise<Student>}
*/
async getStudentInfo(): Promise<Student> {
if (!this.authCookies) throw new Error('Not authenticated')
const data = await this.makeAuthedRequest(API_BASE + '/ping', {
@ -122,13 +117,6 @@ export class ClasschartsClient {
}
)
}
/**
* Gets all the homework from
* @param displayDate {DisplayDate}
* @param fromDate
* @param toDate
* @returns {Promise<Array<Homework>>}
*/
async listHomeworks(
options: GetHomeworkOptions | null
): Promise<HomeworksResponse> {
@ -154,11 +142,6 @@ export class ClasschartsClient {
}
return data
}
/**
*
* @param date
* @returns {Promise<LessonsResponse>}
*/
async getLessons(options: GetLessonsOptions): Promise<LessonsResponse> {
if (!this.authCookies) throw new Error('Not authenticated')
if (!options?.date) throw new Error('No date specified')