@vm0/cli 1.13.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.
Files changed (2) hide show
  1. package/index.js +12 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -12089,7 +12089,7 @@ var initContract = () => {
12089
12089
  var c = initContract();
12090
12090
  var HelloRequestSchema = external_exports.object({
12091
12091
  name: external_exports.string().min(1).describe("Your name"),
12092
- language: external_exports.enum(["en", "zh", "ja", "es"]).optional().default("en").describe("Preferred language for greeting"),
12092
+ language: external_exports.enum(["en", "es", "fr", "de"]).optional().default("en").describe("Preferred language for greeting"),
12093
12093
  includeTime: external_exports.boolean().optional().default(false).describe("Include current time in response")
12094
12094
  });
12095
12095
  var HelloResponseSchema = external_exports.object({
@@ -12129,7 +12129,7 @@ var helloContract = c.router({
12129
12129
  name: external_exports.string().describe("Name to greet")
12130
12130
  }),
12131
12131
  query: external_exports.object({
12132
- lang: external_exports.enum(["en", "zh", "ja", "es"]).optional().describe("Language for greeting")
12132
+ lang: external_exports.enum(["en", "es", "fr", "de"]).optional().describe("Language for greeting")
12133
12133
  }),
12134
12134
  responses: {
12135
12135
  200: external_exports.object({
@@ -13474,7 +13474,10 @@ function formatBytes(bytes) {
13474
13474
  const i = Math.floor(Math.log(bytes) / Math.log(k));
13475
13475
  return `${(bytes / Math.pow(k, i)).toFixed(2)} ${sizes[i]}`;
13476
13476
  }
13477
- var pushCommand = new Command4().name("push").description("Push local files to cloud volume").action(async () => {
13477
+ var pushCommand = new Command4().name("push").description("Push local files to cloud volume").option(
13478
+ "-f, --force",
13479
+ "Force upload even if content unchanged (recreate archive)"
13480
+ ).action(async (options) => {
13478
13481
  try {
13479
13482
  const cwd = process.cwd();
13480
13483
  const config2 = await readStorageConfig(cwd);
@@ -13512,6 +13515,9 @@ var pushCommand = new Command4().name("push").description("Push local files to c
13512
13515
  const formData = new FormData();
13513
13516
  formData.append("name", config2.name);
13514
13517
  formData.append("type", "volume");
13518
+ if (options.force) {
13519
+ formData.append("force", "true");
13520
+ }
13515
13521
  formData.append(
13516
13522
  "file",
13517
13523
  new Blob([zipBuffer], { type: "application/zip" }),
@@ -13522,7 +13528,8 @@ var pushCommand = new Command4().name("push").description("Push local files to c
13522
13528
  });
13523
13529
  if (!response.ok) {
13524
13530
  const error43 = await response.json();
13525
- throw new Error(error43.error || "Upload failed");
13531
+ const message = error43.cause ? `${error43.error} (cause: ${error43.cause})` : error43.error || "Upload failed";
13532
+ throw new Error(message);
13526
13533
  }
13527
13534
  const result = await response.json();
13528
13535
  const shortVersion = result.versionId.slice(0, 8);
@@ -13981,7 +13988,7 @@ var artifactCommand = new Command10().name("artifact").description("Manage cloud
13981
13988
 
13982
13989
  // src/index.ts
13983
13990
  var program = new Command11();
13984
- program.name("vm0").description("VM0 CLI - A modern build tool").version("1.13.0");
13991
+ program.name("vm0").description("VM0 CLI - A modern build tool").version("1.15.0");
13985
13992
  program.command("hello").description("Say hello from the App").action(() => {
13986
13993
  console.log(chalk11.blue("Welcome to the VM0 CLI!"));
13987
13994
  console.log(chalk11.green(`Core says: ${FOO}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "1.13.0",
3
+ "version": "1.15.0",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",