quick-erd
Advanced tools
| export declare let port: number; | ||
| export declare const public_dir: string; | ||
| export declare let erd_file: string; | ||
| export declare let open_web_ui: boolean | null; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.erd_file = exports.public_dir = exports.port = void 0; | ||
| exports.open_web_ui = exports.erd_file = exports.public_dir = exports.port = void 0; | ||
| const fs_1 = require("fs"); | ||
@@ -53,5 +53,23 @@ const path_1 = require("path"); | ||
| console.error('Missing erd.txt file'); | ||
| console.error('Please specify it in the argument.'); | ||
| console.error('Specify it in the argument - it will auto-create an empty file.'); | ||
| process.exit(1); | ||
| } | ||
| } | ||
| exports.open_web_ui = null; | ||
| { | ||
| for (let i = 2; i < process.argv.length; i++) { | ||
| const arg = process.argv[i]; | ||
| if (arg === '--open') { | ||
| exports.open_web_ui = true; | ||
| break; | ||
| } | ||
| if (arg === '--no-open') { | ||
| exports.open_web_ui = false; | ||
| break; | ||
| } | ||
| } | ||
| if (exports.open_web_ui == null) { | ||
| console.info('hint: You can specify --open to open the web ui automatically.'); | ||
| console.info('hint: You can specify --no-open to turn off this message.'); | ||
| } | ||
| } |
+39
-1
| "use strict"; | ||
| var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
| if (k2 === undefined) k2 = k; | ||
| var desc = Object.getOwnPropertyDescriptor(m, k); | ||
| if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
| desc = { enumerable: true, get: function() { return m[k]; } }; | ||
| } | ||
| Object.defineProperty(o, k2, desc); | ||
| }) : (function(o, m, k, k2) { | ||
| if (k2 === undefined) k2 = k; | ||
| o[k2] = m[k]; | ||
| })); | ||
| var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
| Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
| }) : function(o, v) { | ||
| o["default"] = v; | ||
| }); | ||
| var __importStar = (this && this.__importStar) || (function () { | ||
| var ownKeys = function(o) { | ||
| ownKeys = Object.getOwnPropertyNames || function (o) { | ||
| var ar = []; | ||
| for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; | ||
| return ar; | ||
| }; | ||
| return ownKeys(o); | ||
| }; | ||
| return function (mod) { | ||
| if (mod && mod.__esModule) return mod; | ||
| var result = {}; | ||
| if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); | ||
| __setModuleDefault(result, mod); | ||
| return result; | ||
| }; | ||
| })(); | ||
| var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -8,2 +41,4 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
| const config_1 = require("./config"); | ||
| const config = __importStar(require("./config")); | ||
| const open_1 = __importDefault(require("open")); | ||
| const listening_on_1 = require("listening-on"); | ||
@@ -46,5 +81,8 @@ const path_1 = require("path"); | ||
| } | ||
| app.use(express_1.default.static(config_1.public_dir)); | ||
| app.use(express_1.default.static(config.public_dir)); | ||
| app.listen(config_1.port, () => { | ||
| (0, listening_on_1.print)(config_1.port); | ||
| if (config.open_web_ui) { | ||
| (0, open_1.default)(`http://localhost:${config_1.port}`); | ||
| } | ||
| }); |
+3
-2
| { | ||
| "name": "quick-erd", | ||
| "version": "4.28.1", | ||
| "version": "4.29.0", | ||
| "type": "commonjs", | ||
@@ -73,3 +73,4 @@ "sideEffects": false, | ||
| "dependencies": { | ||
| "fastest-levenshtein": "^1.0.16" | ||
| "fastest-levenshtein": "^1.0.16", | ||
| "open": "^10.2.0" | ||
| }, | ||
@@ -76,0 +77,0 @@ "optionalDependencies": { |
+5
-3
@@ -20,5 +20,7 @@ # quick-erd | ||
| npm i -D quick-erd | ||
| npx erd-ui | ||
| npx erd-ui --open | ||
| ``` | ||
| The `--open` flag is optional, it will automatically open the web UI in default browser. | ||
| ### npx cli | ||
@@ -174,4 +176,4 @@ | ||
| - `npx erd-ui` | ||
| - `npx erd-ui -p 8520 erd.txt` | ||
| - `npx erd-ui --open` | ||
| - `npx erd-ui -p 8520 erd.txt --no-open` | ||
@@ -178,0 +180,0 @@ #### Import from Existing Schema |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
282962
0.83%7745
0.74%324
0.62%15
7.14%+ Added