diff --git a/.changeset/tricky-squids-relax.md b/.changeset/tricky-squids-relax.md new file mode 100644 index 00000000000..a2ecc6d4d2b --- /dev/null +++ b/.changeset/tricky-squids-relax.md @@ -0,0 +1,5 @@ +--- +'@builder.io/qwik': patch +--- + +FIX: q-manifest upload to insights diff --git a/packages/insights/README.md b/packages/insights/README.md index 17ac2beeb00..a9f7da33b40 100644 --- a/packages/insights/README.md +++ b/packages/insights/README.md @@ -1,7 +1,11 @@ # Qwik Insights +0 + ## Local Development +Install turso cli and sqld. + Ensure you have `.env.local` set up like so: ``` diff --git a/packages/insights/drizzle/0020_chemical_lyja.sql b/packages/insights/drizzle/0020_chemical_lyja.sql new file mode 100644 index 00000000000..d99f183c45d --- /dev/null +++ b/packages/insights/drizzle/0020_chemical_lyja.sql @@ -0,0 +1,2 @@ +DROP INDEX IF EXISTS `idx_symbolDetail_apiKey_manifestHash`;--> statement-breakpoint +CREATE UNIQUE INDEX `idx_symbolDetail_apiKey_manifestHash_hash` ON `symbolDetail` (`public_api_key`,`manifest_hash`,`hash`); \ No newline at end of file diff --git a/packages/insights/drizzle/meta/0020_snapshot.json b/packages/insights/drizzle/meta/0020_snapshot.json new file mode 100644 index 00000000000..8061e446238 --- /dev/null +++ b/packages/insights/drizzle/meta/0020_snapshot.json @@ -0,0 +1,1812 @@ +{ + "version": "6", + "dialect": "sqlite", + "id": "f9539923-5fb7-4c0e-87f7-f1196d0c4fbd", + "prevId": "c7ff5c52-d899-4ec4-8572-a77cf72295c4", + "tables": { + "applications": { + "name": "applications", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "public_api_key": { + "name": "public_api_key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "publicApiKeyIndex": { + "name": "publicApiKeyIndex", + "columns": [ + "public_api_key" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "edges": { + "name": "edges", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "public_api_key": { + "name": "public_api_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "manifest_hash": { + "name": "manifest_hash", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "from": { + "name": "from", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "to": { + "name": "to", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "interaction": { + "name": "interaction", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_00": { + "name": "delay_count_00", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_01": { + "name": "delay_count_01", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_02": { + "name": "delay_count_02", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_03": { + "name": "delay_count_03", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_04": { + "name": "delay_count_04", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_05": { + "name": "delay_count_05", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_06": { + "name": "delay_count_06", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_07": { + "name": "delay_count_07", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_08": { + "name": "delay_count_08", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_09": { + "name": "delay_count_09", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_10": { + "name": "delay_count_10", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_11": { + "name": "delay_count_11", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_12": { + "name": "delay_count_12", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_13": { + "name": "delay_count_13", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_14": { + "name": "delay_count_14", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_15": { + "name": "delay_count_15", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_16": { + "name": "delay_count_16", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_17": { + "name": "delay_count_17", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_18": { + "name": "delay_count_18", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_19": { + "name": "delay_count_19", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_20": { + "name": "delay_count_20", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_21": { + "name": "delay_count_21", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_22": { + "name": "delay_count_22", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_23": { + "name": "delay_count_23", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_24": { + "name": "delay_count_24", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_25": { + "name": "delay_count_25", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_26": { + "name": "delay_count_26", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_27": { + "name": "delay_count_27", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_28": { + "name": "delay_count_28", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_29": { + "name": "delay_count_29", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_30": { + "name": "delay_count_30", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_31": { + "name": "delay_count_31", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_32": { + "name": "delay_count_32", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_33": { + "name": "delay_count_33", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_34": { + "name": "delay_count_34", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_35": { + "name": "delay_count_35", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_36": { + "name": "delay_count_36", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_37": { + "name": "delay_count_37", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_38": { + "name": "delay_count_38", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_39": { + "name": "delay_count_39", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_40": { + "name": "delay_count_40", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_41": { + "name": "delay_count_41", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_42": { + "name": "delay_count_42", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_43": { + "name": "delay_count_43", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_44": { + "name": "delay_count_44", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_45": { + "name": "delay_count_45", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_46": { + "name": "delay_count_46", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_47": { + "name": "delay_count_47", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_48": { + "name": "delay_count_48", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delay_count_49": { + "name": "delay_count_49", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_00": { + "name": "latency_count_00", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_01": { + "name": "latency_count_01", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_02": { + "name": "latency_count_02", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_03": { + "name": "latency_count_03", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_04": { + "name": "latency_count_04", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_05": { + "name": "latency_count_05", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_06": { + "name": "latency_count_06", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_07": { + "name": "latency_count_07", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_08": { + "name": "latency_count_08", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_09": { + "name": "latency_count_09", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_10": { + "name": "latency_count_10", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_11": { + "name": "latency_count_11", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_12": { + "name": "latency_count_12", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_13": { + "name": "latency_count_13", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_14": { + "name": "latency_count_14", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_15": { + "name": "latency_count_15", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_16": { + "name": "latency_count_16", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_17": { + "name": "latency_count_17", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_18": { + "name": "latency_count_18", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_19": { + "name": "latency_count_19", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_20": { + "name": "latency_count_20", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_21": { + "name": "latency_count_21", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_22": { + "name": "latency_count_22", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_23": { + "name": "latency_count_23", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_24": { + "name": "latency_count_24", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_25": { + "name": "latency_count_25", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_26": { + "name": "latency_count_26", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_27": { + "name": "latency_count_27", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_28": { + "name": "latency_count_28", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_29": { + "name": "latency_count_29", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_30": { + "name": "latency_count_30", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_31": { + "name": "latency_count_31", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_32": { + "name": "latency_count_32", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_33": { + "name": "latency_count_33", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_34": { + "name": "latency_count_34", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_35": { + "name": "latency_count_35", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_36": { + "name": "latency_count_36", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_37": { + "name": "latency_count_37", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_38": { + "name": "latency_count_38", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_39": { + "name": "latency_count_39", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_40": { + "name": "latency_count_40", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_41": { + "name": "latency_count_41", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_42": { + "name": "latency_count_42", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_43": { + "name": "latency_count_43", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_44": { + "name": "latency_count_44", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_45": { + "name": "latency_count_45", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_46": { + "name": "latency_count_46", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_47": { + "name": "latency_count_47", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_48": { + "name": "latency_count_48", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_count_49": { + "name": "latency_count_49", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "edgeIndex_PublicApiKey": { + "name": "edgeIndex_PublicApiKey", + "columns": [ + "public_api_key" + ], + "isUnique": false + }, + "idx_edge_publicApiKey_manifestHash": { + "name": "idx_edge_publicApiKey_manifestHash", + "columns": [ + "public_api_key", + "manifest_hash" + ], + "isUnique": false + }, + "idx_edge_apiKey_manifestHash_from_to": { + "name": "idx_edge_apiKey_manifestHash_from_to", + "columns": [ + "public_api_key", + "manifest_hash", + "from", + "to" + ], + "isUnique": false + }, + "idx_edge_from_to": { + "name": "idx_edge_from_to", + "columns": [ + "from", + "to" + ], + "isUnique": false + }, + "idx_apiKey_hash_from": { + "name": "idx_apiKey_hash_from", + "columns": [ + "public_api_key", + "from", + "manifest_hash" + ], + "isUnique": false + }, + "idx_hash_to": { + "name": "idx_hash_to", + "columns": [ + "manifest_hash", + "to" + ], + "isUnique": false + } + }, + "foreignKeys": { + "edges_public_api_key_applications_public_api_key_fk": { + "name": "edges_public_api_key_applications_public_api_key_fk", + "tableFrom": "edges", + "tableTo": "applications", + "columnsFrom": [ + "public_api_key" + ], + "columnsTo": [ + "public_api_key" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "errors": { + "name": "errors", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "public_api_key": { + "name": "public_api_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "manifest_hash": { + "name": "manifest_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "timestamp": { + "name": "timestamp", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "line": { + "name": "line", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "column": { + "name": "column", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "stack": { + "name": "stack", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "errors_public_api_key_applications_public_api_key_fk": { + "name": "errors_public_api_key_applications_public_api_key_fk", + "tableFrom": "errors", + "tableTo": "applications", + "columnsFrom": [ + "public_api_key" + ], + "columnsTo": [ + "public_api_key" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "errors_manifest_hash_manifests_hash_fk": { + "name": "errors_manifest_hash_manifests_hash_fk", + "tableFrom": "errors", + "tableTo": "manifests", + "columnsFrom": [ + "manifest_hash" + ], + "columnsTo": [ + "hash" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "manifests": { + "name": "manifests", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "public_api_key": { + "name": "public_api_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "hash": { + "name": "hash", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timestamp": { + "name": "timestamp", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "idx_manifests_apiKey_hash": { + "name": "idx_manifests_apiKey_hash", + "columns": [ + "hash", + "public_api_key" + ], + "isUnique": false + }, + "idx_manifests_apiKey_hash_2": { + "name": "idx_manifests_apiKey_hash_2", + "columns": [ + "public_api_key", + "hash" + ], + "isUnique": false + }, + "idx_manifest_api_timestamp": { + "name": "idx_manifest_api_timestamp", + "columns": [ + "public_api_key", + "timestamp" + ], + "isUnique": false + }, + "idx_manifests_public_apiKey": { + "name": "idx_manifests_public_apiKey", + "columns": [ + "public_api_key" + ], + "isUnique": false + }, + "idx_manifests_hash": { + "name": "idx_manifests_hash", + "columns": [ + "hash" + ], + "isUnique": false + } + }, + "foreignKeys": { + "manifests_public_api_key_applications_public_api_key_fk": { + "name": "manifests_public_api_key_applications_public_api_key_fk", + "tableFrom": "manifests", + "tableTo": "applications", + "columnsFrom": [ + "public_api_key" + ], + "columnsTo": [ + "public_api_key" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "routes": { + "name": "routes", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "public_api_key": { + "name": "public_api_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "manifest_hash": { + "name": "manifest_hash", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "route": { + "name": "route", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "symbol": { + "name": "symbol", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_00": { + "name": "timeline_00", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_01": { + "name": "timeline_01", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_02": { + "name": "timeline_02", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_03": { + "name": "timeline_03", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_04": { + "name": "timeline_04", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_05": { + "name": "timeline_05", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_06": { + "name": "timeline_06", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_07": { + "name": "timeline_07", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_08": { + "name": "timeline_08", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_09": { + "name": "timeline_09", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_10": { + "name": "timeline_10", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_11": { + "name": "timeline_11", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_12": { + "name": "timeline_12", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_13": { + "name": "timeline_13", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_14": { + "name": "timeline_14", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_15": { + "name": "timeline_15", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_16": { + "name": "timeline_16", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_17": { + "name": "timeline_17", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_18": { + "name": "timeline_18", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_19": { + "name": "timeline_19", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_20": { + "name": "timeline_20", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_21": { + "name": "timeline_21", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_22": { + "name": "timeline_22", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_23": { + "name": "timeline_23", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_24": { + "name": "timeline_24", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_25": { + "name": "timeline_25", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_26": { + "name": "timeline_26", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_27": { + "name": "timeline_27", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_28": { + "name": "timeline_28", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_29": { + "name": "timeline_29", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_30": { + "name": "timeline_30", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_31": { + "name": "timeline_31", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_32": { + "name": "timeline_32", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_33": { + "name": "timeline_33", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_34": { + "name": "timeline_34", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_35": { + "name": "timeline_35", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_36": { + "name": "timeline_36", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_37": { + "name": "timeline_37", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_38": { + "name": "timeline_38", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_39": { + "name": "timeline_39", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_40": { + "name": "timeline_40", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_41": { + "name": "timeline_41", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_42": { + "name": "timeline_42", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_43": { + "name": "timeline_43", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_44": { + "name": "timeline_44", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_45": { + "name": "timeline_45", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_46": { + "name": "timeline_46", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_47": { + "name": "timeline_47", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_48": { + "name": "timeline_48", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "timeline_49": { + "name": "timeline_49", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "routeIndex_Symbol": { + "name": "routeIndex_Symbol", + "columns": [ + "public_api_key", + "manifest_hash", + "route", + "symbol" + ], + "isUnique": true + }, + "idx_routes_publicApiKey_manifestHash": { + "name": "idx_routes_publicApiKey_manifestHash", + "columns": [ + "public_api_key", + "manifest_hash" + ], + "isUnique": false + } + }, + "foreignKeys": { + "routes_public_api_key_applications_public_api_key_fk": { + "name": "routes_public_api_key_applications_public_api_key_fk", + "tableFrom": "routes", + "tableTo": "applications", + "columnsFrom": [ + "public_api_key" + ], + "columnsTo": [ + "public_api_key" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "symbolDetail": { + "name": "symbolDetail", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "hash": { + "name": "hash", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "public_api_key": { + "name": "public_api_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "manifest_hash": { + "name": "manifest_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "full_name": { + "name": "full_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "origin": { + "name": "origin", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "lo": { + "name": "lo", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "hi": { + "name": "hi", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "idx_symbolDetail_apiKey_manifestHash_hash": { + "name": "idx_symbolDetail_apiKey_manifestHash_hash", + "columns": [ + "public_api_key", + "manifest_hash", + "hash" + ], + "isUnique": true + } + }, + "foreignKeys": { + "symbolDetail_public_api_key_applications_public_api_key_fk": { + "name": "symbolDetail_public_api_key_applications_public_api_key_fk", + "tableFrom": "symbolDetail", + "tableTo": "applications", + "columnsFrom": [ + "public_api_key" + ], + "columnsTo": [ + "public_api_key" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "symbolDetail_public_api_key_manifest_hash_manifests_public_api_key_hash_fk": { + "name": "symbolDetail_public_api_key_manifest_hash_manifests_public_api_key_hash_fk", + "tableFrom": "symbolDetail", + "tableTo": "manifests", + "columnsFrom": [ + "public_api_key", + "manifest_hash" + ], + "columnsTo": [ + "public_api_key", + "hash" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "symbols": { + "name": "symbols", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "public_api_key": { + "name": "public_api_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "pathname": { + "name": "pathname", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "interaction": { + "name": "interaction", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "symbol": { + "name": "symbol", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "prev_symbol": { + "name": "prev_symbol", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "time_delta_ms": { + "name": "time_delta_ms", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "load_delay_ms": { + "name": "load_delay_ms", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "symbols_public_api_key_applications_public_api_key_fk": { + "name": "symbols_public_api_key_applications_public_api_key_fk", + "tableFrom": "symbols", + "tableTo": "applications", + "columnsFrom": [ + "public_api_key" + ], + "columnsTo": [ + "public_api_key" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "userApplicationMap": { + "name": "userApplicationMap", + "columns": { + "application_id": { + "name": "application_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "userApplicationIndex": { + "name": "userApplicationIndex", + "columns": [ + "application_id", + "user_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "userApplicationMap_application_id_applications_id_fk": { + "name": "userApplicationMap_application_id_applications_id_fk", + "tableFrom": "userApplicationMap", + "tableTo": "applications", + "columnsFrom": [ + "application_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "userApplicationMap_user_id_users_user_id_fk": { + "name": "userApplicationMap_user_id_users_user_id_fk", + "tableFrom": "userApplicationMap", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "user_id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "users": { + "name": "users", + "columns": { + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created": { + "name": "created", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "super_user": { + "name": "super_user", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "emailIndex": { + "name": "emailIndex", + "columns": [ + "email" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + } + }, + "views": {}, + "enums": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "internal": { + "indexes": {} + } +} \ No newline at end of file diff --git a/packages/insights/drizzle/meta/_journal.json b/packages/insights/drizzle/meta/_journal.json index 1fb92dd183f..ab1e76b7c06 100644 --- a/packages/insights/drizzle/meta/_journal.json +++ b/packages/insights/drizzle/meta/_journal.json @@ -141,6 +141,13 @@ "when": 1733272274985, "tag": "0019_known_satana", "breakpoints": true + }, + { + "idx": 20, + "version": "6", + "when": 1748218969969, + "tag": "0020_chemical_lyja", + "breakpoints": true } ] } \ No newline at end of file diff --git a/packages/insights/package.json b/packages/insights/package.json index 5d39c6a4744..3a5b619a28d 100644 --- a/packages/insights/package.json +++ b/packages/insights/package.json @@ -3,7 +3,7 @@ "description": "Qwik Insights dashboard", "version": "0.1.0", "dependencies": { - "@auth/qwik": "0.2.2", + "@auth/qwik": "0.7.1", "@libsql/client": "^0.14.0", "@modular-forms/qwik": "^0.23.1", "@typescript/analyze-trace": "^0.10.1", @@ -19,6 +19,7 @@ "@builder.io/vite-plugin-macro": "0.0.7", "@eslint/js": "9.25.1", "@netlify/edge-functions": "2.10.0", + "@qwik-ui/headless": "0.5.0", "@tailwindcss/vite": "4.0.12", "@types/density-clustering": "1.3.3", "@types/node": "20.14.11", diff --git a/packages/insights/src/components/popup-manager/index.tsx b/packages/insights/src/components/popup-manager/index.tsx deleted file mode 100644 index 64d5fb9fe8e..00000000000 --- a/packages/insights/src/components/popup-manager/index.tsx +++ /dev/null @@ -1,93 +0,0 @@ -import { - type Component, - Slot, - component$, - useStore, - useSignal, - $, - type NoSerialize, -} from '@builder.io/qwik'; -import { CloseIcon } from '../icons/close'; - -export const PopupManager = component$(() => { - const popupTarget = useSignal(); - const popup = useStore({ - Component: null as null | NoSerialize>, - props: null as any, - currentTarget: null as null | HTMLElement, - popupTarget: null as null | HTMLElement, - x: 0, - y: 0, - }); - return ( -
{ - const target = e.target; - if (isHTMLElement(target)) { - if (popup.currentTarget?.contains(target) || popupTarget.value?.contains(target)) { - return; - } - target.dispatchEvent( - new CustomEvent('popup', { - bubbles: false, - detail: { - show(component: Component, props: T) { - // TODO: Remove cast once https://github.com/QwikDev/qwik/issues/4794 is fixed - (popup as { Component: any }).Component = component; - popup.props = props; - popup.currentTarget = target; - }, - } satisfies PopupEvent['detail'], - }) - ); - } - }} - document:onMouseLeave$={(e) => { - const target = e.target; - if (isHTMLElement(target)) { - if ( - e.shiftKey || - popup.currentTarget?.contains(target) || - popupTarget.value?.contains(target) || - popupTarget.value?.contains(e.relatedTarget as HTMLElement | null) - ) { - return; - } - popup.currentTarget = null; - } - }} - document:onMouseMove$={(e) => { - if (!e.shiftKey) { - popup.x = e.clientX; - popup.y = e.clientY; - } - }} - > - - {popup.currentTarget && popup.Component ? ( -
- (popup.currentTarget = null))} - class="absolute right-0 m-0" - /> - -
- ) : null} -
- ); -}); - -function isHTMLElement(target: any): target is HTMLElement { - return target && target.nodeType === 1; -} - -export type PopupEvent = CustomEvent<{ - show(component: Component, props: PROPS): void; -}>; diff --git a/packages/insights/src/components/symbol-tile/index.tsx b/packages/insights/src/components/symbol-tile/index.tsx index a4e3c77af15..f927ecc35e2 100644 --- a/packages/insights/src/components/symbol-tile/index.tsx +++ b/packages/insights/src/components/symbol-tile/index.tsx @@ -3,7 +3,7 @@ import { server$, useLocation } from '@builder.io/qwik-city'; import { and, eq } from 'drizzle-orm'; import { getDB, symbolDetailTable } from '~/db'; import { SymbolIcon } from '../icons/symbol'; -import { type PopupEvent } from '../popup-manager'; +import { TooltipWrapper } from '../tooltip'; export const SymbolPopup = component$<{ symbolHash: string }>(({ symbolHash }) => (
@@ -89,10 +89,12 @@ export const SymbolSource = component$<{ symbolHash: string }>(({ symbolHash }) export const SymbolTile = component$<{ symbol: string }>(({ symbol }) => { return ( - e.detail.show(SymbolPopup, { symbolHash: symbol })}> - - {symbol} - + + + + {symbol} + + ); }); diff --git a/packages/insights/src/components/tooltip/index.tsx b/packages/insights/src/components/tooltip/index.tsx new file mode 100644 index 00000000000..206fc79bb3d --- /dev/null +++ b/packages/insights/src/components/tooltip/index.tsx @@ -0,0 +1,24 @@ +import { component$, Slot, type Component } from '@builder.io/qwik'; +import { Tooltip } from '@qwik-ui/headless'; + +interface TooltipWrapperProps { + content: Component; + contentProps?: any; + placement?: 'top' | 'right' | 'bottom' | 'left'; + gutter?: number; +} + +export const TooltipWrapper = component$( + ({ content: ContentComponent, contentProps, placement = 'top', gutter = 8 }) => { + return ( + + + + + + + + + ); + } +); diff --git a/packages/insights/src/db/schema.ts b/packages/insights/src/db/schema.ts index 8120bb74fed..eb59889d2bf 100644 --- a/packages/insights/src/db/schema.ts +++ b/packages/insights/src/db/schema.ts @@ -1,11 +1,11 @@ -import { type InferSelectModel, type InferInsertModel } from 'drizzle-orm'; +import { type InferInsertModel, type InferSelectModel } from 'drizzle-orm'; import { + foreignKey, + index, integer, sqliteTable, text, uniqueIndex, - index, - foreignKey, } from 'drizzle-orm/sqlite-core'; export type DatabaseSchema = { @@ -99,9 +99,10 @@ export const symbolDetailTable = sqliteTable( hi: integer('hi').notNull(), }, (symbolDetailTable) => ({ - apiKeyManifestHashIndex: uniqueIndex('idx_symbolDetail_apiKey_manifestHash').on( + apiKeyManifestHashIndex: uniqueIndex('idx_symbolDetail_apiKey_manifestHash_hash').on( symbolDetailTable.publicApiKey, - symbolDetailTable.manifestHash + symbolDetailTable.manifestHash, + symbolDetailTable.hash ), publicApiKeyReference: foreignKey({ columns: [symbolDetailTable.publicApiKey], diff --git a/packages/insights/src/routes/api/v1/[publicApiKey]/post/index.tsx b/packages/insights/src/routes/api/v1/[publicApiKey]/post/index.tsx index 7137ad70735..4abe307e799 100644 --- a/packages/insights/src/routes/api/v1/[publicApiKey]/post/index.tsx +++ b/packages/insights/src/routes/api/v1/[publicApiKey]/post/index.tsx @@ -19,9 +19,9 @@ export const onPost: RequestHandler = async ({ exit, json, request, params }) => const db = getDB(); let previousSymbol = payload.previousSymbol; const { publicApiKey, manifestHash } = payload; - await dbGetManifestInfo(db, publicApiKey, manifestHash); if (publicApiKey && publicApiKey.length > 4) { await getAppInfo(db, publicApiKey, { autoCreate: true }); + await dbGetManifestInfo(db, publicApiKey, manifestHash); for (const event of payload.symbols) { const symbolHash = cleanupSymbolName(event.symbol); if (symbolHash) { diff --git a/packages/insights/src/routes/api/v1/[publicApiKey]/post/manifest/index.tsx b/packages/insights/src/routes/api/v1/[publicApiKey]/post/manifest/index.tsx index 47a6093914b..7703a36809d 100644 --- a/packages/insights/src/routes/api/v1/[publicApiKey]/post/manifest/index.tsx +++ b/packages/insights/src/routes/api/v1/[publicApiKey]/post/manifest/index.tsx @@ -10,6 +10,11 @@ export const onPost: RequestHandler = async ({ exit, json, request, params }) => try { const qManifest = QManifest.parse(await request.json()); const manifestHash = qManifest.manifestHash; + + console.log( + `Processing manifest ${manifestHash} for API key ${publicApiKey} with ${Object.keys(qManifest.symbols).length} symbols` + ); + exit(); const db = getDB(); await dbGetManifestInfo(db, publicApiKey, manifestHash); @@ -24,9 +29,16 @@ export const onPost: RequestHandler = async ({ exit, json, request, params }) => ) .limit(1000) .all(); + + console.log(`Found ${existing.length} existing symbols for manifest ${manifestHash}`); + const existingMap = new Map(); existing.forEach((row) => existingMap.set(row.hash, row)); const promises: Promise[] = []; + + let insertCount = 0; + let updateCount = 0; + for (const symbol of Object.values(qManifest.symbols)) { const existing = existingMap.get(symbol.hash); const lo = symbol.loc[0]; @@ -38,6 +50,7 @@ export const onPost: RequestHandler = async ({ exit, json, request, params }) => existing.lo !== lo || existing.hi !== hi ) { + updateCount++; promises.push( db .update(symbolDetailTable) @@ -49,9 +62,14 @@ export const onPost: RequestHandler = async ({ exit, json, request, params }) => }) .where(eq(symbolDetailTable.id, existing.id)) .run() + .catch((error) => { + console.error(`Failed to update symbol ${symbol.hash}:`, error); + throw error; + }) ); } } else { + insertCount++; promises.push( db .insert(symbolDetailTable) @@ -65,6 +83,20 @@ export const onPost: RequestHandler = async ({ exit, json, request, params }) => hi, }) .run() + .catch((error) => { + console.error( + `Failed to insert symbol ${symbol.hash} for manifest ${manifestHash}:`, + { + error: error.message, + symbol: { + hash: symbol.hash, + displayName: symbol.displayName, + origin: symbol.origin, + }, + } + ); + throw error; + }) ); } if (promises.length > 10) { @@ -73,9 +105,17 @@ export const onPost: RequestHandler = async ({ exit, json, request, params }) => } } await Promise.all(promises); + + console.log( + `Successfully processed manifest ${manifestHash}: ${insertCount} inserts, ${updateCount} updates` + ); json(200, { code: 200, message: 'OK' }); } catch (e) { - console.error(JSON.stringify(e)); + console.error(`Error processing manifest for API key ${publicApiKey}:`, { + error: e instanceof Error ? e.message : String(e), + stack: e instanceof Error ? e.stack : undefined, + publicApiKey, + }); json(500, { code: 500, message: 'Internal Server Error', error: e }); } }; diff --git a/packages/insights/src/routes/app/[publicApiKey]/errors/index.tsx b/packages/insights/src/routes/app/[publicApiKey]/errors/index.tsx index 9c1123546a7..b6e1995cd99 100644 --- a/packages/insights/src/routes/app/[publicApiKey]/errors/index.tsx +++ b/packages/insights/src/routes/app/[publicApiKey]/errors/index.tsx @@ -1,9 +1,9 @@ -import { type ReadonlySignal, component$ } from '@builder.io/qwik'; +import { component$, type ReadonlySignal } from '@builder.io/qwik'; import { routeLoader$ } from '@builder.io/qwik-city'; -import { getDB, errorTable, type ErrorRow } from '~/db'; import { eq, sql } from 'drizzle-orm'; import { ErrorIcon } from '~/components/icons/error'; -import { type PopupEvent } from '~/components/popup-manager'; +import { TooltipWrapper } from '~/components/tooltip'; +import { errorTable, getDB, type ErrorRow } from '~/db'; export const useErrors = routeLoader$(async ({ params }) => { const db = getDB(); @@ -41,23 +41,21 @@ export default component$(() => { {errors.value.map((error) => ( - e.detail.show(Popup, error)} - class="border-b border-slate-200 text-xs" - > - - {new Date(error.timestamp).toLocaleString()} - - - - {error.url} - - - - {error.message} - - + + + + {new Date(error.timestamp).toLocaleString()} + + + + {error.url} + + + + {error.message} + + + ))} diff --git a/packages/insights/src/routes/layout.tsx b/packages/insights/src/routes/layout.tsx index e906b75dc85..8b29e7fbd80 100644 --- a/packages/insights/src/routes/layout.tsx +++ b/packages/insights/src/routes/layout.tsx @@ -1,8 +1,7 @@ import { Slot, component$ } from '@builder.io/qwik'; -import { PopupManager } from '~/components/popup-manager'; -import { routeLoader$ } from '@builder.io/qwik-city'; import type { GetSessionResult } from '@auth/qwik'; +import { routeLoader$ } from '@builder.io/qwik-city'; export type SessionData = Awaited['data']; @@ -16,9 +15,5 @@ export const useUserSession = routeLoader$(({ sharedMap, redirect, url }) => { }); export default component$(() => { - return ( - - - - ); + return ; }); diff --git a/packages/qwik/src/optimizer/src/plugins/plugin.ts b/packages/qwik/src/optimizer/src/plugins/plugin.ts index 1d29cbc6344..bfb0e3ce0fd 100644 --- a/packages/qwik/src/optimizer/src/plugins/plugin.ts +++ b/packages/qwik/src/optimizer/src/plugins/plugin.ts @@ -1,5 +1,7 @@ /* eslint-disable no-console */ -import type { Rollup, Plugin, ViteDevServer, HmrContext } from 'vite'; +import type { LoadResult, OutputBundle, ResolveIdResult, TransformResult } from 'rollup'; +import type { HmrContext, Plugin, Rollup, ViteDevServer } from 'vite'; +import type { BundleGraphAdder } from '..'; import { hashCode } from '../../../core/util/hash_code'; import { generateManifestFromBundles, getValidManifest } from '../manifest'; import { createOptimizer } from '../optimizer'; @@ -7,23 +9,22 @@ import type { Diagnostic, EntryStrategy, GlobalInjections, - SegmentAnalysis, Optimizer, OptimizerOptions, OptimizerSystem, QwikManifest, + SegmentAnalysis, + ServerQwikManifest, + SmartEntryStrategy, TransformModule, TransformModuleInput, TransformModulesOptions, TransformOutput, - SmartEntryStrategy, - ServerQwikManifest, } from '../types'; +import { versions } from '../versions'; +import { convertManifestToBundleGraph } from './bundle-graph'; import { createLinter, type QwikLinter } from './eslint-plugin'; -import type { LoadResult, OutputBundle, ResolveIdResult, TransformResult } from 'rollup'; import { isWin, parseId } from './vite-utils'; -import type { BundleGraphAdder } from '..'; -import { convertManifestToBundleGraph } from './bundle-graph'; const REG_CTX_NAME = ['server']; @@ -939,6 +940,7 @@ export const manifest = ${JSON.stringify(serverManifest)};\n`; manifest.platform = { ...manifestExtra?.platform, + qwik: versions.qwik, rollup: ctx.meta?.rollupVersion || '', env: optimizer.sys.env, os: optimizer.sys.os, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d6012fd913b..35eae65751a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -451,8 +451,8 @@ importers: packages/insights: dependencies: '@auth/qwik': - specifier: 0.2.2 - version: 0.2.2 + specifier: 0.7.1 + version: 0.7.1 '@libsql/client': specifier: ^0.14.0 version: 0.14.0 @@ -493,6 +493,9 @@ importers: '@netlify/edge-functions': specifier: 2.10.0 version: 2.10.0 + '@qwik-ui/headless': + specifier: 0.5.0 + version: 0.5.0(@builder.io/qwik@packages+qwik) '@tailwindcss/vite': specifier: 4.0.12 version: 4.0.12(vite@5.3.5(@types/node@20.14.11)(lightningcss@1.30.1)(terser@5.31.3)) @@ -897,8 +900,8 @@ packages: nodemailer: optional: true - '@auth/core@0.34.1': - resolution: {integrity: sha512-tuYU2VIbI8rFbkSwP710LmybB2FXJsPN7j3sjRVfN9SXVQBK2ej6LdewQaofpBGp4Mk+cC2UeiGNH0or4tgaeA==} + '@auth/core@0.39.1': + resolution: {integrity: sha512-McD8slui0oOA1pjR5sPjLPl5Zm//nLP/8T3kr8hxIsvNLvsiudYvPHhDFPjh1KcZ2nFxCkZmP6bRxaaPd/AnLA==} peerDependencies: '@simplewebauthn/browser': ^9.0.1 '@simplewebauthn/server': ^9.0.2 @@ -911,8 +914,8 @@ packages: nodemailer: optional: true - '@auth/qwik@0.2.2': - resolution: {integrity: sha512-H8ke+7Y1unvciFQ62zGiWS12KB6JgU2HOkG0usxL19B1PJ1j6ShZJsEONuih8XD7qCqR1N5E75h4auoldYuaiQ==} + '@auth/qwik@0.7.1': + resolution: {integrity: sha512-lzzvNsFLKFv9rfdJ82PHMpvs7CitQVoDh8/+yx43U6MQi8zMvpdQw8yjZGmsmNmEDL0IyYZ680RCKvqR/UEeJw==} engines: {node: '>=18.17'} '@azure/functions@3.5.1': @@ -6883,6 +6886,9 @@ packages: jose@5.10.0: resolution: {integrity: sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==} + jose@6.0.11: + resolution: {integrity: sha512-QxG7EaliDARm1O1S8BGakqncGT9s25bKL1WSf6/oa17Tkqwi8D2ZNglqCF+DsYF88/rV66Q/Q2mFAy697E1DUg==} + js-base64@3.7.7: resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==} @@ -7878,6 +7884,9 @@ packages: oauth4webapi@2.17.0: resolution: {integrity: sha512-lbC0Z7uzAFNFyzEYRIC+pkSVvDHJTbEW+dYlSBAlCYDe6RxUkJ26bClhk8ocBZip1wfI9uKTe0fm4Ib4RHn6uQ==} + oauth4webapi@3.5.1: + resolution: {integrity: sha512-txg/jZQwcbaF7PMJgY7aoxc9QuCxHVFMiEkDIJ60DwDz3PbtXPQnrzo+3X4IRYGChIwWLabRBRpf1k9hO9+xrQ==} + object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -8304,9 +8313,17 @@ packages: peerDependencies: preact: '>=10' + preact-render-to-string@6.5.11: + resolution: {integrity: sha512-ubnauqoGczeGISiOh6RjX0/cdaF8v/oDXIjO85XALCQjwQP+SB4RDXXtvZ6yTYSjG+PC1QRP2AhPgCEsM2EvUw==} + peerDependencies: + preact: '>=10' + preact@10.11.3: resolution: {integrity: sha512-eY93IVpod/zG3uMF22Unl8h9KkrcKIRs2EGar8hwLZZDU1lkjph303V9HZBwufh2s736U6VXuhD109LYqPoffg==} + preact@10.24.3: + resolution: {integrity: sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA==} + prebuild-install@7.1.3: resolution: {integrity: sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==} engines: {node: '>=10'} @@ -10413,19 +10430,17 @@ snapshots: preact: 10.11.3 preact-render-to-string: 5.2.3(preact@10.11.3) - '@auth/core@0.34.1': + '@auth/core@0.39.1': dependencies: '@panva/hkdf': 1.2.1 - '@types/cookie': 0.6.0 - cookie: 0.6.0 - jose: 5.10.0 - oauth4webapi: 2.17.0 - preact: 10.11.3 - preact-render-to-string: 5.2.3(preact@10.11.3) + jose: 6.0.11 + oauth4webapi: 3.5.1 + preact: 10.24.3 + preact-render-to-string: 6.5.11(preact@10.24.3) - '@auth/qwik@0.2.2': + '@auth/qwik@0.7.1': dependencies: - '@auth/core': 0.34.1 + '@auth/core': 0.39.1 set-cookie-parser: 2.6.0 transitivePeerDependencies: - '@simplewebauthn/browser' @@ -16793,6 +16808,8 @@ snapshots: jose@5.10.0: {} + jose@6.0.11: {} + js-base64@3.7.7: {} js-string-escape@1.0.1: {} @@ -18226,6 +18243,8 @@ snapshots: oauth4webapi@2.17.0: {} + oauth4webapi@3.5.1: {} + object-assign@4.1.1: {} object-inspect@1.13.4: {} @@ -18669,8 +18688,14 @@ snapshots: preact: 10.11.3 pretty-format: 3.8.0 + preact-render-to-string@6.5.11(preact@10.24.3): + dependencies: + preact: 10.24.3 + preact@10.11.3: {} + preact@10.24.3: {} + prebuild-install@7.1.3: dependencies: detect-libc: 2.0.4