run402 1.5.0 → 1.6.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/lib/agent.mjs +2 -2
- package/lib/apps.mjs +1 -1
- package/lib/deploy.mjs +1 -1
- package/lib/message.mjs +2 -2
- package/lib/projects.mjs +4 -2
- package/lib/sites.mjs +1 -1
- package/package.json +1 -1
package/lib/agent.mjs
CHANGED
|
@@ -7,7 +7,7 @@ Usage:
|
|
|
7
7
|
run402 agent contact --name <name> [--email <email>] [--webhook <url>]
|
|
8
8
|
|
|
9
9
|
Notes:
|
|
10
|
-
-
|
|
10
|
+
- Free with wallet auth
|
|
11
11
|
- Registers contact info so Run402 can reach your agent
|
|
12
12
|
- Only name is required; email and webhook are optional
|
|
13
13
|
|
|
@@ -48,7 +48,7 @@ async function contact(args) {
|
|
|
48
48
|
if (webhook) body.webhook = webhook;
|
|
49
49
|
|
|
50
50
|
const res = await fetchPaid(`${API}/agent/v1/contact`, {
|
|
51
|
-
method: "
|
|
51
|
+
method: "POST",
|
|
52
52
|
headers: { "Content-Type": "application/json" },
|
|
53
53
|
body: JSON.stringify(body),
|
|
54
54
|
});
|
package/lib/apps.mjs
CHANGED
|
@@ -71,7 +71,7 @@ async function fork(versionId, name, args) {
|
|
|
71
71
|
const body = { version_id: versionId, name };
|
|
72
72
|
if (opts.subdomain) body.subdomain = opts.subdomain;
|
|
73
73
|
|
|
74
|
-
const res = await fetchPaid(`${API}/fork/v1
|
|
74
|
+
const res = await fetchPaid(`${API}/fork/v1`, {
|
|
75
75
|
method: "POST",
|
|
76
76
|
headers: { "Content-Type": "application/json" },
|
|
77
77
|
body: JSON.stringify(body),
|
package/lib/deploy.mjs
CHANGED
|
@@ -84,7 +84,7 @@ export async function run(args) {
|
|
|
84
84
|
client.register("eip155:84532", new ExactEvmScheme(signer));
|
|
85
85
|
const fetchPaid = wrapFetchWithPayment(fetch, client);
|
|
86
86
|
|
|
87
|
-
const res = await fetchPaid(`${API}/deploy/v1
|
|
87
|
+
const res = await fetchPaid(`${API}/deploy/v1`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(manifest) });
|
|
88
88
|
const result = await res.json();
|
|
89
89
|
if (!res.ok) { console.error(JSON.stringify({ status: "error", http: res.status, ...result })); process.exit(1); }
|
|
90
90
|
saveProject(result);
|
package/lib/message.mjs
CHANGED
package/lib/projects.mjs
CHANGED
|
@@ -59,7 +59,7 @@ async function setupPaidFetch() {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
async function quote() {
|
|
62
|
-
const res = await fetch(`${API}/
|
|
62
|
+
const res = await fetch(`${API}/tiers/v1`);
|
|
63
63
|
const data = await res.json();
|
|
64
64
|
if (!res.ok) { console.error(JSON.stringify({ status: "error", http: res.status, ...data })); process.exit(1); }
|
|
65
65
|
console.log(JSON.stringify(data, null, 2));
|
|
@@ -143,8 +143,10 @@ async function schema(projectId) {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
async function renew(projectId) {
|
|
146
|
+
const p = findProject(projectId);
|
|
147
|
+
const tier = p.tier || "prototype";
|
|
146
148
|
const fetchPaid = await setupPaidFetch();
|
|
147
|
-
const res = await fetchPaid(`${API}/
|
|
149
|
+
const res = await fetchPaid(`${API}/tiers/v1/renew/${tier}`, { method: "POST", headers: { "Content-Type": "application/json" } });
|
|
148
150
|
const data = await res.json();
|
|
149
151
|
if (!res.ok) { console.error(JSON.stringify({ status: "error", http: res.status, ...data })); process.exit(1); }
|
|
150
152
|
const projects = loadProjects();
|
package/lib/sites.mjs
CHANGED
package/package.json
CHANGED