trajectories-sh 1.14.0 → 1.15.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/cli.js CHANGED
@@ -76,24 +76,22 @@ async function uploadTrajectoryAction(directory, opts) {
76
76
  console.error(chalk.red(" \u2717 Not authenticated. Run: trajectories auth login"));
77
77
  process.exit(1);
78
78
  }
79
- if (opts.visibility === "public") {
80
- console.error(
81
- chalk.red(
82
- " \u2717 --visibility public is not allowed from the CLI.\n Upload as 'unlisted' or 'private', then flip visibility to public\n from the trajectory page on trajectories.sh."
79
+ if (opts.visibility) {
80
+ console.warn(
81
+ chalk.yellow(
82
+ " \u26A0 --visibility is deprecated and ignored \u2014 every upload is now unlisted.\n Change visibility from the trajectory page on trajectories.sh after upload."
83
83
  )
84
84
  );
85
- process.exit(1);
86
85
  }
87
86
  const slug = opts.slug ?? directory.replace(/\/+$/, "").split("/").pop();
88
87
  console.log(chalk.bold(`
89
88
  Uploading trajectory ${directory} \u2192 ${chalk.cyan(slug)}
90
89
  `));
91
90
  try {
92
- const { uploadJob } = await import("./upload-DKXZOGUF.js");
91
+ const { uploadJob } = await import("./upload-I7L5SPZB.js");
93
92
  const result = await uploadJob(directory, {
94
93
  slug,
95
- name: opts.name,
96
- visibility: opts.visibility
94
+ name: opts.name
97
95
  });
98
96
  console.log(chalk.green.bold("\n \u2713 Uploaded successfully!"));
99
97
  console.log(` Trials: ${result.nTrials}`);
@@ -230,11 +228,7 @@ async function deleteTrajectoryAction(url, opts) {
230
228
  }
231
229
  }
232
230
  var upload = program.command("upload").description("Upload trajectories or tasks");
233
- upload.command("trajectory <directory>").description("Upload a trajectory job directory").option("-s, --slug <slug>", "URL slug (default: directory name)").option("-n, --name <name>", "Display name (default: slug)").option(
234
- "-v, --visibility <vis>",
235
- "unlisted or private (use the UI to flip a trajectory to public after upload)",
236
- "private"
237
- ).action(uploadTrajectoryAction);
231
+ upload.command("trajectory <directory>").description("Upload a trajectory job directory (always uploaded as unlisted)").option("-s, --slug <slug>", "URL slug (default: directory name)").option("-n, --name <name>", "Display name (default: slug)").option("-v, --visibility <vis>", "(deprecated, ignored \u2014 set visibility in the UI)").action(uploadTrajectoryAction);
238
232
  upload.command("task <directory>").description("Upload a benchmark task directory").option("-n, --name <name>", "Task name (default: directory name)").option("-v, --visibility <vis>", "public or private", "public").action(uploadTaskAction);
239
233
  var download = program.command("download").description("Download trajectories");
240
234
  download.command("trajectory <url>").description("Download a trajectory job from trajectories.sh").option("-o, --output <dir>", "Output directory (default: slug name)").action(downloadTrajectoryAction);
@@ -295,7 +295,7 @@ function validateAtifFormat(dir) {
295
295
  async function uploadJob(dir, opts) {
296
296
  const slug = opts.slug ?? dir.replace(/\/+$/, "").split("/").pop();
297
297
  const name = opts.name ?? slug;
298
- const visibility = opts.visibility ?? "private";
298
+ const visibility = "unlisted";
299
299
  const validationErrors = validateAtifFormat(dir);
300
300
  if (validationErrors.length > 0) {
301
301
  throw new Error(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trajectories-sh",
3
- "version": "1.14.0",
3
+ "version": "1.15.0",
4
4
  "description": "CLI for uploading trajectory jobs to trajectories.sh",
5
5
  "type": "module",
6
6
  "bin": {