@live-change/relations-plugin 0.9.77 → 0.9.79
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/package.json +4 -4
- package/src/entity.ts +78 -0
- package/{entity.js → src/entityUtils.ts} +29 -94
- package/src/types.ts +36 -0
- package/tsconfig.json +28 -0
- /package/{boundTo.js → src/boundTo.js} +0 -0
- /package/{boundToAny.js → src/boundToAny.js} +0 -0
- /package/{changeTriggers.js → src/changeTriggers.js} +0 -0
- /package/{combinations.js → src/combinations.js} +0 -0
- /package/{dataUtils.js → src/dataUtils.js} +0 -0
- /package/{index.js → src/index.js} +0 -0
- /package/{itemEvents.js → src/itemEvents.js} +0 -0
- /package/{itemOf.js → src/itemOf.js} +0 -0
- /package/{itemOfAny.js → src/itemOfAny.js} +0 -0
- /package/{pluralRelationAnyUtils.js → src/pluralRelationAnyUtils.js} +0 -0
- /package/{pluralRelationUtils.js → src/pluralRelationUtils.js} +0 -0
- /package/{propertyEvents.js → src/propertyEvents.js} +0 -0
- /package/{propertyOf.js → src/propertyOf.js} +0 -0
- /package/{propertyOfAny.js → src/propertyOfAny.js} +0 -0
- /package/{relatedTo.js → src/relatedTo.js} +0 -0
- /package/{relatedToAny.js → src/relatedToAny.js} +0 -0
- /package/{saveAuthor.js → src/saveAuthor.js} +0 -0
- /package/{singularRelationAnyUtils.js → src/singularRelationAnyUtils.js} +0 -0
- /package/{singularRelationUtils.js → src/singularRelationUtils.js} +0 -0
- /package/{utils.js → src/utils.js} +0 -0
- /package/{utilsAny.js → src/utilsAny.js} +0 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/relations-plugin",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.79",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
5
|
+
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "NODE_ENV=test tape tests/*"
|
|
8
8
|
},
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"type": "module",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@live-change/framework": "^0.9.
|
|
25
|
+
"@live-change/framework": "^0.9.79",
|
|
26
26
|
"pluralize": "^8.0.0"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "68d2965e5a3b780063a5d0f9ce71d911fd1fb6be"
|
|
29
29
|
}
|
package/src/entity.ts
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import {
|
|
2
|
+
includeAccessRoles, defineGlobalRangeView
|
|
3
|
+
} from './utils.js'
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
defineView, defineCreatedEvent, defineUpdatedEvent, defineDeletedEvent, defineCreateAction,
|
|
7
|
+
defineUpdateAction, defineDeleteAction, defineCreateTrigger, defineUpdateTrigger, defineDeleteTrigger
|
|
8
|
+
} from './entityUtils.js'
|
|
9
|
+
|
|
10
|
+
const annotation = 'entity'
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
export default function(service, app) {
|
|
14
|
+
if (!service) throw new Error("no service")
|
|
15
|
+
if (!app) throw new Error("no app")
|
|
16
|
+
|
|
17
|
+
for(let modelName in service.models) {
|
|
18
|
+
const model = service.models[modelName]
|
|
19
|
+
const config = model[annotation]
|
|
20
|
+
if(!config) continue
|
|
21
|
+
|
|
22
|
+
if (model[annotation + 'Processed']) throw new Error("duplicated processing of " + annotation + " processor")
|
|
23
|
+
model[annotation + 'Processed'] = true
|
|
24
|
+
|
|
25
|
+
const originalModelProperties = { ...model.properties }
|
|
26
|
+
const modelProperties = Object.keys(model.properties)
|
|
27
|
+
const modelPropertyName = modelName.slice(0, 1).toLowerCase() + modelName.slice(1)
|
|
28
|
+
|
|
29
|
+
model.identifiers = [{ name: modelPropertyName, field: 'id' }]
|
|
30
|
+
model.crud = {}
|
|
31
|
+
includeAccessRoles(model, [
|
|
32
|
+
config.readAccessControl, config.writeAccessControl,
|
|
33
|
+
config.createAccessControl, config.updateAccessControl, config.deleteAccessControl
|
|
34
|
+
])
|
|
35
|
+
|
|
36
|
+
function modelRuntime() {
|
|
37
|
+
return service._runtime.models[modelName]
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (!model.indexes) {
|
|
41
|
+
model.indexes = {}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const writeableProperties = modelProperties || config.writeableProperties
|
|
45
|
+
//console.log("PPP", others)
|
|
46
|
+
const objectType = service.name + '_' + modelName
|
|
47
|
+
|
|
48
|
+
const context = {
|
|
49
|
+
service, app, model, originalModelProperties, modelProperties, modelPropertyName, modelRuntime,
|
|
50
|
+
modelName, writeableProperties, annotation, objectType
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
defineView(config, context, config.readAccess || config.readAccessControl || config.writeAccessControl)
|
|
54
|
+
defineGlobalRangeView(config, context, config.readAllAccess)
|
|
55
|
+
/// TODO: multiple views with limited fields
|
|
56
|
+
|
|
57
|
+
defineCreatedEvent(config, context)
|
|
58
|
+
defineUpdatedEvent(config, context)
|
|
59
|
+
defineDeletedEvent(config, context)
|
|
60
|
+
|
|
61
|
+
defineCreateTrigger(config, context)
|
|
62
|
+
defineUpdateTrigger(config, context)
|
|
63
|
+
defineDeleteTrigger(config, context)
|
|
64
|
+
|
|
65
|
+
if (config.createAccess || config.writeAccess || config.createAccessControl || config.writeAccessControl) {
|
|
66
|
+
defineCreateAction(config, context)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (config.updateAccess || config.writeAccess || config.updateAccessControl || config.writeAccessControl) {
|
|
70
|
+
defineUpdateAction(config, context)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (config.deleteAccess || config.writeAccess || config.deleteAccessControl || config.writeAccessControl) {
|
|
74
|
+
defineDeleteAction(config, context)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -4,15 +4,18 @@ import {
|
|
|
4
4
|
includeAccessRoles, defineGlobalRangeView
|
|
5
5
|
} from './utils.js'
|
|
6
6
|
import { fireChangeTriggers } from "./changeTriggers.js"
|
|
7
|
-
import App from '@live-change/framework'
|
|
7
|
+
import App, { ServiceDefinition } from '@live-change/framework'
|
|
8
8
|
import {
|
|
9
9
|
PropertyDefinition, ViewDefinition, IndexDefinition, ActionDefinition, EventDefinition, TriggerDefinition
|
|
10
10
|
} from "@live-change/framework"
|
|
11
11
|
import pluralize from 'pluralize'
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
import { ServiceDefinitionSpecification } from "@live-change/framework"
|
|
14
|
+
import { ActionDefinitionSpecificationAC, ViewDefinitionSpecificationAC, TriggerDefinitionSpecificationAC } from "./types.js"
|
|
15
|
+
import { EventDefinitionSpecification } from "@live-change/framework"
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
|
|
18
|
+
export function entityAccessControl({service, modelName, modelPropertyName}, accessControl) {
|
|
16
19
|
if(!accessControl) return undefined
|
|
17
20
|
if(Array.isArray(accessControl)) accessControl = { roles: accessControl }
|
|
18
21
|
return {
|
|
@@ -21,11 +24,11 @@ function entityAccessControl({service, modelName, modelPropertyName}, accessCont
|
|
|
21
24
|
}
|
|
22
25
|
}
|
|
23
26
|
|
|
24
|
-
function defineView(config, context, external) {
|
|
27
|
+
export function defineView(config, context, external) {
|
|
25
28
|
const { service, modelRuntime, modelPropertyName, modelName, model } = context
|
|
26
29
|
const viewName = (config.prefix || '' ) + (config.prefix ? modelName : modelPropertyName) + (config.suffix || '')
|
|
27
30
|
if(external) model.crud.read = viewName
|
|
28
|
-
|
|
31
|
+
const view = service.view({
|
|
29
32
|
name: viewName,
|
|
30
33
|
properties: {
|
|
31
34
|
[modelPropertyName]: {
|
|
@@ -48,7 +51,7 @@ function defineView(config, context, external) {
|
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
|
|
51
|
-
function defineCreatedEvent(config, context) {
|
|
54
|
+
export function defineCreatedEvent(config, context) {
|
|
52
55
|
const {
|
|
53
56
|
service, modelRuntime, modelName, modelPropertyName
|
|
54
57
|
} = context
|
|
@@ -70,7 +73,7 @@ function defineCreatedEvent(config, context) {
|
|
|
70
73
|
})
|
|
71
74
|
}
|
|
72
75
|
|
|
73
|
-
function defineUpdatedEvent(config, context) {
|
|
76
|
+
export function defineUpdatedEvent(config, context) {
|
|
74
77
|
const {
|
|
75
78
|
service, modelRuntime, modelName, modelPropertyName
|
|
76
79
|
} = context
|
|
@@ -92,12 +95,12 @@ function defineUpdatedEvent(config, context) {
|
|
|
92
95
|
})
|
|
93
96
|
}
|
|
94
97
|
|
|
95
|
-
function defineDeletedEvent(config, context) {
|
|
98
|
+
export function defineDeletedEvent(config, context) {
|
|
96
99
|
const {
|
|
97
100
|
service, modelRuntime, modelName, modelPropertyName,
|
|
98
101
|
} = context
|
|
99
|
-
const eventName = modelName + 'Deleted'
|
|
100
|
-
service
|
|
102
|
+
const eventName = modelName + 'Deleted';
|
|
103
|
+
(service as ServiceDefinition<ServiceDefinitionSpecification>).event({
|
|
101
104
|
name: eventName,
|
|
102
105
|
properties: {
|
|
103
106
|
[modelPropertyName]: {
|
|
@@ -111,7 +114,7 @@ function defineDeletedEvent(config, context) {
|
|
|
111
114
|
})
|
|
112
115
|
}
|
|
113
116
|
|
|
114
|
-
function getCreateFunction( validators, validationContext, config, context) {
|
|
117
|
+
export function getCreateFunction( validators, validationContext, config, context) {
|
|
115
118
|
const {
|
|
116
119
|
service, app, model, modelPropertyName, modelRuntime, objectType,
|
|
117
120
|
modelName, writeableProperties
|
|
@@ -139,14 +142,14 @@ function getCreateFunction( validators, validationContext, config, context) {
|
|
|
139
142
|
return execute
|
|
140
143
|
}
|
|
141
144
|
|
|
142
|
-
function defineCreateAction(config, context) {
|
|
145
|
+
export function defineCreateAction(config, context) {
|
|
143
146
|
const {
|
|
144
147
|
service, app, model, modelPropertyName, modelRuntime, objectType,
|
|
145
148
|
modelName, writeableProperties
|
|
146
149
|
} = context
|
|
147
150
|
const actionName = 'create' + modelName
|
|
148
151
|
model.crud.create = actionName
|
|
149
|
-
const action =
|
|
152
|
+
const action = (service as ServiceDefinition<ServiceDefinitionSpecification>).action<ActionDefinitionSpecificationAC>({
|
|
150
153
|
name: actionName,
|
|
151
154
|
properties: { ...model.properties },
|
|
152
155
|
access: config.createAccess || config.writeAccess,
|
|
@@ -156,33 +159,32 @@ function defineCreateAction(config, context) {
|
|
|
156
159
|
waitForEvents: true,
|
|
157
160
|
execute: () => { throw new Error("not generated yet") }
|
|
158
161
|
})
|
|
159
|
-
const validators = App.validation.getValidators(action, service
|
|
162
|
+
const validators = App.validation.getValidators(action, service)
|
|
160
163
|
const validationContext = { source: action, action }
|
|
161
164
|
action.execute = getCreateFunction( validators, validationContext, config, context)
|
|
162
165
|
service.actions[actionName] = action
|
|
163
166
|
}
|
|
164
167
|
|
|
165
|
-
function defineCreateTrigger(config, context) {
|
|
168
|
+
export function defineCreateTrigger(config, context) {
|
|
166
169
|
const {
|
|
167
170
|
service, app, model, modelPropertyName, modelRuntime, objectType,
|
|
168
171
|
modelName, writeableProperties
|
|
169
172
|
} = context
|
|
170
173
|
const actionName = 'create' + modelName
|
|
171
174
|
const triggerName = `${service.name}_${actionName}`
|
|
172
|
-
const trigger =
|
|
175
|
+
const trigger = (service as ServiceDefinition<ServiceDefinitionSpecification>).trigger<TriggerDefinitionSpecificationAC>({
|
|
173
176
|
name: triggerName,
|
|
174
177
|
properties: { ...model.properties },
|
|
175
178
|
skipValidation: true,
|
|
176
179
|
waitForEvents: true,
|
|
177
180
|
execute: () => { throw new Error("not generated yet") }
|
|
178
181
|
})
|
|
179
|
-
const validators = App.validation.getValidators(trigger, service
|
|
182
|
+
const validators = App.validation.getValidators(trigger, service)
|
|
180
183
|
const validationContext = { source: trigger, trigger }
|
|
181
184
|
trigger.execute = getCreateFunction( validators, validationContext, config, context)
|
|
182
|
-
service.triggers[triggerName] = [trigger]
|
|
183
185
|
}
|
|
184
186
|
|
|
185
|
-
function getUpdateFunction( validators, validationContext, config, context) {
|
|
187
|
+
export function getUpdateFunction( validators, validationContext, config, context) {
|
|
186
188
|
const {
|
|
187
189
|
service, app, model, modelRuntime, modelPropertyName, objectType,
|
|
188
190
|
modelName, writeableProperties
|
|
@@ -209,7 +211,7 @@ function getUpdateFunction( validators, validationContext, config, context) {
|
|
|
209
211
|
return execute
|
|
210
212
|
}
|
|
211
213
|
|
|
212
|
-
function defineUpdateAction(config, context) {
|
|
214
|
+
export function defineUpdateAction(config, context) {
|
|
213
215
|
const {
|
|
214
216
|
service, app, model, modelRuntime, modelPropertyName, objectType,
|
|
215
217
|
modelName, writeableProperties
|
|
@@ -231,13 +233,13 @@ function defineUpdateAction(config, context) {
|
|
|
231
233
|
waitForEvents: true,
|
|
232
234
|
execute: () => { throw new Error("not generated yet") }
|
|
233
235
|
})
|
|
234
|
-
const validators = App.validation.getValidators(action, service
|
|
236
|
+
const validators = App.validation.getValidators(action, service)
|
|
235
237
|
const validationContext = { source: action, action }
|
|
236
238
|
action.execute = getUpdateFunction( validators, validationContext, config, context)
|
|
237
239
|
service.actions[actionName] = action
|
|
238
240
|
}
|
|
239
241
|
|
|
240
|
-
function defineUpdateTrigger(config, context) {
|
|
242
|
+
export function defineUpdateTrigger(config, context) {
|
|
241
243
|
const {
|
|
242
244
|
service, app, model, modelRuntime, modelPropertyName, objectType,
|
|
243
245
|
modelName, writeableProperties
|
|
@@ -256,13 +258,13 @@ function defineUpdateTrigger(config, context) {
|
|
|
256
258
|
waitForEvents: true,
|
|
257
259
|
execute: () => { throw new Error("not generated yet") }
|
|
258
260
|
})
|
|
259
|
-
const validators = App.validation.getValidators(trigger, service
|
|
261
|
+
const validators = App.validation.getValidators(trigger, service)
|
|
260
262
|
const validationContext = { source: trigger, trigger }
|
|
261
263
|
trigger.execute = getUpdateFunction( validators, validationContext, config, context)
|
|
262
264
|
service.triggers[triggerName] = [trigger]
|
|
263
265
|
}
|
|
264
266
|
|
|
265
|
-
function getDeleteFunction(config, context) {
|
|
267
|
+
export function getDeleteFunction(config, context) {
|
|
266
268
|
const {
|
|
267
269
|
service, app, model, modelRuntime, modelPropertyName, objectType,
|
|
268
270
|
otherPropertyNames, modelName, writeableProperties,
|
|
@@ -282,7 +284,7 @@ function getDeleteFunction(config, context) {
|
|
|
282
284
|
return execute
|
|
283
285
|
}
|
|
284
286
|
|
|
285
|
-
function defineDeleteAction(config, context) {
|
|
287
|
+
export function defineDeleteAction(config, context) {
|
|
286
288
|
const {
|
|
287
289
|
service, app, model, modelRuntime, modelPropertyName, objectType,
|
|
288
290
|
modelName, writeableProperties
|
|
@@ -305,7 +307,7 @@ function defineDeleteAction(config, context) {
|
|
|
305
307
|
})
|
|
306
308
|
}
|
|
307
309
|
|
|
308
|
-
function defineDeleteTrigger(config, context) {
|
|
310
|
+
export function defineDeleteTrigger(config, context) {
|
|
309
311
|
const {
|
|
310
312
|
service, app, model, modelRuntime, modelPropertyName, objectType,
|
|
311
313
|
modelName, writeableProperties
|
|
@@ -324,71 +326,4 @@ function defineDeleteTrigger(config, context) {
|
|
|
324
326
|
waitForEvents: true,
|
|
325
327
|
execute: getDeleteFunction(config, context)
|
|
326
328
|
})]
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
export default function(service, app) {
|
|
330
|
-
if (!service) throw new Error("no service")
|
|
331
|
-
if (!app) throw new Error("no app")
|
|
332
|
-
|
|
333
|
-
for(let modelName in service.models) {
|
|
334
|
-
const model = service.models[modelName]
|
|
335
|
-
const config = model[annotation]
|
|
336
|
-
if(!config) continue
|
|
337
|
-
|
|
338
|
-
if (model[annotation + 'Processed']) throw new Error("duplicated processing of " + annotation + " processor")
|
|
339
|
-
model[annotation + 'Processed'] = true
|
|
340
|
-
|
|
341
|
-
const originalModelProperties = { ...model.properties }
|
|
342
|
-
const modelProperties = Object.keys(model.properties)
|
|
343
|
-
const modelPropertyName = modelName.slice(0, 1).toLowerCase() + modelName.slice(1)
|
|
344
|
-
|
|
345
|
-
model.identifiers = [{ name: modelPropertyName, field: 'id' }]
|
|
346
|
-
model.crud = {}
|
|
347
|
-
includeAccessRoles(model, [
|
|
348
|
-
config.readAccessControl, config.writeAccessControl,
|
|
349
|
-
config.createAccessControl, config.updateAccessControl, config.deleteAccessControl
|
|
350
|
-
])
|
|
351
|
-
|
|
352
|
-
function modelRuntime() {
|
|
353
|
-
return service._runtime.models[modelName]
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
if (!model.indexes) {
|
|
357
|
-
model.indexes = {}
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
const writeableProperties = modelProperties || config.writeableProperties
|
|
361
|
-
//console.log("PPP", others)
|
|
362
|
-
const objectType = service.name + '_' + modelName
|
|
363
|
-
|
|
364
|
-
const context = {
|
|
365
|
-
service, app, model, originalModelProperties, modelProperties, modelPropertyName, modelRuntime,
|
|
366
|
-
modelName, writeableProperties, annotation, objectType
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
defineView(config, context, config.readAccess || config.readAccessControl || config.writeAccessControl)
|
|
370
|
-
defineGlobalRangeView(config, context, config.readAllAccess)
|
|
371
|
-
/// TODO: multiple views with limited fields
|
|
372
|
-
|
|
373
|
-
defineCreatedEvent(config, context)
|
|
374
|
-
defineUpdatedEvent(config, context)
|
|
375
|
-
defineDeletedEvent(config, context)
|
|
376
|
-
|
|
377
|
-
defineCreateTrigger(config, context)
|
|
378
|
-
defineUpdateTrigger(config, context)
|
|
379
|
-
defineDeleteTrigger(config, context)
|
|
380
|
-
|
|
381
|
-
if (config.createAccess || config.writeAccess || config.createAccessControl || config.writeAccessControl) {
|
|
382
|
-
defineCreateAction(config, context)
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
if (config.updateAccess || config.writeAccess || config.updateAccessControl || config.writeAccessControl) {
|
|
386
|
-
defineUpdateAction(config, context)
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
if (config.deleteAccess || config.writeAccess || config.deleteAccessControl || config.writeAccessControl) {
|
|
390
|
-
defineDeleteAction(config, context)
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
}
|
|
394
|
-
}
|
|
329
|
+
}
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ViewContext, ViewDefinitionSpecificationObservable, ViewDefinitionSpecificationDaoPath,
|
|
3
|
+
ViewDefinitionSpecificationFetch,
|
|
4
|
+
ActionDefinitionSpecification,
|
|
5
|
+
TriggerDefinitionSpecification
|
|
6
|
+
} from "@live-change/framework"
|
|
7
|
+
|
|
8
|
+
export type AccessControlSettings = string | string[] | {
|
|
9
|
+
roles: string | string[]
|
|
10
|
+
objects?: (properties: any) => any[]
|
|
11
|
+
}
|
|
12
|
+
export interface ViewDefinitionSpecificationObservableAC extends ViewDefinitionSpecificationObservable {
|
|
13
|
+
accessControl?: AccessControlSettings
|
|
14
|
+
}
|
|
15
|
+
export interface ViewDefinitionSpecificationDaoPathAC extends ViewDefinitionSpecificationDaoPath {
|
|
16
|
+
daoPath: (parameters: Record<string, any>, context: ViewContext) => any[]
|
|
17
|
+
accessControl?: AccessControlSettings
|
|
18
|
+
}
|
|
19
|
+
export interface ViewDefinitionSpecificationFetchAC extends ViewDefinitionSpecificationFetch {
|
|
20
|
+
fetch: (parameters: Record<string, any>, context: ViewContext) => Promise<any>
|
|
21
|
+
accessControl?: AccessControlSettings
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type ViewDefinitionSpecificationAC =
|
|
25
|
+
ViewDefinitionSpecificationObservableAC
|
|
26
|
+
| ViewDefinitionSpecificationDaoPathAC
|
|
27
|
+
| ViewDefinitionSpecificationFetchAC
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export interface ActionDefinitionSpecificationAC extends ActionDefinitionSpecification {
|
|
31
|
+
accessControl?: AccessControlSettings
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface TriggerDefinitionSpecificationAC extends TriggerDefinitionSpecification {
|
|
35
|
+
accessControl?: AccessControlSettings
|
|
36
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"composite": true,
|
|
4
|
+
"module": "nodenext",
|
|
5
|
+
"moduleResolution": "nodenext",
|
|
6
|
+
"allowSyntheticDefaultImports": true,
|
|
7
|
+
|
|
8
|
+
"target": "ES2020",
|
|
9
|
+
"useDefineForClassFields": true,
|
|
10
|
+
"lib": ["ES2020", "DOM"],
|
|
11
|
+
|
|
12
|
+
/* Linting */
|
|
13
|
+
"strict": false,
|
|
14
|
+
"noUnusedLocals": false,
|
|
15
|
+
"noUnusedParameters": false,
|
|
16
|
+
"noFallthroughCasesInSwitch": true,
|
|
17
|
+
"outDir": "dist",
|
|
18
|
+
"checkJs": false,
|
|
19
|
+
"esModuleInterop": true, // Enable interop for ES modules
|
|
20
|
+
"resolveJsonModule": true, // Allow importing JSON files
|
|
21
|
+
"skipLibCheck": true,
|
|
22
|
+
"noImplicitAny": false
|
|
23
|
+
},
|
|
24
|
+
"files": ["src/index.js"],
|
|
25
|
+
"include": ["src/**/*.ts", "src/**/*.js"],
|
|
26
|
+
"exclude": ["node_modules/@types", "node_modules/**/*.d.ts", "**/*.test.js", "**/CMakeFiles/**"]
|
|
27
|
+
}
|
|
28
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|