@asyra/system-context 0.5.2 → 0.6.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,89 @@
1
+ # @asyra/system-context
2
+
3
+ ## 0.5.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 22883b1: Support owner-coordinated runtime replacement for applications such as Asyra Sim.
8
+ Quiesce feature work before retiring runtime-owned state, subscriptions, input
9
+ bindings, render resources, and registration graphs. Retain preset installation
10
+ cleanup and prevent callbacks from a retired runtime from affecting its successor.
11
+
12
+ Expose Core document-load preflight and validated renderer resizing through the
13
+ public facade. Applications can validate a replacement document before retiring
14
+ the active runtime, while ordinary document loading retains its existing history
15
+ ownership contract.
16
+
17
+ - Updated dependencies [22883b1]
18
+ - @asyra/utils@0.5.2
19
+
20
+ ## 0.5.2
21
+
22
+ ### Patch Changes
23
+
24
+ - Republish the affected Framework packages with publishable internal dependency
25
+ ranges instead of monorepo-only `workspace:*` metadata.
26
+
27
+ ## 0.5.1
28
+
29
+ ### Patch Changes
30
+
31
+ - Exceptional synchronized patch release for the fixed 19-package Framework set.
32
+ - Updated dependencies
33
+ - @asyra/utils@0.5.1
34
+
35
+ ## 0.5.0
36
+
37
+ ### Minor Changes
38
+
39
+ - Exceptional synchronized minor release for the fixed 19-package Framework set.
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies
44
+ - @asyra/utils@0.5.0
45
+
46
+ ## 0.2.5
47
+
48
+ ### Patch Changes
49
+
50
+ - Auto-patch all packages.
51
+ - Updated dependencies
52
+ - @asyra/reactive-events@0.2.5
53
+ - @asyra/utils@0.2.5
54
+
55
+ ## 0.2.4
56
+
57
+ ### Patch Changes
58
+
59
+ - Auto-patch all packages.
60
+ - Updated dependencies
61
+ - @asyra/reactive-events@0.2.4
62
+ - @asyra/utils@0.2.4
63
+
64
+ ## 0.2.3
65
+
66
+ ### Patch Changes
67
+
68
+ - Auto-patch all packages.
69
+ - Updated dependencies
70
+ - @asyra/reactive-events@0.2.3
71
+ - @asyra/utils@0.2.3
72
+
73
+ ## 0.2.2
74
+
75
+ ### Patch Changes
76
+
77
+ - Auto-patch all packages.
78
+ - Updated dependencies
79
+ - @asyra/reactive-events@0.2.2
80
+ - @asyra/utils@0.2.2
81
+
82
+ ## 0.2.1
83
+
84
+ ### Patch Changes
85
+
86
+ - Auto-patch all packages.
87
+ - Updated dependencies
88
+ - @asyra/reactive-events@0.2.1
89
+ - @asyra/utils@0.2.1
package/README.md CHANGED
@@ -42,8 +42,12 @@ Runtime writes validate before update. Load produces an instance-bound artifact
42
42
 
43
43
  ## Support and policy
44
44
 
