@pgplex/pgconsole 0.2.0 → 0.2.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,n as u,o as d,p as f,r as p,s as m,t as h,u as g}from"./index-
|
|
1
|
+
import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,n as u,o as d,p as f,r as p,s as m,t as h,u as g}from"./index-D5ueFIXJ.js";export{o as ensureModuleLoaded};
|
package/dist/client/index.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
10
10
|
<link href="https://fonts.googleapis.com/css2?family=Geist+Mono:wght@100..900&display=swap" rel="stylesheet" />
|
|
11
11
|
<title>pgconsole</title>
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-D5ueFIXJ.js"></script>
|
|
13
13
|
<link rel="stylesheet" crossorigin href="/assets/index-DUHQjBL7.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
package/dist/server.mjs
CHANGED
|
@@ -41057,12 +41057,11 @@ function isValidHexColor(color) {
|
|
|
41057
41057
|
}
|
|
41058
41058
|
async function loadConfig(configPath) {
|
|
41059
41059
|
demoMode = false;
|
|
41060
|
-
|
|
41061
|
-
|
|
41062
|
-
throw new Error(`Config file not found: ${path5}
|
|
41060
|
+
if (!existsSync(configPath)) {
|
|
41061
|
+
throw new Error(`Config file not found: ${configPath}
|
|
41063
41062
|
See https://docs.pgconsole.com/configuration/config`);
|
|
41064
41063
|
}
|
|
41065
|
-
const content = readFileSync(
|
|
41064
|
+
const content = readFileSync(configPath, "utf-8");
|
|
41066
41065
|
const parsed = parse2(content);
|
|
41067
41066
|
let external_url = void 0;
|
|
41068
41067
|
let license = void 0;
|
|
@@ -41916,7 +41915,7 @@ var COOKIE_NAME2 = "pgconsole_token";
|
|
|
41916
41915
|
var OAUTH_STATE_COOKIE = "pgconsole_oauth_state";
|
|
41917
41916
|
var COOKIE_OPTIONS = {
|
|
41918
41917
|
httpOnly: true,
|
|
41919
|
-
secure:
|
|
41918
|
+
secure: true,
|
|
41920
41919
|
sameSite: "lax",
|
|
41921
41920
|
maxAge: 7 * 24 * 60 * 60 * 1e3,
|
|
41922
41921
|
// 7 days
|
|
@@ -41924,7 +41923,7 @@ var COOKIE_OPTIONS = {
|
|
|
41924
41923
|
};
|
|
41925
41924
|
var STATE_COOKIE_OPTIONS = {
|
|
41926
41925
|
httpOnly: true,
|
|
41927
|
-
secure:
|
|
41926
|
+
secure: true,
|
|
41928
41927
|
sameSite: "lax",
|
|
41929
41928
|
maxAge: 10 * 60 * 1e3,
|
|
41930
41929
|
// 10 minutes
|
|
@@ -47422,9 +47421,9 @@ var stripe_esm_node_default = Stripe;
|
|
|
47422
47421
|
// server/lib/stripe.ts
|
|
47423
47422
|
var STRIPE_CONFIG = {
|
|
47424
47423
|
production: {
|
|
47425
|
-
secretKey: "
|
|
47426
|
-
priceIdMonthly: "",
|
|
47427
|
-
priceIdAnnual: ""
|
|
47424
|
+
secretKey: "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",
|
|
47425
|
+
priceIdMonthly: "price_1SxRoPAeLQYhEB73WDP94cQL",
|
|
47426
|
+
priceIdAnnual: "price_1SxRtGAeLQYhEB73eVoF9CWv"
|
|
47428
47427
|
},
|
|
47429
47428
|
development: {
|
|
47430
47429
|
secretKey: "sk_test_51SxNkLAiTf6mjLlIo5lVvoXxyxh0gJEOECcLgQUH4YeTKUaeogfQsUJwAi22JOGq98AnEvoWQuFvqODH93QPB7BW00UBfwibpW",
|
|
@@ -47433,7 +47432,7 @@ var STRIPE_CONFIG = {
|
|
|
47433
47432
|
}
|
|
47434
47433
|
};
|
|
47435
47434
|
function getStripeConfig() {
|
|
47436
|
-
return
|
|
47435
|
+
return true ? STRIPE_CONFIG.production : STRIPE_CONFIG.development;
|
|
47437
47436
|
}
|
|
47438
47437
|
function getStripeClient() {
|
|
47439
47438
|
const config = getStripeConfig();
|
|
@@ -92632,9 +92631,6 @@ var connectRouter = expressConnectMiddleware({
|
|
|
92632
92631
|
}
|
|
92633
92632
|
});
|
|
92634
92633
|
|
|
92635
|
-
// server/index.ts
|
|
92636
|
-
import { existsSync as existsSync2 } from "fs";
|
|
92637
|
-
|
|
92638
92634
|
// server/lib/demo.ts
|
|
92639
92635
|
import { PGlite } from "@electric-sql/pglite";
|
|
92640
92636
|
import { PGLiteSocketServer } from "@electric-sql/pglite-socket";
|
|
@@ -92913,16 +92909,15 @@ app.use((req, res, next) => {
|
|
|
92913
92909
|
async function start() {
|
|
92914
92910
|
const args = parseArgs();
|
|
92915
92911
|
const port = args.port || process.env.PORT || 9876;
|
|
92916
|
-
|
|
92917
|
-
|
|
92918
|
-
console.log("No pgconsole.toml found \u2014 starting in demo mode...");
|
|
92912
|
+
if (!args.config) {
|
|
92913
|
+
console.log("No --config specified \u2014 starting in demo mode...");
|
|
92919
92914
|
const demoPort = await startDemoDatabase();
|
|
92920
92915
|
loadDemoConfig(demoPort);
|
|
92921
92916
|
console.log(`\u2713 Demo database started on port ${demoPort}`);
|
|
92922
92917
|
} else {
|
|
92923
92918
|
try {
|
|
92924
|
-
await loadConfig(
|
|
92925
|
-
console.log(`\u2713 Loaded config from: ${path4.resolve(
|
|
92919
|
+
await loadConfig(args.config);
|
|
92920
|
+
console.log(`\u2713 Loaded config from: ${path4.resolve(args.config)}`);
|
|
92926
92921
|
} catch (error) {
|
|
92927
92922
|
console.error("Failed to load config:", error instanceof Error ? error.message : error);
|
|
92928
92923
|
process.exit(1);
|
|
@@ -92953,7 +92948,7 @@ async function start() {
|
|
|
92953
92948
|
\\ \\_\\ /\\____/
|
|
92954
92949
|
\\/_/ \\_/__/
|
|
92955
92950
|
|
|
92956
|
-
Version ${"0.2.
|
|
92951
|
+
Version ${"0.2.2"}
|
|
92957
92952
|
`);
|
|
92958
92953
|
console.log(`Server running on http://localhost:${port}`);
|
|
92959
92954
|
const browserUrl = false ? `http://localhost:5173` : getExternalUrl() || `http://localhost:${port}`;
|