@enfyra/kernel 1.1.30 → 1.1.32
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/execution/worker.js
CHANGED
|
@@ -733,11 +733,15 @@ function __resetTask(snapshot, taskId, timeoutMs) {
|
|
|
733
733
|
$ctx.$pkgs = $pkgs;
|
|
734
734
|
$ctx.$share = $ctx.$share || {};
|
|
735
735
|
$ctx.$share.$logs = __logs;
|
|
736
|
+
const __createRepoProxy = (table, access) => new Proxy({}, {
|
|
737
|
+
get: (_, method) => async (...args) =>
|
|
738
|
+
__call('repoCall', JSON.stringify({ table: String(table), access, method: String(method), argsJson: JSON.stringify(args) }))
|
|
739
|
+
});
|
|
740
|
+
const __secureRepos = new Proxy({}, {
|
|
741
|
+
get: (_, table) => __createRepoProxy(table, 'secure')
|
|
742
|
+
});
|
|
736
743
|
$ctx.$repos = new Proxy({}, {
|
|
737
|
-
get: (_, table) =>
|
|
738
|
-
get: (_, method) => async (...args) =>
|
|
739
|
-
__call('repoCall', JSON.stringify({ table: String(table), method: String(method), argsJson: JSON.stringify(args) }))
|
|
740
|
-
})
|
|
744
|
+
get: (_, table) => String(table) === 'secure' ? __secureRepos : __createRepoProxy(table)
|
|
741
745
|
});
|
|
742
746
|
$ctx.$helpers = new Proxy({}, {
|
|
743
747
|
get: (_, name) => {
|
|
@@ -764,6 +768,12 @@ function __resetTask(snapshot, taskId, timeoutMs) {
|
|
|
764
768
|
get: (_, method) => async (...args) =>
|
|
765
769
|
__call('cacheCall', JSON.stringify({ method: String(method), argsJson: JSON.stringify(args) }))
|
|
766
770
|
});
|
|
771
|
+
$ctx.$transaction = {
|
|
772
|
+
run: async (...args) =>
|
|
773
|
+
__call('transactionCall', JSON.stringify({
|
|
774
|
+
argsJson: await __stringifyRuntimeArgs(args)
|
|
775
|
+
}))
|
|
776
|
+
};
|
|
767
777
|
$ctx.$storage = new Proxy({}, {
|
|
768
778
|
get: (_, method) => async (...args) =>
|
|
769
779
|
__call('storageCall', JSON.stringify({ method: String(method), argsJson: await __stringifyRuntimeArgs(args) }))
|
package/dist/index.d.ts
CHANGED
|
@@ -319,6 +319,7 @@ export const getEffectiveMemoryBytes: any;
|
|
|
319
319
|
export const getExecutableScript: any;
|
|
320
320
|
export const getForeignKeyColumnName: any;
|
|
321
321
|
export const getIoAbortSignal: any;
|
|
322
|
+
export const runWithIoAbortSignal: any;
|
|
322
323
|
export const getJunctionColumnNames: any;
|
|
323
324
|
export const getJunctionTableName: any;
|
|
324
325
|
export const getShortFkConstraintName: any;
|