@vm0/cli 1.14.0 → 1.16.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/index.js +15 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -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").
|
|
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" }),
|
|
@@ -13801,7 +13807,10 @@ function formatBytes3(bytes) {
|
|
|
13801
13807
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
13802
13808
|
return `${(bytes / Math.pow(k, i)).toFixed(2)} ${sizes[i]}`;
|
|
13803
13809
|
}
|
|
13804
|
-
var pushCommand2 = new Command8().name("push").description("Push local files to cloud artifact").
|
|
13810
|
+
var pushCommand2 = new Command8().name("push").description("Push local files to cloud artifact").option(
|
|
13811
|
+
"-f, --force",
|
|
13812
|
+
"Force upload even if content unchanged (recreate archive)"
|
|
13813
|
+
).action(async (options) => {
|
|
13805
13814
|
try {
|
|
13806
13815
|
const cwd = process.cwd();
|
|
13807
13816
|
const config2 = await readStorageConfig(cwd);
|
|
@@ -13848,6 +13857,9 @@ var pushCommand2 = new Command8().name("push").description("Push local files to
|
|
|
13848
13857
|
const formData = new FormData();
|
|
13849
13858
|
formData.append("name", config2.name);
|
|
13850
13859
|
formData.append("type", "artifact");
|
|
13860
|
+
if (options.force) {
|
|
13861
|
+
formData.append("force", "true");
|
|
13862
|
+
}
|
|
13851
13863
|
formData.append(
|
|
13852
13864
|
"file",
|
|
13853
13865
|
new Blob([zipBuffer], { type: "application/zip" }),
|
|
@@ -13982,7 +13994,7 @@ var artifactCommand = new Command10().name("artifact").description("Manage cloud
|
|
|
13982
13994
|
|
|
13983
13995
|
// src/index.ts
|
|
13984
13996
|
var program = new Command11();
|
|
13985
|
-
program.name("vm0").description("VM0 CLI - A modern build tool").version("1.
|
|
13997
|
+
program.name("vm0").description("VM0 CLI - A modern build tool").version("1.16.0");
|
|
13986
13998
|
program.command("hello").description("Say hello from the App").action(() => {
|
|
13987
13999
|
console.log(chalk11.blue("Welcome to the VM0 CLI!"));
|
|
13988
14000
|
console.log(chalk11.green(`Core says: ${FOO}`));
|