create-db 1.0.4-pr48-DC-4894-posthog-fix-17272348089.0 → 1.0.4-pr48-DC-4894-posthog-fix-17272603770.0

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.
Files changed (2) hide show
  1. package/index.js +6 -8
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -11,17 +11,15 @@ import chalk from "chalk";
11
11
  import terminalLink from "terminal-link";
12
12
 
13
13
  const CREATE_DB_WORKER_URL =
14
- process.env.CREATE_DB_WORKER_URL || "https://create-db-temp.prisma.io";
14
+ process.env.CREATE_DB_WORKER_URL.replace(/\/+$/, "") ||
15
+ "https://create-db-temp.prisma.io";
15
16
  const CLAIM_DB_WORKER_URL =
16
- process.env.CLAIM_DB_WORKER_URL || "https://create-db.prisma.io";
17
+ process.env.CLAIM_DB_WORKER_URL.replace(/\/+$/, "") ||
18
+ "https://create-db.prisma.io";
17
19
 
18
- async function sendAnalyticsToWorker(
19
- eventName,
20
- properties,
21
- { timeoutMs = 2000 }
22
- ) {
20
+ async function sendAnalyticsToWorker(eventName, properties) {
23
21
  const controller = new AbortController();
24
- const timer = setTimeout(() => controller.abort(), timeoutMs);
22
+ const timer = setTimeout(() => controller.abort(), 2000);
25
23
  try {
26
24
  await fetch(`${CREATE_DB_WORKER_URL}/analytics`, {
27
25
  method: "POST",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-db",
3
- "version": "1.0.4-pr48-DC-4894-posthog-fix-17272348089.0",
3
+ "version": "1.0.4-pr48-DC-4894-posthog-fix-17272603770.0",
4
4
  "description": "Instantly create a temporary Prisma Postgres database with one command, then claim and persist it in your Prisma Data Platform project when ready.",
5
5
  "main": "index.js",
6
6
  "author": "",