which-url 0.0.5 → 0.0.7

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 CHANGED
@@ -148,6 +148,20 @@ Framework-prefixed env vars like `NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL` are
148
148
 
149
149
  ## Advanced
150
150
 
151
+ ### Portless
152
+
153
+ Zero config — [portless](https://portless.sh) sets `PORTLESS_URL` and `which-url` picks it up automatically.
154
+
155
+ ```json
156
+ "dev": "portless run next dev"
157
+ ```
158
+
159
+ ```
160
+ origin → https://myapp.localhost
161
+ ```
162
+
163
+ When sharing via Tailscale (`portless run --tailscale`), `PORTLESS_TAILSCALE_URL` takes priority so `origin` returns the publicly-reachable URL.
164
+
151
165
  ### Tunnels (ngrok, Cloudflare Tunnel)
152
166
 
153
167
  Tunnel URLs can't be auto-detected — they're external to the app process. Set `APP_URL`:
@@ -170,10 +184,13 @@ Modern wrangler polyfills `process.env` from `[vars]`, so `which-url` picks it u
170
184
  ### Debugging
171
185
 
172
186
  ```typescript
173
- import { debug } from 'which-url'
187
+ import appUrl from 'which-url'
174
188
 
175
- console.log(debug)
176
- // "platform=vercel | source=provider | url=https://myapp.com | env=production"
189
+ console.log(appUrl.debug)
190
+ // "[provider:vercel] url=myapp.com | env=production (vercel:production)"
191
+ // "[override] APP_URL=https://custom.com | env=production (NODE_ENV=production)"
192
+ // "[portless] PORTLESS_URL=https://myapp.localhost | env=local (NODE_ENV=development)"
193
+ // "[fallback] PORT=3004 | env=local (NODE_ENV=development)"
177
194
  ```
178
195
 
179
196
  ## API
@@ -194,8 +211,9 @@ An object with URL properties and environment helpers.
194
211
  | `port` | `string` | `""` or `"3000"` |
195
212
  | `env` | `AppEnv` | `"production"` \| `"preview"` \| `"local"` |
196
213
  | `platform` | `Platform` | `"vercel"` \| `"netlify"` \| ... \| `null` |
197
- | `source` | `Source` | `"override"` \| `"provider"` \| `"browser"` \| `"fallback"` \| `null` |
198
- | `debug` | `string` | `"platform=vercel \| source=provider \| url=https://myapp.com \| env=production"` |
214
+ | `debug`* | `string` | `"[provider:vercel] url=myapp.com \| env=production (vercel:production)"` |
215
+
216
+ \* `debug` is non-enumerable — excluded from `JSON.stringify` to avoid React hydration mismatches. Access via `appUrl.debug`.
199
217
  | `isProduction` | `boolean` | |
200
218
  | `isPreview` | `boolean` | |
201
219
  | `isLocal` | `boolean` | |
@@ -1 +1 @@
1
- {"version":3,"file":"env-var.d.ts","sourceRoot":"","sources":["../src/env-var.ts"],"names":[],"mappings":"AAgGA;;;;;;;GAOG;AACH,wBAAgB,MAAM,CACpB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EACvC,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CA0BpB;AAED,wBAAgB,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAK3D"}
1
+ {"version":3,"file":"env-var.d.ts","sourceRoot":"","sources":["../src/env-var.ts"],"names":[],"mappings":"AAkGA;;;;;;;GAOG;AACH,wBAAgB,MAAM,CACpB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EACvC,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CA4BpB;AAED,wBAAgB,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAK3D"}
package/dist/env.d.ts CHANGED
@@ -1,3 +1,7 @@
1
1
  import type { AppEnv } from "./types";
2
- export declare function resolveEnv(): AppEnv;
2
+ export interface EnvResult {
3
+ env: AppEnv;
4
+ debugLabel: string;
5
+ }
6
+ export declare function resolveEnv(): EnvResult;
3
7
  //# sourceMappingURL=env.d.ts.map
package/dist/env.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAIrC,wBAAgB,UAAU,IAAI,MAAM,CAwBnC"}
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAIrC,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,UAAU,IAAI,SAAS,CAyBtC"}
package/dist/index.d.ts CHANGED
@@ -1,18 +1,40 @@
1
- import type { WhichUrl, AppEnv, Platform, Source } from "./types";
2
- declare let _resolved: WhichUrl;
1
+ import type { WhichUrlWithDebug, AppEnv, Platform } from "./types";
2
+ declare let _resolved: WhichUrlWithDebug;
3
+ /** Full URL including protocol — `"https://myapp.com"` */
3
4
  export declare const href: string;
5
+ /** Full origin — `"https://myapp.com"` (same as href) */
4
6
  export declare const origin: string;
7
+ /** Hostname without port — `"myapp.com"` */
5
8
  export declare const hostname: string;
9
+ /** Hostname with port — `"myapp.com"` or `"localhost:3000"` */
6
10
  export declare const host: string;
11
+ /** Protocol with colon — `"https:"` or `"http:"` */
7
12
  export declare const protocol: string;
13
+ /** Port string — `""` for default ports, `"3000"` for custom */
8
14
  export declare const port: string;
15
+ /** Current environment — `"production"`, `"preview"`, or `"local"` */
9
16
  export declare const env: AppEnv;
17
+ /** Detected hosting platform — `"vercel"`, `"netlify"`, etc. or `null` */
10
18
  export declare const platform: Platform;
11
- export declare const source: Source;
12
- export declare const debug: string;
19
+ /** `true` when running in production */
13
20
  export declare const isProduction: boolean;
21
+ /** `true` when running in a preview/staging deployment */
14
22
  export declare const isPreview: boolean;
23
+ /** `true` when running locally (development) */
15
24
  export declare const isLocal: boolean;
25
+ /**
26
+ * Auto-detected app URL with environment metadata.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * import appUrl from 'which-url'
31
+ *
32
+ * appUrl.origin // "https://myapp.com"
33
+ * appUrl.env // "production"
34
+ * appUrl.platform // "vercel"
35
+ * appUrl.debug // "[provider:vercel] url=myapp.com | env=production (vercel:production)"
36
+ * ```
37
+ */
16
38
  export default _resolved;
17
- export type { WhichUrl, AppEnv, Platform, Source };
39
+ export type { WhichUrl, WhichUrlWithDebug, AppEnv, Platform, PlatformName } from "./types";
18
40
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AA0BjE,QAAA,IAAI,SAAS,EAAE,QAAQ,CAAA;AAyBvB,eAAO,MAAM,IAAI,EAAE,MAAuB,CAAA;AAC1C,eAAO,MAAM,MAAM,EAAE,MAAyB,CAAA;AAC9C,eAAO,MAAM,QAAQ,EAAE,MAA2B,CAAA;AAClD,eAAO,MAAM,IAAI,EAAE,MAAuB,CAAA;AAC1C,eAAO,MAAM,QAAQ,EAAE,MAA2B,CAAA;AAClD,eAAO,MAAM,IAAI,EAAE,MAAuB,CAAA;AAC1C,eAAO,MAAM,GAAG,EAAE,MAAsB,CAAA;AACxC,eAAO,MAAM,QAAQ,EAAE,QAA6B,CAAA;AACpD,eAAO,MAAM,MAAM,EAAE,MAAyB,CAAA;AAC9C,eAAO,MAAM,KAAK,EAAE,MAAwB,CAAA;AAC5C,eAAO,MAAM,YAAY,EAAE,OAAgC,CAAA;AAC3D,eAAO,MAAM,SAAS,EAAE,OAA6B,CAAA;AACrD,eAAO,MAAM,OAAO,EAAE,OAA2B,CAAA;AAGjD,eAAe,SAAS,CAAA;AAExB,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAqClE,QAAA,IAAI,SAAS,EAAE,iBAAiB,CAAA;AA6BhC,0DAA0D;AAC1D,eAAO,MAAM,IAAI,EAAE,MAAuB,CAAA;AAC1C,yDAAyD;AACzD,eAAO,MAAM,MAAM,EAAE,MAAyB,CAAA;AAC9C,4CAA4C;AAC5C,eAAO,MAAM,QAAQ,EAAE,MAA2B,CAAA;AAClD,+DAA+D;AAC/D,eAAO,MAAM,IAAI,EAAE,MAAuB,CAAA;AAC1C,oDAAoD;AACpD,eAAO,MAAM,QAAQ,EAAE,MAA2B,CAAA;AAClD,gEAAgE;AAChE,eAAO,MAAM,IAAI,EAAE,MAAuB,CAAA;AAC1C,sEAAsE;AACtE,eAAO,MAAM,GAAG,EAAE,MAAsB,CAAA;AACxC,0EAA0E;AAC1E,eAAO,MAAM,QAAQ,EAAE,QAA6B,CAAA;AACpD,wCAAwC;AACxC,eAAO,MAAM,YAAY,EAAE,OAAgC,CAAA;AAC3D,0DAA0D;AAC1D,eAAO,MAAM,SAAS,EAAE,OAA6B,CAAA;AACrD,gDAAgD;AAChD,eAAO,MAAM,OAAO,EAAE,OAA2B,CAAA;AAEjD;;;;;;;;;;;;GAYG;AACH,eAAe,SAAS,CAAA;AAExB,YAAY,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA"}
package/dist/index.js CHANGED
@@ -1,4 +1,12 @@
1
1
  // src/env-var.ts
2
+ var ENV_VARS = [
3
+ "VERCEL_ENV",
4
+ "VERCEL_URL",
5
+ "VERCEL_BRANCH_URL",
6
+ "VERCEL_PROJECT_PRODUCTION_URL",
7
+ "APP_URL",
8
+ "APP_ENV"
9
+ ];
2
10
  function readStatic(name) {
3
11
  switch (name) {
4
12
  case "VERCEL_ENV":
@@ -13,13 +21,17 @@ function readStatic(name) {
13
21
  return process.env.APP_URL || process.env.NEXT_PUBLIC_APP_URL || process.env.NUXT_ENV_APP_URL || process.env.VITE_APP_URL || process.env.PUBLIC_APP_URL || process.env.REACT_APP_APP_URL || process.env.GATSBY_APP_URL || process.env.VUE_APP_APP_URL || process.env.REDWOOD_ENV_APP_URL || process.env.SANITY_STUDIO_APP_URL || undefined;
14
22
  case "APP_ENV":
15
23
  return process.env.APP_ENV || process.env.NEXT_PUBLIC_APP_ENV || process.env.NUXT_ENV_APP_ENV || process.env.VITE_APP_ENV || process.env.PUBLIC_APP_ENV || process.env.REACT_APP_APP_ENV || process.env.GATSBY_APP_ENV || process.env.VUE_APP_APP_ENV || process.env.REDWOOD_ENV_APP_ENV || process.env.SANITY_STUDIO_APP_ENV || undefined;
24
+ default:
25
+ return;
16
26
  }
17
27
  }
18
28
  function getVar(env, name) {
19
29
  if (typeof process !== "undefined" && process?.env && env === process.env) {
20
- const val = readStatic(name);
21
- if (val)
22
- return val;
30
+ if (ENV_VARS.includes(name)) {
31
+ const val = readStatic(name);
32
+ if (val)
33
+ return val;
34
+ }
23
35
  }
24
36
  const PREFIXES = [
25
37
  "",
@@ -148,21 +160,27 @@ function resolveUrl() {
148
160
  const env = getEnv();
149
161
  const override = getVar(env, "APP_URL");
150
162
  if (override)
151
- return { url: normalizeUrl(override), source: "override" };
163
+ return { url: normalizeUrl(override), debugLabel: `[override] APP_URL=${override}` };
164
+ if (env.PORTLESS_TAILSCALE_URL) {
165
+ return { url: env.PORTLESS_TAILSCALE_URL, debugLabel: `[portless:tailscale] PORTLESS_TAILSCALE_URL=${env.PORTLESS_TAILSCALE_URL}` };
166
+ }
167
+ if (env.PORTLESS_URL) {
168
+ return { url: env.PORTLESS_URL, debugLabel: `[portless] PORTLESS_URL=${env.PORTLESS_URL}` };
169
+ }
152
170
  for (const p of providers) {
153
171
  if (p.detect(env)) {
154
172
  const url = p.resolveUrl(env);
155
173
  if (url)
156
- return { url: normalizeUrl(url), source: "provider" };
174
+ return { url: normalizeUrl(url), debugLabel: `[provider:${p.name}] url=${url}` };
157
175
  }
158
176
  }
159
177
  if (typeof window !== "undefined" && window.location) {
160
- return { url: window.location.origin, source: "browser" };
178
+ return { url: window.location.origin, debugLabel: `[browser] window.location.origin` };
161
179
  }
162
180
  const isProduction = env.NODE_ENV === "production";
163
181
  if (!isProduction) {
164
182
  const port = env.PORT || "3000";
165
- return { url: `http://localhost:${port}`, source: "fallback" };
183
+ return { url: `http://localhost:${port}`, debugLabel: `[fallback] PORT=${port}` };
166
184
  }
167
185
  throw new Error("which-url: Cannot detect app URL. Set APP_URL environment variable.");
168
186
  }
@@ -182,28 +200,29 @@ function resolveEnv() {
182
200
  const env = getEnv();
183
201
  const appEnv = getVar(env, "APP_ENV");
184
202
  if (appEnv && validEnvs.includes(appEnv)) {
185
- return appEnv;
203
+ return { env: appEnv, debugLabel: `APP_ENV=${appEnv}` };
186
204
  }
187
205
  if (env.NODE_ENV === "development")
188
- return "local";
206
+ return { env: "local", debugLabel: "NODE_ENV=development" };
189
207
  for (const p of providers) {
190
208
  if (p.detect(env)) {
191
- return p.resolveEnv(env);
209
+ const resolved = p.resolveEnv(env);
210
+ return { env: resolved, debugLabel: `${p.name}:${resolved}` };
192
211
  }
193
212
  }
194
213
  if (env.NODE_ENV === "production")
195
- return "production";
196
- return "local";
214
+ return { env: "production", debugLabel: "NODE_ENV=production" };
215
+ return { env: "local", debugLabel: "default" };
197
216
  }
198
217
 
199
218
  // src/index.ts
200
219
  function resolve() {
201
- const { url, source } = resolveUrl();
220
+ const { url, debugLabel: urlDebug } = resolveUrl();
202
221
  const parsed = new URL(url);
203
- const env = resolveEnv();
222
+ const { env, debugLabel: envDebug } = resolveEnv();
204
223
  const platform = resolvePlatform();
205
- const debug = `platform=${platform ?? "none"} | source=${source} | url=${parsed.origin} | env=${env}`;
206
- return {
224
+ const debug = `${urlDebug} | env=${env} (${envDebug})`;
225
+ const result = {
207
226
  href: parsed.origin,
208
227
  origin: parsed.origin,
209
228
  hostname: parsed.hostname,
@@ -212,19 +231,24 @@ function resolve() {
212
231
  port: parsed.port,
213
232
  env,
214
233
  platform,
215
- source,
216
234
  debug,
217
235
  isProduction: env === "production",
218
236
  isPreview: env === "preview",
219
237
  isLocal: env === "local"
220
238
  };
239
+ Object.defineProperty(result, "debug", {
240
+ value: debug,
241
+ enumerable: false,
242
+ configurable: false
243
+ });
244
+ return result;
221
245
  }
222
246
  var _resolved;
223
247
  try {
224
248
  _resolved = resolve();
225
249
  } catch (e) {
226
250
  console.warn(`[which-url] Could not detect app URL. Set APP_URL (e.g. APP_URL=https://myapp.com or APP_URL=myapp.com)`);
227
- _resolved = {
251
+ const fallback = {
228
252
  href: "",
229
253
  origin: "",
230
254
  hostname: "",
@@ -233,12 +257,17 @@ try {
233
257
  port: "",
234
258
  env: "local",
235
259
  platform: null,
236
- source: null,
237
- debug: "platform=none | source=none | url=none | env=local",
260
+ debug: "[error] resolution failed",
238
261
  isProduction: false,
239
262
  isPreview: false,
240
263
  isLocal: true
241
264
  };
265
+ Object.defineProperty(fallback, "debug", {
266
+ value: "[error] resolution failed",
267
+ enumerable: false,
268
+ configurable: false
269
+ });
270
+ _resolved = fallback;
242
271
  }
243
272
  var href = _resolved.href;
244
273
  var origin = _resolved.origin;
@@ -248,14 +277,11 @@ var protocol = _resolved.protocol;
248
277
  var port = _resolved.port;
249
278
  var env = _resolved.env;
250
279
  var platform = _resolved.platform;
251
- var source = _resolved.source;
252
- var debug = _resolved.debug;
253
280
  var isProduction = _resolved.isProduction;
254
281
  var isPreview = _resolved.isPreview;
255
282
  var isLocal = _resolved.isLocal;
256
283
  var src_default = _resolved;
257
284
  export {
258
- source,
259
285
  protocol,
260
286
  port,
261
287
  platform,
@@ -267,6 +293,5 @@ export {
267
293
  hostname,
268
294
  host,
269
295
  env,
270
- src_default as default,
271
- debug
296
+ src_default as default
272
297
  };
package/dist/resolve.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import type { Platform, Source } from "./types";
1
+ import type { Platform } from "./types";
2
2
  export interface ResolveResult {
3
3
  url: string;
4
- source: Source;
4
+ debugLabel: string;
5
5
  }
6
6
  export declare function resolveUrl(): ResolveResult;
7
7
  export declare function resolvePlatform(): Platform;
@@ -1 +1 @@
1
- {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAE/C,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,UAAU,IAAI,aAAa,CA+B1C;AAED,wBAAgB,eAAe,IAAI,QAAQ,CAQ1C"}
1
+ {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,UAAU,IAAI,aAAa,CAuC1C;AAED,wBAAgB,eAAe,IAAI,QAAQ,CAQ1C"}
package/dist/types.d.ts CHANGED
@@ -1,23 +1,36 @@
1
1
  export type AppEnv = "production" | "preview" | "local";
2
- export type Platform = "vercel" | "netlify" | "cloudflare" | "railway" | "fly" | "render" | "digitalocean" | "heroku" | null;
3
- export type Source = "override" | "provider" | "browser" | "fallback" | null;
2
+ export type PlatformName = "vercel" | "netlify" | "cloudflare" | "railway" | "fly" | "render" | "digitalocean" | "heroku";
3
+ export type Platform = PlatformName | null;
4
4
  export interface WhichUrl {
5
- href: string;
6
- origin: string;
7
- hostname: string;
8
- host: string;
9
- protocol: string;
10
- port: string;
11
- env: AppEnv;
12
- platform: Platform;
13
- source: Source;
14
- debug: string;
15
- isProduction: boolean;
16
- isPreview: boolean;
17
- isLocal: boolean;
5
+ /** Full URL including protocol — `"https://myapp.com"` */
6
+ readonly href: string;
7
+ /** Full origin — `"https://myapp.com"` (same as href) */
8
+ readonly origin: string;
9
+ /** Hostname without port — `"myapp.com"` */
10
+ readonly hostname: string;
11
+ /** Hostname with port — `"myapp.com"` or `"localhost:3000"` */
12
+ readonly host: string;
13
+ /** Protocol with colon — `"https:"` or `"http:"` */
14
+ readonly protocol: string;
15
+ /** Port string — `""` for default ports, `"3000"` for custom */
16
+ readonly port: string;
17
+ /** Current environment — `"production"`, `"preview"`, or `"local"` */
18
+ readonly env: AppEnv;
19
+ /** Detected hosting platform — `"vercel"`, `"netlify"`, etc. or `null` */
20
+ readonly platform: Platform;
21
+ /** `true` when running in production */
22
+ readonly isProduction: boolean;
23
+ /** `true` when running in a preview/staging deployment */
24
+ readonly isPreview: boolean;
25
+ /** `true` when running locally (development) */
26
+ readonly isLocal: boolean;
27
+ }
28
+ export interface WhichUrlWithDebug extends WhichUrl {
29
+ /** Resolution debug string (non-enumerable — excluded from JSON.stringify and object spread). */
30
+ readonly debug: string;
18
31
  }
19
32
  export interface ProviderDetector {
20
- name: string;
33
+ name: PlatformName;
21
34
  detect: (env: Record<string, string | undefined>) => boolean;
22
35
  resolveUrl: (env: Record<string, string | undefined>) => string | null;
23
36
  resolveEnv: (env: Record<string, string | undefined>) => AppEnv;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,YAAY,GAAG,SAAS,GAAG,OAAO,CAAA;AAEvD,MAAM,MAAM,QAAQ,GAChB,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,SAAS,GACT,KAAK,GACL,QAAQ,GACR,cAAc,GACd,QAAQ,GACR,IAAI,CAAA;AAER,MAAM,MAAM,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,IAAI,CAAA;AAE5E,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,QAAQ,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,OAAO,CAAA;IACrB,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,KAAK,OAAO,CAAA;IAC5D,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,KAAK,MAAM,GAAG,IAAI,CAAA;IACtE,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,KAAK,MAAM,CAAA;CAChE"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,YAAY,GAAG,SAAS,GAAG,OAAO,CAAA;AAEvD,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,SAAS,GACT,KAAK,GACL,QAAQ,GACR,cAAc,GACd,QAAQ,CAAA;AAEZ,MAAM,MAAM,QAAQ,GAAG,YAAY,GAAG,IAAI,CAAA;AAE1C,MAAM,WAAW,QAAQ;IACvB,0DAA0D;IAC1D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,4CAA4C;IAC5C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,oDAAoD;IACpD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,sEAAsE;IACtE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;IAC3B,wCAAwC;IACxC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAA;IAC9B,0DAA0D;IAC1D,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,gDAAgD;IAChD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B;AAED,MAAM,WAAW,iBAAkB,SAAQ,QAAQ;IACjD,iGAAiG;IACjG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,YAAY,CAAA;IAClB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,KAAK,OAAO,CAAA;IAC5D,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,KAAK,MAAM,GAAG,IAAI,CAAA;IACtE,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,KAAK,MAAM,CAAA;CAChE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "which-url",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "Auto-detect your app's URL across hosting providers. Zero config.",
5
5
  "type": "module",
6
6
  "exports": {