@gesslar/bedoc 1.10.0 → 2.0.0

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.
Files changed (89) hide show
  1. package/LICENSE.txt +12 -0
  2. package/README.md +15 -3
  3. package/dist/schema/bedoc.action.json +42 -0
  4. package/dist/types/Action.d.ts +3 -0
  5. package/dist/types/Action.d.ts.map +1 -0
  6. package/dist/types/BeDoc.d.ts +208 -0
  7. package/dist/types/BeDoc.d.ts.map +1 -0
  8. package/dist/types/Configuration.d.ts +11 -0
  9. package/dist/types/Configuration.d.ts.map +1 -0
  10. package/dist/types/ConfigurationParameters.d.ts +3 -0
  11. package/dist/types/ConfigurationParameters.d.ts.map +1 -0
  12. package/dist/types/Conveyor.d.ts +27 -0
  13. package/dist/types/Conveyor.d.ts.map +1 -0
  14. package/dist/types/Discovery.d.ts +215 -0
  15. package/dist/types/Discovery.d.ts.map +1 -0
  16. package/dist/types/Environment.d.ts +3 -0
  17. package/dist/types/Environment.d.ts.map +1 -0
  18. package/dist/types/Logger.d.ts +47 -0
  19. package/dist/types/Logger.d.ts.map +1 -0
  20. package/dist/types/Schema.d.ts +3 -0
  21. package/dist/types/Schema.d.ts.map +1 -0
  22. package/dist/types/cli.d.ts +2 -2
  23. package/dist/types/cli.d.ts.map +1 -10
  24. package/package.json +24 -23
  25. package/src/Action.js +9 -0
  26. package/src/BeDoc.js +276 -0
  27. package/src/CLIOutput.js +198 -0
  28. package/src/{core/Configuration.js → Configuration.js} +72 -58
  29. package/src/{core/ConfigurationParameters.js → ConfigurationParameters.js} +35 -27
  30. package/src/Conveyor.js +256 -0
  31. package/src/Discovery.js +442 -0
  32. package/src/Environment.js +8 -0
  33. package/src/{core/Logger.js → Logger.js} +30 -18
  34. package/src/Schema.js +6 -0
  35. package/src/cli.js +77 -34
  36. package/tsconfig.types.json +42 -0
  37. package/LICENSE +0 -24
  38. package/dist/types/core/ActionManager.d.ts +0 -58
  39. package/dist/types/core/ActionManager.d.ts.map +0 -10
  40. package/dist/types/core/Configuration.d.ts +0 -27
  41. package/dist/types/core/Configuration.d.ts.map +0 -10
  42. package/dist/types/core/ConfigurationParameters.d.ts +0 -38
  43. package/dist/types/core/ConfigurationParameters.d.ts.map +0 -10
  44. package/dist/types/core/Conveyor.d.ts +0 -49
  45. package/dist/types/core/Conveyor.d.ts.map +0 -10
  46. package/dist/types/core/Core.d.ts +0 -48
  47. package/dist/types/core/Core.d.ts.map +0 -10
  48. package/dist/types/core/Discovery.d.ts +0 -73
  49. package/dist/types/core/Discovery.d.ts.map +0 -10
  50. package/dist/types/core/HookManager.d.ts +0 -60
  51. package/dist/types/core/HookManager.d.ts.map +0 -10
  52. package/dist/types/core/Logger.d.ts +0 -63
  53. package/dist/types/core/Logger.d.ts.map +0 -10
  54. package/dist/types/core/action/ParseManager.d.ts +0 -8
  55. package/dist/types/core/action/ParseManager.d.ts.map +0 -10
  56. package/dist/types/core/action/PrintManager.d.ts +0 -8
  57. package/dist/types/core/action/PrintManager.d.ts.map +0 -10
  58. package/dist/types/core/util/ActionUtil.d.ts +0 -35
  59. package/dist/types/core/util/ActionUtil.d.ts.map +0 -10
  60. package/dist/types/core/util/DataUtil.d.ts +0 -52
  61. package/dist/types/core/util/DataUtil.d.ts.map +0 -10
  62. package/dist/types/core/util/FDUtil.d.ts +0 -171
  63. package/dist/types/core/util/FDUtil.d.ts.map +0 -10
  64. package/dist/types/core/util/ModuleUtil.d.ts +0 -27
  65. package/dist/types/core/util/ModuleUtil.d.ts.map +0 -10
  66. package/dist/types/core/util/StringUtil.d.ts +0 -5
  67. package/dist/types/core/util/StringUtil.d.ts.map +0 -10
  68. package/dist/types/core/util/TypeSpec.d.ts +0 -42
  69. package/dist/types/core/util/TypeSpec.d.ts.map +0 -10
  70. package/dist/types/core/util/ValidUtil.d.ts +0 -29
  71. package/dist/types/core/util/ValidUtil.d.ts.map +0 -10
  72. package/src/core/ActionManager.js +0 -147
  73. package/src/core/ContractManager.js +0 -112
  74. package/src/core/Conveyor.js +0 -185
  75. package/src/core/Core.js +0 -166
  76. package/src/core/Discovery.js +0 -403
  77. package/src/core/HookManager.js +0 -143
  78. package/src/core/action/ParseManager.js +0 -7
  79. package/src/core/action/PrintManager.js +0 -7
  80. package/src/core/contract/ParseContract.js +0 -7
  81. package/src/core/contract/PrintContract.js +0 -7
  82. package/src/core/util/ActionUtil.js +0 -53
  83. package/src/core/util/ContractUtil.js +0 -63
  84. package/src/core/util/DataUtil.js +0 -540
  85. package/src/core/util/FDUtil.js +0 -388
  86. package/src/core/util/ModuleUtil.js +0 -40
  87. package/src/core/util/StringUtil.js +0 -11
  88. package/src/core/util/TypeSpec.js +0 -114
  89. package/src/core/util/ValidUtil.js +0 -50
