play managed publishing: console plan/verify play-publish-changes, ready-to-publish items in play status, desktop hint
This commit is contained in:
parent
29a9683ab7
commit
1bb43fd4a0
20 changed files with 184 additions and 9 deletions
18
cli/play/publish-ready.ts
Normal file
18
cli/play/publish-ready.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// Read-only: the production releases waiting in Publishing overview (managed publishing), from the tracks and the public store page.
|
||||
import type { ShipConfig } from '../lib/config';
|
||||
import { need } from '../lib/ctx';
|
||||
import { type ReadyChange, readyToPublish } from '../lib/play-publish';
|
||||
import { playPublicPage } from '../lib/play-public';
|
||||
import { playClient } from './client';
|
||||
|
||||
export async function readyFromApi(root: string, config: ShipConfig): Promise<ReadyChange[]> {
|
||||
const pkg = need(config.play?.packageName, 'play.packageName');
|
||||
const play = await playClient(root, pkg);
|
||||
let out: ReadyChange[] = [];
|
||||
await play.read(async id => {
|
||||
const tracks = (await play.call<{ tracks?: unknown[] }>('GET', `${play.API}/edits/${id}/tracks`)).tracks ?? [];
|
||||
const publicPage = await playPublicPage(play.packageName);
|
||||
out = readyToPublish({ tracks, publicPage, managedPublishing: config.play?.managedPublishing ?? null });
|
||||
});
|
||||
return out;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue