yini-parser 1.0.2-beta → 1.1.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 (43) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +83 -98
  3. package/dist/YINI.d.ts +34 -11
  4. package/dist/YINI.js +206 -93
  5. package/dist/core/ASTBuilder.d.ts +191 -0
  6. package/dist/core/ASTBuilder.js +827 -0
  7. package/dist/core/ErrorDataHandler.d.ts +19 -19
  8. package/dist/core/ErrorDataHandler.js +258 -150
  9. package/dist/core/objectBuilder.d.ts +9 -3
  10. package/dist/core/objectBuilder.js +126 -163
  11. package/dist/core/types.d.ts +234 -44
  12. package/dist/core/types.js +7 -33
  13. package/dist/grammar/YiniLexer.d.ts +54 -48
  14. package/dist/grammar/YiniLexer.js +324 -289
  15. package/dist/grammar/YiniParser.d.ts +167 -150
  16. package/dist/grammar/YiniParser.js +1241 -1202
  17. package/dist/grammar/YiniParserVisitor.d.ts +59 -45
  18. package/dist/grammar/YiniParserVisitor.js +1 -1
  19. package/dist/index.d.ts +4 -2
  20. package/dist/index.js +286 -26
  21. package/dist/parseEntry.d.ts +3 -2
  22. package/dist/parseEntry.js +352 -81
  23. package/dist/parsers/extractHeaderParts.d.ts +3 -2
  24. package/dist/parsers/extractHeaderParts.js +1 -0
  25. package/dist/parsers/parseBoolean.d.ts +1 -1
  26. package/dist/parsers/parseBoolean.js +2 -1
  27. package/dist/parsers/parseNumber.d.ts +8 -3
  28. package/dist/parsers/parseNumber.js +21 -7
  29. package/dist/parsers/parseSectionHeader.d.ts +3 -2
  30. package/dist/parsers/parseSectionHeader.js +1 -0
  31. package/dist/utils/number.d.ts +3 -0
  32. package/dist/utils/number.js +18 -0
  33. package/dist/utils/object.d.ts +55 -0
  34. package/dist/utils/object.js +85 -0
  35. package/dist/utils/string.d.ts +21 -1
  36. package/dist/utils/string.js +39 -4
  37. package/dist/utils/system.d.ts +15 -0
  38. package/dist/utils/system.js +21 -0
  39. package/dist/yiniHelpers.d.ts +3 -0
  40. package/dist/yiniHelpers.js +43 -7
  41. package/package.json +1 -1
  42. package/dist/core/YINIVisitor.d.ts +0 -158
  43. package/dist/core/YINIVisitor.js +0 -1008
@@ -1,25 +1,27 @@
1
1
  import { ParseTreeVisitor } from 'antlr4';
2
2
  import { YiniContext } from "./YiniParser.js";
3
- import { SectionContext } from "./YiniParser.js";
4
- import { Terminal_lineContext } from "./YiniParser.js";
5
- import { Section_membersContext } from "./YiniParser.js";
3
+ import { PrologContext } from "./YiniParser.js";
4
+ import { Terminal_stmtContext } from "./YiniParser.js";
5
+ import { StmtContext } from "./YiniParser.js";
6
+ import { Meta_stmtContext } from "./YiniParser.js";
7
+ import { DirectiveContext } from "./YiniParser.js";
8
+ import { AnnotationContext } from "./YiniParser.js";
9
+ import { EolContext } from "./YiniParser.js";
10
+ import { AssignmentContext } from "./YiniParser.js";
6
11
  import { MemberContext } from "./YiniParser.js";
7
- import { Member_colon_listContext } from "./YiniParser.js";
12
+ import { Colon_list_declContext } from "./YiniParser.js";
8
13
  import { ValueContext } from "./YiniParser.js";
9
14
  import { Object_literalContext } from "./YiniParser.js";
10
- import { ObjectMemberListContext } from "./YiniParser.js";
11
- import { ObjectMemberContext } from "./YiniParser.js";
12
- import { ListContext } from "./YiniParser.js";
13
- import { List_in_bracketsContext } from "./YiniParser.js";
15
+ import { Object_membersContext } from "./YiniParser.js";
16
+ import { Object_memberContext } from "./YiniParser.js";
17
+ import { List_literalContext } from "./YiniParser.js";
14
18
  import { ElementsContext } from "./YiniParser.js";
