@bemoje/cli 0.1.26 → 0.1.27
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/cjs/index.d.ts +1 -25
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js +3 -26
- package/cjs/index.js.map +1 -1
- package/cjs/lib/autostudy.d.ts +2 -0
- package/cjs/lib/autostudy.d.ts.map +1 -0
- package/cjs/lib/autostudy.js +33 -0
- package/cjs/lib/autostudy.js.map +1 -0
- package/cjs/lib/core/assertValidOptions.d.ts +3 -0
- package/cjs/lib/core/assertValidOptions.d.ts.map +1 -0
- package/cjs/lib/core/assertValidOptions.js +32 -0
- package/cjs/lib/core/assertValidOptions.js.map +1 -0
- package/cjs/lib/core/defaultParams.d.ts +4 -0
- package/cjs/lib/core/defaultParams.d.ts.map +1 -0
- package/cjs/lib/core/defaultParams.js +18 -0
- package/cjs/lib/core/defaultParams.js.map +1 -0
- package/cjs/lib/core/ensureEnglish.d.ts +3 -0
- package/cjs/lib/core/ensureEnglish.d.ts.map +1 -0
- package/cjs/lib/core/ensureEnglish.js +15 -0
- package/cjs/lib/core/ensureEnglish.js.map +1 -0
- package/cjs/lib/core/pdfParser.d.ts +2 -0
- package/cjs/lib/core/pdfParser.d.ts.map +1 -0
- package/cjs/lib/core/pdfParser.js +19 -0
- package/cjs/lib/core/pdfParser.js.map +1 -0
- package/cjs/lib/core/renderMarkdown.d.ts +3 -0
- package/cjs/lib/core/renderMarkdown.d.ts.map +1 -0
- package/cjs/lib/core/renderMarkdown.js +32 -0
- package/cjs/lib/core/renderMarkdown.js.map +1 -0
- package/cjs/lib/core/study.d.ts +7 -0
- package/cjs/lib/core/study.d.ts.map +1 -0
- package/cjs/lib/core/study.js +33 -0
- package/cjs/lib/core/study.js.map +1 -0
- package/cjs/lib/core/studySelections.d.ts +7 -0
- package/cjs/lib/core/studySelections.d.ts.map +1 -0
- package/cjs/lib/core/studySelections.js +30 -0
- package/cjs/lib/core/studySelections.js.map +1 -0
- package/cjs/lib/core/writeMarkdownFileResult.d.ts +6 -0
- package/cjs/lib/core/writeMarkdownFileResult.d.ts.map +1 -0
- package/cjs/lib/core/writeMarkdownFileResult.js +22 -0
- package/cjs/lib/core/writeMarkdownFileResult.js.map +1 -0
- package/cjs/lib/gpt/determineLanguage.d.ts +3 -0
- package/cjs/lib/gpt/determineLanguage.d.ts.map +1 -0
- package/cjs/lib/gpt/determineLanguage.js +16 -0
- package/cjs/lib/gpt/determineLanguage.js.map +1 -0
- package/cjs/lib/gpt/getAnswer.d.ts +4 -0
- package/cjs/lib/gpt/getAnswer.d.ts.map +1 -0
- package/cjs/lib/gpt/getAnswer.js +17 -0
- package/cjs/lib/gpt/getAnswer.js.map +1 -0
- package/cjs/lib/gpt/getConcepts.d.ts +4 -0
- package/cjs/lib/gpt/getConcepts.d.ts.map +1 -0
- package/cjs/lib/gpt/getConcepts.js +17 -0
- package/cjs/lib/gpt/getConcepts.js.map +1 -0
- package/cjs/lib/gpt/getSummary.d.ts +4 -0
- package/cjs/lib/gpt/getSummary.d.ts.map +1 -0
- package/cjs/lib/gpt/getSummary.js +17 -0
- package/cjs/lib/gpt/getSummary.js.map +1 -0
- package/cjs/lib/gpt/translateDaToEn.d.ts +3 -0
- package/cjs/lib/gpt/translateDaToEn.d.ts.map +1 -0
- package/cjs/lib/gpt/translateDaToEn.js +14 -0
- package/cjs/lib/gpt/translateDaToEn.js.map +1 -0
- package/cjs/lib/main.d.ts +2 -0
- package/cjs/lib/main.d.ts.map +1 -0
- package/cjs/lib/main.js +9 -0
- package/cjs/lib/main.js.map +1 -0
- package/cjs/lib/templates/getArticleConfigTemplate.d.ts +3 -0
- package/cjs/lib/templates/getArticleConfigTemplate.d.ts.map +1 -0
- package/cjs/lib/templates/getArticleConfigTemplate.js +28 -0
- package/cjs/lib/templates/getArticleConfigTemplate.js.map +1 -0
- package/cjs/lib/templates/getBookConfigTemplate.d.ts +3 -0
- package/cjs/lib/templates/getBookConfigTemplate.d.ts.map +1 -0
- package/cjs/lib/templates/getBookConfigTemplate.js +35 -0
- package/cjs/lib/templates/getBookConfigTemplate.js.map +1 -0
- package/cjs/lib/types.d.ts +37 -0
- package/cjs/lib/types.d.ts.map +1 -0
- package/cjs/{types/IConfig.js → lib/types.js} +1 -1
- package/cjs/lib/types.js.map +1 -0
- package/package.json +1 -1
- package/cjs/arg/ArgumentBuilder.d.ts +0 -23
- package/cjs/arg/ArgumentBuilder.d.ts.map +0 -1
- package/cjs/arg/ArgumentBuilder.js +0 -52
- package/cjs/arg/ArgumentBuilder.js.map +0 -1
- package/cjs/arg/ArgumentParserSelector.d.ts +0 -9
- package/cjs/arg/ArgumentParserSelector.d.ts.map +0 -1
- package/cjs/arg/ArgumentParserSelector.js +0 -15
- package/cjs/arg/ArgumentParserSelector.js.map +0 -1
- package/cjs/arg/ArgumentReader.d.ts +0 -15
- package/cjs/arg/ArgumentReader.d.ts.map +0 -1
- package/cjs/arg/ArgumentReader.js +0 -38
- package/cjs/arg/ArgumentReader.js.map +0 -1
- package/cjs/arg/ArgumentValidatorSelector.d.ts +0 -8
- package/cjs/arg/ArgumentValidatorSelector.d.ts.map +0 -1
- package/cjs/arg/ArgumentValidatorSelector.js +0 -16
- package/cjs/arg/ArgumentValidatorSelector.js.map +0 -1
- package/cjs/cmd/CommandBuilder.d.ts +0 -410
- package/cjs/cmd/CommandBuilder.d.ts.map +0 -1
- package/cjs/cmd/CommandBuilder.js +0 -1277
- package/cjs/cmd/CommandBuilder.js.map +0 -1
- package/cjs/cmd/CommandBuilderMetaData.d.ts +0 -26
- package/cjs/cmd/CommandBuilderMetaData.d.ts.map +0 -1
- package/cjs/cmd/CommandBuilderMetaData.js +0 -45
- package/cjs/cmd/CommandBuilderMetaData.js.map +0 -1
- package/cjs/cmd/CommandFeatureSelector.d.ts +0 -80
- package/cjs/cmd/CommandFeatureSelector.d.ts.map +0 -1
- package/cjs/cmd/CommandFeatureSelector.js +0 -114
- package/cjs/cmd/CommandFeatureSelector.js.map +0 -1
- package/cjs/cmd/DefaultHelpConfig.d.ts +0 -29
- package/cjs/cmd/DefaultHelpConfig.d.ts.map +0 -1
- package/cjs/cmd/DefaultHelpConfig.js +0 -177
- package/cjs/cmd/DefaultHelpConfig.js.map +0 -1
- package/cjs/cmd/commanderBackRefs.d.ts +0 -10
- package/cjs/cmd/commanderBackRefs.d.ts.map +0 -1
- package/cjs/cmd/commanderBackRefs.js +0 -38
- package/cjs/cmd/commanderBackRefs.js.map +0 -1
- package/cjs/core/OutputManager.d.ts +0 -64
- package/cjs/core/OutputManager.d.ts.map +0 -1
- package/cjs/core/OutputManager.js +0 -92
- package/cjs/core/OutputManager.js.map +0 -1
- package/cjs/core/ParserSelector.d.ts +0 -23
- package/cjs/core/ParserSelector.d.ts.map +0 -1
- package/cjs/core/ParserSelector.js +0 -46
- package/cjs/core/ParserSelector.js.map +0 -1
- package/cjs/core/ValidatorSelector.d.ts +0 -19
- package/cjs/core/ValidatorSelector.d.ts.map +0 -1
- package/cjs/core/ValidatorSelector.js +0 -42
- package/cjs/core/ValidatorSelector.js.map +0 -1
- package/cjs/core/splitCombinedArgvShorts.d.ts +0 -2
- package/cjs/core/splitCombinedArgvShorts.d.ts.map +0 -1
- package/cjs/core/splitCombinedArgvShorts.js +0 -15
- package/cjs/core/splitCombinedArgvShorts.js.map +0 -1
- package/cjs/db/AbstractJsonFileSection.d.ts +0 -136
- package/cjs/db/AbstractJsonFileSection.d.ts.map +0 -1
- package/cjs/db/AbstractJsonFileSection.js +0 -190
- package/cjs/db/AbstractJsonFileSection.js.map +0 -1
- package/cjs/db/AppDataSection.d.ts +0 -31
- package/cjs/db/AppDataSection.d.ts.map +0 -1
- package/cjs/db/AppDataSection.js +0 -49
- package/cjs/db/AppDataSection.js.map +0 -1
- package/cjs/db/ConfigSection.d.ts +0 -46
- package/cjs/db/ConfigSection.d.ts.map +0 -1
- package/cjs/db/ConfigSection.js +0 -71
- package/cjs/db/ConfigSection.js.map +0 -1
- package/cjs/db/JsonFile.d.ts +0 -36
- package/cjs/db/JsonFile.d.ts.map +0 -1
- package/cjs/db/JsonFile.js +0 -60
- package/cjs/db/JsonFile.js.map +0 -1
- package/cjs/db/PresetsSection.d.ts +0 -45
- package/cjs/db/PresetsSection.d.ts.map +0 -1
- package/cjs/db/PresetsSection.js +0 -82
- package/cjs/db/PresetsSection.js.map +0 -1
- package/cjs/opt/OptionArgumentParserSelector.d.ts +0 -8
- package/cjs/opt/OptionArgumentParserSelector.d.ts.map +0 -1
- package/cjs/opt/OptionArgumentParserSelector.js +0 -16
- package/cjs/opt/OptionArgumentParserSelector.js.map +0 -1
- package/cjs/opt/OptionArgumentValidatorSelector.d.ts +0 -8
- package/cjs/opt/OptionArgumentValidatorSelector.d.ts.map +0 -1
- package/cjs/opt/OptionArgumentValidatorSelector.js +0 -19
- package/cjs/opt/OptionArgumentValidatorSelector.js.map +0 -1
- package/cjs/opt/OptionBuilder.d.ts +0 -32
- package/cjs/opt/OptionBuilder.d.ts.map +0 -1
- package/cjs/opt/OptionBuilder.js +0 -97
- package/cjs/opt/OptionBuilder.js.map +0 -1
- package/cjs/opt/OptionHelpers.d.ts +0 -33
- package/cjs/opt/OptionHelpers.d.ts.map +0 -1
- package/cjs/opt/OptionHelpers.js +0 -57
- package/cjs/opt/OptionHelpers.js.map +0 -1
- package/cjs/opt/OptionReader.d.ts +0 -24
- package/cjs/opt/OptionReader.d.ts.map +0 -1
- package/cjs/opt/OptionReader.js +0 -66
- package/cjs/opt/OptionReader.js.map +0 -1
- package/cjs/types/IConfig.d.ts +0 -22
- package/cjs/types/IConfig.d.ts.map +0 -1
- package/cjs/types/IConfig.js.map +0 -1
- package/cjs/types/IPreset.d.ts +0 -15
- package/cjs/types/IPreset.d.ts.map +0 -1
- package/cjs/types/IPreset.js +0 -3
- package/cjs/types/IPreset.js.map +0 -1
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AbstractJsonFileSection = void 0;
|
|
4
|
-
const os_1 = require("@bemoje/os");
|
|
5
|
-
const fs_1 = require("@bemoje/fs");
|
|
6
|
-
/**
|
|
7
|
-
* A class that represents a section of the JSON file used as a simple database.
|
|
8
|
-
*/
|
|
9
|
-
class AbstractJsonFileSection {
|
|
10
|
-
file;
|
|
11
|
-
name;
|
|
12
|
-
keysAreFixed;
|
|
13
|
-
/**
|
|
14
|
-
* Indicates whether the section has been initialized.
|
|
15
|
-
*/
|
|
16
|
-
isInitialized = false;
|
|
17
|
-
/**
|
|
18
|
-
* The default values for the section.
|
|
19
|
-
*/
|
|
20
|
-
defaultValues = {};
|
|
21
|
-
/**
|
|
22
|
-
* The base string used as a prefix for the section.
|
|
23
|
-
*/
|
|
24
|
-
prefixBaseString;
|
|
25
|
-
/**
|
|
26
|
-
* Creates an instance of AbstractJsonFileSection.
|
|
27
|
-
* @param file - The parent JsonFile instance.
|
|
28
|
-
* @param name - The name of the section.
|
|
29
|
-
* @param keysAreFixed - Indicates whether the keys in the section are fixed.
|
|
30
|
-
*/
|
|
31
|
-
constructor(file, name, keysAreFixed) {
|
|
32
|
-
this.file = file;
|
|
33
|
-
this.name = name;
|
|
34
|
-
this.keysAreFixed = keysAreFixed;
|
|
35
|
-
this.prefixBaseString = file.cmd.getPrefixArray().join('_');
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* The JsonDB associated with the section.
|
|
39
|
-
*/
|
|
40
|
-
get db() {
|
|
41
|
-
return this.file.db;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* The CommandBuilder associated with the section.
|
|
45
|
-
*/
|
|
46
|
-
get cmd() {
|
|
47
|
-
return this.file.cmd;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Saves the section.
|
|
51
|
-
* @returns A promise that resolves when the section is saved.
|
|
52
|
-
*/
|
|
53
|
-
async save() {
|
|
54
|
-
return await this.db.save();
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Gets the object path prefix as dot-separated keys for this section of the JSON file database.
|
|
58
|
-
* @param key - An optional key to append to the prefix path.
|
|
59
|
-
* @returns The object path prefix.
|
|
60
|
-
* @throws An error if the keys are fixed and the specified key does not exist in the default values.
|
|
61
|
-
*/
|
|
62
|
-
prefix(key) {
|
|
63
|
-
if (this.keysAreFixed && key && !Object.hasOwn(this.defaultValues, key)) {
|
|
64
|
-
throw new Error(`No entry with key '${key}'`);
|
|
65
|
-
}
|
|
66
|
-
return this.prefixBaseString + '.' + this.name + (key ? '.' + key : '');
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Gets the value associated with the specified key.
|
|
70
|
-
* @param key - The key to get the value for.
|
|
71
|
-
* @returns The value associated with the key.
|
|
72
|
-
*/
|
|
73
|
-
get(key) {
|
|
74
|
-
this.initialize(false);
|
|
75
|
-
return this.db.getSafe(this.prefix(key)) ?? this.defaultValues[key];
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Gets all the values in the section.
|
|
79
|
-
* @returns All the values in the section.
|
|
80
|
-
*/
|
|
81
|
-
getAll() {
|
|
82
|
-
this.initialize(false);
|
|
83
|
-
return (this.db.getSafe(this.prefix()) ?? JSON.parse(JSON.stringify(this.defaultValues)));
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Gets the keys in the section.
|
|
87
|
-
* @returns The keys in the section.
|
|
88
|
-
*/
|
|
89
|
-
get keys() {
|
|
90
|
-
// if (this.keysAreFixed) return Object.keys(this.defaultValues)
|
|
91
|
-
return Object.keys(this.getAll());
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Gets the number of keys in the section.
|
|
95
|
-
* @returns The number of keys in the section.
|
|
96
|
-
*/
|
|
97
|
-
count() {
|
|
98
|
-
return this.keys.length;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Sets the value associated with the specified key.
|
|
102
|
-
* @param key - The key to set the value for.
|
|
103
|
-
* @param value - The value to set.
|
|
104
|
-
* @param save - Indicates whether to save the section after setting the value.
|
|
105
|
-
*/
|
|
106
|
-
set(key, value, save = true) {
|
|
107
|
-
this.initialize();
|
|
108
|
-
this.assertValid(key, value);
|
|
109
|
-
this.db.set(this.prefix(key), value, save);
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Sets all the values in the section.
|
|
113
|
-
* @param values - The values to set.
|
|
114
|
-
* @param save - Indicates whether to save the section after setting the values.
|
|
115
|
-
*/
|
|
116
|
-
setAll(values, save = true) {
|
|
117
|
-
const original = this.getAll();
|
|
118
|
-
for (const [key, value] of Object.entries(values)) {
|
|
119
|
-
if (value === original[key])
|
|
120
|
-
continue;
|
|
121
|
-
if (JSON.stringify(value) === JSON.stringify(original[key]))
|
|
122
|
-
continue;
|
|
123
|
-
this.set(key, value, false);
|
|
124
|
-
}
|
|
125
|
-
if (!this.keysAreFixed) {
|
|
126
|
-
for (const name of Object.keys(original)) {
|
|
127
|
-
if (Object.hasOwn(values, name))
|
|
128
|
-
continue;
|
|
129
|
-
this.delete(name, false);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
if (save)
|
|
133
|
-
this.save();
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Updates the value associated with the specified key.
|
|
137
|
-
* @param key - The key to set the value for.
|
|
138
|
-
* @param callback - The callback function that returns the new value.
|
|
139
|
-
* @param save - Indicates whether to save the section after setting the value.
|
|
140
|
-
*/
|
|
141
|
-
update(key, callback, save = true) {
|
|
142
|
-
this.set(key, callback(this.get(key), key), save);
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Resets the value associated with the specified key to its default value.
|
|
146
|
-
* @param key - The key to reset.
|
|
147
|
-
* @param save - Indicates whether to save the section after resetting the value.
|
|
148
|
-
*/
|
|
149
|
-
reset(key, save = true) {
|
|
150
|
-
this.set(key, this.defaultValues[key], save);
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Resets all the values in the section to their default values.
|
|
154
|
-
* @param save - Indicates whether to save the section after resetting the values.
|
|
155
|
-
*/
|
|
156
|
-
resetAll(save = true) {
|
|
157
|
-
this.setAll(this.defaultValues, save);
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Deletes the value associated with the specified key.
|
|
161
|
-
* @param key - The key to delete.
|
|
162
|
-
* @param save - Indicates whether to save the section after deleting the value.
|
|
163
|
-
*/
|
|
164
|
-
delete(key, save = true) {
|
|
165
|
-
this.initialize();
|
|
166
|
-
this.db.delete(this.prefix(key), save);
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Deletes all the values in the section.
|
|
170
|
-
* @param save - Indicates whether to save the section after deleting the values.
|
|
171
|
-
*/
|
|
172
|
-
deleteAll(save = true) {
|
|
173
|
-
for (const key of this.keys) {
|
|
174
|
-
this.delete(key, false);
|
|
175
|
-
}
|
|
176
|
-
if (save)
|
|
177
|
-
this.save();
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Edits the values in the section using a text editor.
|
|
181
|
-
* @param editor - The text editor to use. If not specified, the default text editor command will be used.
|
|
182
|
-
*/
|
|
183
|
-
edit(editor) {
|
|
184
|
-
const original = this.getAll();
|
|
185
|
-
const parsed = (0, fs_1.promptUserEditJsonInTextEditorSync)(original, editor || (0, os_1.defaultOpenInEditorCommand)());
|
|
186
|
-
this.setAll(parsed);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
exports.AbstractJsonFileSection = AbstractJsonFileSection;
|
|
190
|
-
//# sourceMappingURL=AbstractJsonFileSection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractJsonFileSection.js","sourceRoot":"","sources":["../../../../../packages/cli/src/db/AbstractJsonFileSection.ts"],"names":[],"mappings":";;;AACA,mCAAuD;AAEvD,mCAA+D;AAE/D;;GAEG;AACH,MAAsB,uBAAuB;IAsBtB;IAAmC;IAAiC;IArBzF;;OAEG;IACO,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KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE;YAC3B,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;SACxB;QACD,IAAI,IAAI;YAAE,IAAI,CAAC,IAAI,EAAE,CAAA;IACvB,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,MAAe;QAClB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,CAAA;QAC9B,MAAM,MAAM,GAAG,IAAA,uCAAkC,EAAC,QAAqB,EAAE,MAAM,IAAI,IAAA,+BAA0B,GAAE,CAAC,CAAA;QAChH,IAAI,CAAC,MAAM,CAAC,MAA6B,CAAC,CAAA;IAC5C,CAAC;CACF;AAhND,0DAgNC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { AbstractJsonFileSection } from './AbstractJsonFileSection';
|
|
2
|
-
import { JsonFile } from './JsonFile';
|
|
3
|
-
import { JsonValue } from '@bemoje/types';
|
|
4
|
-
/**
|
|
5
|
-
* A class that represents the appdata section of the JSON file used as simple database.
|
|
6
|
-
* This is intended for very simple and light-weight data, like simple counters, strings, etc.
|
|
7
|
-
*/
|
|
8
|
-
export declare class AppDataSection<Val extends JsonValue = JsonValue> extends AbstractJsonFileSection<Val> {
|
|
9
|
-
/**
|
|
10
|
-
* Creates an instance of AppDataSection.
|
|
11
|
-
* @param file - The parent JsonFile instance.
|
|
12
|
-
* @param name - The name of the section.
|
|
13
|
-
*/
|
|
14
|
-
constructor(file: JsonFile, name: string);
|
|
15
|
-
/**
|
|
16
|
-
* Does nothing
|
|
17
|
-
*/
|
|
18
|
-
assertValid(): void;
|
|
19
|
-
/**
|
|
20
|
-
* Defines a property for the section.
|
|
21
|
-
* @param key - The key of the property.
|
|
22
|
-
*/
|
|
23
|
-
defineProperty(key: string, value: Val): void;
|
|
24
|
-
/**
|
|
25
|
-
* Initializes the section.
|
|
26
|
-
* @param save - Indicates whether to save the section after initialization.
|
|
27
|
-
* @returns A string if an error occurred during initialization, otherwise void.
|
|
28
|
-
*/
|
|
29
|
-
initialize(save?: boolean): void;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=AppDataSection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AppDataSection.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/db/AppDataSection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzC;;;GAGG;AACH,qBAAa,cAAc,CAAC,GAAG,SAAS,SAAS,GAAG,SAAS,CAAE,SAAQ,uBAAuB,CAAC,GAAG,CAAC;IACjG;;;;OAIG;gBACS,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM;IAIxC;;OAEG;IACM,WAAW;IAIpB;;;OAGG;IACM,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;IAM/C;;;;OAIG;IACM,UAAU,CAAC,IAAI,UAAQ;CAMjC"}
|
package/cjs/db/AppDataSection.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppDataSection = void 0;
|
|
4
|
-
const AbstractJsonFileSection_1 = require("./AbstractJsonFileSection");
|
|
5
|
-
/**
|
|
6
|
-
* A class that represents the appdata section of the JSON file used as simple database.
|
|
7
|
-
* This is intended for very simple and light-weight data, like simple counters, strings, etc.
|
|
8
|
-
*/
|
|
9
|
-
class AppDataSection extends AbstractJsonFileSection_1.AbstractJsonFileSection {
|
|
10
|
-
/**
|
|
11
|
-
* Creates an instance of AppDataSection.
|
|
12
|
-
* @param file - The parent JsonFile instance.
|
|
13
|
-
* @param name - The name of the section.
|
|
14
|
-
*/
|
|
15
|
-
constructor(file, name) {
|
|
16
|
-
super(file, name, false);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Does nothing
|
|
20
|
-
*/
|
|
21
|
-
assertValid() {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Defines a property for the section.
|
|
26
|
-
* @param key - The key of the property.
|
|
27
|
-
*/
|
|
28
|
-
defineProperty(key, value) {
|
|
29
|
-
if (typeof value === 'object')
|
|
30
|
-
value = JSON.parse(JSON.stringify(value));
|
|
31
|
-
this.defaultValues[key] = value;
|
|
32
|
-
this.isInitialized = false;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Initializes the section.
|
|
36
|
-
* @param save - Indicates whether to save the section after initialization.
|
|
37
|
-
* @returns A string if an error occurred during initialization, otherwise void.
|
|
38
|
-
*/
|
|
39
|
-
initialize(save = false) {
|
|
40
|
-
if (this.isInitialized)
|
|
41
|
-
return;
|
|
42
|
-
const data = this.db.getSafe(this.prefix());
|
|
43
|
-
if (!data)
|
|
44
|
-
this.db.set(this.prefix(), this.defaultValues, save);
|
|
45
|
-
this.isInitialized = true;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
exports.AppDataSection = AppDataSection;
|
|
49
|
-
//# sourceMappingURL=AppDataSection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AppDataSection.js","sourceRoot":"","sources":["../../../../../packages/cli/src/db/AppDataSection.ts"],"names":[],"mappings":";;;AAAA,uEAAmE;AAInE;;;GAGG;AACH,MAAa,cAAkD,SAAQ,iDAA4B;IACjG;;;;OAIG;IACH,YAAY,IAAc,EAAE,IAAY;QACtC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;IAC1B,CAAC;IAED;;OAEG;IACM,WAAW;QAClB,OAAM;IACR,CAAC;IAED;;;OAGG;IACM,cAAc,CAAC,GAAW,EAAE,KAAU;QAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAQ,CAAA;QAC/E,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;QAC/B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAA;IAC5B,CAAC;IAED;;;;OAIG;IACM,UAAU,CAAC,IAAI,GAAG,KAAK;QAC9B,IAAI,IAAI,CAAC,aAAa;YAAE,OAAM;QAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAsB,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;QAChE,IAAI,CAAC,IAAI;YAAE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CAAA;QAC/D,IAAI,CAAC,aAAa,GAAG,IAAI,CAAA;IAC3B,CAAC;CACF;AAtCD,wCAsCC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { AbstractJsonFileSection } from './AbstractJsonFileSection';
|
|
2
|
-
import { IConfig } from '../types/IConfig';
|
|
3
|
-
import { JsonFile } from './JsonFile';
|
|
4
|
-
import { JsonValue, TStringParser, TValidator } from '@bemoje/types';
|
|
5
|
-
/**
|
|
6
|
-
* A class that represents the user-config section of the JSON file used as simple database.
|
|
7
|
-
*/
|
|
8
|
-
export declare class ConfigSection<Val extends JsonValue = JsonValue> extends AbstractJsonFileSection<Val> {
|
|
9
|
-
/**
|
|
10
|
-
* String parsers for when editing config from command-line.
|
|
11
|
-
*/
|
|
12
|
-
readonly parsers: Record<string, TStringParser<Val>>;
|
|
13
|
-
/**
|
|
14
|
-
* Descriptions for each property key.
|
|
15
|
-
*/
|
|
16
|
-
readonly descriptions: Record<string, string>;
|
|
17
|
-
/**
|
|
18
|
-
* Validators for each property key.
|
|
19
|
-
*/
|
|
20
|
-
readonly validators: Record<string, TValidator<Val>>;
|
|
21
|
-
/**
|
|
22
|
-
* Creates an instance of AbstractJsonFileSection.
|
|
23
|
-
* @param file - The parent JsonFile instance.
|
|
24
|
-
* @param name - The name of the section.
|
|
25
|
-
*/
|
|
26
|
-
constructor(file: JsonFile, name: string);
|
|
27
|
-
/**
|
|
28
|
-
* Asserts that a key-value pair is valid.
|
|
29
|
-
* @param key - The key to assert.
|
|
30
|
-
* @param value - The value to assert.
|
|
31
|
-
*/
|
|
32
|
-
assertValid(key: string, value: Val): void;
|
|
33
|
-
/**
|
|
34
|
-
* Defines a property for the section.
|
|
35
|
-
* @param key - The key of the property.
|
|
36
|
-
* @param options - The options for the property.
|
|
37
|
-
*/
|
|
38
|
-
defineProperty(key: string, options: IConfig<Val>): void;
|
|
39
|
-
/**
|
|
40
|
-
* Initializes the section.
|
|
41
|
-
* @param save - Indicates whether to save the section after initialization.
|
|
42
|
-
* @returns A string if an error occurred during initialization, otherwise void.
|
|
43
|
-
*/
|
|
44
|
-
initialize(save?: boolean): void;
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=ConfigSection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigSection.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/db/ConfigSection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAEnE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAGpE;;GAEG;AACH,qBAAa,aAAa,CAAC,GAAG,SAAS,SAAS,GAAG,SAAS,CAAE,SAAQ,uBAAuB,CAAC,GAAG,CAAC;IAChG;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC,CAAK;IAEzD;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAK;IAElD;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAK;IAEzD;;;;OAIG;gBACS,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM;IAIxC;;;;OAIG;IACM,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;IAK5C;;;;OAIG;IACM,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC;IAS1D;;;;OAIG;IACM,UAAU,CAAC,IAAI,UAAQ;CAOjC"}
|
package/cjs/db/ConfigSection.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConfigSection = void 0;
|
|
4
|
-
const AbstractJsonFileSection_1 = require("./AbstractJsonFileSection");
|
|
5
|
-
const is_1 = require("@bemoje/is");
|
|
6
|
-
const object_1 = require("@bemoje/object");
|
|
7
|
-
/**
|
|
8
|
-
* A class that represents the user-config section of the JSON file used as simple database.
|
|
9
|
-
*/
|
|
10
|
-
class ConfigSection extends AbstractJsonFileSection_1.AbstractJsonFileSection {
|
|
11
|
-
/**
|
|
12
|
-
* String parsers for when editing config from command-line.
|
|
13
|
-
*/
|
|
14
|
-
parsers = {};
|
|
15
|
-
/**
|
|
16
|
-
* Descriptions for each property key.
|
|
17
|
-
*/
|
|
18
|
-
descriptions = {};
|
|
19
|
-
/**
|
|
20
|
-
* Validators for each property key.
|
|
21
|
-
*/
|
|
22
|
-
validators = {};
|
|
23
|
-
/**
|
|
24
|
-
* Creates an instance of AbstractJsonFileSection.
|
|
25
|
-
* @param file - The parent JsonFile instance.
|
|
26
|
-
* @param name - The name of the section.
|
|
27
|
-
*/
|
|
28
|
-
constructor(file, name) {
|
|
29
|
-
super(file, name, true);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Asserts that a key-value pair is valid.
|
|
33
|
-
* @param key - The key to assert.
|
|
34
|
-
* @param value - The value to assert.
|
|
35
|
-
*/
|
|
36
|
-
assertValid(key, value) {
|
|
37
|
-
if (!this.validators[key])
|
|
38
|
-
return;
|
|
39
|
-
(0, is_1.ensureThat)(value, this.validators[key]);
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Defines a property for the section.
|
|
43
|
-
* @param key - The key of the property.
|
|
44
|
-
* @param options - The options for the property.
|
|
45
|
-
*/
|
|
46
|
-
defineProperty(key, options) {
|
|
47
|
-
const { description, defaultValue, parse, validate } = options;
|
|
48
|
-
this.descriptions[key] = description;
|
|
49
|
-
this.defaultValues[key] = typeof defaultValue === 'object' ? JSON.parse(JSON.stringify(defaultValue)) : defaultValue;
|
|
50
|
-
if (parse)
|
|
51
|
-
this.parsers[key] = parse;
|
|
52
|
-
if (validate)
|
|
53
|
-
this.validators[key] = validate;
|
|
54
|
-
this.assertValid(key, options.defaultValue);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Initializes the section.
|
|
58
|
-
* @param save - Indicates whether to save the section after initialization.
|
|
59
|
-
* @returns A string if an error occurred during initialization, otherwise void.
|
|
60
|
-
*/
|
|
61
|
-
initialize(save = false) {
|
|
62
|
-
if (this.isInitialized)
|
|
63
|
-
return;
|
|
64
|
-
const data = this.db.getSafe(this.prefix());
|
|
65
|
-
const result = (0, object_1.objAssign)({}, JSON.parse(JSON.stringify(this.defaultValues)), data || {});
|
|
66
|
-
this.db.set(this.prefix(), result, save);
|
|
67
|
-
this.isInitialized = true;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
exports.ConfigSection = ConfigSection;
|
|
71
|
-
//# sourceMappingURL=ConfigSection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
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,CAAC,YAAY,CAAC,CAAA;IAC7C,CAAC;IAED;;;;OAIG;IACM,UAAU,CAAC,IAAI,GAAG,KAAK;QAC9B,IAAI,IAAI,CAAC,aAAa;YAAE,OAAM;QAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAsB,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;QAChE,MAAM,MAAM,GAAG,IAAA,kBAAS,EAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,IAAI,EAAE,CAAC,CAAA;QACxF,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;QACxC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAA;IAC3B,CAAC;CACF;AA7DD,sCA6DC"}
|
package/cjs/db/JsonFile.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { AppDataSection } from './AppDataSection';
|
|
2
|
-
import { CommandBuilder } from '../cmd/CommandBuilder';
|
|
3
|
-
import { ConfigSection } from './ConfigSection';
|
|
4
|
-
import { JsonDB } from '@bemoje/jsondb';
|
|
5
|
-
import { PresetsSection } from './PresetsSection';
|
|
6
|
-
/**
|
|
7
|
-
* A class that represents the JSON file used as a simple database.
|
|
8
|
-
*/
|
|
9
|
-
export declare class JsonFile {
|
|
10
|
-
readonly cmd: CommandBuilder;
|
|
11
|
-
/**
|
|
12
|
-
* @param cmd The parent CommandBuilder instance.
|
|
13
|
-
*/
|
|
14
|
-
constructor(cmd: CommandBuilder);
|
|
15
|
-
/**
|
|
16
|
-
* A lazy-loaded instance of the JsonDB instance containing the data.
|
|
17
|
-
* Upon first property access, it is stored as a property on the instance.
|
|
18
|
-
* If the command is a subcommand, the root command's JsonDB instance is returned.
|
|
19
|
-
*/
|
|
20
|
-
get db(): JsonDB;
|
|
21
|
-
/**
|
|
22
|
-
* A lazy-loaded instance of the `config` section of the JSON file.
|
|
23
|
-
* Upon first property access, it is stored as a property on the instance.
|
|
24
|
-
*/
|
|
25
|
-
get config(): ConfigSection;
|
|
26
|
-
/**
|
|
27
|
-
* A lazy-loaded instance of the `appData` section of the JSON file.
|
|
28
|
-
* Upon first property access, it is stored as a property on the instance.
|
|
29
|
-
*/
|
|
30
|
-
get appData(): AppDataSection;
|
|
31
|
-
/**
|
|
32
|
-
* A lazy-loaded instance of the `presets` section of the JSON file.
|
|
33
|
-
*/
|
|
34
|
-
get presets(): PresetsSection;
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=JsonFile.d.ts.map
|
package/cjs/db/JsonFile.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"JsonFile.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/db/JsonFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGjD;;GAEG;AACH,qBAAa,QAAQ;IAIP,QAAQ,CAAC,GAAG,EAAE,cAAc;IAHxC;;OAEG;gBACkB,GAAG,EAAE,cAAc;IAExC;;;;OAIG;IACH,IAAI,EAAE,IAAI,MAAM,CAMf;IAED;;;OAGG;IACH,IAAI,MAAM,IAAI,aAAa,CAM1B;IAED;;;OAGG;IACH,IAAI,OAAO,IAAI,cAAc,CAE5B;IAED;;OAEG;IACH,IAAI,OAAO,IAAI,cAAc,CAE5B;CACF"}
|
package/cjs/db/JsonFile.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JsonFile = void 0;
|
|
4
|
-
const AppDataSection_1 = require("./AppDataSection");
|
|
5
|
-
const ConfigSection_1 = require("./ConfigSection");
|
|
6
|
-
const jsondb_1 = require("@bemoje/jsondb");
|
|
7
|
-
const PresetsSection_1 = require("./PresetsSection");
|
|
8
|
-
const object_1 = require("@bemoje/object");
|
|
9
|
-
/**
|
|
10
|
-
* A class that represents the JSON file used as a simple database.
|
|
11
|
-
*/
|
|
12
|
-
class JsonFile {
|
|
13
|
-
cmd;
|
|
14
|
-
/**
|
|
15
|
-
* @param cmd The parent CommandBuilder instance.
|
|
16
|
-
*/
|
|
17
|
-
constructor(cmd) {
|
|
18
|
-
this.cmd = cmd;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* A lazy-loaded instance of the JsonDB instance containing the data.
|
|
22
|
-
* Upon first property access, it is stored as a property on the instance.
|
|
23
|
-
* If the command is a subcommand, the root command's JsonDB instance is returned.
|
|
24
|
-
*/
|
|
25
|
-
get db() {
|
|
26
|
-
if (this.cmd.isRoot) {
|
|
27
|
-
return (0, object_1.realizeLazyProperty)(this, 'db', new jsondb_1.JsonDB(this.cmd.jsonFilepath, 2));
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
return (0, object_1.realizeLazyProperty)(this, 'db', this.cmd.root.db.db);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* A lazy-loaded instance of the `config` section of the JSON file.
|
|
35
|
-
* Upon first property access, it is stored as a property on the instance.
|
|
36
|
-
*/
|
|
37
|
-
get config() {
|
|
38
|
-
if (this.cmd.isRoot) {
|
|
39
|
-
return (0, object_1.realizeLazyProperty)(this, 'config', new ConfigSection_1.ConfigSection(this, 'config'));
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
return (0, object_1.realizeLazyProperty)(this, 'config', this.cmd.root.db.config);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* A lazy-loaded instance of the `appData` section of the JSON file.
|
|
47
|
-
* Upon first property access, it is stored as a property on the instance.
|
|
48
|
-
*/
|
|
49
|
-
get appData() {
|
|
50
|
-
return (0, object_1.realizeLazyProperty)(this, 'appData', new AppDataSection_1.AppDataSection(this, 'appData'));
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* A lazy-loaded instance of the `presets` section of the JSON file.
|
|
54
|
-
*/
|
|
55
|
-
get presets() {
|
|
56
|
-
return (0, object_1.realizeLazyProperty)(this, 'presets', new PresetsSection_1.PresetsSection(this, 'presets'));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.JsonFile = JsonFile;
|
|
60
|
-
//# sourceMappingURL=JsonFile.js.map
|
package/cjs/db/JsonFile.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"JsonFile.js","sourceRoot":"","sources":["../../../../../packages/cli/src/db/JsonFile.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AAEjD,mDAA+C;AAC/C,2CAAuC;AACvC,qDAAiD;AACjD,2CAAoD;AAEpD;;GAEG;AACH,MAAa,QAAQ;IAIE;IAHrB;;OAEG;IACH,YAAqB,GAAmB;QAAnB,QAAG,GAAH,GAAG,CAAgB;IAAG,CAAC;IAE5C;;;;OAIG;IACH,IAAI,EAAE;QACJ,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE;YACnB,OAAO,IAAA,4BAAmB,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,eAAM,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAA;SAC7E;aAAM;YACL,OAAO,IAAA,4BAAmB,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;SAC5D;IACH,CAAC;IAED;;;OAGG;IACH,IAAI,MAAM;QACR,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE;YACnB,OAAO,IAAA,4BAAmB,EAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,6BAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAA;SAC9E;aAAM;YACL,OAAO,IAAA,4BAAmB,EAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAA;SACpE;IACH,CAAC;IAED;;;OAGG;IACH,IAAI,OAAO;QACT,OAAO,IAAA,4BAAmB,EAAC,IAAI,EAAE,SAAS,EAAE,IAAI,+BAAc,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAA;IAClF,CAAC;IAED;;OAEG;IACH,IAAI,OAAO;QACT,OAAO,IAAA,4BAAmB,EAAC,IAAI,EAAE,SAAS,EAAE,IAAI,+BAAc,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAA;IAClF,CAAC;CACF;AA7CD,4BA6CC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { AbstractJsonFileSection } from './AbstractJsonFileSection';
|
|
2
|
-
import { IPreset } from '../types/IPreset';
|
|
3
|
-
import { JsonFile } from './JsonFile';
|
|
4
|
-
/**
|
|
5
|
-
* A class that represents the user-presets section of the JSON file used as simple database.
|
|
6
|
-
*/
|
|
7
|
-
export declare class PresetsSection extends AbstractJsonFileSection<IPreset> {
|
|
8
|
-
/**
|
|
9
|
-
* Creates an instance of AppDataSection.
|
|
10
|
-
* @param file - The parent JsonFile instance.
|
|
11
|
-
* @param name - The name of the section.
|
|
12
|
-
*/
|
|
13
|
-
constructor(file: JsonFile, name: string);
|
|
14
|
-
/**
|
|
15
|
-
* Asserts that a key-value pair is valid.
|
|
16
|
-
* @param key - The key to assert.
|
|
17
|
-
* @param value - The preset options to validate.
|
|
18
|
-
*/
|
|
19
|
-
assertValid(key: string, value: IPreset): void;
|
|
20
|
-
/**
|
|
21
|
-
* Defines a property for the section.
|
|
22
|
-
* @param key - The key of the property.
|
|
23
|
-
* @param options - The options for the property.
|
|
24
|
-
*/
|
|
25
|
-
defineProperty(key: string, options: IPreset): void;
|
|
26
|
-
/**
|
|
27
|
-
* Initializes the section.
|
|
28
|
-
* @param save - Indicates whether to save the section after initialization.
|
|
29
|
-
* @returns A string if an error occurred during initialization, otherwise void.
|
|
30
|
-
*/
|
|
31
|
-
initialize(save?: boolean): void;
|
|
32
|
-
/**
|
|
33
|
-
* Sets all the values in the section.
|
|
34
|
-
* @param values - The values to set.
|
|
35
|
-
* @param save - Indicates whether to save the section after setting the values.
|
|
36
|
-
*/
|
|
37
|
-
setAll(presets: Record<string, IPreset>, save?: boolean): Promise<void>;
|
|
38
|
-
/**
|
|
39
|
-
* Deletes the value associated with the specified key.
|
|
40
|
-
* @param key - The key to delete.
|
|
41
|
-
* @param save - Indicates whether to save the section after deleting the value.
|
|
42
|
-
*/
|
|
43
|
-
delete(name: string, save?: boolean): void;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=PresetsSection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PresetsSection.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/db/PresetsSection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAIrC;;GAEG;AACH,qBAAa,cAAe,SAAQ,uBAAuB,CAAC,OAAO,CAAC;IAClE;;;;OAIG;gBACS,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM;IAaxC;;;;OAIG;IACM,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;IAIhD;;;;OAIG;IACM,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAOrD;;;;OAIG;IACM,UAAU,CAAC,IAAI,UAAQ;IAQhC;;;;OAIG;IACY,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,UAAO;IAKnE;;;;OAIG;IACM,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,UAAO;CAI1C"}
|
package/cjs/db/PresetsSection.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PresetsSection = void 0;
|
|
4
|
-
const AbstractJsonFileSection_1 = require("./AbstractJsonFileSection");
|
|
5
|
-
const object_1 = require("@bemoje/object");
|
|
6
|
-
/**
|
|
7
|
-
* A class that represents the user-presets section of the JSON file used as simple database.
|
|
8
|
-
*/
|
|
9
|
-
class PresetsSection extends AbstractJsonFileSection_1.AbstractJsonFileSection {
|
|
10
|
-
/**
|
|
11
|
-
* Creates an instance of AppDataSection.
|
|
12
|
-
* @param file - The parent JsonFile instance.
|
|
13
|
-
* @param name - The name of the section.
|
|
14
|
-
*/
|
|
15
|
-
constructor(file, name) {
|
|
16
|
-
super(file, name, false);
|
|
17
|
-
this.defineProperty('defaults', {
|
|
18
|
-
description: 'All presets inherit from this preset',
|
|
19
|
-
presets: [],
|
|
20
|
-
args: this.cmd.arguments.map((arg) => arg.defaultValue ?? null),
|
|
21
|
-
options: this.cmd.getOwnAndGlobalOptions().reduce((acc, opt) => {
|
|
22
|
-
acc[opt.attributeName()] = opt.defaultValue ?? (opt.isBoolean() ? false : null);
|
|
23
|
-
return acc;
|
|
24
|
-
}, {}),
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Asserts that a key-value pair is valid.
|
|
29
|
-
* @param key - The key to assert.
|
|
30
|
-
* @param value - The preset options to validate.
|
|
31
|
-
*/
|
|
32
|
-
assertValid(key, value) {
|
|
33
|
-
this.cmd.assertValidPreset(key, value);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Defines a property for the section.
|
|
37
|
-
* @param key - The key of the property.
|
|
38
|
-
* @param options - The options for the property.
|
|
39
|
-
*/
|
|
40
|
-
defineProperty(key, options) {
|
|
41
|
-
if (this.defaultValues[key])
|
|
42
|
-
throw new Error(`Cannot redefine preset '${key}'.`);
|
|
43
|
-
this.defaultValues[key] = JSON.parse(JSON.stringify(options));
|
|
44
|
-
this.assertValid(key, options);
|
|
45
|
-
this.isInitialized = false;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Initializes the section.
|
|
49
|
-
* @param save - Indicates whether to save the section after initialization.
|
|
50
|
-
* @returns A string if an error occurred during initialization, otherwise void.
|
|
51
|
-
*/
|
|
52
|
-
initialize(save = false) {
|
|
53
|
-
if (this.isInitialized)
|
|
54
|
-
return;
|
|
55
|
-
const data = this.db.getSafe(this.prefix());
|
|
56
|
-
const presets = (0, object_1.objAssign)({}, JSON.parse(JSON.stringify(this.defaultValues)), data || {});
|
|
57
|
-
this.db.set(this.prefix(), presets, save);
|
|
58
|
-
this.isInitialized = true;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Sets all the values in the section.
|
|
62
|
-
* @param values - The values to set.
|
|
63
|
-
* @param save - Indicates whether to save the section after setting the values.
|
|
64
|
-
*/
|
|
65
|
-
async setAll(presets, save = true) {
|
|
66
|
-
if (!presets['defaults'])
|
|
67
|
-
presets['defaults'] = JSON.parse(JSON.stringify(this.defaultValues['defaults']));
|
|
68
|
-
super.setAll(presets, save);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Deletes the value associated with the specified key.
|
|
72
|
-
* @param key - The key to delete.
|
|
73
|
-
* @param save - Indicates whether to save the section after deleting the value.
|
|
74
|
-
*/
|
|
75
|
-
delete(name, save = true) {
|
|
76
|
-
if (Object.hasOwn(this.defaultValues, name))
|
|
77
|
-
throw new Error('Cannot delete the builtin presets.');
|
|
78
|
-
super.delete(name, save);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
exports.PresetsSection = PresetsSection;
|
|
82
|
-
//# sourceMappingURL=PresetsSection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PresetsSection.js","sourceRoot":"","sources":["../../../../../packages/cli/src/db/PresetsSection.ts"],"names":[],"mappings":";;;AAAA,uEAAmE;AAGnE,2CAA0C;AAG1C;;GAEG;AACH,MAAa,cAAe,SAAQ,iDAAgC;IAClE;;;;OAIG;IACH,YAAY,IAAc,EAAE,IAAY;QACtC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;QACxB,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE;YAC9B,WAAW,EAAE,sCAAsC;YACnD,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC;YAC/D,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,sBAAsB,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;gBAC7D,GAAG,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,GAAG,GAAG,CAAC,YAAY,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;gBAC/E,OAAO,GAAG,CAAA;YACZ,CAAC,EAAE,EAAkB,CAAC;SACvB,CAAC,CAAA;IACJ,CAAC;IAED;;;;OAIG;IACM,WAAW,CAAC,GAAW,EAAE,KAAc;QAC9C,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACxC,CAAC;IAED;;;;OAIG;IACM,cAAc,CAAC,GAAW,EAAE,OAAgB;QACnD,IAAI,IAAI,CAAC,aAAa,CA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