@staff0rd/assist 0.1042.0 → 0.1042.2
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/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.1042.
|
|
9
|
+
version: "0.1042.2",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -24860,7 +24860,8 @@ function configGet(key, options2 = {}) {
|
|
|
24860
24860
|
);
|
|
24861
24861
|
}
|
|
24862
24862
|
function printValue(config, key, options2) {
|
|
24863
|
-
const value =
|
|
24863
|
+
const value = getNestedValue(config, key);
|
|
24864
|
+
if (value === void 0) return printUnset(key);
|
|
24864
24865
|
console.log(
|
|
24865
24866
|
formatOutput(options2.reveal ? value : maskConfigKeySecrets(key, value))
|
|
24866
24867
|
);
|
|
@@ -24868,28 +24869,20 @@ function printValue(config, key, options2) {
|
|
|
24868
24869
|
function formatOutput(value) {
|
|
24869
24870
|
return typeof value === "object" && value !== null ? JSON.stringify(value, null, 2) : String(value);
|
|
24870
24871
|
}
|
|
24871
|
-
function
|
|
24872
|
-
const value = getNestedValue(config, key);
|
|
24873
|
-
if (value === void 0) return exitKeyNotSet(key);
|
|
24874
|
-
return value;
|
|
24875
|
-
}
|
|
24876
|
-
function exitKeyNotSet(key) {
|
|
24877
|
-
for (const line of unsetLines(key)) console.error(line);
|
|
24878
|
-
process.exit(1);
|
|
24879
|
-
}
|
|
24880
|
-
function unsetLines(key) {
|
|
24872
|
+
function printUnset(key) {
|
|
24881
24873
|
const leaf = describeConfigLeaves(assistConfigSchema).find(
|
|
24882
24874
|
(candidate) => candidate.key === key
|
|
24883
24875
|
);
|
|
24884
|
-
if (!leaf)
|
|
24885
|
-
|
|
24886
|
-
|
|
24887
|
-
|
|
24888
|
-
|
|
24889
|
-
|
|
24876
|
+
if (!leaf) {
|
|
24877
|
+
console.error(chalk132.red(`Key "${key}" is not set`));
|
|
24878
|
+
process.exit(1);
|
|
24879
|
+
}
|
|
24880
|
+
console.log(
|
|
24881
|
+
leaf.defaultValue === void 0 ? `Key "${key}" is not set and has no schema default` : `Key "${key}" is not set; the schema default is ${formatConfigDefault(leaf)}`
|
|
24882
|
+
);
|
|
24890
24883
|
const help = configHelpForKey(key);
|
|
24891
|
-
if (help)
|
|
24892
|
-
|
|
24884
|
+
if (help) console.log(`${help.note}
|
|
24885
|
+
${chalk132.green(help.setter)}`);
|
|
24893
24886
|
}
|
|
24894
24887
|
|
|
24895
24888
|
// src/commands/config/configImportRepos.ts
|