mirror of
https://github.com/classchartsapi/classcharts-api-js.git
synced 2026-05-11 18:59:05 +00:00
fix: remove import map
Doesn't work with importing in deno
This commit is contained in:
parent
51af82ea9a
commit
b2af13c315
8 changed files with 16 additions and 19 deletions
|
|
@ -2,8 +2,5 @@
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"npm": "deno run -A scripts/build_npm.ts"
|
"npm": "deno run -A scripts/build_npm.ts"
|
||||||
},
|
},
|
||||||
"exclude": ["npm"],
|
"exclude": ["npm"]
|
||||||
"imports": {
|
|
||||||
"~/": "./"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
4
mod.ts
4
mod.ts
|
|
@ -1,2 +1,2 @@
|
||||||
export * from "~/src/core/studentClient.ts";
|
export * from "./src/core/studentClient.ts";
|
||||||
export * from "~/src/core/parentClient.ts";
|
export * from "./src/core/parentClient.ts";
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import type {
|
||||||
LessonsResponse,
|
LessonsResponse,
|
||||||
PupilFieldsResponse,
|
PupilFieldsResponse,
|
||||||
} from "../types.ts";
|
} from "../types.ts";
|
||||||
import { PING_INTERVAL } from "~/src/utils/consts.ts";
|
import { PING_INTERVAL } from "../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 "~/src/core/baseClient.ts";
|
import { BaseClient } from "../core/baseClient.ts";
|
||||||
import { API_BASE_PARENT, BASE_URL } from "~/src/utils/consts.ts";
|
import { API_BASE_PARENT, BASE_URL } from "../utils/consts.ts";
|
||||||
import { parseCookies } from "~/src/utils/utils.ts";
|
import { parseCookies } from "../utils/utils.ts";
|
||||||
/**
|
/**
|
||||||
* Parent Client
|
* Parent Client
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { assertRejects } from "~/deps_dev.ts";
|
import { assertRejects } from "../../deps_dev.ts";
|
||||||
import { ParentClient } from "~/src/core/parentClient.ts";
|
import { ParentClient } from "../core/parentClient.ts";
|
||||||
|
|
||||||
Deno.test("Throws when no email is provided", async () => {
|
Deno.test("Throws when no email is provided", async () => {
|
||||||
const client = new ParentClient("", "password");
|
const client = new ParentClient("", "password");
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { API_BASE_STUDENT, BASE_URL } from "~/src/utils/consts.ts";
|
import { API_BASE_STUDENT, BASE_URL } from "../utils/consts.ts";
|
||||||
import { BaseClient } from "~/src/core/baseClient.ts";
|
import { BaseClient } from "../core/baseClient.ts";
|
||||||
import { parseCookies } from "~/src/utils/utils.ts";
|
import { parseCookies } from "../utils/utils.ts";
|
||||||
import { RewardPurchaseResponse, RewardsResponse } from "~/src/types.ts";
|
import { RewardPurchaseResponse, RewardsResponse } from "../types.ts";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Student Client
|
* Student Client
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { assertRejects } from "~/deps_dev.ts";
|
import { assertRejects } from "../../deps_dev.ts";
|
||||||
import { StudentClient } from "~/src/core/studentClient.ts";
|
import { StudentClient } from "../core/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,4 +1,4 @@
|
||||||
import { assertEquals, assertExists } from "~/deps_dev.ts";
|
import { assertEquals, assertExists } from "../../deps_dev.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