Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@
]
},
"installation": {
"visibility": "default",
"visibility": "hidden",
"recommendation": "integration-managed",
"primary_type": "task",
"caution": "TaskNotes applications manage the contract and schemas; the installed task type remains editable.",
Expand Down
2 changes: 1 addition & 1 deletion packs/tasknotes.task/0.3.0-rc.12.pack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ display:
badges:
- TaskNotes compatible
installation:
visibility: default
visibility: hidden
recommendation: integration-managed
primary_type: task
caution: TaskNotes applications manage the contract and schemas; the installed task type remains editable.
Expand Down
12 changes: 12 additions & 0 deletions scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,18 @@ for (const packFile of packFiles) {
}
}

// Apps list every non-hidden pack, so a superseded version left visible shows
// as a duplicate choice. Hide the previous version when publishing a new one.
const offered = new Map();
for (const pack of packs) {
if (pack.installation.visibility === "hidden") continue;
const previous = offered.get(pack.id);
if (previous) {
fail(`${pack.id} offers both ${previous} and ${pack.version}; hide the superseded version.`);
}
offered.set(pack.id, pack.version);
}

const catalog = {
...catalogSource,
contracts: [...contracts.values()].sort(compareIdentity),
Expand Down
Loading