15
- import { ElementContext } from "./YiniParser.js";
16
19
  import { Number_literalContext } from "./YiniParser.js";
17
20
  import { Null_literalContext } from "./YiniParser.js";
18
21
  import { String_literalContext } from "./YiniParser.js";
19
22
  import { String_concatContext } from "./YiniParser.js";
20
23
  import { Boolean_literalContext } from "./YiniParser.js";
21
- import { Empty_objectContext } from "./YiniParser.js";
22
- import { Empty_listContext } from "./YiniParser.js";
24
+ import { Bad_meta_textContext } from "./YiniParser.js";
23
25
  import { Bad_memberContext } from "./YiniParser.js";
24
26
  /**
25
27
  * This interface defines a complete generic visitor for a parse tree produced
@@ -36,83 +38,101 @@ export default class YiniParserVisitor<Result> extends ParseTreeVisitor<Result>
36
38
  */
37
39
  visitYini?: (ctx: YiniContext) => Result;
38
40
  /**
39
- * Visit a parse tree produced by `YiniParser.section`.
41
+ * Visit a parse tree produced by `YiniParser.prolog`.
40
42
  * @param ctx the parse tree
41
43
  * @return the visitor result
42
44
  */
43
- visitSection?: (ctx: SectionContext) => Result;
45
+ visitProlog?: (ctx: PrologContext) => Result;
44
46
  /**
45
- * Visit a parse tree produced by `YiniParser.terminal_line`.
47
+ * Visit a parse tree produced by `YiniParser.terminal_stmt`.
46
48
  * @param ctx the parse tree
47
49
  * @return the visitor result
48
50
  */
49
- visitTerminal_line?: (ctx: Terminal_lineContext) => Result;
51
+ visitTerminal_stmt?: (ctx: Terminal_stmtContext) => Result;
50
52
  /**
51
- * Visit a parse tree produced by `YiniParser.section_members`.
53
+ * Visit a parse tree produced by `YiniParser.stmt`.
52
54
  * @param ctx the parse tree
53
55
  * @return the visitor result
54
56
  */
55
- visitSection_members?: (ctx: Section_membersContext) => Result;
57
+ visitStmt?: (ctx: StmtContext) => Result;
56
58
  /**
57
- * Visit a parse tree produced by `YiniParser.member`.
59
+ * Visit a parse tree produced by `YiniParser.meta_stmt`.
58
60
  * @param ctx the parse tree
59
61
  * @return the visitor result
60
62
  */
61
- visitMember?: (ctx: MemberContext) => Result;
63
+ visitMeta_stmt?: (ctx: Meta_stmtContext) => Result;
62
64
  /**
63
- * Visit a parse tree produced by `YiniParser.member_colon_list`.
65
+ * Visit a parse tree produced by `YiniParser.directive`.
64
66
  * @param ctx the parse tree
65
67
  * @return the visitor result
66
68
  */
67
- visitMember_colon_list?: (ctx: Member_colon_listContext) => Result;
69
+ visitDirective?: (ctx: DirectiveContext) => Result;
68
70
  /**
69
- * Visit a parse tree produced by `YiniParser.value`.
71
+ * Visit a parse tree produced by `YiniParser.annotation`.
70
72
  * @param ctx the parse tree
71
73
  * @return the visitor result
72
74
  */
73
- visitValue?: (ctx: ValueContext) => Result;
75
+ visitAnnotation?: (ctx: AnnotationContext) => Result;
74
76
  /**
75
- * Visit a parse tree produced by `YiniParser.object_literal`.
77
+ * Visit a parse tree produced by `YiniParser.eol`.
76
78
  * @param ctx the parse tree
77
79
  * @return the visitor result
78
80
  */
79
- visitObject_literal?: (ctx: Object_literalContext) => Result;
81
+ visitEol?: (ctx: EolContext) => Result;
80
82
  /**
81
- * Visit a parse tree produced by `YiniParser.objectMemberList`.
83
+ * Visit a parse tree produced by `YiniParser.assignment`.
82
84
  * @param ctx the parse tree
83
85
  * @return the visitor result
84
86
  */
85
- visitObjectMemberList?: (ctx: ObjectMemberListContext) => Result;
87
+ visitAssignment?: (ctx: AssignmentContext) => Result;
86
88
  /**
87
- * Visit a parse tree produced by `YiniParser.objectMember`.
89
+ * Visit a parse tree produced by `YiniParser.member`.
88
90
  * @param ctx the parse tree
89
91
  * @return the visitor result
90
92
  */
