@anna-ai/cli 0.1.49 → 0.1.51
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/{account-CPnwqXeh.js → account-C-IeQNNr.js} +1 -1
- package/dist/{agent-DAOr_aiE.js → agent-CX2VzG7e.js} +1 -1
- package/dist/{apps-HbfURK6y.js → apps-BRBufSyX.js} +1 -41
- package/dist/{apps-CzqMRLbS.js → apps-CTIiH6a_.js} +1 -1
- package/dist/apps-cut-35wivw1Z.js +19 -0
- package/dist/{apps-cut-BhTJwILv.js → apps-cut-L7T8b5RS.js} +20 -22
- package/dist/{apps-destructive-PlaU93EX.js → apps-destructive-DcG3T1Mx.js} +2 -2
- package/dist/{apps-discard-CFi-GzpU.js → apps-discard-CKA_m7Yw.js} +7 -7
- package/dist/{apps-grants-DqaX8UTy.js → apps-grants-B5MpWhSO.js} +1 -1
- package/dist/apps-publish-CGfzN7tI.js +92 -0
- package/dist/apps-publish-CUJILNOt.js +22 -0
- package/dist/apps-push-BcYNGSYx.js +20 -0
- package/dist/{app-bundle-upload-Ca0r-kPy.js → apps-push-d1C0eePp.js} +144 -69
- package/dist/{apps-release-DGQv6DDl.js → apps-release-DxRHjEYJ.js} +2 -2
- package/dist/{apps-rename-slug-CCEU_7JJ.js → apps-rename-slug-4_5lsDwg.js} +2 -2
- package/dist/{apps-status-C4Cxc2DF.js → apps-status-hMrRz356.js} +1 -1
- package/dist/{apps-submit-review--hZFZRJ3.js → apps-submit-review-CxoKgexX.js} +1 -1
- package/dist/{apps-sync-meta-DnFwFNl5.js → apps-sync-meta-BwN8g6TO.js} +3 -3
- package/dist/{apps-versions-C7NzG5Dk.js → apps-versions-gfG_sBFv.js} +1 -1
- package/dist/{bridge-sFHqOOat.js → bridge-Bo8eu3-d.js} +1 -1
- package/dist/bridge-nv-le8ff.js +3 -0
- package/dist/cli.js +45 -45
- package/dist/{dev-Bfv3WQC0.js → dev-BB1oS-1o.js} +4 -4
- package/dist/dev-DAkNdyJ-.js +4 -0
- package/dist/{doctor-CHnkbamq.js → doctor-qFe9sXxR.js} +1 -1
- package/dist/{executa-destructive-Du7RGJgn.js → executa-destructive-C06mgvfJ.js} +1 -1
- package/dist/{executa-dev-DYO87dzg.js → executa-dev-ONm9di1H.js} +8 -8
- package/dist/executa-install-DKMwLq-V.js +7 -0
- package/dist/{executa-install-DAposiBw.js → executa-install-n1oRAoYJ.js} +1 -1
- package/dist/{executa-publish-BKnsUoZq.js → executa-publish-BuakG1RK.js} +38 -11
- package/dist/{executa-publish-6awuH4Ma.js → executa-publish-CVlMaHIY.js} +3 -3
- package/dist/{executa-upload-binaries-FWM2yXfB.js → executa-upload-binaries-BVWs6MFF.js} +2 -2
- package/dist/{executa-upload-binaries-DwWQ18Dq.js → executa-upload-binaries-D0JWYOtK.js} +1 -1
- package/dist/{listing-meta-DgweMStT.js → listing-meta-rIni8tjd.js} +1 -1
- package/dist/{manifest-B_DjigtQ.js → manifest-BCHiC184.js} +49 -3
- package/dist/{publish-D5O5JKRb.js → publish-CIaosgo4.js} +13 -10
- package/dist/{server-Dr_htFv8.js → server-poDjwty-.js} +1 -1
- package/dist/{storage-aii8EyPC.js → storage-CZ4c4ibf.js} +1 -1
- package/dist/{working-orchestration-CpBJLs50.js → working-orchestration-BRU7FV-b.js} +9 -5
- package/package.json +3 -3
- package/dist/apps-publish-4IIbF2xr.js +0 -17
- package/dist/apps-publish-8N9x4VEM.js +0 -272
- package/dist/apps-push-CnSeLwdo.js +0 -152
- package/dist/bridge-BP28T06H.js +0 -3
- package/dist/dev-CnDh2_7r.js +0 -4
- package/dist/executa-install-LaAOSkY0.js +0 -7
- /package/dist/{confirm-ChZAVrZe.js → confirm-DplLyBSG.js} +0 -0
- /package/dist/{dev-account-CfVdGa9j.js → dev-account-IrYL4u4F.js} +0 -0
- /package/dist/{dev-app-cache-Dw2JESld.js → dev-app-cache-CScRa7c3.js} +0 -0
- /package/dist/{executa-init-DKy7DMSD.js → executa-init-BM0HR-K7.js} +0 -0
- /package/dist/{executa-reads-BYKUADoL.js → executa-reads-BJpmB-B1.js} +0 -0
- /package/dist/{executa-register-CmqKsoAU.js → executa-register-CDKG3L5c.js} +0 -0
- /package/dist/{executa-trusted-publisher-BGqz6hMt.js → executa-trusted-publisher-n9IbAO5D.js} +0 -0
- /package/dist/{fixture-BF1Z0Rry.js → fixture-CizypXzX.js} +0 -0
- /package/dist/{host_upload-CW_2Fxg6.js → host_upload-BvzJZKAO.js} +0 -0
- /package/dist/{image-B4UrufYH.js → image-C61zRJC8.js} +0 -0
- /package/dist/{login-DbETuUxy.js → login-BleVDjXE.js} +0 -0
- /package/dist/{logout-BzIEf-HU.js → logout-BO4brBaY.js} +0 -0
- /package/dist/{runner-Dq3cluPM.js → runner-aq0n-pdr.js} +0 -0
- /package/dist/{sampling-BpJcd6BC.js → sampling-BQwF3O-4.js} +0 -0
- /package/dist/{token-TgBQumgy.js → token-DeAZLyVz.js} +0 -0
- /package/dist/{whoami-Bn38ns8r.js → whoami-rvVc_nQ9.js} +0 -0
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import "./nexus-root-BlPwOusj.js";
|
|
3
|
-
import { getApp, getWorkingDraft, upsertWorkingDraft } from "./apps-HbfURK6y.js";
|
|
4
|
-
import { CliError } from "./client-sMzq2PWG.js";
|
|
5
|
-
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-_9BzQ9Y2.js";
|
|
6
|
-
import "./executa-cache-BFoUtb4J.js";
|
|
7
|
-
import "./bundled-executas-BRyQkI9u.js";
|
|
8
|
-
import { loadAppManifest } from "./manifest-B_DjigtQ.js";
|
|
9
|
-
import "./executas-CvQY_w2U.js";
|
|
10
|
-
import { bumpVersion, bundleHash, manifestHash, rewriteVersion } from "./executa-publish-BKnsUoZq.js";
|
|
11
|
-
import "./binary-upload-DVhQ0uY0.js";
|
|
12
|
-
import "./executa-upload-binaries-DwWQ18Dq.js";
|
|
13
|
-
import "./dev-Bfv3WQC0.js";
|
|
14
|
-
import "./executa-install-DAposiBw.js";
|
|
15
|
-
import "./app-cache-Cr3tKbux.js";
|
|
16
|
-
import { installLocalBundledShims, resolveAppIdentity, resolveBundledExecutas } from "./working-orchestration-CpBJLs50.js";
|
|
17
|
-
import { syncAppListingMeta } from "./listing-meta-DgweMStT.js";
|
|
18
|
-
import { isExistingDir, uploadWorkingBundle } from "./app-bundle-upload-Ca0r-kPy.js";
|
|
19
|
-
import { resolve } from "node:path";
|
|
20
|
-
import { bold, cyan, dim, green, yellow } from "kleur/colors";
|
|
21
|
-
|
|
22
|
-
//#region src/commands/apps-push.ts
|
|
23
|
-
async function runAppsPush(opts) {
|
|
24
|
-
return withErrorHandling(async () => {
|
|
25
|
-
const cwd = resolve(opts.cwd ?? process.cwd());
|
|
26
|
-
const manifest = loadAppManifest(cwd, opts.manifest);
|
|
27
|
-
const { client, host, source } = resolveClient({ account: opts.account });
|
|
28
|
-
if (!opts.json) console.log(dim(`using PAT from ${source} (host=${host})`));
|
|
29
|
-
if (opts.bump) {
|
|
30
|
-
const next = bumpVersion(manifest.version, opts.bump);
|
|
31
|
-
if (!opts.json) console.log(yellow(`↑ bumping manifest.version: ${manifest.version} → ${next}`));
|
|
32
|
-
if (!opts.noWrite && !opts.dryRun) rewriteVersion(manifest.metadataPath, manifest.metadataRaw, next);
|
|
33
|
-
manifest.version = next;
|
|
34
|
-
manifest.metadataRaw.version = next;
|
|
35
|
-
}
|
|
36
|
-
const { publishManifestRaw, resolved } = await resolveBundledExecutas({
|
|
37
|
-
manifest,
|
|
38
|
-
cwd,
|
|
39
|
-
host,
|
|
40
|
-
executaId: opts.executaId,
|
|
41
|
-
skipExecutaPublish: opts.skipExecutaPublish,
|
|
42
|
-
noBundledExecutas: opts.noBundledExecutas,
|
|
43
|
-
dryRun: opts.dryRun,
|
|
44
|
-
freeze: false,
|
|
45
|
-
lockSource: "working",
|
|
46
|
-
profile: opts.profile,
|
|
47
|
-
account: opts.account,
|
|
48
|
-
json: opts.json
|
|
49
|
-
});
|
|
50
|
-
let installedShims = [];
|
|
51
|
-
if (!opts.dryRun && !opts.noInstallLocal && Object.keys(resolved).length > 0) installedShims = await installLocalBundledShims({
|
|
52
|
-
manifest,
|
|
53
|
-
cwd,
|
|
54
|
-
resolved,
|
|
55
|
-
profile: opts.profile,
|
|
56
|
-
json: opts.json
|
|
57
|
-
});
|
|
58
|
-
const identity = await resolveAppIdentity({
|
|
59
|
-
client,
|
|
60
|
-
cwd,
|
|
61
|
-
host,
|
|
62
|
-
manifest,
|
|
63
|
-
dryRun: opts.dryRun,
|
|
64
|
-
json: opts.json
|
|
65
|
-
});
|
|
66
|
-
if (!identity) return 0;
|
|
67
|
-
const { appId, serverSlug, firstPublish } = identity;
|
|
68
|
-
const hashInput = {
|
|
69
|
-
version: manifest.version,
|
|
70
|
-
manifest: publishManifestRaw
|
|
71
|
-
};
|
|
72
|
-
const bundleEntry = publishManifestRaw.ui?.bundle?.entry;
|
|
73
|
-
const bundleDir = resolve(cwd, opts.bundleDir ?? "bundle");
|
|
74
|
-
const hasBundle = !!bundleEntry && !opts.noBundle && isExistingDir(bundleDir);
|
|
75
|
-
const hash = hasBundle ? bundleHash(hashInput, bundleDir) : manifestHash(hashInput);
|
|
76
|
-
if (opts.dryRun) {
|
|
77
|
-
if (!opts.json) console.log(yellow(`[dry-run] app_id=${appId} slug=${serverSlug}; would PUT /working (content_hash=${hash.slice(0, 12)}…)` + (hasBundle ? ` + stage working bundle from ${bundleDir}` : "")));
|
|
78
|
-
return 0;
|
|
79
|
-
}
|
|
80
|
-
let resp;
|
|
81
|
-
try {
|
|
82
|
-
resp = await upsertWorkingDraft(client, appId, {
|
|
83
|
-
manifest: publishManifestRaw,
|
|
84
|
-
changelog: manifest.changelog,
|
|
85
|
-
content_hash: hash
|
|
86
|
-
}, opts.ifMatch);
|
|
87
|
-
} catch (e) {
|
|
88
|
-
if (e instanceof CliError && e.status === 409) throw new CliError(`working draft was modified concurrently (If-Match=${opts.ifMatch} is stale); re-run \`apps push\` without --if-match for last-writer-wins, or fetch the current revision with \`apps status\``, 4);
|
|
89
|
-
throw e;
|
|
90
|
-
}
|
|
91
|
-
let bundleResult = null;
|
|
92
|
-
if (hasBundle) {
|
|
93
|
-
const uiBundle = publishManifestRaw.ui.bundle;
|
|
94
|
-
const skipStage = resp.unchanged && resp.bundle_status === "ready";
|
|
95
|
-
if (!skipStage) bundleResult = await uploadWorkingBundle({
|
|
96
|
-
client,
|
|
97
|
-
appId,
|
|
98
|
-
bundleDir,
|
|
99
|
-
entryPath: uiBundle.entry,
|
|
100
|
-
bundleFormat: uiBundle.format,
|
|
101
|
-
externalOrigins: Array.isArray(uiBundle.external_origins) ? uiBundle.external_origins : [],
|
|
102
|
-
log: opts.json ? void 0 : (m) => console.log(dim(m))
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
try {
|
|
106
|
-
await syncAppListingMeta(client, appId, manifest, { cwd });
|
|
107
|
-
} catch (err) {
|
|
108
|
-
if (!opts.json) console.log(yellow(`! listing metadata sync skipped: ${err.message}`));
|
|
109
|
-
}
|
|
110
|
-
const finalApp = await getApp(client, appId);
|
|
111
|
-
const draft = await getWorkingDraft(client, appId);
|
|
112
|
-
if (opts.json) {
|
|
113
|
-
console.log(JSON.stringify({
|
|
114
|
-
app_id: appId,
|
|
115
|
-
slug: serverSlug,
|
|
116
|
-
host,
|
|
117
|
-
revision: resp.revision,
|
|
118
|
-
content_hash: resp.content_hash,
|
|
119
|
-
unchanged: resp.unchanged,
|
|
120
|
-
bundle_status: resp.bundle_status,
|
|
121
|
-
first_publish: firstPublish,
|
|
122
|
-
status: finalApp.status,
|
|
123
|
-
dirty_vs_latest_cut: draft?.dirty_vs_latest_cut ?? null,
|
|
124
|
-
installed_shims: installedShims,
|
|
125
|
-
bundle: bundleResult ? {
|
|
126
|
-
status: bundleResult.status,
|
|
127
|
-
file_count: bundleResult.fileCount,
|
|
128
|
-
total_size_bytes: bundleResult.totalBytes,
|
|
129
|
-
bundle_status: bundleResult.bundleStatus
|
|
130
|
-
} : null
|
|
131
|
-
}, null, 2));
|
|
132
|
-
return 0;
|
|
133
|
-
}
|
|
134
|
-
if (resp.unchanged) console.log(green(`✓ apps/${serverSlug}: working draft unchanged (rev ${resp.revision})`));
|
|
135
|
-
else console.log(green(`✓ apps/${serverSlug}: working draft updated (rev ${resp.revision})`));
|
|
136
|
-
if (firstPublish) console.log(dim(` first push — wrote .anna/app.json`));
|
|
137
|
-
if (bundleResult) if (bundleResult.status === "skipped") console.log(dim(` working bundle unchanged — skipped`));
|
|
138
|
-
else console.log(green(` ✓ working bundle: ${bundleResult.fileCount} files, ${(bundleResult.totalBytes / 1024).toFixed(1)} KB → ${bundleResult.bundleStatus}`));
|
|
139
|
-
console.log(bold(cyan(`status: ${finalApp.status}`)));
|
|
140
|
-
if (draft?.dirty_vs_latest_cut) console.log(dim(` (uncommitted changes vs latest cut version)`));
|
|
141
|
-
if (installedShims.length > 0) {
|
|
142
|
-
for (const s of installedShims) console.log(green(` ✓ installed local dev shim: `) + cyan(s.tool_id));
|
|
143
|
-
console.log(dim(`→ click `) + cyan(`Rediscover Local`) + dim(` in the Agent's Plugin Details to load `) + (installedShims.length === 1 ? dim("it") : dim("them")));
|
|
144
|
-
}
|
|
145
|
-
console.log(dim(`→ install & test the draft (reserved `) + cyan(`0.0.0-draft`) + dim(`) from the Developer Console`));
|
|
146
|
-
console.log(dim(`→ run `) + cyan(`anna-app apps cut ${manifest.version}`) + dim(` to snapshot an immutable version`));
|
|
147
|
-
return 0;
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
//#endregion
|
|
152
|
-
export { runAppsPush };
|
package/dist/bridge-BP28T06H.js
DELETED
package/dist/dev-CnDh2_7r.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{executa-trusted-publisher-BGqz6hMt.js → executa-trusted-publisher-n9IbAO5D.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|