thatcher 1.0.37 → 1.0.38
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thatcher",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.38",
|
|
4
4
|
"description": "A config-driven application framework for building data-intensive web apps without code.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"busybase": "^1.0.2",
|
|
55
55
|
"googleapis": "^173.0.0",
|
|
56
56
|
"hyperformula": "^3.2.0",
|
|
57
|
-
"js-yaml": "^
|
|
57
|
+
"js-yaml": "^5.2.1",
|
|
58
58
|
"lucia": "^3.2.2",
|
|
59
59
|
"nodemailer": "^9.0.1",
|
|
60
60
|
"webjsx": "^0.0.73",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import fs from 'fs';
|
|
4
4
|
import path from 'path';
|
|
5
|
-
import
|
|
5
|
+
import { load as yamlLoad } from 'js-yaml';
|
|
6
6
|
|
|
7
7
|
export async function loadConfig(configSource) {
|
|
8
8
|
let config;
|
|
@@ -13,7 +13,7 @@ export async function loadConfig(configSource) {
|
|
|
13
13
|
throw new Error(`Configuration file not found: ${configPath}`);
|
|
14
14
|
}
|
|
15
15
|
const content = fs.readFileSync(configPath, 'utf-8');
|
|
16
|
-
config =
|
|
16
|
+
config = yamlLoad(content);
|
|
17
17
|
} else if (typeof configSource === 'object') {
|
|
18
18
|
config = configSource;
|
|
19
19
|
} else {
|
package/src/index.js
CHANGED
|
@@ -82,8 +82,8 @@ export class Thatcher {
|
|
|
82
82
|
throw new Error(`Configuration file not found: ${configPath}`);
|
|
83
83
|
}
|
|
84
84
|
const content = fs.readFileSync(configPath, 'utf-8');
|
|
85
|
-
const {
|
|
86
|
-
masterConfig =
|
|
85
|
+
const { load: yamlLoad } = await import('js-yaml');
|
|
86
|
+
masterConfig = yamlLoad(content);
|
|
87
87
|
} else if (typeof config === 'object') {
|
|
88
88
|
masterConfig = config;
|
|
89
89
|
} else {
|
|
@@ -96,8 +96,8 @@ export class Thatcher {
|
|
|
96
96
|
if (fs.existsSync(p)) {
|
|
97
97
|
this.options.config = p;
|
|
98
98
|
const content = fs.readFileSync(p, 'utf-8');
|
|
99
|
-
const {
|
|
100
|
-
masterConfig =
|
|
99
|
+
const { load: yamlLoad } = await import('js-yaml');
|
|
100
|
+
masterConfig = yamlLoad(content);
|
|
101
101
|
break;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Adapted from moonlanding/src/lib/config-generator-engine.js
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { load as yamlLoad } from 'js-yaml';
|
|
4
4
|
import { LRUCache, deepFreeze, deepClone, recursiveResolve } from './config-helpers.js';
|
|
5
5
|
import { generateFieldsFromOverrides, ensureFieldLabels } from './config-field-helpers.js';
|
|
6
6
|
|