@objectstack/metadata 9.1.0 → 9.3.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.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/node.cjs +3 -0
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +3 -0
- package/dist/node.js.map +1 -1
- package/package.json +7 -7
package/dist/index.d.cts
CHANGED
|
@@ -571,6 +571,20 @@ interface MetadataPluginOptions {
|
|
|
571
571
|
* business-data namespaces.
|
|
572
572
|
*/
|
|
573
573
|
registerSystemObjects?: boolean;
|
|
574
|
+
/**
|
|
575
|
+
* Owning package id for source-file metadata loaded by the filesystem
|
|
576
|
+
* scanner (`watch`/eager mode) — the project's `defineStack({ manifest:
|
|
577
|
+
* { id } })` id. When set, scanned items are stamped with
|
|
578
|
+
* `_packageId`/`_provenance: 'package'` via `applyProtection`, exactly
|
|
579
|
+
* like the artifact path, so GET /meta consumers can tell code-defined
|
|
580
|
+
* metadata from user-authored rows.
|
|
581
|
+
*
|
|
582
|
+
* Leave unset when the host has no package identity — items then stay
|
|
583
|
+
* unstamped (runtime-authored semantics). Do NOT pass a guessed value:
|
|
584
|
+
* `_packageId` feeds `isArtifactBacked()` write authorization, so a
|
|
585
|
+
* wrong id silently changes who may edit these items.
|
|
586
|
+
*/
|
|
587
|
+
packageId?: string;
|
|
574
588
|
}
|
|
575
589
|
declare class MetadataPlugin implements Plugin {
|
|
576
590
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -571,6 +571,20 @@ interface MetadataPluginOptions {
|
|
|
571
571
|
* business-data namespaces.
|
|
572
572
|
*/
|
|
573
573
|
registerSystemObjects?: boolean;
|
|
574
|
+
/**
|
|
575
|
+
* Owning package id for source-file metadata loaded by the filesystem
|
|
576
|
+
* scanner (`watch`/eager mode) — the project's `defineStack({ manifest:
|
|
577
|
+
* { id } })` id. When set, scanned items are stamped with
|
|
578
|
+
* `_packageId`/`_provenance: 'package'` via `applyProtection`, exactly
|
|
579
|
+
* like the artifact path, so GET /meta consumers can tell code-defined
|
|
580
|
+
* metadata from user-authored rows.
|
|
581
|
+
*
|
|
582
|
+
* Leave unset when the host has no package identity — items then stay
|
|
583
|
+
* unstamped (runtime-authored semantics). Do NOT pass a guessed value:
|
|
584
|
+
* `_packageId` feeds `isArtifactBacked()` write authorization, so a
|
|
585
|
+
* wrong id silently changes who may edit these items.
|
|
586
|
+
*/
|
|
587
|
+
packageId?: string;
|
|
574
588
|
}
|
|
575
589
|
declare class MetadataPlugin implements Plugin {
|
|
576
590
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -3569,6 +3569,9 @@ var MetadataPlugin = class {
|
|
|
3569
3569
|
for (const item of items) {
|
|
3570
3570
|
const meta = item;
|
|
3571
3571
|
if (meta?.name) {
|
|
3572
|
+
applyProtection(meta, {
|
|
3573
|
+
packageId: this.options.packageId
|
|
3574
|
+
});
|
|
3572
3575
|
await this.manager.register(entry.type, meta.name, item);
|
|
3573
3576
|
}
|
|
3574
3577
|
}
|