@inflector/aura 0.7.1 → 0.7.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/auth.d.ts.map +1 -1
- package/dist/auth.js +1 -2
- package/dist/bin.js +11 -9
- package/dist/payments.d.ts.map +1 -1
- package/dist/payments.js +1 -2
- package/package.json +1 -1
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,EAAE,WAAW,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,EAAE,WAAW,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAkG3B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;yBAQxB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;yBACR,MAAM,EAAE;;;;;;;;;;;;;;;8BACH,MAAM,EAAE;;;;;;;;;;;;;;;2BACX,MAAM,EAAE;;;;;;;;;;;;;;;4BACP,MAAM,EAAE;;;;;;;;;;;;;;;yBACX,MAAM,EAAE;;;;;;;;;;;;;;;wBACT,MAAM,EAAE;;;;;;;;;;;;;;;0BACN,MAAM,EAAE;;;;;;;;;;;;;;;yBACT,MAAM,EAAE;;;;;;;;;;;;;;;yBACR,MAAM,EAAE;;;;;;;;;;;;;;;oBACb,MAAM,EAAE;;;;;;;;;;;;;;;qBACP,MAAM,EAAE;;;;;;;;;;;;;;;uBACN,MAAM,EAAE;;;;;;;;;;;;;;;;+BAIA,MAAM;;;;;;;;;;;;;;;;;;uBAgBT,MAAM;CAcjC,CAAC"}
|
package/dist/auth.js
CHANGED
|
@@ -10,8 +10,7 @@ export const AuraAuth = (url, workspace) => {
|
|
|
10
10
|
let _initialized = false;
|
|
11
11
|
let User = null;
|
|
12
12
|
const authClient = createAuthClient({
|
|
13
|
-
|
|
14
|
-
baseURL: `${url}/api/auth/${workspace}`,
|
|
13
|
+
baseURL: `${window.location.origin}/api/auth/${workspace}`,
|
|
15
14
|
plugins: [anonymousClient(), polarClient()],
|
|
16
15
|
fetchOptions: {
|
|
17
16
|
credentials: "include",
|
package/dist/bin.js
CHANGED
|
@@ -391,25 +391,27 @@ export async function serve(mode) {
|
|
|
391
391
|
proxy: {
|
|
392
392
|
"/api": {
|
|
393
393
|
target: upstreamUrl,
|
|
394
|
-
changeOrigin:
|
|
394
|
+
changeOrigin: true,
|
|
395
395
|
secure: false,
|
|
396
396
|
ws: true,
|
|
397
|
+
cookieDomainRewrite: "",
|
|
398
|
+
rewrite: (path) => path, // identity — no rewrite, keep as-is
|
|
397
399
|
configure(proxy) {
|
|
398
400
|
proxy.on("proxyReq", (proxyReq, req) => {
|
|
399
|
-
// Rewrite the path using the raw unmodified URL from the request
|
|
400
|
-
proxyReq.path = req.url; // ← keeps the original encoding intact
|
|
401
401
|
proxyReq.setHeader("connection", "close");
|
|
402
402
|
if (AURA_KEY)
|
|
403
403
|
proxyReq.setHeader("Authorization", `Bearer ${AURA_KEY}`);
|
|
404
404
|
if (req.headers.cookie)
|
|
405
405
|
proxyReq.setHeader("cookie", req.headers.cookie);
|
|
406
406
|
});
|
|
407
|
-
proxy.on("
|
|
408
|
-
|
|
409
|
-
if (
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
407
|
+
proxy.on("error", (err, req, res) => {
|
|
408
|
+
console.error("[proxy error]", err.message, req.url);
|
|
409
|
+
if (!res.headersSent) {
|
|
410
|
+
res.writeHead(502, { "Content-Type": "application/json" });
|
|
411
|
+
res.end(JSON.stringify({
|
|
412
|
+
error: "Proxy error",
|
|
413
|
+
detail: err.message,
|
|
414
|
+
}));
|
|
413
415
|
}
|
|
414
416
|
});
|
|
415
417
|
},
|
package/dist/payments.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["../src/payments.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,EAAE,WAAW,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["../src/payments.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,EAAE,WAAW,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAgB0vjB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAArzjB,CAAA"}
|
package/dist/payments.js
CHANGED
|
@@ -2,8 +2,7 @@ import { createAuthClient } from "better-auth/client";
|
|
|
2
2
|
import { polarClient } from "@polar-sh/better-auth/client";
|
|
3
3
|
export const AuraPayments = (url, workspace) => {
|
|
4
4
|
const authClient = createAuthClient({
|
|
5
|
-
|
|
6
|
-
baseURL: `${url}/api/auth/${workspace}`,
|
|
5
|
+
baseURL: `${window.location.origin}/api/auth/${workspace}`,
|
|
7
6
|
plugins: [polarClient()],
|
|
8
7
|
fetchOptions: {
|
|
9
8
|
credentials: "include",
|