@canmi/web 2026.1005.6 → 2026.1005.8
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/sentry/src/feedback.worker.d.ts +8 -0
- package/dist/sentry/src/feedback.worker.js +11 -0
- package/dist/sentry/src/report.d.ts +10 -0
- package/dist/sentry/src/report.js +17 -0
- package/dist/sentry/src/report.worker.d.ts +8 -0
- package/dist/sentry/src/report.worker.js +9 -0
- package/package.json +9 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region sentry/src/feedback.worker.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* `openReport` on a Worker, which has no dialog to open: what `workerd` resolves
|
|
4
|
+
* `@canmi/web/sentry/feedback` to, since `@sentry/sveltekit` has no `getFeedback` there. See
|
|
5
|
+
* spec/web/sentry.md.
|
|
6
|
+
*/
|
|
7
|
+
export declare function openReport(): Promise<boolean>;
|
|
8
|
+
//#endregion
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region sentry/src/feedback.worker.ts
|
|
2
|
+
/**
|
|
3
|
+
* `openReport` on a Worker, which has no dialog to open: what `workerd` resolves
|
|
4
|
+
* `@canmi/web/sentry/feedback` to, since `@sentry/sveltekit` has no `getFeedback` there. See
|
|
5
|
+
* spec/web/sentry.md.
|
|
6
|
+
*/
|
|
7
|
+
async function openReport() {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { openReport };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region sentry/src/report.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* What a "report a problem" control calls: Sentry's dialog when it opens, and the reader's mail
|
|
4
|
+
* client at `mailto` when it does not -- no client, a dialog that fails, or the dialog's own chunk
|
|
5
|
+
* not loading, as for a tab opened before a deploy. Imports nothing of Sentry itself, so a page
|
|
6
|
+
* may import this at the top and on the server; the dialog is fetched on the press. See
|
|
7
|
+
* spec/web/sentry.md.
|
|
8
|
+
*/
|
|
9
|
+
export declare function report(mailto: string): Promise<void>;
|
|
10
|
+
//#endregion
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region sentry/src/report.ts
|
|
2
|
+
/**
|
|
3
|
+
* What a "report a problem" control calls: Sentry's dialog when it opens, and the reader's mail
|
|
4
|
+
* client at `mailto` when it does not -- no client, a dialog that fails, or the dialog's own chunk
|
|
5
|
+
* not loading, as for a tab opened before a deploy. Imports nothing of Sentry itself, so a page
|
|
6
|
+
* may import this at the top and on the server; the dialog is fetched on the press. See
|
|
7
|
+
* spec/web/sentry.md.
|
|
8
|
+
*/
|
|
9
|
+
async function report(mailto) {
|
|
10
|
+
try {
|
|
11
|
+
const { openReport } = await import("./feedback.js");
|
|
12
|
+
if (await openReport()) return;
|
|
13
|
+
} catch {}
|
|
14
|
+
window.location.href = mailto;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { report };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region sentry/src/report.worker.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* `report` on a Worker, where nothing presses a control: what `workerd` resolves
|
|
4
|
+
* `@canmi/web/sentry/report` to, so a Worker's bundle never reaches the dialog, whose imports
|
|
5
|
+
* `@sentry/sveltekit` does not have there. See spec/web/sentry.md.
|
|
6
|
+
*/
|
|
7
|
+
export declare function report(_mailto: string): Promise<void>;
|
|
8
|
+
//#endregion
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region sentry/src/report.worker.ts
|
|
2
|
+
/**
|
|
3
|
+
* `report` on a Worker, where nothing presses a control: what `workerd` resolves
|
|
4
|
+
* `@canmi/web/sentry/report` to, so a Worker's bundle never reaches the dialog, whose imports
|
|
5
|
+
* `@sentry/sveltekit` does not have there. See spec/web/sentry.md.
|
|
6
|
+
*/
|
|
7
|
+
async function report(_mailto) {}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { report };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canmi/web",
|
|
3
|
-
"version": "2026.1005.
|
|
3
|
+
"version": "2026.1005.8",
|
|
4
4
|
"description": "SvelteKit compat, referer and Sentry.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"browserslist",
|
|
@@ -42,8 +42,16 @@
|
|
|
42
42
|
},
|
|
43
43
|
"./sentry/feedback": {
|
|
44
44
|
"types": "./dist/sentry/src/feedback.d.ts",
|
|
45
|
+
"workerd": "./dist/sentry/src/feedback.worker.js",
|
|
46
|
+
"worker": "./dist/sentry/src/feedback.worker.js",
|
|
45
47
|
"default": "./dist/sentry/src/feedback.js"
|
|
46
48
|
},
|
|
49
|
+
"./sentry/report": {
|
|
50
|
+
"types": "./dist/sentry/src/report.d.ts",
|
|
51
|
+
"workerd": "./dist/sentry/src/report.worker.js",
|
|
52
|
+
"worker": "./dist/sentry/src/report.worker.js",
|
|
53
|
+
"default": "./dist/sentry/src/report.js"
|
|
54
|
+
},
|
|
47
55
|
"./sentry/server": {
|
|
48
56
|
"types": "./dist/sentry/src/server.d.ts",
|
|
49
57
|
"default": "./dist/sentry/src/server.js"
|