lytx 0.3.9 → 0.3.10
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
package/src/api/tag_api_v2.ts
CHANGED
|
@@ -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
|
|
124
|
-
const domain =
|
|
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 ??
|
|
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;
|