mnfst 0.5.272 → 0.5.273
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.
|
@@ -205,6 +205,13 @@ function escapeForSingleQuotedJsString(s) {
|
|
|
205
205
|
// Framework web components (not project components) — never fetched.
|
|
206
206
|
const FRAMEWORK_COMPONENT_TAGS = new Set(['code', 'code-group']);
|
|
207
207
|
|
|
208
|
+
// Classic JS or module; anything else (JSON, templates) is a data block
|
|
209
|
+
function isExecutableScript(el) {
|
|
210
|
+
const type = (el.getAttribute('type') || '').split(';')[0].trim().toLowerCase();
|
|
211
|
+
return type === '' || type === 'module' || /^(text|application)\/(x-)?(javascript|ecmascript)$/.test(type) ||
|
|
212
|
+
/^text\/(javascript1\.[0-5]|jscript|livescript)$/.test(type);
|
|
213
|
+
}
|
|
214
|
+
|
|
208
215
|
// The <template x-if>/<template x-for> whose tracked clone is `el`, if any.
|
|
209
216
|
function findOwningTemplate(el) {
|
|
210
217
|
if (!el._x_dataStack) return null;
|
|
@@ -289,6 +296,8 @@ window.ManifestComponentsProcessor = {
|
|
|
289
296
|
const scripts = [];
|
|
290
297
|
const processScripts = (el) => {
|
|
291
298
|
if (el.tagName.toLowerCase() === 'script') {
|
|
299
|
+
// Data blocks (JSON, templates) are dropped, never run
|
|
300
|
+
if (!isExecutableScript(el)) { el.remove(); return; }
|
|
292
301
|
scripts.push({
|
|
293
302
|
content: el.textContent,
|
|
294
303
|
type: el.getAttribute('type') || 'text/javascript',
|
|
@@ -575,6 +584,15 @@ window.ManifestComponentsProcessor = {
|
|
|
575
584
|
if (script.async) scriptEl.async = true;
|
|
576
585
|
if (script.defer) scriptEl.defer = true;
|
|
577
586
|
document.head.appendChild(scriptEl);
|
|
587
|
+
} else if (script.content && script.type.trim().toLowerCase() === 'module') {
|
|
588
|
+
// Once per page, like an external module
|
|
589
|
+
const seen = Array.from(document.head.querySelectorAll('script[data-component-module]'));
|
|
590
|
+
if (seen.some(s => s.textContent === script.content)) return;
|
|
591
|
+
const scriptEl = document.createElement('script');
|
|
592
|
+
scriptEl.setAttribute('data-component-module', name);
|
|
593
|
+
scriptEl.type = 'module';
|
|
594
|
+
scriptEl.textContent = script.content;
|
|
595
|
+
document.head.appendChild(scriptEl);
|
|
578
596
|
} else if (script.content) {
|
|
579
597
|
// Inline script → run in global scope
|
|
580
598
|
try {
|
package/lib/manifest.data.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest.appwrite.auth.js": "sha384-gWLSeVPqCLMiUZB8MU7GqMg3x2yULFUsp8nTTZrPp/9Dlkix42rBn9yIimvwrHqZ",
|
|
3
|
-
"manifest.appwrite.data.js": "sha384-
|
|
3
|
+
"manifest.appwrite.data.js": "sha384-42+RFwO3akEoogPnpUFNOeXgDGztU1Kmk/WAag6yJrdjOFIXRZcEGqy9DToHqssG",
|
|
4
4
|
"manifest.appwrite.presences.js": "sha384-LINPhIPTCK+rA8zd+HPUzMSEgH6Sl2vQMEyItT97bnEE2FYGYKqjXX+CWdt6nl9z",
|
|
5
5
|
"manifest.bindings.js": "sha384-lPtMf8Ykaic9gNVZKq8Scia1881ZeMAyxer3WCIkUNwwrgzGBWto1OXADUwjvORF",
|
|
6
6
|
"manifest.charts.js": "sha384-AFbP7mQnigy7DU1s+YE30yKTeQAKfgNazhbfSNbfd9ZpLgeulZKaPi/fAq3gJHDO",
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"manifest.color.js": "sha384-6Rv3LxyTcZNjrhtayQfqRdCx0uSZ4BiEbgEI98I62eTvp8Aw7LBIoNJ0Je1oktwL",
|
|
10
10
|
"manifest.colorpicker.js": "sha384-P+Zx0QzhMGfku8s3yEskTte4/iXCGVX3zdhu42IGNfFcSmhOW+nqVK7w+uczWRGY",
|
|
11
11
|
"manifest.combobox.js": "sha384-/lJo6vaxKjgnBSRs/dzkhK1dzGk3GBw8FISoNJZB70mwAVwu1k5veZyBXjOb4keS",
|
|
12
|
-
"manifest.components.js": "sha384-
|
|
12
|
+
"manifest.components.js": "sha384-1el5WMdgmzu/2ocaYN21OjLi/lfjllvA8aju1J3knYuOizw+XFfJU1+rvGqYW7qk",
|
|
13
13
|
"manifest.computed.js": "sha384-GYML/e81gQfN+iDbqhPUgny8bINCyL+SrbTofoGk4hlCnLLjv51mCv42JMqq+ku5",
|
|
14
|
-
"manifest.data.js": "sha384-
|
|
14
|
+
"manifest.data.js": "sha384-OtzsgGwSGzMkj9of9mCLKC9ZbLjIdDV8Q4nUcWTHJADTbWh69nI2HfEQScK0CUN1",
|
|
15
15
|
"manifest.datepicker.js": "sha384-EzlMwvIxlla/0BuyhAEqxN0M8TGcWIWgEIg840V0akKQQK1uY648wPWMkobvtq/o",
|
|
16
16
|
"manifest.defer.js": "sha384-PRp7+dCZHnnl55rX2xrHutLrQnszHo7o5o9Tq28M/yjLZPuXDzcwQNxCdvbtCYSz",
|
|
17
17
|
"manifest.device.js": "sha384-YeQaS56L8IILqrQNBSeAOLwIh5DuAOrE60cYLK1+46qJtUrXlAvqGe2j5mbV4Vq7",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"manifest.status.js": "sha384-ofu7nBnVIGZ1U1o2R9d2H3V8aEMPUCVbl5FO3gIToXqi0oa36fTviEdh5UU7Kitw",
|
|
30
30
|
"manifest.submissions.js": "sha384-v9eS47ytAfTGIKAyVnbd0QWegucVS7yduvigqfsxxoqXmbaEoy0M2y+BiI4xeZBd",
|
|
31
31
|
"manifest.svg.js": "sha384-qr/8H9+2cIhSXNbRWRtIdrDlTOxKlNJqwEefHvCYoiBNW/kKhPTFa109Orv/EBnb",
|
|
32
|
-
"manifest.sw.js": "sha384-
|
|
32
|
+
"manifest.sw.js": "sha384-aAbMkl5+e8xG9U16+K2l6XUphDZP/binE6AnswmuNEjKl6A4DsOSzWaqHXSiOgpL",
|
|
33
33
|
"manifest.tabs.js": "sha384-otU09H7jnawVKQdLAYpMCd3jx00tgyPVr42D2hLIBzN5dG4se505YesavdnMqEi1",
|
|
34
34
|
"manifest.tailwind.js": "sha384-yuP3LEvWU+QVjxjkZ0YhErtC9RrGmhOmHjjFjhS9obqZbp5/KTIEnSR0CXDvHE0B",
|
|
35
35
|
"manifest.toasts.js": "sha384-UpOz9fAdGeGUhL0NamBg5iPepEfIy73p9HYdcxfOQC5b7CVsl7Our0skdZzaLNcC",
|
package/lib/manifest.sw.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
// Build stamps the published version here; unstamped (dev) falls back to the
|
|
18
18
|
// registration URL's `v`, then 'dev'.
|
|
19
|
-
const BUILD_VERSION = '0.5.
|
|
19
|
+
const BUILD_VERSION = '0.5.273';
|
|
20
20
|
const CACHE_PREFIX = 'mnfst-sw:';
|
|
21
21
|
const META_CACHE = CACHE_PREFIX + 'meta';
|
|
22
22
|
// Sized to hold a full precache.json warm-up (PRECACHE_MAX_ENTRIES server-side)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mnfst",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.273",
|
|
4
4
|
"private": false,
|
|
5
5
|
"workspaces": [
|
|
6
6
|
"templates/starter",
|
|
@@ -50,7 +50,9 @@
|
|
|
50
50
|
"test:e2e:magic": "node tests/e2e/magic-one-arg.e2e.mjs",
|
|
51
51
|
"test:e2e:markdown-safe": "node tests/e2e/markdown-safe.e2e.mjs",
|
|
52
52
|
"test:e2e:upload": "node tests/e2e/upload-first-load.e2e.mjs",
|
|
53
|
+
"test:e2e:test-kit": "node tests/e2e/test-kit-journeys.e2e.mjs",
|
|
53
54
|
"test:e2e:submissions": "node tests/e2e/submissions.e2e.mjs",
|
|
55
|
+
"test:e2e:modules": "node tests/e2e/modules.e2e.mjs",
|
|
54
56
|
"lint": "echo 'No linting configured'",
|
|
55
57
|
"release:docs": "node scripts/release-bump.mjs packages/docs && cd packages/docs && npm publish --auth-type=web",
|
|
56
58
|
"release:check": "node scripts/release-check.mjs"
|