drizzle-cube 0.1.29 → 0.1.30

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.
@@ -1,5 +1,5 @@
1
1
  import { Hono as x } from "hono";
2
- import { S as v, f as h, a as A, b as w, h as C } from "../compiler-BibS3bXd.js";
2
+ import { S as v, f as w, a as A, b as h, h as C } from "../compiler-BibS3bXd.js";
3
3
  var b = (d) => {
4
4
  const l = {
5
5
  ...{
@@ -15,14 +15,14 @@ var b = (d) => {
15
15
  function s(r, t) {
16
16
  n.res.headers.set(r, t);
17
17
  }
18
- const a = g(n.req.header("origin") || "", n);
18
+ const a = await g(n.req.header("origin") || "", n);
19
19
  if (a && s("Access-Control-Allow-Origin", a), l.origin !== "*") {
20
20
  const r = n.req.header("Vary");
21
21
  r ? s("Vary", r) : s("Vary", "Origin");
22
22
  }
23
23
  if (l.credentials && s("Access-Control-Allow-Credentials", "true"), (e = l.exposeHeaders) != null && e.length && s("Access-Control-Expose-Headers", l.exposeHeaders.join(",")), n.req.method === "OPTIONS") {
24
24
  l.maxAge != null && s("Access-Control-Max-Age", l.maxAge.toString());
25
- const r = f(n.req.header("origin") || "", n);
25
+ const r = await f(n.req.header("origin") || "", n);
26
26
  r.length && s("Access-Control-Allow-Methods", r.join(","));
27
27
  let t = l.allowHeaders;
28
28
  if (!(t != null && t.length)) {
@@ -67,7 +67,7 @@ function S(d) {
67
67
  error: `Query validation failed: ${i.errors.join(", ")}`
68
68
  }, 400);
69
69
  const m = await a.executeMultiCubeQuery(t, o);
70
- return e.json(h(t, m, a));
70
+ return e.json(w(t, m, a));
71
71
  } catch (r) {
72
72
  return console.error("Query execution error:", r), e.json({
73
73
  error: r instanceof Error ? r.message : "Query execution failed"
@@ -94,7 +94,7 @@ function S(d) {
94
94
  error: `Query validation failed: ${i.errors.join(", ")}`
95
95
  }, 400);
96
96
  const m = await a.executeMultiCubeQuery(t, o);
97
- return e.json(h(t, m, a));
97
+ return e.json(w(t, m, a));
98
98
  } catch (r) {
99
99
  return console.error("Query execution error:", r), e.json({
100
100
  error: r instanceof Error ? r.message : "Query execution failed"
@@ -123,7 +123,7 @@ function S(d) {
123
123
  error: "No measures or dimensions specified"
124
124
  }, 400);
125
125
  const j = q.split(".")[0], p = await a.generateSQL(j, o, i);
126
- return e.json(w(o, p));
126
+ return e.json(h(o, p));
127
127
  } catch (o) {
128
128
  return console.error("SQL generation error:", o), e.json({
129
129
  error: o instanceof Error ? o.message : "SQL generation failed"
@@ -148,7 +148,7 @@ function S(d) {
148
148
  error: "No measures or dimensions specified"
149
149
  }, 400);
150
150
  const p = j.split(".")[0], Q = await a.generateSQL(p, i, m);
151
- return e.json(w(i, Q));
151
+ return e.json(h(i, Q));
152
152
  } catch (o) {
153
153
  return console.error("SQL generation error:", o), e.json({
154
154
  error: o instanceof Error ? o.message : "SQL generation failed"