corebasic 1.0.242 → 1.0.244
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/arcc +2 -0
- package/libs/dip.ts +12 -0
- package/libs/features.ts +1 -1
- package/libs/session.ts +1 -1
- package/package.json +1 -1
- package/tsc +2 -0
- package/tsconfig.json +4 -1
package/arcc
ADDED
package/libs/dip.ts
CHANGED
|
@@ -117,6 +117,18 @@ export const idip = async (meta: Elabase.DipMeta, txn: string, callback: (idip:
|
|
|
117
117
|
await doCleanup(IDip)
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
declare global {
|
|
121
|
+
type DefaultSchema = {
|
|
122
|
+
created: number
|
|
123
|
+
updated: number
|
|
124
|
+
createdBy: string
|
|
125
|
+
updatedBy: string
|
|
126
|
+
createdByUser: string
|
|
127
|
+
updatedByUser: string
|
|
128
|
+
company: string
|
|
129
|
+
outlet: string
|
|
130
|
+
}
|
|
131
|
+
}
|
|
120
132
|
|
|
121
133
|
export const insertKeys = (message: DipMessage, meta: Elabase.DipMeta) => {
|
|
122
134
|
if (!isDipMeta(meta)) throw new Error('Error: Provided meta is not an instance of DipMeta in Dip.insertKeys()')
|
package/libs/features.ts
CHANGED
|
@@ -524,7 +524,7 @@ async function subscribe() {
|
|
|
524
524
|
|
|
525
525
|
while (true) {
|
|
526
526
|
try {
|
|
527
|
-
await Features.send(message.meta, consumer as keyof FeatureTypes, message.data as any, message.params as FeatureParams)
|
|
527
|
+
await Features.send(message.meta, consumer as keyof FeatureTypes, message.data as any as never, message.params as FeatureParams)
|
|
528
528
|
break
|
|
529
529
|
} catch {
|
|
530
530
|
console.warn(`Feature: ${consumer}, error in executing handler during Features.subscribe(topic: ${topic})`)
|
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, {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 PrivilegeResponse
|
|
49
49
|
const granted = response.data.granted
|
|
50
50
|
if (!granted)
|
|
51
51
|
throw {message: "Access Denied"}
|
package/package.json
CHANGED
package/tsc
ADDED
package/tsconfig.json
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"exclude": [
|
|
3
|
+
"toolchains"
|
|
4
|
+
],
|
|
2
5
|
// Visit https://aka.ms/tsconfig to read more about this file
|
|
3
6
|
"compilerOptions": {
|
|
4
7
|
|
|
@@ -16,7 +19,7 @@
|
|
|
16
19
|
// "types": [],
|
|
17
20
|
// For nodejs:
|
|
18
21
|
// "lib": ["esnext"],
|
|
19
|
-
"typeRoots": ["tsc/@types"],
|
|
22
|
+
"typeRoots": ["toolchains/tsc/@types"],
|
|
20
23
|
"types": ["node"],
|
|
21
24
|
// and npm install -D @types/node
|
|
22
25
|
|