@jakuta-inc/worker-proxy 5.0.0 → 5.0.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/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/venture_api_route.d.ts +13 -0
- package/dist/venture_api_route.d.ts.map +1 -0
- package/dist/venture_api_route.js +21 -0
- package/dist/venture_api_route.js.map +1 -0
- package/package.json +28 -28
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export type { Backend, PathRewrite, Route, HealthProbeResult, ProxyHealthCheck, ProxyHandlerConfig, ProxyOutcome, ProxyHandler, ProxyError, } from "./same-origin-proxy.js";
|
|
2
2
|
export { ADMIN_API_BASE, createProxyHandler, createAdminAuthRoute, } from "./same-origin-proxy.js";
|
|
3
|
+
export { VENTURE_API_PREFIX, createVentureApiRoute, } from "./venture_api_route.js";
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,OAAO,EACP,WAAW,EACX,KAAK,EACL,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,UAAU,GACX,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,OAAO,EACP,WAAW,EACX,KAAK,EACL,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,UAAU,GACX,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Route } from "./same-origin-proxy.js";
|
|
2
|
+
export declare const VENTURE_API_PREFIX = "/api";
|
|
3
|
+
/**
|
|
4
|
+
* @why Builds the canonical venture-api route from a venture origin so
|
|
5
|
+
* every venture Worker proxy mounts `/api/*` the same way, keeping the
|
|
6
|
+
* Worker-side path contract aligned with the Rust `VENTURE_API_PREFIX`
|
|
7
|
+
* constant.
|
|
8
|
+
*
|
|
9
|
+
* @param ventureBase - Origin of the venture backend (scheme + host, no path).
|
|
10
|
+
* @returns A Route that matches `/api` / `/api/*` and forwards to `ventureBase`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createVentureApiRoute(ventureBase: string): Route;
|
|
13
|
+
//# sourceMappingURL=venture_api_route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"venture_api_route.d.ts","sourceRoot":"","sources":["../src/venture_api_route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAKpD,eAAO,MAAM,kBAAkB,SAAS,CAAC;AAEzC;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,KAAK,CAMhE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Mirror of `crates/jakuta-cli-core/src/venture_api_prefix.rs` — the two
|
|
2
|
+
// constants MUST stay byte-identical so venture backends, venture plugins,
|
|
3
|
+
// and venture Worker proxies all agree on where the admin surface is nested.
|
|
4
|
+
export const VENTURE_API_PREFIX = "/api";
|
|
5
|
+
/**
|
|
6
|
+
* @why Builds the canonical venture-api route from a venture origin so
|
|
7
|
+
* every venture Worker proxy mounts `/api/*` the same way, keeping the
|
|
8
|
+
* Worker-side path contract aligned with the Rust `VENTURE_API_PREFIX`
|
|
9
|
+
* constant.
|
|
10
|
+
*
|
|
11
|
+
* @param ventureBase - Origin of the venture backend (scheme + host, no path).
|
|
12
|
+
* @returns A Route that matches `/api` / `/api/*` and forwards to `ventureBase`.
|
|
13
|
+
*/
|
|
14
|
+
export function createVentureApiRoute(ventureBase) {
|
|
15
|
+
return {
|
|
16
|
+
pathPrefix: VENTURE_API_PREFIX,
|
|
17
|
+
target: { kind: "venture", base: ventureBase },
|
|
18
|
+
rewrite: { kind: "identity" },
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=venture_api_route.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"venture_api_route.js","sourceRoot":"","sources":["../src/venture_api_route.ts"],"names":[],"mappings":"AAEA,yEAAyE;AACzE,2EAA2E;AAC3E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAEzC;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CAAC,WAAmB;IACrD,OAAO;QACH,UAAU,EAAE,kBAAkB;QAC9B,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE;QAC9C,OAAO,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;KAChC,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@jakuta-inc/worker-proxy",
|
|
3
|
-
"version": "5.0.
|
|
4
|
-
"description": "Same-origin reverse proxy for Jakuta admin panel Cloudflare Workers",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
],
|
|
11
|
-
"scripts": {
|
|
12
|
-
"build": "tsc",
|
|
13
|
-
"prepublishOnly": "tsc",
|
|
14
|
-
"test": "vitest run"
|
|
15
|
-
},
|
|
16
|
-
"publishConfig": {
|
|
17
|
-
"access": "restricted"
|
|
18
|
-
},
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "https://github.com/Jakuta-Inc/jakuta-admin.git",
|
|
22
|
-
"directory": "packages/worker-proxy"
|
|
23
|
-
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@cloudflare/workers-types": "^4.20250327.0",
|
|
26
|
-
"typescript": "^5.7.0"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@jakuta-inc/worker-proxy",
|
|
3
|
+
"version": "5.0.1",
|
|
4
|
+
"description": "Same-origin reverse proxy for Jakuta admin panel Cloudflare Workers",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"prepublishOnly": "tsc",
|
|
14
|
+
"test": "vitest run"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "restricted"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/Jakuta-Inc/jakuta-admin.git",
|
|
22
|
+
"directory": "packages/worker-proxy"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@cloudflare/workers-types": "^4.20250327.0",
|
|
26
|
+
"typescript": "^5.7.0"
|
|
27
|
+
}
|
|
28
|
+
}
|