diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index fcfbebd..0000000 --- a/package-lock.json +++ /dev/null @@ -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==" - } - } -} diff --git a/package.json b/package.json index 2841919..4c61466 100644 --- a/package.json +++ b/package.json @@ -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" -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..baa2f12 --- /dev/null +++ b/pnpm-lock.yaml @@ -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 diff --git a/src/client.ts b/src/client.ts index 0eb52cc..956dbc1 100644 --- a/src/client.ts +++ b/src/client.ts @@ -82,11 +82,6 @@ export class ClasschartsClient { this.studentId = user.id this.studentName = user.name } - - /** - * - * @returns {Promise} - */ async getStudentInfo(): Promise { 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>} - */ async listHomeworks( options: GetHomeworkOptions | null ): Promise { @@ -154,11 +142,6 @@ export class ClasschartsClient { } return data } - /** - * - * @param date - * @returns {Promise} - */ async getLessons(options: GetLessonsOptions): Promise { if (!this.authCookies) throw new Error('Not authenticated') if (!options?.date) throw new Error('No date specified')