bgmt 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn.cjs +4 -4
- package/dist/cdn.d.cts +10 -3
- package/dist/cdn.d.mts +10 -3
- package/dist/cdn.mjs +4 -4
- package/package.json +1 -1
package/dist/cdn.cjs
CHANGED
|
@@ -4,19 +4,19 @@ async function fetchBasicSubjects(options = {}) {
|
|
|
4
4
|
const { version = "0", baseURL = "https://unpkg.com" } = options;
|
|
5
5
|
const resp = await fetch(`${baseURL}/bgmd@${version}/dist/index.json`);
|
|
6
6
|
if (!resp.ok) throw new Error(`Fetch bgmd index.json failed`, { cause: resp });
|
|
7
|
-
return
|
|
7
|
+
return await resp.json();
|
|
8
8
|
}
|
|
9
9
|
async function fetchFullSubjects(options = {}) {
|
|
10
10
|
const { version = "0", baseURL = "https://unpkg.com" } = options;
|
|
11
11
|
const resp = await fetch(`${baseURL}/bgmd@${version}/dist/full.json`);
|
|
12
12
|
if (!resp.ok) throw new Error(`Fetch bgmd full.json failed`, { cause: resp });
|
|
13
|
-
return
|
|
13
|
+
return await resp.json();
|
|
14
14
|
}
|
|
15
|
-
async function fetchCalendarSubjects(options) {
|
|
15
|
+
async function fetchCalendarSubjects(options = {}) {
|
|
16
16
|
const { version = "0", baseURL = "https://unpkg.com" } = options;
|
|
17
17
|
const resp = await fetch(`${baseURL}/bgmd@${version}/dist/calendar.json`);
|
|
18
18
|
if (!resp.ok) throw new Error(`Fetch bgmd calendar.json failed`, { cause: resp });
|
|
19
|
-
return
|
|
19
|
+
return await resp.json();
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
//#endregion
|
package/dist/cdn.d.cts
CHANGED
|
@@ -15,9 +15,16 @@ interface CdnOptions {
|
|
|
15
15
|
*/
|
|
16
16
|
baseURL?: string;
|
|
17
17
|
}
|
|
18
|
-
declare function fetchBasicSubjects(options?: CdnOptions): Promise<
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
declare function fetchBasicSubjects(options?: CdnOptions): Promise<{
|
|
19
|
+
version: string;
|
|
20
|
+
subjects: BasicSubject[];
|
|
21
|
+
}>;
|
|
22
|
+
declare function fetchFullSubjects(options?: CdnOptions): Promise<{
|
|
23
|
+
version: string;
|
|
24
|
+
subjects: FullSubject[];
|
|
25
|
+
}>;
|
|
26
|
+
declare function fetchCalendarSubjects(options?: CdnOptions): Promise<{
|
|
27
|
+
version: string;
|
|
21
28
|
calendar: [BasicSubject[], BasicSubject[], BasicSubject[], BasicSubject[], BasicSubject[], BasicSubject[], BasicSubject[]];
|
|
22
29
|
web: BasicSubject[];
|
|
23
30
|
}>;
|
package/dist/cdn.d.mts
CHANGED
|
@@ -15,9 +15,16 @@ interface CdnOptions {
|
|
|
15
15
|
*/
|
|
16
16
|
baseURL?: string;
|
|
17
17
|
}
|
|
18
|
-
declare function fetchBasicSubjects(options?: CdnOptions): Promise<
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
declare function fetchBasicSubjects(options?: CdnOptions): Promise<{
|
|
19
|
+
version: string;
|
|
20
|
+
subjects: BasicSubject[];
|
|
21
|
+
}>;
|
|
22
|
+
declare function fetchFullSubjects(options?: CdnOptions): Promise<{
|
|
23
|
+
version: string;
|
|
24
|
+
subjects: FullSubject[];
|
|
25
|
+
}>;
|
|
26
|
+
declare function fetchCalendarSubjects(options?: CdnOptions): Promise<{
|
|
27
|
+
version: string;
|
|
21
28
|
calendar: [BasicSubject[], BasicSubject[], BasicSubject[], BasicSubject[], BasicSubject[], BasicSubject[], BasicSubject[]];
|
|
22
29
|
web: BasicSubject[];
|
|
23
30
|
}>;
|
package/dist/cdn.mjs
CHANGED
|
@@ -3,19 +3,19 @@ async function fetchBasicSubjects(options = {}) {
|
|
|
3
3
|
const { version = "0", baseURL = "https://unpkg.com" } = options;
|
|
4
4
|
const resp = await fetch(`${baseURL}/bgmd@${version}/dist/index.json`);
|
|
5
5
|
if (!resp.ok) throw new Error(`Fetch bgmd index.json failed`, { cause: resp });
|
|
6
|
-
return
|
|
6
|
+
return await resp.json();
|
|
7
7
|
}
|
|
8
8
|
async function fetchFullSubjects(options = {}) {
|
|
9
9
|
const { version = "0", baseURL = "https://unpkg.com" } = options;
|
|
10
10
|
const resp = await fetch(`${baseURL}/bgmd@${version}/dist/full.json`);
|
|
11
11
|
if (!resp.ok) throw new Error(`Fetch bgmd full.json failed`, { cause: resp });
|
|
12
|
-
return
|
|
12
|
+
return await resp.json();
|
|
13
13
|
}
|
|
14
|
-
async function fetchCalendarSubjects(options) {
|
|
14
|
+
async function fetchCalendarSubjects(options = {}) {
|
|
15
15
|
const { version = "0", baseURL = "https://unpkg.com" } = options;
|
|
16
16
|
const resp = await fetch(`${baseURL}/bgmd@${version}/dist/calendar.json`);
|
|
17
17
|
if (!resp.ok) throw new Error(`Fetch bgmd calendar.json failed`, { cause: resp });
|
|
18
|
-
return
|
|
18
|
+
return await resp.json();
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
//#endregion
|