trajectories-sh 1.18.5 → 1.18.6
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/cli.js
CHANGED
|
@@ -98,7 +98,7 @@ async function uploadTrajectoryAction(pathArg, opts) {
|
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
100
|
if (isZip) {
|
|
101
|
-
const { uploadZip } = await import("./upload-
|
|
101
|
+
const { uploadZip } = await import("./upload-CW5V2QSS.js");
|
|
102
102
|
const slug2 = opts.slug ?? pathArg.replace(/\.zip$/i, "").replace(/\/+$/, "").split("/").pop();
|
|
103
103
|
console.log(chalk.bold(`
|
|
104
104
|
Uploading ZIP ${pathArg} \u2192 ${chalk.cyan(slug2)}
|
|
@@ -127,7 +127,7 @@ async function uploadTrajectoryAction(pathArg, opts) {
|
|
|
127
127
|
Uploading trajectory ${pathArg} \u2192 ${chalk.cyan(slug)}
|
|
128
128
|
`));
|
|
129
129
|
try {
|
|
130
|
-
const { uploadJob } = await import("./upload-
|
|
130
|
+
const { uploadJob } = await import("./upload-CW5V2QSS.js");
|
|
131
131
|
const result = await uploadJob(pathArg, {
|
|
132
132
|
slug,
|
|
133
133
|
name: opts.name
|
|
@@ -61,7 +61,7 @@ async function uploadZip(zipPath, opts) {
|
|
|
61
61
|
if (!auth) throw new Error("Not authenticated. Run: trajectories auth login");
|
|
62
62
|
const apiUrl = getApiUrl();
|
|
63
63
|
console.log(" Requesting upload URL...");
|
|
64
|
-
const urlResp = await fetch(`${apiUrl}/api/cli/push
|
|
64
|
+
const urlResp = await fetch(`${apiUrl}/api/cli/push-zip/upload-url`, {
|
|
65
65
|
method: "POST",
|
|
66
66
|
headers: { Authorization: auth, "Content-Type": "application/json" },
|
|
67
67
|
body: "{}",
|
|
@@ -85,7 +85,7 @@ async function uploadZip(zipPath, opts) {
|
|
|
85
85
|
}
|
|
86
86
|
console.log(" ZIP uploaded to storage.");
|
|
87
87
|
console.log(" Enqueuing for server-side extraction...");
|
|
88
|
-
const enqueueResp = await fetch(`${apiUrl}/api/cli/push
|
|
88
|
+
const enqueueResp = await fetch(`${apiUrl}/api/cli/push-zip/enqueue`, {
|
|
89
89
|
method: "POST",
|
|
90
90
|
headers: { Authorization: auth, "Content-Type": "application/json" },
|
|
91
91
|
body: JSON.stringify({
|
|
@@ -104,7 +104,7 @@ async function uploadZip(zipPath, opts) {
|
|
|
104
104
|
let lastStatus = "";
|
|
105
105
|
while (true) {
|
|
106
106
|
await new Promise((r) => setTimeout(r, 5e3));
|
|
107
|
-
const statusResp = await fetch(`${apiUrl}/api/cli/push
|
|
107
|
+
const statusResp = await fetch(`${apiUrl}/api/cli/push-zip/${task_id}/status`, {
|
|
108
108
|
headers: { Authorization: auth },
|
|
109
109
|
signal: AbortSignal.timeout(3e4)
|
|
110
110
|
});
|