45
- This repository does not accept external issues or contributions. You may use,
46
- inspect, and fork the package under the [MIT License](https://github.com/karote00/asyra/blob/main/LICENSE).
47
- Follow the [security policy](https://github.com/karote00/asyra/blob/main/SECURITY.md) for
48
- security-sensitive reports and the [root policy](https://github.com/karote00/asyra) for the
49
- current support boundary.
45
+ GitHub Discussions is the intended public channel for community conversation and
46
+ general help. Discussions is not enabled for this repository yet, so there is
47
+ currently no public community support destination. GitHub Issues are not a
48
+ general public support channel. External pull requests are not accepted by
49
+ default. Community participation creates no SLA or response deadline.
50
+
51
+ You may use, inspect, and fork the package under the [MIT License](https://github.com/karote00/asyra/blob/main/LICENSE).
52
+ Read the <a href="https://github.com/karote00/asyra/blob/main/SUPPORT.md" target="_blank" rel="noopener noreferrer">support policy</a>.
53
+ For suspected vulnerabilities, follow the <a href="https://github.com/karote00/asyra/blob/main/SECURITY.md" target="_blank" rel="noopener noreferrer">security policy</a> and report privately.
@@ -41,6 +41,7 @@ export declare class ManagedPropertyState {
41
41
  has(key: string): boolean;
42
42
  unregister(key: string): boolean;
43
43
  getAllKeys(): string[];
44
+ resetRuntime(): void;
44
45
  }
45
46
  declare const _default: ManagedPropertyState;
46
47
  export default _default;
@@ -188,5 +188,22 @@ export class ManagedPropertyState {
188
188
  getAllKeys() {
189
189
  return Array.from(this.properties.keys());
190
190
  }
191
+ resetRuntime() {
192
+ const properties = [...this.properties.values()];
193
+ this.properties.clear();
194
+ this.validatedLoadArtifacts = new WeakMap();
195
+ const failures = [];
196
+ properties.forEach(({ state }) => {
197
+ try {
198
+ state.complete();
199
+ }
200
+ catch (error) {
201
+ failures.push(error);
202
+ }
203
+ });
204
+ if (failures.length > 0) {
205
+ throw failures[0];
206
+ }
207
+ }
191
208
  }
192
209
  export default new ManagedPropertyState();
@@ -1,5 +1,6 @@
1
1
  import { HandlerDeps, SystemContextAPIs, RootAPIs, ManagedPropertyStateAPIs } from './types/index.js';
2
2
  export declare class SystemContext implements SystemContextAPIs {
3
+ private readonly deps;
3
4
  getSystemContextSnapshot: RootAPIs['getSystemContextSnapshot'];
4
5
  registerProperty: ManagedPropertyStateAPIs['registerProperty'];
5
6
  getManagedProperty: ManagedPropertyStateAPIs['getManagedProperty'];
@@ -12,6 +13,7 @@ export declare class SystemContext implements SystemContextAPIs {
12
13
  loadManagedProperties: ManagedPropertyStateAPIs['loadManagedProperties'];
13
14
  saveManagedProperties: ManagedPropertyStateAPIs['saveManagedProperties'];
14
15
  constructor(deps: HandlerDeps);
16
+ resetRuntime(): void;
15
17
  }
16
18
  declare const systemContext: SystemContext;
17
19
  export default systemContext;
@@ -1,6 +1,7 @@
1
1
  import { createAllAPIs } from './apis/index.js';
2
2
  import { managedPropertyState } from './states/index.js';
3
3
  export class SystemContext {
4
+ deps;
4
5
  getSystemContextSnapshot;
5
6
  registerProperty;
6
7
  getManagedProperty;
@@ -13,9 +14,13 @@ export class SystemContext {
13
14
  loadManagedProperties;
14
15
  saveManagedProperties;
15
16
  constructor(deps) {
17
+ this.deps = deps;
16
18
  const apis = createAllAPIs(deps);
17
19
  Object.assign(this, apis);
18
20
  }
21
+ resetRuntime() {
22
+ this.deps.managedPropertyState.resetRuntime();
23
+ }
19
24
  }
20
25
  const systemContext = new SystemContext({
21
26
  managedPropertyState
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asyra/system-context",
3
- "version": "0.5.2",
3
+ "version": "0.6.0",
4
4
  "description": "Provides reactive system parameters, tool states, and feature access control for the core application.",
5
5
  "author": "Asa Tsai",
6
6
  "license": "MIT",
@@ -9,7 +9,7 @@
9
9
  "url": "git+https://github.com/karote00/asyra.git",
10
10
  "directory": "packages/system-context"
11
11
  },
12
- "homepage": "https://asyra-framework.vercel.app",
12
+ "homepage": "https://asyra-framework.pages.dev",
13
13
  "type": "module",
14
14
  "engines": {
15
15
  "node": "24.x"
@@ -38,7 +38,7 @@
38
38
  "has:test": "find . -type f \\( -name \"*.test.ts\" -o -name \"*.test.tsx\" \\) | grep -q .",
39
39
  "test": "yarn has:test && vitest || echo 'No test files found. Skipping test.'",
40
40
  "test:local": "vitest run",
41
- "test:ci": "yarn has:test && vitest run --coverage --reporter=default --reporter=junit || echo 'No test files found. Skipping test:ci.'"
41
+ "test:ci": "yarn has:test && vitest run --coverage --reporter=default --reporter=junit"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@vitest/coverage-v8": "^3.2.6",
@@ -46,7 +46,7 @@
46
46
  "vitest": "^3.2.6"
47
47
  },
48
48
  "dependencies": {
49
- "@asyra/utils": "0.5.1",
49
+ "@asyra/utils": "0.6.0",
50
50
  "rxjs": "^7.8.1"
51
51
  }
52
- }
52
+ }