@anna-ai/cli 0.1.28 → 0.1.30
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/{_lifecycle-shared-BpSOfVCP.js → _lifecycle-shared-CUK2CE76.js} +1 -1
- package/dist/account-B6n0XkpV.js +30 -0
- package/dist/{agent-CaZVCPs6.js → agent-J2bELWfv.js} +1 -1
- package/dist/{app-bundle-upload-BhAYo6yj.js → app-bundle-upload-CPf_nGou.js} +2 -2
- package/dist/{app-cache-Bl7cE5fm.js → app-cache-BqnTkxUw.js} +1 -0
- package/dist/{apps-CCdtLmxQ.js → apps-73pdBAFE.js} +17 -1
- package/dist/{apps-3VcdHIBK.js → apps-BpJ-TvHP.js} +2 -2
- package/dist/{apps-cut-BOhg9RHy.js → apps-cut-C5SH9qZN.js} +11 -11
- package/dist/{apps-destructive-DWF4eTHn.js → apps-destructive-PY0wKjqu.js} +3 -3
- package/dist/{apps-discard-Dy3vzpCM.js → apps-discard-CfdkwUZ_.js} +11 -11
- package/dist/{apps-grants-DgvymPBT.js → apps-grants-BtXXiuJt.js} +2 -2
- package/dist/apps-publish-3wbhXfAg.js +14 -0
- package/dist/{apps-publish-Dgi4lBlu.js → apps-publish-B-ZVNmgn.js} +7 -7
- package/dist/{apps-push-DbUEFdCK.js → apps-push-Bh8zwT--.js} +12 -12
- package/dist/{apps-release-DJFG4BV3.js → apps-release-DNlN_8gz.js} +4 -4
- package/dist/apps-rename-slug-Bp-nQ_6I.js +62 -0
- package/dist/{apps-status-F6aVlzDW.js → apps-status-5DV9cY4A.js} +2 -2
- package/dist/{apps-submit-review-BVmZlhmB.js → apps-submit-review-DH-bzbDZ.js} +3 -3
- package/dist/{apps-sync-meta-CQQC_Heb.js → apps-sync-meta-DdPnXuIU.js} +4 -4
- package/dist/{apps-versions-BIKsJzIT.js → apps-versions-vGihRRje.js} +2 -2
- package/dist/bridge-CmoKMMcG.js +3 -0
- package/dist/{bundled-executas-DeBhDjd8.js → bundled-executas-06keEPP_.js} +1 -1
- package/dist/cli.js +61 -40
- package/dist/dev-C9VpI_AL.js +4 -0
- package/dist/{dev-DXODERsf.js → dev-aWkfWGLD.js} +5 -5
- package/dist/{dev-app-cache-TSjL4D4n.js → dev-app-cache-CP2P8SCZ.js} +1 -0
- package/dist/{doctor-DCsBgyRg.js → doctor-DnCYaREu.js} +1 -1
- package/dist/{executa-cache-Kx3rfQD-.js → executa-cache-B0O79Hpb.js} +1 -1
- package/dist/{executa-destructive-PL2ooHpZ.js → executa-destructive-8iSnfmcn.js} +3 -3
- package/dist/{executa-dev-Deo8ag5o.js → executa-dev-0XdBPTDy.js} +13 -10
- package/dist/{executa-install-BHQpOskj.js → executa-install-A-BgavhA.js} +2 -2
- package/dist/executa-install-Bc1WRrWu.js +7 -0
- package/dist/executa-publish-9XQRncyN.js +9 -0
- package/dist/{executa-publish-CkPAB34b.js → executa-publish-Xmm4DMO9.js} +4 -4
- package/dist/{executa-reads-CjGZq1yP.js → executa-reads-CjIr8BuD.js} +2 -2
- package/dist/{publish-BYWuujP3.js → publish-NTT1Libd.js} +10 -10
- package/dist/{sampling-BcML4teS.js → sampling-Cc0qaj8a.js} +92 -3
- package/dist/{server-F_VA-5tS.js → server-DtnMLKQS.js} +1 -1
- package/dist/{storage-CKTmE87u.js → storage-C95wApr2.js} +1 -1
- package/dist/{token-Cg7BZGp6.js → token-hGGfoge2.js} +1 -1
- package/dist/{working-orchestration-Pjm4YC_U.js → working-orchestration-CX0ONKIq.js} +30 -13
- package/package.json +1 -1
- package/dist/apps-publish-Do7M5je3.js +0 -14
- package/dist/bridge-6GIQG63S.js +0 -3
- package/dist/dev-CQkCFVXu.js +0 -4
- package/dist/executa-install-Bvf_Lvvg.js +0 -7
- package/dist/executa-publish-IXWSwva0.js +0 -9
- /package/dist/{bridge-DAY7bsje.js → bridge-DXH59CmP.js} +0 -0
- /package/dist/{bundled-executas-B6b8gIfp.js → bundled-executas-_H1A9M50.js} +0 -0
- /package/dist/{confirm-h_qMrx0I.js → confirm-BuT56E_B.js} +0 -0
- /package/dist/{dev-account-CGo8k9_2.js → dev-account-WXEjIE16.js} +0 -0
- /package/dist/{executa-cache-CXiEgFZY.js → executa-cache-Do1D7xC0.js} +0 -0
- /package/dist/{executa-init-DXea7yRN.js → executa-init-BCqJUZXT.js} +0 -0
- /package/dist/{executa-register-BUiPzPIU.js → executa-register-CMmlKyKB.js} +0 -0
- /package/dist/{executas-CK3er6f9.js → executas-BhFed1B-.js} +0 -0
- /package/dist/{fixture-BvP5umlN.js → fixture-BJqc1IfX.js} +0 -0
- /package/dist/{host_upload-BXeHTgJs.js → host_upload-sfo4UHlR.js} +0 -0
- /package/dist/{image-CSEXEfD-.js → image-Bdi4Hu0m.js} +0 -0
- /package/dist/{login-BGZjMAlh.js → login-CslsHbsq.js} +0 -0
- /package/dist/{logout-mh2_QlyM.js → logout-B4_b9ZL0.js} +0 -0
- /package/dist/{manifest-Bljz8Y6T.js → manifest-CMc7RM57.js} +0 -0
- /package/dist/{runner-BuYbm-ex.js → runner-DVu-o_U8.js} +0 -0
- /package/dist/{whoami-l_kIkfbI.js → whoami-ChzwOaN2.js} +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import "./credentials-BTv2IfUZ.js";
|
|
2
|
+
import { setDeveloperHandle } from "./apps-73pdBAFE.js";
|
|
3
|
+
import { CliError } from "./client-D-_z1ALk.js";
|
|
4
|
+
import { reportError, resolveClient } from "./_lifecycle-shared-CUK2CE76.js";
|
|
5
|
+
import { bold, dim, green, red } from "kleur/colors";
|
|
6
|
+
|
|
7
|
+
//#region src/commands/account.ts
|
|
8
|
+
async function runAccountSetHandle(opts) {
|
|
9
|
+
try {
|
|
10
|
+
const { client, host, source } = resolveClient({ account: opts.account });
|
|
11
|
+
if (!opts.json) console.log(dim(`using PAT from ${source} (host=${host})`));
|
|
12
|
+
const { handle } = await setDeveloperHandle(client, opts.handle);
|
|
13
|
+
if (opts.json) console.log(JSON.stringify({ handle }, null, 2));
|
|
14
|
+
else console.log(green(`✓ developer handle set to `) + bold(`@${handle}`) + "\n" + dim(` your apps are now published as @${handle}/<slug>.`));
|
|
15
|
+
return 0;
|
|
16
|
+
} catch (e) {
|
|
17
|
+
if (e instanceof CliError && e.status && e.status >= 400) {
|
|
18
|
+
const body = e.body;
|
|
19
|
+
const detail = body?.detail;
|
|
20
|
+
if (detail && typeof detail === "object" && detail.code) {
|
|
21
|
+
console.error(red(`✗ ${detail.code}: ${detail.message ?? "handle rejected"}`));
|
|
22
|
+
return e.exitCode;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return reportError(e);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { runAccountSetHandle };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { canonicalHost } from "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { hostOf, mintAppSession, requireAccount, withCode } from "./dev-account-
|
|
2
|
+
import { hostOf, mintAppSession, requireAccount, withCode } from "./dev-account-WXEjIE16.js";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { finalizeBundle, finalizeWorkingBundle, getBundle, initBundle, initWorkingBundle, uploadBundleFile, uploadWorkingBundleFile } from "./apps-
|
|
1
|
+
import { finalizeBundle, finalizeWorkingBundle, getBundle, initBundle, initWorkingBundle, uploadBundleFile, uploadWorkingBundleFile } from "./apps-73pdBAFE.js";
|
|
2
2
|
import { CliError } from "./client-D-_z1ALk.js";
|
|
3
|
-
import { canonicalize } from "./executa-publish-
|
|
3
|
+
import { canonicalize } from "./executa-publish-Xmm4DMO9.js";
|
|
4
4
|
import { join, relative, sep } from "node:path";
|
|
5
5
|
import { readFileSync, readdirSync, statSync } from "node:fs";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
@@ -104,6 +104,22 @@ async function getAppGrants(client, appId) {
|
|
|
104
104
|
});
|
|
105
105
|
return r.status === 404 ? null : r.data;
|
|
106
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Set (or rename) the caller's developer handle — the per-developer
|
|
109
|
+
* namespace for `@handle/slug` public app refs.
|
|
110
|
+
*
|
|
111
|
+
* `PUT /api/v1/developer/profile/handle`. Server validates the handle
|
|
112
|
+
* grammar/reserved words and uniqueness; renaming away from a handle that
|
|
113
|
+
* owns a published app is rejected (409 SLUG_FROZEN / manual flow).
|
|
114
|
+
*/
|
|
115
|
+
async function setDeveloperHandle(client, handle) {
|
|
116
|
+
const r = await client.request({
|
|
117
|
+
method: "PUT",
|
|
118
|
+
path: "/api/v1/developer/profile/handle",
|
|
119
|
+
body: { handle }
|
|
120
|
+
});
|
|
121
|
+
return r.data;
|
|
122
|
+
}
|
|
107
123
|
/** GET the bundle for a version, or `null` when none is initialized (404). */
|
|
108
124
|
async function getBundle(client, appId, versionId) {
|
|
109
125
|
const r = await client.request({
|
|
@@ -218,4 +234,4 @@ async function finalizeWorkingBundle(client, appId, skipRemoteCheck = false) {
|
|
|
218
234
|
}
|
|
219
235
|
|
|
220
236
|
//#endregion
|
|
221
|
-
export { archiveApp, createApp, createVersion, cutWorkingDraft, deleteApp, deleteWorkingDraft, finalizeBundle, finalizeWorkingBundle, findAppBySlug, getApp, getAppGrants, getBundle, getWorkingDraft, initBundle, initWorkingBundle, listMyApps, listVersions, patchApp, publishVersion, submitForReview, unarchiveApp, unpublishApp, uploadBundleFile, uploadWorkingBundleFile, upsertWorkingDraft };
|
|
237
|
+
export { archiveApp, createApp, createVersion, cutWorkingDraft, deleteApp, deleteWorkingDraft, finalizeBundle, finalizeWorkingBundle, findAppBySlug, getApp, getAppGrants, getBundle, getWorkingDraft, initBundle, initWorkingBundle, listMyApps, listVersions, patchApp, publishVersion, setDeveloperHandle, submitForReview, unarchiveApp, unpublishApp, uploadBundleFile, uploadWorkingBundleFile, upsertWorkingDraft };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { listMyApps } from "./apps-
|
|
2
|
+
import { listMyApps } from "./apps-73pdBAFE.js";
|
|
3
3
|
import "./client-D-_z1ALk.js";
|
|
4
|
-
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-
|
|
4
|
+
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
|
|
5
5
|
import { bold, cyan, dim, green, magenta, red, yellow } from "kleur/colors";
|
|
6
6
|
|
|
7
7
|
//#region src/commands/apps.ts
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { canonicalHost } from "./credentials-BTv2IfUZ.js";
|
|
2
2
|
import "./nexus-root-BlPwOusj.js";
|
|
3
|
-
import { cutWorkingDraft } from "./apps-
|
|
3
|
+
import { cutWorkingDraft } from "./apps-73pdBAFE.js";
|
|
4
4
|
import { CliError } from "./client-D-_z1ALk.js";
|
|
5
|
-
import {
|
|
6
|
-
import "./executas-
|
|
7
|
-
import "./
|
|
8
|
-
import "./executa-
|
|
9
|
-
import "./
|
|
10
|
-
import
|
|
11
|
-
import "./dev-
|
|
12
|
-
import "./executa-install-
|
|
13
|
-
import "./app-cache-
|
|
14
|
-
import { resolveAppBySlugOrCache } from "./working-orchestration-
|
|
5
|
+
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
|
|
6
|
+
import { readExecutasLock, writeExecutasLock } from "./bundled-executas-_H1A9M50.js";
|
|
7
|
+
import "./executas-BhFed1B-.js";
|
|
8
|
+
import "./executa-cache-Do1D7xC0.js";
|
|
9
|
+
import "./executa-publish-Xmm4DMO9.js";
|
|
10
|
+
import "./manifest-CMc7RM57.js";
|
|
11
|
+
import "./dev-aWkfWGLD.js";
|
|
12
|
+
import "./executa-install-A-BgavhA.js";
|
|
13
|
+
import "./app-cache-BqnTkxUw.js";
|
|
14
|
+
import { resolveAppBySlugOrCache } from "./working-orchestration-CX0ONKIq.js";
|
|
15
15
|
import { resolve } from "node:path";
|
|
16
16
|
import { bold, cyan, dim, green, yellow } from "kleur/colors";
|
|
17
17
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { archiveApp, deleteApp, findAppBySlug, unarchiveApp, unpublishApp } from "./apps-
|
|
2
|
+
import { archiveApp, deleteApp, findAppBySlug, unarchiveApp, unpublishApp } from "./apps-73pdBAFE.js";
|
|
3
3
|
import { CliError } from "./client-D-_z1ALk.js";
|
|
4
|
-
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-
|
|
5
|
-
import { ensureDestructiveAllowed } from "./confirm-
|
|
4
|
+
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
|
|
5
|
+
import { ensureDestructiveAllowed } from "./confirm-BuT56E_B.js";
|
|
6
6
|
import { dim, green, yellow } from "kleur/colors";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/apps-destructive.ts
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import "./credentials-BTv2IfUZ.js";
|
|
2
2
|
import "./nexus-root-BlPwOusj.js";
|
|
3
|
-
import { deleteWorkingDraft, getWorkingDraft } from "./apps-
|
|
3
|
+
import { deleteWorkingDraft, getWorkingDraft } from "./apps-73pdBAFE.js";
|
|
4
4
|
import "./client-D-_z1ALk.js";
|
|
5
|
-
import "./
|
|
6
|
-
import "./executas-
|
|
7
|
-
import "./
|
|
8
|
-
import "./executa-
|
|
9
|
-
import "./
|
|
10
|
-
import
|
|
11
|
-
import "./dev-
|
|
12
|
-
import "./executa-install-
|
|
13
|
-
import "./app-cache-
|
|
14
|
-
import { resolveAppBySlugOrCache } from "./working-orchestration-
|
|
5
|
+
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
|
|
6
|
+
import "./bundled-executas-_H1A9M50.js";
|
|
7
|
+
import "./executas-BhFed1B-.js";
|
|
8
|
+
import "./executa-cache-Do1D7xC0.js";
|
|
9
|
+
import "./executa-publish-Xmm4DMO9.js";
|
|
10
|
+
import "./manifest-CMc7RM57.js";
|
|
11
|
+
import "./dev-aWkfWGLD.js";
|
|
12
|
+
import "./executa-install-A-BgavhA.js";
|
|
13
|
+
import "./app-cache-BqnTkxUw.js";
|
|
14
|
+
import { resolveAppBySlugOrCache } from "./working-orchestration-CX0ONKIq.js";
|
|
15
15
|
import { dim, green, yellow } from "kleur/colors";
|
|
16
16
|
|
|
17
17
|
//#region src/commands/apps-discard.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { findAppBySlug, getAppGrants } from "./apps-
|
|
2
|
+
import { findAppBySlug, getAppGrants } from "./apps-73pdBAFE.js";
|
|
3
3
|
import { CliError } from "./client-D-_z1ALk.js";
|
|
4
|
-
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-
|
|
4
|
+
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
|
|
5
5
|
import { bold, cyan, dim } from "kleur/colors";
|
|
6
6
|
|
|
7
7
|
//#region src/commands/apps-grants.ts
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "./credentials-BTv2IfUZ.js";
|
|
2
|
+
import "./apps-73pdBAFE.js";
|
|
3
|
+
import "./client-D-_z1ALk.js";
|
|
4
|
+
import "./_lifecycle-shared-CUK2CE76.js";
|
|
5
|
+
import "./bundled-executas-_H1A9M50.js";
|
|
6
|
+
import "./executas-BhFed1B-.js";
|
|
7
|
+
import "./executa-cache-Do1D7xC0.js";
|
|
8
|
+
import "./executa-publish-Xmm4DMO9.js";
|
|
9
|
+
import "./manifest-CMc7RM57.js";
|
|
10
|
+
import "./app-cache-BqnTkxUw.js";
|
|
11
|
+
import "./app-bundle-upload-CPf_nGou.js";
|
|
12
|
+
import { runAppsPublish } from "./apps-publish-B-ZVNmgn.js";
|
|
13
|
+
|
|
14
|
+
export { runAppsPublish };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { canonicalHost } from "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { createApp, createVersion, findAppBySlug, getApp } from "./apps-
|
|
2
|
+
import { createApp, createVersion, findAppBySlug, getApp } from "./apps-73pdBAFE.js";
|
|
3
3
|
import { CliError } from "./client-D-_z1ALk.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { appCacheMatches, readAppIdentity, writeAppIdentity } from "./app-cache-
|
|
9
|
-
import { isExistingDir, uploadAppBundle } from "./app-bundle-upload-
|
|
4
|
+
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
|
|
5
|
+
import { parseExecutaIdOverrides, readExecutasLock, substituteBundledRefs, validateBundledHandles, writeBundleToolIdSidecar, writeExecutasLock } from "./bundled-executas-_H1A9M50.js";
|
|
6
|
+
import { bumpVersion, bundleHash, manifestHash, rewriteVersion, runExecutaPublish } from "./executa-publish-Xmm4DMO9.js";
|
|
7
|
+
import { loadAppManifest } from "./manifest-CMc7RM57.js";
|
|
8
|
+
import { appCacheMatches, readAppIdentity, writeAppIdentity } from "./app-cache-BqnTkxUw.js";
|
|
9
|
+
import { isExistingDir, uploadAppBundle } from "./app-bundle-upload-CPf_nGou.js";
|
|
10
10
|
import { resolve } from "node:path";
|
|
11
11
|
import { bold, cyan, dim, green, yellow } from "kleur/colors";
|
|
12
12
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import "./credentials-BTv2IfUZ.js";
|
|
2
2
|
import "./nexus-root-BlPwOusj.js";
|
|
3
|
-
import { getApp, getWorkingDraft, upsertWorkingDraft } from "./apps-
|
|
3
|
+
import { getApp, getWorkingDraft, upsertWorkingDraft } from "./apps-73pdBAFE.js";
|
|
4
4
|
import { CliError } from "./client-D-_z1ALk.js";
|
|
5
|
-
import "./
|
|
6
|
-
import "./executas-
|
|
7
|
-
import "./
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import "./dev-
|
|
12
|
-
import "./executa-install-
|
|
13
|
-
import "./app-cache-
|
|
14
|
-
import { installLocalBundledShims, resolveAppIdentity, resolveBundledExecutas } from "./working-orchestration-
|
|
15
|
-
import { isExistingDir, uploadWorkingBundle } from "./app-bundle-upload-
|
|
5
|
+
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
|
|
6
|
+
import "./bundled-executas-_H1A9M50.js";
|
|
7
|
+
import "./executas-BhFed1B-.js";
|
|
8
|
+
import "./executa-cache-Do1D7xC0.js";
|
|
9
|
+
import { bumpVersion, bundleHash, manifestHash, rewriteVersion } from "./executa-publish-Xmm4DMO9.js";
|
|
10
|
+
import { loadAppManifest } from "./manifest-CMc7RM57.js";
|
|
11
|
+
import "./dev-aWkfWGLD.js";
|
|
12
|
+
import "./executa-install-A-BgavhA.js";
|
|
13
|
+
import "./app-cache-BqnTkxUw.js";
|
|
14
|
+
import { installLocalBundledShims, resolveAppIdentity, resolveBundledExecutas } from "./working-orchestration-CX0ONKIq.js";
|
|
15
|
+
import { isExistingDir, uploadWorkingBundle } from "./app-bundle-upload-CPf_nGou.js";
|
|
16
16
|
import { resolve } from "node:path";
|
|
17
17
|
import { bold, cyan, dim, green, yellow } from "kleur/colors";
|
|
18
18
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { canonicalHost } from "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { findAppBySlug, getApp, getBundle, listVersions, publishVersion } from "./apps-
|
|
2
|
+
import { findAppBySlug, getApp, getBundle, listVersions, publishVersion } from "./apps-73pdBAFE.js";
|
|
3
3
|
import { CliError } from "./client-D-_z1ALk.js";
|
|
4
|
-
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-
|
|
5
|
-
import { readAppIdentity } from "./app-cache-
|
|
4
|
+
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
|
|
5
|
+
import { readAppIdentity } from "./app-cache-BqnTkxUw.js";
|
|
6
6
|
import { resolve } from "node:path";
|
|
7
7
|
import { bold, cyan, dim, green, yellow } from "kleur/colors";
|
|
8
8
|
|
|
@@ -58,7 +58,7 @@ async function runAppsRelease(opts) {
|
|
|
58
58
|
if (!target) {
|
|
59
59
|
if (opts.allowCreate) {
|
|
60
60
|
if (!opts.json) console.log(yellow(`version ${opts.version} not found remotely; running 'apps publish' first (--allow-create)…`));
|
|
61
|
-
const { runAppsPublish } = await import("./apps-publish-
|
|
61
|
+
const { runAppsPublish } = await import("./apps-publish-3wbhXfAg.js");
|
|
62
62
|
const code = await runAppsPublish({
|
|
63
63
|
cwd: opts.cwd,
|
|
64
64
|
account: opts.account,
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import "./credentials-BTv2IfUZ.js";
|
|
2
|
+
import { findAppBySlug, patchApp } from "./apps-73pdBAFE.js";
|
|
3
|
+
import { CliError } from "./client-D-_z1ALk.js";
|
|
4
|
+
import { reportError, resolveClient } from "./_lifecycle-shared-CUK2CE76.js";
|
|
5
|
+
import { loadAppManifest } from "./manifest-CMc7RM57.js";
|
|
6
|
+
import { readAppIdentity, writeAppIdentity } from "./app-cache-BqnTkxUw.js";
|
|
7
|
+
import { writeFileSync } from "node:fs";
|
|
8
|
+
import { bold, dim, green, red, yellow } from "kleur/colors";
|
|
9
|
+
|
|
10
|
+
//#region src/commands/apps-rename-slug.ts
|
|
11
|
+
async function runAppsRenameSlug(opts) {
|
|
12
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
13
|
+
try {
|
|
14
|
+
const { client, host } = resolveClient({ account: opts.account });
|
|
15
|
+
const manifest = loadAppManifest(cwd, opts.manifest);
|
|
16
|
+
const oldSlug = manifest.slug;
|
|
17
|
+
if (oldSlug === opts.newSlug) {
|
|
18
|
+
console.error(yellow(`slug is already "${opts.newSlug}" — nothing to do.`));
|
|
19
|
+
return 0;
|
|
20
|
+
}
|
|
21
|
+
const identity = readAppIdentity(cwd);
|
|
22
|
+
let appId = identity && identity.host === host ? identity.app_id : void 0;
|
|
23
|
+
if (appId === void 0) {
|
|
24
|
+
const found = await findAppBySlug(client, oldSlug);
|
|
25
|
+
if (!found) {
|
|
26
|
+
console.error(red(`✗ no app found for slug "${oldSlug}" under this account.`));
|
|
27
|
+
return 4;
|
|
28
|
+
}
|
|
29
|
+
appId = found.id;
|
|
30
|
+
}
|
|
31
|
+
const updated = await patchApp(client, appId, { slug: opts.newSlug });
|
|
32
|
+
const nextMeta = {
|
|
33
|
+
...manifest.metadataRaw,
|
|
34
|
+
slug: opts.newSlug
|
|
35
|
+
};
|
|
36
|
+
writeFileSync(manifest.metadataPath, JSON.stringify(nextMeta, null, 2) + "\n", "utf-8");
|
|
37
|
+
if (identity) writeAppIdentity(cwd, {
|
|
38
|
+
...identity,
|
|
39
|
+
slug: opts.newSlug
|
|
40
|
+
});
|
|
41
|
+
if (opts.json) console.log(JSON.stringify({
|
|
42
|
+
id: appId,
|
|
43
|
+
old_slug: oldSlug,
|
|
44
|
+
slug: updated.slug ?? opts.newSlug
|
|
45
|
+
}, null, 2));
|
|
46
|
+
else console.log(green(`✓ renamed slug `) + bold(oldSlug) + green(` → `) + bold(updated.slug ?? opts.newSlug) + "\n" + dim(` updated ${manifest.metadataPath} and .anna/app.json.`));
|
|
47
|
+
return 0;
|
|
48
|
+
} catch (e) {
|
|
49
|
+
if (e instanceof CliError && e.status && e.status >= 400) {
|
|
50
|
+
const body = e.body;
|
|
51
|
+
const detail = body?.detail;
|
|
52
|
+
if (detail && typeof detail === "object" && detail.code) {
|
|
53
|
+
console.error(red(`✗ ${detail.code}: ${detail.message ?? "rename rejected"}`));
|
|
54
|
+
return e.exitCode;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return reportError(e);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
//#endregion
|
|
62
|
+
export { runAppsRenameSlug };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { findAppBySlug, getApp, listVersions } from "./apps-
|
|
2
|
+
import { findAppBySlug, getApp, listVersions } from "./apps-73pdBAFE.js";
|
|
3
3
|
import { CliError } from "./client-D-_z1ALk.js";
|
|
4
|
-
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-
|
|
4
|
+
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
|
|
5
5
|
import { bold, cyan, dim, green, red, yellow } from "kleur/colors";
|
|
6
6
|
|
|
7
7
|
//#region src/commands/apps-status.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { canonicalHost } from "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { findAppBySlug, getApp, submitForReview } from "./apps-
|
|
2
|
+
import { findAppBySlug, getApp, submitForReview } from "./apps-73pdBAFE.js";
|
|
3
3
|
import { CliError } from "./client-D-_z1ALk.js";
|
|
4
|
-
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-
|
|
5
|
-
import { readAppIdentity } from "./app-cache-
|
|
4
|
+
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
|
|
5
|
+
import { readAppIdentity } from "./app-cache-BqnTkxUw.js";
|
|
6
6
|
import { resolve } from "node:path";
|
|
7
7
|
import { bold, cyan, green } from "kleur/colors";
|
|
8
8
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { canonicalHost } from "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { findAppBySlug, getApp, patchApp } from "./apps-
|
|
2
|
+
import { findAppBySlug, getApp, patchApp } from "./apps-73pdBAFE.js";
|
|
3
3
|
import { CliError } from "./client-D-_z1ALk.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { readAppIdentity } from "./app-cache-
|
|
4
|
+
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
|
|
5
|
+
import { loadAppManifest } from "./manifest-CMc7RM57.js";
|
|
6
|
+
import { readAppIdentity } from "./app-cache-BqnTkxUw.js";
|
|
7
7
|
import { resolve } from "node:path";
|
|
8
8
|
import { bold, cyan, dim, green } from "kleur/colors";
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { findAppBySlug, listVersions } from "./apps-
|
|
2
|
+
import { findAppBySlug, listVersions } from "./apps-73pdBAFE.js";
|
|
3
3
|
import { CliError } from "./client-D-_z1ALk.js";
|
|
4
|
-
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-
|
|
4
|
+
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-CUK2CE76.js";
|
|
5
5
|
import { bold, cyan, dim, green } from "kleur/colors";
|
|
6
6
|
|
|
7
7
|
//#region src/commands/apps-versions.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./credentials-BTv2IfUZ.js";
|
|
2
2
|
import "./client-D-_z1ALk.js";
|
|
3
|
-
import { collectBundledHandles, lockPath, parseExecutaIdOverrides, readExecutasLock, substituteBundledRefs, validateBundledHandles, writeBundleToolIdSidecar, writeExecutasLock } from "./bundled-executas-
|
|
3
|
+
import { collectBundledHandles, lockPath, parseExecutaIdOverrides, readExecutasLock, substituteBundledRefs, validateBundledHandles, writeBundleToolIdSidecar, writeExecutasLock } from "./bundled-executas-_H1A9M50.js";
|
|
4
4
|
|
|
5
5
|
export { substituteBundledRefs, writeBundleToolIdSidecar };
|