@arcote.tech/arc-react 0.0.23 → 0.0.24
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/dist/index.js +2 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -212,22 +212,7 @@ var reactModel = (arcContext, databaseName) => {
|
|
|
212
212
|
if (!context) {
|
|
213
213
|
throw new Error("useQuery must be used within a ModelProvider");
|
|
214
214
|
}
|
|
215
|
-
|
|
216
|
-
return new Proxy({}, {
|
|
217
|
-
get: (_, name) => {
|
|
218
|
-
if (name in commands) {
|
|
219
|
-
return async (...args) => {
|
|
220
|
-
const dataStorage2 = context.dataStorage.fork();
|
|
221
|
-
const commandContext = arcContext.commandContext(dataStorage2);
|
|
222
|
-
const result = await commands[name](commandContext, ...args);
|
|
223
|
-
await dataStorage2.merge();
|
|
224
|
-
return result;
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
console.warn(`Command '${name}' not found in the context.`);
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
});
|
|
215
|
+
return arcContext.commandsClient(context.dataStorage);
|
|
231
216
|
},
|
|
232
217
|
async function query(queryBuilderFn) {
|
|
233
218
|
const queryBuilder = arcContext.queryBuilder();
|
|
@@ -252,4 +237,4 @@ export {
|
|
|
252
237
|
formResolver
|
|
253
238
|
};
|
|
254
239
|
|
|
255
|
-
//# debugId=
|
|
240
|
+
//# debugId=75A81147F2E4FEEE64756E2164756E21
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"version": "0.0.
|
|
7
|
+
"version": "0.0.24",
|
|
8
8
|
"private": false,
|
|
9
9
|
"author": "Przemysław Krasiński [arcote.tech]",
|
|
10
10
|
"description": "React client for the Arc framework, providing utilities for querying data and executing commands, enhancing the development of reactive and efficient user interfaces.",
|