yini-parser 1.1.0-beta → 1.2.0-beta

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 (91) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/dist/YINI.d.ts +143 -27
  3. package/dist/YINI.js +145 -174
  4. package/dist/YINI.js.map +1 -0
  5. package/dist/config/env.js +1 -0
  6. package/dist/config/env.js.map +1 -0
  7. package/dist/core/{ASTBuilder.d.ts → astBuilder.d.ts} +4 -4
  8. package/dist/core/{ASTBuilder.js → astBuilder.js} +81 -68
  9. package/dist/core/astBuilder.js.map +1 -0
  10. package/dist/core/{ErrorDataHandler.d.ts → errorDataHandler.d.ts} +9 -7
  11. package/dist/core/{ErrorDataHandler.js → errorDataHandler.js} +21 -61
  12. package/dist/core/errorDataHandler.js.map +1 -0
  13. package/dist/core/internalTypes.d.ts +121 -0
  14. package/dist/core/{types.js → internalTypes.js} +6 -0
  15. package/dist/core/internalTypes.js.map +1 -0
  16. package/dist/core/objectBuilder.d.ts +2 -2
  17. package/dist/core/objectBuilder.js +1 -0
  18. package/dist/core/objectBuilder.js.map +1 -0
  19. package/dist/core/options/failLevel.d.ts +3 -0
  20. package/dist/core/options/failLevel.js +27 -0
  21. package/dist/core/options/failLevel.js.map +1 -0
  22. package/dist/core/options/normalizeOptions.d.ts +5 -0
  23. package/dist/core/options/normalizeOptions.js +53 -0
  24. package/dist/core/options/normalizeOptions.js.map +1 -0
  25. package/dist/core/options/parserOptionsConstants.d.ts +7 -0
  26. package/dist/core/options/parserOptionsConstants.js +37 -0
  27. package/dist/core/options/parserOptionsConstants.js.map +1 -0
  28. package/dist/core/pipeline.d.ts +18 -0
  29. package/dist/{parseEntry.js → core/pipeline.js} +82 -215
  30. package/dist/core/pipeline.js.map +1 -0
  31. package/dist/core/resultMetadataBuilder.d.ts +19 -0
  32. package/dist/core/resultMetadataBuilder.js +166 -0
  33. package/dist/core/resultMetadataBuilder.js.map +1 -0
  34. package/dist/core/runtime.d.ts +17 -0
  35. package/dist/core/runtime.js +189 -0
  36. package/dist/core/runtime.js.map +1 -0
  37. package/dist/dev/main.d.ts +1 -0
  38. package/dist/dev/main.js +374 -0
  39. package/dist/dev/main.js.map +1 -0
  40. package/dist/grammar/{YiniLexer.js → generated/YiniLexer.js} +1 -0
  41. package/dist/grammar/generated/YiniLexer.js.map +1 -0
  42. package/dist/grammar/{YiniParser.js → generated/YiniParser.js} +1 -0
  43. package/dist/grammar/generated/YiniParser.js.map +1 -0
  44. package/dist/grammar/{YiniParserVisitor.js → generated/YiniParserVisitor.js} +1 -0
  45. package/dist/grammar/generated/YiniParserVisitor.js.map +1 -0
  46. package/dist/index.d.ts +40 -1
  47. package/dist/index.js +60 -359
  48. package/dist/index.js.map +1 -0
  49. package/dist/parsers/extractHeaderParts.d.ts +2 -2
  50. package/dist/parsers/extractHeaderParts.js +2 -1
  51. package/dist/parsers/extractHeaderParts.js.map +1 -0
  52. package/dist/parsers/extractSignificantYiniLine.js +2 -1
  53. package/dist/parsers/extractSignificantYiniLine.js.map +1 -0
  54. package/dist/parsers/parseBoolean.js +1 -0
  55. package/dist/parsers/parseBoolean.js.map +1 -0
  56. package/dist/parsers/parseNull.js +1 -0
  57. package/dist/parsers/parseNull.js.map +1 -0
  58. package/dist/parsers/parseNumber.js +1 -0
  59. package/dist/parsers/parseNumber.js.map +1 -0
  60. package/dist/parsers/parseSectionHeader.d.ts +3 -3
  61. package/dist/parsers/parseSectionHeader.js +2 -1
  62. package/dist/parsers/parseSectionHeader.js.map +1 -0
  63. package/dist/parsers/parseString.js +3 -3
  64. package/dist/parsers/parseString.js.map +1 -0
  65. package/dist/types/index.d.ts +198 -0
  66. package/dist/types/index.js +4 -0
  67. package/dist/types/index.js.map +1 -0
  68. package/dist/utils/number.js +1 -0
  69. package/dist/utils/number.js.map +1 -0
  70. package/dist/utils/object.d.ts +12 -0
  71. package/dist/utils/object.js +41 -1
  72. package/dist/utils/object.js.map +1 -0
  73. package/dist/utils/pathAndFileName.js +1 -0
  74. package/dist/utils/pathAndFileName.js.map +1 -0
  75. package/dist/utils/print.d.ts +2 -2
  76. package/dist/utils/print.js +11 -6
  77. package/dist/utils/print.js.map +1 -0
  78. package/dist/utils/string.d.ts +5 -0
  79. package/dist/utils/string.js +10 -1
  80. package/dist/utils/string.js.map +1 -0
  81. package/dist/utils/system.js +1 -0
  82. package/dist/utils/system.js.map +1 -0
  83. package/dist/{yiniHelpers.d.ts → utils/yiniHelpers.d.ts} +1 -1
  84. package/dist/{yiniHelpers.js → utils/yiniHelpers.js} +3 -2
  85. package/dist/utils/yiniHelpers.js.map +1 -0
  86. package/package.json +7 -5
  87. package/dist/core/types.d.ts +0 -249
  88. package/dist/parseEntry.d.ts +0 -3
  89. /package/dist/grammar/{YiniLexer.d.ts → generated/YiniLexer.d.ts} +0 -0
  90. /package/dist/grammar/{YiniParser.d.ts → generated/YiniParser.d.ts} +0 -0
  91. /package/dist/grammar/{YiniParserVisitor.d.ts → generated/YiniParserVisitor.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,28 @@
2
2
 
3
3
  ## --dev/uppcoming--
4
4
 
5
+ ## 1.2.0-beta - 2025 Sep
6
+ - **Fixed:** `parseFile()` now correctly passes through all options (e.g. `includeDiagnostics`) so they work and matches as in `parse(..)`.
7
+ - **Fixed:** typo (`in in`) in file parsing error message.
8
+ - **Updated:** metadata structure bumped to version 1.1.0, and below added (among other things):
9
+ ```ts
10
+ preservesOrder: true // Member/section order: platform-, implementation-, and language-specific. Not mandated by the YINI spec.
11
+ orderGuarantee: 'implementation-defined'
12
+ orderNotes?: string
13
+ ```
14
+ - **Refactored:** the static public (user-facing) YINI class to use per-invocation runtime state, preventing race conditions in runtime info when multiple calls to `parse(..)` / `parseFile(..)` run in parallel.
15
+ - **Refactored file layout:** Moved and renamed files in `src/`
16
+ * File `src/parseEntry.ts` renamed and moved to `src/src/pipeline.ts`,
17
+ - And in that file, rename the method/function `_parseEntry(..)` to `runPipeline(..)`.
18
+ * Renamed the file `core/types.ts` to `core/internalTypes.ts`
19
+ - And moved public (user-facing) types and interfaces into its own file `src/types/index.ts`.
20
+ * Moved the file `src/yiniHelpers.ts` to `src/utils/yiniHelpers.ts`.
21
+ - **Renamed:** `includeMetaData` to `includeMetadata`.
22
+ - **Updated:** Codebase now consistently uses the `ParsedObject` type,
23
+ replacing the older `TJSObject` type for representing parsed YINI.
24
+ - **Docs:** Expanded and improved TSDoc of several of the functions in the public API.
25
+ - **Internal:** Unit tests are now colocated with their source code files in `src/**`. So there is 1:1 visibility between code and its unit tests, and less chance of missing coverage, etc.
26
+
5
27
  ## 1.1.0-beta - 2025 Sep
6
28
  ### Parser
7
29
  - **Reimplemented parser from scratch** (`core/ASTBuilder.ts`) using the refactored grammar for a much cleaner and more maintainable design.
@@ -15,7 +37,7 @@
15
37
  const config= YINI.parse(yini, {
16
38
  strictMode: false,
17
39
  failLevel: 'auto',
18
- includeMetaData: false,
40
+ includeMetadata: false,
19
41
  requireDocTerminator: false,
20
42
  })
21
43
  ```
package/dist/YINI.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IAllUserOptions, TJSObject, TPreferredFailLevel } from './core/types';
1
+ import { AllUserOptions, ParsedObject, PreferredFailLevel, YiniParseResult } from './types';
2
2
  /**
3
3
  * This class is the public API, which exposes only parse(..) and
4
4
  * parseFile(..), rest of the implementation details are hidden.
@@ -18,49 +18,165 @@ export default class YINI {
18
18
  /**
19
19
  * Parse inline YINI content into a JavaScript object.
20
20
  *
21
- * @param yiniContent YINI code as a string (multi‑line content supported).
22
- * @param strictMode If `true`, enforce strict parsing rules (e.g. require `/END`, disallow trailing commas).
23
- * @param failLevel Preferred bail sensitivity level, controls how errors and warnings are handled:
24
- * - `'auto'` (default) : Auto‑select level (strict→1, lenient→0)
25
- * - `0` / `'Ignore-Errors'` : Continue parsing despite errors; log them and attempt recovery.
26
- * - `1` / `'Abort-on-Errors'` : Stop parsing on the first error.
27
- * - `2` / `'Abort-Even-on-Warnings'`: Stop parsing on the first warning **or** error.
28
- * @param includeMetaData If `true`, return additional metadata (e.g. warnings, statistics) alongside the parsed object.
29
- *
30
- * @returns A JavaScript object representing the parsed YINI content.
21
+ * @param yiniContent YINI code as a string (multi‑line content supported).
22
+ * @param strictMode If `true`, enforce strict parsing rules (e.g. require `/END`, disallow trailing commas).
23
+ * @param failLevel Preferred bail sensitivity level, controls how errors and warnings are handled:
24
+ * - `'auto'` (default) : Auto‑select level (strict `'errors'`, lenient `'ignore-errors'`)
25
+ * - `'ignore-errors'` : Continue parsing despite errors; log them and attempt recovery.
26
+ * - `'errors'` : Stop parsing on the first error.
27
+ * - `'warnings-and-errors'` : Stop parsing on the first warning **or** error.
28
+ * @param includeMetadata If `true`, return additional metadata (e.g. warnings, statistics) alongside the parsed object.
29
+ *
30
+ * @returns The parsed YINI content.
31
+ *
32
+ * By default (`includeMetadata = false`), this method returns a plain JavaScript object:
33
+ *
34
+ * `
35
+ * export type ParsedObject = any
36
+ * `
37
+ *
38
+ * If `includeMetadata = true`, the return value is wrapped in a container that also
39
+ * includes parsing metadata:
40
+ *
41
+ * `
42
+ * export interface YiniParseResult {
43
+ * result: ParsedObject
44
+ * meta: ResultMetadata
45
+ * }
46
+ * `
31
47
  */
32
- static parse(yiniContent: string, strictMode?: boolean, failLevel?: TPreferredFailLevel, includeMetaData?: boolean): TJSObject;
48
+ static parse(yiniContent: string, strictMode?: boolean, failLevel?: PreferredFailLevel, includeMetadata?: boolean): ParsedObject | YiniParseResult;
33
49
  /**
34
50
  * Parse inline YINI content into a JavaScript object, using an options object for configuration.
35
51
  *
36
52
  * @param yiniContent YINI code as a string (multi‑line content supported).
37
53
  * @param options Optional settings to customize parsing and/or results, useful if you need more control.
54
+ * For all options, see types/IAllUserOptions.
55
+ *
56
+ * @param options.failLevel - Minimum severity that should cause the parse to fail.
57
+ * Accepts:
58
+ * `'ignore-errors'` - Don't bail/fail on error, persist and try to recover.
59
+ * `'errors'` - Stop parsing on the first error.
60
+ * `'warnings-and-errors'` - Stop parsing on the first warning or error.
61
+ * (Type: TPreferredFailLevel; exact behavior is implementation-defined.)
62
+ * @param options.includeDiagnostics - Include diagnostics in the returned metadata.
63
+ * Requires: `includeMetadata = true`. Ignored otherwise.
64
+ * @param options.includeMetadata - Attach a metadata object to the parse result
65
+ * (e.g., timings, diagnostics).
66
+ * @param options.includeTiming - Include timing information for parser phases in metadata.
67
+ * Requires: `includeMetadata = true`. Ignored otherwise.
68
+ * @param options.onDuplicateKey - Strategy/handler when encountering a duplicate key.
69
+ * Allowed values: `'warn-and-keep-first'` | `'warn-and-overwrite'` | `'keep-first'` (silent, first wins) | `'overwrite'` (silent, last wins) | `'error'`.
70
+ * @param options.preserveUndefinedInMeta - Keep properties with value `undefined` inside
71
+ * the returned metadata. Requires: `includeMetadata = true`. Ignored otherwise.
72
+ * @param options.requireDocTerminator - Controls whether a document terminator is required.
73
+ * Allowed values: `'optional'` | `'warn-if-missing'` | `'required'`.
74
+ * @param options.strictMode - Enable stricter syntax and well-formedness checks according
75
+ * to the spec (exact rules are implementation-defined).
76
+ * @param options.suppressWarnings - Suppress warnings sent to the console/log.
77
+ * Does not affect warnings included in returned metadata.
78
+ * @param options.treatEmptyValueAsNull - How to treat an explicitly empty value on the
79
+ * right-hand side of '='. Allowed values: `'allow'` | `'allow-with-warning'` | `'disallow'`.
80
+ *
81
+ * @returns The parsed YINI content.
82
+ *
83
+ * By default (`includeMetadata = false`), this method returns a plain JavaScript object:
84
+ *
85
+ * `
86
+ * export type ParsedObject = any
87
+ * `
88
+ *
89
+ * If `includeMetadata = true`, the return value is wrapped in a container that also
90
+ * includes parsing metadata:
38
91
  *
39
- * @returns A JavaScript object representing the parsed YINI content.
92
+ * `
93
+ * export interface YiniParseResult {
94
+ * result: ParsedObject
95
+ * meta: ResultMetadata
96
+ * }
97
+ * `
40
98
  */
41
- static parse(yiniContent: string, options?: IAllUserOptions): TJSObject;
99
+ static parse(yiniContent: string, options?: AllUserOptions): ParsedObject | YiniParseResult;
42
100
  /**
43
101
  * Parse a YINI file into a JavaScript object.
44
102
  *
45
- * @param yiniFile Path to the YINI file.
46
- * @param strictMode If `true`, enforce strict parsing rules (e.g. require `/END`, disallow trailing commas).
47
- * @param failLevel Preferred bail sensitivity level, controls how errors and warnings are handled:
48
- * - `'auto'` (default) : Auto‑select level (strict→1, lenient→0)
49
- * - `0` / `'Ignore-Errors'` : Continue parsing despite errors; log them and attempt recovery.
50
- * - `1` / `'Abort-on-Errors'` : Stop parsing on the first error.
51
- * - `2` / `'Abort-Even-on-Warnings'`: Stop parsing on the first warning **or** error.
52
- * @param includeMetaData If `true`, return additional metadata (e.g. warnings, statistics) alongside the parsed object.
53
- *
54
- * @returns A JavaScript object representing the parsed YINI content.
103
+ * @param yiniFile Path to the YINI file.
104
+ * @param strictMode If `true`, enforce strict parsing rules (e.g. require `/END`, disallow trailing commas).
105
+ * @param failLevel Preferred bail sensitivity level, controls how errors and warnings are handled:
106
+ * - `'auto'` (default) : Auto‑select level (strict `'errors'`, lenient `'ignore-errors'`)
107
+ * - `'ignore-errors'` : Continue parsing despite errors; log them and attempt recovery.
108
+ * - `'errors'` : Stop parsing on the first error.
109
+ * - `'warnings-and-errors'` : Stop parsing on the first warning **or** error.
110
+ * @param includeMetadata If `true`, return additional metadata (e.g. warnings, statistics) alongside the parsed object.
111
+ *
112
+ * @returns The parsed YINI content.
113
+ *
114
+ * By default (`includeMetadata = false`), this method returns a plain JavaScript object:
115
+ *
116
+ * `
117
+ * export type ParsedObject = any
118
+ * `
119
+ *
120
+ * If `includeMetadata = true`, the return value is wrapped in a container that also
121
+ * includes parsing metadata:
122
+ *
123
+ * `
124
+ * export interface YiniParseResult {
125
+ * result: ParsedObject
126
+ * meta: ResultMetadata
127
+ * }
128
+ * `
55
129
  */
56
- static parseFile(filePath: string, strictMode?: boolean, failLevel?: TPreferredFailLevel, includeMetaData?: boolean): TJSObject;
130
+ static parseFile(filePath: string, strictMode?: boolean, failLevel?: PreferredFailLevel, includeMetadata?: boolean): ParsedObject | YiniParseResult;
57
131
  /**
58
132
  * Parse a YINI file into a JavaScript object, using an options object for configuration.
59
133
  *
60
134
  * @param yiniFile Path to the YINI file.
61
135
  * @param options Optional settings to customize parsing and/or results, useful if you need more control.
136
+ * For all options, see types/IAllUserOptions.
137
+ *
138
+ * @param options.failLevel - Minimum severity that should cause the parse to fail.
139
+ * Accepts:
140
+ * `'ignore-errors'` - Don't bail/fail on error, persist and try to recover.
141
+ * `'errors'` - Stop parsing on the first error.
142
+ * `'warnings-and-errors'` - Stop parsing on the first warning or error.
143
+ * (Type: TPreferredFailLevel; exact behavior is implementation-defined.)
144
+ * @param options.includeDiagnostics - Include diagnostics in the returned metadata.
145
+ * Requires: `includeMetadata = true`. Ignored otherwise.
146
+ * @param options.includeMetadata - Attach a metadata object to the parse result
147
+ * (e.g., timings, diagnostics).
148
+ * @param options.includeTiming - Include timing information for parser phases in metadata.
149
+ * Requires: `includeMetadata = true`. Ignored otherwise.
150
+ * @param options.onDuplicateKey - Strategy/handler when encountering a duplicate key.
151
+ * Allowed values: `'warn-and-keep-first'` | `'warn-and-overwrite'` | `'keep-first'` (silent, first wins) | `'overwrite'` (silent, last wins) | `'error'`.
152
+ * @param options.preserveUndefinedInMeta - Keep properties with value `undefined` inside
153
+ * the returned metadata. Requires: `includeMetadata = true`. Ignored otherwise.
154
+ * @param options.requireDocTerminator - Controls whether a document terminator is required.
155
+ * Allowed values: `'optional'` | `'warn-if-missing'` | `'required'`.
156
+ * @param options.strictMode - Enable stricter syntax and well-formedness checks according
157
+ * to the spec (exact rules are implementation-defined).
158
+ * @param options.suppressWarnings - Suppress warnings sent to the console/log.
159
+ * Does not affect warnings included in returned metadata.
160
+ * @param options.treatEmptyValueAsNull - How to treat an explicitly empty value on the
161
+ * right-hand side of '='. Allowed values: `'allow'` | `'allow-with-warning'` | `'disallow'`.
162
+ *
163
+ * @returns The parsed YINI content.
164
+ *
165
+ * By default (`includeMetadata = false`), this method returns a plain JavaScript object:
166
+ *
167
+ * `
168
+ * export type ParsedObject = any
169
+ * `
170
+ *
171
+ * If `includeMetadata = true`, the return value is wrapped in a container that also
172
+ * includes parsing metadata:
62
173
  *
63
- * @returns A JavaScript object representing the parsed YINI content.
174
+ * `
175
+ * export interface YiniParseResult {
176
+ * result: ParsedObject
177
+ * meta: ResultMetadata
178
+ * }
179
+ * `
64
180
  */
65
- static parseFile(filePath: string, options?: IAllUserOptions): TJSObject;
181
+ static parseFile(filePath: string, options?: AllUserOptions): ParsedObject | YiniParseResult;
66
182
  }
package/dist/YINI.js CHANGED
@@ -1,50 +1,20 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const fs_1 = __importDefault(require("fs"));
7
- const perf_hooks_1 = require("perf_hooks");
8
3
  const env_1 = require("./config/env");
9
- const ErrorDataHandler_1 = require("./core/ErrorDataHandler");
10
- const parseEntry_1 = require("./parseEntry");
11
- const pathAndFileName_1 = require("./utils/pathAndFileName");
4
+ const errorDataHandler_1 = require("./core/errorDataHandler");
5
+ const normalizeOptions_1 = require("./core/options/normalizeOptions");
6
+ const runtime_1 = require("./core/runtime");
12
7
  const print_1 = require("./utils/print");
13
- const string_1 = require("./utils/string");
14
8
  const DEFAULT_TAB_SIZE = 4; // De facto "modern default" (even though traditionally/historically it's 8).
15
- let _runtimeInfo = {
16
- sourceType: 'Inline',
17
- fileName: undefined,
18
- fileByteSize: null,
19
- lineCount: null,
20
- timeIoMs: null,
21
- preferredBailSensitivity: null,
22
- sha256: null,
23
- };
24
- // Type guard: did the caller use the options-object form?
25
- const isOptionsObjectForm = (v) => {
26
- return (v != null &&
27
- typeof v === 'object' &&
28
- // Note: If one wants, this can be relax to "typeof v === 'object'"
29
- // but this keeps accidental booleans/strings out.
30
- ('strictMode' in v ||
31
- 'failLevel' in v ||
32
- 'includeMetaData' in v ||
33
- 'includeDiagnostics' in v ||
34
- 'includeTiming' in v ||
35
- 'preserveUndefinedInMeta' in v ||
36
- 'requireDocTerminator' in v));
37
- };
38
- // Initial default values.
39
- const DEFAULT_OPTS = {
40
- strictMode: false,
41
- failLevel: 'auto',
42
- includeMetaData: false,
43
- includeDiagnostics: false,
44
- includeTiming: false,
45
- preserveUndefinedInMeta: false,
46
- requireDocTerminator: false,
47
- };
9
+ // let _runtimeInfo: IRuntimeInfo = {
10
+ // sourceType: 'Inline',
11
+ // fileName: undefined,
12
+ // fileByteSize: null,
13
+ // lineCount: null,
14
+ // timeIoMs: null,
15
+ // preferredBailSensitivity: null,
16
+ // sha256: null,
17
+ // }
48
18
  /**
49
19
  * This class is the public API, which exposes only parse(..) and
50
20
  * parseFile(..), rest of the implementation details are hidden.
@@ -63,7 +33,8 @@ class YINI {
63
33
  */
64
34
  static setTabSize(spaces) {
65
35
  if (spaces < 1 || spaces > 32) {
66
- new ErrorDataHandler_1.ErrorDataHandler('None/Ignore').pushOrBail(null, 'Fatal-Error', `Invalid tab size ${spaces} is out of range.`, 'Tab size must be between 1 and 32 spaces.');
36
+ new errorDataHandler_1.ErrorDataHandler('None/Ignore').pushOrBail(null, 'Fatal-Error', `Invalid tab size ${spaces} is out of range.`, 'Tab size must be between 1 and 32 spaces.');
37
+ throw new RangeError(`Tab size ${spaces} is out of range (1–32).`);
67
38
  }
68
39
  this.g_tabSize = spaces;
69
40
  }
@@ -71,76 +42,67 @@ class YINI {
71
42
  // Implementation method (not declared with arrow function) for both method overload signatures.
72
43
  // NOTE: Must be method declaration with NO =, arrow functions not (currently) supported for this type of method overloading.
73
44
  static parse(yiniContent, arg2, // strictMode | options
74
- failLevel = DEFAULT_OPTS.failLevel, includeMetaData = DEFAULT_OPTS.includeMetaData) {
75
- var _a, _b, _c, _d, _e, _f, _g, _h;
45
+ failLevel = 'auto', includeMetadata = false) {
76
46
  (0, print_1.debugPrint)('-> Entered static parse(..) in class YINI\n');
77
- // Runtime guard to catch illegal/ambiguous calls coming from JS or any-cast code
78
- if (isOptionsObjectForm(arg2) &&
79
- (failLevel !== 'auto' || includeMetaData !== false)) {
80
- throw new TypeError('Invalid call: when providing an options object, do not also pass positional parameters.');
81
- }
82
- // Normalize to a fully-required options object.
83
- let userOpts;
84
- // Required, makes all properties in T required, no undefined.
85
- // const userOpts: Required<IAllUserOptions> = isOptionsObjectForm(arg2)
86
- if (isOptionsObjectForm(arg2)) {
87
- // Options-object Form.
88
- /* parse = (
89
- yiniContent: string,
90
- options: IAllUserOptions,
91
- )
92
- */
93
- userOpts = Object.assign(Object.assign({}, DEFAULT_OPTS), { strictMode: (_a = arg2.strictMode) !== null && _a !== void 0 ? _a : DEFAULT_OPTS.strictMode, failLevel: (_b = arg2.failLevel) !== null && _b !== void 0 ? _b : DEFAULT_OPTS.failLevel, includeMetaData: (_c = arg2.includeMetaData) !== null && _c !== void 0 ? _c : DEFAULT_OPTS.includeMetaData, includeDiagnostics: (_d = arg2.includeDiagnostics) !== null && _d !== void 0 ? _d : DEFAULT_OPTS.includeDiagnostics, includeTiming: (_e = arg2.includeTiming) !== null && _e !== void 0 ? _e : DEFAULT_OPTS.includeTiming, preserveUndefinedInMeta: (_f = arg2.preserveUndefinedInMeta) !== null && _f !== void 0 ? _f : DEFAULT_OPTS.preserveUndefinedInMeta, requireDocTerminator: (_g = arg2.requireDocTerminator) !== null && _g !== void 0 ? _g : DEFAULT_OPTS.requireDocTerminator });
94
- }
95
- else {
96
- // Positional form.
97
- /* parse = (
98
- yiniContent: string,
99
- strictMode?: boolean,
100
- failLevel?: TPreferredFailLevel,
101
- includeMetaData?: boolean,
102
- )
103
- */
104
- userOpts = Object.assign(Object.assign({}, DEFAULT_OPTS), { strictMode: (_h = arg2) !== null && _h !== void 0 ? _h : DEFAULT_OPTS.strictMode, failLevel,
105
- includeMetaData });
106
- }
107
- if (userOpts.includeMetaData && _runtimeInfo.sourceType === 'Inline') {
108
- const lineCount = yiniContent.split(/\r?\n/).length; // Counts the lines.
109
- const sha256 = (0, string_1.computeSha256)(yiniContent); // NOTE: Compute BEFORE any possible tampering of content.
110
- _runtimeInfo.lineCount = lineCount;
111
- _runtimeInfo.preferredBailSensitivity = userOpts.failLevel;
112
- _runtimeInfo.sha256 = sha256;
113
- }
114
- // NOTE: Important: Do not trim or mutate the yiniContent here, due
115
- // to it will mess up the line numbers in error reporting.
116
- if (!yiniContent) {
117
- throw new Error('Syntax-Error: Unexpected blank YINI input');
118
- }
119
- if (!yiniContent.endsWith('\n')) {
120
- yiniContent += '\n';
121
- }
122
- let level = 0;
123
- if (userOpts.failLevel === 'auto') {
124
- if (!userOpts.strictMode)
125
- level = 0;
126
- if (userOpts.strictMode)
127
- level = 1;
128
- }
129
- else {
130
- level = userOpts.failLevel;
131
- }
132
- const coreOpts = {
133
- isStrict: userOpts.strictMode,
134
- bailSensitivity: level,
135
- isIncludeMeta: userOpts.includeMetaData,
136
- isWithDiagnostics: (0, env_1.isDev)() || (0, env_1.isDebug)() || userOpts.includeDiagnostics,
137
- isWithTiming: (0, env_1.isDev)() || (0, env_1.isDebug)() || userOpts.includeTiming,
138
- isKeepUndefinedInMeta: (0, env_1.isDebug)() || userOpts.preserveUndefinedInMeta,
139
- isRequireDocTerminator: userOpts.requireDocTerminator,
140
- };
47
+ // // Runtime guard to catch illegal/ambiguous calls coming from JS or any-cast code
48
+ // if (
49
+ // isOptionsObjectForm(arg2) &&
50
+ // (failLevel !== 'auto' || includeMetadata !== false)
51
+ // ) {
52
+ // throw new TypeError(
53
+ // 'Invalid call: when providing an options object, do not also pass positional parameters.',
54
+ // )
55
+ // }
56
+ // const mode: TParserMode = inferModeFromArgs(arg2)
57
+ // const defaultOptions = getDefaultOptions(mode)
58
+ // // Normalize to a fully-required options object.
59
+ // let userOpts: Required<IAllUserOptions>
60
+ // // Required, makes all properties in T required, no undefined.
61
+ // if (isOptionsObjectForm(arg2)) {
62
+ // userOpts = {
63
+ // ...defaultOptions, // Sets the default options.
64
+ // ...arg2,
65
+ // }
66
+ // } else {
67
+ // // Positional form.
68
+ // userOpts = {
69
+ // ...defaultOptions, // Sets the default options.
70
+ // strictMode:
71
+ // (arg2 as boolean | undefined) ?? defaultOptions.strictMode,
72
+ // failLevel,
73
+ // includeMetadata,
74
+ // }
75
+ // }
76
+ // if (userOpts.includeMetadata && _runtimeInfo.sourceType === 'Inline') {
77
+ // const lineCount = yiniContent.split(/\r?\n/).length // Counts the lines.
78
+ // const sha256 = computeSha256(yiniContent) // NOTE: Compute BEFORE any possible tampering of content.
79
+ // _runtimeInfo.lineCount = lineCount
80
+ // _runtimeInfo.preferredBailSensitivity = userOpts.failLevel
81
+ // _runtimeInfo.sha256 = sha256
82
+ // }
83
+ // // NOTE: Important: Do not trim or mutate the yiniContent here, due
84
+ // // to it will mess up the line numbers in error reporting.
85
+ // if (!yiniContent) {
86
+ // throw new Error('Syntax-Error: Unexpected blank YINI input')
87
+ // }
88
+ // if (!yiniContent.endsWith('\n')) {
89
+ // yiniContent += '\n'
90
+ // }
91
+ // let level: TBailSensitivityLevel = mapFailLevelToBail(
92
+ // userOpts.strictMode,
93
+ // userOpts.failLevel,
94
+ // )
95
+ ////////////////
96
+ // const coreOpts: IParseCoreOptions = toCoreOptions(level, userOpts)
141
97
  (0, print_1.debugPrint)();
142
- (0, print_1.debugPrint)('==== Call parse ==========================');
143
- const result = (0, parseEntry_1._parseMain)(yiniContent, coreOpts, _runtimeInfo);
98
+ (0, print_1.debugPrint)('==== Call doParse(..) in runtime ==========================');
99
+ // const result = _parseMain(yiniContent, coreOpts, _runtimeInfo)
100
+ const runtime = new runtime_1.YiniRuntime('Inline');
101
+ const result = (0, normalizeOptions_1.isOptionsObjectForm)(arg2)
102
+ ? runtime.doParse(yiniContent, arg2) // Overload #2: (content, options)
103
+ : runtime.doParse(
104
+ // Overload #1: (content, strict?, failLevel?, includeMeta?)
105
+ yiniContent, arg2, failLevel, includeMetadata);
144
106
  (0, print_1.debugPrint)('==== End call parse ==========================\n');
145
107
  if ((0, env_1.isDev)()) {
146
108
  console.log();
@@ -155,73 +117,82 @@ class YINI {
155
117
  // Implementation method (not declared with arrow function) for both method overload signatures.
156
118
  // NOTE: Must be method declaration with NO =, arrow functions not (currently) supported for this type of method overloading.
157
119
  static parseFile(filePath, arg2, // strictMode | options
158
- failLevel = DEFAULT_OPTS.failLevel, includeMetaData = DEFAULT_OPTS.includeMetaData) {
159
- var _a, _b, _c, _d, _e, _f, _g, _h;
120
+ failLevel = 'auto', includeMetadata = false) {
160
121
  (0, print_1.debugPrint)('-> Entered static parseFile(..) in class YINI\n');
161
122
  (0, print_1.debugPrint)('Current directory = ' + process.cwd());
162
- // Runtime guard to catch illegal/ambiguous calls coming from JS or any-cast code
163
- if (isOptionsObjectForm(arg2) &&
164
- (failLevel !== 'auto' || includeMetaData !== false)) {
165
- throw new TypeError('Invalid call: when providing an options object, do not also pass positional parameters.');
166
- }
167
- // Normalize to a fully-required options object.
168
- let userOpts;
169
- // Required, makes all properties in T required, no undefined.
170
- // const userOpts: Required<IAllUserOptions> = isOptionsObjectForm(arg2)
171
- if (isOptionsObjectForm(arg2)) {
172
- // Options-object Form.
173
- /* parse = (
174
- yiniContent: string,
175
- options: IAllUserOptions,
176
- )
177
- */
178
- userOpts = Object.assign(Object.assign({}, DEFAULT_OPTS), { strictMode: (_a = arg2.strictMode) !== null && _a !== void 0 ? _a : DEFAULT_OPTS.strictMode, failLevel: (_b = arg2.failLevel) !== null && _b !== void 0 ? _b : DEFAULT_OPTS.failLevel, includeMetaData: (_c = arg2.includeMetaData) !== null && _c !== void 0 ? _c : DEFAULT_OPTS.includeMetaData, includeDiagnostics: (_d = arg2.includeDiagnostics) !== null && _d !== void 0 ? _d : DEFAULT_OPTS.includeDiagnostics, includeTiming: (_e = arg2.includeTiming) !== null && _e !== void 0 ? _e : DEFAULT_OPTS.includeTiming, preserveUndefinedInMeta: (_f = arg2.preserveUndefinedInMeta) !== null && _f !== void 0 ? _f : DEFAULT_OPTS.preserveUndefinedInMeta, requireDocTerminator: (_g = arg2.requireDocTerminator) !== null && _g !== void 0 ? _g : DEFAULT_OPTS.requireDocTerminator });
179
- }
180
- else {
181
- // Positional form.
182
- /* parse = (
183
- yiniContent: string,
184
- strictMode?: boolean,
185
- failLevel?: TPreferredFailLevel,
186
- includeMetaData?: boolean,
187
- )
188
- */
189
- userOpts = Object.assign(Object.assign({}, DEFAULT_OPTS), { strictMode: (_h = arg2) !== null && _h !== void 0 ? _h : DEFAULT_OPTS.strictMode, failLevel,
190
- includeMetaData });
191
- }
192
- if ((0, pathAndFileName_1.getFileNameExtension)(filePath).toLowerCase() !== '.yini') {
193
- console.error('Invalid file extension for YINI file:');
194
- console.error(`"${filePath}"`);
195
- console.log('File does not have a valid ".yini" extension (case-insensitive).');
196
- throw new Error('Error: Unexpected file extension for YINI file');
197
- }
198
- // ---- Phase 0: I/O ----
199
- const timeStartMs = perf_hooks_1.performance.now();
200
- // let content = fs.readFileSync(filePath, 'utf8')
201
- const rawBuffer = fs_1.default.readFileSync(filePath); // Raw buffer for size.
202
- const fileByteSize = rawBuffer.byteLength; // Byte size in UTF-8.
203
- let content = rawBuffer.toString('utf8');
204
- const timeEndMs = perf_hooks_1.performance.now();
205
- _runtimeInfo.sourceType = 'File';
206
- _runtimeInfo.fileName = filePath;
207
- if (userOpts.includeMetaData) {
208
- _runtimeInfo.lineCount = content.split(/\r?\n/).length; // Counts the lines.
209
- _runtimeInfo.fileByteSize = fileByteSize;
210
- _runtimeInfo.timeIoMs = +(timeEndMs - timeStartMs);
211
- _runtimeInfo.preferredBailSensitivity = userOpts.failLevel;
212
- _runtimeInfo.sha256 = (0, string_1.computeSha256)(content); // NOTE: Compute BEFORE any possible tampering of content.
213
- }
214
- let hasNoNewlineAtEOF = false;
215
- if (!content.endsWith('\n')) {
216
- content += '\n';
217
- hasNoNewlineAtEOF = true;
218
- }
219
- const result = this.parse(content, userOpts.strictMode, userOpts.failLevel, userOpts.includeMetaData);
220
- if (hasNoNewlineAtEOF) {
221
- console.warn(`No newline at end of file, it's recommended to end a file with a newline. File:\n"${filePath}"`);
222
- }
123
+ // // Runtime guard to catch illegal/ambiguous calls coming from JS or any-cast code
124
+ // if (
125
+ // isOptionsObjectForm(arg2) &&
126
+ // (failLevel !== 'auto' || includeMetadata !== false)
127
+ // ) {
128
+ // throw new TypeError(
129
+ // 'Invalid call: when providing an options object, do not also pass positional parameters.',
130
+ // )
131
+ // }
132
+ // const mode: TParserMode = inferModeFromArgs(arg2)
133
+ // const defaultOptions = getDefaultOptions(mode)
134
+ // // Normalize to a fully-required options object.
135
+ // let userOpts: Required<IAllUserOptions>
136
+ // // Required, makes all properties in T required, no undefined.
137
+ // if (isOptionsObjectForm(arg2)) {
138
+ // // Options-object Form.
139
+ // userOpts = {
140
+ // ...defaultOptions, // Sets the default options.
141
+ // ...arg2,
142
+ // }
143
+ // } else {
144
+ // // Positional form.
145
+ // userOpts = {
146
+ // ...defaultOptions, // Sets the default options.
147
+ // strictMode:
148
+ // (arg2 as boolean | undefined) ?? defaultOptions.strictMode,
149
+ // failLevel,
150
+ // includeMetadata,
151
+ // }
152
+ // }
153
+ // if (getFileNameExtension(filePath).toLowerCase() !== '.yini') {
154
+ // console.error('Invalid file extension for YINI file:')
155
+ // console.error(`"${filePath}"`)
156
+ // console.log(
157
+ // 'File does not have a valid ".yini" extension (case-insensitive).',
158
+ // )
159
+ // throw new Error('Error: Unexpected file extension for YINI file')
160
+ // }
161
+ // // ---- Phase 0: I/O ----
162
+ // const timeStartMs = performance.now()
163
+ // // let content = fs.readFileSync(filePath, 'utf8')
164
+ // const rawBuffer = fs.readFileSync(filePath) // Raw buffer for size.
165
+ // const fileByteSize = rawBuffer.byteLength // Byte size in UTF-8.
166
+ // let content = rawBuffer.toString('utf8')
167
+ // const timeEndMs = performance.now()
168
+ // _runtimeInfo.sourceType = 'File'
169
+ // _runtimeInfo.fileName = filePath
170
+ // if (userOpts.includeMetadata) {
171
+ // _runtimeInfo.lineCount = content.split(/\r?\n/).length // Counts the lines.
172
+ // _runtimeInfo.fileByteSize = fileByteSize
173
+ // _runtimeInfo.timeIoMs = +(timeEndMs - timeStartMs).toFixed(3)
174
+ // _runtimeInfo.preferredBailSensitivity = userOpts.failLevel
175
+ // _runtimeInfo.sha256 = computeSha256(content) // NOTE: Compute BEFORE any possible tampering of content.
176
+ // }
177
+ // let hasNoNewlineAtEOF = false
178
+ // if (!content.endsWith('\n')) {
179
+ // content += '\n'
180
+ // hasNoNewlineAtEOF = true
181
+ // }
182
+ (0, print_1.debugPrint)();
183
+ (0, print_1.debugPrint)('==== Call doParseFile(..) in runtime ==========================');
184
+ // const result = _parseMain(yiniContent, coreOpts, _runtimeInfo)
185
+ const runtime = new runtime_1.YiniRuntime('File');
186
+ const result = (0, normalizeOptions_1.isOptionsObjectForm)(arg2)
187
+ ? runtime.doParseFile(filePath, arg2) // Overload #2: (content, options)
188
+ : runtime.doParseFile(
189
+ // Overload #1: (content, strict?, failLevel?, includeMeta?)
190
+ filePath, arg2, failLevel, includeMetadata);
191
+ (0, print_1.debugPrint)('==== End call parse ==========================\n');
223
192
  return result;
