@shell-shock/plugin-help 0.1.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/LICENSE +201 -0
- package/README.md +264 -0
- package/dist/_virtual/_rolldown/runtime.cjs +29 -0
- package/dist/_virtual/_rolldown/runtime.mjs +3 -0
- package/dist/components/display.cjs +260 -0
- package/dist/components/display.d.cts +105 -0
- package/dist/components/display.d.cts.map +1 -0
- package/dist/components/display.d.mts +105 -0
- package/dist/components/display.d.mts.map +1 -0
- package/dist/components/display.mjs +254 -0
- package/dist/components/display.mjs.map +1 -0
- package/dist/components/help-builtin.cjs +113 -0
- package/dist/components/help-builtin.d.cts +22 -0
- package/dist/components/help-builtin.d.cts.map +1 -0
- package/dist/components/help-builtin.d.mts +22 -0
- package/dist/components/help-builtin.d.mts.map +1 -0
- package/dist/components/help-builtin.mjs +110 -0
- package/dist/components/help-builtin.mjs.map +1 -0
- package/dist/components/help-command.cjs +97 -0
- package/dist/components/help-command.d.cts +10 -0
- package/dist/components/help-command.d.cts.map +1 -0
- package/dist/components/help-command.d.mts +10 -0
- package/dist/components/help-command.d.mts.map +1 -0
- package/dist/components/help-command.mjs +96 -0
- package/dist/components/help-command.mjs.map +1 -0
- package/dist/components/index.cjs +14 -0
- package/dist/components/index.d.cts +4 -0
- package/dist/components/index.d.mts +4 -0
- package/dist/components/index.mjs +5 -0
- package/dist/index.cjs +105 -0
- package/dist/index.d.cts +11 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +11 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +100 -0
- package/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/constant-case.cjs +17 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/constant-case.mjs +17 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/constant-case.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/get-words.cjs +38 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/get-words.mjs +38 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/get-words.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/kebab-case.cjs +33 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/kebab-case.mjs +34 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/kebab-case.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/snake-case.cjs +40 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/snake-case.mjs +41 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/snake-case.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/upper-case-first.cjs +17 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/upper-case-first.mjs +17 -0
- package/dist/node_modules/.pnpm/@stryke_string-format@0.17.4/node_modules/@stryke/string-format/dist/upper-case-first.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-empty.cjs +20 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-empty.mjs +21 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-empty.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-null.cjs +12 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-null.mjs +12 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-null.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set-string.cjs +20 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set-string.mjs +21 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set-string.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set.cjs +19 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set.mjs +20 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-string.cjs +12 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-string.mjs +12 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-string.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-undefined.cjs +8 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-undefined.mjs +8 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-undefined.mjs.map +1 -0
- package/dist/types/index.cjs +0 -0
- package/dist/types/index.d.cts +2 -0
- package/dist/types/index.d.mts +2 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/plugin.cjs +0 -0
- package/dist/types/plugin.d.cts +61 -0
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +61 -0
- package/dist/types/plugin.d.mts.map +1 -0
- package/dist/types/plugin.mjs +1 -0
- package/package.json +177 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.4/node_modules/@stryke/string-format/dist/get-words.mjs
|
|
2
|
+
/**
|
|
3
|
+
* Regular expression pattern to split strings into words for various case conversions
|
|
4
|
+
*
|
|
5
|
+
* This pattern matches sequences of characters in a string, considering the following case:
|
|
6
|
+
* - Sequences of two or more uppercase letters followed by an uppercase letter and lowercase letters or digits (for acronyms)
|
|
7
|
+
* - Sequences of one uppercase letter optionally followed by lowercase letters and digits
|
|
8
|
+
* - Single uppercase letters
|
|
9
|
+
* - Sequences of digits
|
|
10
|
+
*
|
|
11
|
+
* The resulting match can be used to convert camelCase, snake_case, kebab-case, and other mixed formats into
|
|
12
|
+
* a consistent format like snake case.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* const matches = 'camelCaseHTTPRequest'.match(CASE_SPLIT_PATTERN);
|
|
16
|
+
* // matches: ['camel', 'Case', 'HTTP', 'Request']
|
|
17
|
+
*/
|
|
18
|
+
const CASE_SPLIT_PATTERN = /[A-Z]?[a-z]+|\d+|[A-Z]+(?![a-z])/g;
|
|
19
|
+
const RELAXED_SPLIT_PATTERN = /[A-Z/.-]?[a-z/.-]+|\d+|[A-Z/.-]+(?![a-z/.-])/g;
|
|
20
|
+
/**
|
|
21
|
+
* Splits a string into words using a regular expression pattern
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* const words = getWords('camelCaseHTTPRequest');
|
|
25
|
+
* // words: ['camel', 'Case', 'HTTP', 'Request']
|
|
26
|
+
*
|
|
27
|
+
* @param str - The string to split into words
|
|
28
|
+
* @param options - Options for splitting the string
|
|
29
|
+
* @returns An array of words
|
|
30
|
+
*/
|
|
31
|
+
function getWords(str, options = {}) {
|
|
32
|
+
if (str.length > 5e3) throw new Error("The regular expression parameter of `get-words` can't handle strings longer than 2000 characters");
|
|
33
|
+
return [...str.match(options.split ?? (options.relaxed ? RELAXED_SPLIT_PATTERN : CASE_SPLIT_PATTERN)) ?? []];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { getWords };
|
|
38
|
+
//# sourceMappingURL=get-words.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-words.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+string-format@0.17.4/node_modules/@stryke/string-format/dist/get-words.mjs"],"sourcesContent":["//#region src/get-words.ts\n/**\n* Regular expression pattern to split strings into words for various case conversions\n*\n* This pattern matches sequences of characters in a string, considering the following case:\n* - Sequences of two or more uppercase letters followed by an uppercase letter and lowercase letters or digits (for acronyms)\n* - Sequences of one uppercase letter optionally followed by lowercase letters and digits\n* - Single uppercase letters\n* - Sequences of digits\n*\n* The resulting match can be used to convert camelCase, snake_case, kebab-case, and other mixed formats into\n* a consistent format like snake case.\n*\n* @example\n* const matches = 'camelCaseHTTPRequest'.match(CASE_SPLIT_PATTERN);\n* // matches: ['camel', 'Case', 'HTTP', 'Request']\n*/\nconst CASE_SPLIT_PATTERN = /[A-Z]?[a-z]+|\\d+|[A-Z]+(?![a-z])/g;\nconst RELAXED_SPLIT_PATTERN = /[A-Z/.-]?[a-z/.-]+|\\d+|[A-Z/.-]+(?![a-z/.-])/g;\n/**\n* Splits a string into words using a regular expression pattern\n*\n* @example\n* const words = getWords('camelCaseHTTPRequest');\n* // words: ['camel', 'Case', 'HTTP', 'Request']\n*\n* @param str - The string to split into words\n* @param options - Options for splitting the string\n* @returns An array of words\n*/\nfunction getWords(str, options = {}) {\n\tif (str.length > 5e3) throw new Error(\"The regular expression parameter of `get-words` can't handle strings longer than 2000 characters\");\n\treturn [...str.match(options.split ?? (options.relaxed ? RELAXED_SPLIT_PATTERN : CASE_SPLIT_PATTERN)) ?? []];\n}\n\n//#endregion\nexport { CASE_SPLIT_PATTERN, RELAXED_SPLIT_PATTERN, getWords };\n//# sourceMappingURL=get-words.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;AAiBA,MAAM,qBAAqB;AAC3B,MAAM,wBAAwB;;;;;;;;;;;;AAY9B,SAAS,SAAS,KAAK,UAAU,EAAE,EAAE;AACpC,KAAI,IAAI,SAAS,IAAK,OAAM,IAAI,MAAM,mGAAmG;AACzI,QAAO,CAAC,GAAG,IAAI,MAAM,QAAQ,UAAU,QAAQ,UAAU,wBAAwB,oBAAoB,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const require_get_words = require('./get-words.cjs');
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.4/node_modules/@stryke/string-format/dist/kebab-case.mjs
|
|
4
|
+
/**
|
|
5
|
+
* Check if the input string is in kebab case.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* Kebab case is defined as all lowercase letters with hyphens separating words - "this-is-an-example".
|
|
9
|
+
*
|
|
10
|
+
* @param input - The input string to check.
|
|
11
|
+
* @returns True if the input is in kebab case, false otherwise.
|
|
12
|
+
*/
|
|
13
|
+
function isKebabCase(input) {
|
|
14
|
+
return input ? /^[a-z]+(?:-[a-z0-9]+)*$/.test(input) : false;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Convert the input string to kebab case.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Kebab case is defined as all lowercase letters with hyphens separating words - "this-is-an-example".
|
|
21
|
+
*
|
|
22
|
+
* @param input - The input string.
|
|
23
|
+
* @returns The kebab-cased string.
|
|
24
|
+
*/
|
|
25
|
+
function kebabCase(input) {
|
|
26
|
+
if (isKebabCase(input) || input === void 0) return input;
|
|
27
|
+
const parts = input ? require_get_words.getWords(input) : [];
|
|
28
|
+
if (parts.length === 0) return "";
|
|
29
|
+
return parts.join("-").toLowerCase();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
exports.kebabCase = kebabCase;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { getWords } from "./get-words.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.4/node_modules/@stryke/string-format/dist/kebab-case.mjs
|
|
4
|
+
/**
|
|
5
|
+
* Check if the input string is in kebab case.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* Kebab case is defined as all lowercase letters with hyphens separating words - "this-is-an-example".
|
|
9
|
+
*
|
|
10
|
+
* @param input - The input string to check.
|
|
11
|
+
* @returns True if the input is in kebab case, false otherwise.
|
|
12
|
+
*/
|
|
13
|
+
function isKebabCase(input) {
|
|
14
|
+
return input ? /^[a-z]+(?:-[a-z0-9]+)*$/.test(input) : false;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Convert the input string to kebab case.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Kebab case is defined as all lowercase letters with hyphens separating words - "this-is-an-example".
|
|
21
|
+
*
|
|
22
|
+
* @param input - The input string.
|
|
23
|
+
* @returns The kebab-cased string.
|
|
24
|
+
*/
|
|
25
|
+
function kebabCase(input) {
|
|
26
|
+
if (isKebabCase(input) || input === void 0) return input;
|
|
27
|
+
const parts = input ? getWords(input) : [];
|
|
28
|
+
if (parts.length === 0) return "";
|
|
29
|
+
return parts.join("-").toLowerCase();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { kebabCase };
|
|
34
|
+
//# sourceMappingURL=kebab-case.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kebab-case.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+string-format@0.17.4/node_modules/@stryke/string-format/dist/kebab-case.mjs"],"sourcesContent":["import { getWords } from \"./get-words.mjs\";\n\n//#region src/kebab-case.ts\n/**\n* Check if the input string is in kebab case.\n*\n* @remarks\n* Kebab case is defined as all lowercase letters with hyphens separating words - \"this-is-an-example\".\n*\n* @param input - The input string to check.\n* @returns True if the input is in kebab case, false otherwise.\n*/\nfunction isKebabCase(input) {\n\treturn input ? /^[a-z]+(?:-[a-z0-9]+)*$/.test(input) : false;\n}\n/**\n* Convert the input string to kebab case.\n*\n* @remarks\n* Kebab case is defined as all lowercase letters with hyphens separating words - \"this-is-an-example\".\n*\n* @param input - The input string.\n* @returns The kebab-cased string.\n*/\nfunction kebabCase(input) {\n\tif (isKebabCase(input) || input === void 0) return input;\n\tconst parts = input ? getWords(input) : [];\n\tif (parts.length === 0) return \"\";\n\treturn parts.join(\"-\").toLowerCase();\n}\n\n//#endregion\nexport { isKebabCase, kebabCase };\n//# sourceMappingURL=kebab-case.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;AAYA,SAAS,YAAY,OAAO;AAC3B,QAAO,QAAQ,0BAA0B,KAAK,MAAM,GAAG;;;;;;;;;;;AAWxD,SAAS,UAAU,OAAO;AACzB,KAAI,YAAY,MAAM,IAAI,UAAU,KAAK,EAAG,QAAO;CACnD,MAAM,QAAQ,QAAQ,SAAS,MAAM,GAAG,EAAE;AAC1C,KAAI,MAAM,WAAW,EAAG,QAAO;AAC/B,QAAO,MAAM,KAAK,IAAI,CAAC,aAAa"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const require_upper_case_first = require('./upper-case-first.cjs');
|
|
2
|
+
const require_constant_case = require('./constant-case.cjs');
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.4/node_modules/@stryke/string-format/dist/snake-case.mjs
|
|
5
|
+
/**
|
|
6
|
+
* Check if the input string is in snake case.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* Snake case is defined as all lowercase letters with underscores separating words - "this_is_an_example"
|
|
10
|
+
*
|
|
11
|
+
* @param input - The input string to check.
|
|
12
|
+
* @returns True if the input is in snake case, false otherwise.
|
|
13
|
+
*/
|
|
14
|
+
function isSnakeCase(input) {
|
|
15
|
+
return input ? /^[a-z]+(?:_[a-z0-9]+)*$/.test(input) : false;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Convert the input string to snake case.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Snake case is defined as all lowercase letters with underscores separating words - "this_is_an_example"
|
|
22
|
+
*
|
|
23
|
+
* @param input - The input string.
|
|
24
|
+
* @param options - Options to control the behavior of the function.
|
|
25
|
+
* @returns The snake-cased string.
|
|
26
|
+
*/
|
|
27
|
+
function snakeCase(input, options) {
|
|
28
|
+
if (isSnakeCase(input) || input === void 0) return input;
|
|
29
|
+
if (require_constant_case.isConstantCase(input)) return input.toLowerCase();
|
|
30
|
+
const parts = input?.replace(/[A-Z]+/g, (input$1) => require_upper_case_first.upperCaseFirst(input$1) ?? "").split(/(?=[A-Z])|[\s._-]/).map((x) => x.toLowerCase()) ?? [];
|
|
31
|
+
if (parts.length === 0) return "";
|
|
32
|
+
if (parts.length === 1) return parts[0];
|
|
33
|
+
const result = parts.reduce((ret, part) => {
|
|
34
|
+
return `${ret}_${part.toLowerCase()}`;
|
|
35
|
+
});
|
|
36
|
+
return options?.splitOnNumber === false ? result : result.replace(/[A-Z]\d/i, (val) => `${val[0]}_${val[1]}`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
exports.snakeCase = snakeCase;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { upperCaseFirst } from "./upper-case-first.mjs";
|
|
2
|
+
import { isConstantCase } from "./constant-case.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.4/node_modules/@stryke/string-format/dist/snake-case.mjs
|
|
5
|
+
/**
|
|
6
|
+
* Check if the input string is in snake case.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* Snake case is defined as all lowercase letters with underscores separating words - "this_is_an_example"
|
|
10
|
+
*
|
|
11
|
+
* @param input - The input string to check.
|
|
12
|
+
* @returns True if the input is in snake case, false otherwise.
|
|
13
|
+
*/
|
|
14
|
+
function isSnakeCase(input) {
|
|
15
|
+
return input ? /^[a-z]+(?:_[a-z0-9]+)*$/.test(input) : false;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Convert the input string to snake case.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Snake case is defined as all lowercase letters with underscores separating words - "this_is_an_example"
|
|
22
|
+
*
|
|
23
|
+
* @param input - The input string.
|
|
24
|
+
* @param options - Options to control the behavior of the function.
|
|
25
|
+
* @returns The snake-cased string.
|
|
26
|
+
*/
|
|
27
|
+
function snakeCase(input, options) {
|
|
28
|
+
if (isSnakeCase(input) || input === void 0) return input;
|
|
29
|
+
if (isConstantCase(input)) return input.toLowerCase();
|
|
30
|
+
const parts = input?.replace(/[A-Z]+/g, (input$1) => upperCaseFirst(input$1) ?? "").split(/(?=[A-Z])|[\s._-]/).map((x) => x.toLowerCase()) ?? [];
|
|
31
|
+
if (parts.length === 0) return "";
|
|
32
|
+
if (parts.length === 1) return parts[0];
|
|
33
|
+
const result = parts.reduce((ret, part) => {
|
|
34
|
+
return `${ret}_${part.toLowerCase()}`;
|
|
35
|
+
});
|
|
36
|
+
return options?.splitOnNumber === false ? result : result.replace(/[A-Z]\d/i, (val) => `${val[0]}_${val[1]}`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
export { snakeCase };
|
|
41
|
+
//# sourceMappingURL=snake-case.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snake-case.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+string-format@0.17.4/node_modules/@stryke/string-format/dist/snake-case.mjs"],"sourcesContent":["import { EMPTY_STRING } from \"./types/src/base.mjs\";\nimport { upperCaseFirst } from \"./upper-case-first.mjs\";\nimport { isConstantCase } from \"./constant-case.mjs\";\n\n//#region src/snake-case.ts\n/**\n* Check if the input string is in snake case.\n*\n* @remarks\n* Snake case is defined as all lowercase letters with underscores separating words - \"this_is_an_example\"\n*\n* @param input - The input string to check.\n* @returns True if the input is in snake case, false otherwise.\n*/\nfunction isSnakeCase(input) {\n\treturn input ? /^[a-z]+(?:_[a-z0-9]+)*$/.test(input) : false;\n}\n/**\n* Convert the input string to snake case.\n*\n* @remarks\n* Snake case is defined as all lowercase letters with underscores separating words - \"this_is_an_example\"\n*\n* @param input - The input string.\n* @param options - Options to control the behavior of the function.\n* @returns The snake-cased string.\n*/\nfunction snakeCase(input, options) {\n\tif (isSnakeCase(input) || input === void 0) return input;\n\tif (isConstantCase(input)) return input.toLowerCase();\n\tconst parts = input?.replace(/[A-Z]+/g, (input$1) => upperCaseFirst(input$1) ?? EMPTY_STRING).split(/(?=[A-Z])|[\\s._-]/).map((x) => x.toLowerCase()) ?? [];\n\tif (parts.length === 0) return \"\";\n\tif (parts.length === 1) return parts[0];\n\tconst result = parts.reduce((ret, part) => {\n\t\treturn `${ret}_${part.toLowerCase()}`;\n\t});\n\treturn options?.splitOnNumber === false ? result : result.replace(/[A-Z]\\d/i, (val) => `${val[0]}_${val[1]}`);\n}\n\n//#endregion\nexport { isSnakeCase, snakeCase };\n//# sourceMappingURL=snake-case.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;AAcA,SAAS,YAAY,OAAO;AAC3B,QAAO,QAAQ,0BAA0B,KAAK,MAAM,GAAG;;;;;;;;;;;;AAYxD,SAAS,UAAU,OAAO,SAAS;AAClC,KAAI,YAAY,MAAM,IAAI,UAAU,KAAK,EAAG,QAAO;AACnD,KAAI,eAAe,MAAM,CAAE,QAAO,MAAM,aAAa;CACrD,MAAM,QAAQ,OAAO,QAAQ,YAAY,YAAY,eAAe,QAAQ,OAAiB,CAAC,MAAM,oBAAoB,CAAC,KAAK,MAAM,EAAE,aAAa,CAAC,IAAI,EAAE;AAC1J,KAAI,MAAM,WAAW,EAAG,QAAO;AAC/B,KAAI,MAAM,WAAW,EAAG,QAAO,MAAM;CACrC,MAAM,SAAS,MAAM,QAAQ,KAAK,SAAS;AAC1C,SAAO,GAAG,IAAI,GAAG,KAAK,aAAa;GAClC;AACF,QAAO,SAAS,kBAAkB,QAAQ,SAAS,OAAO,QAAQ,aAAa,QAAQ,GAAG,IAAI,GAAG,GAAG,IAAI,KAAK"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.4/node_modules/@stryke/string-format/dist/upper-case-first.mjs
|
|
3
|
+
/**
|
|
4
|
+
* Upper case the first character of an input string.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* "Thisisanexample"
|
|
8
|
+
*
|
|
9
|
+
* @param input - The input string.
|
|
10
|
+
* @returns The capitalized string.
|
|
11
|
+
*/
|
|
12
|
+
function upperCaseFirst(input) {
|
|
13
|
+
return input ? input.charAt(0).toUpperCase() + input.slice(1) : input;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
exports.upperCaseFirst = upperCaseFirst;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.4/node_modules/@stryke/string-format/dist/upper-case-first.mjs
|
|
2
|
+
/**
|
|
3
|
+
* Upper case the first character of an input string.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* "Thisisanexample"
|
|
7
|
+
*
|
|
8
|
+
* @param input - The input string.
|
|
9
|
+
* @returns The capitalized string.
|
|
10
|
+
*/
|
|
11
|
+
function upperCaseFirst(input) {
|
|
12
|
+
return input ? input.charAt(0).toUpperCase() + input.slice(1) : input;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { upperCaseFirst };
|
|
17
|
+
//# sourceMappingURL=upper-case-first.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upper-case-first.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+string-format@0.17.4/node_modules/@stryke/string-format/dist/upper-case-first.mjs"],"sourcesContent":["//#region src/upper-case-first.ts\n/**\n* Upper case the first character of an input string.\n*\n* @remarks\n* \"Thisisanexample\"\n*\n* @param input - The input string.\n* @returns The capitalized string.\n*/\nfunction upperCaseFirst(input) {\n\treturn input ? input.charAt(0).toUpperCase() + input.slice(1) : input;\n}\n\n//#endregion\nexport { upperCaseFirst };\n//# sourceMappingURL=upper-case-first.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;AAUA,SAAS,eAAe,OAAO;AAC9B,QAAO,QAAQ,MAAM,OAAO,EAAE,CAAC,aAAa,GAAG,MAAM,MAAM,EAAE,GAAG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const require_is_null = require('./is-null.cjs');
|
|
2
|
+
const require_is_undefined = require('./is-undefined.cjs');
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-empty.mjs
|
|
5
|
+
/**
|
|
6
|
+
* Check if the provided value's type is `null` or `undefined`
|
|
7
|
+
*
|
|
8
|
+
* @param value - The value to type check
|
|
9
|
+
* @returns An indicator specifying if the value provided is of type `null` or `undefined`
|
|
10
|
+
*/
|
|
11
|
+
const isEmpty = (value) => {
|
|
12
|
+
try {
|
|
13
|
+
return require_is_undefined.isUndefined(value) || require_is_null.isNull(value);
|
|
14
|
+
} catch {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
exports.isEmpty = isEmpty;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { isNull } from "./is-null.mjs";
|
|
2
|
+
import { isUndefined } from "./is-undefined.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-empty.mjs
|
|
5
|
+
/**
|
|
6
|
+
* Check if the provided value's type is `null` or `undefined`
|
|
7
|
+
*
|
|
8
|
+
* @param value - The value to type check
|
|
9
|
+
* @returns An indicator specifying if the value provided is of type `null` or `undefined`
|
|
10
|
+
*/
|
|
11
|
+
const isEmpty = (value) => {
|
|
12
|
+
try {
|
|
13
|
+
return isUndefined(value) || isNull(value);
|
|
14
|
+
} catch {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { isEmpty };
|
|
21
|
+
//# sourceMappingURL=is-empty.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-empty.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-empty.mjs"],"sourcesContent":["import { isDate } from \"./is-date.mjs\";\nimport { isFunction } from \"./is-function.mjs\";\nimport { isNull } from \"./is-null.mjs\";\nimport { isNumber } from \"./is-number.mjs\";\nimport { isSymbol } from \"./is-symbol.mjs\";\nimport { isUndefined } from \"./is-undefined.mjs\";\n\n//#region src/is-empty.ts\n/**\n* Check if the provided value's type is `null` or `undefined`\n*\n* @param value - The value to type check\n* @returns An indicator specifying if the value provided is of type `null` or `undefined`\n*/\nconst isEmpty = (value) => {\n\ttry {\n\t\treturn isUndefined(value) || isNull(value);\n\t} catch {\n\t\treturn false;\n\t}\n};\nconst isEmptyAnything = (value) => {\n\tif (value === true || value === false) return true;\n\tif (value === null || value === void 0) return true;\n\tif (isNumber(value)) return value === 0;\n\tif (isDate(value)) return Number.isNaN(value.getTime());\n\tif (isFunction(value)) return false;\n\tif (isSymbol(value)) return false;\n\tconst { length } = value;\n\tif (isNumber(length)) return length === 0;\n\tconst { size } = value;\n\tif (isNumber(size)) return size === 0;\n\treturn Object.keys(value).length === 0;\n};\n\n//#endregion\nexport { isEmpty, isEmptyAnything };\n//# sourceMappingURL=is-empty.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;AAcA,MAAM,WAAW,UAAU;AAC1B,KAAI;AACH,SAAO,YAAY,MAAM,IAAI,OAAO,MAAM;SACnC;AACP,SAAO"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-null.mjs
|
|
3
|
+
const isNull = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
return value === null;
|
|
6
|
+
} catch {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.isNull = isNull;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-null.mjs
|
|
2
|
+
const isNull = (value) => {
|
|
3
|
+
try {
|
|
4
|
+
return value === null;
|
|
5
|
+
} catch {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { isNull };
|
|
12
|
+
//# sourceMappingURL=is-null.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-null.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-null.mjs"],"sourcesContent":["//#region src/is-null.ts\nconst isNull = (value) => {\n\ttry {\n\t\treturn value === null;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isNull };\n//# sourceMappingURL=is-null.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAM,UAAU,UAAU;AACzB,KAAI;AACH,SAAO,UAAU;SACV;AACP,SAAO"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const require_is_string = require('./is-string.cjs');
|
|
2
|
+
const require_is_set = require('./is-set.cjs');
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set-string.mjs
|
|
5
|
+
/**
|
|
6
|
+
* Determine if the type is string and is not empty (length greater than zero)
|
|
7
|
+
*
|
|
8
|
+
* @param value - The value to type check
|
|
9
|
+
* @returns An indicator specifying if the value provided is of type `string` and length greater than zero
|
|
10
|
+
*/
|
|
11
|
+
const isSetString = (value) => {
|
|
12
|
+
try {
|
|
13
|
+
return require_is_set.isSet(value) && require_is_string.isString(value) && value.length > 0;
|
|
14
|
+
} catch {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
exports.isSetString = isSetString;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { isString } from "./is-string.mjs";
|
|
2
|
+
import { isSet } from "./is-set.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set-string.mjs
|
|
5
|
+
/**
|
|
6
|
+
* Determine if the type is string and is not empty (length greater than zero)
|
|
7
|
+
*
|
|
8
|
+
* @param value - The value to type check
|
|
9
|
+
* @returns An indicator specifying if the value provided is of type `string` and length greater than zero
|
|
10
|
+
*/
|
|
11
|
+
const isSetString = (value) => {
|
|
12
|
+
try {
|
|
13
|
+
return isSet(value) && isString(value) && value.length > 0;
|
|
14
|
+
} catch {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { isSetString };
|
|
21
|
+
//# sourceMappingURL=is-set-string.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-set-string.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set-string.mjs"],"sourcesContent":["import { isString } from \"./is-string.mjs\";\nimport { isSet } from \"./is-set.mjs\";\n\n//#region src/is-set-string.ts\n/**\n* Determine if the type is string and is not empty (length greater than zero)\n*\n* @param value - The value to type check\n* @returns An indicator specifying if the value provided is of type `string` and length greater than zero\n*/\nconst isSetString = (value) => {\n\ttry {\n\t\treturn isSet(value) && isString(value) && value.length > 0;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isSetString };\n//# sourceMappingURL=is-set-string.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;AAUA,MAAM,eAAe,UAAU;AAC9B,KAAI;AACH,SAAO,MAAM,MAAM,IAAI,SAAS,MAAM,IAAI,MAAM,SAAS;SAClD;AACP,SAAO"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const require_is_empty = require('./is-empty.cjs');
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set.mjs
|
|
4
|
+
/**
|
|
5
|
+
* The inverse of the `isEmpty` function
|
|
6
|
+
*
|
|
7
|
+
* @param value - The value to type check
|
|
8
|
+
* @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`
|
|
9
|
+
*/
|
|
10
|
+
const isSet = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
return !require_is_empty.isEmpty(value);
|
|
13
|
+
} catch {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.isSet = isSet;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isEmpty } from "./is-empty.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set.mjs
|
|
4
|
+
/**
|
|
5
|
+
* The inverse of the `isEmpty` function
|
|
6
|
+
*
|
|
7
|
+
* @param value - The value to type check
|
|
8
|
+
* @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`
|
|
9
|
+
*/
|
|
10
|
+
const isSet = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
return !isEmpty(value);
|
|
13
|
+
} catch {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { isSet };
|
|
20
|
+
//# sourceMappingURL=is-set.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-set.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-set.mjs"],"sourcesContent":["import { isEmpty } from \"./is-empty.mjs\";\n\n//#region src/is-set.ts\n/**\n* The inverse of the `isEmpty` function\n*\n* @param value - The value to type check\n* @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`\n*/\nconst isSet = (value) => {\n\ttry {\n\t\treturn !isEmpty(value);\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isSet };\n//# sourceMappingURL=is-set.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;AASA,MAAM,SAAS,UAAU;AACxB,KAAI;AACH,SAAO,CAAC,QAAQ,MAAM;SACf;AACP,SAAO"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-string.mjs
|
|
3
|
+
const isString = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
return typeof value === "string";
|
|
6
|
+
} catch {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.isString = isString;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-string.mjs
|
|
2
|
+
const isString = (value) => {
|
|
3
|
+
try {
|
|
4
|
+
return typeof value === "string";
|
|
5
|
+
} catch {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { isString };
|
|
12
|
+
//# sourceMappingURL=is-string.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-string.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-string.mjs"],"sourcesContent":["//#region src/is-string.ts\nconst isString = (value) => {\n\ttry {\n\t\treturn typeof value === \"string\";\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isString };\n//# sourceMappingURL=is-string.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAM,YAAY,UAAU;AAC3B,KAAI;AACH,SAAO,OAAO,UAAU;SACjB;AACP,SAAO"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-undefined.mjs
|
|
2
|
+
const isUndefined = (value) => {
|
|
3
|
+
return value === void 0;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
export { isUndefined };
|
|
8
|
+
//# sourceMappingURL=is-undefined.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-undefined.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+type-checks@0.5.39/node_modules/@stryke/type-checks/dist/is-undefined.mjs"],"sourcesContent":["//#region src/is-undefined.ts\nconst isUndefined = (value) => {\n\treturn value === void 0;\n};\n\n//#endregion\nexport { isUndefined };\n//# sourceMappingURL=is-undefined.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAM,eAAe,UAAU;AAC9B,QAAO,UAAU,KAAK"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
File without changes
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ResolvedConfig, UserConfig } from "@shell-shock/core";
|
|
2
|
+
import { Context } from "@shell-shock/core/types/context";
|
|
3
|
+
import { ConsolePluginContext, ConsolePluginOptions, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
|
|
4
|
+
import { ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme";
|
|
5
|
+
|
|
6
|
+
//#region src/types/plugin.d.ts
|
|
7
|
+
interface HelpPluginOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Should the plugin automatically add built-in help entries for all commands in the application?
|
|
10
|
+
*
|
|
11
|
+
* @defaultValue true
|
|
12
|
+
*/
|
|
13
|
+
builtins?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Should the plugin add the `help` command?
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* This can be set to a string to specify a custom command name for the `help` command. By default, the command name will be `"help"`.
|
|
19
|
+
*
|
|
20
|
+
* @defaultValue true
|
|
21
|
+
*/
|
|
22
|
+
command?: boolean | string;
|
|
23
|
+
/**
|
|
24
|
+
* Theme plugin options.
|
|
25
|
+
*/
|
|
26
|
+
theme?: ThemePluginOptions;
|
|
27
|
+
/**
|
|
28
|
+
* Console plugin options.
|
|
29
|
+
*/
|
|
30
|
+
console?: ConsolePluginOptions;
|
|
31
|
+
}
|
|
32
|
+
type HelpPluginUserConfig = ThemePluginUserConfig & ConsolePluginUserConfig & UserConfig & {
|
|
33
|
+
/**
|
|
34
|
+
* Resolved help configuration for the plugin.
|
|
35
|
+
*/
|
|
36
|
+
help: Omit<HelpPluginOptions, "theme" | "console" | "command"> & {
|
|
37
|
+
/**
|
|
38
|
+
* The name of the help command to add to the application, or `false` to disable adding a help command.
|
|
39
|
+
*
|
|
40
|
+
* @defaultValue "help"
|
|
41
|
+
*/
|
|
42
|
+
command: string | false;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
type HelpPluginResolvedConfig = ThemePluginResolvedConfig & ConsolePluginResolvedConfig & ResolvedConfig & {
|
|
46
|
+
/**
|
|
47
|
+
* Resolved help configuration for the plugin.
|
|
48
|
+
*/
|
|
49
|
+
help: Required<Omit<HelpPluginOptions, "theme" | "console" | "command">> & {
|
|
50
|
+
/**
|
|
51
|
+
* The name of the help command to add to the application, or `false` to disable adding a help command.
|
|
52
|
+
*
|
|
53
|
+
* @defaultValue "help"
|
|
54
|
+
*/
|
|
55
|
+
command: string | false;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
type HelpPluginContext<TResolvedConfig extends HelpPluginResolvedConfig = HelpPluginResolvedConfig> = ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & Context<TResolvedConfig>;
|
|
59
|
+
//#endregion
|
|
60
|
+
export { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig };
|
|
61
|
+
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;UAiCiB,iBAAA;;AAAjB;;;;EAME,QAAA;EAUA;;;;;;;AAaF;EAbE,OAAA;;;;EAKA,KAAA,GAAQ,kBAAA;EAcK;;;EATb,OAAA,GAAU,oBAAA;AAAA;AAAA,KAGA,oBAAA,GAAuB,qBAAA,GACjC,uBAAA,GACA,UAAA;EAAA;;;EAIE,IAAA,EAAM,IAAA,CAAK,iBAAA;IAMT;;;AAIN;;IAJM,OAAA;EAAA;AAAA;AAAA,KAIM,wBAAA,GAA2B,yBAAA,GACrC,2BAAA,GACA,cAAA;EAIsB;;;EAApB,IAAA,EAAM,QAAA,CAAS,IAAA,CAAK,iBAAA;IAAN;;;;;IAMZ,OAAA;EAAA;AAAA;AAAA,KAIM,iBAAA,yBACc,wBAAA,GAA2B,wBAAA,IACjD,kBAAA,CAAmB,eAAA,IACrB,oBAAA,CAAqB,eAAA,IACrB,OAAA,CAAQ,eAAA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ConsolePluginContext, ConsolePluginOptions, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
|
|
2
|
+
import { ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme";
|
|
3
|
+
import { ResolvedConfig, UserConfig } from "@shell-shock/core";
|
|
4
|
+
import { Context } from "@shell-shock/core/types/context";
|
|
5
|
+
|
|
6
|
+
//#region src/types/plugin.d.ts
|
|
7
|
+
interface HelpPluginOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Should the plugin automatically add built-in help entries for all commands in the application?
|
|
10
|
+
*
|
|
11
|
+
* @defaultValue true
|
|
12
|
+
*/
|
|
13
|
+
builtins?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Should the plugin add the `help` command?
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* This can be set to a string to specify a custom command name for the `help` command. By default, the command name will be `"help"`.
|
|
19
|
+
*
|
|
20
|
+
* @defaultValue true
|
|
21
|
+
*/
|
|
22
|
+
command?: boolean | string;
|
|
23
|
+
/**
|
|
24
|
+
* Theme plugin options.
|
|
25
|
+
*/
|
|
26
|
+
theme?: ThemePluginOptions;
|
|
27
|
+
/**
|
|
28
|
+
* Console plugin options.
|
|
29
|
+
*/
|
|
30
|
+
console?: ConsolePluginOptions;
|
|
31
|
+
}
|
|
32
|
+
type HelpPluginUserConfig = ThemePluginUserConfig & ConsolePluginUserConfig & UserConfig & {
|
|
33
|
+
/**
|
|
34
|
+
* Resolved help configuration for the plugin.
|
|
35
|
+
*/
|
|
36
|
+
help: Omit<HelpPluginOptions, "theme" | "console" | "command"> & {
|
|
37
|
+
/**
|
|
38
|
+
* The name of the help command to add to the application, or `false` to disable adding a help command.
|
|
39
|
+
*
|
|
40
|
+
* @defaultValue "help"
|
|
41
|
+
*/
|
|
42
|
+
command: string | false;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
type HelpPluginResolvedConfig = ThemePluginResolvedConfig & ConsolePluginResolvedConfig & ResolvedConfig & {
|
|
46
|
+
/**
|
|
47
|
+
* Resolved help configuration for the plugin.
|
|
48
|
+
*/
|
|
49
|
+
help: Required<Omit<HelpPluginOptions, "theme" | "console" | "command">> & {
|
|
50
|
+
/**
|
|
51
|
+
* The name of the help command to add to the application, or `false` to disable adding a help command.
|
|
52
|
+
*
|
|
53
|
+
* @defaultValue "help"
|
|
54
|
+
*/
|
|
55
|
+
command: string | false;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
type HelpPluginContext<TResolvedConfig extends HelpPluginResolvedConfig = HelpPluginResolvedConfig> = ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & Context<TResolvedConfig>;
|
|
59
|
+
//#endregion
|
|
60
|
+
export { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig };
|
|
61
|
+
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;UAiCiB,iBAAA;;AAAjB;;;;EAME,QAAA;EAUA;;;;;;;AAaF;EAbE,OAAA;;;;EAKA,KAAA,GAAQ,kBAAA;EAcK;;;EATb,OAAA,GAAU,oBAAA;AAAA;AAAA,KAGA,oBAAA,GAAuB,qBAAA,GACjC,uBAAA,GACA,UAAA;EAAA;;;EAIE,IAAA,EAAM,IAAA,CAAK,iBAAA;IAMT;;;AAIN;;IAJM,OAAA;EAAA;AAAA;AAAA,KAIM,wBAAA,GAA2B,yBAAA,GACrC,2BAAA,GACA,cAAA;EAIsB;;;EAApB,IAAA,EAAM,QAAA,CAAS,IAAA,CAAK,iBAAA;IAAN;;;;;IAMZ,OAAA;EAAA;AAAA;AAAA,KAIM,iBAAA,yBACc,wBAAA,GAA2B,wBAAA,IACjD,kBAAA,CAAmB,eAAA,IACrB,oBAAA,CAAqB,eAAA,IACrB,OAAA,CAAQ,eAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|