91
- visitObjectMember?: (ctx: ObjectMemberContext) => Result;
93
+ visitMember?: (ctx: MemberContext) => Result;
92
94
  /**
93
- * Visit a parse tree produced by `YiniParser.list`.
95
+ * Visit a parse tree produced by `YiniParser.colon_list_decl`.
94
96
  * @param ctx the parse tree
95
97
  * @return the visitor result
96
98
  */
97
- visitList?: (ctx: ListContext) => Result;
99
+ visitColon_list_decl?: (ctx: Colon_list_declContext) => Result;
98
100
  /**
99
- * Visit a parse tree produced by `YiniParser.list_in_brackets`.
101
+ * Visit a parse tree produced by `YiniParser.value`.
100
102
  * @param ctx the parse tree
101
103
  * @return the visitor result
102
104
  */
103
- visitList_in_brackets?: (ctx: List_in_bracketsContext) => Result;
105
+ visitValue?: (ctx: ValueContext) => Result;
104
106
  /**
105
- * Visit a parse tree produced by `YiniParser.elements`.
107
+ * Visit a parse tree produced by `YiniParser.object_literal`.
106
108
  * @param ctx the parse tree
107
109
  * @return the visitor result
108
110
  */
109
- visitElements?: (ctx: ElementsContext) => Result;
111
+ visitObject_literal?: (ctx: Object_literalContext) => Result;
112
+ /**
113
+ * Visit a parse tree produced by `YiniParser.object_members`.
114
+ * @param ctx the parse tree
115
+ * @return the visitor result
116
+ */
117
+ visitObject_members?: (ctx: Object_membersContext) => Result;
118
+ /**
119
+ * Visit a parse tree produced by `YiniParser.object_member`.
120
+ * @param ctx the parse tree
121
+ * @return the visitor result
122
+ */
123
+ visitObject_member?: (ctx: Object_memberContext) => Result;
124
+ /**
125
+ * Visit a parse tree produced by `YiniParser.list_literal`.
126
+ * @param ctx the parse tree
127
+ * @return the visitor result
128
+ */
129
+ visitList_literal?: (ctx: List_literalContext) => Result;
110
130
  /**
111
- * Visit a parse tree produced by `YiniParser.element`.
131
+ * Visit a parse tree produced by `YiniParser.elements`.
112
132
  * @param ctx the parse tree
113
133
  * @return the visitor result
114
134
  */
115
- visitElement?: (ctx: ElementContext) => Result;
135
+ visitElements?: (ctx: ElementsContext) => Result;
116
136
  /**
117
137
  * Visit a parse tree produced by `YiniParser.number_literal`.
118
138
  * @param ctx the parse tree
@@ -144,17 +164,11 @@ export default class YiniParserVisitor<Result> extends ParseTreeVisitor<Result>
144
164
  */
145
165
  visitBoolean_literal?: (ctx: Boolean_literalContext) => Result;
146
166
  /**
147
- * Visit a parse tree produced by `YiniParser.empty_object`.
148
- * @param ctx the parse tree
149
- * @return the visitor result
150
- */
151
- visitEmpty_object?: (ctx: Empty_objectContext) => Result;
152
- /**
153
- * Visit a parse tree produced by `YiniParser.empty_list`.
167
+ * Visit a parse tree produced by `YiniParser.bad_meta_text`.
154
168
  * @param ctx the parse tree
155
169
  * @return the visitor result
156
170
  */
