@fabricorg/sdui-release 0.7.0 → 0.7.2
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 +12 -0
- package/dist/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The 0.7.1 tarball on the registry was packed from a stale build and does not contain the change its changelog describes: `deriveAuthorizationGrants` still emitted a versionless grant for a view published at two versions, and the `unaddressable` list was absent. This version carries that change. The publish script now builds every package before it packs, so a tarball cannot again lag its source.
|
|
8
|
+
|
|
9
|
+
## 0.7.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- e41c1f5: `deriveAuthorizationGrants` stopped emitting intents whose action the contract does not declare, on the grounds that such a grant is one validation refuses and promotion could never have routed. The view loop three lines above had the same defect and was not fixed: a view published at two versions, which is a first-class pattern, produced one versionless reference that validation reports as `ambiguous_capability_reference` and promotion cannot route. Those views are now left out of `grants.views` and reported in a new `unaddressable` list on the result, with the reference and the versions that made it unaddressable.
|
|
14
|
+
|
|
3
15
|
## 0.7.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -1118,6 +1118,7 @@ function deriveAuthorizationGrants(contracts, held, options = {}) {
|
|
|
1118
1118
|
const views = [];
|
|
1119
1119
|
const intents = [];
|
|
1120
1120
|
const withheld = [];
|
|
1121
|
+
const unaddressable = [];
|
|
1121
1122
|
for (const contract of contracts) {
|
|
1122
1123
|
if (undeclared === "withhold" && !declaresAnyRequirement(contract)) {
|
|
1123
1124
|
withheld.push({ namespace: contract.namespace, missing: { kind: "permission", name: "(none declared)" } });
|
|
@@ -1128,8 +1129,16 @@ function deriveAuthorizationGrants(contracts, held, options = {}) {
|
|
|
1128
1129
|
withheld.push({ namespace: contract.namespace, missing });
|
|
1129
1130
|
continue;
|
|
1130
1131
|
}
|
|
1132
|
+
const versionsByReference = /* @__PURE__ */ new Map();
|
|
1131
1133
|
for (const view of contract.views) {
|
|
1132
1134
|
const reference = `capability://${contract.namespace}/${shortName(view.name, contract.namespace, "/")}`;
|
|
1135
|
+
versionsByReference.set(reference, /* @__PURE__ */ new Set([...versionsByReference.get(reference) ?? [], String(view.version)]));
|
|
1136
|
+
}
|
|
1137
|
+
for (const [reference, versions] of versionsByReference) {
|
|
1138
|
+
if (versions.size > 1) {
|
|
1139
|
+
unaddressable.push({ namespace: contract.namespace, reference, versions: [...versions].sort() });
|
|
1140
|
+
continue;
|
|
1141
|
+
}
|
|
1133
1142
|
if (!bound || bound.views.has(reference)) views.push(reference);
|
|
1134
1143
|
}
|
|
1135
1144
|
const declaredActions = new Set(contract.actions.map((action) => action.actionId));
|
|
@@ -1141,7 +1150,8 @@ function deriveAuthorizationGrants(contracts, held, options = {}) {
|
|
|
1141
1150
|
}
|
|
1142
1151
|
return {
|
|
1143
1152
|
grants: { views: [...new Set(views)].sort(), intents: [...new Set(intents)].sort() },
|
|
1144
|
-
withheld: withheld.sort((left, right) => left.namespace < right.namespace ? -1 : left.namespace > right.namespace ? 1 : 0)
|
|
1153
|
+
withheld: withheld.sort((left, right) => left.namespace < right.namespace ? -1 : left.namespace > right.namespace ? 1 : 0),
|
|
1154
|
+
unaddressable: unaddressable.sort((left, right) => left.reference < right.reference ? -1 : left.reference > right.reference ? 1 : 0)
|
|
1145
1155
|
};
|
|
1146
1156
|
}
|
|
1147
1157
|
function declaresAnyRequirement(contract) {
|