@realitydb/cli 2.0.3 → 2.0.4
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/dist/index.js +44 -176
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1195,8 +1195,8 @@ var require_command = __commonJS({
|
|
|
1195
1195
|
"use strict";
|
|
1196
1196
|
var EventEmitter = require("events").EventEmitter;
|
|
1197
1197
|
var childProcess = require("child_process");
|
|
1198
|
-
var
|
|
1199
|
-
var
|
|
1198
|
+
var path3 = require("path");
|
|
1199
|
+
var fs3 = require("fs");
|
|
1200
1200
|
var process2 = require("process");
|
|
1201
1201
|
var { Argument: Argument2, humanReadableArgName } = require_argument();
|
|
1202
1202
|
var { CommanderError: CommanderError2 } = require_error();
|
|
@@ -2190,7 +2190,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2190
2190
|
* @param {string} subcommandName
|
|
2191
2191
|
*/
|
|
2192
2192
|
_checkForMissingExecutable(executableFile, executableDir, subcommandName) {
|
|
2193
|
-
if (
|
|
2193
|
+
if (fs3.existsSync(executableFile)) return;
|
|
2194
2194
|
const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
|
|
2195
2195
|
const executableMissing = `'${executableFile}' does not exist
|
|
2196
2196
|
- if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
@@ -2208,11 +2208,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2208
2208
|
let launchWithNode = false;
|
|
2209
2209
|
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
2210
2210
|
function findFile(baseDir, baseName) {
|
|
2211
|
-
const localBin =
|
|
2212
|
-
if (
|
|
2213
|
-
if (sourceExt.includes(
|
|
2211
|
+
const localBin = path3.resolve(baseDir, baseName);
|
|
2212
|
+
if (fs3.existsSync(localBin)) return localBin;
|
|
2213
|
+
if (sourceExt.includes(path3.extname(baseName))) return void 0;
|
|
2214
2214
|
const foundExt = sourceExt.find(
|
|
2215
|
-
(ext) =>
|
|
2215
|
+
(ext) => fs3.existsSync(`${localBin}${ext}`)
|
|
2216
2216
|
);
|
|
2217
2217
|
if (foundExt) return `${localBin}${foundExt}`;
|
|
2218
2218
|
return void 0;
|
|
@@ -2224,21 +2224,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2224
2224
|
if (this._scriptPath) {
|
|
2225
2225
|
let resolvedScriptPath;
|
|
2226
2226
|
try {
|
|
2227
|
-
resolvedScriptPath =
|
|
2227
|
+
resolvedScriptPath = fs3.realpathSync(this._scriptPath);
|
|
2228
2228
|
} catch {
|
|
2229
2229
|
resolvedScriptPath = this._scriptPath;
|
|
2230
2230
|
}
|
|
2231
|
-
executableDir =
|
|
2232
|
-
|
|
2231
|
+
executableDir = path3.resolve(
|
|
2232
|
+
path3.dirname(resolvedScriptPath),
|
|
2233
2233
|
executableDir
|
|
2234
2234
|
);
|
|
2235
2235
|
}
|
|
2236
2236
|
if (executableDir) {
|
|
2237
2237
|
let localFile = findFile(executableDir, executableFile);
|
|
2238
2238
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
2239
|
-
const legacyName =
|
|
2239
|
+
const legacyName = path3.basename(
|
|
2240
2240
|
this._scriptPath,
|
|
2241
|
-
|
|
2241
|
+
path3.extname(this._scriptPath)
|
|
2242
2242
|
);
|
|
2243
2243
|
if (legacyName !== this._name) {
|
|
2244
2244
|
localFile = findFile(
|
|
@@ -2249,7 +2249,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2249
2249
|
}
|
|
2250
2250
|
executableFile = localFile || executableFile;
|
|
2251
2251
|
}
|
|
2252
|
-
launchWithNode = sourceExt.includes(
|
|
2252
|
+
launchWithNode = sourceExt.includes(path3.extname(executableFile));
|
|
2253
2253
|
let proc;
|
|
2254
2254
|
if (process2.platform !== "win32") {
|
|
2255
2255
|
if (launchWithNode) {
|
|
@@ -3164,7 +3164,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3164
3164
|
* @return {Command}
|
|
3165
3165
|
*/
|
|
3166
3166
|
nameFromFilename(filename) {
|
|
3167
|
-
this._name =
|
|
3167
|
+
this._name = path3.basename(filename, path3.extname(filename));
|
|
3168
3168
|
return this;
|
|
3169
3169
|
}
|
|
3170
3170
|
/**
|
|
@@ -3178,9 +3178,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3178
3178
|
* @param {string} [path]
|
|
3179
3179
|
* @return {(string|null|Command)}
|
|
3180
3180
|
*/
|
|
3181
|
-
executableDir(
|
|
3182
|
-
if (
|
|
3183
|
-
this._executableDir =
|
|
3181
|
+
executableDir(path4) {
|
|
3182
|
+
if (path4 === void 0) return this._executableDir;
|
|
3183
|
+
this._executableDir = path4;
|
|
3184
3184
|
return this;
|
|
3185
3185
|
}
|
|
3186
3186
|
/**
|
|
@@ -3647,18 +3647,6 @@ function requireAuth(feature) {
|
|
|
3647
3647
|
}
|
|
3648
3648
|
return license;
|
|
3649
3649
|
}
|
|
3650
|
-
function getLicenseInfo() {
|
|
3651
|
-
const license = loadLicense();
|
|
3652
|
-
if (!license) {
|
|
3653
|
-
return { hasLicense: false };
|
|
3654
|
-
}
|
|
3655
|
-
return {
|
|
3656
|
-
hasLicense: true,
|
|
3657
|
-
tier: license.tier,
|
|
3658
|
-
email: license.email,
|
|
3659
|
-
features: license.features
|
|
3660
|
-
};
|
|
3661
|
-
}
|
|
3662
3650
|
|
|
3663
3651
|
// src/commands/login.ts
|
|
3664
3652
|
var API_BASE = process.env.REALITYDB_API_URL || "https://api.realitydb.dev";
|
|
@@ -3911,7 +3899,7 @@ function clearAllData() {
|
|
|
3911
3899
|
clearToken();
|
|
3912
3900
|
clearCache();
|
|
3913
3901
|
}
|
|
3914
|
-
function
|
|
3902
|
+
function getLicenseInfo() {
|
|
3915
3903
|
const license = loadLicense();
|
|
3916
3904
|
if (!license) return null;
|
|
3917
3905
|
return {
|
|
@@ -3946,7 +3934,7 @@ async function confirmClearAll(force) {
|
|
|
3946
3934
|
});
|
|
3947
3935
|
}
|
|
3948
3936
|
async function logoutCommand(options = {}) {
|
|
3949
|
-
const licenseInfo =
|
|
3937
|
+
const licenseInfo = getLicenseInfo();
|
|
3950
3938
|
if (!licenseInfo && !options.clearAll) {
|
|
3951
3939
|
console.log(`
|
|
3952
3940
|
\u2554\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\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
@@ -4018,78 +4006,23 @@ async function logoutCommand(options = {}) {
|
|
|
4018
4006
|
}
|
|
4019
4007
|
|
|
4020
4008
|
// src/commands/status.ts
|
|
4021
|
-
|
|
4022
|
-
var path3 = __toESM(require("path"));
|
|
4023
|
-
var os3 = __toESM(require("os"));
|
|
4024
|
-
var CONFIG_DIR3 = path3.join(os3.homedir(), ".realitydb");
|
|
4025
|
-
var LICENSE_FILE2 = path3.join(CONFIG_DIR3, "license.json");
|
|
4026
|
-
var TOKEN_FILE2 = path3.join(CONFIG_DIR3, "token.json");
|
|
4027
|
-
function formatDate(dateString) {
|
|
4028
|
-
if (!dateString) return "Never";
|
|
4029
|
-
const date = new Date(dateString);
|
|
4030
|
-
return date.toLocaleDateString("en-US", {
|
|
4031
|
-
year: "numeric",
|
|
4032
|
-
month: "long",
|
|
4033
|
-
day: "numeric"
|
|
4034
|
-
});
|
|
4035
|
-
}
|
|
4036
|
-
function formatExpiryWarning(expiresAt) {
|
|
4037
|
-
if (!expiresAt) return "";
|
|
4038
|
-
const expiry = new Date(expiresAt);
|
|
4039
|
-
const now = /* @__PURE__ */ new Date();
|
|
4040
|
-
const daysLeft = Math.ceil((expiry.getTime() - now.getTime()) / (1e3 * 60 * 60 * 24));
|
|
4041
|
-
if (daysLeft < 0) {
|
|
4042
|
-
return "\u26A0\uFE0F EXPIRED";
|
|
4043
|
-
} else if (daysLeft < 7) {
|
|
4044
|
-
return `\u26A0\uFE0F Expires in ${daysLeft} days`;
|
|
4045
|
-
} else if (daysLeft < 30) {
|
|
4046
|
-
return `\u{1F4C5} Expires in ${daysLeft} days`;
|
|
4047
|
-
}
|
|
4048
|
-
return `\u2705 Valid`;
|
|
4049
|
-
}
|
|
4050
|
-
function getFeatureStatus(featureName, tier) {
|
|
4051
|
-
const gate = FEATURE_GATES[featureName];
|
|
4052
|
-
if (!gate) return "\u2753 Unknown";
|
|
4053
|
-
const requiredTiers = gate.requiredTiers;
|
|
4054
|
-
const hasAccess = requiredTiers.includes(tier) || tier === "enterprise";
|
|
4055
|
-
if (hasAccess) {
|
|
4056
|
-
return "\u2705 Available";
|
|
4057
|
-
} else {
|
|
4058
|
-
return `\u274C Requires ${requiredTiers.join(" or ")}`;
|
|
4059
|
-
}
|
|
4060
|
-
}
|
|
4061
|
-
function getFileSize(filePath) {
|
|
4062
|
-
try {
|
|
4063
|
-
const stats = fs3.statSync(filePath);
|
|
4064
|
-
const bytes = stats.size;
|
|
4065
|
-
if (bytes < 1024) return `${bytes} B`;
|
|
4066
|
-
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
4067
|
-
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
4068
|
-
} catch {
|
|
4069
|
-
return "Not found";
|
|
4070
|
-
}
|
|
4071
|
-
}
|
|
4072
|
-
async function statusCommand(options = {}) {
|
|
4009
|
+
async function statusCommand(options) {
|
|
4073
4010
|
const license = loadLicense();
|
|
4074
|
-
const hasLicense = !!license;
|
|
4075
4011
|
if (options.json) {
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
size: getFileSize(TOKEN_FILE2)
|
|
4088
|
-
}
|
|
4089
|
-
}, null, 2));
|
|
4012
|
+
if (!license) {
|
|
4013
|
+
console.log(JSON.stringify({ authenticated: false, tier: "free" }));
|
|
4014
|
+
} else {
|
|
4015
|
+
console.log(JSON.stringify({
|
|
4016
|
+
authenticated: true,
|
|
4017
|
+
email: license.email,
|
|
4018
|
+
tier: license.tier,
|
|
4019
|
+
expires_at: license.expires_at,
|
|
4020
|
+
features: license.features
|
|
4021
|
+
}));
|
|
4022
|
+
}
|
|
4090
4023
|
return;
|
|
4091
4024
|
}
|
|
4092
|
-
if (!
|
|
4025
|
+
if (!license) {
|
|
4093
4026
|
console.log(`
|
|
4094
4027
|
\u2554\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\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
4095
4028
|
\u2551 \u{1F510} Not Logged In \u2551
|
|
@@ -4100,7 +4033,7 @@ async function statusCommand(options = {}) {
|
|
|
4100
4033
|
\u2551 Sign up: https://realitydb.dev/pricing \u2551
|
|
4101
4034
|
\u2551 \u2551
|
|
4102
4035
|
\u2551 Features available without login: \u2551
|
|
4103
|
-
\u2551 \u2022 Basic data generation (up to
|
|
4036
|
+
\u2551 \u2022 Basic data generation (up to 3 tables, 50K rows) \u2551
|
|
4104
4037
|
\u2551 \u2022 Help and documentation \u2551
|
|
4105
4038
|
\u2551 \u2551
|
|
4106
4039
|
\u2551 Features requiring login: \u2551
|
|
@@ -4113,94 +4046,29 @@ async function statusCommand(options = {}) {
|
|
|
4113
4046
|
`);
|
|
4114
4047
|
return;
|
|
4115
4048
|
}
|
|
4116
|
-
const expiryStatus = formatExpiryWarning(license.expires_at);
|
|
4117
4049
|
console.log(`
|
|
4118
4050
|
\u2554\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\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
4119
4051
|
\u2551 \u2705 Authenticated \u2551
|
|
4120
4052
|
\u2551 \u2551
|
|
4121
|
-
\u2551 Account
|
|
4122
|
-
\u2551
|
|
4123
|
-
\u2551
|
|
4124
|
-
\u2551 Plan: ${license.tier.toUpperCase()}${license.tier.length > 32 ? "" : " ".repeat(32 - license.tier.length)}\u2551
|
|
4125
|
-
\u2551 Status: ${expiryStatus}${expiryStatus.length > 33 ? "" : " ".repeat(33 - expiryStatus.length)}\u2551
|
|
4126
|
-
\u255A\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\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
4127
|
-
`);
|
|
4128
|
-
console.log(`
|
|
4129
|
-
\u2554\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\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
4130
|
-
\u2551 \u{1F4CB} License Details \u2551
|
|
4131
|
-
\u2551 \u2551
|
|
4132
|
-
\u2551 License ID: ${license.id.substring(0, 16)}...${license.id.substring(license.id.length - 8)}${" ".repeat(35 - 24)}\u2551
|
|
4133
|
-
\u2551 Issued: ${formatDate(license.issued_at)}${formatDate(license.issued_at).length > 32 ? "" : " ".repeat(32 - formatDate(license.issued_at).length)}\u2551
|
|
4134
|
-
\u2551 Expires: ${formatDate(license.expires_at)}${formatDate(license.expires_at).length > 32 ? "" : " ".repeat(32 - formatDate(license.expires_at).length)}\u2551
|
|
4135
|
-
\u255A\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\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
4136
|
-
`);
|
|
4137
|
-
if (license.organization_name) {
|
|
4138
|
-
console.log(`
|
|
4139
|
-
\u2554\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\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
4140
|
-
\u2551 \u{1F3E2} Organization \u2551
|
|
4141
|
-
\u2551 \u2551
|
|
4142
|
-
\u2551 Name: ${license.organization_name}${license.organization_name.length > 34 ? "" : " ".repeat(34 - license.organization_name.length)}\u2551
|
|
4143
|
-
\u2551 ID: ${license.organization_id}${license.organization_id.length > 34 ? "" : " ".repeat(34 - license.organization_id.length)}\u2551
|
|
4144
|
-
\u2551 Seat Limit:${license.seat_limit ? ` ${license.seat_limit} users` : " Unlimited"}${(license.seat_limit ? `${license.seat_limit} users` : "Unlimited").length > 33 ? "" : " ".repeat(33 - (license.seat_limit ? `${license.seat_limit} users` : "Unlimited").length)}\u2551
|
|
4145
|
-
\u255A\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\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
4146
|
-
`);
|
|
4147
|
-
}
|
|
4148
|
-
console.log(`
|
|
4149
|
-
\u2554\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\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
4150
|
-
\u2551 \u2728 Feature Access \u2551
|
|
4151
|
-
\u2551 \u2551
|
|
4152
|
-
\u2551 Feature Status \u2551
|
|
4153
|
-
\u2551 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2551
|
|
4154
|
-
`);
|
|
4155
|
-
const features = [
|
|
4156
|
-
{ name: "16+ Tables", key: "sixteen_tables" },
|
|
4157
|
-
{ name: "Unlimited Rows", key: "unlimited_rows" },
|
|
4158
|
-
{ name: "Data Generation", key: "run" },
|
|
4159
|
-
{ name: "Bug Capture", key: "capture" },
|
|
4160
|
-
{ name: "PII Masking", key: "mask" },
|
|
4161
|
-
{ name: "Audit Logging", key: "audit" }
|
|
4162
|
-
];
|
|
4163
|
-
for (const feature of features) {
|
|
4164
|
-
const status = getFeatureStatus(feature.key, license.tier);
|
|
4165
|
-
const paddedName = feature.name.padEnd(28, " ");
|
|
4166
|
-
console.log(`\u2551 ${paddedName} ${status.padEnd(27, " ")}\u2551`);
|
|
4167
|
-
}
|
|
4168
|
-
console.log(`
|
|
4169
|
-
\u255A\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\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
4170
|
-
`);
|
|
4171
|
-
if (options.verbose) {
|
|
4172
|
-
const licenseExists = fs3.existsSync(LICENSE_FILE2);
|
|
4173
|
-
const tokenExists = fs3.existsSync(TOKEN_FILE2);
|
|
4174
|
-
console.log(`
|
|
4175
|
-
\u2554\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\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
4176
|
-
\u2551 \u{1F4BE} Local Files \u2551
|
|
4177
|
-
\u2551 \u2551
|
|
4178
|
-
\u2551 Config Directory: ${CONFIG_DIR3}${CONFIG_DIR3.length > 40 ? "" : " ".repeat(40 - CONFIG_DIR3.length)}\u2551
|
|
4179
|
-
\u2551 License File: ${licenseExists ? "\u2705 Present" : "\u274C Missing"}${licenseExists ? "Present" : "Missing".length > 41 ? "" : " ".repeat(41 - (licenseExists ? "Present" : "Missing").length)}\u2551
|
|
4180
|
-
\u2551 Token File: ${tokenExists ? "\u2705 Present" : "\u274C Missing"}${tokenExists ? "Present" : "Missing".length > 41 ? "" : " ".repeat(41 - (tokenExists ? "Present" : "Missing").length)}\u2551
|
|
4181
|
-
\u2551 License Size: ${getFileSize(LICENSE_FILE2)}${getFileSize(LICENSE_FILE2).length > 40 ? "" : " ".repeat(40 - getFileSize(LICENSE_FILE2).length)}\u2551
|
|
4182
|
-
\u2551 Token Size: ${getFileSize(TOKEN_FILE2)}${getFileSize(TOKEN_FILE2).length > 40 ? "" : " ".repeat(40 - getFileSize(TOKEN_FILE2).length)}\u2551
|
|
4183
|
-
\u255A\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\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
4184
|
-
`);
|
|
4185
|
-
}
|
|
4186
|
-
console.log(`
|
|
4187
|
-
\u2554\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\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
4188
|
-
\u2551 \u{1F4DA} Next Steps \u2551
|
|
4053
|
+
\u2551 Account: ${license.email}
|
|
4054
|
+
\u2551 Plan: ${license.tier.toUpperCase()}
|
|
4055
|
+
\u2551 Expires: ${license.expires_at || "Never"}
|
|
4189
4056
|
\u2551 \u2551
|
|
4190
|
-
\u2551
|
|
4191
|
-
\u2551 \u2022
|
|
4192
|
-
\u2551 \u2022
|
|
4193
|
-
\u2551 \u2022
|
|
4194
|
-
\u2551 \u2022
|
|
4057
|
+
\u2551 Features: \u2551
|
|
4058
|
+
\u2551 \u2022 16+ tables: ${license.tier !== "free" ? "\u2705" : "\u274C"} \u2551
|
|
4059
|
+
\u2551 \u2022 Unlimited rows: ${license.tier !== "free" ? "\u2705" : "\u274C"} \u2551
|
|
4060
|
+
\u2551 \u2022 PII masking: ${license.tier === "team" || license.tier === "enterprise" ? "\u2705" : "\u274C"} \u2551
|
|
4061
|
+
\u2551 \u2022 Bug capture: ${license.tier === "team" || license.tier === "enterprise" ? "\u2705" : "\u274C"} \u2551
|
|
4062
|
+
\u2551 \u2022 Audit logging: ${license.tier === "team" || license.tier === "enterprise" ? "\u2705" : "\u274C"} \u2551
|
|
4195
4063
|
\u2551 \u2551
|
|
4196
|
-
\u2551
|
|
4064
|
+
\u2551 Run 'realitydb logout' to clear credentials \u2551
|
|
4197
4065
|
\u255A\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\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
4198
4066
|
`);
|
|
4199
4067
|
}
|
|
4200
4068
|
|
|
4201
4069
|
// src/index.ts
|
|
4202
4070
|
var program2 = new Command();
|
|
4203
|
-
program2.name("realitydb").version("2.0.
|
|
4071
|
+
program2.name("realitydb").version("2.0.3").description("Developer Reality Platform - realistic database environments from your schema");
|
|
4204
4072
|
program2.command("login").description("Authenticate with RealityDB").action(loginCommand);
|
|
4205
4073
|
program2.command("logout").description("Clear authentication and remove local license").option("-f, --force", "Skip confirmation prompt").option("--clear-all", "Remove all local data including cache").action(logoutCommand);
|
|
4206
4074
|
program2.command("status").description("Show license status and plan details").option("--json", "Output in JSON format").option("-v, --verbose", "Show detailed information including local files").action(statusCommand);
|