@agentage/cli 0.70.0 → 0.71.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/commands/extension/release-changed.d.ts +2 -0
- package/dist/commands/extension/release-changed.js +128 -0
- package/dist/commands/extension/release-date.d.ts +6 -0
- package/dist/commands/extension/release-date.js +30 -0
- package/dist/commands/extension/release-folders.d.ts +6 -0
- package/dist/commands/extension/release-folders.js +53 -0
- package/dist/commands/extension/release-plan.d.ts +26 -0
- package/dist/commands/extension/release-plan.js +102 -0
- package/dist/commands/extension/release-steps.d.ts +15 -0
- package/dist/commands/extension/release-steps.js +112 -0
- package/dist/commands/extension/release-summary.d.ts +11 -0
- package/dist/commands/extension/release-summary.js +23 -0
- package/dist/commands/extension/release.d.ts +4 -0
- package/dist/commands/extension/release.js +16 -106
- package/dist/program-deps.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { CliError } from '../../lib/json-output.js';
|
|
3
|
+
import { writeCiCopy } from './release-folders.js';
|
|
4
|
+
import { imagesOf, releaseGuard } from './release-guard.js';
|
|
5
|
+
import { fetchTags, git, planRelease } from './release-plan.js';
|
|
6
|
+
import { rowsOf, summary } from './release-summary.js';
|
|
7
|
+
import { attach, buildImages, fail, idChecks, npmVersion, onMaster, publish, PUBLISH_SECONDS, scoped, step, takeSecrets, } from './release-steps.js';
|
|
8
|
+
const inputs = async (run, env) => {
|
|
9
|
+
const repo = env['GITHUB_REPOSITORY'];
|
|
10
|
+
if (!repo)
|
|
11
|
+
return fail('inputs: GITHUB_REPOSITORY is not set; run it in CI on a push to master');
|
|
12
|
+
const sha = env['GITHUB_SHA'] || (await git(run, ['rev-parse', 'HEAD'], 'inputs')).trim();
|
|
13
|
+
return { repo, sha };
|
|
14
|
+
};
|
|
15
|
+
// The build needs a committed tree: only the CI copy files this run wrote may differ.
|
|
16
|
+
const committedBut = (s) => async () => {
|
|
17
|
+
const args = ['status', '--porcelain', '--', '.', ...s.written.map((f) => `:(exclude)${f}`)];
|
|
18
|
+
const dirty = (await git(s.run, args, 'build')).trim();
|
|
19
|
+
if (dirty)
|
|
20
|
+
throw new CliError('uncommitted_changes', `uncommitted changes: ${dirty}: commit first`);
|
|
21
|
+
};
|
|
22
|
+
// Tag first: a failed build still uses up its N, so the next run takes a new version.
|
|
23
|
+
const createTag = async (s, tag) => {
|
|
24
|
+
const ref = ['-f', `ref=refs/tags/${tag}`, '-f', `sha=${s.sha}`];
|
|
25
|
+
const made = await s.run('gh', ['api', `repos/${s.repo}/git/refs`, ...ref]);
|
|
26
|
+
if (made.ok)
|
|
27
|
+
return step(`tag: ${tag} created on ${s.sha}`);
|
|
28
|
+
if (!/Reference already exists/.test(made.err))
|
|
29
|
+
fail(`tag: ${made.err}`);
|
|
30
|
+
const at = await s.run('gh', [
|
|
31
|
+
'api',
|
|
32
|
+
`repos/${s.repo}/git/ref/tags/${tag}`,
|
|
33
|
+
'--jq',
|
|
34
|
+
'.object.sha',
|
|
35
|
+
]);
|
|
36
|
+
const on = at.out.trim();
|
|
37
|
+
if (on !== s.sha)
|
|
38
|
+
fail(`tag: ${tag} is on ${on || at.err}, not ${s.sha}: a moved tag is refused`);
|
|
39
|
+
step(`tag: ${tag} is on ${s.sha}`);
|
|
40
|
+
};
|
|
41
|
+
// The date version in package.json, the lock and the committed contracts that carry it.
|
|
42
|
+
const prepare = async (s, p) => {
|
|
43
|
+
const dir = join(s.root, p.rel);
|
|
44
|
+
s.written.push(...(await writeCiCopy(s.root, p, p.version, s.repo)));
|
|
45
|
+
const tool = await s.deps.tool();
|
|
46
|
+
const pkg = await tool.readManifest(dir);
|
|
47
|
+
idChecks(pkg);
|
|
48
|
+
const { parts } = imagesOf(pkg);
|
|
49
|
+
if (parts.includes('api') || parts.includes('mcp')) {
|
|
50
|
+
const files = await tool
|
|
51
|
+
.writeContracts(dir)
|
|
52
|
+
.catch((e) => fail(`contracts: ${e.message}`));
|
|
53
|
+
s.written.push(...files.map((f) => join(p.rel, f)));
|
|
54
|
+
}
|
|
55
|
+
step(`version: ${p.id} is ${p.version} in this CI copy only`);
|
|
56
|
+
return pkg;
|
|
57
|
+
};
|
|
58
|
+
const npmStep = async (s, run, dir, pkg) => {
|
|
59
|
+
if (pkg['private'] === true)
|
|
60
|
+
return step('npm: private package, not published');
|
|
61
|
+
const push = scoped(s.deps.exec(dir, PUBLISH_SECONDS), s.secrets);
|
|
62
|
+
await publish(run, push, pkg, s.secrets['npm']?.['NPM_TOKEN']);
|
|
63
|
+
};
|
|
64
|
+
// A released version is never rebuilt: the guard reuses its record, else it builds the images.
|
|
65
|
+
const imagesStep = async (s, p, run, pkg) => {
|
|
66
|
+
const { parts, oneImage } = imagesOf(pkg);
|
|
67
|
+
const dir = join(s.root, p.rel);
|
|
68
|
+
const g = { dir, tag: p.tag, sha: s.sha, repo: s.repo, id: p.id, version: p.version };
|
|
69
|
+
const decision = await releaseGuard({ ...g, parts, oneImage }, run).catch((e) => fail(`guard: ${e.message}`));
|
|
70
|
+
const built = decision === 'build';
|
|
71
|
+
step(`guard: ${p.tag} ${built ? 'has no record and no image: build' : 'is released: npm only'}`);
|
|
72
|
+
return built ? buildImages(dir, oneImage, s.deps.tool, committedBut(s)) : [];
|
|
73
|
+
};
|
|
74
|
+
// The record is the "released" marker: it goes up only after npm has the version.
|
|
75
|
+
const releaseOne = async (s, p) => {
|
|
76
|
+
const pkg = await prepare(s, p);
|
|
77
|
+
const dir = join(s.root, p.rel);
|
|
78
|
+
const run = scoped(s.deps.exec(dir, s.timeout), s.secrets);
|
|
79
|
+
const isPrivate = pkg['private'] === true;
|
|
80
|
+
if (!isPrivate)
|
|
81
|
+
await npmVersion(run);
|
|
82
|
+
await createTag(s, p.tag);
|
|
83
|
+
const records = await imagesStep(s, p, run, pkg);
|
|
84
|
+
await npmStep(s, run, dir, pkg);
|
|
85
|
+
if (records.length > 0)
|
|
86
|
+
await attach(run, p.tag, s.repo, records, s.sha);
|
|
87
|
+
return {
|
|
88
|
+
id: p.id,
|
|
89
|
+
version: p.version,
|
|
90
|
+
tag: p.tag,
|
|
91
|
+
built: records.length > 0,
|
|
92
|
+
published: !isPrivate,
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
// Every changed extension is tried; its folder then no longer counts as a change for the next build.
|
|
96
|
+
const releaseAll = async (s, plan) => {
|
|
97
|
+
const released = [];
|
|
98
|
+
const rows = rowsOf(plan.refused, 'refused');
|
|
99
|
+
for (const p of plan.changed) {
|
|
100
|
+
const row = { id: p.id, version: p.version, result: 'released' };
|
|
101
|
+
await releaseOne(s, p).then((r) => void released.push(r), (err) => Object.assign(row, { result: 'failed', err }));
|
|
102
|
+
s.written.push(p.rel);
|
|
103
|
+
rows.push(row);
|
|
104
|
+
}
|
|
105
|
+
rows.push(...rowsOf(plan.unchanged, 'unchanged'));
|
|
106
|
+
summary(rows);
|
|
107
|
+
return released;
|
|
108
|
+
};
|
|
109
|
+
const dryRun = (plan) => {
|
|
110
|
+
const tags = plan.changed.map((p) => p.tag).join(', ') || 'nothing';
|
|
111
|
+
step(`dry run: would release ${tags}; nothing was written, tagged, pushed or published`);
|
|
112
|
+
summary(rowsOf(plan.refused, 'refused'));
|
|
113
|
+
return { dryRun: true, changed: plan.changed, unchanged: plan.unchanged.map((f) => f.id) };
|
|
114
|
+
};
|
|
115
|
+
// Each extension changed since its last <id>@* tag gets a date version, its tag, images and npm.
|
|
116
|
+
export const runChangedRelease = async ({ dir = '.', timeout = 60, dryRun: dry }, deps) => {
|
|
117
|
+
const secrets = takeSecrets(deps.env);
|
|
118
|
+
const run = scoped(deps.exec(dir, timeout), secrets);
|
|
119
|
+
const { repo, sha } = await inputs(run, deps.env);
|
|
120
|
+
await onMaster(run, sha);
|
|
121
|
+
await fetchTags(run);
|
|
122
|
+
const now = deps.now?.() ?? new Date();
|
|
123
|
+
const plan = await planRelease({ root: dir, run, sha, repo, now });
|
|
124
|
+
if (dry)
|
|
125
|
+
return dryRun(plan);
|
|
126
|
+
const s = { root: dir, run, deps, secrets, sha, repo, timeout, written: [] };
|
|
127
|
+
return { released: await releaseAll(s, plan), unchanged: plan.unchanged.map((f) => f.id) };
|
|
128
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const tagOf: (id: string, version: string) => string;
|
|
2
|
+
export declare const versionOfTag: (id: string, tag: string) => string | undefined;
|
|
3
|
+
export declare const newestTags: (id: string, tags: string[]) => string[];
|
|
4
|
+
export declare const lastTag: (id: string, tags: string[]) => string | undefined;
|
|
5
|
+
export declare const dayOf: (now: Date) => string;
|
|
6
|
+
export declare const dateVersion: (id: string, tags: string[], now: Date) => string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// The three numbers of a plain version: no prerelease, no leading zero.
|
|
2
|
+
const PLAIN = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
|
|
3
|
+
export const tagOf = (id, version) => `${id}@${version}`;
|
|
4
|
+
// The version of `<id>@<x.y.z>`; undefined for another id or another form.
|
|
5
|
+
export const versionOfTag = (id, tag) => {
|
|
6
|
+
const version = tag.startsWith(`${id}@`) ? tag.slice(id.length + 1) : '';
|
|
7
|
+
return PLAIN.test(version) ? version : undefined;
|
|
8
|
+
};
|
|
9
|
+
const numbersOf = (version) => version.split('.').map(Number);
|
|
10
|
+
const compare = (a, b) => a[0] - b[0] || a[1] - b[1] || a[2] - b[2];
|
|
11
|
+
// The `<id>@*` tags newest first by number, never by text: 2027.105.1 is after 2026.1231.9.
|
|
12
|
+
export const newestTags = (id, tags) => {
|
|
13
|
+
const plain = tags.flatMap((tag) => {
|
|
14
|
+
const version = versionOfTag(id, tag);
|
|
15
|
+
return version ? [{ tag, n: numbersOf(version) }] : [];
|
|
16
|
+
});
|
|
17
|
+
return plain.sort((a, b) => compare(b.n, a.n)).map((p) => p.tag);
|
|
18
|
+
};
|
|
19
|
+
export const lastTag = (id, tags) => newestTags(id, tags)[0];
|
|
20
|
+
// YYYY.MDD of a UTC day: month times 100 plus day, so it never has a leading zero.
|
|
21
|
+
export const dayOf = (now) => `${now.getUTCFullYear()}.${(now.getUTCMonth() + 1) * 100 + now.getUTCDate()}`;
|
|
22
|
+
// YYYY.MDD.N: N is one more than the highest N tagged for this id on this UTC day.
|
|
23
|
+
export const dateVersion = (id, tags, now) => {
|
|
24
|
+
const day = dayOf(now);
|
|
25
|
+
const taken = tags
|
|
26
|
+
.map((tag) => versionOfTag(id, tag))
|
|
27
|
+
.filter((v) => v?.startsWith(`${day}.`) === true)
|
|
28
|
+
.map((v) => numbersOf(v)[2]);
|
|
29
|
+
return `${day}.${Math.max(0, ...taken) + 1}`;
|
|
30
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { readdir, readFile, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
// A missing file reads as undefined; a file that is not JSON stops the release.
|
|
4
|
+
const readJson = (file) => readFile(file, 'utf8').then((text) => JSON.parse(text), () => undefined);
|
|
5
|
+
const idAt = async (root, rel) => {
|
|
6
|
+
const pkg = await readJson(join(root, rel, 'package.json'));
|
|
7
|
+
const id = pkg?.['agentage']?.['id'];
|
|
8
|
+
return typeof id === 'string' ? id : undefined;
|
|
9
|
+
};
|
|
10
|
+
// Each extensions/<name> with an agentage package; with none, the root package is the one extension.
|
|
11
|
+
export const extensionFolders = async (root) => {
|
|
12
|
+
const entries = await readdir(join(root, 'extensions'), { withFileTypes: true }).catch(() => []);
|
|
13
|
+
const names = entries.filter((e) => e.isDirectory()).map((e) => e.name);
|
|
14
|
+
const folders = [];
|
|
15
|
+
for (const name of names.sort()) {
|
|
16
|
+
const id = await idAt(root, join('extensions', name));
|
|
17
|
+
if (id)
|
|
18
|
+
folders.push({ rel: join('extensions', name), id });
|
|
19
|
+
}
|
|
20
|
+
if (folders.length > 0)
|
|
21
|
+
return folders;
|
|
22
|
+
const id = await idAt(root, '.');
|
|
23
|
+
return id ? [{ rel: '.', id }] : [];
|
|
24
|
+
};
|
|
25
|
+
const writeJson = async (file, value) => writeFile(file, `${JSON.stringify(value, null, 2)}\n`);
|
|
26
|
+
// The image source label and npm provenance both read `repository`: it names the releasing repo.
|
|
27
|
+
const repositoryOf = (repo, rel) => ({
|
|
28
|
+
type: 'git',
|
|
29
|
+
url: `git+https://github.com/${repo}.git`,
|
|
30
|
+
...(rel === '.' ? {} : { directory: rel }),
|
|
31
|
+
});
|
|
32
|
+
// The lock's root version too, so npm ci in the image reads the same package.
|
|
33
|
+
const writeLock = async (root, rel, version) => {
|
|
34
|
+
const file = join(rel, 'package-lock.json');
|
|
35
|
+
const lock = await readJson(join(root, file));
|
|
36
|
+
if (!lock)
|
|
37
|
+
return [];
|
|
38
|
+
lock['version'] = version;
|
|
39
|
+
const own = lock['packages']?.[''];
|
|
40
|
+
if (own)
|
|
41
|
+
own['version'] = version;
|
|
42
|
+
await writeJson(join(root, file), lock);
|
|
43
|
+
return [file];
|
|
44
|
+
};
|
|
45
|
+
// The CI copy only: never committed. Returns the files it wrote, relative to the root.
|
|
46
|
+
export const writeCiCopy = async (root, { rel }, version, repo) => {
|
|
47
|
+
const file = join(rel, 'package.json');
|
|
48
|
+
const pkg = JSON.parse(await readFile(join(root, file), 'utf8'));
|
|
49
|
+
pkg['version'] = version;
|
|
50
|
+
pkg['repository'] = repositoryOf(repo, rel);
|
|
51
|
+
await writeJson(join(root, file), pkg);
|
|
52
|
+
return [file, ...(await writeLock(root, rel, version))];
|
|
53
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Folder } from './release-folders.js';
|
|
2
|
+
import { type Exec } from './release-guard.js';
|
|
3
|
+
export type Planned = Folder & {
|
|
4
|
+
version: string;
|
|
5
|
+
tag: string;
|
|
6
|
+
why: string;
|
|
7
|
+
};
|
|
8
|
+
export type Refused = Folder & {
|
|
9
|
+
err: unknown;
|
|
10
|
+
};
|
|
11
|
+
export type Plan = {
|
|
12
|
+
changed: Planned[];
|
|
13
|
+
unchanged: Folder[];
|
|
14
|
+
refused: Refused[];
|
|
15
|
+
};
|
|
16
|
+
export type PlanInput = {
|
|
17
|
+
root: string;
|
|
18
|
+
run: Exec;
|
|
19
|
+
sha: string;
|
|
20
|
+
repo: string;
|
|
21
|
+
now: Date;
|
|
22
|
+
};
|
|
23
|
+
export declare const UNRECORDED_LIMIT = 3;
|
|
24
|
+
export declare const git: (run: Exec, args: string[], what: string) => Promise<string>;
|
|
25
|
+
export declare const fetchTags: (run: Exec) => Promise<void>;
|
|
26
|
+
export declare const planRelease: (c: PlanInput) => Promise<Plan>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { dateVersion, lastTag, newestTags, tagOf } from './release-date.js';
|
|
2
|
+
import { extensionFolders } from './release-folders.js';
|
|
3
|
+
import { RECORD } from './release-guard.js';
|
|
4
|
+
import { fail, step } from './release-steps.js';
|
|
5
|
+
// A build that always fails stops here: no new tag after this many tags in a row with no record.
|
|
6
|
+
export const UNRECORDED_LIMIT = 3;
|
|
7
|
+
// Fail closed: a git call that cannot answer stops the release, never reads as "no change".
|
|
8
|
+
export const git = async (run, args, what) => {
|
|
9
|
+
const ran = await run('git', args);
|
|
10
|
+
if (!ran.ok)
|
|
11
|
+
fail(`${what}: git ${args[0] ?? ''}: ${ran.err}`);
|
|
12
|
+
return ran.out;
|
|
13
|
+
};
|
|
14
|
+
// A default CI checkout has no tags and one commit: the ancestor check needs both.
|
|
15
|
+
export const fetchTags = async (run) => {
|
|
16
|
+
const shallow = (await git(run, ['rev-parse', '--is-shallow-repository'], 'tags')).trim();
|
|
17
|
+
const deepen = shallow === 'true' ? ['--unshallow'] : [];
|
|
18
|
+
await git(run, ['fetch', '-q', '--tags', ...deepen, 'origin'], 'tags');
|
|
19
|
+
};
|
|
20
|
+
// Only "not found" means "no record"; any other answer stops the release.
|
|
21
|
+
const hasRecord = async (c, tag) => {
|
|
22
|
+
const args = ['release', 'download', tag, '-R', c.repo, '-p', RECORD, '-O', '-'];
|
|
23
|
+
const got = await c.run('gh', args);
|
|
24
|
+
if (got.ok)
|
|
25
|
+
return true;
|
|
26
|
+
if (!/release not found|no assets match|no assets to download/.test(got.err))
|
|
27
|
+
fail(`changed: cannot tell whether ${tag} has its record: ${got.err}`);
|
|
28
|
+
return false;
|
|
29
|
+
};
|
|
30
|
+
// The newest tags with no record, up to the first that has one.
|
|
31
|
+
const unrecorded = async (c, f, tags) => {
|
|
32
|
+
const missing = [];
|
|
33
|
+
for (const tag of newestTags(f.id, tags).slice(0, UNRECORDED_LIMIT)) {
|
|
34
|
+
if (await hasRecord(c, tag))
|
|
35
|
+
break;
|
|
36
|
+
missing.push(tag);
|
|
37
|
+
}
|
|
38
|
+
if (missing.length === UNRECORDED_LIMIT)
|
|
39
|
+
fail(`stuck: ${missing.join(', ')} have no record: fix the release, or remove those tags`);
|
|
40
|
+
return missing;
|
|
41
|
+
};
|
|
42
|
+
// From the last tag, not the push range: a run the concurrency group dropped is caught up here.
|
|
43
|
+
const whyOf = async (c, f, tags, last) => {
|
|
44
|
+
if (!last)
|
|
45
|
+
return `has no ${f.id}@* tag yet`;
|
|
46
|
+
const missing = await unrecorded(c, f, tags);
|
|
47
|
+
const diff = await git(c.run, ['diff', '--name-only', last, c.sha, '--', f.rel], 'changed');
|
|
48
|
+
if (diff.trim())
|
|
49
|
+
return `differs from ${last}`;
|
|
50
|
+
// A release that failed after its tag: the next commit releases it with a new N.
|
|
51
|
+
if (missing[0] === last)
|
|
52
|
+
return `equals ${last}, which has no record`;
|
|
53
|
+
return undefined;
|
|
54
|
+
};
|
|
55
|
+
// A re-run of an old commit must not give older code a higher version than its last tag.
|
|
56
|
+
const inHistory = async (c, last, at) => {
|
|
57
|
+
const ahead = await git(c.run, ['rev-list', '--count', `${c.sha}..${at}`], 'history');
|
|
58
|
+
if (ahead.trim() !== '0')
|
|
59
|
+
fail(`history: ${last} is on ${at}, which is not before ${c.sha}: an older commit is refused`);
|
|
60
|
+
};
|
|
61
|
+
const planned = (f, version, why) => {
|
|
62
|
+
const tag = tagOf(f.id, version);
|
|
63
|
+
step(`changed: ${f.id} (${f.rel}) ${why}: release ${tag}`);
|
|
64
|
+
return { ...f, version, tag, why };
|
|
65
|
+
};
|
|
66
|
+
const planOne = async (c, f) => {
|
|
67
|
+
const tags = (await git(c.run, ['tag', '-l', `${f.id}@*`], 'tags')).split('\n').filter(Boolean);
|
|
68
|
+
const last = lastTag(f.id, tags);
|
|
69
|
+
// A re-run of the commit its last tag is on: resume that version (the guard reuses or builds).
|
|
70
|
+
const at = last ? (await git(c.run, ['rev-list', '-n', '1', last], 'tags')).trim() : '';
|
|
71
|
+
if (last && at === c.sha)
|
|
72
|
+
return planned(f, last.slice(f.id.length + 1), `${last} is on this commit: resume it`);
|
|
73
|
+
if (last)
|
|
74
|
+
await inHistory(c, last, at);
|
|
75
|
+
const why = await whyOf(c, f, tags, last);
|
|
76
|
+
if (why)
|
|
77
|
+
return planned(f, dateVersion(f.id, tags, c.now), why);
|
|
78
|
+
step(`unchanged: ${f.id} (${f.rel}) is the same as ${String(last)}`);
|
|
79
|
+
return undefined;
|
|
80
|
+
};
|
|
81
|
+
// One refused extension never stops the plan of the others.
|
|
82
|
+
const sort = async (c, f, plan) => {
|
|
83
|
+
try {
|
|
84
|
+
const p = await planOne(c, f);
|
|
85
|
+
if (p)
|
|
86
|
+
plan.changed.push(p);
|
|
87
|
+
else
|
|
88
|
+
plan.unchanged.push(f);
|
|
89
|
+
}
|
|
90
|
+
catch (e) {
|
|
91
|
+
plan.refused.push({ ...f, err: e });
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
export const planRelease = async (c) => {
|
|
95
|
+
const folders = await extensionFolders(c.root);
|
|
96
|
+
if (folders.length === 0)
|
|
97
|
+
fail('folders: no extension package at the root or in extensions/*');
|
|
98
|
+
const plan = { changed: [], unchanged: [], refused: [] };
|
|
99
|
+
for (const f of folders)
|
|
100
|
+
await sort(c, f, plan);
|
|
101
|
+
return plan;
|
|
102
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ExtensionPackage } from '@agentage/extension/tool';
|
|
2
|
+
import { type Committed } from './build.js';
|
|
3
|
+
import { type LoadKitTool } from './kit-tool.js';
|
|
4
|
+
import { type Exec } from './release-guard.js';
|
|
5
|
+
export declare const step: (line: string) => void;
|
|
6
|
+
export declare const fail: (line: string) => never;
|
|
7
|
+
export declare const takeSecrets: (env: NodeJS.ProcessEnv) => Record<string, NodeJS.ProcessEnv>;
|
|
8
|
+
export declare const scoped: (exec: Exec, secrets: Record<string, NodeJS.ProcessEnv>) => Exec;
|
|
9
|
+
export declare const attach: (run: Exec, tag: string, repo: string, names: string[], target?: string) => Promise<void>;
|
|
10
|
+
export declare const buildImages: (dir: string, oneImage: boolean, tool: LoadKitTool, committed?: Committed) => Promise<string[]>;
|
|
11
|
+
export declare const PUBLISH_SECONDS = 300;
|
|
12
|
+
export declare const publish: (run: Exec, push: Exec, { name, version }: ExtensionPackage, token?: string) => Promise<void>;
|
|
13
|
+
export declare const npmVersion: (run: Exec) => Promise<void>;
|
|
14
|
+
export declare const idChecks: (pkg: ExtensionPackage) => void;
|
|
15
|
+
export declare const onMaster: (run: Exec, sha: string) => Promise<void>;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { mkdtemp, readFile, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { tmpdir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { CliError } from '../../lib/json-output.js';
|
|
5
|
+
import { runImageBuild } from './build.js';
|
|
6
|
+
import {} from './kit-tool.js';
|
|
7
|
+
import { CONTAINER_RECORD, imagesOf, PART_SUFFIX, RECORD } from './release-guard.js';
|
|
8
|
+
export const step = (line) => console.log(`PASS ${line}`);
|
|
9
|
+
export const fail = (line) => {
|
|
10
|
+
throw new CliError('release_refused', `FAIL ${line}`);
|
|
11
|
+
};
|
|
12
|
+
// Tokens leave the environment, so docker build and npm lifecycle scripts never see them.
|
|
13
|
+
export const takeSecrets = (env) => {
|
|
14
|
+
const { GH_TOKEN, GITHUB_TOKEN, NPM_TOKEN } = env;
|
|
15
|
+
for (const name of ['GH_TOKEN', 'GITHUB_TOKEN', 'NPM_TOKEN'])
|
|
16
|
+
delete env[name];
|
|
17
|
+
const gh = GH_TOKEN ?? GITHUB_TOKEN;
|
|
18
|
+
return { gh: gh ? { GH_TOKEN: gh } : {}, npm: NPM_TOKEN ? { NPM_TOKEN } : {} };
|
|
19
|
+
};
|
|
20
|
+
export const scoped = (exec, secrets) => (cmd, args) => exec(cmd, args, secrets[cmd]);
|
|
21
|
+
// Every image is pushed first. The records go up one call each, RECORD last: it is the "done" marker.
|
|
22
|
+
export const attach = async (run, tag, repo, names, target) => {
|
|
23
|
+
const notes = ['--title', tag, '--notes', `Images by digest: ${names.join(', ')}`];
|
|
24
|
+
if (target)
|
|
25
|
+
notes.push('--target', target);
|
|
26
|
+
let exists = (await run('gh', ['release', 'view', tag, '-R', repo])).ok;
|
|
27
|
+
for (const name of names) {
|
|
28
|
+
const file = join('dist', name);
|
|
29
|
+
const args = exists ? ['upload', tag, file] : ['create', tag, file, ...notes];
|
|
30
|
+
const ran = await run('gh', ['release', ...args, '-R', repo]);
|
|
31
|
+
if (!ran.ok)
|
|
32
|
+
fail(`record: ${ran.err}`);
|
|
33
|
+
exists = true;
|
|
34
|
+
}
|
|
35
|
+
step(`record: ${names.join(', ')} attached to release ${tag}`);
|
|
36
|
+
};
|
|
37
|
+
// The part images (v13 rows, the estate) and the one image (app hosts), all pushed by digest.
|
|
38
|
+
export const buildImages = async (dir, oneImage, tool, committed) => {
|
|
39
|
+
await runImageBuild({ push: true, dir }, tool, committed);
|
|
40
|
+
if (!oneImage)
|
|
41
|
+
return [RECORD];
|
|
42
|
+
// The second compile may clean dist/: the part record is kept and written back.
|
|
43
|
+
const record = await readFile(join(dir, 'dist', RECORD));
|
|
44
|
+
// The first build checked this HEAD; its own dist/ output must not read as a change.
|
|
45
|
+
await runImageBuild({ push: true, container: true, dir }, tool, async () => undefined);
|
|
46
|
+
await writeFile(join(dir, 'dist', RECORD), record);
|
|
47
|
+
return [CONTAINER_RECORD, RECORD];
|
|
48
|
+
};
|
|
49
|
+
// Single quotes on purpose: npm expands ${NPM_TOKEN} itself, the token never lands on disk.
|
|
50
|
+
const tokenConfig = async (token) => {
|
|
51
|
+
if (!token)
|
|
52
|
+
return [];
|
|
53
|
+
const file = join(await mkdtemp(join(tmpdir(), 'agentage-npm-')), '.npmrc');
|
|
54
|
+
await writeFile(file, '//registry.npmjs.org/:_authToken=${NPM_TOKEN}\n');
|
|
55
|
+
return ['--userconfig', file];
|
|
56
|
+
};
|
|
57
|
+
// Only E404 means "not on npm"; a registry that cannot answer stops the release, never publishes.
|
|
58
|
+
const onNpm = async (run, args, what) => {
|
|
59
|
+
const viewed = await run('npm', ['view', ...args]);
|
|
60
|
+
if (viewed.ok)
|
|
61
|
+
return viewed.out.trim() !== '';
|
|
62
|
+
if (!/E404/.test(viewed.err))
|
|
63
|
+
fail(`npm: cannot tell whether ${what} is on npm: ${viewed.err}`);
|
|
64
|
+
return false;
|
|
65
|
+
};
|
|
66
|
+
// The upload with provenance signs first: its own bound, longer than the checks.
|
|
67
|
+
export const PUBLISH_SECONDS = 300;
|
|
68
|
+
// A killed publish may have landed: stop, never stage it again; a re-run reads "already on npm".
|
|
69
|
+
const direct = async (push, spec, flags) => {
|
|
70
|
+
const published = await push('npm', ['publish', ...flags]);
|
|
71
|
+
if (/timed out after/.test(published.err))
|
|
72
|
+
fail(`npm: publish of ${spec} ${published.err}; re-run the release: it reads "already on npm" if the upload landed`);
|
|
73
|
+
return published.ok;
|
|
74
|
+
};
|
|
75
|
+
// OIDC trusted publishing; a new name (NPM_TOKEN set) or an unauthorized direct publish is staged.
|
|
76
|
+
export const publish = async (run, push, { name, version }, token) => {
|
|
77
|
+
const cfg = await tokenConfig(token);
|
|
78
|
+
const spec = `${name}@${version}`;
|
|
79
|
+
if (await onNpm(run, [spec, 'version', ...cfg], spec))
|
|
80
|
+
return step(`npm: ${spec} is already on npm`);
|
|
81
|
+
const flags = ['--access', 'public', '--provenance', '--ignore-scripts', ...cfg];
|
|
82
|
+
const fresh = token !== undefined && !(await onNpm(run, [name, 'name', ...cfg], name));
|
|
83
|
+
if (!fresh && (await direct(push, spec, flags)))
|
|
84
|
+
return step(`npm: ${spec} published`);
|
|
85
|
+
const staged = await push('npm', ['stage', 'publish', ...flags]);
|
|
86
|
+
if (!staged.ok)
|
|
87
|
+
fail(`npm: ${staged.err}`);
|
|
88
|
+
const why = fresh
|
|
89
|
+
? 'a new name has no trusted publisher'
|
|
90
|
+
: 'direct publish not authorized: no validated trusted publisher';
|
|
91
|
+
step(`npm: ${spec} staged for approval (${why})`);
|
|
92
|
+
};
|
|
93
|
+
export const npmVersion = async (run) => {
|
|
94
|
+
const v = (await run('npm', ['--version'])).out.trim();
|
|
95
|
+
const [major = 0, minor = 0, patch = 0] = v.split('.').map(Number);
|
|
96
|
+
if (major * 1e6 + minor * 1e3 + patch < 11_005_001)
|
|
97
|
+
fail(`npm: npm ${v} cannot publish with OIDC: needs npm >= 11.5.1`);
|
|
98
|
+
step(`npm: npm ${v}`);
|
|
99
|
+
};
|
|
100
|
+
export const idChecks = (pkg) => {
|
|
101
|
+
if (pkg.agentage.id === 'template')
|
|
102
|
+
fail('id: this repo is the starting point for extensions: create one, release that');
|
|
103
|
+
step(`id: ${pkg.agentage.id} is not the template`);
|
|
104
|
+
if (imagesOf(pkg).oneImage && PART_SUFFIX.test(pkg.agentage.id))
|
|
105
|
+
fail(`id: ${pkg.agentage.id} ends in a part name: it would name another extension's image`);
|
|
106
|
+
};
|
|
107
|
+
export const onMaster = async (run, sha) => {
|
|
108
|
+
const fetched = await run('git', ['fetch', '-q', 'origin', 'master']);
|
|
109
|
+
if (!fetched.ok || !(await run('git', ['merge-base', '--is-ancestor', sha, 'origin/master'])).ok)
|
|
110
|
+
fail(`master: ${sha} is not on master${fetched.err ? `: ${fetched.err}` : ''}`);
|
|
111
|
+
step(`master: ${sha} is on master`);
|
|
112
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const messageOf = (r) => `${r.id}: ${r.err.message}`;
|
|
2
|
+
const table = (rows) => {
|
|
3
|
+
const idWidth = Math.max(2, ...rows.map((r) => r.id.length));
|
|
4
|
+
const versionWidth = Math.max(7, ...rows.map((r) => r.version.length));
|
|
5
|
+
const line = (id, version, result) => `${id.padEnd(idWidth)} ${version.padEnd(versionWidth)} ${result}`;
|
|
6
|
+
return [line('id', 'version', 'result'), ...rows.map((r) => line(r.id, r.version, r.result))];
|
|
7
|
+
};
|
|
8
|
+
// One table of every extension; any failure makes one non-zero exit after all were tried.
|
|
9
|
+
export const summary = (rows) => {
|
|
10
|
+
if (rows.length === 0)
|
|
11
|
+
return;
|
|
12
|
+
for (const line of table(rows))
|
|
13
|
+
console.log(line);
|
|
14
|
+
const failed = rows.filter((r) => r.err !== undefined);
|
|
15
|
+
const first = failed[0]?.err;
|
|
16
|
+
if (!first)
|
|
17
|
+
return;
|
|
18
|
+
// The first error keeps its code; its message names every failed extension.
|
|
19
|
+
first.message = failed.map(messageOf).join('\n');
|
|
20
|
+
throw first;
|
|
21
|
+
};
|
|
22
|
+
// Rows of extensions that get no version this run: refused (with its error) or unchanged.
|
|
23
|
+
export const rowsOf = (folders, result) => folders.map((f) => ({ id: f.id, version: '-', result, err: f.err }));
|
|
@@ -5,11 +5,15 @@ export type ExtensionReleaseOptions = {
|
|
|
5
5
|
dir?: string;
|
|
6
6
|
timeout?: number;
|
|
7
7
|
json?: boolean;
|
|
8
|
+
changed?: boolean;
|
|
9
|
+
dryRun?: boolean;
|
|
8
10
|
};
|
|
9
11
|
export interface ReleaseDeps {
|
|
10
12
|
exec: (cwd: string, seconds?: number) => Exec;
|
|
11
13
|
tool: LoadKitTool;
|
|
12
14
|
env: NodeJS.ProcessEnv;
|
|
15
|
+
now?: () => Date;
|
|
13
16
|
}
|
|
14
17
|
export declare const runExtensionRelease: ({ dir, timeout }?: ExtensionReleaseOptions, deps?: ReleaseDeps) => Promise<unknown>;
|
|
18
|
+
export declare const runRelease: (opts?: ExtensionReleaseOptions, deps?: ReleaseDeps) => Promise<unknown>;
|
|
15
19
|
export declare const addRelease: (group: Command, release: (opts: ExtensionReleaseOptions) => Promise<void>) => void;
|
|
@@ -1,113 +1,13 @@
|
|
|
1
|
-
import { mkdtemp, readFile, writeFile } from 'node:fs/promises';
|
|
2
|
-
import { tmpdir } from 'node:os';
|
|
3
|
-
import { join } from 'node:path';
|
|
4
1
|
import {} from 'commander';
|
|
5
2
|
import { addJson, CliError } from '../../lib/json-output.js';
|
|
6
|
-
import { runImageBuild } from './build.js';
|
|
7
3
|
import { loadKitTool } from './kit-tool.js';
|
|
8
|
-
import {
|
|
9
|
-
import {} from './release-guard.js';
|
|
4
|
+
import { runChangedRelease } from './release-changed.js';
|
|
5
|
+
import { execIn, imagesOf, releaseGuard } from './release-guard.js';
|
|
6
|
+
import { attach, buildImages, fail, idChecks, npmVersion, onMaster, publish, PUBLISH_SECONDS, scoped, step, takeSecrets, } from './release-steps.js';
|
|
10
7
|
const defaultDeps = { exec: execIn, tool: loadKitTool, env: process.env };
|
|
11
|
-
const step = (line) => console.log(`PASS ${line}`);
|
|
12
|
-
const fail = (line) => {
|
|
13
|
-
throw new CliError('release_refused', `FAIL ${line}`);
|
|
14
|
-
};
|
|
15
|
-
// Tokens leave the environment, so docker build and npm lifecycle scripts never see them.
|
|
16
|
-
const takeSecrets = (env) => {
|
|
17
|
-
const { GH_TOKEN, GITHUB_TOKEN, NPM_TOKEN } = env;
|
|
18
|
-
for (const name of ['GH_TOKEN', 'GITHUB_TOKEN', 'NPM_TOKEN'])
|
|
19
|
-
delete env[name];
|
|
20
|
-
const gh = GH_TOKEN ?? GITHUB_TOKEN;
|
|
21
|
-
return { gh: gh ? { GH_TOKEN: gh } : {}, npm: NPM_TOKEN ? { NPM_TOKEN } : {} };
|
|
22
|
-
};
|
|
23
|
-
const scoped = (exec, secrets) => (cmd, args) => exec(cmd, args, secrets[cmd]);
|
|
24
|
-
// Every image is pushed first. The records go up one call each, RECORD last: it is the "done" marker.
|
|
25
|
-
const attach = async (run, tag, repo, names) => {
|
|
26
|
-
const notes = ['--title', tag, '--notes', `Images by digest: ${names.join(', ')}`];
|
|
27
|
-
let exists = (await run('gh', ['release', 'view', tag, '-R', repo])).ok;
|
|
28
|
-
for (const name of names) {
|
|
29
|
-
const file = join('dist', name);
|
|
30
|
-
const args = exists ? ['upload', tag, file] : ['create', tag, file, ...notes];
|
|
31
|
-
const ran = await run('gh', ['release', ...args, '-R', repo]);
|
|
32
|
-
if (!ran.ok)
|
|
33
|
-
fail(`record: ${ran.err}`);
|
|
34
|
-
exists = true;
|
|
35
|
-
}
|
|
36
|
-
step(`record: ${names.join(', ')} attached to release ${tag}`);
|
|
37
|
-
};
|
|
38
|
-
// The part images (v13 rows, the estate) and the one image (app hosts), all pushed by digest.
|
|
39
|
-
const buildImages = async (dir, oneImage, tool) => {
|
|
40
|
-
await runImageBuild({ push: true, dir }, tool);
|
|
41
|
-
if (!oneImage)
|
|
42
|
-
return [RECORD];
|
|
43
|
-
// The second compile may clean dist/: the part record is kept and written back.
|
|
44
|
-
const record = await readFile(join(dir, 'dist', RECORD));
|
|
45
|
-
// The first build checked this HEAD; its own dist/ output must not read as a change.
|
|
46
|
-
await runImageBuild({ push: true, container: true, dir }, tool, async () => undefined);
|
|
47
|
-
await writeFile(join(dir, 'dist', RECORD), record);
|
|
48
|
-
return [CONTAINER_RECORD, RECORD];
|
|
49
|
-
};
|
|
50
|
-
// Single quotes on purpose: npm expands ${NPM_TOKEN} itself, the token never lands on disk.
|
|
51
|
-
const tokenConfig = async (token) => {
|
|
52
|
-
if (!token)
|
|
53
|
-
return [];
|
|
54
|
-
const file = join(await mkdtemp(join(tmpdir(), 'agentage-npm-')), '.npmrc');
|
|
55
|
-
await writeFile(file, '//registry.npmjs.org/:_authToken=${NPM_TOKEN}\n');
|
|
56
|
-
return ['--userconfig', file];
|
|
57
|
-
};
|
|
58
|
-
// Only E404 means "not on npm"; a registry that cannot answer stops the release, never publishes.
|
|
59
|
-
const onNpm = async (run, args, what) => {
|
|
60
|
-
const viewed = await run('npm', ['view', ...args]);
|
|
61
|
-
if (viewed.ok)
|
|
62
|
-
return viewed.out.trim() !== '';
|
|
63
|
-
if (!/E404/.test(viewed.err))
|
|
64
|
-
fail(`npm: cannot tell whether ${what} is on npm: ${viewed.err}`);
|
|
65
|
-
return false;
|
|
66
|
-
};
|
|
67
|
-
// The upload with provenance signs first: its own bound, longer than the checks.
|
|
68
|
-
const PUBLISH_SECONDS = 300;
|
|
69
|
-
// A killed publish may have landed: stop, never stage it again; a re-run reads "already on npm".
|
|
70
|
-
const direct = async (push, spec, flags) => {
|
|
71
|
-
const published = await push('npm', ['publish', ...flags]);
|
|
72
|
-
if (/timed out after/.test(published.err))
|
|
73
|
-
fail(`npm: publish of ${spec} ${published.err}; re-run the release: it reads "already on npm" if the upload landed`);
|
|
74
|
-
return published.ok;
|
|
75
|
-
};
|
|
76
|
-
// OIDC trusted publishing; a new name (NPM_TOKEN set) or an unauthorized direct publish is staged.
|
|
77
|
-
const publish = async (run, push, { name, version }, token) => {
|
|
78
|
-
const cfg = await tokenConfig(token);
|
|
79
|
-
const spec = `${name}@${version}`;
|
|
80
|
-
if (await onNpm(run, [spec, 'version', ...cfg], spec))
|
|
81
|
-
return step(`npm: ${spec} is already on npm`);
|
|
82
|
-
const flags = ['--access', 'public', '--provenance', '--ignore-scripts', ...cfg];
|
|
83
|
-
const fresh = token !== undefined && !(await onNpm(run, [name, 'name', ...cfg], name));
|
|
84
|
-
if (!fresh && (await direct(push, spec, flags)))
|
|
85
|
-
return step(`npm: ${spec} published`);
|
|
86
|
-
const staged = await push('npm', ['stage', 'publish', ...flags]);
|
|
87
|
-
if (!staged.ok)
|
|
88
|
-
fail(`npm: ${staged.err}`);
|
|
89
|
-
const why = fresh
|
|
90
|
-
? 'a new name has no trusted publisher'
|
|
91
|
-
: 'direct publish not authorized: no validated trusted publisher';
|
|
92
|
-
step(`npm: ${spec} staged for approval (${why})`);
|
|
93
|
-
};
|
|
94
|
-
const npmVersion = async (run) => {
|
|
95
|
-
const v = (await run('npm', ['--version'])).out.trim();
|
|
96
|
-
const [major = 0, minor = 0, patch = 0] = v.split('.').map(Number);
|
|
97
|
-
if (major * 1e6 + minor * 1e3 + patch < 11_005_001)
|
|
98
|
-
fail(`npm: npm ${v} cannot publish with OIDC: needs npm >= 11.5.1`);
|
|
99
|
-
step(`npm: npm ${v}`);
|
|
100
|
-
};
|
|
101
8
|
const preflight = async (run, pkg, tag, sha, isPrivate) => {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
step(`id: ${pkg.agentage.id} is not the template`);
|
|
105
|
-
if (imagesOf(pkg).oneImage && PART_SUFFIX.test(pkg.agentage.id))
|
|
106
|
-
fail(`id: ${pkg.agentage.id} ends in a part name: it would name another extension's image`);
|
|
107
|
-
const fetched = await run('git', ['fetch', '-q', 'origin', 'master']);
|
|
108
|
-
if (!fetched.ok || !(await run('git', ['merge-base', '--is-ancestor', sha, 'origin/master'])).ok)
|
|
109
|
-
fail(`master: ${sha} is not on master${fetched.err ? `: ${fetched.err}` : ''}`);
|
|
110
|
-
step(`master: ${sha} is on master`);
|
|
9
|
+
idChecks(pkg);
|
|
10
|
+
await onMaster(run, sha);
|
|
111
11
|
const v = `v${pkg.version}`;
|
|
112
12
|
if (tag !== v)
|
|
113
13
|
fail(`tag: ${tag} is not ${v}, the package.json version; tag the commit that sets it`);
|
|
@@ -141,10 +41,20 @@ export const runExtensionRelease = async ({ dir = '.', timeout = 60 } = {}, deps
|
|
|
141
41
|
await publish(run, scoped(deps.exec(dir, PUBLISH_SECONDS), secrets), pkg, secrets['npm']?.['NPM_TOKEN']);
|
|
142
42
|
return { id, version: pkg.version, tag, built: build, published: !isPrivate };
|
|
143
43
|
};
|
|
44
|
+
// --changed: each changed extension of the repo; with no flag: the one package of a v* tag.
|
|
45
|
+
export const runRelease = async (opts = {}, deps = defaultDeps) => {
|
|
46
|
+
if (opts.changed)
|
|
47
|
+
return runChangedRelease(opts, deps);
|
|
48
|
+
if (opts.dryRun)
|
|
49
|
+
throw new CliError('invalid_argument', '--dry-run goes with --changed');
|
|
50
|
+
return runExtensionRelease(opts, deps);
|
|
51
|
+
};
|
|
144
52
|
export const addRelease = (group, release) => {
|
|
145
53
|
addJson(group
|
|
146
54
|
.command('release')
|
|
147
55
|
.description('Release an extension from its v* tag in CI: guard, images, one image, records, npm package')
|
|
148
56
|
.option('--dir <path>', 'the extension package folder (default: the current folder)')
|
|
149
|
-
.option('--timeout <seconds>', 'bound on each git, GitHub and npm check (default: 60; npm publish: 300)', Number)
|
|
57
|
+
.option('--timeout <seconds>', 'bound on each git, GitHub and npm check (default: 60; npm publish: 300)', Number)
|
|
58
|
+
.option('--changed', 'each extension (root or extensions/*) whose folder changed since its last <id>@* tag; each keeps its own package-lock.json, shared root files never trigger a release')
|
|
59
|
+
.option('--dry-run', 'with --changed: print what it would release, change nothing')).action(release);
|
|
150
60
|
};
|
package/dist/program-deps.js
CHANGED
|
@@ -13,7 +13,7 @@ import { readHidden, runConfigure, stdinInput } from './commands/extension/confi
|
|
|
13
13
|
import { runEnabled, runInstall, runRemove, terminalIo } from './commands/extension/lifecycle.js';
|
|
14
14
|
import { runList, runUpdate as runExtensionUpdate } from './commands/extension/lifecycle-list.js';
|
|
15
15
|
import { loadKitTool } from './commands/extension/kit-tool.js';
|
|
16
|
-
import {
|
|
16
|
+
import { runRelease } from './commands/extension/release.js';
|
|
17
17
|
import { runExtensionSetup } from './commands/extension/setup.js';
|
|
18
18
|
import { runExtensionDown, runExtensionToken, runExtensionUp } from './commands/extension/up.js';
|
|
19
19
|
import { runStatus, statusDeps } from './commands/status/status.js';
|
|
@@ -82,7 +82,7 @@ export const defaultDeps = {
|
|
|
82
82
|
extensionCreate: (opts) => runExtensionCreate(opts),
|
|
83
83
|
extensionCheck: (opts) => runExtensionCheck(opts),
|
|
84
84
|
extensionBuild: (opts) => runExtensionBuild(opts),
|
|
85
|
-
extensionRelease: (opts) =>
|
|
85
|
+
extensionRelease: (opts) => runRelease(opts),
|
|
86
86
|
extensionUp: (opts) => runExtensionUp(opts),
|
|
87
87
|
extensionDown: (opts) => runExtensionDown(opts),
|
|
88
88
|
extensionToken: (opts) => runExtensionToken(opts),
|