@forzalabs/remora 0.0.14 → 0.0.15
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/Constants.js
CHANGED
package/actions/init.js
CHANGED
|
@@ -32,7 +32,7 @@ const init = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
32
32
|
const defaultSource = fs_extra_1.default.readFileSync(path_1.default.join(__dirname, `../documentation/default_resources/source.json`), 'utf-8');
|
|
33
33
|
const defaultConsumer = fs_extra_1.default.readFileSync(path_1.default.join(__dirname, `../documentation/default_resources/consumer.json`), 'utf-8');
|
|
34
34
|
const defaultProducer = fs_extra_1.default.readFileSync(path_1.default.join(__dirname, `../documentation/default_resources/producer.json`), 'utf-8');
|
|
35
|
-
const defaultSchema =
|
|
35
|
+
// const defaultSchema = fs.readFileSync(path.join(__dirname, `../documentation/default_resources/schema.json`), 'utf-8')
|
|
36
36
|
const defaultRemoraProject = fs_extra_1.default.readFileSync(path_1.default.join(__dirname, `../documentation/default_resources/project.json`), 'utf-8');
|
|
37
37
|
const readme = fs_extra_1.default.readFileSync(path_1.default.join(__dirname, `../documentation/README.md`), 'utf-8');
|
|
38
38
|
const files = [
|
|
@@ -43,7 +43,6 @@ const init = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
43
43
|
{ path: 'remora/producers/.gitkeep', content: '' },
|
|
44
44
|
{ path: 'remora/producers/default-producer.json', content: defaultProducer },
|
|
45
45
|
{ path: 'remora/schemas/.gitkeep', content: '' },
|
|
46
|
-
{ path: 'remora/schemas/default-schemas.json', content: defaultSchema },
|
|
47
46
|
{ path: 'remora/project.json', content: defaultRemoraProject },
|
|
48
47
|
{ path: 'remora/README.md', content: readme }
|
|
49
48
|
];
|
package/documentation/README.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
This README explains the available configurations for each resource type in the project.
|
|
4
4
|
Each section details the expected values for different keys in the JSON files.
|
|
5
5
|
|
|
6
|
+
## JSON Schemas
|
|
7
|
+
|
|
8
|
+
All configuration files follow specific JSON schemas to ensure consistency and validation. You can find the schema definitions at the following URLs:
|
|
9
|
+
|
|
10
|
+
- **Source**: [source-schema.json](https://raw.githubusercontent.com/ForzaLabs/remora-public/refs/heads/main/json_schemas/source-schema.json)
|
|
11
|
+
- **Producer**: [producer-schema.json](https://raw.githubusercontent.com/ForzaLabs/remora-public/refs/heads/main/json_schemas/producer-schema.json)
|
|
12
|
+
- **Consumer**: [consumer-schema.json](https://raw.githubusercontent.com/ForzaLabs/remora-public/refs/heads/main/json_schemas/consumer-schema.json)
|
|
13
|
+
- **Project**: [project-schema.json](https://raw.githubusercontent.com/ForzaLabs/remora-public/refs/heads/main/json_schemas/project-schema.json)
|
|
14
|
+
|
|
6
15
|
## Remora Configuration
|
|
7
16
|
|
|
8
17
|
The main project configuration file.
|
|
@@ -37,6 +37,7 @@ class DeveloperEngineClass {
|
|
|
37
37
|
measures: [],
|
|
38
38
|
_version: (_a = producer._version) !== null && _a !== void 0 ? _a : 1
|
|
39
39
|
};
|
|
40
|
+
mappedProducer['$schema'] = producer['$schema'];
|
|
40
41
|
// Save the mapped producer to file
|
|
41
42
|
const producerPath = path_1.default.join(process.cwd(), 'remora', 'producers', `${producer.name}.json`);
|
|
42
43
|
yield promises_1.default.writeFile(producerPath, JSON.stringify(mappedProducer, null, 4), 'utf-8');
|
|
@@ -68,7 +68,7 @@ class FileExporterClass {
|
|
|
68
68
|
for (let i = 0; i < data.length; i++) {
|
|
69
69
|
const row = data[i];
|
|
70
70
|
const columns = keys.map(key => row[key]);
|
|
71
|
-
const rowValues = columns.map(c => Algo_1.default.replaceAll(c.toString(), '"', '""')).map(c => `"${c}"`).join(',');
|
|
71
|
+
const rowValues = columns.map(c => { var _a; return Algo_1.default.replaceAll((_a = c === null || c === void 0 ? void 0 : c.toString()) !== null && _a !== void 0 ? _a : '', '"', '""'); }).map(c => `"${c}"`).join(',');
|
|
72
72
|
lines.push(rowValues);
|
|
73
73
|
}
|
|
74
74
|
const csv = lines.join('\n');
|