@stacksjs/rpx 0.11.2 → 0.11.3

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/dist/src/index.js CHANGED
@@ -1 +1 @@
1
- import{a as t,c as r,d as e,e as f,f as a,g as i,h as s,i as p,j as c,k as x,l as m,m as n,n as g,o as C,p as l,q as P,s as d,t as u,u as v,v as o}from"../chunk-p95pk6sx.js";import"../chunk-3y886wa5.js";import{A as G,B as I,C as J,D as K,E as N,F as O,G as Q,w as j,x as q,y as z,z as B}from"../chunk-g5db14m7.js";import"../chunk-gbny098p.js";var U=o;export{u as startServer,v as startProxy,o as startProxies,Q as safeDeleteFile,f as removeHosts,P as portManager,i as loadSSLConfig,G as isValidRootCA,N as isSingleProxyOptions,O as isSingleProxyConfig,g as isPortInUse,K as isMultiProxyOptions,J as isMultiProxyConfig,n as isCertTrusted,x as httpsConfig,j as getSudoPassword,I as getPrimaryDomain,p as generateCertificate,s as forceTrustCertificate,C as findAvailablePort,B as extractHostname,q as execSudoSync,r as defaultConfig,U as default,z as debugLog,r as config,t as colors,m as cleanupCertificates,d as cleanup,a as checkHosts,c as checkExistingCertificates,e as addHosts,l as DefaultPortManager};
1
+ import{a as t,c as r,d as e,e as f,f as a,g as i,h as s,i as p,j as c,k as x,l as m,m as n,n as g,o as C,p as l,q as P,s as d,t as u,u as v,v as o}from"../chunk-8mnzvjyr.js";import"../chunk-3y886wa5.js";import{A as G,B as I,C as J,D as K,E as N,F as O,G as Q,w as j,x as q,y as z,z as B}from"../chunk-g5db14m7.js";import"../chunk-gbny098p.js";var U=o;export{u as startServer,v as startProxy,o as startProxies,Q as safeDeleteFile,f as removeHosts,P as portManager,i as loadSSLConfig,G as isValidRootCA,N as isSingleProxyOptions,O as isSingleProxyConfig,g as isPortInUse,K as isMultiProxyOptions,J as isMultiProxyConfig,n as isCertTrusted,x as httpsConfig,j as getSudoPassword,I as getPrimaryDomain,p as generateCertificate,s as forceTrustCertificate,C as findAvailablePort,B as extractHostname,q as execSudoSync,r as defaultConfig,U as default,z as debugLog,r as config,t as colors,m as cleanupCertificates,d as cleanup,a as checkHosts,c as checkExistingCertificates,e as addHosts,l as DefaultPortManager};
package/dist/types.d.ts CHANGED
@@ -5,10 +5,16 @@ export declare interface StartOptions {
5
5
  cwd?: string
6
6
  env?: Record<string, string>
7
7
  }
8
+ export declare interface PathRewrite {
9
+ from: string
10
+ to: string
11
+ stripPrefix?: boolean
12
+ }
8
13
  export declare interface BaseProxyConfig {
9
14
  from: string
10
15
  to: string
11
16
  start?: StartOptions
17
+ pathRewrites?: PathRewrite[]
12
18
  }
13
19
  export declare interface CleanupConfig {
14
20
  domains: string[]
@@ -30,7 +36,7 @@ export declare interface SharedProxyConfig {
30
36
  }
31
37
  export declare interface SingleProxyConfig extends BaseProxyConfig, SharedProxyConfig {}
32
38
  export declare interface MultiProxyConfig extends SharedProxyConfig {
33
- proxies: Array<BaseProxyConfig & { cleanUrls: boolean }>
39
+ proxies: Array<BaseProxyConfig & { cleanUrls: boolean, pathRewrites?: PathRewrite[] }>
34
40
  }
35
41
  export declare interface SSLConfig {
36
42
  key: string
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/rpx",
3
3
  "type": "module",
4
- "version": "0.11.2",
4
+ "version": "0.11.3",
5
5
  "description": "A modern and smart reverse proxy.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -26,11 +26,20 @@
26
26
  ],
27
27
  "exports": {
28
28
  ".": {
29
- "bun": "./src/index.ts",
30
29
  "types": "./dist/index.d.ts",
30
+ "bun": "./src/index.ts",
31
31
  "import": "./dist/src/index.js"
32
32
  }
33
33
  },
34
+ "publishConfig": {
35
+ "exports": {
36
+ ".": {
37
+ "types": "./dist/index.d.ts",
38
+ "bun": "./dist/src/index.js",
39
+ "import": "./dist/src/index.js"
40
+ }
41
+ }
42
+ },
34
43
  "module": "./dist/src/index.js",
35
44
  "types": "./dist/index.d.ts",
36
45
  "bin": {