@o3co/ts.hocon 1.9.0 → 1.11.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.
@@ -0,0 +1,32 @@
1
+ import { C as Config } from '../config-Dlq6rF3w.cjs';
2
+
3
+ /**
4
+ * Read a `java.util.Properties` file as HOCON config.
5
+ *
6
+ * The result is a fully resolved Config holding only strings, so it works as a
7
+ * fallback layer under your own document:
8
+ *
9
+ * ```ts
10
+ * const base = parsePropertiesConfig(readFileSync('service.properties', 'utf-8'))
11
+ * const cfg = parse(readFileSync('app.conf', 'utf-8'), { resolveSubstitutions: false })
12
+ * const merged = cfg.withFallback(base).resolve()
13
+ * ```
14
+ *
15
+ * Deferring resolution matters: the default `parse` resolves as it goes, so a
16
+ * `${...}` pointing into the Properties file would fail before the fallback is
17
+ * ever attached.
18
+ *
19
+ * A `${a.b}` in a value stays that literal text — the file belongs to another
20
+ * program that never agreed to HOCON's syntax (spec F0.2).
21
+ *
22
+ * Dotted keys nest (F2.1), and every key is preserved — `__proto__`,
23
+ * `constructor` and `prototype` included (F2.9). They arrive as ordinary keys:
24
+ * the tree is built on null-prototype objects and `toObject()` defines own
25
+ * properties, so nothing can reach `Object.prototype`.
26
+ *
27
+ * Shares its syntax layer with `include "x.properties"`, so the two cannot
28
+ * drift apart.
29
+ */
30
+ declare function parsePropertiesConfig(input: string, originDescription?: string): Config;
31
+
32
+ export { parsePropertiesConfig };
@@ -0,0 +1,32 @@
1
+ import { C as Config } from '../config-Dlq6rF3w.js';
2
+
3
+ /**
4
+ * Read a `java.util.Properties` file as HOCON config.
5
+ *
6
+ * The result is a fully resolved Config holding only strings, so it works as a
7
+ * fallback layer under your own document:
8
+ *
9
+ * ```ts
10
+ * const base = parsePropertiesConfig(readFileSync('service.properties', 'utf-8'))
11
+ * const cfg = parse(readFileSync('app.conf', 'utf-8'), { resolveSubstitutions: false })
12
+ * const merged = cfg.withFallback(base).resolve()
13
+ * ```
14
+ *
15
+ * Deferring resolution matters: the default `parse` resolves as it goes, so a
16
+ * `${...}` pointing into the Properties file would fail before the fallback is
17
+ * ever attached.
18
+ *
19
+ * A `${a.b}` in a value stays that literal text — the file belongs to another
20
+ * program that never agreed to HOCON's syntax (spec F0.2).
21
+ *
22
+ * Dotted keys nest (F2.1), and every key is preserved — `__proto__`,
23
+ * `constructor` and `prototype` included (F2.9). They arrive as ordinary keys:
24
+ * the tree is built on null-prototype objects and `toObject()` defines own
25
+ * properties, so nothing can reach `Object.prototype`.
26
+ *
27
+ * Shares its syntax layer with `include "x.properties"`, so the two cannot
28
+ * drift apart.
29
+ */
30
+ declare function parsePropertiesConfig(input: string, originDescription?: string): Config;
31
+
32
+ export { parsePropertiesConfig };