@objectstack/core 9.10.0 → 10.0.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/dist/index.d.cts CHANGED
@@ -1876,6 +1876,7 @@ declare function createMemoryMetadata(): {
1876
1876
  _fallback: boolean;
1877
1877
  _serviceName: string;
1878
1878
  register(type: string, name: string, data: any): Promise<void>;
1879
+ registerInMemory(type: string, name: string, data: any): void;
1879
1880
  get(type: string, name: string): Promise<any>;
1880
1881
  list(type: string): Promise<any[]>;
1881
1882
  unregister(type: string, name: string): Promise<void>;
package/dist/index.d.ts CHANGED
@@ -1876,6 +1876,7 @@ declare function createMemoryMetadata(): {
1876
1876
  _fallback: boolean;
1877
1877
  _serviceName: string;
1878
1878
  register(type: string, name: string, data: any): Promise<void>;
1879
+ registerInMemory(type: string, name: string, data: any): void;
1879
1880
  get(type: string, name: string): Promise<any>;
1880
1881
  list(type: string): Promise<any[]>;
1881
1882
  unregister(type: string, name: string): Promise<void>;
package/dist/index.js CHANGED
@@ -1133,6 +1133,19 @@ function createMemoryMetadata() {
1133
1133
  async register(type, name, data) {
1134
1134
  getTypeMap(type).set(name, data);
1135
1135
  },
1136
+ // Mirror MetadataManager.registerInMemory (synchronous, no persistence).
1137
+ // AppPlugin gates code-defined-datasource / stack-RBAC registration on
1138
+ // `typeof metadata.registerInMemory === 'function'` (it must register
1139
+ // GitOps-managed artefacts *listably* but never persist them). Without this
1140
+ // method the guard was false on the host-config / standalone boot path —
1141
+ // where this fallback (not MetadataPlugin) provides the `metadata` service —
1142
+ // so `defineStack({ datasources })` entries silently never reached the
1143
+ // registry and were absent from GET /api/v1/datasources and
1144
+ // GET /api/v1/meta/datasource (ADR-0015 §18). This store is already
1145
+ // in-memory only, so registerInMemory and register share an implementation.
1146
+ registerInMemory(type, name, data) {
1147
+ getTypeMap(type).set(name, data);
1148
+ },
1136
1149
  async get(type, name) {
1137
1150
  return getTypeMap(type).get(name);
1138
1151
  },