Drop the last vestiges of the __key convention

The upload command names the asset set on its command line now.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Christopher Monsanto
2026-08-17 15:41:09 -04:00
parent 8bf512480a
commit 167de94fe4
2 changed files with 3 additions and 4 deletions

View File

@@ -18,8 +18,7 @@ export interface SrcFile extends pathlib.Path {
export type CopySource = Artifact | SrcFile | string; // string = repo-relative path
// The finish API: nice naming over built artifacts and raw sources. Ops are
// queued in call order (the tar entry order), so __key-style entries must be
// written first.
// queued in call order, which is the tar entry order.
export interface DeployCtx {
copy(src : CopySource, dst : string) : void;
write(dst : string, data : string) : void;

View File

@@ -65,11 +65,11 @@ test('ctx queues artifact copies from the CAS, writes and reads', () => {
const artifact = makeArtifact(casDir, 'bytes', 'webp');
const aq = new ActionQueue();
const ctx = makeCtx(casDir, aq);
ctx.write('__key', 'sprites');
ctx.write('m.json', '{}');
ctx.copy(artifact, 'sprites/x.webp');
assert.equal(ctx.read(artifact), 'bytes');
const ops = aq.log.filter(e => e.type === 'Op');
assert.deepEqual(ops.map(e => e.dst), ['__key', 'sprites/x.webp']);
assert.deepEqual(ops.map(e => e.dst), ['m.json', 'sprites/x.webp']);
assert.equal((ops[1] as {op : {src : string}}).op.src, casPath(casDir, artifact.hash, 'webp'));
});