yini-parser 1.3.2-beta → 1.3.3-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.
@@ -1 +1 @@
1
- export {};
1
+ import './quick-test-samples/valid-inputs';
package/dist/dev/main.js CHANGED
@@ -16,6 +16,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  const env_1 = require("../config/env");
17
17
  const print_1 = require("../utils/print");
18
18
  const YINI_1 = __importDefault(require("../YINI"));
19
+ const defect_inputs_1 = require("./quick-test-samples/defect-inputs");
20
+ require("./quick-test-samples/valid-inputs"); // validConfigComplex,
19
21
  (0, print_1.debugPrint)();
20
22
  (0, print_1.debugPrint)('-> Entered dev/main.ts');
21
23
  (0, print_1.debugPrint)();
@@ -256,12 +258,30 @@ else {
256
258
  const yiniContent = ` #!/usr/bin/env yini
257
259
  ^ App
258
260
  name = "Shebang-demo"`;
259
- console.log((0, print_1.toPrettyJSON)(YINI_1.default.parse(yiniContent, {
261
+ console.log('--!!!------------------------------------------');
262
+ console.log((0, print_1.toPrettyJSON)(
263
+ // YINI.parse(validConfig, {
264
+ YINI_1.default.parse(defect_inputs_1.defectConfig2Combo3, {
260
265
  strictMode: true,
261
- failLevel: 'auto',
262
- includeMetadata: false,
263
- requireDocTerminator: 'optional',
266
+ failLevel: 'ignore-errors',
267
+ includeMetadata: true,
268
+ includeDiagnostics: true,
269
+ // requireDocTerminator: 'optional',
264
270
  })));
271
+ // console.log('--!!!------------------------------------------')
272
+ // console.log(
273
+ // toPrettyJSON(
274
+ // // YINI.parse(validConfig, {
275
+ // YINI.parse(defectConfigCombo3, {
276
+ // strictMode: true,
277
+ // // failLevel: 'auto',
278
+ // failLevel: 'ignore-errors',
279
+ // includeMetadata: true,
280
+ // includeDiagnostics: true,
281
+ // // requireDocTerminator: 'optional',
282
+ // }),
283
+ // ),
284
+ // )
265
285
  // console.log(
266
286
  // toPrettyJSON(
267
287
  // YINI.parseFile(
@@ -1 +1 @@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oCAAoC;QACpC,0CAA0C;QAC1C,qCAAqC;QACrC,wCAAwC;QACxC,mDAAmD;QACnD,cAAc;QACd,SAAS;QACT,IAAI;QAEJ,eAAe;QACf,oBAAoB;QACpB,0BAA0B;QAC1B,4CAA4C;QAC5C,qBAAqB;QACrB,sBAAsB;QACtB,oBAAoB;QACpB,aAAa;QACb,SAAS;QACT,IAAI;QAEJ,kDAAkD;QAClD,oCAAoC;QACpC,iCAAiC;QACjC,IAAI;QACJ,8CAA8C;QAE9C,eAAe;QACf,oBAAoB;QACpB,yDAAyD;QACzD,iCAAiC;QACjC,iCAAiC;QACjC,qCAAqC;QACrC,cAAc;QACd,SAAS;QACT,IAAI;QAEJ,oEAAoE;QACpE,4CAA4C;QAC5C,wBAAwB;QACxB,kCAAkC;QAClC,KAAK;QACL,sBAAsB;QAEtB,4DAA4D;QAC5D,4CAA4C;QAC5C,0CAA0C;QAC1C,eAAe;QACf,mBAAmB;QACnB,wEAAwE;QACxE,QAAQ;QAER,kDAAkD;QAClD,2CAA2C;QAC3C,0CAA0C;QAC1C,eAAe;QACf,mBAAmB;QACnB,8BAA8B;QAC9B,sEAAsE;QACtE,QAAQ;QAER,mBAAmB;QACnB,gEAAgE;QAChE,6BAA6B;QAC7B,yBAAyB;QACzB,yBAAyB;QACzB,6BAA6B;QAC7B,KAAK;IACT,CAAC;AACL,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Development-only YINI samples with intentional defects.
3
+ *
4
+ * These inputs are used for quick manual testing during development
5
+ * via src/dev/.
6
+ *
7
+ * Each sample contains ONE clearly documented defect.
8
+ * They are NOT part of the automated test suite.
9
+ *
10
+ * All real testing belongs in /tests/.
11
+ */
12
+ /**
13
+ * Invalid assignment operator (`:=` instead of `=`).
14
+ */
15
+ export declare const defectInvalidAssignmentOperator = "\n^ App\nname = 'Hello'\ntxt := 'World' // INVALID: assignment operator must be \"=\"\n";
16
+ /**
17
+ * Invalid section name (starts with a number and contains hyphen).
18
+ */
19
+ export declare const defectInvalidSectionName = "\n^ App\nname = \"My Application\"\n\n^ 20-Database // INVALID: section name must start with a letter or underscore\nhost = \"localhost\"\nport = 5432\n";
20
+ /**
21
+ * Invalid numeric literal (double underscore).
22
+ */
23
+ export declare const defectInvalidNumericLiteral = "\n^ App\nname = \"Demo\"\n\n^ Database\nhost = \"localhost\"\nport = 5432\n\nsomeKey = 33__33 // INVALID: malformed numeric literal\n";
24
+ /**
25
+ * Duplicate key in the same section.
26
+ */
27
+ export declare const defectDuplicateKey = "\n^ App\nname = \"Demo\"\nname = \"Override\" // INVALID: duplicate key in same section\n";
28
+ /**
29
+ * Section level jump (^^ without parent ^).
30
+ */
31
+ export declare const defectSectionLevelJump = "\n^^ Logging // INVALID: section level jumps without parent\nenabled = true\n";
32
+ /**
33
+ * Unterminated string literal.
34
+ */
35
+ export declare const defectUnterminatedString = "\n^ App\nname = \"Demo\nversion = \"1.0.0\"\n";
36
+ export declare const defectConfigCombo3 = "\n^ App\nname = \"Combo defects sample\"\n\nmode := \"dev\" // INVALID #1: ':=' is not a valid assignment operator (must be '=')\n\n^ 2Database // INVALID #2: section name starts with a digit (must start with A-Z/_ or be backticked)\nhost = \"localhost\"\n\nports = [80, 443, 8080 // INVALID #3: missing closing ']' in array literal\n";
37
+ export declare const defectConfig2Combo3 = "\n^ App\nname = \"ComboTest\"\nversion = 1.0\n\n ^^ Database\n host = \"localhost\"\n port = 54_32 // INVALID number format: underscores not allowed inside numbers\n\n auth = { user: \"admin\", pass: \"secret\" }\n\n ^^^ Logging\n enabled = maybe // INVALID boolean: only true/false/on/off/yes/no allowed\n\n ^ Network\n timeout = 30\n\n^ Server\n host = \"0.0.0.0\"\n port := 8080 // INVALID assignment operator: must use \"=\" not \":=\"\n\n ^^ Security\n useTLS = true\n";
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ // src/dev/quick-test-samples/defect-inputs.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.defectConfig2Combo3 = exports.defectConfigCombo3 = exports.defectUnterminatedString = exports.defectSectionLevelJump = exports.defectDuplicateKey = exports.defectInvalidNumericLiteral = exports.defectInvalidSectionName = exports.defectInvalidAssignmentOperator = void 0;
5
+ /**
6
+ * Development-only YINI samples with intentional defects.
7
+ *
8
+ * These inputs are used for quick manual testing during development
9
+ * via src/dev/.
10
+ *
11
+ * Each sample contains ONE clearly documented defect.
12
+ * They are NOT part of the automated test suite.
13
+ *
14
+ * All real testing belongs in /tests/.
15
+ */
16
+ /**
17
+ * Invalid assignment operator (`:=` instead of `=`).
18
+ */
19
+ exports.defectInvalidAssignmentOperator = `
20
+ ^ App
21
+ name = 'Hello'
22
+ txt := 'World' // INVALID: assignment operator must be "="
23
+ `;
24
+ /**
25
+ * Invalid section name (starts with a number and contains hyphen).
26
+ */
27
+ exports.defectInvalidSectionName = `
28
+ ^ App
29
+ name = "My Application"
30
+
31
+ ^ 20-Database // INVALID: section name must start with a letter or underscore
32
+ host = "localhost"
33
+ port = 5432
34
+ `;
35
+ /**
36
+ * Invalid numeric literal (double underscore).
37
+ */
38
+ exports.defectInvalidNumericLiteral = `
39
+ ^ App
40
+ name = "Demo"
41
+
42
+ ^ Database
43
+ host = "localhost"
44
+ port = 5432
45
+
46
+ someKey = 33__33 // INVALID: malformed numeric literal
47
+ `;
48
+ /**
49
+ * Duplicate key in the same section.
50
+ */
51
+ exports.defectDuplicateKey = `
52
+ ^ App
53
+ name = "Demo"
54
+ name = "Override" // INVALID: duplicate key in same section
55
+ `;
56
+ /**
57
+ * Section level jump (^^ without parent ^).
58
+ */
59
+ exports.defectSectionLevelJump = `
60
+ ^^ Logging // INVALID: section level jumps without parent
61
+ enabled = true
62
+ `;
63
+ /**
64
+ * Unterminated string literal.
65
+ */
66
+ exports.defectUnterminatedString = `
67
+ ^ App
68
+ name = "Demo
69
+ version = "1.0.0"
70
+ `;
71
+ exports.defectConfigCombo3 = `
72
+ ^ App
73
+ name = "Combo defects sample"
74
+
75
+ mode := "dev" // INVALID #1: ':=' is not a valid assignment operator (must be '=')
76
+
77
+ ^ 2Database // INVALID #2: section name starts with a digit (must start with A-Z/_ or be backticked)
78
+ host = "localhost"
79
+
80
+ ports = [80, 443, 8080 // INVALID #3: missing closing ']' in array literal
81
+ `;
82
+ exports.defectConfig2Combo3 = `
83
+ ^ App
84
+ name = "ComboTest"
85
+ version = 1.0
86
+
87
+ ^^ Database
88
+ host = "localhost"
89
+ port = 54_32 // INVALID number format: underscores not allowed inside numbers
90
+
91
+ auth = { user: "admin", pass: "secret" }
92
+
93
+ ^^^ Logging
94
+ enabled = maybe // INVALID boolean: only true/false/on/off/yes/no allowed
95
+
96
+ ^ Network
97
+ timeout = 30
98
+
99
+ ^ Server
100
+ host = "0.0.0.0"
101
+ port := 8080 // INVALID assignment operator: must use "=" not ":="
102
+
103
+ ^^ Security
104
+ useTLS = true
105
+ `;
106
+ //# sourceMappingURL=defect-inputs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defect-inputs.js","sourceRoot":"","sources":["../../../src/dev/quick-test-samples/defect-inputs.ts"],"names":[],"mappings":";AAAA,8CAA8C;;;AAE9C;;;;;;;;;;GAUG;AAEH;;GAEG;AACU,QAAA,+BAA+B,GAAG;;;;CAI9C,CAAA;AAED;;GAEG;AACU,QAAA,wBAAwB,GAAG;;;;;;;CAOvC,CAAA;AAED;;GAEG;AACU,QAAA,2BAA2B,GAAG;;;;;;;;;CAS1C,CAAA;AAED;;GAEG;AACU,QAAA,kBAAkB,GAAG;;;;CAIjC,CAAA;AAED;;GAEG;AACU,QAAA,sBAAsB,GAAG;;;CAGrC,CAAA;AAED;;GAEG;AACU,QAAA,wBAAwB,GAAG;;;;CAIvC,CAAA;AAEY,QAAA,kBAAkB,GAAG;;;;;;;;;;CAUjC,CAAA;AAEY,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuBlC,CAAA"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Development-only YINI samples.
3
+ *
4
+ * These inputs are used for quick manual testing during development
5
+ * via src/dev/quick-test-samples/main.ts. They are NOT part of the automated test suite.
6
+ *
7
+ * All real testing belongs in /tests/.
8
+ */
9
+ export declare const validConfigShort = "\n^ App\nname = 'Hello'\n";
10
+ export declare const validConfigBasic = "\n^ App\nname = \"My Application\"\nversion = 1.0\nfeatures = [\"search\", \"logging\"]\n\n // Nested sub-section under App\n ^^ Database\n host = \"localhost\"\n port = 5432\n";
11
+ export declare const validConfigWithObjects = "\n^ App\n name = \"Demo\"\n version = \"1.0.0\"\n features = [ \"search\", \"dark-mode\" ]\n\n^ Database\n host = \"localhost\"\n port = 5432\n auth = { user: \"admin\", pass: \"secret\" }\n";
12
+ /**
13
+ * Covers booleans, nulls, number formats, and deeper nesting
14
+ */
15
+ export declare const validConfigAdvanced = "\n^ Server\n enabled = ON\n timeout = 3.5\n retries = 5\n threshold = 1e-3\n fallback = null\n\n ^^ Logging\n level = \"info\"\n output = { file: \"app.log\", rotate: true }\n";
16
+ /**
17
+ * Covers arrays of objects and realistic structure
18
+ */
19
+ export declare const validConfigComplex = "\n^ App\n services = [\n { name: \"api\", port: 8080 },\n { name: \"web\", port: 3000 },\n { name: \"auth\", port: 9000 }\n ]\n\n^ Security\n roles = [\"admin\", \"user\", \"guest\"]\n enabled = true\n";
20
+ export declare const validConfigComplexBigA = "\n@YINI\n\n// Example A: Corporate SaaS Platform.\n\n^ App\nname = \"Acme Platform\" // Example Platform\ndescription = \"The word \u201CAcme\u201D has been used for over 100 years in technical and business examples.\"\nmeaning = \"It comes from Greek akm\u1E17 (\u1F00\u03BA\u03BC\u03AE), meaning \u201Cthe highest point\u201D or \u201Cbest\u201D.\"\nversion = \"2.3.1\"\ndebug = OFF\nenvironment = \"production\"\nmaintainers = [\"ops@acme.com\", \"dev@acme.com\"]\n\n ^^ Features\n enableSearch = true\n enablePayments = true\n enableAnalytics = false\n experimental = [\"new-ui\", \"streaming-api\"]\n\n ^^ Limits\n maxUsers = 50000\n requestTimeoutMs = 3500\n retryPolicy = { maxRetries: 5, backoff: \"exponential\" }\n\n ^^ Database\n engine = \"postgres\"\n host = \"db.internal.acme.com\"\n port = 5432\n ssl = true\n pool = { min: 5, max: 50 }\n\n ^^^ Credentials\n username = \"app_user\"\n password = \"****\"\n rotateEveryDays = 90\n\n ^^ API\n baseUrl = \"https://api.acme.com\"\n publicEndpoints = [\"/health\", \"/status\"]\n internalEndpoints = [\"/admin\", \"/metrics\"]\n\n ^^^ Auth\n provider = \"oauth2\"\n tokenTTLSeconds = 3600\n scopes = [\"read\", \"write\", \"admin\"]\n\n ^^^^ Clients\n web = { clientId: \"web-123\", redirectUri: \"https://acme.com/callback\" }\n mobile = { clientId: \"mob-456\", redirectUri: \"acme://auth\" }\n\n^ Logging\nlevel = \"info\"\nformat = \"json\"\noutputs = [\"stdout\", \"file\"]\n\n ^^ File\n path = \"/var/log/acme/app.log\"\n maxSizeMB = 100\n rotate = true\n keepFiles = 10\n\n ^^ Metrics\n enabled = true\n endpoint = \"/metrics\"\n sampleRate = 0.25\n\n^ Services\nenabled = true\n\n ^^ Email\n provider = \"smtp\"\n host = \"smtp.acme.com\"\n port = 587\n secure = false\n from = \"no-reply@acme.com\"\n\n ^^^ Credentials\n user = \"mailer\"\n pass = \"mailer-secret\"\n\n ^^ Cache\n type = \"redis\"\n host = \"cache.internal.acme.com\"\n port = 6379\n ttlSeconds = 600\n\n ^^^ Cluster\n nodes = [\n { host: \"cache-1.internal\", port: 6379 },\n { host: \"cache-2.internal\", port: 6379 },\n { host: \"cache-3.internal\", port: 6379 }\n ]\n\n^ Observability\ntracing = true\ntracingProvider = \"opentelemetry\"\ntraceSampleRate = 0.1\n\n ^^ Exporters\n jaeger = { enabled: true, endpoint: \"http://jaeger:14268/api/traces\" }\n prometheus = { enabled: true, endpoint: \"http://prom:9090\" }\n\n^ Security\nallowedIPs = [\"10.0.0.0/8\", \"192.168.0.0/16\"]\nblockedCountries = [\"KP\", \"SD\"]\n\n ^^ Policies\n passwordMinLength = 14\n require2FA = true\n sessionTTLMinutes = 120\n\n ^^^ Lockout\n maxAttempts = 5\n lockoutMinutes = 30\n";
21
+ export declare const validConfigComplexBigB = "\n@YINI\n\n// Example B: High-Security Distributed Control System.\n\n^ App\nname = 'Nebula Control Suite'\ndescription = 'A distributed operations platform for autonomous systems and edge analytics.'\nmeaning = 'Nebula comes from Latin \"nebula\" meaning mist or cloud.'\nversion = '5.0.0-rc.4'\ndebug = ON\nenvironment = 'staging'\nmaintainers = ['infra@nebula.io', 'platform@nebula.io', 'secops@nebula.io']\n\n ^^ Features\n enableSearch = false\n enablePayments = false\n enableAnalytics = true\n experimental = ['vector-engine', 'adaptive-ui', 'ai-routing']\n\n ^^ Limits\n maxUsers = 120000\n requestTimeoutMs = 7200\n retryPolicy = {\n maxRetries: 9,\n backoff: 'fibonacci',\n retryOn: ['timeout', '5xx', 'throttle'],\n schedule: [\n { attempt: 1, delayMs: 80 },\n { attempt: 2, delayMs: 160 },\n { attempt: 3, delayMs: 320 },\n { attempt: 4, delayMs: 640 },\n { attempt: 5, delayMs: 1280 }\n ]\n }\n\n ^^ Database\n engine = 'cockroachdb'\n host = 'cluster.db.nebula.io'\n port = 26257\n ssl = true\n pool = {\n min: 12,\n max: 120,\n warmup: {\n enabled: true,\n strategy: 'aggressive',\n steps: [10, 25, 50, 75, 100],\n healthChecks: [\n { name: 'connectivity', timeoutMs: 300 },\n { name: 'replication', maxLagMs: 200 },\n { name: 'quorum', minNodes: 3 }\n ]\n }\n }\n\n ^^^ Credentials\n username = 'nebula_app'\n password = '****'\n rotateEveryDays = 45\n history = [\n { rotatedAt: '2025-05-10', reason: 'scheduled' },\n { rotatedAt: '2025-03-02', reason: 'key-compromise' },\n { rotatedAt: '2024-12-15', reason: 'policy-change' }\n ]\n\n ^^ API\n baseUrl = 'https://api.nebula.io'\n publicEndpoints = ['/health', '/status', '/version']\n internalEndpoints = ['/admin', '/metrics', '/orchestrator', '/scheduler']\n\n ^^^ Auth\n provider = 'oidc'\n tokenTTLSeconds = 5400\n scopes = ['read', 'write', 'deploy', 'audit']\n\n ^^^^ Clients\n web = {\n clientId: 'nebula-web-prod',\n redirectUri: 'https://nebula.io/auth/callback',\n allowedOrigins: ['https://nebula.io', 'https://console.nebula.io'],\n secrets: [\n { id: 'alpha', value: 'QX7faP9', active: true },\n { id: 'beta', value: 'LM8KdW2', active: true },\n { id: 'legacy', value: 'OLD-KEY-DO-NOT-USE', active: false }\n ]\n }\n\n mobile = {\n clientId: 'nebula-mobile',\n redirectUri: 'nebula://auth',\n platforms: [\n { name: 'ios', minVersion: '15.2', enabled: true },\n { name: 'android', minVersion: '11', enabled: true },\n { name: 'harmonyos', minVersion: '4', enabled: false }\n ],\n refreshPolicy: {\n enabled: true,\n limits: { perHour: 60, perDay: 600 },\n audit: [\n { event: 'refresh', severity: 'info' },\n { event: 'suspicious-location', severity: 'warning' },\n { event: 'credential-stuffing', severity: 'critical' }\n ]\n }\n }\n\n^ Logging\nlevel = 'debug'\nformat = 'ndjson'\noutputs = ['stdout', 'file', 'syslog']\n\n ^^ File\n path = '/srv/log/nebula/nebula.log'\n maxSizeMB = 250\n rotate = true\n keepFiles = 30\n\n ^^ Metrics\n enabled = true\n endpoint = '/internal/metrics'\n sampleRate = 0.75\n\n^ Services\nenabled = true\n\n ^^ Email\n provider = 'ses'\n host = 'email.nebula.io'\n port = 465\n secure = true\n from = 'system@nebula.io'\n\n ^^^ Credentials\n user = 'mailer-nebula'\n pass = 'MAIL-SEC-9921'\n\n ^^ Cache\n type = 'keydb'\n host = 'cache.nebula.internal'\n port = 6380\n ttlSeconds = 1800\n\n ^^^ Cluster\n nodes = [\n { host: 'cache-a.nebula', port: 6380, role: 'primary', zones: ['eu-north-1a'] },\n { host: 'cache-b.nebula', port: 6380, role: 'replica', zones: ['eu-north-1b'] },\n { host: 'cache-c.nebula', port: 6380, role: 'replica', zones: ['eu-north-1c'] },\n { host: 'cache-d.nebula', port: 6380, role: 'observer', zones: ['eu-north-1a'] }\n ]\n\n ^^^ Failover\n strategy = {\n mode: 'predictive',\n thresholds: { errorRate: 0.08, latencyMs: 180 },\n actions: [\n { step: 'drain-traffic', timeoutMs: 1500 },\n { step: 'promote-replica', timeoutMs: 2000 },\n { step: 'resync', propagate: true },\n { step: 'notify', channels: ['pagerduty', 'slack', 'email'] }\n ]\n }\n\n^ Observability\ntracing = true\ntracingProvider = 'tempo'\ntraceSampleRate = 0.35\n\n ^^ Exporters\n jaeger = {\n enabled: false,\n endpoint: 'http://jaeger.internal/api/traces',\n tags: {\n region: 'eu-north',\n environment: 'staging',\n build: { version: '5.0.0-rc.4', commit: 'c8f91d2', dirty: true }\n }\n }\n\n prometheus = {\n enabled: true,\n endpoint: 'http://prometheus.nebula:9090',\n scrapeIntervals: [2, 5, 10, 30],\n retention: { days: 90, maxSeries: 3500000 }\n }\n\n^ Security\nallowedIPs = ['172.16.0.0/12', '100.64.0.0/10']\nblockedCountries = ['KP', 'NG', 'BY']\n\n ^^ Policies\n passwordMinLength = 18\n require2FA = true\n sessionTTLMinutes = 45\n\n ^^^ Lockout\n maxAttempts = 4\n lockoutMinutes = 60\n escalation = {\n enabled: true,\n notify: ['security@nebula.io', 'ciso@nebula.io'],\n rules: [\n { attempts: 3, action: 'captcha' },\n { attempts: 4, action: 'temporary-block', minutes: 120 },\n { attempts: 6, action: 'account-freeze' },\n { attempts: 9, action: 'permanent-block' }\n ]\n }\n";
@@ -0,0 +1,422 @@
1
+ "use strict";
2
+ // src/dev/quick-test-samples/valid-inputs.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.validConfigComplexBigB = exports.validConfigComplexBigA = exports.validConfigComplex = exports.validConfigAdvanced = exports.validConfigWithObjects = exports.validConfigBasic = exports.validConfigShort = void 0;
5
+ /**
6
+ * Development-only YINI samples.
7
+ *
8
+ * These inputs are used for quick manual testing during development
9
+ * via src/dev/quick-test-samples/main.ts. They are NOT part of the automated test suite.
10
+ *
11
+ * All real testing belongs in /tests/.
12
+ */
13
+ exports.validConfigShort = `
14
+ ^ App
15
+ name = 'Hello'
16
+ `;
17
+ exports.validConfigBasic = `
18
+ ^ App
19
+ name = "My Application"
20
+ version = 1.0
21
+ features = ["search", "logging"]
22
+
23
+ // Nested sub-section under App
24
+ ^^ Database
25
+ host = "localhost"
26
+ port = 5432
27
+ `;
28
+ exports.validConfigWithObjects = `
29
+ ^ App
30
+ name = "Demo"
31
+ version = "1.0.0"
32
+ features = [ "search", "dark-mode" ]
33
+
34
+ ^ Database
35
+ host = "localhost"
36
+ port = 5432
37
+ auth = { user: "admin", pass: "secret" }
38
+ `;
39
+ /**
40
+ * Covers booleans, nulls, number formats, and deeper nesting
41
+ */
42
+ exports.validConfigAdvanced = `
43
+ ^ Server
44
+ enabled = ON
45
+ timeout = 3.5
46
+ retries = 5
47
+ threshold = 1e-3
48
+ fallback = null
49
+
50
+ ^^ Logging
51
+ level = "info"
52
+ output = { file: "app.log", rotate: true }
53
+ `;
54
+ /**
55
+ * Covers arrays of objects and realistic structure
56
+ */
57
+ exports.validConfigComplex = `
58
+ ^ App
59
+ services = [
60
+ { name: "api", port: 8080 },
61
+ { name: "web", port: 3000 },
62
+ { name: "auth", port: 9000 }
63
+ ]
64
+
65
+ ^ Security
66
+ roles = ["admin", "user", "guest"]
67
+ enabled = true
68
+ `;
69
+ /*
70
+ Covers:
71
+ - Sections & deep nesting
72
+ - Real-world domain structure
73
+ - Objects in arrays
74
+ - Arrays of objects
75
+ - Scalars of every type
76
+ - Complex policy logic
77
+ - Auth & security modeling
78
+ - Unicode in strings.
79
+ - Strings in double quotes.
80
+ - Large but readable
81
+ */
82
+ exports.validConfigComplexBigA = `
83
+ @YINI
84
+
85
+ // Example A: Corporate SaaS Platform.
86
+
87
+ ^ App
88
+ name = "Acme Platform" // Example Platform
89
+ description = "The word “Acme” has been used for over 100 years in technical and business examples."
90
+ meaning = "It comes from Greek akmḗ (ἀκμή), meaning “the highest point” or “best”."
91
+ version = "2.3.1"
92
+ debug = OFF
93
+ environment = "production"
94
+ maintainers = ["ops@acme.com", "dev@acme.com"]
95
+
96
+ ^^ Features
97
+ enableSearch = true
98
+ enablePayments = true
99
+ enableAnalytics = false
100
+ experimental = ["new-ui", "streaming-api"]
101
+
102
+ ^^ Limits
103
+ maxUsers = 50000
104
+ requestTimeoutMs = 3500
105
+ retryPolicy = { maxRetries: 5, backoff: "exponential" }
106
+
107
+ ^^ Database
108
+ engine = "postgres"
109
+ host = "db.internal.acme.com"
110
+ port = 5432
111
+ ssl = true
112
+ pool = { min: 5, max: 50 }
113
+
114
+ ^^^ Credentials
115
+ username = "app_user"
116
+ password = "****"
117
+ rotateEveryDays = 90
118
+
119
+ ^^ API
120
+ baseUrl = "https://api.acme.com"
121
+ publicEndpoints = ["/health", "/status"]
122
+ internalEndpoints = ["/admin", "/metrics"]
123
+
124
+ ^^^ Auth
125
+ provider = "oauth2"
126
+ tokenTTLSeconds = 3600
127
+ scopes = ["read", "write", "admin"]
128
+
129
+ ^^^^ Clients
130
+ web = { clientId: "web-123", redirectUri: "https://acme.com/callback" }
131
+ mobile = { clientId: "mob-456", redirectUri: "acme://auth" }
132
+
133
+ ^ Logging
134
+ level = "info"
135
+ format = "json"
136
+ outputs = ["stdout", "file"]
137
+
138
+ ^^ File
139
+ path = "/var/log/acme/app.log"
140
+ maxSizeMB = 100
141
+ rotate = true
142
+ keepFiles = 10
143
+
144
+ ^^ Metrics
145
+ enabled = true
146
+ endpoint = "/metrics"
147
+ sampleRate = 0.25
148
+
149
+ ^ Services
150
+ enabled = true
151
+
152
+ ^^ Email
153
+ provider = "smtp"
154
+ host = "smtp.acme.com"
155
+ port = 587
156
+ secure = false
157
+ from = "no-reply@acme.com"
158
+
159
+ ^^^ Credentials
160
+ user = "mailer"
161
+ pass = "mailer-secret"
162
+
163
+ ^^ Cache
164
+ type = "redis"
165
+ host = "cache.internal.acme.com"
166
+ port = 6379
167
+ ttlSeconds = 600
168
+
169
+ ^^^ Cluster
170
+ nodes = [
171
+ { host: "cache-1.internal", port: 6379 },
172
+ { host: "cache-2.internal", port: 6379 },
173
+ { host: "cache-3.internal", port: 6379 }
174
+ ]
175
+
176
+ ^ Observability
177
+ tracing = true
178
+ tracingProvider = "opentelemetry"
179
+ traceSampleRate = 0.1
180
+
181
+ ^^ Exporters
182
+ jaeger = { enabled: true, endpoint: "http://jaeger:14268/api/traces" }
183
+ prometheus = { enabled: true, endpoint: "http://prom:9090" }
184
+
185
+ ^ Security
186
+ allowedIPs = ["10.0.0.0/8", "192.168.0.0/16"]
187
+ blockedCountries = ["KP", "SD"]
188
+
189
+ ^^ Policies
190
+ passwordMinLength = 14
191
+ require2FA = true
192
+ sessionTTLMinutes = 120
193
+
194
+ ^^^ Lockout
195
+ maxAttempts = 5
196
+ lockoutMinutes = 30
197
+ `;
198
+ /*
199
+ Example B covers:
200
+ Covers:
201
+ - Nested arrays inside inline objects.
202
+ - Sections & deep nesting.
203
+ - Real-world domain structure.
204
+ - Objects in arrays.
205
+ - Arrays of objects.
206
+ - Scalars of every type.
207
+ - Complex policy logic.
208
+ - Auth & security modeling.
209
+ - Unicode in strings.
210
+ - Strings in single quotes.
211
+ - Large but readable.
212
+ */
213
+ exports.validConfigComplexBigB = `
214
+ @YINI
215
+
216
+ // Example B: High-Security Distributed Control System.
217
+
218
+ ^ App
219
+ name = 'Nebula Control Suite'
220
+ description = 'A distributed operations platform for autonomous systems and edge analytics.'
221
+ meaning = 'Nebula comes from Latin "nebula" meaning mist or cloud.'
222
+ version = '5.0.0-rc.4'
223
+ debug = ON
224
+ environment = 'staging'
225
+ maintainers = ['infra@nebula.io', 'platform@nebula.io', 'secops@nebula.io']
226
+
227
+ ^^ Features
228
+ enableSearch = false
229
+ enablePayments = false
230
+ enableAnalytics = true
231
+ experimental = ['vector-engine', 'adaptive-ui', 'ai-routing']
232
+
233
+ ^^ Limits
234
+ maxUsers = 120000
235
+ requestTimeoutMs = 7200
236
+ retryPolicy = {
237
+ maxRetries: 9,
238
+ backoff: 'fibonacci',
239
+ retryOn: ['timeout', '5xx', 'throttle'],
240
+ schedule: [
241
+ { attempt: 1, delayMs: 80 },
242
+ { attempt: 2, delayMs: 160 },
243
+ { attempt: 3, delayMs: 320 },
244
+ { attempt: 4, delayMs: 640 },
245
+ { attempt: 5, delayMs: 1280 }
246
+ ]
247
+ }
248
+
249
+ ^^ Database
250
+ engine = 'cockroachdb'
251
+ host = 'cluster.db.nebula.io'
252
+ port = 26257
253
+ ssl = true
254
+ pool = {
255
+ min: 12,
256
+ max: 120,
257
+ warmup: {
258
+ enabled: true,
259
+ strategy: 'aggressive',
260
+ steps: [10, 25, 50, 75, 100],
261
+ healthChecks: [
262
+ { name: 'connectivity', timeoutMs: 300 },
263
+ { name: 'replication', maxLagMs: 200 },
264
+ { name: 'quorum', minNodes: 3 }
265
+ ]
266
+ }
267
+ }
268
+
269
+ ^^^ Credentials
270
+ username = 'nebula_app'
271
+ password = '****'
272
+ rotateEveryDays = 45
273
+ history = [
274
+ { rotatedAt: '2025-05-10', reason: 'scheduled' },
275
+ { rotatedAt: '2025-03-02', reason: 'key-compromise' },
276
+ { rotatedAt: '2024-12-15', reason: 'policy-change' }
277
+ ]
278
+
279
+ ^^ API
280
+ baseUrl = 'https://api.nebula.io'
281
+ publicEndpoints = ['/health', '/status', '/version']
282
+ internalEndpoints = ['/admin', '/metrics', '/orchestrator', '/scheduler']
283
+
284
+ ^^^ Auth
285
+ provider = 'oidc'
286
+ tokenTTLSeconds = 5400
287
+ scopes = ['read', 'write', 'deploy', 'audit']
288
+
289
+ ^^^^ Clients
290
+ web = {
291
+ clientId: 'nebula-web-prod',
292
+ redirectUri: 'https://nebula.io/auth/callback',
293
+ allowedOrigins: ['https://nebula.io', 'https://console.nebula.io'],
294
+ secrets: [
295
+ { id: 'alpha', value: 'QX7faP9', active: true },
296
+ { id: 'beta', value: 'LM8KdW2', active: true },
297
+ { id: 'legacy', value: 'OLD-KEY-DO-NOT-USE', active: false }
298
+ ]
299
+ }
300
+
301
+ mobile = {
302
+ clientId: 'nebula-mobile',
303
+ redirectUri: 'nebula://auth',
304
+ platforms: [
305
+ { name: 'ios', minVersion: '15.2', enabled: true },
306
+ { name: 'android', minVersion: '11', enabled: true },
307
+ { name: 'harmonyos', minVersion: '4', enabled: false }
308
+ ],
309
+ refreshPolicy: {
310
+ enabled: true,
311
+ limits: { perHour: 60, perDay: 600 },
312
+ audit: [
313
+ { event: 'refresh', severity: 'info' },
314
+ { event: 'suspicious-location', severity: 'warning' },
315
+ { event: 'credential-stuffing', severity: 'critical' }
316
+ ]
317
+ }
318
+ }
319
+
320
+ ^ Logging
321
+ level = 'debug'
322
+ format = 'ndjson'
323
+ outputs = ['stdout', 'file', 'syslog']
324
+
325
+ ^^ File
326
+ path = '/srv/log/nebula/nebula.log'
327
+ maxSizeMB = 250
328
+ rotate = true
329
+ keepFiles = 30
330
+
331
+ ^^ Metrics
332
+ enabled = true
333
+ endpoint = '/internal/metrics'
334
+ sampleRate = 0.75
335
+
336
+ ^ Services
337
+ enabled = true
338
+
339
+ ^^ Email
340
+ provider = 'ses'
341
+ host = 'email.nebula.io'
342
+ port = 465
343
+ secure = true
344
+ from = 'system@nebula.io'
345
+
346
+ ^^^ Credentials
347
+ user = 'mailer-nebula'
348
+ pass = 'MAIL-SEC-9921'
349
+
350
+ ^^ Cache
351
+ type = 'keydb'
352
+ host = 'cache.nebula.internal'
353
+ port = 6380
354
+ ttlSeconds = 1800
355
+
356
+ ^^^ Cluster
357
+ nodes = [
358
+ { host: 'cache-a.nebula', port: 6380, role: 'primary', zones: ['eu-north-1a'] },
359
+ { host: 'cache-b.nebula', port: 6380, role: 'replica', zones: ['eu-north-1b'] },
360
+ { host: 'cache-c.nebula', port: 6380, role: 'replica', zones: ['eu-north-1c'] },
361
+ { host: 'cache-d.nebula', port: 6380, role: 'observer', zones: ['eu-north-1a'] }
362
+ ]
363
+
364
+ ^^^ Failover
365
+ strategy = {
366
+ mode: 'predictive',
367
+ thresholds: { errorRate: 0.08, latencyMs: 180 },
368
+ actions: [
369
+ { step: 'drain-traffic', timeoutMs: 1500 },
370
+ { step: 'promote-replica', timeoutMs: 2000 },
371
+ { step: 'resync', propagate: true },
372
+ { step: 'notify', channels: ['pagerduty', 'slack', 'email'] }
373
+ ]
374
+ }
375
+
376
+ ^ Observability
377
+ tracing = true
378
+ tracingProvider = 'tempo'
379
+ traceSampleRate = 0.35
380
+
381
+ ^^ Exporters
382
+ jaeger = {
383
+ enabled: false,
384
+ endpoint: 'http://jaeger.internal/api/traces',
385
+ tags: {
386
+ region: 'eu-north',
387
+ environment: 'staging',
388
+ build: { version: '5.0.0-rc.4', commit: 'c8f91d2', dirty: true }
389
+ }
390
+ }
391
+
392
+ prometheus = {
393
+ enabled: true,
394
+ endpoint: 'http://prometheus.nebula:9090',
395
+ scrapeIntervals: [2, 5, 10, 30],
396
+ retention: { days: 90, maxSeries: 3500000 }
397
+ }
398
+
399
+ ^ Security
400
+ allowedIPs = ['172.16.0.0/12', '100.64.0.0/10']
401
+ blockedCountries = ['KP', 'NG', 'BY']
402
+
403
+ ^^ Policies
404
+ passwordMinLength = 18
405
+ require2FA = true
406
+ sessionTTLMinutes = 45
407
+
408
+ ^^^ Lockout
409
+ maxAttempts = 4
410
+ lockoutMinutes = 60
411
+ escalation = {
412
+ enabled: true,
413
+ notify: ['security@nebula.io', 'ciso@nebula.io'],
414
+ rules: [
415
+ { attempts: 3, action: 'captcha' },
416
+ { attempts: 4, action: 'temporary-block', minutes: 120 },
417
+ { attempts: 6, action: 'account-freeze' },
418
+ { attempts: 9, action: 'permanent-block' }
419
+ ]
420
+ }
421
+ `;
422
+ //# sourceMappingURL=valid-inputs.js.map