@qaecy/cue-cli 0.0.40 → 0.0.42
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 +31 -4
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -8099,7 +8099,16 @@ WHERE {
|
|
|
8099
8099
|
qcy:dateCreated ?created ;
|
|
8100
8100
|
qcy:filePath ?fp .
|
|
8101
8101
|
}`;
|
|
8102
|
-
|
|
8102
|
+
let res;
|
|
8103
|
+
try {
|
|
8104
|
+
res = await graph.query(q, "application/sparql-results+json");
|
|
8105
|
+
} catch (err) {
|
|
8106
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
8107
|
+
if (msg.includes("HTTP 500")) {
|
|
8108
|
+
throw new Error("GRAPH_UNAVAILABLE: The knowledge graph for this project has no database configured. Contact your administrator or check the project setup.");
|
|
8109
|
+
}
|
|
8110
|
+
throw err;
|
|
8111
|
+
}
|
|
8103
8112
|
const map = {};
|
|
8104
8113
|
if (typeof res === "string")
|
|
8105
8114
|
return map;
|
|
@@ -9298,7 +9307,7 @@ async function syncHandler(options) {
|
|
|
9298
9307
|
}
|
|
9299
9308
|
if (preview.creditsToConsume > preview.creditsAvailable) {
|
|
9300
9309
|
console.error(
|
|
9301
|
-
`Insufficient credits: ${Math.round(preview.creditsToConsume)} required, ${Math.round(preview.creditsAvailable)} available.`
|
|
9310
|
+
`Insufficient credits: ${Math.round(preview.creditsToConsume)} required, ${Math.round(preview.creditsAvailable)} available. Contact the QAECY sales team at mail@qaecy.com to top up credits.`
|
|
9302
9311
|
);
|
|
9303
9312
|
process.exit(1);
|
|
9304
9313
|
}
|
|
@@ -9338,7 +9347,9 @@ async function syncHandler(options) {
|
|
|
9338
9347
|
process.exit(0);
|
|
9339
9348
|
} catch (err) {
|
|
9340
9349
|
const msg = err instanceof Error ? err.message : String(err);
|
|
9341
|
-
if (msg.includes("
|
|
9350
|
+
if (msg.includes("GRAPH_UNAVAILABLE")) {
|
|
9351
|
+
console.error("The knowledge graph for this project has no database configured. Contact your administrator or check the project setup.");
|
|
9352
|
+
} else if (msg.includes("GRAPH_TIMEOUT")) {
|
|
9342
9353
|
console.error("Could not reach the knowledge graph. Make sure all required services are running.");
|
|
9343
9354
|
} else if (msg.includes("METADATA_SYNC_FAILED")) {
|
|
9344
9355
|
console.error("Metadata sync failed. Try again.");
|
|
@@ -9536,7 +9547,17 @@ Triples only in file 2 (${result.triplesOnlyInFile2.size}):`);
|
|
|
9536
9547
|
// apps/desktop/cue-cli/src/cue-cli-create-project.ts
|
|
9537
9548
|
var readline2 = __toESM(require("readline"));
|
|
9538
9549
|
function ask(rl, question) {
|
|
9539
|
-
return new Promise((resolve2
|
|
9550
|
+
return new Promise((resolve2, reject) => {
|
|
9551
|
+
try {
|
|
9552
|
+
rl.question(question, (answer) => resolve2(answer.trim()));
|
|
9553
|
+
} catch (err) {
|
|
9554
|
+
if (err.code === "ERR_USE_AFTER_CLOSE") {
|
|
9555
|
+
reject(new Error("INPUT_CLOSED"));
|
|
9556
|
+
} else {
|
|
9557
|
+
reject(err);
|
|
9558
|
+
}
|
|
9559
|
+
}
|
|
9560
|
+
});
|
|
9540
9561
|
}
|
|
9541
9562
|
async function pickOne(rl, label, items, display) {
|
|
9542
9563
|
console.log(`
|
|
@@ -9748,6 +9769,12 @@ Set all selected members as syncers as well? (Y/n): `);
|
|
|
9748
9769
|
Project created \u2705`);
|
|
9749
9770
|
console.log(` ID : ${created["id"]}`);
|
|
9750
9771
|
console.log(` Name : ${created["name"]}`);
|
|
9772
|
+
} catch (err) {
|
|
9773
|
+
if (err.message === "INPUT_CLOSED") {
|
|
9774
|
+
console.error("Aborted: input stream closed before all prompts were answered.");
|
|
9775
|
+
process.exit(1);
|
|
9776
|
+
}
|
|
9777
|
+
throw err;
|
|
9751
9778
|
} finally {
|
|
9752
9779
|
rl.close();
|
|
9753
9780
|
}
|