@qaecy/cue-cli 0.0.9 → 0.0.11
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/main.js +14 -1
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -4743,6 +4743,8 @@ var init_worker_pool = __esm({
|
|
|
4743
4743
|
|
|
4744
4744
|
// apps/desktop/cue-cli/src/main.ts
|
|
4745
4745
|
var import_commander = require("commander");
|
|
4746
|
+
var import_fs12 = require("fs");
|
|
4747
|
+
var import_path7 = require("path");
|
|
4746
4748
|
|
|
4747
4749
|
// apps/desktop/cue-cli/src/cue-cli-artefacts.ts
|
|
4748
4750
|
var import_fs3 = require("fs");
|
|
@@ -8471,8 +8473,19 @@ async function syncHandler(options) {
|
|
|
8471
8473
|
}
|
|
8472
8474
|
|
|
8473
8475
|
// apps/desktop/cue-cli/src/main.ts
|
|
8476
|
+
var packageJson;
|
|
8477
|
+
try {
|
|
8478
|
+
packageJson = JSON.parse((0, import_fs12.readFileSync)((0, import_path7.join)(__dirname, "package.json"), "utf8"));
|
|
8479
|
+
} catch {
|
|
8480
|
+
try {
|
|
8481
|
+
packageJson = JSON.parse((0, import_fs12.readFileSync)((0, import_path7.join)(__dirname, "../package.json"), "utf8"));
|
|
8482
|
+
} catch {
|
|
8483
|
+
packageJson = { version: "0.0.0" };
|
|
8484
|
+
console.warn("Could not find package.json, using fallback version");
|
|
8485
|
+
}
|
|
8486
|
+
}
|
|
8474
8487
|
var program = new import_commander.Command();
|
|
8475
|
-
program.name("cue-cli").description("Cue Command Line Interface").version(
|
|
8488
|
+
program.name("cue-cli").description("Cue Command Line Interface").version(packageJson.version);
|
|
8476
8489
|
program.command("sync").description("Sync files to Cue").requiredOption("-s, --space <id>", "Specify the space ID (required)").requiredOption("-p, --path <id>", "Specify the folder path (required)").option("-k, --key <api-key>", "Specify the API key (or set CUE_API_KEY env variable)").option("--provider <provider ID>", "Specify the provider ID (eg. sharepoint, drive, dropbox) or leave empty for default provider", "").option("-v, --verbose", "Enable verbose output", false).option("-e, --emulators", "Uses emulators for sync", false).option("-z, --zip", 'Include zipped content (will be unzipped to path "<zip_path>_unzipped". Max uncompressed size: 500 MB, max recursion depth: 3)', false).action(syncHandler);
|
|
8477
8490
|
program.command("dump").description("Dump Cue Knowledge Graph data to file\n Examples:\n $ cue-cli dump -s <space_id> -l -v\n $ cue-cli dump -s <space_id> -j -v").requiredOption("-s, --space <id>", "Specify the space ID (required)").option("-k, --key <api-key>", "Specify the API key (or set CUE_API_KEY env variable)").option("-v, --verbose", "Enable verbose output", false).option("-e, --emulators", "Uses emulators for sync", false).option("-q, --query", "Uses a construct query to get the dump rather than using the /data endpoint", false).option("-j, --jelly", "Downloads a Jelly file rather than the standard Gzipped NQuads format", false).option("-l, --load", "Loads the dumped file into a local triplestore (requires emulators)", false).action(dumpHandler);
|
|
8478
8491
|
program.command("compare").description("Compares folder content to files already updated to Cue").requiredOption("-s, --space <id>", "Specify the space ID (required)").requiredOption("-p, --path <id>", "Specify the folder path (required)").option("-k, --key <api-key>", "Specify the API key (or set CUE_API_KEY env variable)").option("--provider <provider ID>", "Specify the provider ID (eg. sharepoint, drive, dropbox) or leave empty for default provider", "").option("-v, --verbose", "Enable verbose output", false).option("-e, --emulators", "Uses emulators for sync", false).option("-z, --zip", "Include zipped content (will temporarily unzip files with same logic as when syncing and delete them again after the comparison)", false).action(compareHandler);
|