corebasic 1.0.252 → 1.0.254

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.
@@ -13,8 +13,6 @@ const LEAF_DIR = `${Utils.PROJECT_ROOT_PATH}/leaf`;
13
13
  // const TYPES_DIR = `${Utils.PROJECT_ROOT_PATH}/types`
14
14
  // const REMOTES_DIR = `${Utils.PROJECT_ROOT_PATH}/types/remotes`
15
15
  const g_this = globalThis;
16
- g_this.Schemas ??= {};
17
- g_this.Types ??= { Remotes: {} };
18
16
  async function schema_init(collection, partial) {
19
17
  const module = await import(__rewriteRelativeImportExtension(`${SCHEMAS_DIR}/${collection}.ts`));
20
18
  return module.default(partial);
package/libs/schemas.ts CHANGED
@@ -7,8 +7,8 @@ const LEAF_DIR = `${Utils.PROJECT_ROOT_PATH}/leaf`
7
7
  // const REMOTES_DIR = `${Utils.PROJECT_ROOT_PATH}/types/remotes`
8
8
 
9
9
  const g_this: any = globalThis as any
10
- g_this.Schemas ??= {};
11
- g_this.Types ??= {Remotes: {}};
10
+ // g_this.Schemas ??= {};
11
+ // g_this.Types ??= {Remotes: {}};
12
12
 
13
13
 
14
14
  // ================
package/libs/session.ts CHANGED
@@ -45,7 +45,7 @@ export const start = (expressApp: ExpressApp, allowedUrls: string[]) => {
45
45
  const checkPrivilege = async (req: Req) => {
46
46
  const staff = Utils.isEmpty(req.body.staff) ? 'BLANK_STAFF' : req.body.staff
47
47
  type PrivilegeResponse = {data: {granted: boolean}}
48
- const response = (await Features.send({company: req.body.company, outlet: req.body.outlet, app: req.body.app}, "privileges.query.check" as keyof FeatureTypes, {feature: req.body.feature } as any as never, {id: staff} as Features.FeatureParams)) as PrivilegeResponse
48
+ const response = (await Features.send({company: req.body.company, outlet: req.body.outlet, app: req.body.app}, "privileges.query.check" as keyof FeatureTypes, {feature: req.body.feature } as any as never, {id: staff} as Features.FeatureParams)) as unknown as PrivilegeResponse
49
49
  const granted = response.data.granted
50
50
  if (!granted)
51
51
  throw {message: "Access Denied"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "corebasic",
3
3
  "type": "module",
4
- "version": "1.0.252",
4
+ "version": "1.0.254",
5
5
  "description": "",
6
6
  "main": "dist/index.js",
7
7
  "types": "./index.ts",