224
193
  }
225
194
  }
195
+ // @todo In future move/change this to not be a global and suffer from possible race conditions, possibly move this into YiniRuntime class.
226
196
  YINI.g_tabSize = DEFAULT_TAB_SIZE; // Global tab size used in error messages.
227
197
  exports.default = YINI;
198
+ //# sourceMappingURL=YINI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"YINI.js","sourceRoot":"","sources":["../src/YINI.ts"],"names":[],"mappings":";;AAAA,sCAA6C;AAC7C,8DAA0D;AAC1D,sEAAqE;AACrE,4CAA4C;AAO5C,yCAAiE;AAEjE,MAAM,gBAAgB,GAAG,CAAC,CAAA,CAAC,6EAA6E;AAExG,qCAAqC;AACrC,4BAA4B;AAC5B,2BAA2B;AAC3B,0BAA0B;AAC1B,uBAAuB;AACvB,sBAAsB;AACtB,sCAAsC;AACtC,oBAAoB;AACpB,IAAI;AAEJ;;;;GAIG;AACH,MAAqB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AkD,CAAC,CAAA;QAC9D,OAAO,MAAM,CAAA;IACjB,CAAC;;AA/aD,2IAA2I;AAC5H,cAAS,GAAG,gBAAgB,CAAA,CAAC,0CAA0C;kBAFrE,IAAI"}
@@ -60,3 +60,4 @@ const isDebug = () => {
60
60
  return false;
61
61
  };
