@jbrowse/plugin-blat 5.0.0-beta.7 → 5.0.0-beta.9
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined
|
|
1
|
+
export declare const configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined, undefined, import("@jbrowse/core/configuration").ConfigurationSchemaRequirement<Partial<Record<string, string[]>>, string>>>;
|
package/esm/blatQuery.js
CHANGED
|
@@ -172,17 +172,21 @@ export function buildBlatBody({ db, seq, apiKey, }) {
|
|
|
172
172
|
export class BlatChallengeError extends Error {
|
|
173
173
|
name = 'BlatChallengeError';
|
|
174
174
|
}
|
|
175
|
-
// Markers on a Cloudflare Turnstile challenge page. Every marker has to
|
|
176
|
-
//
|
|
177
|
-
// matches an ordinary UCSC page, whose
|
|
178
|
-
// FAQdownloads.html#CAPTCHA and
|
|
179
|
-
//
|
|
180
|
-
//
|
|
175
|
+
// Markers on a Cloudflare Turnstile challenge page. Every marker has to name
|
|
176
|
+
// the widget being MOUNTED, never a page that merely mentions it: a bare `cf-`,
|
|
177
|
+
// `captcha` or `challenge` matches an ordinary UCSC page, whose nav links to
|
|
178
|
+
// FAQdownloads.html#CAPTCHA, and a bare `turnstile` matches one too, because
|
|
179
|
+
// UCSC's Content-Security-Policy whitelists
|
|
180
|
+
// `challenges.cloudflare.com/turnstile/v0/api.js` on every page it serves —
|
|
181
|
+
// including the honest "No matches" that hgPcr answers a primer pair with.
|
|
182
|
+
// Each of those words in turn sent a user off to solve a CAPTCHA that was not
|
|
183
|
+
// there. `turnstile.render(` is the call that puts one on screen, and the
|
|
184
|
+
// challenge page is the only page that makes it.
|
|
181
185
|
//
|
|
182
186
|
// Duplicated in `products/aws/blat-proxy/src/routes.ts`, which decides the same thing
|
|
183
187
|
// about the same pages server-side. The proxy is a standalone package and cannot
|
|
184
188
|
// import this one, so the copies are deliberate: narrow one and narrow both.
|
|
185
|
-
const CHALLENGE_MARKERS = /turnstile|cf[-_]chl/i;
|
|
189
|
+
const CHALLENGE_MARKERS = /turnstile\s*\.\s*render|cf[-_](?:chl|turnstile)/i;
|
|
186
190
|
export function isChallengePage(text) {
|
|
187
191
|
return CHALLENGE_MARKERS.test(text);
|
|
188
192
|
}
|
package/esm/ucscShared.js
CHANGED
|
@@ -11,12 +11,14 @@ function isNavigableView(view) {
|
|
|
11
11
|
// jb2hubs stamps the UCSC db on the assembly's sequence.metadata. Its presence
|
|
12
12
|
// is also the one positive proof that UCSC can search the assembly, so the
|
|
13
13
|
// dialogs read it directly to decide whether to warn.
|
|
14
|
+
// Annotated rather than inferred: the path runs past `metadata`, a `frozen`
|
|
15
|
+
// slot, so the read is into arbitrary JSON and the path type stops deriving
|
|
16
|
+
// anything at that segment.
|
|
14
17
|
export function ucscDbStamp(session, name) {
|
|
15
18
|
const assembly = session.assemblyManager.get(name);
|
|
16
|
-
|
|
19
|
+
return assembly
|
|
17
20
|
? getConf(assembly, ['sequence', 'metadata', 'blatDb'])
|
|
18
21
|
: undefined;
|
|
19
|
-
return stamped;
|
|
20
22
|
}
|
|
21
23
|
// Prefers the stamp, falling back to the static alias map for assemblies whose
|
|
22
24
|
// configs predate it. Shared by the BLAT and in-silico PCR dialogs.
|
|
@@ -107,12 +109,12 @@ export async function addResultTrack({ session, assembly, features, trackIdPrefi
|
|
|
107
109
|
// a drawer — an embedded component may be built without one — so the guard is
|
|
108
110
|
// not optional.
|
|
109
111
|
if (isSessionModelWithWidgets(session)) {
|
|
110
|
-
session.
|
|
112
|
+
session.openWidget('UcscResultsWidget', 'ucscResults', {
|
|
111
113
|
features,
|
|
112
114
|
assembly,
|
|
113
115
|
trackName,
|
|
114
116
|
resultNoun,
|
|
115
|
-
})
|
|
117
|
+
});
|
|
116
118
|
}
|
|
117
119
|
// #endregion
|
|
118
120
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-blat",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "JBrowse 2 UCSC BLAT client",
|
|
6
6
|
"keywords": [
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"esbuild": "^0.28.2"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@jbrowse/mobx-state-tree": "^6.5.
|
|
27
|
+
"@jbrowse/mobx-state-tree": "^6.5.2",
|
|
28
28
|
"@mui/icons-material": "^9.4.0",
|
|
29
29
|
"@mui/material": "^9.4.0",
|
|
30
30
|
"mobx": "^7.0.3",
|
|
31
31
|
"mobx-react": "^10.0.2",
|
|
32
|
-
"@jbrowse/core": "^5.0.0-beta.
|
|
32
|
+
"@jbrowse/core": "^5.0.0-beta.9"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": ">=19.0.0"
|