corebasic 1.0.237 → 1.0.239
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/libs/schemas.js +3 -2
- package/libs/elabase.ts +2 -2
- package/libs/schemas.ts +4 -2
- package/package.json +1 -1
package/dist/libs/schemas.js
CHANGED
|
@@ -8,11 +8,12 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
|
|
|
8
8
|
};
|
|
9
9
|
import { readdir } from "node:fs/promises";
|
|
10
10
|
import * as Utils from './utils.js';
|
|
11
|
+
const SCHEMAS_DIR = `${Utils.PROJECT_ROOT_PATH}/schemas`;
|
|
11
12
|
const g_this = globalThis;
|
|
12
13
|
g_this.Schemas ??= {};
|
|
13
|
-
for (const file of await readdir(
|
|
14
|
+
for (const file of await readdir(SCHEMAS_DIR)) {
|
|
14
15
|
if (file.endsWith(".ts") && file !== "index.ts") {
|
|
15
|
-
const schema = await import(__rewriteRelativeImportExtension(`${
|
|
16
|
+
const schema = await import(__rewriteRelativeImportExtension(`${SCHEMAS_DIR}/${file}`));
|
|
16
17
|
Object.assign(g_this.Schemas, schema.Schemas);
|
|
17
18
|
}
|
|
18
19
|
}
|
package/libs/elabase.ts
CHANGED
|
@@ -619,9 +619,9 @@ function execute(arg: DipRequest) {
|
|
|
619
619
|
|
|
620
620
|
result.getSliceAsText = (offset: number, length: number): string => Cpp.getSliceAsText(result.data, offset, length)
|
|
621
621
|
result.getSliceAsArrayBuffer = (offset: number, length: number): Buffer => Cpp.getSliceAsArrayBuffer(result.data, offset, length)
|
|
622
|
-
result["Content-Type"] = result.headers["content-type"]
|
|
622
|
+
result["Content-Type"] = result.headers["content-type"] as string
|
|
623
623
|
result.body = result.data
|
|
624
|
-
if (result.headers["content-type"].includes("application/json"))
|
|
624
|
+
if ((result.headers["content-type"] as string).includes("application/json"))
|
|
625
625
|
result.body = JSON.parse(result.data)
|
|
626
626
|
|
|
627
627
|
let parsed = parseBinaryResponse(result)
|
package/libs/schemas.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { readdir } from "node:fs/promises"
|
|
2
2
|
import * as Utils from './utils.ts'
|
|
3
3
|
|
|
4
|
+
const SCHEMAS_DIR = `${Utils.PROJECT_ROOT_PATH}/schemas`
|
|
5
|
+
|
|
4
6
|
const g_this: any = globalThis as any
|
|
5
7
|
g_this.Schemas ??= {};
|
|
6
8
|
|
|
7
|
-
for (const file of await readdir(
|
|
9
|
+
for (const file of await readdir(SCHEMAS_DIR)) {
|
|
8
10
|
if (file.endsWith(".ts") && file !== "index.ts") {
|
|
9
|
-
const schema = await import(`${
|
|
11
|
+
const schema = await import(`${SCHEMAS_DIR}/${file}`)
|
|
10
12
|
Object.assign(g_this.Schemas, schema.Schemas)
|
|
11
13
|
}
|
|
12
14
|
}
|