remult 0.16.0-exp.5 → 0.16.0-exp.6
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/esm/index.d.ts +1 -1
- package/esm/src/context.d.ts +2 -2
- package/esm/src/context.js +1 -1
- package/esm/src/remult-proxy.js +2 -2
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/context.d.ts +2 -2
- package/src/context.js +1 -1
- package/src/remult-proxy.js +2 -2
package/esm/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export { SqlDatabase, } from './src/data-providers/sql-database';
|
|
|
12
12
|
export { CustomSqlFilterObject, CustomSqlFilterBuilder } from './src/filter/filter-consumer-bridge-to-sql-request';
|
|
13
13
|
export { JsonDataProvider, JsonEntityStorage } from './src/data-providers/json-data-provider';
|
|
14
14
|
export { Controller, BackendMethodOptions, BackendMethod, ProgressListener } from './src/server-action';
|
|
15
|
-
export { Allowed, Allow, Remult,
|
|
15
|
+
export { Allowed, Allow, Remult, RemultContext, isBackend, AllowedForInstance, EventDispatcher, EventSource, HttpProvider, Unobserve, UserInfo } from './src/context';
|
|
16
16
|
export { IdEntity } from './src/id-entity';
|
|
17
17
|
export { SortSegment, Sort } from './src/sort';
|
|
18
18
|
export { OneToMany, CompoundIdField } from './src/column';
|
package/esm/src/context.d.ts
CHANGED
|
@@ -80,9 +80,9 @@ export declare class Remult {
|
|
|
80
80
|
clearAllCache(): any;
|
|
81
81
|
/** A helper callback that is called whenever an entity is created. */
|
|
82
82
|
static entityRefInit?: (ref: EntityRef<any>, row: any) => void;
|
|
83
|
-
readonly
|
|
83
|
+
readonly context: RemultContext;
|
|
84
84
|
}
|
|
85
|
-
export interface
|
|
85
|
+
export interface RemultContext {
|
|
86
86
|
}
|
|
87
87
|
export declare const allEntities: ClassType<any>[];
|
|
88
88
|
export interface ControllerOptions {
|
package/esm/src/context.js
CHANGED
|
@@ -101,7 +101,7 @@ export class Remult {
|
|
|
101
101
|
this._userChangeEvent = new EventSource();
|
|
102
102
|
/* @internal */
|
|
103
103
|
this.repCache = new Map();
|
|
104
|
-
this.
|
|
104
|
+
this.context = {};
|
|
105
105
|
if (provider && provider.getEntityDataProvider) {
|
|
106
106
|
this._dataSource = provider;
|
|
107
107
|
return;
|
package/esm/src/remult-proxy.js
CHANGED
|
@@ -7,8 +7,8 @@ export class RemultProxy {
|
|
|
7
7
|
this.remultFactory = () => defaultRemult;
|
|
8
8
|
this.repo = (...args) => this.remultFactory().repo(...args);
|
|
9
9
|
}
|
|
10
|
-
get
|
|
11
|
-
return this.instance.
|
|
10
|
+
get context() {
|
|
11
|
+
return this.instance.context;
|
|
12
12
|
}
|
|
13
13
|
get _user() {
|
|
14
14
|
return this.instance._user;
|
package/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export { SqlDatabase, } from './src/data-providers/sql-database';
|
|
|
12
12
|
export { CustomSqlFilterObject, CustomSqlFilterBuilder } from './src/filter/filter-consumer-bridge-to-sql-request';
|
|
13
13
|
export { JsonDataProvider, JsonEntityStorage } from './src/data-providers/json-data-provider';
|
|
14
14
|
export { Controller, BackendMethodOptions, BackendMethod, ProgressListener } from './src/server-action';
|
|
15
|
-
export { Allowed, Allow, Remult,
|
|
15
|
+
export { Allowed, Allow, Remult, RemultContext, isBackend, AllowedForInstance, EventDispatcher, EventSource, HttpProvider, Unobserve, UserInfo } from './src/context';
|
|
16
16
|
export { IdEntity } from './src/id-entity';
|
|
17
17
|
export { SortSegment, Sort } from './src/sort';
|
|
18
18
|
export { OneToMany, CompoundIdField } from './src/column';
|
package/package.json
CHANGED
package/src/context.d.ts
CHANGED
|
@@ -80,9 +80,9 @@ export declare class Remult {
|
|
|
80
80
|
clearAllCache(): any;
|
|
81
81
|
/** A helper callback that is called whenever an entity is created. */
|
|
82
82
|
static entityRefInit?: (ref: EntityRef<any>, row: any) => void;
|
|
83
|
-
readonly
|
|
83
|
+
readonly context: RemultContext;
|
|
84
84
|
}
|
|
85
|
-
export interface
|
|
85
|
+
export interface RemultContext {
|
|
86
86
|
}
|
|
87
87
|
export declare const allEntities: ClassType<any>[];
|
|
88
88
|
export interface ControllerOptions {
|
package/src/context.js
CHANGED
|
@@ -152,7 +152,7 @@ var Remult = /** @class */ (function () {
|
|
|
152
152
|
this._userChangeEvent = new EventSource();
|
|
153
153
|
/* @internal */
|
|
154
154
|
this.repCache = new Map();
|
|
155
|
-
this.
|
|
155
|
+
this.context = {};
|
|
156
156
|
if (provider && provider.getEntityDataProvider) {
|
|
157
157
|
this._dataSource = provider;
|
|
158
158
|
return;
|
package/src/remult-proxy.js
CHANGED
|
@@ -19,9 +19,9 @@ var RemultProxy = /** @class */ (function () {
|
|
|
19
19
|
return (_a = _this.remultFactory()).repo.apply(_a, tslib_1.__spread(args));
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
Object.defineProperty(RemultProxy.prototype, "
|
|
22
|
+
Object.defineProperty(RemultProxy.prototype, "context", {
|
|
23
23
|
get: function () {
|
|
24
|
-
return this.instance.
|
|
24
|
+
return this.instance.context;
|
|
25
25
|
},
|
|
26
26
|
enumerable: false,
|
|
27
27
|
configurable: true
|