mirror of
https://github.com/classchartsapi/classcharts-api-js.git
synced 2026-05-14 19:59:37 +00:00
chore: move deno dev deps to deps file && use import map
This commit is contained in:
parent
c5e7b3f24e
commit
a022c8a8ad
8 changed files with 20 additions and 16 deletions
|
|
@ -2,5 +2,8 @@
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"npm": "deno run -A scripts/build_npm.ts"
|
"npm": "deno run -A scripts/build_npm.ts"
|
||||||
},
|
},
|
||||||
"exclude": ["npm"]
|
"exclude": ["npm"],
|
||||||
|
"imports": {
|
||||||
|
"~/": "./"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
5
deps_dev.ts
Normal file
5
deps_dev.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
export {
|
||||||
|
assertEquals,
|
||||||
|
assertExists,
|
||||||
|
assertRejects,
|
||||||
|
} from "https://deno.land/std@0.200.0/assert/mod.ts";
|
||||||
|
|
@ -13,6 +13,7 @@ await build({
|
||||||
path: "./src/types.ts",
|
path: "./src/types.ts",
|
||||||
}],
|
}],
|
||||||
outDir: "./npm",
|
outDir: "./npm",
|
||||||
|
importMap: "./deno.jsonc",
|
||||||
shims: {
|
shims: {
|
||||||
deno: true,
|
deno: true,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import type {
|
||||||
HomeworksResponse,
|
HomeworksResponse,
|
||||||
LessonsResponse,
|
LessonsResponse,
|
||||||
} from "../types.ts";
|
} from "../types.ts";
|
||||||
import { PING_INTERVAL } from "../utils/consts.ts";
|
import { PING_INTERVAL } from "~/src/utils/consts.ts";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shared client for both parent and student. This is not exported and should not be used directly
|
* Shared client for both parent and student. This is not exported and should not be used directly
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import type { GetPupilsResponse } from "../types.ts";
|
import type { GetPupilsResponse } from "../types.ts";
|
||||||
|
|
||||||
import { BaseClient } from "./baseClient.ts";
|
import { BaseClient } from "~/src/core/baseClient.ts";
|
||||||
import { API_BASE_PARENT, BASE_URL } from "../utils/consts.ts";
|
import { API_BASE_PARENT, BASE_URL } from "~/src/utils/consts.ts";
|
||||||
import { parseCookies } from "../utils/utils.ts";
|
import { parseCookies } from "~/src/utils/utils.ts";
|
||||||
/**
|
/**
|
||||||
* Parent Client
|
* Parent Client
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { API_BASE_STUDENT, BASE_URL } from "../utils/consts.ts";
|
import { API_BASE_STUDENT, BASE_URL } from "~/src/utils/consts.ts";
|
||||||
import { BaseClient } from "./baseClient.ts";
|
import { BaseClient } from "~/src/core/baseClient.ts";
|
||||||
import { parseCookies } from "../utils/utils.ts";
|
import { parseCookies } from "~/src/utils/utils.ts";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Student Client
|
* Student Client
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import { assertRejects } from "https://deno.land/std@0.200.0/assert/mod.ts";
|
import { assertRejects } from "~/deps_dev.ts";
|
||||||
|
import { StudentClient } from "~/src/core/studentClient.ts";
|
||||||
import { StudentClient } from "./studentClient.ts";
|
|
||||||
|
|
||||||
Deno.test("Throws when no student code is provided", async () => {
|
Deno.test("Throws when no student code is provided", async () => {
|
||||||
const client = new StudentClient("");
|
const client = new StudentClient("");
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,4 @@
|
||||||
import {
|
import { assertEquals, assertExists } from "~/deps_dev.ts";
|
||||||
assertEquals,
|
|
||||||
assertExists,
|
|
||||||
} from "https://deno.land/std@0.200.0/assert/mod.ts";
|
|
||||||
|
|
||||||
import { parseCookies } from "./utils.ts";
|
import { parseCookies } from "./utils.ts";
|
||||||
Deno.test("Parses simple cookie", () => {
|
Deno.test("Parses simple cookie", () => {
|
||||||
const cookie =
|
const cookie =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue