@twin.org/dataspace-app-runner 0.0.3-next.17 → 0.0.3-next.19
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/README.md +3 -1
- package/docs/changelog.md +28 -0
- package/docs/examples.md +40 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Dataspace App Runner
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package runs dataspace app activity handlers in background execution contexts. It is intended for workloads where app logic should execute asynchronously while preserving runtime context and engine state.
|
|
4
|
+
|
|
5
|
+
By isolating execution concerns, it helps services schedule and process activity workloads consistently.
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
6
8
|
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.19](https://github.com/twinfoundation/dataspace/compare/dataspace-app-runner-v0.0.3-next.18...dataspace-app-runner-v0.0.3-next.19) (2026-03-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **dataspace-app-runner:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/dataspace-models bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
16
|
+
|
|
17
|
+
## [0.0.3-next.18](https://github.com/twinfoundation/dataspace/compare/dataspace-app-runner-v0.0.3-next.17...dataspace-app-runner-v0.0.3-next.18) (2026-03-09)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Miscellaneous Chores
|
|
21
|
+
|
|
22
|
+
* **dataspace-app-runner:** Synchronize repo versions
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* The following workspace dependencies were updated
|
|
28
|
+
* dependencies
|
|
29
|
+
* @twin.org/dataspace-models bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
30
|
+
|
|
3
31
|
## [0.0.3-next.17](https://github.com/twinfoundation/dataspace/compare/dataspace-app-runner-v0.0.3-next.16...dataspace-app-runner-v0.0.3-next.17) (2026-03-06)
|
|
4
32
|
|
|
5
33
|
|
package/docs/examples.md
CHANGED
|
@@ -1 +1,40 @@
|
|
|
1
|
-
#
|
|
1
|
+
# App Runner Examples
|
|
2
|
+
|
|
3
|
+
Use these snippets to run application logic in background workers while preserving context and engine state.
|
|
4
|
+
|
|
5
|
+
## App Runner Functions
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { appRunnerStart, appRunner, appRunnerEnd } from '@twin.org/dataspace-app-runner';
|
|
9
|
+
import type { IExecutionPayload } from '@twin.org/dataspace-models';
|
|
10
|
+
import type { IEngineCoreClone } from '@twin.org/engine-models';
|
|
11
|
+
|
|
12
|
+
declare const engineCloneData: IEngineCoreClone;
|
|
13
|
+
declare const payload: IExecutionPayload;
|
|
14
|
+
|
|
15
|
+
await appRunnerStart(engineCloneData);
|
|
16
|
+
const result = await appRunner(engineCloneData, payload);
|
|
17
|
+
console.log(result); // 1234
|
|
18
|
+
await appRunnerEnd();
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { appRunner } from '@twin.org/dataspace-app-runner';
|
|
23
|
+
import type { IExecutionPayload } from '@twin.org/dataspace-models';
|
|
24
|
+
import type { IEngineCoreClone } from '@twin.org/engine-models';
|
|
25
|
+
|
|
26
|
+
declare const engineCloneData: IEngineCoreClone;
|
|
27
|
+
|
|
28
|
+
const payload: IExecutionPayload = {
|
|
29
|
+
executorApp: 'https://twin.example.org/app1',
|
|
30
|
+
activityLogEntryId: 'urn:activity-log:001',
|
|
31
|
+
activity: {
|
|
32
|
+
'@context': 'https://www.w3.org/ns/activitystreams',
|
|
33
|
+
type: 'Create',
|
|
34
|
+
id: 'urn:activity:1'
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const result = await appRunner(engineCloneData, payload);
|
|
39
|
+
console.log(typeof result); // string
|
|
40
|
+
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/dataspace-app-runner",
|
|
3
|
-
"version": "0.0.3-next.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.3-next.19",
|
|
4
|
+
"description": "Runs dataspace app activity handlers in background execution contexts.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/twinfoundation/dataspace.git",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@twin.org/context": "next",
|
|
18
18
|
"@twin.org/core": "next",
|
|
19
|
-
"@twin.org/dataspace-models": "0.0.3-next.
|
|
19
|
+
"@twin.org/dataspace-models": "0.0.3-next.19",
|
|
20
20
|
"@twin.org/engine-models": "next",
|
|
21
21
|
"@twin.org/logging-models": "next",
|
|
22
22
|
"@twin.org/nameof": "next",
|