@objectstack/objectql 2.0.2 → 2.0.3

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @objectstack/objectql@2.0.2 build /home/runner/work/spec/spec/packages/objectql
2
+ > @objectstack/objectql@2.0.3 build /home/runner/work/spec/spec/packages/objectql
3
3
  > tsup --config ../../tsup.config.ts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,13 +10,13 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- CJS dist/index.js 56.13 KB
14
- CJS dist/index.js.map 113.33 KB
15
- CJS ⚡️ Build success in 83ms
16
- ESM dist/index.mjs 54.71 KB
17
- ESM dist/index.mjs.map 112.62 KB
18
- ESM ⚡️ Build success in 84ms
13
+ ESM dist/index.mjs 58.00 KB
14
+ ESM dist/index.mjs.map 118.58 KB
15
+ ESM ⚡️ Build success in 102ms
16
+ CJS dist/index.js 59.42 KB
17
+ CJS dist/index.js.map 119.30 KB
18
+ CJS ⚡️ Build success in 102ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 9304ms
21
- DTS dist/index.d.mts 67.65 KB
22
- DTS dist/index.d.ts 67.65 KB
20
+ DTS ⚡️ Build success in 9838ms
21
+ DTS dist/index.d.mts 68.20 KB
22
+ DTS dist/index.d.ts 68.20 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @objectstack/objectql
2
2
 
3
+ ## 2.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Patch release for maintenance and stability improvements
8
+ - Updated dependencies
9
+ - @objectstack/spec@2.0.3
10
+ - @objectstack/core@2.0.3
11
+ - @objectstack/types@2.0.3
12
+
3
13
  ## 2.0.2
4
14
 
