@dxos/functions-testing 0.8.4-main.dfabb4ec29 → 0.8.4-main.effb148878
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/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +4 -2
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/testing/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +18 -18
- package/src/edge-routine.test.ts +2 -2
- package/src/testing/util.ts +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/functions-testing",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.effb148878",
|
|
4
4
|
"description": "Functions tests",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/dxos/dxos"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
12
12
|
"author": "info@dxos.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
@@ -31,22 +31,22 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@effect/platform": "0.94.4",
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/config": "0.8.4-main.
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/functions": "0.8.4-main.
|
|
42
|
-
"@dxos/functions-runtime": "0.8.4-main.
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/log": "0.8.4-main.
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
34
|
+
"@dxos/client": "0.8.4-main.effb148878",
|
|
35
|
+
"@dxos/async": "0.8.4-main.effb148878",
|
|
36
|
+
"@dxos/compute": "0.8.4-main.effb148878",
|
|
37
|
+
"@dxos/config": "0.8.4-main.effb148878",
|
|
38
|
+
"@dxos/context": "0.8.4-main.effb148878",
|
|
39
|
+
"@dxos/echo": "0.8.4-main.effb148878",
|
|
40
|
+
"@dxos/functions": "0.8.4-main.effb148878",
|
|
41
|
+
"@dxos/functions-runtime-cloudflare": "0.8.4-main.effb148878",
|
|
42
|
+
"@dxos/functions-runtime": "0.8.4-main.effb148878",
|
|
43
|
+
"@dxos/invariant": "0.8.4-main.effb148878",
|
|
44
|
+
"@dxos/log": "0.8.4-main.effb148878",
|
|
45
|
+
"@dxos/operation": "0.8.4-main.effb148878",
|
|
46
|
+
"@dxos/schema": "0.8.4-main.effb148878",
|
|
47
|
+
"@dxos/assistant-toolkit": "0.8.4-main.effb148878",
|
|
48
|
+
"@dxos/util": "0.8.4-main.effb148878",
|
|
49
|
+
"@dxos/protocols": "0.8.4-main.effb148878"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|
package/src/edge-routine.test.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { Client } from '@dxos/client';
|
|
|
10
10
|
import { Blueprint, Operation, Routine, Trigger } from '@dxos/compute';
|
|
11
11
|
import { configPreset } from '@dxos/config';
|
|
12
12
|
import { Context } from '@dxos/context';
|
|
13
|
-
import { Feed, Obj, Ref } from '@dxos/echo';
|
|
13
|
+
import { Feed, Obj, Ref, Type } from '@dxos/echo';
|
|
14
14
|
import { TestSchema } from '@dxos/echo/testing';
|
|
15
15
|
import { dbg, log } from '@dxos/log';
|
|
16
16
|
import { ErrorCodec } from '@dxos/protocols';
|
|
@@ -66,7 +66,7 @@ describe('Edge routine', { tags: ['functions-e2e'] }, () => {
|
|
|
66
66
|
name: 'edge-e2e-count-orgs-db-blueprint',
|
|
67
67
|
instructions: trim`
|
|
68
68
|
You have access to the Database blueprint tools.
|
|
69
|
-
Use the Query tool exactly once with typename "${TestSchema.Organization
|
|
69
|
+
Use the Query tool exactly once with typename "${Type.getTypename(TestSchema.Organization)}" and no other arguments.
|
|
70
70
|
Then call completeJob with the output object { "count": <number of rows returned by Query> }.
|
|
71
71
|
If you are unable to query -- fail.
|
|
72
72
|
Do not list schemas first.
|
package/src/testing/util.ts
CHANGED
|
@@ -84,8 +84,10 @@ export const observeInvocations = async (space: Space, maxCount: number | null)
|
|
|
84
84
|
while (true) {
|
|
85
85
|
try {
|
|
86
86
|
const traceFeed = space.properties.invocationTraceFeed?.target;
|
|
87
|
-
const
|
|
88
|
-
const invocations =
|
|
87
|
+
const traceFeedDXN = traceFeed ? Feed.getQueueUri(traceFeed) : undefined;
|
|
88
|
+
const invocations = traceFeedDXN
|
|
89
|
+
? ((await space.queues.get(traceFeedDXN, { subspaceTag: traceFeed!.namespace }).queryObjects()) ?? [])
|
|
90
|
+
: [];
|
|
89
91
|
|
|
90
92
|
for (const invocation of invocations) {
|
|
91
93
|
if (Obj.instanceOf(InvocationTraceStartEvent, invocation)) {
|