@nocobase/client-v2 2.2.0-beta.12 → 2.2.0-beta.14
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/es/APIClient.d.ts +1 -3
- package/es/components/form/ScanInput/useCodeScanner.d.ts +2 -1
- package/es/flow-compat/fieldValidationConstants.d.ts +1 -1
- package/es/index.mjs +20 -19
- package/lib/index.js +39 -38
- package/package.json +7 -7
- package/src/APIClient.ts +1 -10
- package/src/Application.tsx +4 -0
- package/src/BaseApplication.tsx +1 -1
- package/src/__tests__/app.test.tsx +18 -0
- package/src/__tests__/nocobase-buildin-plugin-auth.test.tsx +28 -0
- package/src/collection-manager/field-validation.ts +1 -1
- package/src/components/form/ScanInput/CodeScanner.tsx +23 -6
- package/src/components/form/ScanInput/__tests__/useCodeScanner.test.tsx +35 -1
- package/src/components/form/ScanInput/useCodeScanner.ts +16 -3
- package/src/flow/models/blocks/table/TableBlockModel.tsx +1 -1
- package/src/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableFieldModel.tsx +1 -1
- package/src/flow-compat/fieldValidationConstants.ts +1 -1
- package/src/nocobase-buildin-plugin/index.tsx +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/client-v2",
|
|
3
|
-
"version": "2.2.0-beta.
|
|
3
|
+
"version": "2.2.0-beta.14",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"@formily/antd-v5": "1.2.3",
|
|
28
28
|
"@formily/react": "^2.2.27",
|
|
29
29
|
"@formily/shared": "^2.2.27",
|
|
30
|
-
"@nocobase/evaluators": "2.2.0-beta.
|
|
31
|
-
"@nocobase/flow-engine": "2.2.0-beta.
|
|
32
|
-
"@nocobase/sdk": "2.2.0-beta.
|
|
33
|
-
"@nocobase/shared": "2.2.0-beta.
|
|
34
|
-
"@nocobase/utils": "2.2.0-beta.
|
|
30
|
+
"@nocobase/evaluators": "2.2.0-beta.14",
|
|
31
|
+
"@nocobase/flow-engine": "2.2.0-beta.14",
|
|
32
|
+
"@nocobase/sdk": "2.2.0-beta.14",
|
|
33
|
+
"@nocobase/shared": "2.2.0-beta.14",
|
|
34
|
+
"@nocobase/utils": "2.2.0-beta.14",
|
|
35
35
|
"ahooks": "^3.7.2",
|
|
36
36
|
"antd": "5.24.2",
|
|
37
37
|
"antd-style": "3.7.1",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"react-i18next": "^11.15.1",
|
|
48
48
|
"react-router-dom": "^6.30.1"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "1ef021f3ce0a84469e40f181a19551a50b6f850c"
|
|
51
51
|
}
|
package/src/APIClient.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { APIClient as APIClientSDK,
|
|
10
|
+
import { APIClient as APIClientSDK, hasHeaderValue } from '@nocobase/sdk';
|
|
11
11
|
|
|
12
12
|
function offsetToTimeZone(offset: number) {
|
|
13
13
|
const hours = Math.floor(Math.abs(offset));
|
|
@@ -23,15 +23,6 @@ function getCurrentTimezone() {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export class APIClient extends APIClientSDK {
|
|
26
|
-
appName?: string;
|
|
27
|
-
|
|
28
|
-
constructor(options?: APIClientOptions) {
|
|
29
|
-
super(options);
|
|
30
|
-
if (options && typeof options !== 'function') {
|
|
31
|
-
this.appName = options.appName;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
26
|
getHostname() {
|
|
36
27
|
if (process.env.API_BASE_URL) {
|
|
37
28
|
try {
|
package/src/Application.tsx
CHANGED
|
@@ -46,6 +46,10 @@ export class Application extends BaseApplication<
|
|
|
46
46
|
|
|
47
47
|
protected createApiClient(options: ApplicationOptions) {
|
|
48
48
|
return new APIClient({
|
|
49
|
+
// Cross-origin API deployments rely on cookies for auth (e.g. permanent file
|
|
50
|
+
// URLs); trust is enforced server-side via the CORS origin whitelist and the
|
|
51
|
+
// CSRF middleware, not by omitting credentials.
|
|
52
|
+
withCredentials: true,
|
|
49
53
|
...options.apiClient,
|
|
50
54
|
appName: options.name || getSubAppName(options.publicPath),
|
|
51
55
|
});
|
package/src/BaseApplication.tsx
CHANGED
|
@@ -403,7 +403,7 @@ export abstract class BaseApplication<
|
|
|
403
403
|
this.favicon = favicon || '';
|
|
404
404
|
}
|
|
405
405
|
|
|
406
|
-
const iconHref = this.favicon || '
|
|
406
|
+
const iconHref = this.favicon || this.getCdnUrl() + 'favicon/favicon.ico';
|
|
407
407
|
|
|
408
408
|
if (faviconLinkElement) {
|
|
409
409
|
faviconLinkElement.href = iconHref;
|
|
@@ -52,6 +52,24 @@ describe('app', () => {
|
|
|
52
52
|
expect(app.getHref('/test')).toBe('/test');
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
+
it('should enable credentials for api clients by default', () => {
|
|
56
|
+
const sameOriginApp = new Application({
|
|
57
|
+
router,
|
|
58
|
+
apiClient: {
|
|
59
|
+
baseURL: '/api/',
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
const crossOriginApp = new Application({
|
|
63
|
+
router,
|
|
64
|
+
apiClient: {
|
|
65
|
+
baseURL: 'https://api.example.com/api/',
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
expect(sameOriginApp.apiClient.axios.defaults.withCredentials).toBe(true);
|
|
70
|
+
expect(crossOriginApp.apiClient.axios.defaults.withCredentials).toBe(true);
|
|
71
|
+
});
|
|
72
|
+
|
|
55
73
|
it('should initialize shared jsonLogic operators', () => {
|
|
56
74
|
const app = new Application({ router });
|
|
57
75
|
|
|
@@ -55,6 +55,7 @@ describe('nocobase buildin plugin auth redirect', () => {
|
|
|
55
55
|
const originalLocation = globalThis.window.location;
|
|
56
56
|
|
|
57
57
|
beforeEach(() => {
|
|
58
|
+
globalThis.window.localStorage.clear();
|
|
58
59
|
// These fixtures mount the modern client under the `v2` segment; tell the
|
|
59
60
|
// runtime-prefix helper so v2-runtime detection matches (server injects it
|
|
60
61
|
// in production).
|
|
@@ -75,6 +76,7 @@ describe('nocobase buildin plugin auth redirect', () => {
|
|
|
75
76
|
});
|
|
76
77
|
|
|
77
78
|
afterEach(() => {
|
|
79
|
+
globalThis.window.localStorage.clear();
|
|
78
80
|
delete (globalThis.window as any).__nocobase_modern_client_prefix__;
|
|
79
81
|
Object.defineProperty(globalThis.window, 'location', {
|
|
80
82
|
configurable: true,
|
|
@@ -116,6 +118,7 @@ describe('nocobase buildin plugin auth redirect', () => {
|
|
|
116
118
|
plugins: [NocoBaseBuildInPlugin as any],
|
|
117
119
|
router: { type: 'memory', initialEntries: ['/v2/admin'] },
|
|
118
120
|
});
|
|
121
|
+
app.apiClient.auth.setToken('test-token');
|
|
119
122
|
app.apiMock.onGet('app:getLang').reply(200, {
|
|
120
123
|
data: { lang: 'en-US', resources: { client: {} }, cron: {} },
|
|
121
124
|
});
|
|
@@ -130,6 +133,7 @@ describe('nocobase buildin plugin auth redirect', () => {
|
|
|
130
133
|
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
131
134
|
expect(app.router.router.state.location.pathname).toBe('/v2/admin');
|
|
132
135
|
expect(app.router.router.state.location.search).toBe('');
|
|
136
|
+
expect(app.apiMock.history.post.filter((request) => request.url === 'auth:syncCookies')).toHaveLength(0);
|
|
133
137
|
});
|
|
134
138
|
|
|
135
139
|
it('should redirect unauthenticated v2 root access to v2 signin via <Navigate />', async () => {
|
|
@@ -326,6 +330,29 @@ describe('nocobase buildin plugin auth redirect', () => {
|
|
|
326
330
|
data: { lang: 'en-US', resources: { client: {} }, cron: {} },
|
|
327
331
|
});
|
|
328
332
|
app.apiMock.onGet('/auth:check').reply(200, { data: { id: 1 } });
|
|
333
|
+
app.apiMock.onPost('auth:syncCookies').reply(200, { data: { synced: true } });
|
|
334
|
+
const ensureLoaded = vi.spyOn(app.dataSourceManager, 'ensureLoaded').mockResolvedValue(undefined);
|
|
335
|
+
|
|
336
|
+
const Root = app.getRootComponent();
|
|
337
|
+
render(<Root />);
|
|
338
|
+
|
|
339
|
+
expect(await screen.findByText('secure page')).toBeInTheDocument();
|
|
340
|
+
expect(ensureLoaded).toHaveBeenCalledTimes(1);
|
|
341
|
+
expect(app.apiMock.history.post.filter((request) => request.url === 'auth:syncCookies')).toHaveLength(1);
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
it('should keep authenticated v2 startup working when cookie bootstrap fails', async () => {
|
|
345
|
+
const app = createMockClient({
|
|
346
|
+
publicPath: '/v2/',
|
|
347
|
+
plugins: [NocoBaseBuildInPlugin as any, AuthBootstrapRoutePlugin as any],
|
|
348
|
+
router: { type: 'memory', initialEntries: ['/v2/secure'] },
|
|
349
|
+
});
|
|
350
|
+
app.apiClient.auth.setToken('test-token');
|
|
351
|
+
app.apiMock.onGet('app:getLang').reply(200, {
|
|
352
|
+
data: { lang: 'en-US', resources: { client: {} }, cron: {} },
|
|
353
|
+
});
|
|
354
|
+
app.apiMock.onGet('/auth:check').reply(200, { data: { id: 1 } });
|
|
355
|
+
app.apiMock.onPost('auth:syncCookies').reply(500, { errors: [{ message: 'cookie sync failed' }] });
|
|
329
356
|
const ensureLoaded = vi.spyOn(app.dataSourceManager, 'ensureLoaded').mockResolvedValue(undefined);
|
|
330
357
|
|
|
331
358
|
const Root = app.getRootComponent();
|
|
@@ -333,6 +360,7 @@ describe('nocobase buildin plugin auth redirect', () => {
|
|
|
333
360
|
|
|
334
361
|
expect(await screen.findByText('secure page')).toBeInTheDocument();
|
|
335
362
|
expect(ensureLoaded).toHaveBeenCalledTimes(1);
|
|
363
|
+
expect(app.apiMock.history.post.filter((request) => request.url === 'auth:syncCookies')).toHaveLength(1);
|
|
336
364
|
});
|
|
337
365
|
|
|
338
366
|
it('should not auth-check or bootstrap authCheck false routes', async () => {
|
|
@@ -132,7 +132,7 @@ fieldValidationConfigureRegistry.registerMany([
|
|
|
132
132
|
{ key: 'uri', label: 'URI', hasValue: false, params: [], paramsType: 'object' },
|
|
133
133
|
{
|
|
134
134
|
key: 'multiple',
|
|
135
|
-
label: 'Multiple',
|
|
135
|
+
label: 'Multiple of',
|
|
136
136
|
hasValue: true,
|
|
137
137
|
params: [{ key: 'base', label: 'Base', componentType: 'inputNumber', required: true }],
|
|
138
138
|
},
|
|
@@ -49,6 +49,21 @@ function CodeScannerContent({ visible, formatsToSupport, onClose, onScanSuccess
|
|
|
49
49
|
message.error(t('Code recognition failed, please scan again'));
|
|
50
50
|
}, [t]);
|
|
51
51
|
|
|
52
|
+
const showCameraStartFailure = useCallback(
|
|
53
|
+
(error: unknown) => {
|
|
54
|
+
const errorName = error instanceof Error ? error.name : '';
|
|
55
|
+
const errorMessage = error instanceof Error ? error.message : '';
|
|
56
|
+
const errorMap: Record<string, string> = {
|
|
57
|
+
NotFoundError: t('No camera device detected'),
|
|
58
|
+
NotAllowedError: t('You have not granted permission to use the camera'),
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
message.error(errorMap[errorName] || errorMessage || t('You have not granted permission to use the camera'));
|
|
62
|
+
onClose();
|
|
63
|
+
},
|
|
64
|
+
[onClose, t],
|
|
65
|
+
);
|
|
66
|
+
|
|
52
67
|
const handleScanSuccess = useCallback(
|
|
53
68
|
(text: string) => {
|
|
54
69
|
onScanSuccess(text);
|
|
@@ -64,6 +79,7 @@ function CodeScannerContent({ visible, formatsToSupport, onClose, onScanSuccess
|
|
|
64
79
|
scanBoxSize,
|
|
65
80
|
onScanSuccess: handleScanSuccess,
|
|
66
81
|
onScanFailure: showScanFailure,
|
|
82
|
+
onCameraStartFailure: showCameraStartFailure,
|
|
67
83
|
});
|
|
68
84
|
|
|
69
85
|
useEffect(() => {
|
|
@@ -129,7 +145,7 @@ function CodeScannerContent({ visible, formatsToSupport, onClose, onScanSuccess
|
|
|
129
145
|
inset: 0;
|
|
130
146
|
z-index: ${token.zIndexPopupBase + 1000};
|
|
131
147
|
overflow: hidden;
|
|
132
|
-
background:
|
|
148
|
+
background: #000;
|
|
133
149
|
`;
|
|
134
150
|
const scannerWrapperClass = css`
|
|
135
151
|
position: absolute;
|
|
@@ -137,16 +153,17 @@ function CodeScannerContent({ visible, formatsToSupport, onClose, onScanSuccess
|
|
|
137
153
|
overflow: hidden;
|
|
138
154
|
`;
|
|
139
155
|
const scannerClass = css`
|
|
156
|
+
position: relative;
|
|
140
157
|
width: 100%;
|
|
141
158
|
height: 100%;
|
|
142
|
-
|
|
143
|
-
justify-content: center;
|
|
144
|
-
align-items: center;
|
|
159
|
+
overflow: hidden;
|
|
145
160
|
|
|
146
161
|
video {
|
|
147
|
-
|
|
162
|
+
position: absolute !important;
|
|
163
|
+
inset: 0 !important;
|
|
164
|
+
width: 100% !important;
|
|
148
165
|
height: 100% !important;
|
|
149
|
-
|
|
166
|
+
object-fit: cover !important;
|
|
150
167
|
}
|
|
151
168
|
|
|
152
169
|
#qr-shaded-region {
|
|
@@ -74,13 +74,23 @@ vi.mock('html5-qrcode', () => ({
|
|
|
74
74
|
|
|
75
75
|
vi.mock('jsqr', () => jsQrMocks);
|
|
76
76
|
|
|
77
|
-
function ScannerHost({
|
|
77
|
+
function ScannerHost({
|
|
78
|
+
onCameraStartFailure,
|
|
79
|
+
onScanFailure,
|
|
80
|
+
scanBoxSize,
|
|
81
|
+
}: {
|
|
82
|
+
onCameraStartFailure?: (error: unknown) => void;
|
|
83
|
+
onScanFailure?: () => void;
|
|
84
|
+
scanBoxSize?: { width: number; height: number };
|
|
85
|
+
} = {}) {
|
|
78
86
|
const handleScanSuccess = useCallback(() => undefined, []);
|
|
79
87
|
|
|
80
88
|
useCodeScanner({
|
|
81
89
|
elementId: 'scanner',
|
|
82
90
|
enabled: true,
|
|
83
91
|
scanBoxSize,
|
|
92
|
+
onCameraStartFailure,
|
|
93
|
+
onScanFailure,
|
|
84
94
|
onScanSuccess: handleScanSuccess,
|
|
85
95
|
});
|
|
86
96
|
|
|
@@ -194,6 +204,30 @@ describe('useCodeScanner', () => {
|
|
|
194
204
|
expect(config?.qrbox?.(1200, 844)).toEqual({ width: 319, height: 240 });
|
|
195
205
|
});
|
|
196
206
|
|
|
207
|
+
it('clamps the scan box to the camera viewfinder size', async () => {
|
|
208
|
+
render(<ScannerHost scanBoxSize={{ width: 319, height: 240 }} />);
|
|
209
|
+
|
|
210
|
+
await waitFor(() => expect(mocks.start).toHaveBeenCalled());
|
|
211
|
+
|
|
212
|
+
const config = mocks.start.mock.calls[0]?.[1] as
|
|
213
|
+
| { qrbox?: (width: number, height: number) => { width: number; height: number } }
|
|
214
|
+
| undefined;
|
|
215
|
+
|
|
216
|
+
expect(config?.qrbox?.(200, 160)).toEqual({ width: 200, height: 160 });
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
it('reports camera start failures through the dedicated handler', async () => {
|
|
220
|
+
const cameraStartError = Object.assign(new Error('Camera failed'), { name: 'NotAllowedError' });
|
|
221
|
+
const handleCameraStartFailure = vi.fn();
|
|
222
|
+
const handleScanFailure = vi.fn();
|
|
223
|
+
mocks.start.mockRejectedValueOnce(cameraStartError);
|
|
224
|
+
|
|
225
|
+
render(<ScannerHost onCameraStartFailure={handleCameraStartFailure} onScanFailure={handleScanFailure} />);
|
|
226
|
+
|
|
227
|
+
await waitFor(() => expect(handleCameraStartFailure).toHaveBeenCalledWith(cameraStartError));
|
|
228
|
+
expect(handleScanFailure).not.toHaveBeenCalled();
|
|
229
|
+
});
|
|
230
|
+
|
|
197
231
|
it('uses jsQR first for Safari uploaded QR images', async () => {
|
|
198
232
|
const handleScanSuccess = vi.fn();
|
|
199
233
|
jsQrMocks.default.mockReturnValueOnce({ data: 'JSQR-CODE' });
|
|
@@ -25,6 +25,7 @@ type UseCodeScannerOptions = {
|
|
|
25
25
|
onScannerSizeChanged?: (size: ScannerSize) => void;
|
|
26
26
|
onScanSuccess: (text: string) => void;
|
|
27
27
|
onScanFailure?: () => void;
|
|
28
|
+
onCameraStartFailure?: (error: unknown) => void;
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
type ImageDataVariant = {
|
|
@@ -70,6 +71,13 @@ export function getCodeScanBoxSize(width: number, height: number) {
|
|
|
70
71
|
};
|
|
71
72
|
}
|
|
72
73
|
|
|
74
|
+
function clampCodeScanBoxSize(scanBoxSize: ScannerSize, width: number, height: number) {
|
|
75
|
+
return {
|
|
76
|
+
width: Math.min(scanBoxSize.width, width),
|
|
77
|
+
height: Math.min(scanBoxSize.height, height),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
73
81
|
async function stopScanner(scanner?: Html5Qrcode, options: { clear?: boolean } = {}) {
|
|
74
82
|
if (!scanner) {
|
|
75
83
|
return;
|
|
@@ -212,6 +220,7 @@ export function useCodeScanner({
|
|
|
212
220
|
onScannerSizeChanged,
|
|
213
221
|
onScanSuccess,
|
|
214
222
|
onScanFailure,
|
|
223
|
+
onCameraStartFailure,
|
|
215
224
|
}: UseCodeScannerOptions) {
|
|
216
225
|
const [scanner, setScanner] = useState<Html5Qrcode>();
|
|
217
226
|
|
|
@@ -223,7 +232,7 @@ export function useCodeScanner({
|
|
|
223
232
|
fps: 10,
|
|
224
233
|
qrbox(width, height) {
|
|
225
234
|
onScannerSizeChanged?.({ width, height });
|
|
226
|
-
return scanBoxSize ?? getCodeScanBoxSize(width, height);
|
|
235
|
+
return clampCodeScanBoxSize(scanBoxSize ?? getCodeScanBoxSize(width, height), width, height);
|
|
227
236
|
},
|
|
228
237
|
},
|
|
229
238
|
(decodedText) => {
|
|
@@ -273,14 +282,18 @@ export function useCodeScanner({
|
|
|
273
282
|
verbose: false,
|
|
274
283
|
});
|
|
275
284
|
setScanner(scannerInstance);
|
|
276
|
-
startScanCamera(scannerInstance).catch(() => {
|
|
285
|
+
startScanCamera(scannerInstance).catch((error: unknown) => {
|
|
286
|
+
if (onCameraStartFailure) {
|
|
287
|
+
onCameraStartFailure(error);
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
277
290
|
onScanFailure?.();
|
|
278
291
|
});
|
|
279
292
|
|
|
280
293
|
return () => {
|
|
281
294
|
stopScanner(scannerInstance, { clear: true }).catch(() => undefined);
|
|
282
295
|
};
|
|
283
|
-
}, [elementId, enabled, formatsToSupport, onScanFailure, startScanCamera]);
|
|
296
|
+
}, [elementId, enabled, formatsToSupport, onCameraStartFailure, onScanFailure, startScanCamera]);
|
|
284
297
|
|
|
285
298
|
return {
|
|
286
299
|
startScanFile,
|
|
@@ -310,7 +310,7 @@ export class TableBlockModel extends CollectionBlockModel<TableBlockModelStructu
|
|
|
310
310
|
transform: translateY(-50%);
|
|
311
311
|
}
|
|
312
312
|
&:hover {
|
|
313
|
-
|
|
313
|
+
box-shadow: inset 0 0 0 9999px rgba(24, 144, 255, 0.1);
|
|
314
314
|
}
|
|
315
315
|
&:hover .edit-icon {
|
|
316
316
|
display: inline-flex;
|
|
@@ -102,7 +102,7 @@ const RenderCell = observer<any>((props) => {
|
|
|
102
102
|
transform: translateY(-50%);
|
|
103
103
|
}
|
|
104
104
|
&:hover {
|
|
105
|
-
|
|
105
|
+
box-shadow: inset 0 0 0 9999px rgba(24, 144, 255, 0.1);
|
|
106
106
|
}
|
|
107
107
|
&:hover .edit-icon {
|
|
108
108
|
display: inline-flex;
|
|
@@ -240,6 +240,16 @@ const CurrentUserProvider: FC = ({ children }) => {
|
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
+
try {
|
|
244
|
+
await app.apiClient.auth.syncCookies();
|
|
245
|
+
} catch {
|
|
246
|
+
// Cookie bootstrap is best-effort; auth:check remains the source of truth for the current page load.
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
if (!mounted) {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
|
|
243
253
|
const userMeta = createCollectionContextMeta(
|
|
244
254
|
() => app.flowEngine.context.dataSourceManager?.getDataSource('main')?.getCollection('users') || null,
|
|
245
255
|
app.flowEngine.translate('Current user'),
|