@mushi-mushi/core 1.40.0 → 1.41.0
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/README.md +1 -1
- package/dist/diagnostics.d.cts +2 -1
- package/dist/diagnostics.d.ts +2 -1
- package/dist/index.cjs +12 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +12 -28
- package/dist/index.js.map +1 -1
- package/dist/reporter-channels.d.cts +1 -1
- package/dist/reporter-channels.d.ts +1 -1
- package/dist/reporter-ui.d.cts +2 -1
- package/dist/reporter-ui.d.ts +2 -1
- package/dist/{types-GBfop58j.d.cts → types-FrXu2B7i.d.cts} +21 -1
- package/dist/{types-GBfop58j.d.ts → types-FrXu2B7i.d.ts} +21 -1
- package/package.json +7 -7
package/README.md
CHANGED
package/dist/diagnostics.d.cts
CHANGED
|
@@ -26,4 +26,5 @@ declare function collectDiagnostics(provider: MushiDiagnosticsProvider | null |
|
|
|
26
26
|
scrub?: (s: string) => string;
|
|
27
27
|
}): Promise<DiagnosticsValue | null>;
|
|
28
28
|
|
|
29
|
-
export { DIAGNOSTICS_MAX_CHARS,
|
|
29
|
+
export { DIAGNOSTICS_MAX_CHARS, collectDiagnostics };
|
|
30
|
+
export type { MushiDiagnosticsProvider };
|
package/dist/diagnostics.d.ts
CHANGED
|
@@ -26,4 +26,5 @@ declare function collectDiagnostics(provider: MushiDiagnosticsProvider | null |
|
|
|
26
26
|
scrub?: (s: string) => string;
|
|
27
27
|
}): Promise<DiagnosticsValue | null>;
|
|
28
28
|
|
|
29
|
-
export { DIAGNOSTICS_MAX_CHARS,
|
|
29
|
+
export { DIAGNOSTICS_MAX_CHARS, collectDiagnostics };
|
|
30
|
+
export type { MushiDiagnosticsProvider };
|
package/dist/index.cjs
CHANGED
|
@@ -283,7 +283,7 @@ function createApiClient(options) {
|
|
|
283
283
|
const errorBody = await response.json().catch(() => ({}));
|
|
284
284
|
if ((response.status === 401 || response.status === 403) && !_credWarningEmitted) {
|
|
285
285
|
_credWarningEmitted = true;
|
|
286
|
-
const where = baseUrl === DEFAULT_API_ENDPOINT ? "Get the correct values at: https://kensaur.us/
|
|
286
|
+
const where = baseUrl === DEFAULT_API_ENDPOINT ? "Get the correct values at: https://mushi.kensaur.us/projects" : "Get the correct values from your Mushi console's Projects page.";
|
|
287
287
|
console.error(
|
|
288
288
|
`[Mushi] Credentials rejected (HTTP ${response.status}). Check your Project ID and API key scope (must be "report:write"). ` + where
|
|
289
289
|
);
|
|
@@ -3156,28 +3156,6 @@ function parseIdentityToken(token) {
|
|
|
3156
3156
|
}
|
|
3157
3157
|
|
|
3158
3158
|
// src/favicon.ts
|
|
3159
|
-
var MULTI_TENANT_PARENT_HOSTS = /* @__PURE__ */ new Set(["kensaur.us", "www.kensaur.us"]);
|
|
3160
|
-
var SLUG_DOMAIN_HINTS = {
|
|
3161
|
-
"glot-it": "glot.it",
|
|
3162
|
-
glotit: "glot.it",
|
|
3163
|
-
"solo-boss-cloud": "solo-boss.kensaur.us",
|
|
3164
|
-
"mushi-mushi": "kensaur.us",
|
|
3165
|
-
"how-to-talk-to-girls": "talk.kensaur.us",
|
|
3166
|
-
htttg: "talk.kensaur.us",
|
|
3167
|
-
tsumagoi: "tsumagoi.kensaur.us"
|
|
3168
|
-
};
|
|
3169
|
-
var SLUG_ICON_URL_HINTS = {
|
|
3170
|
-
"mushi-mushi": "https://kensaur.us/mushi-mushi/admin/favicon.svg",
|
|
3171
|
-
"solo-boss-cloud": "https://solo-boss.kensaur.us/favicon.svg",
|
|
3172
|
-
"glot-it": "https://kensaur.us/glot-it/apple-touch-icon.png",
|
|
3173
|
-
glotit: "https://kensaur.us/glot-it/apple-touch-icon.png",
|
|
3174
|
-
"the-wanting-mind": "https://kensaur.us/the-wanting-mind/pwa-512x512.png",
|
|
3175
|
-
"how-to-talk-to-girls": "https://talk.kensaur.us/pwa-192.png",
|
|
3176
|
-
htttg: "https://talk.kensaur.us/pwa-192.png",
|
|
3177
|
-
tsumagoi: "https://tsumagoi.kensaur.us/apple-touch-icon.png",
|
|
3178
|
-
"help-her-take-photo": "https://kensaur.us/help-her-take-photo/assets/apple-touch-icon.png",
|
|
3179
|
-
"yen-yen": "https://kensaur.us/yen-yen/icon.svg"
|
|
3180
|
-
};
|
|
3181
3159
|
var UNTRUSTED_FAVICON_HOSTS = [
|
|
3182
3160
|
"www.google.com",
|
|
3183
3161
|
"icons.duckduckgo.com",
|
|
@@ -3207,9 +3185,9 @@ function resolveProjectFaviconDomains(source) {
|
|
|
3207
3185
|
out.push(n);
|
|
3208
3186
|
};
|
|
3209
3187
|
add(githubRepoDomainHint(source.repo_url));
|
|
3210
|
-
|
|
3211
|
-
const
|
|
3212
|
-
if (fromOrigin && !
|
|
3188
|
+
const fromOrigin = source.sdk_origin && !mountedUnderPath(source.sdk_origin) ? originToDomain(source.sdk_origin) : null;
|
|
3189
|
+
const shared = new Set((source.shared_hosts ?? []).map((h) => h.trim().toLowerCase()).filter(Boolean));
|
|
3190
|
+
if (fromOrigin && !shared.has(fromOrigin) && !shared.has(fromOrigin.replace(/^www\./, ""))) {
|
|
3213
3191
|
add(fromOrigin);
|
|
3214
3192
|
}
|
|
3215
3193
|
return out;
|
|
@@ -3223,8 +3201,6 @@ function projectFaviconUrlCandidates(source, size = 32) {
|
|
|
3223
3201
|
seen.add(url);
|
|
3224
3202
|
urls.push(url);
|
|
3225
3203
|
};
|
|
3226
|
-
const slugHint = SLUG_ICON_URL_HINTS[source.project_slug.toLowerCase()];
|
|
3227
|
-
if (slugHint) push(slugHint);
|
|
3228
3204
|
for (const domain of resolveProjectFaviconDomains(source)) {
|
|
3229
3205
|
for (const url of faviconUrlCandidates(domain, size)) {
|
|
3230
3206
|
push(url);
|
|
@@ -3232,6 +3208,14 @@ function projectFaviconUrlCandidates(source, size = 32) {
|
|
|
3232
3208
|
}
|
|
3233
3209
|
return urls;
|
|
3234
3210
|
}
|
|
3211
|
+
function mountedUnderPath(origin) {
|
|
3212
|
+
try {
|
|
3213
|
+
const url = new URL(origin.includes("://") ? origin : `https://${origin}`);
|
|
3214
|
+
return url.pathname.replace(/\/+$/, "") !== "";
|
|
3215
|
+
} catch {
|
|
3216
|
+
return false;
|
|
3217
|
+
}
|
|
3218
|
+
}
|
|
3235
3219
|
function originToDomain(origin) {
|
|
3236
3220
|
const trimmed = origin.trim();
|
|
3237
3221
|
if (!trimmed) return null;
|