@twin.org/dataspace-app-runner 0.0.3-next.16 → 0.0.3-next.17
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/es/appRunner.js.map +1 -1
- package/docs/changelog.md +14 -0
- package/package.json +2 -2
package/dist/es/appRunner.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appRunner.js","sourceRoot":"","sources":["../../src/appRunner.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACN,mBAAmB,EAGnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACN,iBAAiB,EAGjB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"appRunner.js","sourceRoot":"","sources":["../../src/appRunner.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACN,mBAAmB,EAGnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACN,iBAAiB,EAGjB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAEtC,IAAI,MAA+B,CAAC;AAEpC;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,eAAiC;IACrE,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,CAAC;QAChC,uFAAuF;QACvF,2DAA2D;QAC3D,sFAAsF;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CAAC,CAAC;IACtD,OAAO,MAAM,CAAC;AACf,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ContextIdStore } from \"@twin.org/context\";\nimport { Guards, Is } from \"@twin.org/core\";\nimport {\n\tDataspaceAppFactory,\n\ttype IDataspaceApp,\n\ttype IExecutionPayload\n} from \"@twin.org/dataspace-models\";\nimport { EngineCore } from \"@twin.org/engine-core\";\nimport {\n\tEngineCoreFactory,\n\ttype IEngineCore,\n\ttype IEngineCoreClone\n} from \"@twin.org/engine-models\";\nimport { nameof } from \"@twin.org/nameof\";\n\nconst APP_RUNNER_SOURCE = \"appRunner\";\n\nlet engine: IEngineCore | undefined;\n\n/**\n * Dataspace Task Startup Method.\n * @param engineCloneData The Engine.\n * @returns Nothing.\n */\nexport async function appRunnerStart(engineCloneData: IEngineCoreClone): Promise<void> {\n\tif (!Is.empty(engineCloneData)) {\n\t\t// If the clone data is not empty we use it to create a new engine as it's a new thread\n\t\t// otherwise we assume the factories are already populated.\n\t\t// We also must return a fixed instance of the engine from the factory in case another\n\t\t// background task is started in the same process, otherwise if the app runner ends\n\t\t// and removes the engine the factory would have a reference undefined.\n\t\tconst newEngine = new EngineCore();\n\t\tEngineCoreFactory.register(\"engine\", () => newEngine);\n\n\t\tnewEngine.populateClone(engineCloneData, await ContextIdStore.getContextIds(), true);\n\t\tawait newEngine.start();\n\t\tengine = newEngine;\n\t}\n}\n\n/**\n * Dataspace Task End.\n * @returns Nothing.\n */\nexport async function appRunnerEnd(): Promise<void> {\n\tif (!Is.empty(engine)) {\n\t\tawait engine.stop();\n\t\tengine = undefined;\n\t}\n}\n\n/**\n * Dataspace Task.\n * @param engineCloneData The Engine.\n * @param payload The payload\n * @returns The execution result.\n */\nexport async function appRunner(\n\tengineCloneData: IEngineCoreClone,\n\tpayload: IExecutionPayload\n): Promise<unknown> {\n\tGuards.objectValue<IExecutionPayload>(APP_RUNNER_SOURCE, nameof(payload), payload);\n\tGuards.stringValue(APP_RUNNER_SOURCE, nameof(payload.executorApp), payload.executorApp);\n\tGuards.stringValue(\n\t\tAPP_RUNNER_SOURCE,\n\t\tnameof(payload.activityLogEntryId),\n\t\tpayload.activityLogEntryId\n\t);\n\tGuards.object<IDataspaceApp>(APP_RUNNER_SOURCE, nameof(payload.activity), payload.activity);\n\n\tconst app = DataspaceAppFactory.get<IDataspaceApp>(payload.executorApp);\n\n\tconst handleActivity = app?.handleActivity?.bind(app);\n\tGuards.function(APP_RUNNER_SOURCE, nameof(handleActivity), handleActivity);\n\tconst result = await handleActivity(payload.activity);\n\treturn result;\n}\n"]}
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [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
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* avoid compaction of incoming activities ([#77](https://github.com/twinfoundation/dataspace/issues/77)) ([ff43d6a](https://github.com/twinfoundation/dataspace/commit/ff43d6a3e1563eb9cb185501134b2a53ae88787c))
|
|
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.16 to 0.0.3-next.17
|
|
16
|
+
|
|
3
17
|
## [0.0.3-next.16](https://github.com/twinfoundation/dataspace/compare/dataspace-app-runner-v0.0.3-next.15...dataspace-app-runner-v0.0.3-next.16) (2026-03-02)
|
|
4
18
|
|
|
5
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/dataspace-app-runner",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.17",
|
|
4
4
|
"description": "Dataspace App Runner",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "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.17",
|
|
20
20
|
"@twin.org/engine-models": "next",
|
|
21
21
|
"@twin.org/logging-models": "next",
|
|
22
22
|
"@twin.org/nameof": "next",
|