realitydb 0.1.0 → 0.1.1
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/README.md +24 -24
- package/dist/index.js +51 -51
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
#
|
|
1
|
+
# RealityDB
|
|
2
2
|
|
|
3
3
|
> Production-like data before production exists.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
RealityDB is a developer tool that instantly populates your database with
|
|
6
6
|
realistic, schema-aware data. One command, realistic environments.
|
|
7
7
|
|
|
8
8
|
## Install
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
npm install -g
|
|
11
|
+
npm install -g realitydb
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
## Quick Start
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
realitydb scan # Understand your schema
|
|
18
|
+
realitydb seed --seed 42 # Populate with realistic data
|
|
19
|
+
realitydb reset --confirm # Clear and start fresh
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
Or use npx without installing:
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
npx
|
|
26
|
-
npx
|
|
25
|
+
npx realitydb scan
|
|
26
|
+
npx realitydb seed --template saas --records 1000 --seed 42
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## Features
|
|
@@ -38,28 +38,28 @@ npx seedforge seed --template saas --records 1000 --seed 42
|
|
|
38
38
|
## Templates
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
realitydb seed --template saas --records 1000 --seed 42
|
|
42
|
+
realitydb seed --template ecommerce --records 1000 --seed 42
|
|
43
|
+
realitydb seed --template education --records 1000 --seed 42
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
## Timeline & Scenarios
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
realitydb seed --template saas --timeline 12-months --seed 42
|
|
50
|
+
realitydb seed --template saas --scenario payment-failures --scenario-intensity high
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
## Reality Packs
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
realitydb pack export --template saas --name my-saas-env --seed 42
|
|
57
|
+
realitydb pack import ./my-saas-env.databox-pack.json --confirm
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
## Configuration
|
|
61
61
|
|
|
62
|
-
Create `
|
|
62
|
+
Create `realitydb.config.json` (also reads `seedforge.config.json` and `databox.config.json` for backward compatibility):
|
|
63
63
|
|
|
64
64
|
```json
|
|
65
65
|
{
|
|
@@ -85,14 +85,14 @@ Create `seedforge.config.json` (also reads `databox.config.json` for backward co
|
|
|
85
85
|
|
|
86
86
|
| Command | Description |
|
|
87
87
|
|---------|-------------|
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
92
|
-
| `
|
|
93
|
-
| `
|
|
94
|
-
| `
|
|
95
|
-
| `
|
|
88
|
+
| `realitydb scan` | Scan and display database schema |
|
|
89
|
+
| `realitydb seed` | Generate and insert realistic data |
|
|
90
|
+
| `realitydb reset` | Clear seeded data |
|
|
91
|
+
| `realitydb export` | Export dataset to JSON/CSV/SQL files |
|
|
92
|
+
| `realitydb templates` | List available domain templates |
|
|
93
|
+
| `realitydb scenarios` | List available scenarios |
|
|
94
|
+
| `realitydb pack export` | Export environment as Reality Pack |
|
|
95
|
+
| `realitydb pack import` | Import Reality Pack into database |
|
|
96
96
|
|
|
97
97
|
## License
|
|
98
98
|
|
package/dist/index.js
CHANGED
|
@@ -3494,7 +3494,7 @@ var DEFAULT_CONFIG = {
|
|
|
3494
3494
|
};
|
|
3495
3495
|
|
|
3496
3496
|
// ../../packages/config/dist/loadConfig.js
|
|
3497
|
-
var CONFIG_FILES = ["seedforge.config.json", "databox.config.json"];
|
|
3497
|
+
var CONFIG_FILES = ["realitydb.config.json", "seedforge.config.json", "databox.config.json"];
|
|
3498
3498
|
async function findConfigFile(basePath) {
|
|
3499
3499
|
for (const name of CONFIG_FILES) {
|
|
3500
3500
|
const fullPath = (0, import_node_path.resolve)(basePath, name);
|
|
@@ -3514,8 +3514,8 @@ async function loadConfig(filePath) {
|
|
|
3514
3514
|
} else {
|
|
3515
3515
|
const found = await findConfigFile(".");
|
|
3516
3516
|
if (!found) {
|
|
3517
|
-
throw new Error(`[
|
|
3518
|
-
Create a
|
|
3517
|
+
throw new Error(`[realitydb] Config file not found.
|
|
3518
|
+
Create a realitydb.config.json or specify a path with --config.`);
|
|
3519
3519
|
}
|
|
3520
3520
|
resolvedPath = found;
|
|
3521
3521
|
}
|
|
@@ -3523,19 +3523,19 @@ Create a seedforge.config.json or specify a path with --config.`);
|
|
|
3523
3523
|
try {
|
|
3524
3524
|
raw = await (0, import_promises.readFile)(resolvedPath, "utf-8");
|
|
3525
3525
|
} catch {
|
|
3526
|
-
throw new Error(`[
|
|
3527
|
-
Create a
|
|
3526
|
+
throw new Error(`[realitydb] Config file not found: ${resolvedPath}
|
|
3527
|
+
Create a realitydb.config.json or specify a path with --config.`);
|
|
3528
3528
|
}
|
|
3529
3529
|
let parsed;
|
|
3530
3530
|
try {
|
|
3531
3531
|
parsed = JSON.parse(raw);
|
|
3532
3532
|
} catch {
|
|
3533
|
-
throw new Error(`[
|
|
3533
|
+
throw new Error(`[realitydb] Invalid JSON in config file: ${resolvedPath}`);
|
|
3534
3534
|
}
|
|
3535
3535
|
const config = parsed;
|
|
3536
3536
|
const database = config["database"];
|
|
3537
3537
|
if (!database || typeof database["connectionString"] !== "string") {
|
|
3538
|
-
throw new Error("[
|
|
3538
|
+
throw new Error("[realitydb] Config validation failed: database.connectionString is required.");
|
|
3539
3539
|
}
|
|
3540
3540
|
return {
|
|
3541
3541
|
database: {
|
|
@@ -6644,7 +6644,7 @@ async function scanCommand() {
|
|
|
6644
6644
|
const { schema } = result;
|
|
6645
6645
|
const masked = maskConnectionString(config.database.connectionString);
|
|
6646
6646
|
console.log("");
|
|
6647
|
-
console.log("
|
|
6647
|
+
console.log("RealityDB Schema Scan");
|
|
6648
6648
|
console.log("\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550");
|
|
6649
6649
|
console.log(`Database: ${masked}`);
|
|
6650
6650
|
console.log(`Tables: ${schema.tableCount}`);
|
|
@@ -6683,7 +6683,7 @@ async function scanCommand() {
|
|
|
6683
6683
|
console.log("");
|
|
6684
6684
|
} catch (err) {
|
|
6685
6685
|
const message = err instanceof Error ? err.message : String(err);
|
|
6686
|
-
console.error(`[
|
|
6686
|
+
console.error(`[realitydb] Scan failed: ${message}`);
|
|
6687
6687
|
process.exit(1);
|
|
6688
6688
|
}
|
|
6689
6689
|
}
|
|
@@ -6703,7 +6703,7 @@ async function seedCommand(options) {
|
|
|
6703
6703
|
const template = registry.get(templateName);
|
|
6704
6704
|
if (!template) {
|
|
6705
6705
|
const available = registry.list();
|
|
6706
|
-
console.error(`[
|
|
6706
|
+
console.error(`[realitydb] Template "${templateName}" not found.`);
|
|
6707
6707
|
console.error("");
|
|
6708
6708
|
if (available.length > 0) {
|
|
6709
6709
|
console.error("Available templates:");
|
|
@@ -6722,7 +6722,7 @@ async function seedCommand(options) {
|
|
|
6722
6722
|
for (const name of scenarioNames) {
|
|
6723
6723
|
if (!scenarioRegistry.get(name)) {
|
|
6724
6724
|
const available = scenarioRegistry.list();
|
|
6725
|
-
console.error(`[
|
|
6725
|
+
console.error(`[realitydb] Scenario "${name}" not found.`);
|
|
6726
6726
|
console.error("");
|
|
6727
6727
|
console.error("Available scenarios:");
|
|
6728
6728
|
for (const s of available) {
|
|
@@ -6736,7 +6736,7 @@ async function seedCommand(options) {
|
|
|
6736
6736
|
const effectiveRecords = records ?? config.seed.defaultRecords;
|
|
6737
6737
|
const masked = maskConnectionString(config.database.connectionString);
|
|
6738
6738
|
console.log("");
|
|
6739
|
-
console.log("
|
|
6739
|
+
console.log("RealityDB Seed");
|
|
6740
6740
|
console.log("\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550");
|
|
6741
6741
|
console.log(`Database: ${masked}`);
|
|
6742
6742
|
if (templateName) {
|
|
@@ -6788,15 +6788,15 @@ async function seedCommand(options) {
|
|
|
6788
6788
|
} catch (err) {
|
|
6789
6789
|
const message = err instanceof Error ? err.message : String(err);
|
|
6790
6790
|
if (message.includes("Config file not found")) {
|
|
6791
|
-
console.error(`[
|
|
6792
|
-
console.error("Hint: Copy
|
|
6791
|
+
console.error(`[realitydb] ${message}`);
|
|
6792
|
+
console.error("Hint: Copy realitydb.config.json to realitydb.config.json");
|
|
6793
6793
|
} else if (message.includes("Invalid timeline format")) {
|
|
6794
|
-
console.error(`[
|
|
6794
|
+
console.error(`[realitydb] ${message}`);
|
|
6795
6795
|
} else if (message.includes("connection") || message.includes("ECONNREFUSED")) {
|
|
6796
|
-
console.error(`[
|
|
6796
|
+
console.error(`[realitydb] Seed failed: ${message}`);
|
|
6797
6797
|
console.error("Hint: Check that your database is running (e.g. Docker)");
|
|
6798
6798
|
} else {
|
|
6799
|
-
console.error(`[
|
|
6799
|
+
console.error(`[realitydb] Seed failed: ${message}`);
|
|
6800
6800
|
console.error("Database was not modified (transaction rolled back).");
|
|
6801
6801
|
}
|
|
6802
6802
|
process.exit(1);
|
|
@@ -6815,7 +6815,7 @@ async function resetCommand(options) {
|
|
|
6815
6815
|
const config = await loadConfig();
|
|
6816
6816
|
const masked = maskConnectionString(config.database.connectionString);
|
|
6817
6817
|
console.log("");
|
|
6818
|
-
console.log("
|
|
6818
|
+
console.log("RealityDB Reset");
|
|
6819
6819
|
console.log("\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550");
|
|
6820
6820
|
console.log(`Database: ${masked}`);
|
|
6821
6821
|
console.log("");
|
|
@@ -6830,13 +6830,13 @@ async function resetCommand(options) {
|
|
|
6830
6830
|
} catch (err) {
|
|
6831
6831
|
const message = err instanceof Error ? err.message : String(err);
|
|
6832
6832
|
if (message.includes("Config file not found")) {
|
|
6833
|
-
console.error(`[
|
|
6834
|
-
console.error("Hint: Copy
|
|
6833
|
+
console.error(`[realitydb] ${message}`);
|
|
6834
|
+
console.error("Hint: Copy realitydb.config.json to realitydb.config.json");
|
|
6835
6835
|
} else if (message.includes("connection") || message.includes("ECONNREFUSED")) {
|
|
6836
|
-
console.error(`[
|
|
6836
|
+
console.error(`[realitydb] Reset failed: ${message}`);
|
|
6837
6837
|
console.error("Hint: Check that your database is running (e.g. Docker)");
|
|
6838
6838
|
} else {
|
|
6839
|
-
console.error(`[
|
|
6839
|
+
console.error(`[realitydb] Reset failed: ${message}`);
|
|
6840
6840
|
}
|
|
6841
6841
|
process.exit(1);
|
|
6842
6842
|
}
|
|
@@ -6847,7 +6847,7 @@ async function exportCommand(options) {
|
|
|
6847
6847
|
try {
|
|
6848
6848
|
const config = await loadConfig();
|
|
6849
6849
|
const format = options.format ?? config.export?.defaultFormat ?? "json";
|
|
6850
|
-
const outputDir = options.output ?? config.export?.outputDir ?? "./.
|
|
6850
|
+
const outputDir = options.output ?? config.export?.outputDir ?? "./.realitydb";
|
|
6851
6851
|
const records = options.records ? parseInt(options.records, 10) : void 0;
|
|
6852
6852
|
const seed = options.seed ? parseInt(options.seed, 10) : void 0;
|
|
6853
6853
|
const templateName = options.template ?? config.template;
|
|
@@ -6861,7 +6861,7 @@ async function exportCommand(options) {
|
|
|
6861
6861
|
const template = registry.get(templateName);
|
|
6862
6862
|
if (!template) {
|
|
6863
6863
|
const available = registry.list();
|
|
6864
|
-
console.error(`[
|
|
6864
|
+
console.error(`[realitydb] Template "${templateName}" not found.`);
|
|
6865
6865
|
console.error("");
|
|
6866
6866
|
if (available.length > 0) {
|
|
6867
6867
|
console.error("Available templates:");
|
|
@@ -6880,7 +6880,7 @@ async function exportCommand(options) {
|
|
|
6880
6880
|
for (const name of scenarioNames) {
|
|
6881
6881
|
if (!scenarioRegistry.get(name)) {
|
|
6882
6882
|
const available = scenarioRegistry.list();
|
|
6883
|
-
console.error(`[
|
|
6883
|
+
console.error(`[realitydb] Scenario "${name}" not found.`);
|
|
6884
6884
|
console.error("");
|
|
6885
6885
|
console.error("Available scenarios:");
|
|
6886
6886
|
for (const s of available) {
|
|
@@ -6891,7 +6891,7 @@ async function exportCommand(options) {
|
|
|
6891
6891
|
}
|
|
6892
6892
|
}
|
|
6893
6893
|
console.log("");
|
|
6894
|
-
console.log("
|
|
6894
|
+
console.log("RealityDB Export");
|
|
6895
6895
|
console.log("\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550");
|
|
6896
6896
|
console.log(`Database: ${masked}`);
|
|
6897
6897
|
if (templateName) {
|
|
@@ -6937,15 +6937,15 @@ async function exportCommand(options) {
|
|
|
6937
6937
|
} catch (err) {
|
|
6938
6938
|
const message = err instanceof Error ? err.message : String(err);
|
|
6939
6939
|
if (message.includes("Config file not found")) {
|
|
6940
|
-
console.error(`[
|
|
6941
|
-
console.error("Hint: Copy
|
|
6940
|
+
console.error(`[realitydb] ${message}`);
|
|
6941
|
+
console.error("Hint: Copy realitydb.config.json to realitydb.config.json");
|
|
6942
6942
|
} else if (message.includes("Invalid timeline format")) {
|
|
6943
|
-
console.error(`[
|
|
6943
|
+
console.error(`[realitydb] ${message}`);
|
|
6944
6944
|
} else if (message.includes("connection") || message.includes("ECONNREFUSED")) {
|
|
6945
|
-
console.error(`[
|
|
6945
|
+
console.error(`[realitydb] Export failed: ${message}`);
|
|
6946
6946
|
console.error("Hint: Check that your database is running (e.g. Docker)");
|
|
6947
6947
|
} else {
|
|
6948
|
-
console.error(`[
|
|
6948
|
+
console.error(`[realitydb] Export failed: ${message}`);
|
|
6949
6949
|
}
|
|
6950
6950
|
process.exit(1);
|
|
6951
6951
|
}
|
|
@@ -6995,7 +6995,7 @@ async function packExportCommand(options) {
|
|
|
6995
6995
|
const template = registry.get(templateName);
|
|
6996
6996
|
if (!template) {
|
|
6997
6997
|
const available = registry.list();
|
|
6998
|
-
console.error(`[
|
|
6998
|
+
console.error(`[realitydb] Template "${templateName}" not found.`);
|
|
6999
6999
|
console.error("");
|
|
7000
7000
|
if (available.length > 0) {
|
|
7001
7001
|
console.error("Available templates:");
|
|
@@ -7012,7 +7012,7 @@ async function packExportCommand(options) {
|
|
|
7012
7012
|
for (const name of scenarioNames) {
|
|
7013
7013
|
if (!scenarioRegistry.get(name)) {
|
|
7014
7014
|
const available = scenarioRegistry.list();
|
|
7015
|
-
console.error(`[
|
|
7015
|
+
console.error(`[realitydb] Scenario "${name}" not found.`);
|
|
7016
7016
|
console.error("");
|
|
7017
7017
|
console.error("Available scenarios:");
|
|
7018
7018
|
for (const s of available) {
|
|
@@ -7069,13 +7069,13 @@ async function packExportCommand(options) {
|
|
|
7069
7069
|
} catch (err) {
|
|
7070
7070
|
const message = err instanceof Error ? err.message : String(err);
|
|
7071
7071
|
if (message.includes("Config file not found")) {
|
|
7072
|
-
console.error(`[
|
|
7073
|
-
console.error("Hint: Copy
|
|
7072
|
+
console.error(`[realitydb] ${message}`);
|
|
7073
|
+
console.error("Hint: Copy realitydb.config.json to realitydb.config.json");
|
|
7074
7074
|
} else if (message.includes("connection") || message.includes("ECONNREFUSED")) {
|
|
7075
|
-
console.error(`[
|
|
7075
|
+
console.error(`[realitydb] Pack export failed: ${message}`);
|
|
7076
7076
|
console.error("Hint: Check that your database is running (e.g. Docker)");
|
|
7077
7077
|
} else {
|
|
7078
|
-
console.error(`[
|
|
7078
|
+
console.error(`[realitydb] Pack export failed: ${message}`);
|
|
7079
7079
|
}
|
|
7080
7080
|
process.exit(1);
|
|
7081
7081
|
}
|
|
@@ -7083,13 +7083,13 @@ async function packExportCommand(options) {
|
|
|
7083
7083
|
async function packImportCommand(filePath, options) {
|
|
7084
7084
|
try {
|
|
7085
7085
|
if (!options.confirm) {
|
|
7086
|
-
console.error("[
|
|
7086
|
+
console.error("[realitydb] Import requires --confirm flag.");
|
|
7087
7087
|
console.error("Hint: This will insert data into your database. Use --confirm to proceed.");
|
|
7088
7088
|
process.exit(1);
|
|
7089
7089
|
}
|
|
7090
7090
|
if (!filePath) {
|
|
7091
|
-
console.error("[
|
|
7092
|
-
console.error("Usage:
|
|
7091
|
+
console.error("[realitydb] Missing file path argument.");
|
|
7092
|
+
console.error("Usage: realitydb pack import <file> --confirm");
|
|
7093
7093
|
process.exit(1);
|
|
7094
7094
|
}
|
|
7095
7095
|
const config = await loadConfig();
|
|
@@ -7120,19 +7120,19 @@ async function packImportCommand(filePath, options) {
|
|
|
7120
7120
|
} catch (err) {
|
|
7121
7121
|
const message = err instanceof Error ? err.message : String(err);
|
|
7122
7122
|
if (message.includes("Config file not found")) {
|
|
7123
|
-
console.error(`[
|
|
7124
|
-
console.error("Hint: Copy
|
|
7123
|
+
console.error(`[realitydb] ${message}`);
|
|
7124
|
+
console.error("Hint: Copy realitydb.config.json to realitydb.config.json");
|
|
7125
7125
|
} else if (message.includes("Cannot import Reality Pack")) {
|
|
7126
|
-
console.error(`[
|
|
7126
|
+
console.error(`[realitydb] ${message}`);
|
|
7127
7127
|
} else if (message.includes("Invalid Reality Pack")) {
|
|
7128
|
-
console.error(`[
|
|
7128
|
+
console.error(`[realitydb] ${message}`);
|
|
7129
7129
|
} else if (message.includes("Failed to read Reality Pack")) {
|
|
7130
|
-
console.error(`[
|
|
7130
|
+
console.error(`[realitydb] ${message}`);
|
|
7131
7131
|
} else if (message.includes("connection") || message.includes("ECONNREFUSED")) {
|
|
7132
|
-
console.error(`[
|
|
7132
|
+
console.error(`[realitydb] Pack import failed: ${message}`);
|
|
7133
7133
|
console.error("Hint: Check that your database is running (e.g. Docker)");
|
|
7134
7134
|
} else {
|
|
7135
|
-
console.error(`[
|
|
7135
|
+
console.error(`[realitydb] Pack import failed: ${message}`);
|
|
7136
7136
|
}
|
|
7137
7137
|
process.exit(1);
|
|
7138
7138
|
}
|
|
@@ -7141,11 +7141,11 @@ async function packImportCommand(filePath, options) {
|
|
|
7141
7141
|
// src/cli.ts
|
|
7142
7142
|
function run(argv) {
|
|
7143
7143
|
const program2 = new Command();
|
|
7144
|
-
program2.name("
|
|
7144
|
+
program2.name("realitydb").description("RealityDB \u2014 Developer Reality Platform").version("0.1.1").option("--config <path>", "Path to config file").option("--verbose", "Enable verbose output", false);
|
|
7145
7145
|
program2.command("scan").description("Scan database schema").action(scanCommand);
|
|
7146
7146
|
program2.command("seed").description("Seed database with generated data").option("--records <count>", "Number of records per table").option("--template <name>", "Template to use").option("--seed <number>", "Random seed for reproducibility").option("--timeline <duration>", 'Timeline duration (e.g., "12-months", "1-year")').option("--scenario <names>", "Scenarios to apply (comma-separated)").option("--scenario-intensity <level>", "Scenario intensity (low|medium|high)", "medium").action(seedCommand);
|
|
7147
7147
|
program2.command("reset").description("Reset seeded data").option("--confirm", "Confirm destructive operation").action(resetCommand);
|
|
7148
|
-
program2.command("export").description("Export generated data").option("--format <format>", "Output format (json|csv|sql)", "json").option("--output <dir>", "Output directory", "./.
|
|
7148
|
+
program2.command("export").description("Export generated data").option("--format <format>", "Output format (json|csv|sql)", "json").option("--output <dir>", "Output directory", "./.realitydb").option("--records <count>", "Number of records per table").option("--seed <number>", "Random seed for reproducibility").option("--template <name>", "Template to use").option("--timeline <duration>", 'Timeline duration (e.g., "12-months", "1-year")').option("--scenario <names>", "Scenarios to apply (comma-separated)").option("--scenario-intensity <level>", "Scenario intensity (low|medium|high)", "medium").action(exportCommand);
|
|
7149
7149
|
program2.command("templates").description("List available domain templates").action(templatesCommand);
|
|
7150
7150
|
program2.command("scenarios").description("List available scenarios").action(scenariosCommand);
|
|
7151
7151
|
const pack = program2.command("pack").description("Reality Pack operations");
|
|
@@ -7153,8 +7153,8 @@ function run(argv) {
|
|
|
7153
7153
|
pack.command("import <file>").description("Import Reality Pack into database").option("--confirm", "Confirm import operation").action(packImportCommand);
|
|
7154
7154
|
program2.action(() => {
|
|
7155
7155
|
console.log("");
|
|
7156
|
-
console.log("
|
|
7157
|
-
console.log("Run `
|
|
7156
|
+
console.log("RealityDB v0.1.1 \u2014 Developer Reality Platform");
|
|
7157
|
+
console.log("Run `realitydb --help` for available commands.");
|
|
7158
7158
|
console.log("");
|
|
7159
7159
|
});
|
|
7160
7160
|
program2.parse(argv);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "realitydb",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Developer Reality Platform — realistic database environments from your schema",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"test-data",
|
|
15
15
|
"reality-engine",
|
|
16
16
|
"schema",
|
|
17
|
-
"
|
|
17
|
+
"realitydb"
|
|
18
18
|
],
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"url": "https://github.com/emkwambe/databox/issues"
|
|
27
27
|
},
|
|
28
28
|
"bin": {
|
|
29
|
-
"
|
|
29
|
+
"realitydb": "./dist/index.js"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"dist/",
|