@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.
- package/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +10 -0
- package/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +90 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +90 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/engine.ts +86 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @objectstack/objectql@2.0.
|
|
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
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m58.00 KB[39m
|
|
14
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m118.58 KB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 102ms
|
|
16
|
+
[32mCJS[39m [1mdist/index.js [22m[32m59.42 KB[39m
|
|
17
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m119.30 KB[39m
|
|
18
|
+
[32mCJS[39m ⚡️ Build success in 102ms
|
|
19
19
|
[34mDTS[39m Build start
|
|
20
|
-
[32mDTS[39m ⚡️ Build success in
|
|
21
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[
|
|
22
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
20
|
+
[32mDTS[39m ⚡️ Build success in 9838ms
|
|
21
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m68.20 KB[39m
|
|
22
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m68.20 KB[39m
|
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
|