admindb 2.1.1 → 2.2.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 +41 -12
- package/dist/app.js +230 -1
- package/dist/auth/config.js +121 -1
- package/dist/auth/crypto.js +108 -1
- package/dist/auth/index.js +21 -1
- package/dist/auth/middleware.js +85 -1
- package/dist/auth/routes.js +70 -1
- package/dist/auth/types.js +7 -1
- package/dist/cli/args.js +320 -1
- package/dist/cli/config.js +128 -1
- package/dist/cli/index.js +20 -1
- package/dist/cli/runner.js +211 -1
- package/dist/cli.js +4 -1
- package/dist/data/chain.d.ts +1 -0
- package/dist/data/chain.js +707 -0
- package/dist/data/datasets.js +129 -1
- package/dist/data/detector.d.ts +1 -1
- package/dist/data/detector.js +511 -1
- package/dist/data/engine.d.ts +1 -1
- package/dist/data/engine.js +245 -1
- package/dist/data/index.d.ts +1 -1
- package/dist/data/index.js +22 -1
- package/dist/data/strategies.d.ts +1 -1
- package/dist/data/strategies.js +339 -1
- package/dist/data/types.d.ts +1 -1
- package/dist/data/types.js +5 -1
- package/dist/db/database.d.ts +1 -1
- package/dist/db/database.js +477 -1
- package/dist/db/export.d.ts +1 -1
- package/dist/db/export.js +90 -1
- package/dist/db/filters.js +142 -1
- package/dist/db/index.js +24 -1
- package/dist/db/introspection.js +167 -1
- package/dist/db/manager.js +351 -1
- package/dist/db/migrations.js +107 -1
- package/dist/db/postgres.d.ts +1 -1
- package/dist/db/postgres.js +735 -1
- package/dist/db/types.d.ts +1 -1
- package/dist/db/types.js +6 -1
- package/dist/index.js +52 -1
- package/dist/public/css/app.css +1 -1
- package/dist/public/js/api.js +1 -1
- package/dist/public/js/browse.js +1 -1
- package/dist/public/js/common.js +1 -0
- package/dist/public/js/databases.js +1 -1
- package/dist/public/js/designer.js +1 -1
- package/dist/public/js/forms.js +1 -1
- package/dist/public/js/home.js +1 -0
- package/dist/public/js/inspector.js +1 -1
- package/dist/public/js/query.js +1 -1
- package/dist/public/js/schema.js +1 -1
- package/dist/public/js/seed.js +1 -1
- package/dist/routes/api/erd.d.ts +1 -0
- package/dist/routes/api/erd.js +50 -0
- package/dist/routes/api/helpers.d.ts +1 -1
- package/dist/routes/api/helpers.js +163 -1
- package/dist/routes/api/import-export.js +83 -1
- package/dist/routes/api/index.js +48 -1
- package/dist/routes/api/query.js +78 -1
- package/dist/routes/api/rows.js +362 -1
- package/dist/routes/api/seed.js +153 -1
- package/dist/routes/api/tables.js +231 -1
- package/dist/routes/databases.js +228 -1
- package/dist/routes/index.js +19 -1
- package/dist/routes/pages.js +397 -1
- package/dist/serverless.js +174 -1
- package/dist/sql/classifier.js +24 -1
- package/dist/sql/error-analyzer.d.ts +1 -0
- package/dist/sql/error-analyzer.js +550 -0
- package/dist/sql/generator.js +319 -1
- package/dist/sql/index.js +18 -1
- package/dist/types/api.js +2 -1
- package/dist/utils/colors.js +54 -1
- package/dist/utils/common.d.ts +1 -1
- package/dist/utils/common.js +225 -1
- package/dist/utils/csv.js +67 -1
- package/dist/utils/datatype.js +181 -1
- package/dist/utils/icons.js +81 -1
- package/dist/utils/index.js +20 -1
- package/dist/utils/logger.js +36 -1
- package/dist/views/layouts/main.hbs +14 -1
- package/dist/views/pages/erd.hbs +1241 -0
- package/dist/views/pages/home.hbs +98 -2
- package/dist/views/pages/info.hbs +107 -0
- package/dist/views/pages/query.hbs +54 -12
- package/dist/views/pages/seed.hbs +435 -171
- package/dist/views/partials/sidebar.hbs +12 -0
- package/docs/API.md +6 -1
- package/docs/EXAMPLES.md +3 -0
- package/package.json +5 -4
- package/dist/public/js/icons.js +0 -1
package/dist/data/datasets.js
CHANGED
|
@@ -1 +1,129 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NAMED_COLORS = exports.HEX_COLORS = exports.STATUSES = exports.COUNTRY_CODES = exports.CURRENCIES = exports.US_STATES = exports.JOB_TITLES = exports.COMPANIES = exports.LOREM_WORDS = exports.DOMAINS = exports.COUNTRIES = exports.CITIES = exports.LAST_NAMES = exports.FIRST_NAMES = void 0;
|
|
4
|
+
exports.FIRST_NAMES = [
|
|
5
|
+
"Sombat", "Ting", "Rajan", "Minh", "Hiroshi", "William", "Made", "Ravi", "John", "Kiran",
|
|
6
|
+
"Raj", "Wayan", "Chaiwat", "Aarav", "Sita", "Zara", "Ratna", "Ananya", "Ha-eun", "Siti",
|
|
7
|
+
"Seo-yeon", "Mary", "Priyanka", "Xu", "Ali", "Priya", "Sakura", "Ken", "Ketut", "Soo-hyun",
|
|
8
|
+
"Wang", "Guido", "Deepa", "Fang", "James", "Mei", "Binh", "Takeshi", "Leela", "Thuy",
|
|
9
|
+
"Dewi", "Layla", "Vijay", "Samir", "Meera", "Jessica", "Linda", "Malee", "Qiang", "Yuna",
|
|
10
|
+
"Richard", "Margaret", "Ming", "Vikram", "Mai", "Rahul", "Van", "Jennifer", "Suresh", "Yui",
|
|
11
|
+
"Pan", "Barbara", "Tim", "Lu", "Liang", "Robert", "Fatima", "Imran", "Ajay", "Ren",
|
|
12
|
+
"Liu", "Dennis", "Lin", "Kavya", "Agus", "Katherine", "Anita", "Grace", "Linus", "Jun",
|
|
13
|
+
"Alan", "Tarun", "Omar", "Michael", "Dung", "Ahmad", "Hoa", "Hui", "Susan", "Shinji",
|
|
14
|
+
"Zhou", "Linh", "Ngoc", "Xin", "Hassan", "Nisha", "Patricia", "Li", "Lei", "Sunita",
|
|
15
|
+
"Chen", "Anh", "Jia", "Xiao", "Yang", "Ji-hoon", "Jing", "Hedy", "Elizabeth", "Zhang",
|
|
16
|
+
"Arjun", "Yuki", "Ada", "Edsger", "Nong", "Lynn", "Anjali", "Nguyen", "Sora", "Mieko",
|
|
17
|
+
"Nyoman", "Jin", "Aisha", "Bayu", "Tariq", "Daiki", "David", "Rani", "Tran", "Haruki",
|
|
18
|
+
"Dae-hyun", "Dao", "Rama", "Aiko", "Min-jun", "Zhu", "Radia", "Wei", "Sophia", "Lucas",
|
|
19
|
+
"Emma", "Liam", "Olivia", "Noah", "Elena", "Mateo", "Chloe", "Alexander", "Aria", "Leo"
|
|
20
|
+
];
|
|
21
|
+
exports.LAST_NAMES = [
|
|
22
|
+
"Chen", "Smith", "Thompson", "Shah", "Thai", "Perlman", "Brown", "Hsu", "Turing", "Sharma",
|
|
23
|
+
"Purnama", "Lopez", "Williams", "Davis", "Liao", "Xu", "Martin", "Dhawan", "Yoon", "Tan",
|
|
24
|
+
"Yamamoto", "Iyer", "Phung", "Gonzalez", "Huang", "Hu", "Vo", "Shetty", "Le", "Wijaya",
|
|
25
|
+
"Jackson", "Ly", "Anderson", "Pratama", "Lovelace", "Martinez", "Dang", "Ma", "Hopper", "Naidu",
|
|
26
|
+
"Goh", "Hamilton", "Duong", "Taylor", "Song", "Surya", "Singh", "Jiang", "Cho", "Zhang",
|
|
27
|
+
"Pham", "Teo", "van Rossum", "Patel", "Lam", "Jang", "Rodriguez", "Miller", "Torvalds", "Hidayat",
|
|
28
|
+
"Menon", "Thomas", "Hernandez", "Reddy", "Wong", "Tripathi", "Lim", "Kumar", "Bhaskar", "Rajan",
|
|
29
|
+
"Chang", "Ong", "Vu", "Nair", "Sun", "Do", "Bhatia", "Garcia", "Mishra", "Rao",
|
|
30
|
+
"Choi", "Phan", "Zhu", "Nguyen", "Kim", "Putra", "Malhotra", "Nakamura", "Kang", "Wilson",
|
|
31
|
+
"Huynh", "Tanaka", "Kusuma", "Jung", "Mehta", "Perez", "Arora", "Chu", "Moore", "Li",
|
|
32
|
+
"Yang", "Park", "Ko", "Watanabe", "Bui", "Liu", "Ninh", "Jones", "Johnson", "Guo",
|
|
33
|
+
"Ngo", "Ito", "Takahashi", "Grover", "Shen", "Yeh", "Lee", "Gupta", "Wang", "Wu",
|
|
34
|
+
"Verma", "Suzuki", "White", "Lu", "Pillai", "Lin", "Joshi", "Tran", "Chawla", "Zhou", "Desai"
|
|
35
|
+
];
|
|
36
|
+
exports.CITIES = [
|
|
37
|
+
"Hyderabad", "Yangon", "Medan", "Minneapolis", "Faisalabad", "Yokohama", "Nha Trang",
|
|
38
|
+
"Hong Kong", "Phoenix", "Delhi", "Chennai", "Denver", "Guangzhou", "Davao City",
|
|
39
|
+
"Chiang Mai", "Atlanta", "Manila", "Naypyidaw", "Sylhet", "Phuket", "Incheon",
|
|
40
|
+
"New York", "Daejeon", "Yogyakarta", "Colombo", "Kanpur", "Portland", "Vientiane",
|
|
41
|
+
"Dublin", "Mandalay", "Hat Yai", "Chengdu", "Lisbon", "Paris", "Bandung",
|
|
42
|
+
"Kathmandu", "Karachi", "Qingdao", "Da Nang", "Seoul", "Hanoi", "Berlin",
|
|
43
|
+
"Chicago", "Sydney", "Quezon City", "Mumbai", "Vizag", "Coimbatore", "Lahore",
|
|
44
|
+
"Dhaka", "Shenzhen", "Phnom Penh", "Navi Mumbai", "Fuzhou", "Kuala Lumpur", "Taipei",
|
|
45
|
+
"Zurich", "Bangkok", "Makati", "Chittagong", "Daegu", "Jaipur", "Oslo",
|
|
46
|
+
"Islamabad", "Dalian", "Kolkata", "Penang", "Johor Bahru", "Singapore", "Ulsan",
|
|
47
|
+
"Macau", "Pune", "Pattaya", "Siem Reap", "Cebu City", "Lucknow", "Rome",
|
|
48
|
+
"Surabaya", "Stockholm", "Los Angeles", "Osaka", "Sapporo", "Fukuoka", "Rajshahi",
|
|
49
|
+
"Tokyo", "Vancouver", "San Francisco", "Nagoya", "Busan", "Jakarta", "Guangxi",
|
|
50
|
+
"London", "Kaohsiung", "Xiamen", "Male", "Nashville", "Warsaw", "Madrid",
|
|
51
|
+
"Indore", "Boston", "Amsterdam", "Shanghai", "Taichung", "Raleigh", "Miami",
|
|
52
|
+
"Jeju", "Cheongju", "Bangalore", "Ahmedabad", "Haiphong", "Ho Chi Minh City", "Gwangju",
|
|
53
|
+
"Rawalpindi", "Toronto", "Seville", "Kyoto", "Austin", "Suwon", "Seattle",
|
|
54
|
+
"Beijing", "Nakhon Ratchasima", "Nagpur"
|
|
55
|
+
];
|
|
56
|
+
exports.COUNTRIES = [
|
|
57
|
+
"Japan", "United States", "Bhutan", "Belgium", "Myanmar", "Kazakhstan", "Mexico",
|
|
58
|
+
"Bangladesh", "United Kingdom", "South Africa", "Indonesia", "Vietnam", "South Korea", "Germany",
|
|
59
|
+
"Romania", "Italy", "Spain", "China", "India", "Taiwan", "Philippines",
|
|
60
|
+
"Singapore", "Canada", "Pakistan", "Hungary", "Maldives", "Switzerland", "Macau",
|
|
61
|
+
"Portugal", "Sri Lanka", "Malaysia", "Netherlands", "Turkmenistan", "Brunei", "Brazil",
|
|
62
|
+
"Greece", "Uzbekistan", "Cambodia", "France", "Australia", "Mongolia", "Poland",
|
|
63
|
+
"Kyrgyzstan", "Tajikistan", "Norway", "Sweden", "Ireland", "Austria", "Denmark",
|
|
64
|
+
"Laos", "Nepal", "Thailand", "Finland", "Hong Kong", "Czech Republic", "Timor-Leste", "New Zealand"
|
|
65
|
+
];
|
|
66
|
+
exports.DOMAINS = [
|
|
67
|
+
"outlook.com", "nus.edu.sg", "ust.hk", "iitb.ac.in", "acme.io", "ac.sg", "mail.ru", "163.com",
|
|
68
|
+
"outlook.kr", "tech.asia", "startup.io", "proton.me", "sohu.com", "gmail.com", "kyoto-u.ac.jp",
|
|
69
|
+
"example.com", "naver.com", "protonmail.com", "hanmail.net", "globex.org", "tudelft.nl", "company.com",
|
|
70
|
+
"yahoo.com", "126.com", "daum.net", "initech.net", "hkbu.edu.hk", "yahoo.co.jp", "qq.com", "nthu.edu.tw",
|
|
71
|
+
"sina.com", "innovate.sg", "zoho.com"
|
|
72
|
+
];
|
|
73
|
+
exports.LOREM_WORDS = [
|
|
74
|
+
"schema", "nu", "worker", "alpha", "cache", "edge", "async", "chi", "service", "packet",
|
|
75
|
+
"scale", "upsilon", "scrum", "node", "peace", "deploy", "epsilon", "lambda", "record", "pi",
|
|
76
|
+
"column", "module", "omicron", "query", "buffer", "persistence", "comet", "joy", "integrity", "galaxy",
|
|
77
|
+
"token", "spirit", "socket", "devops", "harmony", "backup", "agile", "render", "await", "field",
|
|
78
|
+
"aurora", "nature", "gamma", "cloud", "omega", "mu", "orbit", "delta", "kindness", "tau",
|
|
79
|
+
"row", "compassion", "theta", "beta", "balance", "wisdom", "rho", "kanban", "kappa", "session",
|
|
80
|
+
"compile", "phi", "stream", "queue", "event", "pixel", "resilience", "nebula", "iota", "index",
|
|
81
|
+
"cluster", "xi", "eta", "signal", "zeta", "fetch", "sigma", "psi", "prism", "nexus"
|
|
82
|
+
];
|
|
83
|
+
exports.COMPANIES = [
|
|
84
|
+
"Apex Solutions", "Vortex Digital", "Nexus Systems", "Horizon Labs", "Zenith Global",
|
|
85
|
+
"Quantum Dynamics", "Starlight Media", "Alpha Robotics", "Pinnacle Financial", "BlueWave Tech",
|
|
86
|
+
"Elevate Innovations", "Pulse Health", "Echo Stream", "Stratum Capital", "Beacon Analytics",
|
|
87
|
+
"Solaris Energy", "Vertex Cloud", "Catalyst Corp", "Synergy Ventures", "Omega Group",
|
|
88
|
+
"Hyperion Logic", "Aegis Security", "Terra Industries", "Prism Data", "Spectra Works",
|
|
89
|
+
"Novus Labs", "Orbit Software", "Forge Interactive", "Crestline Global", "Ironclad Partners",
|
|
90
|
+
"Acme Corp", "Globex Corporation", "Initech LLC", "Soylent Industries", "Umbrella Tech"
|
|
91
|
+
];
|
|
92
|
+
exports.JOB_TITLES = [
|
|
93
|
+
"Software Engineer", "Product Manager", "UX/UI Designer", "DevOps Specialist",
|
|
94
|
+
"Data Scientist", "Engineering Manager", "Account Executive", "Marketing Director",
|
|
95
|
+
"Content Strategist", "Customer Success Lead", "Financial Analyst", "Operations Lead",
|
|
96
|
+
"HR Generalist", "QA Automation Engineer", "Solutions Architect", "Security Specialist",
|
|
97
|
+
"Chief Technology Officer", "VP of Product", "Database Administrator", "Scrum Master",
|
|
98
|
+
"Technical Writer", "Brand Manager", "Legal Counsel", "Research Scientist", "Sales Director"
|
|
99
|
+
];
|
|
100
|
+
exports.US_STATES = [
|
|
101
|
+
"California", "New York", "Texas", "Florida", "Washington", "Illinois", "Pennsylvania",
|
|
102
|
+
"Ohio", "Georgia", "North Carolina", "Michigan", "New Jersey", "Virginia", "Colorado",
|
|
103
|
+
"Arizona", "Massachusetts", "Tennessee", "Indiana", "Missouri", "Maryland", "Wisconsin",
|
|
104
|
+
"Minnesota", "Oregon", "South Carolina", "Alabama", "Louisiana", "Kentucky", "Utah"
|
|
105
|
+
];
|
|
106
|
+
exports.CURRENCIES = [
|
|
107
|
+
"USD", "EUR", "GBP", "JPY", "CAD", "AUD", "CHF", "CNY", "INR", "SGD",
|
|
108
|
+
"NZD", "BRL", "SEK", "KRW", "MXN", "ZAR", "HKD", "NOK", "AED", "SAR"
|
|
109
|
+
];
|
|
110
|
+
exports.COUNTRY_CODES = [
|
|
111
|
+
"US", "GB", "CA", "DE", "FR", "JP", "AU", "IN", "BR", "SG",
|
|
112
|
+
"NL", "IT", "ES", "SE", "CH", "KR", "MX", "NZ", "ZA", "AE",
|
|
113
|
+
"SA", "NO", "DK", "FI", "IE", "PL", "PT", "BE", "AT", "ID"
|
|
114
|
+
];
|
|
115
|
+
exports.STATUSES = [
|
|
116
|
+
"active", "inactive", "pending", "completed", "cancelled",
|
|
117
|
+
"archived", "suspended", "draft", "processing", "approved", "rejected"
|
|
118
|
+
];
|
|
119
|
+
exports.HEX_COLORS = [
|
|
120
|
+
"#3b82f6", "#10b981", "#ef4444", "#f59e0b", "#8b5cf6",
|
|
121
|
+
"#ec4899", "#06b6d4", "#6366f1", "#14b8a6", "#f97316",
|
|
122
|
+
"#84cc16", "#a855f7", "#0ea5e9", "#64748b", "#d946ef",
|
|
123
|
+
"#1e293b", "#047857", "#b91c1c", "#1d4ed8", "#4338ca"
|
|
124
|
+
];
|
|
125
|
+
exports.NAMED_COLORS = [
|
|
126
|
+
"Emerald", "Indigo", "Amber", "Rose", "Cyan", "Violet",
|
|
127
|
+
"Sky", "Slate", "Teal", "Fuchsia", "Crimson", "Navy",
|
|
128
|
+
"Coral", "Bronze", "Charcoal", "Mint", "Lavender", "Ruby", "Cobalt"
|
|
129
|
+
];
|
package/dist/data/detector.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import type {ColumnInfo,ForeignKeyInfo,TableInfoData} from '../db/index';import{type ColumnGeneratorConfig,type ColumnPlan} from './types';export interface OrderingConstraint{after?:{column:string;orEqual:boolean;};before?:{column:string;orEqual:boolean;};}export interface NumericConstraint{min?:number;max?:number;}export interface CheckInfo{columnAllowed:Map<string,string[]>;columnRange:Map<string,NumericConstraint>;jsonAllowed:Map<string,Map<string,string[]>>;ordering:Map<string,OrderingConstraint>;}export declare const normName:(s:string)=>string;export declare function isTimestampName(name:string):boolean;export declare function findInMap<T>(map:Map<string,T>,colName:string):T|undefined;export declare function extractCheckExprs(sql:string):string[];export declare function parseChecks(sql:string|null):CheckInfo;export declare function detectPlan(col:ColumnInfo,fk:ForeignKeyInfo|null):ColumnPlan;export declare function buildColumnConfigs(info:TableInfoData):ColumnGeneratorConfig[];export declare function sanitizeColumnPlan(raw:unknown):ColumnPlan|null;
|
|
1
|
+
import type {ColumnInfo,ForeignKeyInfo,TableInfoData} from '../db/index';import{type ColumnGeneratorConfig,type ColumnPlan} from './types';export interface OrderingConstraint{after?:{column:string;orEqual:boolean;};before?:{column:string;orEqual:boolean;};}export interface NumericConstraint{min?:number;max?:number;}export interface LengthConstraint{min?:number;max?:number;exact?:number;}export interface CheckInfo{columnAllowed:Map<string,string[]>;columnRange:Map<string,NumericConstraint>;columnLength:Map<string,LengthConstraint>;jsonAllowed:Map<string,Map<string,string[]>>;ordering:Map<string,OrderingConstraint>;}export declare const normName:(s:string)=>string;export declare function isTimestampName(name:string):boolean;export declare function findInMap<T>(map:Map<string,T>,colName:string):T|undefined;export declare function extractCheckExprs(sql:string):string[];export declare function parseChecks(sql:string|null):CheckInfo;export declare function detectPlan(col:ColumnInfo,fk:ForeignKeyInfo|null):ColumnPlan;export declare function buildColumnConfigs(info:TableInfoData):ColumnGeneratorConfig[];export declare function sanitizeColumnPlan(raw:unknown):ColumnPlan|null;
|