@designcrowd/library.brand-page 6.0.25-json-prereq-1 → 6.0.25-json-prereq-2
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/lib/src/{CreatedOnBrandCrowd-de-de-DQ_KGv0s.js → CreatedOnBrandCrowd-de-de-MkdpvvLq.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BG_f6A4q.js → CreatedOnBrandCrowd-en-us-0K8Va8jv.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-JpS6NaUa.js → CreatedOnBrandCrowd-es-es-BXBXK85u.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-Cedtz6vr.js → CreatedOnBrandCrowd-fr-ca-wbrMlisb.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-Cedtz6vr.js → CreatedOnBrandCrowd-fr-fr-wbrMlisb.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-BiaasnaH.js → CreatedOnBrandCrowd-pt-br-BHBKnYHd.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-BiaasnaH.js → CreatedOnBrandCrowd-pt-pt-BHBKnYHd.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CO0We62y.js → CreatedOnDcom-de-de-BeG5A3Bb.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-BKe6Sf5q.js → CreatedOnDcom-en-us-DVCNhdLS.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-DfZ-HQG4.js → CreatedOnDcom-es-es-Ba8bq852.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-zW3e1hqT.js → CreatedOnDcom-fr-ca-DuNhf0PH.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-C0EeSSsq.js → CreatedOnDcom-fr-fr-CfofYZSL.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-dc9cuSxE.js → CreatedOnDcom-pt-br-BMCBFLhc.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-BQkUO376.js → CreatedOnDcom-pt-pt-CQS6Ft_9.js} +1 -1
- package/lib/src/brand-page/utils/migration/migration-20.js +11 -1
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-k7lGdqzW.js → lib-QPQAbiCG.js} +4 -4
- package/package.json +1 -1
- package/src/brand-page/utils/migration/migration-20.server.test.ts +3 -2
- package/src/brand-page/utils/migration/migration-20.ts +23 -5
|
@@ -53,7 +53,17 @@ const convertModel = (brandPageModel) => {
|
|
|
53
53
|
let serverWindowPromise = null;
|
|
54
54
|
const getServerWindow = () => {
|
|
55
55
|
if (!serverWindowPromise) {
|
|
56
|
-
|
|
56
|
+
// The specifier is assembled at runtime rather than written as the string
|
|
57
|
+
// literal "jsdom", so no bundler (Rollup/Vite in the library build, and any
|
|
58
|
+
// downstream browser consumer — BrandCrowd.Nuxt, web-renderer, …) can
|
|
59
|
+
// statically follow it and try to bundle jsdom → cssstyle, whose generated
|
|
60
|
+
// code breaks Rollup's CommonJS parser. The library stays self-contained
|
|
61
|
+
// (it still loads its own jsdom at runtime on the server) while never
|
|
62
|
+
// leaking jsdom into a browser bundle. `@vite-ignore` silences the
|
|
63
|
+
// "cannot be analyzed" warning the non-literal specifier would otherwise
|
|
64
|
+
// trigger. At Node runtime this resolves the real jsdom from node_modules.
|
|
65
|
+
const jsdomModuleId = ['js', 'dom'].join('');
|
|
66
|
+
serverWindowPromise = import(/* @vite-ignore */ jsdomModuleId)
|
|
57
67
|
.then(({ JSDOM }) => new JSDOM('').window)
|
|
58
68
|
.catch((error) => {
|
|
59
69
|
// Don't cache the failure — let a later migration retry the import.
|
package/lib/src/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as _, a as E, b as s, c as I, d as S, e as N, f as e, B as A, g as O, h as t, i as C, j as G, k as D, l as P, m as R, n as o, o as L, p as M, q as r, r as n, s as b, t as l, u as i, v as F, w as c, x as g, y as B, z as Y, C as U, D as d, E as u, F as H, G as p, H as y, I as m, J as K, K as k, L as V, M as X, N as v, O as h, P as x, Q as f, R as W, S as z, T as w, U as J, V as Z, W as j, X as q, Y as Q, Z as $, $ as aa, a0 as Ta, a1 as _a, a2 as Ea, a3 as sa, a4 as Ia, a5 as Sa, a6 as Na, a7 as ea, a8 as Aa, a9 as Oa, aa as ta, ab as Ca, ac as Ga, ad as Da, ae as Pa, af as Ra, ag as oa, ah as La, ai as Ma, aj as ra, ak as na, al as ba, am as la, an as ia, ao as Fa, ap as ca, aq as ga, ar as Ba, as as Ya, at as Ua, au as da, av as ua, aw as Ha, ax as pa, ay as ya, az as ma, aA as Ka, aB as ka, aC as Va, aD as Xa, aE as va, aF as ha, aG as xa, aH as fa, aI as Wa, aJ as za, aK as wa, aL as Ja, aM as Za, aN as ja, aO as qa, aP as Qa, aQ as $a, aR as aT, aS as TT, aT as _T, aU as ET, aV as sT, aW as IT, aX as ST, aY as NT, aZ as eT, a_ as AT, a$ as OT, b0 as tT, b1 as CT, b2 as GT, b3 as DT, b4 as PT, b5 as RT, b6 as oT, b7 as LT, b8 as MT, b9 as rT, ba as nT, bb as bT, bc as lT, bd as iT, be as FT, bf as cT, bg as gT, bh as BT, bi as YT, bj as UT, bk as dT, bl as uT, bm as HT, bn as pT, bo as yT, bp as mT, bq as KT, br as kT, bs as VT, bt as XT, bu as vT, bv as hT, bw as xT, bx as fT, by as WT, bz as zT, bA as wT, bB as JT, bC as ZT, bD as jT, bE as qT, bF as QT, bG as $T, bH as a_, bI as T_, bJ as __, bK as E_, bL as s_, bM as I_, bN as S_, bO as N_, bP as e_, bQ as A_, bR as O_, bS as t_, bT as C_, bU as G_, bV as D_, bW as P_, bX as R_, bY as o_, bZ as L_, b_ as M_, b$ as r_, c0 as n_, c1 as b_, c2 as l_, c3 as i_, c4 as F_, c5 as c_, c6 as g_, c7 as B_, c8 as Y_, c9 as U_, ca as d_, cb as u_, cc as H_, cd as p_, ce as y_, cf as m_, cg as K_, ch as k_, ci as V_, cj as X_, ck as v_, cl as h_, cm as x_, cn as f_, co as W_, cp as z_, cq as w_, cr as J_, cs as Z_, ct as j_, cu as q_, cv as Q_, cw as $_, cx as aE } from "./lib-
|
|
1
|
+
import { A as _, a as E, b as s, c as I, d as S, e as N, f as e, B as A, g as O, h as t, i as C, j as G, k as D, l as P, m as R, n as o, o as L, p as M, q as r, r as n, s as b, t as l, u as i, v as F, w as c, x as g, y as B, z as Y, C as U, D as d, E as u, F as H, G as p, H as y, I as m, J as K, K as k, L as V, M as X, N as v, O as h, P as x, Q as f, R as W, S as z, T as w, U as J, V as Z, W as j, X as q, Y as Q, Z as $, $ as aa, a0 as Ta, a1 as _a, a2 as Ea, a3 as sa, a4 as Ia, a5 as Sa, a6 as Na, a7 as ea, a8 as Aa, a9 as Oa, aa as ta, ab as Ca, ac as Ga, ad as Da, ae as Pa, af as Ra, ag as oa, ah as La, ai as Ma, aj as ra, ak as na, al as ba, am as la, an as ia, ao as Fa, ap as ca, aq as ga, ar as Ba, as as Ya, at as Ua, au as da, av as ua, aw as Ha, ax as pa, ay as ya, az as ma, aA as Ka, aB as ka, aC as Va, aD as Xa, aE as va, aF as ha, aG as xa, aH as fa, aI as Wa, aJ as za, aK as wa, aL as Ja, aM as Za, aN as ja, aO as qa, aP as Qa, aQ as $a, aR as aT, aS as TT, aT as _T, aU as ET, aV as sT, aW as IT, aX as ST, aY as NT, aZ as eT, a_ as AT, a$ as OT, b0 as tT, b1 as CT, b2 as GT, b3 as DT, b4 as PT, b5 as RT, b6 as oT, b7 as LT, b8 as MT, b9 as rT, ba as nT, bb as bT, bc as lT, bd as iT, be as FT, bf as cT, bg as gT, bh as BT, bi as YT, bj as UT, bk as dT, bl as uT, bm as HT, bn as pT, bo as yT, bp as mT, bq as KT, br as kT, bs as VT, bt as XT, bu as vT, bv as hT, bw as xT, bx as fT, by as WT, bz as zT, bA as wT, bB as JT, bC as ZT, bD as jT, bE as qT, bF as QT, bG as $T, bH as a_, bI as T_, bJ as __, bK as E_, bL as s_, bM as I_, bN as S_, bO as N_, bP as e_, bQ as A_, bR as O_, bS as t_, bT as C_, bU as G_, bV as D_, bW as P_, bX as R_, bY as o_, bZ as L_, b_ as M_, b$ as r_, c0 as n_, c1 as b_, c2 as l_, c3 as i_, c4 as F_, c5 as c_, c6 as g_, c7 as B_, c8 as Y_, c9 as U_, ca as d_, cb as u_, cc as H_, cd as p_, ce as y_, cf as m_, cg as K_, ch as k_, ci as V_, cj as X_, ck as v_, cl as h_, cm as x_, cn as f_, co as W_, cp as z_, cq as w_, cr as J_, cs as Z_, ct as j_, cu as q_, cv as Q_, cw as $_, cx as aE } from "./lib-QPQAbiCG.js";
|
|
2
2
|
import { U as _E, u as EE } from "./useEventTracker-DmQ6AkNn.js";
|
|
3
3
|
import { createPinia as IE, setActivePinia as SE } from "pinia";
|
|
4
4
|
export {
|
|
@@ -64231,8 +64231,8 @@ const eN = /brand-page\/([^?]*)/, az1 = /logo\/([^\/]*)\//, tN = /(http|https):\
|
|
|
64231
64231
|
Rm(n);
|
|
64232
64232
|
};
|
|
64233
64233
|
let Vl = null;
|
|
64234
|
-
const uq1 = () => (Vl || (Vl = import("
|
|
64235
|
-
throw Vl = null,
|
|
64234
|
+
const uq1 = () => (Vl || (Vl = import(["js", "dom"].join("")).then(({ JSDOM: t }) => new t("").window).catch((t) => {
|
|
64235
|
+
throw Vl = null, t;
|
|
64236
64236
|
})), Vl), pq1 = async (e) => {
|
|
64237
64237
|
const { brandPageModel: t } = e;
|
|
64238
64238
|
if (typeof window < "u" && typeof document < "u")
|
|
@@ -68061,10 +68061,10 @@ const ji = /* @__PURE__ */ c9(OG1), DG1 = (e, t, n) => {
|
|
|
68061
68061
|
Ae(() => n.context.isDesignCom, async () => {
|
|
68062
68062
|
const _ = J6().toLowerCase(), S = n.context.isDesignCom ? "Dcom" : "BrandCrowd";
|
|
68063
68063
|
try {
|
|
68064
|
-
const { default: k } = await Qx(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-de-de.vue": () => import("./CreatedOnBrandCrowd-de-de-
|
|
68064
|
+
const { default: k } = await Qx(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-de-de.vue": () => import("./CreatedOnBrandCrowd-de-de-MkdpvvLq.js"), "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-0K8Va8jv.js"), "./watermark/CreatedOnBrandCrowd-es-es.vue": () => import("./CreatedOnBrandCrowd-es-es-BXBXK85u.js"), "./watermark/CreatedOnBrandCrowd-fr-ca.vue": () => import("./CreatedOnBrandCrowd-fr-ca-wbrMlisb.js"), "./watermark/CreatedOnBrandCrowd-fr-fr.vue": () => import("./CreatedOnBrandCrowd-fr-fr-wbrMlisb.js"), "./watermark/CreatedOnBrandCrowd-pt-br.vue": () => import("./CreatedOnBrandCrowd-pt-br-BHBKnYHd.js"), "./watermark/CreatedOnBrandCrowd-pt-pt.vue": () => import("./CreatedOnBrandCrowd-pt-pt-BHBKnYHd.js"), "./watermark/CreatedOnDcom-de-de.vue": () => import("./CreatedOnDcom-de-de-BeG5A3Bb.js"), "./watermark/CreatedOnDcom-en-us.vue": () => import("./CreatedOnDcom-en-us-DVCNhdLS.js"), "./watermark/CreatedOnDcom-es-es.vue": () => import("./CreatedOnDcom-es-es-Ba8bq852.js"), "./watermark/CreatedOnDcom-fr-ca.vue": () => import("./CreatedOnDcom-fr-ca-DuNhf0PH.js"), "./watermark/CreatedOnDcom-fr-fr.vue": () => import("./CreatedOnDcom-fr-fr-CfofYZSL.js"), "./watermark/CreatedOnDcom-pt-br.vue": () => import("./CreatedOnDcom-pt-br-BMCBFLhc.js"), "./watermark/CreatedOnDcom-pt-pt.vue": () => import("./CreatedOnDcom-pt-pt-CQS6Ft_9.js") }), `./watermark/CreatedOn${S}-${_}.vue`, 3);
|
|
68065
68065
|
i.value = k;
|
|
68066
68066
|
} catch {
|
|
68067
|
-
const { default: V } = await Qx(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-
|
|
68067
|
+
const { default: V } = await Qx(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-0K8Va8jv.js"), "./watermark/CreatedOnDcom-en-us.vue": () => import("./CreatedOnDcom-en-us-DVCNhdLS.js") }), `./watermark/CreatedOn${S}-en-us.vue`, 3);
|
|
68068
68068
|
i.value = V;
|
|
68069
68069
|
}
|
|
68070
68070
|
}, {
|
package/package.json
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* These tests run under the default jsdom environment but DELETE the global
|
|
7
7
|
* `window`/`document` around each case, so `migration20` takes its DOM-less
|
|
8
|
-
* server branch for real (dynamic
|
|
9
|
-
* + restore). The sibling migration-20.test.ts
|
|
8
|
+
* server branch for real (dynamic jsdom import via a runtime-assembled specifier
|
|
9
|
+
* + transient global install + restore). The sibling migration-20.test.ts
|
|
10
|
+
* guards the browser path.
|
|
10
11
|
*
|
|
11
12
|
* (We simulate DOM-less rather than switch this file to a node environment,
|
|
12
13
|
* because the shared test/vitest.setup.js assumes a jsdom `global.window`.)
|
|
@@ -66,18 +66,36 @@ const convertModel = (brandPageModel: BrandPageModel): void => {
|
|
|
66
66
|
* per process and reused. The parser is stateless (each parseFromString builds a
|
|
67
67
|
* fresh document), so sharing the window across requests is safe.
|
|
68
68
|
*
|
|
69
|
-
* `jsdom` is dynamically imported
|
|
70
|
-
*
|
|
71
|
-
* there is no global `window`.
|
|
69
|
+
* `jsdom` is dynamically imported via a runtime-assembled specifier (see
|
|
70
|
+
* getServerWindow), so no bundler can follow it into a browser bundle — this
|
|
71
|
+
* branch only runs when there is no global `window`.
|
|
72
72
|
*/
|
|
73
73
|
type ServerWindow = { DOMParser: unknown; document: unknown };
|
|
74
74
|
|
|
75
|
+
// Minimal shape of the jsdom module, declared locally rather than via an
|
|
76
|
+
// `import()` type, so the specifier "jsdom" never appears anywhere a bundler
|
|
77
|
+
// could follow it (value or type position). Only the members used below.
|
|
78
|
+
type JsdomModule = { JSDOM: new (html?: string) => { window: ServerWindow } };
|
|
79
|
+
|
|
75
80
|
let serverWindowPromise: Promise<ServerWindow> | null = null;
|
|
76
81
|
|
|
77
82
|
const getServerWindow = (): Promise<ServerWindow> => {
|
|
78
83
|
if (!serverWindowPromise) {
|
|
79
|
-
|
|
80
|
-
|
|
84
|
+
// The specifier is assembled at runtime rather than written as the string
|
|
85
|
+
// literal "jsdom", so no bundler (Rollup/Vite in the library build, and any
|
|
86
|
+
// downstream browser consumer — BrandCrowd.Nuxt, web-renderer, …) can
|
|
87
|
+
// statically follow it and try to bundle jsdom → cssstyle, whose generated
|
|
88
|
+
// code breaks Rollup's CommonJS parser. The library stays self-contained
|
|
89
|
+
// (it still loads its own jsdom at runtime on the server) while never
|
|
90
|
+
// leaking jsdom into a browser bundle. `@vite-ignore` silences the
|
|
91
|
+
// "cannot be analyzed" warning the non-literal specifier would otherwise
|
|
92
|
+
// trigger. At Node runtime this resolves the real jsdom from node_modules.
|
|
93
|
+
const jsdomModuleId = ['js', 'dom'].join('');
|
|
94
|
+
|
|
95
|
+
serverWindowPromise = (
|
|
96
|
+
import(/* @vite-ignore */ jsdomModuleId) as Promise<JsdomModule>
|
|
97
|
+
)
|
|
98
|
+
.then(({ JSDOM }) => new JSDOM('').window)
|
|
81
99
|
.catch((error) => {
|
|
82
100
|
// Don't cache the failure — let a later migration retry the import.
|
|
83
101
|
serverWindowPromise = null;
|