5
15
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1421,6 +1421,18 @@ declare class ObjectQL implements IDataEngine {
1421
1421
  * the manifest contains UI navigation definitions (AppSchema).
1422
1422
  */
1423
1423
  registerApp(manifest: any): void;
1424
+ /**
1425
+ * Register a nested plugin's metadata (objects, actions, views, etc.)
1426
+ *
1427
+ * Unlike registerApp(), this does NOT call SchemaRegistry.installPackage()
1428
+ * because plugins are not formal manifests — they are lightweight config
1429
+ * bundles with objects, actions, triggers, and navigation.
1430
+ *
1431
+ * @param plugin - The plugin config object
1432
+ * @param parentId - The parent package ID (for ownership tracking)
1433
+ * @param parentNamespace - The parent package's namespace (for FQN resolution)
1434
+ */
1435
+ private registerPlugin;
1424
1436
  /**
1425
1437
  * Register a new storage driver
1426
1438
  */
package/dist/index.d.ts CHANGED
@@ -1421,6 +1421,18 @@ declare class ObjectQL implements IDataEngine {
1421
1421
  * the manifest contains UI navigation definitions (AppSchema).
1422
1422
  */
1423
1423
  registerApp(manifest: any): void;
1424
+ /**
1425
+ * Register a nested plugin's metadata (objects, actions, views, etc.)
1426
+ *
1427
+ * Unlike registerApp(), this does NOT call SchemaRegistry.installPackage()
1428
+ * because plugins are not formal manifests — they are lightweight config
1429
+ * bundles with objects, actions, triggers, and navigation.
1430
+ *
1431
+ * @param plugin - The plugin config object
1432
+ * @param parentId - The parent package ID (for ownership tracking)
1433
+ * @param parentNamespace - The parent package's namespace (for FQN resolution)
1434
+ */
1435
+ private registerPlugin;
1424
1436
  /**
1425
1437
  * Register a new storage driver
1426
1438
  */
package/dist/index.js CHANGED
@@ -1282,6 +1282,96 @@ var ObjectQL = class {
1282
1282
  this.logger.debug("Registered Kind", { kind: kind.name || kind.type, from: id });
1283
1283
  }
1284
1284
  }
1285
+ if (Array.isArray(manifest.plugins) && manifest.plugins.length > 0) {
1286
+ this.logger.debug("Processing nested plugins", { id, count: manifest.plugins.length });
1287
+ for (const plugin of manifest.plugins) {
1288
+ if (plugin && typeof plugin === "object") {
1289
+ const pluginName = plugin.name || plugin.id || "unnamed-plugin";
1290
+ this.logger.debug("Registering nested plugin", { pluginName, parentId: id });
1291
+ this.registerPlugin(plugin, id, namespace);
1292
+ }
1293
+ }
1294
+ }
1295
+ }
1296
+ /**
1297
+ * Register a nested plugin's metadata (objects, actions, views, etc.)
1298
+ *
1299
+ * Unlike registerApp(), this does NOT call SchemaRegistry.installPackage()
1300
+ * because plugins are not formal manifests — they are lightweight config
1301
+ * bundles with objects, actions, triggers, and navigation.
1302
+ *
1303
+ * @param plugin - The plugin config object
1304
+ * @param parentId - The parent package ID (for ownership tracking)
1305
+ * @param parentNamespace - The parent package's namespace (for FQN resolution)
1306
+ */
1307
+ registerPlugin(plugin, parentId, parentNamespace) {
1308
+ const pluginName = plugin.name || plugin.id || "unnamed";
1309
+ const pluginNamespace = plugin.namespace || parentNamespace;
1310
+ const ownerId = parentId;
1311
+ if (plugin.objects) {
1312
+ try {
1313
+ if (Array.isArray(plugin.objects)) {
1314
+ this.logger.debug("Registering plugin objects (Array)", { pluginName, count: plugin.objects.length });
1315
+ for (const objDef of plugin.objects) {
1316
+ const fqn = SchemaRegistry.registerObject(objDef, ownerId, pluginNamespace, "own");
1317
+ this.logger.debug("Registered Object", { fqn, from: pluginName });
1318
+ }
1319
+ } else {
1320
+ const entries = Object.entries(plugin.objects);
1321
+ this.logger.debug("Registering plugin objects (Map)", { pluginName, count: entries.length });
1322
+ for (const [name, objDef] of entries) {
1323
+ objDef.name = name;
1324
+ const fqn = SchemaRegistry.registerObject(objDef, ownerId, pluginNamespace, "own");
1325
+ this.logger.debug("Registered Object", { fqn, from: pluginName });
1326
+ }
1327
+ }
1328
+ } catch (err) {
1329
+ this.logger.warn("Failed to register plugin objects", { pluginName, error: err.message });
1330
+ }
1331
+ }
1332
+ if (plugin.name && plugin.navigation) {
1333
+ try {
1334
+ SchemaRegistry.registerApp(plugin, ownerId);
1335
+ this.logger.debug("Registered plugin-as-app", { app: plugin.name, from: pluginName });
1336
+ } catch (err) {
1337
+ this.logger.warn("Failed to register plugin as app", { pluginName, error: err.message });
1338
+ }
1339
+ }
1340
+ const metadataArrayKeys = [
1341
+ "actions",
1342
+ "views",
1343
+ "pages",
1344
+ "dashboards",
1345
+ "reports",
1346
+ "themes",
1347
+ "flows",
1348
+ "workflows",
1349
+ "approvals",
1350
+ "webhooks",
1351
+ "roles",
1352
+ "permissions",
1353
+ "profiles",
1354
+ "sharingRules",
1355
+ "policies",
1356
+ "agents",
1357
+ "ragPipelines",
1358
+ "apis",
1359
+ "hooks",
1360
+ "mappings",
1361
+ "analyticsCubes",
1362
+ "connectors"
1363
+ ];
1364
+ for (const key of metadataArrayKeys) {
1365
+ const items = plugin[key];
1366
+ if (Array.isArray(items) && items.length > 0) {
1367
+ for (const item of items) {
1368
+ const itemName = item.name || item.id;
1369
+ if (itemName) {
1370
+ SchemaRegistry.registerItem(key, item, "name", ownerId);
1371
+ }
1372
+ }
1373
+ }
1374
+ }
1285
1375
  }
1286
1376
  /**
1287
1377
  * Register a new storage driver