157
- visitEmpty_list?: (ctx: Empty_listContext) => Result;
171
+ visitBad_meta_text?: (ctx: Bad_meta_textContext) => Result;
158
172
  /**
159
173
  * Visit a parse tree produced by `YiniParser.bad_member`.
160
174
  * @param ctx the parse tree
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Generated from grammar/v1.0.0-rc.2x/YiniParser.g4 by ANTLR 4.13.2
2
+ // Generated from grammar/v1.0.0-rc.3/YiniParser.g4 by ANTLR 4.13.2
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const antlr4_1 = require("antlr4");
5
5
  /**
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import YINI from './YINI';
2
- export declare const parse: (yiniContent: string, strictMode?: boolean, bailSensitivity?: "auto" | 0 | 1 | 2, includeMetaData?: boolean) => import("./core/types").TJSObject;
3
- export declare const parseFile: (filePath: string, strictMode?: boolean, bailSensitivity?: "auto" | 0 | 1 | 2, includeMetaData?: boolean) => import("./core/types").TJSObject;
2
+ export declare const parse: typeof YINI.parse;
3
+ export declare const parseFile: typeof YINI.parseFile;
4
+ export declare const getTabSize: typeof YINI.getTabSize;
5
+ export declare const setTabSize: typeof YINI.setTabSize;
4
6
  export default YINI;
package/dist/index.js CHANGED
@@ -16,12 +16,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  };
17
17
  var _a, _b, _c;
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.parseFile = exports.parse = void 0;
19
+ exports.setTabSize = exports.getTabSize = exports.parseFile = exports.parse = void 0;
20
20
  const env_1 = require("./config/env");
21
21
  const print_1 = require("./utils/print");
22
22
  const YINI_1 = __importDefault(require("./YINI"));
23
23
  exports.parse = YINI_1.default.parse;
24
24
  exports.parseFile = YINI_1.default.parseFile;
25
+ exports.getTabSize = YINI_1.default.getTabSize;
26
+ exports.setTabSize = YINI_1.default.setTabSize;
25
27
  exports.default = YINI_1.default;
26
28
  (0, print_1.debugPrint)();
27
29
  (0, print_1.debugPrint)('-> Entered index.ts');
@@ -83,34 +85,292 @@ else {
83
85
  // id = 32403 # The correct app id.
84
86
  // title = "My Program"
85
87
  // `
88
+ /*
86
89
  const yini = `
87
- ^ DozNumbers
88
- ^^ WithXE
89
- doz1 = 0z00
90
- doz2 = 0z01 // One with leading zeros
91
- doz3 = 0z100 // Decimal 144 (X/A is digit for 10 in base-12)
92
- doz4 = 0z7EE // Decimal 1151
93
- doz5 = 0zX00 // Decimal 1440 (E/B is digit for 11 in base-12)
94
-
95
- ^^ WithAB
96
- doz6 = 0z7BB // Decimal 1151
97
- doz7 = 0zA00 // Decimal 1440 (E/B is digit for 11 in base-12)
98
- `;
99
- console.log((0, print_1.toPrettyJSON)(YINI_1.default.parse(yini, false)));
90
+ @yini
91
+
92
+ ^ NumberFormats
93
+
94
+ ^^ HexFormat // Hexadecimal (base-16)
95
+ hex = #FF0066 // Default notation
96
+ altHex = 0xFF0066 // Alternative notation
97
+ ^^ BinFormat // Binary (base-2)
98
+ bin = %10101111 // Default notation
99
+ altBin = 0b10101111 // Alternative notation
100
+ ^^ OctFormat // Octal (base-8)
101
+ oct = 0o755 // ( = decimal 493)
102
+ ^^ DozFormat // Duodecimal (base-12)
103
+ doz = 0z10XE // Default notation: X=10, E=11
104
+ altDoz = 0z10AB // Alternative notation: A=10, B=11
105
+ ` // End.
106
+ */
107
+ /*
108
+ const yini = `
109
+ @yini
110
+ @YINI ///dfsf
111
+
112
+ < User
113
+ nullKey =
114
+ nullKey2 = NULL
115
+ username = 'tester two'
116
+ userId = 234
117
+ userColor = #ffaa99
118
+ userPerm = 0O733
119
+ userFearues = %01101
120
+ isSysOp = YES
121
+
122
+ map = {
123
+ a: 3,
124
+ b: 4,
125
+ cc: 5,
126
+ \`d d\`: 3453
127
+ }
128
+
129
+ listValueB: 3, 4, 5
130
+ listValue2 = ["a", "b"]
131
+ listValue3 = [434]
132
+ listValue4 = []
133
+ listValue5 = [1, ["a", "b", "c", [null, TRUE]], 3]
134
+
135
+ --listObject = { a: 1, b: 2}
136
+
137
+ colonList:
138
+ 1,
139
+ 2,
140
+ 3,
141
+
142
+ << Prefs
143
+ theme = "light"
144
+ notifications = OFF
145
+ nullValue = NULL
146
+
147
+ ^1 User2
148
+ ^2 PrefsOfUser2
149
+ ^3 DeepSection
150
+ ^4 DeeperSection
151
+ key = "Level 4 section"
152
+ ^5 YetDeeperSection
153
+ key = "Level 5 section"
154
+ item = 77
155
+
156
+ <1 User3
157
+ username = 'tester three'
158
+ isSysOp = NO
159
+
160
+ <2 Prefs2
161
+ theme = "special-dark"
162
+ notifications = ON
163
+
164
+ <2 Special
165
+ value = 123
166
+ `
167
+ */
168
+ // npm run start:dev
169
+ // "timing": {
170
+ // "totalMs": 158.421,
171
+ // "phase1Ms": 151.36,
172
+ // "phase2Ms": 6.92,
173
+ // "phase3Ms": 0.14
174
+ // }
175
+ //console.log(toPrettyJSON(YINI.parse(yini, false, 'auto', true)))
176
+ // const yini = `
177
+ // < SubTitle
178
+ // theme = "special-dark"
179
+ // notifications = ON
180
+ // < SubTitle // NOT OK, SubTitle already exists
181
+ // theme2 = "special-dark"
182
+ // `
183
+ // Arrange.
184
+ /*
185
+ const yini = `
186
+ @yini
187
+ // Example: Strict-friendly YINI document (no trailing commas, explicit /END)
188
+
189
+ ^ App
190
+ name = 'YINI Demo Service'
191
+ version = '1.4.0'
192
+ description = 'Demo service for showcasing the YINI format'
193
+ owners = ['dev-team', 'ops-team']
194
+
195
+ // String concatenation (the '+' joins adjacent STRING tokens)
196
+ -- longNote = 'This text is split across ' +
197
+ -- 'two strings and then concatenated.'
198
+
199
+ // Case-insensitive booleans
200
+ enabled = YES
201
+ experimentalMode = off
202
+
203
+ // Numbers (ints, floats, scientific)
204
+ retries = 3
205
+ requestTimeoutMs = 2500
206
+ backoffFactor = 1.25
207
+ maxPayloadMB = 1.0e2
208
+
209
+ ^ Server
210
+ host = '127.0.0.1'
211
+ port = 8080
212
+ useTLS = false
213
+
214
+ ^^ CORS
215
+ allowedOrigins: 'https://example.com', 'https://admin.example.com'
216
+ allowCredentials = true
217
+
218
+ ^^ Headers
219
+ // Object literal with key:value pairs
220
+ defaults = {
221
+ \`X-Frame-Options\`: 'DENY',
222
+ \`X-Content-Type-Options\`: 'nosniff'
223
+ }
224
+
225
+ ^ Database
226
+ engine = 'postgres'
227
+ host = 'db.internal'
228
+ port = 5432
229
+ username = 'app_user'
230
+ password = 'change_me'
231
+ pool = {
232
+ min: 2,
233
+ max: 16
234
+ }
235
+
236
+ ^^ Replicas
237
+ // Colon-form list (values only)
238
+ endpoints: 'db-replica-1.internal', 'db-replica-2.internal'
239
+ readPreference = 'nearest'
240
+
241
+ ^ Features
242
+ // Mixed data types
243
+ betaFlags = ['new-ui', 'fast-path']
244
+ darkLaunch = NO
245
+ uploadLimitMB = 128
246
+
247
+ ^ Integrations
248
+ // List of objects
249
+ webhooks = [
250
+ { name: 'audit', url: 'https://hooks.example.com/audit', active: true },
251
+ { name: 'metrics', url: 'https://hooks.example.com/metric', active: true }
252
+ ]
253
+
254
+ ^ Users
255
+ // Simple table-ish list using colon form
256
+ admins: 'alice', 'bob', 'carol'
257
+ reviewers: 'dave', 'erin'
258
+
259
+ ^^ Profiles
260
+ // Object-of-objects
261
+ alice = {
262
+ email: 'alice@example.com',
263
+ roles: ['admin', 'dev'],
264
+ mfa: true
265
+ }
266
+ bob = {
267
+ email: 'bob@example.com',
268
+ roles: ['admin'],
269
+ mfa: false
270
+ }
271
+
272
+ ^ Paths
273
+ logs = '/var/log/yini-demo/'
274
+ data = '/srv/yini-demo/data'
275
+
276
+ ^^ \`Backups\`
277
+ // Empty value -> null in lenient mode; in strict mode, supply explicit null:
278
+ lastFull = null
279
+ targets: '/mnt/backup1', '/mnt/backup2'
280
+ ^^^ Backups2
281
+ value = 23
282
+
283
+ ^ Security
284
+ allowedIPs: '10.0.0.0/24', '10.1.0.0/24'
285
+
286
+ ^ Logging
287
+ level = 'info'
288
+ format = 'json'
289
+ sinks = ['stdout']
290
+
291
+ /END
292
+ `*/
293
+ // const yini = `
294
+ // /*sdfsdf*/
295
+ // @yini
296
+ // @include 'sdf'
297
+ // --@invalid
298
+ // @deprecated
299
+ // ^ window
300
+ // --^^ window2
301
+ // title = 'Sample Window' // Strings can be enclosed in either ' or ".
302
+ // @deprecated
303
+ // id = 'window_main'
304
+ // // @bla
305
+ // --@include 'wrongplace'
306
+ // --@yini // This is an error should be catched in the parser.
307
+ // /end
308
+ // `
309
+ // YINI.setTabSize(2)
310
+ // debugPrint('tab size = ' + YINI.getTabSize())
311
+ const yini = ` @yini
312
+ --@yini
313
+ ^^ Header // INVALID: Must start with atleast one 1-level section.
314
+ key = 33254
315
+ /END
316
+ --/END
317
+ `;
318
+ console.log((0, print_1.toPrettyJSON)(YINI_1.default.parse(yini, {
319
+ strictMode: false,
320
+ failLevel: 1,
321
+ includeMetaData: false,
322
+ requireDocTerminator: false,
323
+ })));
324
+ // const yini = `
325
+ // ^ Booleans
326
+ // bool1 = true
327
+ // bool2 = false
328
+ // bool3 = on
329
+ // bool4 = off
330
+ // bool5 = yes
331
+ // bool6 = no
332
+ // `
333
+ // console.log(
334
+ // toPrettyJSON(
335
+ // YINI.parse(yini, {
336
+ // strictMode: true,
337
+ // failLevel: 'auto',
338
+ // includeMetaData: false,
339
+ // requireDocTerminator: false,
340
+ // }),
341
+ // ),
342
+ // )
343
+ // console.log(
344
+ // toPrettyJSON(
345
+ // YINI.parseFile(
346
+ // 'comprehensive-example.yini',
347
+ // false,
348
+ // 'auto',
349
+ // true,
350
+ // ),
351
+ // ),
352
+ // )
100
353
  // console.log(