@@ -1,63 +0,0 @@
1
- import ErrorStackParser from 'error-stack-parser';
2
- import * as vscode from 'vscode';
3
-
4
- interface LoggerOptions {
5
- name?: string;
6
- debugLevel?: number;
7
- env?: string;
8
- }
9
-
10
- type LogLevel = 'debug' | 'warn' | 'info' | 'error';
11
- type DebugLevel = 0 | 1 | 2 | 3 | 4;
12
-
13
- export declare const loggerColours: {
14
- debug: string[];
15
- info: string;
16
- warn: string;
17
- error: string;
18
- reset: string;
19
- };
20
-
21
- /**
22
- * Logger class
23
- *
24
- * Log levels:
25
- * - debug: Debugging information
26
- * - Debug levels
27
- * - 0: No/critical debug information, not error level, but should be logged
28
- * - 1: Basic debug information, startup, shutdown, etc
29
- * - 2: Intermediate debug information, discovery
30
- * - 3: Detailed debug information, parsing, processing, etc
31
- * - 4: Very detailed debug information, nerd mode!
32
- * - warn: Warning information
33
- * - info: Informational information
34
- * - error: Error information
35
- */
36
- export default class Logger {
37
- constructor(options?: LoggerOptions);
38
-
39
- readonly vscodeError?: typeof vscode.window.showErrorMessage;
40
- readonly vscodeWarn?: typeof vscode.window.showWarningMessage;
41
- readonly vscodeInfo?: typeof vscode.window.showInformationMessage;
42
-
43
- get name(): string;
44
- get debugLevel(): number;
45
- get options(): Required<Pick<LoggerOptions, 'name' | 'debugLevel'>>;
46
-
47
- setOptions(options: LoggerOptions): void;
48
-
49
- lastStackLine(error?: Error, stepsRemoved?: number): ErrorStackParser.StackFrame;
50
- extractFileFunction(level?: DebugLevel): string;
51
-
52
- newDebug(tag?: string): (message: string, level?: DebugLevel, ...args: unknown[]) => void;
53
-
54
- debug(message: string, level?: DebugLevel, ...args: unknown[]): void;
55
- warn(message: string, ...args: unknown[]): void;
56
- info(message: string, ...args: unknown[]): void;
57
- error(message: string, ...args: unknown[]): void;
58
-
59
- #name: string | null;
60
- #debugLevel: number;
61
- #compose(level: LogLevel, message: string, debugLevel?: DebugLevel): string;
62
- }
63
- //# sourceMappingURL=Logger.d.ts.map
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "file": "Logger.d.ts",
4
- "sourceRoot": "",
5
- "sources": [
6
- "../../../src/core/Logger.js"
7
- ],
8
- "names": [],
9
- "mappings": "AAkDA;;;;;;;;;;;;;;;;GAgBG;AAEH;IAIE,0BAWC;IALK,iBAAiD;IACjD,gBAAkD;IAClD,gBAAsD;IAK5D,gBAEC;IAED,yBAEC;IAED;;;MAKC;IAED,+BAGC;IAWD,iFAGC;IAED,4CAoCC;IAED,wBAKC;IAED,yDAGC;IAED,wCAGC;IAED,wCAGC;IAED,yCAGC;;CACF;6BA7J4B,oBAAoB"
10
- }
@@ -1,8 +0,0 @@
1
- import ActionManager from '../ActionManager';
2
- import Logger from '../Logger';
3
- import { ActionDefinition } from "../ActionManager";
4
-
5
- export default class ParseManager extends ActionManager {
6
- constructor(actionDefinition: ActionDefinition, logger: Logger);
7
- }
8
- //# sourceMappingURL=ParseManager.d.ts.map
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "file": "ParseManager.d.ts",
4
- "sourceRoot": "",
5
- "sources": [
6
- "../../../../src/core/action/ParseManager.js"
7
- ],
8
- "names": [],
9
- "mappings": "AAEA;IACE,gDAEC;CACF;0BANyB,qBAAqB"
10
- }
@@ -1,8 +0,0 @@
1
- import ActionManager from '../ActionManager';
2
- import Logger from '../Logger';
3
- import { ActionDefinition } from "../ActionManager";
4
-
5
- export default class PrintManager extends ActionManager {
6
- constructor(actionDefinition: ActionDefinition, logger: Logger);
7
- }
8
- //# sourceMappingURL=PrintManager.d.ts.map
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "file": "PrintManager.d.ts",
4
- "sourceRoot": "",
5
- "sources": [
6
- "../../../../src/core/action/PrintManager.js"
7
- ],
8
- "names": [],
9
- "mappings": "AAEA;IACE,gDAEC;CACF;0BANyB,qBAAqB"
10
- }
@@ -1,35 +0,0 @@
1
- import { FileMap } from './FDUtil';
2
-
3
- type ActionType = 'parse' | 'print';
4
-
5
- interface ActionMeta {
6
- action: ActionType;
7
- language?: string;
8
- format?: string;
9
- }
10
-
11
- interface ActionRequirement {
12
- action: ActionType;
13
- }
14
-
15
- type ActionMetaRequirement = ActionRequirement | keyof ActionMeta;
16
-
17
- export const actionMetaRequirements: Readonly<Record<ActionType, ActionMetaRequirement[]>>;
18
- export const actionTypes: readonly ActionType[];
19
-
20
- /**
21
- * Loads a JSON file asynchronously
22
- *
23
- * @param jsonFileObject - The JSON file to load
24
- * @returns The parsed JSON content
25
- */
26
- export function loadJson(jsonFileObject: FileMap): Record<string, unknown>;
27
-
28
- /**
29
- * Loads the package.json file asynchronously
30
- *
31
- * @param basePath - The base path to use
32
- * @returns The parsed package.json content
33
- */
34
- export function loadPackageJson(basePath?: string | FileMap | null): Record<string, unknown>;
35
- //# sourceMappingURL=ActionUtil.d.ts.map
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "file": "ActionUtil.d.ts",
4
- "sourceRoot": "",
5
- "sources": [
6
- "../../../../src/core/util/ActionUtil.js"
7
- ],
8
- "names": [],
9
- "mappings": "AAQA;;;;;;;GAGE;AALF,4CAA8C;AAO9C;;;;;GAKG;AACH,yCAHW,MAAM,GACJ,MAAM,CAOlB;AAED;;;;;GAKG;AACH,2CAHW,MAAM,GAAC,MAAM,GACX,MAAM,CAOlB"
10
- }
@@ -1,52 +0,0 @@
1
- import Logger from '../Logger';
2
- import TypeSpec from './TypeSpec';
3
-
4
- type PrimitiveType = 'undefined' | 'boolean' | 'number' | 'bigint' | 'string' | 'symbol' | 'object' | 'function';
5
- type ConstructorType = 'object' | 'array' | 'function' | 'date' | 'regexp' | 'error' | 'map' | 'set' | 'weakmap' | 'weakset' | 'promise' | 'int8array' | 'uint8array' | 'float32array' | 'float64array';
6
- type DataType = PrimitiveType | ConstructorType;
7
-
8
- export const dataTypes: readonly DataType[];
9
- export const emptyableTypes: readonly ['string', 'array', 'object'];
10
-
11
- interface TypeSpecOptions {
12
- allowEmpty?: boolean;
13
- }
14
-
15
- interface SchemaCompareResult {
16
- status: 'success' | 'error';
17
- errors: Error[];
18
- }
19
-
20
- export function allocateObject<T>(source: string[], spec: T[] | ((source: string[]) => Promise<T[]>)): Promise<Record<string, T>>;
21
- export function appendString(str: string, append: string): string;
22
- export function prependString(str: string, prepend: string): string;
23
- export function arrayIntersection<T>(arr1: T[], arr2: T[]): T[];
24
- export function arrayPad<T>(arr: T[], length: number, value: T, position?: 0 | -1): T[];
25
- export function isArrayUniform(arr: unknown[], type?: string): boolean;
26
- export function isArrayUnique<T>(arr: T[]): T[];
27
-
28
- export function cloneObject<T extends Record<string, unknown>>(obj: T, freeze?: boolean): T;
29
- export function deepFreezeObject<T extends Record<string, unknown>>(obj: T): Readonly<T>;
30
- export function isObjectEmpty(obj: Record<string, unknown>): boolean;
31
-
32
- export function mapObject<T extends Record<string, unknown>>(
33
- original: T,
34
- transformer: (key: string, value: unknown) => Promise<unknown>,
35
- mutate?: boolean
36
- ): Promise<T>;
37
-
38
- export function isNothing(value: unknown): value is null | undefined;
39
- export function isEmpty(value: unknown, checkForNothing?: boolean): boolean;
40
- export function isType(value: unknown, type: string | TypeSpec, options: TypeSpecOptions): boolean;
41
- export function isBaseType(value: unknown, type: DataType): boolean;
42
- export function isValidType(type: string): type is DataType;
43
- export function typeOf(value: unknown): DataType;
44
-
45
- export function newTypeSpec(str: string, options?: TypeSpecOptions): TypeSpec;
46
-
47
- export function schemaCompare(
48
- schema: Record<string, unknown>,
49
- definition: Record<string, unknown>,
50
- stack?: string[],
51
- logger?: Logger
52
- ): SchemaCompareResult;
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "file": "DataUtil.d.ts",
4
- "sourceRoot": "",
5
- "sources": [
6
- "../../../../src/core/util/DataUtil.js"
7
- ],
8
- "names": [],
9
- "mappings": "AAwCA,iCAA8E;AAE9E,sCAAoD;AAwGpD;;;;;;GAMG;AACH,uCAJW,GAAG,QACH,GAAG,WAAS,GACV,OAAO,CAAC,MAAM,CAAC,CA2C3B;AAtJD;;;;;;GAMG;AACH,qCAJW,MAAM,UACN,MAAM,GACJ,MAAM,CAIlB;AAqCD;;;;;;GAMG;AACH,mEAEC;AAED;;;;;;;;;GASG;AACH,6CALW,MAAM,SACN,GAAG,aACH,MAAM,SAgBhB;AAED;;;;;;GAMG;AACH,iCAJW,MAAM,WACN,OAAO,GACL,MAAM,CAalB;AAqND;;;;;GAKG;AACH,sCAHW,MAAM,GACJ,MAAM,CAmBlB;AA1TD;;;;;;;GAOG;AACH,iDAJW,MAAM,GAEJ,OAAO,CAMnB;AAED;;;;;GAKG;AACH,iDAEC;AAkLD;;;;;;;;GAQG;AACH,kCAJW,GAAG,QACH,MAAM,GACJ,OAAO,CAgCnB;AAsBD;;;;;;;;GAQG;AACH,+BALW,GAAG,oBACH,OAAO,GAEL,OAAO,CAqBnB;AAtCD;;;;;GAKG;AACH,iCAHW,GAAG,GACD,OAAO,CAInB;AA1GD;;;;;GAKG;AACH,mCAHW,MAAM,GACJ,OAAO,CAInB;AAcD;;;;;;;GAOG;AACH,8BALW,GAAG,QACH,MAAM,GAAC,QAAQ,WACf,MAAM,GACJ,OAAO,CAOnB;AAED;;;;;GAKG;AACH,kCAHW,MAAM,GACJ,OAAO,CAInB;AApED;;;;;;;GAOG;AACH,oCALW,MAAM,kCAEN,OAAO,GACL,OAAO,CAAC,MAAM,CAAC,CAe3B;AAYD;;;;;;;GAOG;AACH,oCAJW,MAAM,WACN,MAAM,GACJ,MAAM,EAAE,CAIpB;AAxLD;;;;;;GAMG;AACH,sCAJW,MAAM,WACN,MAAM,GACJ,MAAM,CAIlB;AA8TD;;;;;;;;GAQG;AACH,sCANW,MAAM,cACN,MAAM,0BAEN,MAAM,GACJ,OAAO,CA+DnB;AAjJD;;;;;GAKG;AACH,8BAHW,GAAG,GACD,MAAM,CAIlB;qBA1ToB,eAAe"
10
- }
@@ -1,171 +0,0 @@
1
- export type FDType = 'file' | 'directory';
2
-
3
- export interface FileMap {
4
- path: string;
5
- uri: string;
6
- absolutePath: string;
7
- absoluteUri: string;
8
- name: string;
9
- module: string;
10
- extension: string;
11
- isFile: true;
12
- isDirectory: false;
13
- directory?: DirMap;
14
- }
15
-
16
- export interface DirMap {
17
- path: string;
18
- uri: string;
19
- absolutePath: string;
20
- absoluteUri: string;
21
- name: string;
22
- separator: string;
23
- isFile: false;
24
- isDirectory: true;
25
- }
26
-
27
- export interface FilenameParts {
28
- basename: string;
29
- dirname: string;
30
- extname: string;
31
- }
32
-
33
- export const fdType: Readonly<Record<Uppercase<FDType>, FDType>>;
34
- export const fdTypes: readonly FDType[];
35
-
36
- /**
37
- * Compose a directory map from a path
38
- *
39
- * @param directory - The directory
40
- * @returns A directory object
41
- */
42
- export function composeDirectory(directory: string): DirMap;
43
- /**
44
- * Compose a file path from a directory and a file
45
- *
46
- * @param directoryNameorObject - The directory
47
- * @param fileName - The file
48
- * @returns A file object
49
- */
50
- export function composeFilename(directoryNameorObject: string | DirMap, fileName: string): FileMap;
51
- /**
52
- * Deconstruct a filename into parts
53
- *
54
- * @param fileName - The filename to deconstruct
55
- * @returns The filename parts
56
- */
57
- export function deconstructFilenameToParts(fileName: string): FilenameParts;
58
- /**
59
- * Fix slashes in a path
60
- *
61
- * @param pathName - The path to fix
62
- * @returns The fixed path
63
- */
64
- export function fixSlashes(pathName: string): string;
65
- /**
66
- * Retrieve all files matching a specific glob pattern.
67
- *
68
- * @param globPattern - The glob pattern(s) to search.
69
- * @returns An array of file objects
70
- * @throws Throws an error for invalid input or search failure.
71
- */
72
- export function getFiles(globPattern: string | string[]): Promise<FileMap[]>;
73
- /**
74
- * Lists the contents of a directory.
75
- *
76
- * @param directory - The directory to list.
77
- * @returns The files and sub-directories in the directory.
78
- */
79
- export function ls(directory: string): Promise<{
80
- files: FileMap[];
81
- directories: DirMap[];
82
- }>;
83
- /**
84
- * Map a directory to a DirMap
85
- *
86
- * @param directoryName - The directory to map
87
- * @returns A directory object
88
- */
89
- export function mapDirectory(directoryName: string): DirMap;
90
- /**
91
- * Map a file to a FileMap
92
- *
93
- * @param {string} fileName - The file to map
94
- * @returns A file object
95
- */
96
-
97
- /**
98
- * Check if a file can be read
99
- *
100
- * @param fileObject - The file object to check
101
- * @returns Whether the file can be read
102
- */
103
- export function canReadFile(fileObject: FileMap): boolean;
104
-
105
- /**
106
- * Check if a file can be written
107
- *
108
- * @param fileObject - The file object to check
109
- * @returns Whether the file can be written
110
- */
111
- export function canWriteFile(fileObject: FileMap): boolean;
112
-
113
- /**
114
- * Check if a file exists
115
- *
116
- * @param fileObject - The file object to check
117
- * @returns Whether the file exists
118
- */
119
- export function fileExists(fileObject: FileMap): boolean;
120
-
121
- /**
122
- * Returns a FileMap object for the specified file.
123
- *
124
- * @param fileName - The file to map
125
- * @returns A file object
126
- */
127
- export function mapFilename(fileName: string): FileMap;
128
- /**
129
- * Convert a path to a URI
130
- *
131
- * @param pathName - The path to convert
132
- * @returns The URI
133
- */
134
- export function pathToUri(pathName: string): string;
135
- /**
136
- * Reads the content of a file synchronously.
137
- *
138
- * @param fileObject - The file map containing the file path
139
- * @returns The file contents
140
- */
141
- export function readFile(fileObject: FileMap): string;
142
- /**
143
- * Resolves a path to an absolute path
144
- *
145
- * @param directoryName - The path to resolve
146
- * @returns The directory object
147
- */
148
- export function resolveDirectory(directoryName: string): DirMap;
149
- /**
150
- * Resolves a file to an absolute path
151
- *
152
- * @param fileName - The file to resolve
153
- * @param directoryObject - The directory object to resolve the file in
154
- * @returns A file object (validated)
155
- */
156
- export function resolveFilename(fileName: string, directoryObject?: DirMap | null): FileMap;
157
- /**
158
- * Convert a URI to a path
159
- *
160
- * @param pathName - The URI to convert
161
- * @returns The path
162
- */
163
- export function uriToPath(pathName: string): string;
164
- /**
165
- * Writes content to a file synchronously.
166
- *
167
- * @param fileObject - The file map containing the file path
168
- * @param content - The content to write
169
- */
170
- export function writeFile(fileObject: FileMap, content: string): void;
171
- //# sourceMappingURL=FDUtil.d.ts.map
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "file": "FDUtil.d.ts",
4
- "sourceRoot": "",
5
- "sources": [
6
- "../../../../src/core/util/FDUtil.js"
7
- ],
8
- "names": [],
9
- "mappings": "AAgBA,yBAAkE;AAFlE,0BAA6C;AA0N7C;;;;;GAKG;AACH,4CAHW,MAAM,GACJ,MAAM,CAIlB;AAjJD;;;;;;GAMG;AACH,uDAJW,MAAM,GAAC,MAAM,YACb,MAAM,GACJ,MAAM,CAiBlB;AAyCD;;;;;GAKG;AACH,qDAHW,MAAM,GACJ,MAAM,CAMlB;AAtJD;;;;;GAKG;AACH,qCAHW,MAAM,GACJ,MAAM,CAIlB;AAgJD;;;;;;GAMG;AACH,sCAJW,MAAM,GAAC,MAAM,EAAE,GACb,OAAO,CAAC,MAAM,EAAE,CAAC,CA+B7B;AAqCD;;;;;;GAMG;AACH,8BAJW,MAAM,GACJ,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAAC,CAAC,CAsB7D;AAjID;;;;;GAKG;AACH,4CAHW,MAAM,GACJ,MAAM,CAalB;AArCD;;;;;GAKG;AACH,sCAHW,MAAM,GACJ,MAAM,CAclB;AA7GD;;;;;;GAMG;AACH,oCAJW,MAAM,GACJ,MAAM,CAUlB;AAoOD;;;;;GAKG;AACH,qCAHW,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,CAW3B;AA9ED;;;;;;GAMG;AACH,gDAJW,MAAM,GACJ,MAAM,CAmBlB;AA1KD;;;;;;;;GAQG;AACH,0CANW,MAAM,oBACN,MAAM,GAEJ,MAAM,CA2BlB;AAjDD;;;;;;GAMG;AACH,oCAJW,MAAM,GACJ,MAAM,CAUlB;AAqOD;;;;;GAKG;AACH,sCAHW,MAAM,WACN,MAAM,QAShB"
10
- }
@@ -1,27 +0,0 @@
1
- import { FileMap } from './FDUtil';
2
-
3
- export default class ModuleUtil {
4
- /**
5
- * Requires a module synchronously
6
- *
7
- * @param {FileMap} fileObject - The file to require
8
- * @returns {unknown} The required module
9
- */
10
- static require(fileObject: FileMap): unknown;
11
-
12
- /**
13
- * Loads a JSON file asynchronously
14
- *
15
- * @param {FileMap} jsonFileObject - The JSON file to load
16
- * @returns {Promise<Record<string, unknown>>} The parsed JSON content
17
- */
18
- static loadJson(jsonFileObject: FileMap): Promise<Record<string, unknown>>;
19
-
20
- /**
21
- * Loads the package.json file asynchronously
22
- *
23
- * @returns {Promise<Record<string, unknown>>} The parsed package.json content
24
- */
25
- static loadPackageJson(): Promise<Record<string, unknown>>;
26
- }
27
- //# sourceMappingURL=ModuleUtil.d.ts.map
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "file": "ModuleUtil.d.ts",
4
- "sourceRoot": "",
5
- "sources": [
6
- "../../../../src/core/util/ModuleUtil.js"
7
- ],
8
- "names": [],
9
- "mappings": "AAGA;IACE;;;;;OAKG;IACH,2BAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;;;;OAKG;IACH,gCAHW,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,CAO3B;IAED;;;;OAIG;IACH,0BAFa,OAAO,CAAC,MAAM,CAAC,CAO3B;CACF"
10
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * Capitalizes the first letter of a string
3
- */
4
- export function capitalize(str: string): string;
5
- //# sourceMappingURL=StringUtil.d.ts.map
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "file": "StringUtil.d.ts",
4
- "sourceRoot": "",
5
- "sources": [
6
- "../../../../src/core/util/StringUtil.js"
7
- ],
8
- "names": [],
9
- "mappings": "AAAA;;;;;GAKG;AACH,gCAHW,MAAM,GACJ,MAAM,CAIlB"
10
- }
@@ -1,42 +0,0 @@
1
- import { DataType } from './DataUtil';
2
-
3
- interface TypeSpecification {
4
- typeName: DataType;
5
- array: boolean;
6
- }
7
-
8
- interface TypeSpecOptions {
9
- delimiter?: string;
10
- allowEmpty?: boolean;
11
- }
12
-
13
- interface TypeSpecJSON {
14
- specs: TypeSpecification[];
15
- length: number;
16
- stringRepresentation: string;
17
- }
18
-
19
- export default class TypeSpec {
20
- constructor(typeString: string, options?: TypeSpecOptions);
21
-
22
- readonly specs: readonly TypeSpecification[];
23
- readonly length: number;
24
- readonly stringRepresentation: string;
25
-
26
- toString(): string;
27
- toJSON(): TypeSpecJSON;
28
-
29
- forEach(callback: (spec: TypeSpecification) => void): void;
30
- every(callback: (spec: TypeSpecification) => boolean): boolean;
31
- some(callback: (spec: TypeSpecification) => boolean): boolean;
32
- filter(callback: (spec: TypeSpecification) => boolean): TypeSpecification[];
33
- map<T>(callback: (spec: TypeSpecification) => T): T[];
34
- reduce<T>(callback: (acc: T, spec: TypeSpecification) => T, initialValue: T): T;
35
- find(callback: (spec: TypeSpecification) => boolean): TypeSpecification | undefined;
36
-
37
- match(value: unknown, options?: TypeSpecOptions): boolean;
38
-
39
- #specs: TypeSpecification[];
40
- #parse(typeString: string, options?: TypeSpecOptions): void;
41
- }
42
- //# sourceMappingURL=TypeSpec.d.ts.map
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "file": "TypeSpec.d.ts",
4
- "sourceRoot": "",
5
- "sources": [
6
- "../../../../src/core/util/TypeSpec.js"
7
- ],
8
- "names": [],
9
- "mappings": "AAIA;IAGE,uCAQC;IAJC,aAAwB;IACxB,eAAgC;IAChC,6BAA2C;IAI7C,mBAMC;IAED;;;;MAOC;IAED,6BAEC;IACD,8BAEC;IACD,6BAEC;IACD,6BAEC;IACD,0BAEC;IACD,8CAEC;IACD,yBAEC;IAED,yCAqCC;;CAoBF"
10
- }
@@ -1,29 +0,0 @@
1
- import TypeSpec from './TypeSpec';
2
-
3
- interface ValidTypeOptions {
4
- allowEmpty?: boolean;
5
- }
6
-
7
- /**
8
- * Validates a value against a type
9
- *
10
- * @throws {Error} If the value does not match the expected type
11
- */
12
- export function validType(
13
- value: unknown,
14
- type: string | TypeSpec,
15
- options?: ValidTypeOptions,
16
- depth?: number
17
- ): void;
18
-
19
- /**
20
- * Asserts a condition
21
- *
22
- * @throws {Error} If the condition is not met, with optional argument in message
23
- */
24
- export function assert(
25
- condition: boolean,
26
- message: string,
27
- arg?: number | null
28
- ): asserts condition;
29
- //# sourceMappingURL=ValidUtil.d.ts.map
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "file": "ValidUtil.d.ts",
4
- "sourceRoot": "",
5
- "sources": [
6
- "../../../../src/core/util/ValidUtil.js"
7
- ],
8
- "names": [],
9
- "mappings": "AAsBA;;;;;;;;GAQG;AACH,kCANW,OAAO,WACP,MAAM,QAEN,MAAM,QAmBhB;AAzCD;;;;;;;GAOG;AACH,iCALW,GAAC,QACD,MAAM,YAEN,MAAM,QAQhB"
10
- }