lytx 0.3.9 → 0.3.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lytx",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -84,7 +84,6 @@
84
84
  "deploy": "bun alchemy deploy --env-file .env.prod --stage prod"
85
85
  },
86
86
  "devDependencies": {
87
- "@cloudflare/vite-plugin": "^1.13.10",
88
87
  "@tailwindcss/vite": "^4.1.8",
89
88
  "@types/better-sqlite3": "^7.6.13",
90
89
  "@types/bun": "^1.2.21",
@@ -98,8 +97,6 @@
98
97
  "dotenv": "^17.2.1",
99
98
  "drizzle-kit": "^0.31.8",
100
99
  "oxlint": "^1.48.0",
101
- "tailwindcss": "^4.1.8",
102
- "typescript": "^5.3.2",
103
100
  "wrangler": "^4.59.3"
104
101
  },
105
102
  "dependencies": {
@@ -107,19 +104,15 @@
107
104
  "@ai-sdk/google": "^3.0.30",
108
105
  "@ai-sdk/openai-compatible": "^2.0.26",
109
106
  "@ai-sdk/react": "^3.0.70",
110
- "@fontsource/montserrat": "^5.2.8",
111
107
  "@hono/swagger-ui": "^0.5.3",
112
108
  "@hono/zod-openapi": "^1.2.1",
113
- "@hono/zod-validator": "^0.7.6",
114
109
  "@nivo/bar": "^0.99.0",
115
- "@nivo/core": "^0.99.0",
116
110
  "@nivo/funnel": "^0.99.0",
117
111
  "@nivo/line": "^0.99.0",
118
112
  "@nivo/pie": "^0.99.0",
119
113
  "@nivo/sankey": "^0.99.0",
120
114
  "@paralleldrive/cuid2": "^2.2.2",
121
115
  "@tanstack/react-query": "^5.90.2",
122
- "@tanstack/react-table": "^8.21.3",
123
116
  "ai": "^6.0.68",
124
117
  "alchemy": "^0.84.0",
125
118
  "better-auth": "^1.2.9",
@@ -120,8 +120,8 @@ export const lytxTag = (adapter: DBAdapter, route_path = "/lytx.js") => route(ro
120
120
  const lytx_script = (lytxDomain: string) => {
121
121
  // Use core bundle (no vendors) when tag_manager is disabled, full bundle otherwise
122
122
  const baseScript = config.tag_manager ? script_tag_manager : script_core;
123
- // Replace the placeholder with the actual domain (includes protocol)
124
- const domain = IS_DEV ? "http://localhost:6123" : lytxDomain;
123
+ // Replace the placeholder with the script request origin so local ports stay aligned.
124
+ const domain = lytxDomain;
125
125
  return baseScript.replace("__LYTX_DOMAIN__", domain);
126
126
  }
127
127
  if (!events) return new Response("Not Found.", { status: 404 });
@@ -128,7 +128,6 @@ const createLytxAppConfigSchema = z
128
128
  .object({
129
129
  enableRequestLogging: z.boolean().optional(),
130
130
  db: dbConfigSchema.optional(),
131
- dbAdapter: dbAdapterSchema.optional(),
132
131
  useQueueIngestion: z.boolean().optional(),
133
132
  includeLegacyTagRoutes: z.boolean().optional(),
134
133
  trackingRoutePrefix: routePrefixSchema.optional(),
@@ -212,14 +211,6 @@ const createLytxAppConfigSchema = z
212
211
  })
213
212
  .strict()
214
213
  .superRefine((value, ctx) => {
215
- if (value.db?.dbAdapter && value.dbAdapter && value.db.dbAdapter !== value.dbAdapter) {
216
- ctx.addIssue({
217
- code: z.ZodIssueCode.custom,
218
- path: ["db", "dbAdapter"],
219
- message: "db.dbAdapter must match top-level dbAdapter when both are provided",
220
- });
221
- }
222
-
223
214
  if (value.features?.dashboard === true && value.features?.auth === false) {
224
215
  ctx.addIssue({
225
216
  code: z.ZodIssueCode.custom,
package/src/worker.tsx CHANGED
@@ -221,7 +221,7 @@ export function createLytxApp(config: CreateLytxAppConfig = {}) {
221
221
  const eventsEnabled = parsed_config.features?.events ?? isEventsEnabled();
222
222
  const aiEnabled = dashboardEnabled && (parsed_config.features?.ai ?? isAiFeatureEnabled());
223
223
  const tagScriptEnabled = parsed_config.features?.tagScript ?? isTagScriptEnabled();
224
- const tagRouteDbAdapter = parsed_config.db?.dbAdapter ?? parsed_config.dbAdapter ?? DEFAULT_TAG_DB_ADAPTER;
224
+ const tagRouteDbAdapter = parsed_config.db?.dbAdapter ?? DEFAULT_TAG_DB_ADAPTER;
225
225
  const tagRouteEventStore = parsed_config.db?.eventStore ?? "durable_objects";
226
226
  const tagRouteQueueIngestionEnabled = parsed_config.useQueueIngestion ?? (tagRouteEventStore === "durable_objects");
227
227
  const includeLegacyTagRoutes = parsed_config.includeLegacyTagRoutes ?? true;