101
- // toPrettyJSON(YINI.parseFile('comprehensive-example.yini', true)),
354
+ // toPrettyJSON(
355
+ // YINI.parseFile('comprehensive-example.yini', {
356
+ // strictMode: false,
357
+ // failLevel: 'auto',
358
+ // includeMetaData: true,
359
+ // }),
360
+ // ),
102
361
  // )
103
362
  // const fileName = './tests/fixtures/valid/common/common-config-2.yini'
104
- // YINI.parseFile(fileName, false)
105
- // parseUntilError(`
106
- // ^ Section1
107
- // ^^ Section2
108
- // ^^^ Section3
109
- // ^^^^ Section4 // Level 4.
110
- // ^^^^^ Section5
111
- // ^^^^^^ Section6
112
- // ^^^^^^^ Section7
113
- // strVar = "These section header are valid!"
114
- // `)
363
+ // YINI.parseFile(fileName, {
364
+ // strictMode: false,
365
+ // failLevel: 'auto',
366
+ // includeMetaData: true,
367
+ // })
368
+ // const fileName =
369
+ // './tests/fixtures/invalid/bad-user-profile-config-2.yini'
370
+ // YINI.parseFile(fileName, {
371
+ // strictMode: true,
372
+ // failLevel: 'auto',
373
+ // includeMetaData: true,
374
+ // })
115
375
  }
116
376
  }
@@ -1,2 +1,3 @@
1
- import { IParseMainOptions } from './core/types';
2
- export declare const parseMain: (yiniContent: string, options?: IParseMainOptions) => any;
1
+ import { IParseCoreOptions, IRuntimeInfo } from './core/types';
2
+ /** Single source of truth. */
3
+ export declare const _parseMain: (yiniContent: string, options: IParseCoreOptions | undefined, runtimeInfo: IRuntimeInfo) => any;