62
62
  exports.isDebug = isDebug;
63
+ //# sourceMappingURL=env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/config/env.ts"],"names":[],"mappings":";;;AAeA,MAAM,YAAY,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,YAAY,CAAa,CAAA;AAqE9D,oCAAY;AApErB,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,YAAY,CAAY,CAAA;AAoE7C,kCAAW;AAlElC,kCAAkC;AAClC,8EAA8E;AAC9E,4EAA4E;AAE5E,2CAA2C;AAC3C,IAAI;AAEJ,mDAAmD;AAEnD,gIAAgI;AACzH,MAAM,QAAQ,GAAG,GAAY,EAAE,CAAC,YAAY,KAAK,aAAa,CAAA;AAAxD,QAAA,QAAQ,YAAgD;AAErE,+HAA+H;AACxH,MAAM,SAAS,GAAG,GAAY,EAAE,CAAC,YAAY,KAAK,YAAY,CAAA;AAAxD,QAAA,SAAS,aAA+C;AAErE,6GAA6G;AACtG,MAAM,SAAS,GAAG,GAAY,EAAE,CAAC,YAAY,KAAK,MAAM,CAAA;AAAlD,QAAA,SAAS,aAAyC;AAE/D;;;;GAIG;AACI,MAAM,KAAK,GAAG,GAAY,EAAE;IAC/B,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAA;IAE/B,oEAAoE;IACpE,uDAAuD;IACvD,kCAAkC;IAClC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,MAAM,GAAG,GAAW,OAAO,CAAC,IAAI,CAAC,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