@contember/vite-plugin 2.1.0-alpha.1 → 2.1.0-alpha.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/dist/development/index.cjs +45 -32
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +45 -32
- package/dist/development/index.js.map +1 -1
- package/dist/production/index.cjs +45 -32
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.js +45 -32
- package/dist/production/index.js.map +1 -1
- package/dist/types/index.d.ts +36 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/index.ts +103 -38
- package/tests/cases/unit/vite-plugin.test.ts +213 -0
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const crypto = require("node:crypto");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
const extractProjectNameFromDsn = (dsn) => {
|
|
5
|
+
if (!dsn) return null;
|
|
6
|
+
try {
|
|
7
|
+
return new URL(dsn).username || null;
|
|
8
|
+
} catch (e) {
|
|
9
|
+
console.warn("Invalid Contember DSN format:", dsn);
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const createBuildVersionTag = (html) => {
|
|
14
|
+
const fileHash = crypto.createHash("md5").update(html).digest("hex");
|
|
15
|
+
return {
|
|
16
|
+
tag: "meta",
|
|
17
|
+
injectTo: "head",
|
|
18
|
+
attrs: {
|
|
19
|
+
name: "contember-build-version",
|
|
20
|
+
content: fileHash
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
const contember = (options) => {
|
|
25
|
+
const {
|
|
26
|
+
appPath = "/app",
|
|
27
|
+
buildVersion = process.env.NODE_ENV === "production",
|
|
28
|
+
disableMiddleware = false
|
|
29
|
+
} = options || {};
|
|
30
|
+
const normalizedAppPath = appPath.startsWith("/") ? appPath : `/${appPath}`;
|
|
31
|
+
const contemberDsn = process.argv.find((it) => it.includes("contember://")) || process.env.CONTEMBER_DSN;
|
|
32
|
+
const projectName = extractProjectNameFromDsn(contemberDsn);
|
|
33
|
+
const defineConfig = projectName ? { "import.meta.env.VITE_CONTEMBER_ADMIN_PROJECT_NAME": JSON.stringify(projectName) } : {};
|
|
11
34
|
return {
|
|
12
35
|
name: "contember",
|
|
13
36
|
config(config) {
|
|
@@ -22,47 +45,37 @@ function contember(options) {
|
|
|
22
45
|
...config.build?.rollupOptions,
|
|
23
46
|
input: config.build?.rollupOptions?.input ?? {
|
|
24
47
|
root: "./index.html",
|
|
25
|
-
app: `.${
|
|
48
|
+
app: `.${normalizedAppPath}/index.html`
|
|
26
49
|
}
|
|
27
50
|
}
|
|
28
51
|
}
|
|
29
52
|
};
|
|
30
53
|
},
|
|
31
|
-
configureServer(
|
|
32
|
-
if (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
54
|
+
configureServer(server) {
|
|
55
|
+
if (disableMiddleware) return;
|
|
56
|
+
server.middlewares.use((req, res, next) => {
|
|
57
|
+
const [pathname] = req.url?.split("?") ?? [];
|
|
58
|
+
const isSpaRoute = pathname === normalizedAppPath || pathname.startsWith(`${normalizedAppPath}/`) && !pathname.match(/\.\w+$/);
|
|
59
|
+
if (isSpaRoute) {
|
|
60
|
+
req.url = `${normalizedAppPath}/`;
|
|
61
|
+
}
|
|
62
|
+
next();
|
|
63
|
+
});
|
|
41
64
|
},
|
|
42
|
-
transformIndexHtml:
|
|
65
|
+
transformIndexHtml: buildVersion ? {
|
|
43
66
|
order: "post",
|
|
44
67
|
handler: (html, ctx) => {
|
|
45
68
|
if (ctx.server && options?.buildVersion !== true) {
|
|
46
69
|
return { html, tags: [] };
|
|
47
70
|
}
|
|
48
|
-
const fileHash = crypto.createHash("md5").update(html).digest().toString("hex");
|
|
49
71
|
return {
|
|
50
72
|
html,
|
|
51
|
-
tags: [
|
|
52
|
-
{
|
|
53
|
-
tag: "meta",
|
|
54
|
-
injectTo: "head",
|
|
55
|
-
attrs: {
|
|
56
|
-
name: "contember-build-version",
|
|
57
|
-
content: fileHash
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
]
|
|
73
|
+
tags: [createBuildVersionTag(html)]
|
|
61
74
|
};
|
|
62
75
|
}
|
|
63
|
-
}
|
|
76
|
+
} : void 0
|
|
64
77
|
};
|
|
65
|
-
}
|
|
78
|
+
};
|
|
66
79
|
exports.contember = contember;
|
|
67
80
|
exports.default = contember;
|
|
68
81
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../packages/vite-plugin/src/index.ts"],"sourcesContent":["import { createHash } from 'node:crypto'\nimport { Plugin } from 'vite'\n\
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../packages/vite-plugin/src/index.ts"],"sourcesContent":["import { createHash } from 'node:crypto'\nimport { Plugin } from 'vite'\n\n/**\n * Configuration options for the Contember Vite plugin\n */\nexport type ContemberOptions = {\n\t/**\n\t * Add build version meta tag (defaults to true in production)\n\t */\n\tbuildVersion?: boolean\n\t/**\n\t * Disable SPA routing middleware\n\t */\n\tdisableMiddleware?: boolean\n\t/**\n\t * Path to the app (defaults to '/app')\n\t */\n\tappPath?: string\n}\n\nconst extractProjectNameFromDsn = (dsn: string | undefined) => {\n\tif (!dsn) return null\n\n\ttry {\n\t\treturn new URL(dsn).username || null\n\t} catch (e) {\n\t\tconsole.warn('Invalid Contember DSN format:', dsn)\n\t\treturn null\n\t}\n}\n\nconst createBuildVersionTag = (html: string): {\n\ttag: string\n\tinjectTo: 'head'\n\tattrs: Record<string, string>\n} => {\n\tconst fileHash = createHash('md5').update(html).digest('hex')\n\treturn {\n\t\ttag: 'meta',\n\t\tinjectTo: 'head',\n\t\tattrs: {\n\t\t\tname: 'contember-build-version',\n\t\t\tcontent: fileHash,\n\t\t},\n\t}\n}\n\n/**\n * ## Contember Vite Plugin\n *\n * This plugin provides configuration enhancements for Vite when working with Contember applications.\n * It allows setting up SPA routing, injecting build version metadata, and defining project-specific environment variables.\n *\n * #### Features:\n * - Adds a build version meta tag (optional, enabled by default in production)\n * - Configures SPA routing middleware\n * - Supports defining project name from the Contember DSN\n * - Customizable app path\n *\n * #### Example Usage:\n * ```ts\n * import { defineConfig } from 'vite';\n * import contember from './contember';\n *\n * export default defineConfig({\n * plugins: [contember({ buildVersion: true, appPath: '/custom-app' })],\n * });\n * ```\n */\nexport const contember = (options?: ContemberOptions): Plugin => {\n\tconst {\n\t\tappPath = '/app',\n\t\tbuildVersion = process.env.NODE_ENV === 'production',\n\t\tdisableMiddleware = false,\n\t} = options || {}\n\n\tconst normalizedAppPath = appPath.startsWith('/') ? appPath : `/${appPath}`\n\tconst contemberDsn = process.argv.find(it => it.includes('contember://')) || process.env.CONTEMBER_DSN\n\tconst projectName = extractProjectNameFromDsn(contemberDsn)\n\n\tconst defineConfig = projectName\n\t\t? { 'import.meta.env.VITE_CONTEMBER_ADMIN_PROJECT_NAME': JSON.stringify(projectName) }\n\t\t: {}\n\n\treturn {\n\t\tname: 'contember',\n\n\t\tconfig(config) {\n\t\t\treturn {\n\t\t\t\tdefine: defineConfig,\n\t\t\t\tbase: '/',\n\t\t\t\t...config,\n\t\t\t\tbuild: {\n\t\t\t\t\tsourcemap: true,\n\t\t\t\t\t...config.build,\n\t\t\t\t\trollupOptions: {\n\t\t\t\t\t\t...config.build?.rollupOptions,\n\t\t\t\t\t\tinput: config.build?.rollupOptions?.input ?? {\n\t\t\t\t\t\t\troot: './index.html',\n\t\t\t\t\t\t\tapp: `.${normalizedAppPath}/index.html`,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\n\t\tconfigureServer(server) {\n\t\t\tif (disableMiddleware) return\n\n\t\t\tserver.middlewares.use((req, res, next) => {\n\t\t\t\tconst [pathname] = req.url?.split('?') ?? []\n\n\t\t\t\tconst isSpaRoute = pathname === normalizedAppPath ||\n\t\t\t\t\t(pathname.startsWith(`${normalizedAppPath}/`) && !pathname.match(/\\.\\w+$/))\n\n\t\t\t\tif (isSpaRoute) {\n\t\t\t\t\treq.url = `${normalizedAppPath}/`\n\t\t\t\t}\n\n\t\t\t\tnext()\n\t\t\t})\n\t\t},\n\n\t\ttransformIndexHtml: buildVersion\n\t\t\t? {\n\t\t\t\torder: 'post',\n\t\t\t\thandler: (html, ctx) => {\n\t\t\t\t\t// Skip in dev server unless explicitly enabled\n\t\t\t\t\tif (ctx.server && options?.buildVersion !== true) {\n\t\t\t\t\t\treturn { html, tags: [] }\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\thtml,\n\t\t\t\t\t\ttags: [createBuildVersionTag(html)],\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t}\n\t\t\t: undefined,\n\t}\n}\n\nexport default contember\n"],"names":["createHash"],"mappings":";;;AAqBA,MAAM,4BAA4B,CAAC,QAA4B;AAC1D,MAAA,CAAC,IAAY,QAAA;AAEb,MAAA;AACH,WAAO,IAAI,IAAI,GAAG,EAAE,YAAY;AAAA,WACxB,GAAG;AACH,YAAA,KAAK,iCAAiC,GAAG;AAC1C,WAAA;AAAA,EAAA;AAET;AAEA,MAAM,wBAAwB,CAAC,SAI1B;AACE,QAAA,WAAWA,kBAAW,KAAK,EAAE,OAAO,IAAI,EAAE,OAAO,KAAK;AACrD,SAAA;AAAA,IACN,KAAK;AAAA,IACL,UAAU;AAAA,IACV,OAAO;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IAAA;AAAA,EAEX;AACD;AAwBa,MAAA,YAAY,CAAC,YAAuC;AAC1D,QAAA;AAAA,IACL,UAAU;AAAA,IACV,eAAe,QAAQ,IAAI,aAAa;AAAA,IACxC,oBAAoB;AAAA,EACrB,IAAI,WAAW,CAAC;AAEhB,QAAM,oBAAoB,QAAQ,WAAW,GAAG,IAAI,UAAU,IAAI,OAAO;AACnE,QAAA,eAAe,QAAQ,KAAK,KAAK,CAAA,OAAM,GAAG,SAAS,cAAc,CAAC,KAAK,QAAQ,IAAI;AACnF,QAAA,cAAc,0BAA0B,YAAY;AAEpD,QAAA,eAAe,cAClB,EAAE,qDAAqD,KAAK,UAAU,WAAW,EAAE,IACnF,CAAC;AAEG,SAAA;AAAA,IACN,MAAM;AAAA,IAEN,OAAO,QAAQ;AACP,aAAA;AAAA,QACN,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,GAAG;AAAA,QACH,OAAO;AAAA,UACN,WAAW;AAAA,UACX,GAAG,OAAO;AAAA,UACV,eAAe;AAAA,YACd,GAAG,OAAO,OAAO;AAAA,YACjB,OAAO,OAAO,OAAO,eAAe,SAAS;AAAA,cAC5C,MAAM;AAAA,cACN,KAAK,IAAI,iBAAiB;AAAA,YAAA;AAAA,UAC3B;AAAA,QACD;AAAA,MAEF;AAAA,IACD;AAAA,IAEA,gBAAgB,QAAQ;AACvB,UAAI,kBAAmB;AAEvB,aAAO,YAAY,IAAI,CAAC,KAAK,KAAK,SAAS;AACpC,cAAA,CAAC,QAAQ,IAAI,IAAI,KAAK,MAAM,GAAG,KAAK,CAAC;AAE3C,cAAM,aAAa,aAAa,qBAC9B,SAAS,WAAW,GAAG,iBAAiB,GAAG,KAAK,CAAC,SAAS,MAAM,QAAQ;AAE1E,YAAI,YAAY;AACX,cAAA,MAAM,GAAG,iBAAiB;AAAA,QAAA;AAG1B,aAAA;AAAA,MAAA,CACL;AAAA,IACF;AAAA,IAEA,oBAAoB,eACjB;AAAA,MACD,OAAO;AAAA,MACP,SAAS,CAAC,MAAM,QAAQ;AAEvB,YAAI,IAAI,UAAU,SAAS,iBAAiB,MAAM;AACjD,iBAAO,EAAE,MAAM,MAAM,GAAG;AAAA,QAAA;AAGlB,eAAA;AAAA,UACN;AAAA,UACA,MAAM,CAAC,sBAAsB,IAAI,CAAC;AAAA,QACnC;AAAA,MAAA;AAAA,IACD,IAEC;AAAA,EACJ;AACD;;;"}
|
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
const extractProjectNameFromDsn = (dsn) => {
|
|
3
|
+
if (!dsn) return null;
|
|
4
|
+
try {
|
|
5
|
+
return new URL(dsn).username || null;
|
|
6
|
+
} catch (e) {
|
|
7
|
+
console.warn("Invalid Contember DSN format:", dsn);
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const createBuildVersionTag = (html) => {
|
|
12
|
+
const fileHash = createHash("md5").update(html).digest("hex");
|
|
13
|
+
return {
|
|
14
|
+
tag: "meta",
|
|
15
|
+
injectTo: "head",
|
|
16
|
+
attrs: {
|
|
17
|
+
name: "contember-build-version",
|
|
18
|
+
content: fileHash
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
const contember = (options) => {
|
|
23
|
+
const {
|
|
24
|
+
appPath = "/app",
|
|
25
|
+
buildVersion = process.env.NODE_ENV === "production",
|
|
26
|
+
disableMiddleware = false
|
|
27
|
+
} = options || {};
|
|
28
|
+
const normalizedAppPath = appPath.startsWith("/") ? appPath : `/${appPath}`;
|
|
29
|
+
const contemberDsn = process.argv.find((it) => it.includes("contember://")) || process.env.CONTEMBER_DSN;
|
|
30
|
+
const projectName = extractProjectNameFromDsn(contemberDsn);
|
|
31
|
+
const defineConfig = projectName ? { "import.meta.env.VITE_CONTEMBER_ADMIN_PROJECT_NAME": JSON.stringify(projectName) } : {};
|
|
9
32
|
return {
|
|
10
33
|
name: "contember",
|
|
11
34
|
config(config) {
|
|
@@ -20,47 +43,37 @@ function contember(options) {
|
|
|
20
43
|
...config.build?.rollupOptions,
|
|
21
44
|
input: config.build?.rollupOptions?.input ?? {
|
|
22
45
|
root: "./index.html",
|
|
23
|
-
app: `.${
|
|
46
|
+
app: `.${normalizedAppPath}/index.html`
|
|
24
47
|
}
|
|
25
48
|
}
|
|
26
49
|
}
|
|
27
50
|
};
|
|
28
51
|
},
|
|
29
|
-
configureServer(
|
|
30
|
-
if (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
52
|
+
configureServer(server) {
|
|
53
|
+
if (disableMiddleware) return;
|
|
54
|
+
server.middlewares.use((req, res, next) => {
|
|
55
|
+
const [pathname] = req.url?.split("?") ?? [];
|
|
56
|
+
const isSpaRoute = pathname === normalizedAppPath || pathname.startsWith(`${normalizedAppPath}/`) && !pathname.match(/\.\w+$/);
|
|
57
|
+
if (isSpaRoute) {
|
|
58
|
+
req.url = `${normalizedAppPath}/`;
|
|
59
|
+
}
|
|
60
|
+
next();
|
|
61
|
+
});
|
|
39
62
|
},
|
|
40
|
-
transformIndexHtml:
|
|
63
|
+
transformIndexHtml: buildVersion ? {
|
|
41
64
|
order: "post",
|
|
42
65
|
handler: (html, ctx) => {
|
|
43
66
|
if (ctx.server && options?.buildVersion !== true) {
|
|
44
67
|
return { html, tags: [] };
|
|
45
68
|
}
|
|
46
|
-
const fileHash = createHash("md5").update(html).digest().toString("hex");
|
|
47
69
|
return {
|
|
48
70
|
html,
|
|
49
|
-
tags: [
|
|
50
|
-
{
|
|
51
|
-
tag: "meta",
|
|
52
|
-
injectTo: "head",
|
|
53
|
-
attrs: {
|
|
54
|
-
name: "contember-build-version",
|
|
55
|
-
content: fileHash
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
]
|
|
71
|
+
tags: [createBuildVersionTag(html)]
|
|
59
72
|
};
|
|
60
73
|
}
|
|
61
|
-
}
|
|
74
|
+
} : void 0
|
|
62
75
|
};
|
|
63
|
-
}
|
|
76
|
+
};
|
|
64
77
|
export {
|
|
65
78
|
contember,
|
|
66
79
|
contember as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../packages/vite-plugin/src/index.ts"],"sourcesContent":["import { createHash } from 'node:crypto'\nimport { Plugin } from 'vite'\n\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../packages/vite-plugin/src/index.ts"],"sourcesContent":["import { createHash } from 'node:crypto'\nimport { Plugin } from 'vite'\n\n/**\n * Configuration options for the Contember Vite plugin\n */\nexport type ContemberOptions = {\n\t/**\n\t * Add build version meta tag (defaults to true in production)\n\t */\n\tbuildVersion?: boolean\n\t/**\n\t * Disable SPA routing middleware\n\t */\n\tdisableMiddleware?: boolean\n\t/**\n\t * Path to the app (defaults to '/app')\n\t */\n\tappPath?: string\n}\n\nconst extractProjectNameFromDsn = (dsn: string | undefined) => {\n\tif (!dsn) return null\n\n\ttry {\n\t\treturn new URL(dsn).username || null\n\t} catch (e) {\n\t\tconsole.warn('Invalid Contember DSN format:', dsn)\n\t\treturn null\n\t}\n}\n\nconst createBuildVersionTag = (html: string): {\n\ttag: string\n\tinjectTo: 'head'\n\tattrs: Record<string, string>\n} => {\n\tconst fileHash = createHash('md5').update(html).digest('hex')\n\treturn {\n\t\ttag: 'meta',\n\t\tinjectTo: 'head',\n\t\tattrs: {\n\t\t\tname: 'contember-build-version',\n\t\t\tcontent: fileHash,\n\t\t},\n\t}\n}\n\n/**\n * ## Contember Vite Plugin\n *\n * This plugin provides configuration enhancements for Vite when working with Contember applications.\n * It allows setting up SPA routing, injecting build version metadata, and defining project-specific environment variables.\n *\n * #### Features:\n * - Adds a build version meta tag (optional, enabled by default in production)\n * - Configures SPA routing middleware\n * - Supports defining project name from the Contember DSN\n * - Customizable app path\n *\n * #### Example Usage:\n * ```ts\n * import { defineConfig } from 'vite';\n * import contember from './contember';\n *\n * export default defineConfig({\n * plugins: [contember({ buildVersion: true, appPath: '/custom-app' })],\n * });\n * ```\n */\nexport const contember = (options?: ContemberOptions): Plugin => {\n\tconst {\n\t\tappPath = '/app',\n\t\tbuildVersion = process.env.NODE_ENV === 'production',\n\t\tdisableMiddleware = false,\n\t} = options || {}\n\n\tconst normalizedAppPath = appPath.startsWith('/') ? appPath : `/${appPath}`\n\tconst contemberDsn = process.argv.find(it => it.includes('contember://')) || process.env.CONTEMBER_DSN\n\tconst projectName = extractProjectNameFromDsn(contemberDsn)\n\n\tconst defineConfig = projectName\n\t\t? { 'import.meta.env.VITE_CONTEMBER_ADMIN_PROJECT_NAME': JSON.stringify(projectName) }\n\t\t: {}\n\n\treturn {\n\t\tname: 'contember',\n\n\t\tconfig(config) {\n\t\t\treturn {\n\t\t\t\tdefine: defineConfig,\n\t\t\t\tbase: '/',\n\t\t\t\t...config,\n\t\t\t\tbuild: {\n\t\t\t\t\tsourcemap: true,\n\t\t\t\t\t...config.build,\n\t\t\t\t\trollupOptions: {\n\t\t\t\t\t\t...config.build?.rollupOptions,\n\t\t\t\t\t\tinput: config.build?.rollupOptions?.input ?? {\n\t\t\t\t\t\t\troot: './index.html',\n\t\t\t\t\t\t\tapp: `.${normalizedAppPath}/index.html`,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\n\t\tconfigureServer(server) {\n\t\t\tif (disableMiddleware) return\n\n\t\t\tserver.middlewares.use((req, res, next) => {\n\t\t\t\tconst [pathname] = req.url?.split('?') ?? []\n\n\t\t\t\tconst isSpaRoute = pathname === normalizedAppPath ||\n\t\t\t\t\t(pathname.startsWith(`${normalizedAppPath}/`) && !pathname.match(/\\.\\w+$/))\n\n\t\t\t\tif (isSpaRoute) {\n\t\t\t\t\treq.url = `${normalizedAppPath}/`\n\t\t\t\t}\n\n\t\t\t\tnext()\n\t\t\t})\n\t\t},\n\n\t\ttransformIndexHtml: buildVersion\n\t\t\t? {\n\t\t\t\torder: 'post',\n\t\t\t\thandler: (html, ctx) => {\n\t\t\t\t\t// Skip in dev server unless explicitly enabled\n\t\t\t\t\tif (ctx.server && options?.buildVersion !== true) {\n\t\t\t\t\t\treturn { html, tags: [] }\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\thtml,\n\t\t\t\t\t\ttags: [createBuildVersionTag(html)],\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t}\n\t\t\t: undefined,\n\t}\n}\n\nexport default contember\n"],"names":[],"mappings":";AAqBA,MAAM,4BAA4B,CAAC,QAA4B;AAC1D,MAAA,CAAC,IAAY,QAAA;AAEb,MAAA;AACH,WAAO,IAAI,IAAI,GAAG,EAAE,YAAY;AAAA,WACxB,GAAG;AACH,YAAA,KAAK,iCAAiC,GAAG;AAC1C,WAAA;AAAA,EAAA;AAET;AAEA,MAAM,wBAAwB,CAAC,SAI1B;AACE,QAAA,WAAW,WAAW,KAAK,EAAE,OAAO,IAAI,EAAE,OAAO,KAAK;AACrD,SAAA;AAAA,IACN,KAAK;AAAA,IACL,UAAU;AAAA,IACV,OAAO;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IAAA;AAAA,EAEX;AACD;AAwBa,MAAA,YAAY,CAAC,YAAuC;AAC1D,QAAA;AAAA,IACL,UAAU;AAAA,IACV,eAAe,QAAQ,IAAI,aAAa;AAAA,IACxC,oBAAoB;AAAA,EACrB,IAAI,WAAW,CAAC;AAEhB,QAAM,oBAAoB,QAAQ,WAAW,GAAG,IAAI,UAAU,IAAI,OAAO;AACnE,QAAA,eAAe,QAAQ,KAAK,KAAK,CAAA,OAAM,GAAG,SAAS,cAAc,CAAC,KAAK,QAAQ,IAAI;AACnF,QAAA,cAAc,0BAA0B,YAAY;AAEpD,QAAA,eAAe,cAClB,EAAE,qDAAqD,KAAK,UAAU,WAAW,EAAE,IACnF,CAAC;AAEG,SAAA;AAAA,IACN,MAAM;AAAA,IAEN,OAAO,QAAQ;AACP,aAAA;AAAA,QACN,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,GAAG;AAAA,QACH,OAAO;AAAA,UACN,WAAW;AAAA,UACX,GAAG,OAAO;AAAA,UACV,eAAe;AAAA,YACd,GAAG,OAAO,OAAO;AAAA,YACjB,OAAO,OAAO,OAAO,eAAe,SAAS;AAAA,cAC5C,MAAM;AAAA,cACN,KAAK,IAAI,iBAAiB;AAAA,YAAA;AAAA,UAC3B;AAAA,QACD;AAAA,MAEF;AAAA,IACD;AAAA,IAEA,gBAAgB,QAAQ;AACvB,UAAI,kBAAmB;AAEvB,aAAO,YAAY,IAAI,CAAC,KAAK,KAAK,SAAS;AACpC,cAAA,CAAC,QAAQ,IAAI,IAAI,KAAK,MAAM,GAAG,KAAK,CAAC;AAE3C,cAAM,aAAa,aAAa,qBAC9B,SAAS,WAAW,GAAG,iBAAiB,GAAG,KAAK,CAAC,SAAS,MAAM,QAAQ;AAE1E,YAAI,YAAY;AACX,cAAA,MAAM,GAAG,iBAAiB;AAAA,QAAA;AAG1B,aAAA;AAAA,MAAA,CACL;AAAA,IACF;AAAA,IAEA,oBAAoB,eACjB;AAAA,MACD,OAAO;AAAA,MACP,SAAS,CAAC,MAAM,QAAQ;AAEvB,YAAI,IAAI,UAAU,SAAS,iBAAiB,MAAM;AACjD,iBAAO,EAAE,MAAM,MAAM,GAAG;AAAA,QAAA;AAGlB,eAAA;AAAA,UACN;AAAA,UACA,MAAM,CAAC,sBAAsB,IAAI,CAAC;AAAA,QACnC;AAAA,MAAA;AAAA,IACD,IAEC;AAAA,EACJ;AACD;"}
|
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const crypto = require("node:crypto");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
const extractProjectNameFromDsn = (dsn) => {
|
|
5
|
+
if (!dsn) return null;
|
|
6
|
+
try {
|
|
7
|
+
return new URL(dsn).username || null;
|
|
8
|
+
} catch (e) {
|
|
9
|
+
console.warn("Invalid Contember DSN format:", dsn);
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const createBuildVersionTag = (html) => {
|
|
14
|
+
const fileHash = crypto.createHash("md5").update(html).digest("hex");
|
|
15
|
+
return {
|
|
16
|
+
tag: "meta",
|
|
17
|
+
injectTo: "head",
|
|
18
|
+
attrs: {
|
|
19
|
+
name: "contember-build-version",
|
|
20
|
+
content: fileHash
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
const contember = (options) => {
|
|
25
|
+
const {
|
|
26
|
+
appPath = "/app",
|
|
27
|
+
buildVersion = process.env.NODE_ENV === "production",
|
|
28
|
+
disableMiddleware = false
|
|
29
|
+
} = options || {};
|
|
30
|
+
const normalizedAppPath = appPath.startsWith("/") ? appPath : `/${appPath}`;
|
|
31
|
+
const contemberDsn = process.argv.find((it) => it.includes("contember://")) || process.env.CONTEMBER_DSN;
|
|
32
|
+
const projectName = extractProjectNameFromDsn(contemberDsn);
|
|
33
|
+
const defineConfig = projectName ? { "import.meta.env.VITE_CONTEMBER_ADMIN_PROJECT_NAME": JSON.stringify(projectName) } : {};
|
|
11
34
|
return {
|
|
12
35
|
name: "contember",
|
|
13
36
|
config(config) {
|
|
@@ -22,47 +45,37 @@ function contember(options) {
|
|
|
22
45
|
...config.build?.rollupOptions,
|
|
23
46
|
input: config.build?.rollupOptions?.input ?? {
|
|
24
47
|
root: "./index.html",
|
|
25
|
-
app: `.${
|
|
48
|
+
app: `.${normalizedAppPath}/index.html`
|
|
26
49
|
}
|
|
27
50
|
}
|
|
28
51
|
}
|
|
29
52
|
};
|
|
30
53
|
},
|
|
31
|
-
configureServer(
|
|
32
|
-
if (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
54
|
+
configureServer(server) {
|
|
55
|
+
if (disableMiddleware) return;
|
|
56
|
+
server.middlewares.use((req, res, next) => {
|
|
57
|
+
const [pathname] = req.url?.split("?") ?? [];
|
|
58
|
+
const isSpaRoute = pathname === normalizedAppPath || pathname.startsWith(`${normalizedAppPath}/`) && !pathname.match(/\.\w+$/);
|
|
59
|
+
if (isSpaRoute) {
|
|
60
|
+
req.url = `${normalizedAppPath}/`;
|
|
61
|
+
}
|
|
62
|
+
next();
|
|
63
|
+
});
|
|
41
64
|
},
|
|
42
|
-
transformIndexHtml:
|
|
65
|
+
transformIndexHtml: buildVersion ? {
|
|
43
66
|
order: "post",
|
|
44
67
|
handler: (html, ctx) => {
|
|
45
68
|
if (ctx.server && options?.buildVersion !== true) {
|
|
46
69
|
return { html, tags: [] };
|
|
47
70
|
}
|
|
48
|
-
const fileHash = crypto.createHash("md5").update(html).digest().toString("hex");
|
|
49
71
|
return {
|
|
50
72
|
html,
|
|
51
|
-
tags: [
|
|
52
|
-
{
|
|
53
|
-
tag: "meta",
|
|
54
|
-
injectTo: "head",
|
|
55
|
-
attrs: {
|
|
56
|
-
name: "contember-build-version",
|
|
57
|
-
content: fileHash
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
]
|
|
73
|
+
tags: [createBuildVersionTag(html)]
|
|
61
74
|
};
|
|
62
75
|
}
|
|
63
|
-
}
|
|
76
|
+
} : void 0
|
|
64
77
|
};
|
|
65
|
-
}
|
|
78
|
+
};
|
|
66
79
|
exports.contember = contember;
|
|
67
80
|
exports.default = contember;
|
|
68
81
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../packages/vite-plugin/src/index.ts"],"sourcesContent":["import { createHash } from 'node:crypto'\nimport { Plugin } from 'vite'\n\
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../packages/vite-plugin/src/index.ts"],"sourcesContent":["import { createHash } from 'node:crypto'\nimport { Plugin } from 'vite'\n\n/**\n * Configuration options for the Contember Vite plugin\n */\nexport type ContemberOptions = {\n\t/**\n\t * Add build version meta tag (defaults to true in production)\n\t */\n\tbuildVersion?: boolean\n\t/**\n\t * Disable SPA routing middleware\n\t */\n\tdisableMiddleware?: boolean\n\t/**\n\t * Path to the app (defaults to '/app')\n\t */\n\tappPath?: string\n}\n\nconst extractProjectNameFromDsn = (dsn: string | undefined) => {\n\tif (!dsn) return null\n\n\ttry {\n\t\treturn new URL(dsn).username || null\n\t} catch (e) {\n\t\tconsole.warn('Invalid Contember DSN format:', dsn)\n\t\treturn null\n\t}\n}\n\nconst createBuildVersionTag = (html: string): {\n\ttag: string\n\tinjectTo: 'head'\n\tattrs: Record<string, string>\n} => {\n\tconst fileHash = createHash('md5').update(html).digest('hex')\n\treturn {\n\t\ttag: 'meta',\n\t\tinjectTo: 'head',\n\t\tattrs: {\n\t\t\tname: 'contember-build-version',\n\t\t\tcontent: fileHash,\n\t\t},\n\t}\n}\n\n/**\n * ## Contember Vite Plugin\n *\n * This plugin provides configuration enhancements for Vite when working with Contember applications.\n * It allows setting up SPA routing, injecting build version metadata, and defining project-specific environment variables.\n *\n * #### Features:\n * - Adds a build version meta tag (optional, enabled by default in production)\n * - Configures SPA routing middleware\n * - Supports defining project name from the Contember DSN\n * - Customizable app path\n *\n * #### Example Usage:\n * ```ts\n * import { defineConfig } from 'vite';\n * import contember from './contember';\n *\n * export default defineConfig({\n * plugins: [contember({ buildVersion: true, appPath: '/custom-app' })],\n * });\n * ```\n */\nexport const contember = (options?: ContemberOptions): Plugin => {\n\tconst {\n\t\tappPath = '/app',\n\t\tbuildVersion = process.env.NODE_ENV === 'production',\n\t\tdisableMiddleware = false,\n\t} = options || {}\n\n\tconst normalizedAppPath = appPath.startsWith('/') ? appPath : `/${appPath}`\n\tconst contemberDsn = process.argv.find(it => it.includes('contember://')) || process.env.CONTEMBER_DSN\n\tconst projectName = extractProjectNameFromDsn(contemberDsn)\n\n\tconst defineConfig = projectName\n\t\t? { 'import.meta.env.VITE_CONTEMBER_ADMIN_PROJECT_NAME': JSON.stringify(projectName) }\n\t\t: {}\n\n\treturn {\n\t\tname: 'contember',\n\n\t\tconfig(config) {\n\t\t\treturn {\n\t\t\t\tdefine: defineConfig,\n\t\t\t\tbase: '/',\n\t\t\t\t...config,\n\t\t\t\tbuild: {\n\t\t\t\t\tsourcemap: true,\n\t\t\t\t\t...config.build,\n\t\t\t\t\trollupOptions: {\n\t\t\t\t\t\t...config.build?.rollupOptions,\n\t\t\t\t\t\tinput: config.build?.rollupOptions?.input ?? {\n\t\t\t\t\t\t\troot: './index.html',\n\t\t\t\t\t\t\tapp: `.${normalizedAppPath}/index.html`,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\n\t\tconfigureServer(server) {\n\t\t\tif (disableMiddleware) return\n\n\t\t\tserver.middlewares.use((req, res, next) => {\n\t\t\t\tconst [pathname] = req.url?.split('?') ?? []\n\n\t\t\t\tconst isSpaRoute = pathname === normalizedAppPath ||\n\t\t\t\t\t(pathname.startsWith(`${normalizedAppPath}/`) && !pathname.match(/\\.\\w+$/))\n\n\t\t\t\tif (isSpaRoute) {\n\t\t\t\t\treq.url = `${normalizedAppPath}/`\n\t\t\t\t}\n\n\t\t\t\tnext()\n\t\t\t})\n\t\t},\n\n\t\ttransformIndexHtml: buildVersion\n\t\t\t? {\n\t\t\t\torder: 'post',\n\t\t\t\thandler: (html, ctx) => {\n\t\t\t\t\t// Skip in dev server unless explicitly enabled\n\t\t\t\t\tif (ctx.server && options?.buildVersion !== true) {\n\t\t\t\t\t\treturn { html, tags: [] }\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\thtml,\n\t\t\t\t\t\ttags: [createBuildVersionTag(html)],\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t}\n\t\t\t: undefined,\n\t}\n}\n\nexport default contember\n"],"names":["createHash"],"mappings":";;;AAqBA,MAAM,4BAA4B,CAAC,QAA4B;AAC1D,MAAA,CAAC,IAAY,QAAA;AAEb,MAAA;AACH,WAAO,IAAI,IAAI,GAAG,EAAE,YAAY;AAAA,WACxB,GAAG;AACH,YAAA,KAAK,iCAAiC,GAAG;AAC1C,WAAA;AAAA,EAAA;AAET;AAEA,MAAM,wBAAwB,CAAC,SAI1B;AACE,QAAA,WAAWA,kBAAW,KAAK,EAAE,OAAO,IAAI,EAAE,OAAO,KAAK;AACrD,SAAA;AAAA,IACN,KAAK;AAAA,IACL,UAAU;AAAA,IACV,OAAO;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IAAA;AAAA,EAEX;AACD;AAwBa,MAAA,YAAY,CAAC,YAAuC;AAC1D,QAAA;AAAA,IACL,UAAU;AAAA,IACV,eAAe,QAAQ,IAAI,aAAa;AAAA,IACxC,oBAAoB;AAAA,EACrB,IAAI,WAAW,CAAC;AAEhB,QAAM,oBAAoB,QAAQ,WAAW,GAAG,IAAI,UAAU,IAAI,OAAO;AACnE,QAAA,eAAe,QAAQ,KAAK,KAAK,CAAA,OAAM,GAAG,SAAS,cAAc,CAAC,KAAK,QAAQ,IAAI;AACnF,QAAA,cAAc,0BAA0B,YAAY;AAEpD,QAAA,eAAe,cAClB,EAAE,qDAAqD,KAAK,UAAU,WAAW,EAAE,IACnF,CAAC;AAEG,SAAA;AAAA,IACN,MAAM;AAAA,IAEN,OAAO,QAAQ;AACP,aAAA;AAAA,QACN,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,GAAG;AAAA,QACH,OAAO;AAAA,UACN,WAAW;AAAA,UACX,GAAG,OAAO;AAAA,UACV,eAAe;AAAA,YACd,GAAG,OAAO,OAAO;AAAA,YACjB,OAAO,OAAO,OAAO,eAAe,SAAS;AAAA,cAC5C,MAAM;AAAA,cACN,KAAK,IAAI,iBAAiB;AAAA,YAAA;AAAA,UAC3B;AAAA,QACD;AAAA,MAEF;AAAA,IACD;AAAA,IAEA,gBAAgB,QAAQ;AACvB,UAAI,kBAAmB;AAEvB,aAAO,YAAY,IAAI,CAAC,KAAK,KAAK,SAAS;AACpC,cAAA,CAAC,QAAQ,IAAI,IAAI,KAAK,MAAM,GAAG,KAAK,CAAC;AAE3C,cAAM,aAAa,aAAa,qBAC9B,SAAS,WAAW,GAAG,iBAAiB,GAAG,KAAK,CAAC,SAAS,MAAM,QAAQ;AAE1E,YAAI,YAAY;AACX,cAAA,MAAM,GAAG,iBAAiB;AAAA,QAAA;AAG1B,aAAA;AAAA,MAAA,CACL;AAAA,IACF;AAAA,IAEA,oBAAoB,eACjB;AAAA,MACD,OAAO;AAAA,MACP,SAAS,CAAC,MAAM,QAAQ;AAEvB,YAAI,IAAI,UAAU,SAAS,iBAAiB,MAAM;AACjD,iBAAO,EAAE,MAAM,MAAM,GAAG;AAAA,QAAA;AAGlB,eAAA;AAAA,UACN;AAAA,UACA,MAAM,CAAC,sBAAsB,IAAI,CAAC;AAAA,QACnC;AAAA,MAAA;AAAA,IACD,IAEC;AAAA,EACJ;AACD;;;"}
|
package/dist/production/index.js
CHANGED
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
const extractProjectNameFromDsn = (dsn) => {
|
|
3
|
+
if (!dsn) return null;
|
|
4
|
+
try {
|
|
5
|
+
return new URL(dsn).username || null;
|
|
6
|
+
} catch (e) {
|
|
7
|
+
console.warn("Invalid Contember DSN format:", dsn);
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const createBuildVersionTag = (html) => {
|
|
12
|
+
const fileHash = createHash("md5").update(html).digest("hex");
|
|
13
|
+
return {
|
|
14
|
+
tag: "meta",
|
|
15
|
+
injectTo: "head",
|
|
16
|
+
attrs: {
|
|
17
|
+
name: "contember-build-version",
|
|
18
|
+
content: fileHash
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
const contember = (options) => {
|
|
23
|
+
const {
|
|
24
|
+
appPath = "/app",
|
|
25
|
+
buildVersion = process.env.NODE_ENV === "production",
|
|
26
|
+
disableMiddleware = false
|
|
27
|
+
} = options || {};
|
|
28
|
+
const normalizedAppPath = appPath.startsWith("/") ? appPath : `/${appPath}`;
|
|
29
|
+
const contemberDsn = process.argv.find((it) => it.includes("contember://")) || process.env.CONTEMBER_DSN;
|
|
30
|
+
const projectName = extractProjectNameFromDsn(contemberDsn);
|
|
31
|
+
const defineConfig = projectName ? { "import.meta.env.VITE_CONTEMBER_ADMIN_PROJECT_NAME": JSON.stringify(projectName) } : {};
|
|
9
32
|
return {
|
|
10
33
|
name: "contember",
|
|
11
34
|
config(config) {
|
|
@@ -20,47 +43,37 @@ function contember(options) {
|
|
|
20
43
|
...config.build?.rollupOptions,
|
|
21
44
|
input: config.build?.rollupOptions?.input ?? {
|
|
22
45
|
root: "./index.html",
|
|
23
|
-
app: `.${
|
|
46
|
+
app: `.${normalizedAppPath}/index.html`
|
|
24
47
|
}
|
|
25
48
|
}
|
|
26
49
|
}
|
|
27
50
|
};
|
|
28
51
|
},
|
|
29
|
-
configureServer(
|
|
30
|
-
if (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
52
|
+
configureServer(server) {
|
|
53
|
+
if (disableMiddleware) return;
|
|
54
|
+
server.middlewares.use((req, res, next) => {
|
|
55
|
+
const [pathname] = req.url?.split("?") ?? [];
|
|
56
|
+
const isSpaRoute = pathname === normalizedAppPath || pathname.startsWith(`${normalizedAppPath}/`) && !pathname.match(/\.\w+$/);
|
|
57
|
+
if (isSpaRoute) {
|
|
58
|
+
req.url = `${normalizedAppPath}/`;
|
|
59
|
+
}
|
|
60
|
+
next();
|
|
61
|
+
});
|
|
39
62
|
},
|
|
40
|
-
transformIndexHtml:
|
|
63
|
+
transformIndexHtml: buildVersion ? {
|
|
41
64
|
order: "post",
|
|
42
65
|
handler: (html, ctx) => {
|
|
43
66
|
if (ctx.server && options?.buildVersion !== true) {
|
|
44
67
|
return { html, tags: [] };
|
|
45
68
|
}
|
|
46
|
-
const fileHash = createHash("md5").update(html).digest().toString("hex");
|
|
47
69
|
return {
|
|
48
70
|
html,
|
|
49
|
-
tags: [
|
|
50
|
-
{
|
|
51
|
-
tag: "meta",
|
|
52
|
-
injectTo: "head",
|
|
53
|
-
attrs: {
|
|
54
|
-
name: "contember-build-version",
|
|
55
|
-
content: fileHash
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
]
|
|
71
|
+
tags: [createBuildVersionTag(html)]
|
|
59
72
|
};
|
|
60
73
|
}
|
|
61
|
-
}
|
|
74
|
+
} : void 0
|
|
62
75
|
};
|
|
63
|
-
}
|
|
76
|
+
};
|
|
64
77
|
export {
|
|
65
78
|
contember,
|
|
66
79
|
contember as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../packages/vite-plugin/src/index.ts"],"sourcesContent":["import { createHash } from 'node:crypto'\nimport { Plugin } from 'vite'\n\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../packages/vite-plugin/src/index.ts"],"sourcesContent":["import { createHash } from 'node:crypto'\nimport { Plugin } from 'vite'\n\n/**\n * Configuration options for the Contember Vite plugin\n */\nexport type ContemberOptions = {\n\t/**\n\t * Add build version meta tag (defaults to true in production)\n\t */\n\tbuildVersion?: boolean\n\t/**\n\t * Disable SPA routing middleware\n\t */\n\tdisableMiddleware?: boolean\n\t/**\n\t * Path to the app (defaults to '/app')\n\t */\n\tappPath?: string\n}\n\nconst extractProjectNameFromDsn = (dsn: string | undefined) => {\n\tif (!dsn) return null\n\n\ttry {\n\t\treturn new URL(dsn).username || null\n\t} catch (e) {\n\t\tconsole.warn('Invalid Contember DSN format:', dsn)\n\t\treturn null\n\t}\n}\n\nconst createBuildVersionTag = (html: string): {\n\ttag: string\n\tinjectTo: 'head'\n\tattrs: Record<string, string>\n} => {\n\tconst fileHash = createHash('md5').update(html).digest('hex')\n\treturn {\n\t\ttag: 'meta',\n\t\tinjectTo: 'head',\n\t\tattrs: {\n\t\t\tname: 'contember-build-version',\n\t\t\tcontent: fileHash,\n\t\t},\n\t}\n}\n\n/**\n * ## Contember Vite Plugin\n *\n * This plugin provides configuration enhancements for Vite when working with Contember applications.\n * It allows setting up SPA routing, injecting build version metadata, and defining project-specific environment variables.\n *\n * #### Features:\n * - Adds a build version meta tag (optional, enabled by default in production)\n * - Configures SPA routing middleware\n * - Supports defining project name from the Contember DSN\n * - Customizable app path\n *\n * #### Example Usage:\n * ```ts\n * import { defineConfig } from 'vite';\n * import contember from './contember';\n *\n * export default defineConfig({\n * plugins: [contember({ buildVersion: true, appPath: '/custom-app' })],\n * });\n * ```\n */\nexport const contember = (options?: ContemberOptions): Plugin => {\n\tconst {\n\t\tappPath = '/app',\n\t\tbuildVersion = process.env.NODE_ENV === 'production',\n\t\tdisableMiddleware = false,\n\t} = options || {}\n\n\tconst normalizedAppPath = appPath.startsWith('/') ? appPath : `/${appPath}`\n\tconst contemberDsn = process.argv.find(it => it.includes('contember://')) || process.env.CONTEMBER_DSN\n\tconst projectName = extractProjectNameFromDsn(contemberDsn)\n\n\tconst defineConfig = projectName\n\t\t? { 'import.meta.env.VITE_CONTEMBER_ADMIN_PROJECT_NAME': JSON.stringify(projectName) }\n\t\t: {}\n\n\treturn {\n\t\tname: 'contember',\n\n\t\tconfig(config) {\n\t\t\treturn {\n\t\t\t\tdefine: defineConfig,\n\t\t\t\tbase: '/',\n\t\t\t\t...config,\n\t\t\t\tbuild: {\n\t\t\t\t\tsourcemap: true,\n\t\t\t\t\t...config.build,\n\t\t\t\t\trollupOptions: {\n\t\t\t\t\t\t...config.build?.rollupOptions,\n\t\t\t\t\t\tinput: config.build?.rollupOptions?.input ?? {\n\t\t\t\t\t\t\troot: './index.html',\n\t\t\t\t\t\t\tapp: `.${normalizedAppPath}/index.html`,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\n\t\tconfigureServer(server) {\n\t\t\tif (disableMiddleware) return\n\n\t\t\tserver.middlewares.use((req, res, next) => {\n\t\t\t\tconst [pathname] = req.url?.split('?') ?? []\n\n\t\t\t\tconst isSpaRoute = pathname === normalizedAppPath ||\n\t\t\t\t\t(pathname.startsWith(`${normalizedAppPath}/`) && !pathname.match(/\\.\\w+$/))\n\n\t\t\t\tif (isSpaRoute) {\n\t\t\t\t\treq.url = `${normalizedAppPath}/`\n\t\t\t\t}\n\n\t\t\t\tnext()\n\t\t\t})\n\t\t},\n\n\t\ttransformIndexHtml: buildVersion\n\t\t\t? {\n\t\t\t\torder: 'post',\n\t\t\t\thandler: (html, ctx) => {\n\t\t\t\t\t// Skip in dev server unless explicitly enabled\n\t\t\t\t\tif (ctx.server && options?.buildVersion !== true) {\n\t\t\t\t\t\treturn { html, tags: [] }\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\thtml,\n\t\t\t\t\t\ttags: [createBuildVersionTag(html)],\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t}\n\t\t\t: undefined,\n\t}\n}\n\nexport default contember\n"],"names":[],"mappings":";AAqBA,MAAM,4BAA4B,CAAC,QAA4B;AAC1D,MAAA,CAAC,IAAY,QAAA;AAEb,MAAA;AACH,WAAO,IAAI,IAAI,GAAG,EAAE,YAAY;AAAA,WACxB,GAAG;AACH,YAAA,KAAK,iCAAiC,GAAG;AAC1C,WAAA;AAAA,EAAA;AAET;AAEA,MAAM,wBAAwB,CAAC,SAI1B;AACE,QAAA,WAAW,WAAW,KAAK,EAAE,OAAO,IAAI,EAAE,OAAO,KAAK;AACrD,SAAA;AAAA,IACN,KAAK;AAAA,IACL,UAAU;AAAA,IACV,OAAO;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IAAA;AAAA,EAEX;AACD;AAwBa,MAAA,YAAY,CAAC,YAAuC;AAC1D,QAAA;AAAA,IACL,UAAU;AAAA,IACV,eAAe,QAAQ,IAAI,aAAa;AAAA,IACxC,oBAAoB;AAAA,EACrB,IAAI,WAAW,CAAC;AAEhB,QAAM,oBAAoB,QAAQ,WAAW,GAAG,IAAI,UAAU,IAAI,OAAO;AACnE,QAAA,eAAe,QAAQ,KAAK,KAAK,CAAA,OAAM,GAAG,SAAS,cAAc,CAAC,KAAK,QAAQ,IAAI;AACnF,QAAA,cAAc,0BAA0B,YAAY;AAEpD,QAAA,eAAe,cAClB,EAAE,qDAAqD,KAAK,UAAU,WAAW,EAAE,IACnF,CAAC;AAEG,SAAA;AAAA,IACN,MAAM;AAAA,IAEN,OAAO,QAAQ;AACP,aAAA;AAAA,QACN,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,GAAG;AAAA,QACH,OAAO;AAAA,UACN,WAAW;AAAA,UACX,GAAG,OAAO;AAAA,UACV,eAAe;AAAA,YACd,GAAG,OAAO,OAAO;AAAA,YACjB,OAAO,OAAO,OAAO,eAAe,SAAS;AAAA,cAC5C,MAAM;AAAA,cACN,KAAK,IAAI,iBAAiB;AAAA,YAAA;AAAA,UAC3B;AAAA,QACD;AAAA,MAEF;AAAA,IACD;AAAA,IAEA,gBAAgB,QAAQ;AACvB,UAAI,kBAAmB;AAEvB,aAAO,YAAY,IAAI,CAAC,KAAK,KAAK,SAAS;AACpC,cAAA,CAAC,QAAQ,IAAI,IAAI,KAAK,MAAM,GAAG,KAAK,CAAC;AAE3C,cAAM,aAAa,aAAa,qBAC9B,SAAS,WAAW,GAAG,iBAAiB,GAAG,KAAK,CAAC,SAAS,MAAM,QAAQ;AAE1E,YAAI,YAAY;AACX,cAAA,MAAM,GAAG,iBAAiB;AAAA,QAAA;AAG1B,aAAA;AAAA,MAAA,CACL;AAAA,IACF;AAAA,IAEA,oBAAoB,eACjB;AAAA,MACD,OAAO;AAAA,MACP,SAAS,CAAC,MAAM,QAAQ;AAEvB,YAAI,IAAI,UAAU,SAAS,iBAAiB,MAAM;AACjD,iBAAO,EAAE,MAAM,MAAM,GAAG;AAAA,QAAA;AAGlB,eAAA;AAAA,UACN;AAAA,UACA,MAAM,CAAC,sBAAsB,IAAI,CAAC;AAAA,QACnC;AAAA,MAAA;AAAA,IACD,IAEC;AAAA,EACJ;AACD;"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,43 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Configuration options for the Contember Vite plugin
|
|
4
|
+
*/
|
|
5
|
+
export type ContemberOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* Add build version meta tag (defaults to true in production)
|
|
8
|
+
*/
|
|
3
9
|
buildVersion?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Disable SPA routing middleware
|
|
12
|
+
*/
|
|
4
13
|
disableMiddleware?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Path to the app (defaults to '/app')
|
|
16
|
+
*/
|
|
5
17
|
appPath?: string;
|
|
6
18
|
};
|
|
7
|
-
|
|
19
|
+
/**
|
|
20
|
+
* ## Contember Vite Plugin
|
|
21
|
+
*
|
|
22
|
+
* This plugin provides configuration enhancements for Vite when working with Contember applications.
|
|
23
|
+
* It allows setting up SPA routing, injecting build version metadata, and defining project-specific environment variables.
|
|
24
|
+
*
|
|
25
|
+
* #### Features:
|
|
26
|
+
* - Adds a build version meta tag (optional, enabled by default in production)
|
|
27
|
+
* - Configures SPA routing middleware
|
|
28
|
+
* - Supports defining project name from the Contember DSN
|
|
29
|
+
* - Customizable app path
|
|
30
|
+
*
|
|
31
|
+
* #### Example Usage:
|
|
32
|
+
* ```ts
|
|
33
|
+
* import { defineConfig } from 'vite';
|
|
34
|
+
* import contember from './contember';
|
|
35
|
+
*
|
|
36
|
+
* export default defineConfig({
|
|
37
|
+
* plugins: [contember({ buildVersion: true, appPath: '/custom-app' })],
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare const contember: (options?: ContemberOptions) => Plugin;
|
|
8
42
|
export default contember;
|
|
9
43
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAE7B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAE7B;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AA6BD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,SAAS,GAAI,UAAU,gBAAgB,KAAG,MAuEtD,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../../node_modules/typescript/lib/lib.esnext.string.d.ts","../../../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../../node_modules/typescript/lib/lib.esnext.object.d.ts","../../../../node_modules/typescript/lib/lib.esnext.regexp.d.ts","../../../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../node_modules/@types/react/global.d.ts","../../../../node_modules/csstype/index.d.ts","../../../../node_modules/@types/prop-types/index.d.ts","../../../../node_modules/@types/react/index.d.ts","../../../../node_modules/@types/react/jsx-runtime.d.ts","../../../../node_modules/@types/node/ts5.6/globals.typedarray.d.ts","../../../../node_modules/@types/node/ts5.6/buffer.buffer.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/buffer/index.d.ts","../../../../node_modules/undici-types/header.d.ts","../../../../node_modules/undici-types/readable.d.ts","../../../../node_modules/undici-types/file.d.ts","../../../../node_modules/undici-types/fetch.d.ts","../../../../node_modules/undici-types/formdata.d.ts","../../../../node_modules/undici-types/connector.d.ts","../../../../node_modules/undici-types/client.d.ts","../../../../node_modules/undici-types/errors.d.ts","../../../../node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/undici-types/global-origin.d.ts","../../../../node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/undici-types/pool.d.ts","../../../../node_modules/undici-types/handlers.d.ts","../../../../node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/undici-types/agent.d.ts","../../../../node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/undici-types/mock-client.d.ts","../../../../node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../../node_modules/undici-types/retry-handler.d.ts","../../../../node_modules/undici-types/retry-agent.d.ts","../../../../node_modules/undici-types/api.d.ts","../../../../node_modules/undici-types/interceptors.d.ts","../../../../node_modules/undici-types/util.d.ts","../../../../node_modules/undici-types/cookies.d.ts","../../../../node_modules/undici-types/patch.d.ts","../../../../node_modules/undici-types/websocket.d.ts","../../../../node_modules/undici-types/eventsource.d.ts","../../../../node_modules/undici-types/filereader.d.ts","../../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/undici-types/content-type.d.ts","../../../../node_modules/undici-types/cache.d.ts","../../../../node_modules/undici-types/index.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/dom-events.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/sea.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/ts5.6/index.d.ts","../../../../node_modules/@types/estree/index.d.ts","../../../../node_modules/rollup/dist/rollup.d.ts","../../../../node_modules/vite/types/hmrPayload.d.ts","../../../../node_modules/vite/types/customEvent.d.ts","../../../../node_modules/vite/types/hot.d.ts","../../../../node_modules/vite/dist/node/types.d-aGj9QkWt.d.ts","../../../../node_modules/vite/node_modules/esbuild/lib/main.d.ts","../../../../node_modules/source-map-js/source-map.d.ts","../../../../node_modules/postcss/lib/previous-map.d.ts","../../../../node_modules/postcss/lib/input.d.ts","../../../../node_modules/postcss/lib/css-syntax-error.d.ts","../../../../node_modules/postcss/lib/declaration.d.ts","../../../../node_modules/postcss/lib/root.d.ts","../../../../node_modules/postcss/lib/warning.d.ts","../../../../node_modules/postcss/lib/lazy-result.d.ts","../../../../node_modules/postcss/lib/no-work-result.d.ts","../../../../node_modules/postcss/lib/processor.d.ts","../../../../node_modules/postcss/lib/result.d.ts","../../../../node_modules/postcss/lib/document.d.ts","../../../../node_modules/postcss/lib/rule.d.ts","../../../../node_modules/postcss/lib/node.d.ts","../../../../node_modules/postcss/lib/comment.d.ts","../../../../node_modules/postcss/lib/container.d.ts","../../../../node_modules/postcss/lib/at-rule.d.ts","../../../../node_modules/postcss/lib/list.d.ts","../../../../node_modules/postcss/lib/postcss.d.ts","../../../../node_modules/vite/dist/node/runtime.d.ts","../../../../node_modules/vite/types/importGlob.d.ts","../../../../node_modules/vite/types/metadata.d.ts","../../../../node_modules/vite/dist/node/index.d.ts","../../src/index.ts"],"fileIdsList":[[81,124],[81,82,124],[81,123,124],[81,124,129,158],[81,124,125,130,136,137,144,155,166],[81,124,125,126,136,144],[81,124,127,167],[81,124,128,129,137,145],[81,124,129,155,163],[81,124,130,132,136,144],[81,123,124,131],[81,124,132,133],[81,124,136],[81,124,134,136],[81,123,124,136],[81,124,136,137,138,155,166],[81,124,136,137,138,151,155,158],[81,121,124,171],[81,124,132,136,139,144,155,166],[81,124,136,137,139,140,144,155,163,166],[81,124,139,141,155,163,166],[81,124,136,142],[81,124,143,166,171],[81,124,132,136,144,155],[81,124,145],[81,124,146],[81,123,124,147],[81,82,83,123,124,125,126,127,128,129,130,131,132,133,134,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172],[81,124,149],[81,124,150],[81,124,136,151,152],[81,124,151,153,167,169],[81,124,136,155,156,157,158],[81,124,155,157],[81,124,155,156],[81,124,158],[81,124,159],[81,82,124,155],[81,124,136,161,162],[81,124,161,162],[81,124,129,144,155,163],[81,124,164],[124],[80,81,82,83,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173],[81,124,144,165],[81,124,139,150,166],[81,124,129,167],[81,124,155,168],[81,124,143,169],[81,124,170],[81,124,129,136,138,147,155,166,169,171],[81,124,155,172],[75,76,77,81,124],[78,81,124],[81,124,197],[81,124,195,197],[81,124,186,194,195,196,198],[81,124,184],[81,124,187,192,197,200],[81,124,183,200],[81,124,187,188,191,192,193,200],[81,124,187,188,189,191,192,200],[81,124,184,185,186,187,188,192,193,194,196,197,198,200],[81,124,182,184,185,186,187,188,189,191,192,193,194,195,196,197,198,199],[81,124,182,200],[81,124,187,189,190,192,193,200],[81,124,191,200],[81,124,192,193,197,200],[81,124,185,195],[81,124,175,176],[81,93,97,124,166],[81,93,124,155,166],[81,88,124],[81,90,93,124,163,166],[81,124,144,163],[81,124,174],[81,88,124,174],[81,90,93,124,144,166],[81,85,86,89,92,124,136,155,166],[81,93,100,124],[81,85,91,124],[81,93,114,115,124],[81,89,93,124,158,166,174],[81,114,124,174],[81,87,88,124,174],[81,93,124],[81,87,88,89,90,91,92,93,94,95,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,115,116,117,118,119,120,124],[81,93,108,124],[81,93,100,101,124],[81,91,93,101,102,124],[81,92,124],[81,85,88,93,124],[81,93,97,101,102,124],[81,97,124],[81,91,93,96,124,166],[81,85,90,93,100,124],[81,124,155],[81,88,93,114,124,171,174],[81,124,136,137,139,140,141,144,155,163,166,172,174,176,177,178,179,180,181,200,201,202,203],[81,124,177,178,179,180],[81,124,177,178,179],[81,124,177],[81,124,178],[81,124,176],[79,81,124,129,204]],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"abee51ebffafd50c07d76be5848a34abfe4d791b5745ef1e5648718722fab924","impliedFormat":1},{"version":"9e8ca8ed051c2697578c023d9c29d6df689a083561feba5c14aedee895853999","affectsGlobalScope":true,"impliedFormat":1},{"version":"69e65d976bf166ce4a9e6f6c18f94d2424bf116e90837ace179610dbccad9b42","affectsGlobalScope":true,"impliedFormat":1},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"45d8ccb3dfd57355eb29749919142d4321a0aa4df6acdfc54e30433d7176600a","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1a94697425a99354df73d9c8291e2ecd4dddd370aed4023c2d6dee6cccb32666","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3f9fc0ec0b96a9e642f11eda09c0be83a61c7b336977f8b9fdb1e9788e925fe","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true,"impliedFormat":1},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"15c1c3d7b2e46e0025417ed6d5f03f419e57e6751f87925ca19dc88297053fe6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d540251809289a05349b70ab5f4b7b99f922af66ab3c39ba56a475dcf95d5ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"0b11f3ca66aa33124202c80b70cd203219c3d4460cfc165e0707aa9ec710fc53","affectsGlobalScope":true,"impliedFormat":1},{"version":"6a3f5a0129cc80cf439ab71164334d649b47059a4f5afca90282362407d0c87f","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"61d6a2092f48af66dbfb220e31eea8b10bc02b6932d6e529005fd2d7b3281290","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"65ff5a0aefd7817a03c1ad04fee85c9cdd3ec415cc3c9efec85d8008d4d5e4ee","impliedFormat":1},{"version":"aea201321e7df78b294c9c39c61503ed81fb73b1b1703240013b557dfa25b016","affectsGlobalScope":true,"impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"613b21ccdf3be6329d56e6caa13b258c842edf8377be7bc9f014ed14cdcfc308","affectsGlobalScope":true,"impliedFormat":1},{"version":"2d1319e6b5d0efd8c5eae07eb864a00102151e8b9afddd2d45db52e9aae002c4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2db0dd3aaa2ed285950273ce96ae8a450b45423aa9da2d10e194570f1233fa6b","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"4eedea23b8a843ec0fd51a384fb6b9fe1bc89198f713d0465c2c8392a9d51271","affectsGlobalScope":true,"impliedFormat":1},{"version":"3d77c73be94570813f8cadd1f05ebc3dc5e2e4fdefe4d340ca20cd018724ee36","impliedFormat":1},{"version":"d674383111e06b6741c4ad2db962131b5b0fa4d0294b998566c635e86195a453","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3e58c4c18a031cbb17abec7a4ad0bd5ae9fc70c1f4ba1e7fb921ad87c504aca","impliedFormat":1},{"version":"a3e8bafb2af8e850c644f4be7f5156cf7d23b7bfdc3b786bd4d10ed40329649c","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"c521f961c1606c94dc831992e659f426b6def6e2e6e327ee25d3c642eb393f95","affectsGlobalScope":true,"impliedFormat":1},{"version":"b0c0d1d13be149f790a75b381b413490f98558649428bb916fd2d71a3f47a134","impliedFormat":1},{"version":"3c884d9d9ec454bdf0d5a0b8465bf8297d2caa4d853851d92cc417ac6f30b969","impliedFormat":1},{"version":"5a369483ac4cfbdf0331c248deeb36140e6907db5e1daed241546b4a2055f82c","impliedFormat":1},{"version":"e8f5b5cc36615c17d330eaf8eebbc0d6bdd942c25991f96ef122f246f4ff722f","impliedFormat":1},{"version":"f0bd7e6d931657b59605c44112eaf8b980ba7f957a5051ed21cb93d978cf2f45","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"f0de0233242682db9ac13efa0ddbb456a41abe6f291211b40ba3aa766b03e9b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"596572d40c1f13d8b57920d6d1a77c5ec6fe4952dc157f416f04a801cd3e2678","impliedFormat":1},{"version":"ad23fd126ff06e72728dd7bfc84326a8ca8cec2b9d2dac0193d42a777df0e7d8","impliedFormat":1},{"version":"a55fd4d49da86d2cc19de575beb1515184e55f5f3165e1482ff02fd99f900b5c","impliedFormat":1},{"version":"93bd413918fa921c8729cef45302b24d8b6c7855d72d5bf82d3972595ae8dcbf","impliedFormat":1},{"version":"4ff41188773cbf465807dd2f7059c7494cbee5115608efc297383832a1150c43","impliedFormat":1},{"version":"dccdf1677e531e33f8ac961a68bc537418c9a414797c1ea7e91307501cdc3f5e","impliedFormat":1},{"version":"7edec695cdb707c7146ac34c44ca364469c7ea504344b3206c686e79f61b61a2","affectsGlobalScope":true,"impliedFormat":1},{"version":"d206b4baf4ddcc15d9d69a9a2f4999a72a2c6adeaa8af20fa7a9960816287555","impliedFormat":1},{"version":"93f437e1398a4f06a984f441f7fa7a9f0535c04399619b5c22e0b87bdee182cb","impliedFormat":1},{"version":"d1b1295af3667779be43eb6d4fbaa342e656aa2c4b77a4ad3cf42ec55baeea00","impliedFormat":1},{"version":"70731d10d5311bd4cf710ef7f6539b62660f4b0bfdbb3f9fbe1d25fe6366a7fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"a20f1e119615bf7632729fd89b6c0b5ffdc2df3b512d6304146294528e3ebe19","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e043a1bc8fbf2a255bccf9bf27e0f1caf916c3b0518ea34aa72357c0afd42ec","impliedFormat":1},{"version":"137c2894e8f3e9672d401cc0a305dc7b1db7c69511cf6d3970fb53302f9eae09","impliedFormat":1},{"version":"dd9492e12a57068f08d70cb5eb5ceb39fa5bcf23be01af574270aeee95b982af","impliedFormat":1},{"version":"e432b0e3761ca9ba734bdd41e19a75fec1454ca8e9769bfdf8b31011854cf06a","impliedFormat":1},{"version":"f9d9d753d430ed050dc1bf2667a1bab711ccbb1c1507183d794cc195a5b085cc","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"78955c9259da94920609be3e589fc9253268b3fffa822e1e31d28ee2ce0b8a74","impliedFormat":1},{"version":"269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"73aa178e8fb1449ef3666093d8dca25f96302a80ee45f8ff027df8e4792bf9fd","affectsGlobalScope":true,"impliedFormat":1},{"version":"1851a3b4db78664f83901bb9cac9e45e03a37bb5933cc5bf37e10bb7e91ab4eb","impliedFormat":1},{"version":"fdedf82878e4c744bc2a1c1e802ae407d63474da51f14a54babe039018e53d8f","affectsGlobalScope":true,"impliedFormat":1},{"version":"08353b04a3501d84fc8d7b49de99f6c1cc26026e6d9d697a18315f3bfe92ed03","affectsGlobalScope":true,"impliedFormat":1},{"version":"578d8bb6dcb2a1c03c4c3f8eb71abc9677e1a5c788b7f24848e3138ce17f3400","impliedFormat":1},{"version":"4f029899f9bae07e225c43aef893590541b2b43267383bf5e32e3a884d219ed5","impliedFormat":1},{"version":"ae56f65caf3be91108707bd8dfbccc2a57a91feb5daabf7165a06a945545ed26","impliedFormat":1},{"version":"a136d5de521da20f31631a0a96bf712370779d1c05b7015d7019a9b2a0446ca9","impliedFormat":1},{"version":"710ad93f8de29dc15e5892aa735e72348b62f40a6d1220f2849837d332f92885","affectsGlobalScope":true,"impliedFormat":1},{"version":"1f1da5d682cdb628890e4a8578fb9e8ab332e6a1a4b3a13fce08b7b4d45d192a","affectsGlobalScope":true,"impliedFormat":1},{"version":"efeedd8bbc5c0d53e760d8b120a010470722982e6ae14de8d1bcff66ebc2ae71","impliedFormat":1},{"version":"b718a94332858862943630649a310d6f8e9a09f86ae7215d8554e75bbbfd7817","impliedFormat":1},{"version":"d91a7d8b5655c42986f1bdfe2105c4408f472831c8f20cf11a8c3345b6b56c8c","impliedFormat":1},{"version":"616075a6ac578cf5a013ee12964188b4412823796ce0b202c6f1d2e4ca8480d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"e8a979b8af001c9fc2e774e7809d233c8ca955a28756f52ee5dee88ccb0611d2","impliedFormat":1},{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},{"version":"483bb10b755f3572526fd76d9481221e8dc30568edcc1a9cc73479d8874bd16d","impliedFormat":1},{"version":"785b9d575b49124ce01b46f5b9402157c7611e6532effa562ac6aebec0074dfc","impliedFormat":1},{"version":"068edc96705c11c7ff5adb82c57ee2212d2379bf52f088542abcdcecfcc7b500","affectsGlobalScope":true,"impliedFormat":1},{"version":"282f98006ed7fa9bb2cd9bdbe2524595cfc4bcd58a0bb3232e4519f2138df811","impliedFormat":1},{"version":"6222e987b58abfe92597e1273ad7233626285bc2d78409d4a7b113d81a83496b","impliedFormat":1},{"version":"cbe726263ae9a7bf32352380f7e8ab66ee25b3457137e316929269c19e18a2be","impliedFormat":1},{"version":"8b96046bf5fb0a815cba6b0880d9f97b7f3a93cf187e8dcfe8e2792e97f38f87","impliedFormat":99},{"version":"bacf2c84cf448b2cd02c717ad46c3d7fd530e0c91282888c923ad64810a4d511","affectsGlobalScope":true,"impliedFormat":1},{"version":"402e5c534fb2b85fa771170595db3ac0dd532112c8fa44fc23f233bc6967488b","impliedFormat":1},{"version":"8885cf05f3e2abf117590bbb951dcf6359e3e5ac462af1c901cfd24c6a6472e2","impliedFormat":1},{"version":"4d979e3c12ffb6497d2b1dc5613130196d986fff764c4526360c0716a162e7e7","impliedFormat":1},{"version":"e61df3640a38d535fd4bc9f4a53aef17c296b58dc4b6394fd576b808dd2fe5e6","impliedFormat":1},{"version":"80781460eca408fe8d2937d9fdbbb780d6aac35f549621e6200c9bee1da5b8fe","impliedFormat":1},{"version":"4719c209b9c00b579553859407a7e5dcfaa1c472994bd62aa5dd3cc0757eb077","impliedFormat":1},{"version":"7ec359bbc29b69d4063fe7dad0baaf35f1856f914db16b3f4f6e3e1bca4099fa","impliedFormat":1},{"version":"b9261ac3e9944d3d72c5ee4cf888ad35d9743a5563405c6963c4e43ee3708ca4","impliedFormat":1},{"version":"c84fd54e8400def0d1ef1569cafd02e9f39a622df9fa69b57ccc82128856b916","impliedFormat":1},{"version":"a022503e75d6953d0e82c2c564508a5c7f8556fad5d7f971372d2d40479e4034","impliedFormat":1},{"version":"2ed6489ef46eb61442d067c08e87e3db501c0bfb2837eee4041a27bf3e792bb0","impliedFormat":1},{"version":"644491cde678bd462bb922c1d0cfab8f17d626b195ccb7f008612dc31f445d2d","impliedFormat":1},{"version":"d60fe6d59d4e19ecc65359490b8535e359ca4b760d2cdb56897ca75d09d41ba3","impliedFormat":1},{"version":"f45a2a8b1777ecb50ed65e1a04bb899d4b676529b7921bd5d69b08573a00c832","impliedFormat":1},{"version":"774b783046ba3d473948132d28a69f52a295b2f378f2939304118ba571b1355e","impliedFormat":1},{"version":"b5734e05c787a40e4f9efe71f16683c5f7dc3bdb0de7c04440c855bd000f8fa7","impliedFormat":1},{"version":"14ba97f0907144771331e1349fdccb5a13526eba0647e6b447e572376d811b6f","impliedFormat":1},{"version":"2a771d907aebf9391ac1f50e4ad37952943515eeea0dcc7e78aa08f508294668","impliedFormat":1},{"version":"7165050eddaed878c2d2cd3cafcaf171072ac39e586a048c0603712b5555f536","impliedFormat":1},{"version":"82e687ebd99518bc63ea04b0c3810fb6e50aa6942decd0ca6f7a56d9b9a212a6","impliedFormat":99},{"version":"7f698624bbbb060ece7c0e51b7236520ebada74b747d7523c7df376453ed6fea","impliedFormat":1},{"version":"8f07f2b6514744ac96e51d7cb8518c0f4de319471237ea10cf688b8d0e9d0225","impliedFormat":1},{"version":"9ae0ca65717af0d3b554a26fd333ad9c78ad3910ad4b22140ff02acb63076927","impliedFormat":99},{"version":"f058b5e935d33c37d667d7209bf11ed862d2daca549213ac286a61af2d3f20b4","signature":"ecc0905967c41fff77baf640b0cff092413eabedabafbd922caf8030b72a19b5"}],"root":[205],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":4,"module":99,"noEmitOnError":true,"noImplicitOverride":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7,"useDefineForClassFields":true},"referencedMap":[[175,1],[82,2],[83,2],[123,3],[124,4],[125,5],[126,6],[127,7],[128,8],[129,9],[130,10],[131,11],[132,12],[133,12],[135,13],[134,14],[136,15],[137,16],[138,17],[122,18],[173,1],[139,19],[140,20],[141,21],[142,22],[143,23],[144,24],[145,25],[146,26],[147,27],[148,28],[149,29],[150,30],[151,31],[152,31],[153,32],[154,1],[155,33],[157,34],[156,35],[158,36],[159,37],[160,38],[161,39],[162,40],[163,41],[164,42],[81,43],[80,1],[174,44],[165,45],[166,46],[167,47],[168,48],[169,49],[170,50],[171,51],[172,52],[77,1],[75,1],[78,53],[79,54],[84,1],[76,1],[198,55],[196,56],[197,57],[185,58],[186,56],[193,59],[184,60],[189,61],[199,1],[190,62],[195,63],[200,64],[183,65],[191,66],[192,67],[187,68],[194,55],[188,69],[176,70],[182,1],[73,1],[74,1],[12,1],[13,1],[15,1],[14,1],[2,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[23,1],[3,1],[24,1],[4,1],[25,1],[29,1],[26,1],[27,1],[28,1],[30,1],[31,1],[32,1],[5,1],[33,1],[34,1],[35,1],[36,1],[6,1],[40,1],[37,1],[38,1],[39,1],[41,1],[7,1],[42,1],[47,1],[48,1],[43,1],[44,1],[45,1],[46,1],[8,1],[52,1],[49,1],[50,1],[51,1],[53,1],[9,1],[54,1],[55,1],[56,1],[59,1],[57,1],[58,1],[60,1],[61,1],[10,1],[62,1],[1,1],[63,1],[64,1],[11,1],[69,1],[66,1],[65,1],[72,1],[70,1],[68,1],[71,1],[67,1],[100,71],[110,72],[99,71],[120,73],[91,74],[90,75],[119,76],[113,77],[118,78],[93,79],[107,80],[92,81],[116,82],[88,83],[87,76],[117,84],[89,85],[94,86],[95,1],[98,86],[85,1],[121,87],[111,88],[102,89],[103,90],[105,91],[101,92],[104,93],[114,76],[96,94],[97,95],[106,96],[86,97],[109,88],[108,86],[112,1],[115,98],[204,99],[201,100],[180,101],[181,1],[178,102],[177,1],[179,103],[202,1],[203,104],[205,105]],"latestChangedDtsFile":"./index.d.ts","version":"5.6.3"}
|
|
1
|
+
{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../../node_modules/typescript/lib/lib.es2024.d.ts","../../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../../node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../node_modules/@types/react/global.d.ts","../../../../node_modules/csstype/index.d.ts","../../../../node_modules/@types/prop-types/index.d.ts","../../../../node_modules/@types/react/index.d.ts","../../../../node_modules/@types/react/jsx-runtime.d.ts","../../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../../node_modules/@types/node/compatibility/index.d.ts","../../../../node_modules/@types/node/globals.typedarray.d.ts","../../../../node_modules/@types/node/buffer.buffer.d.ts","../../../../node_modules/buffer/index.d.ts","../../../../node_modules/undici-types/header.d.ts","../../../../node_modules/undici-types/readable.d.ts","../../../../node_modules/undici-types/file.d.ts","../../../../node_modules/undici-types/fetch.d.ts","../../../../node_modules/undici-types/formdata.d.ts","../../../../node_modules/undici-types/connector.d.ts","../../../../node_modules/undici-types/client.d.ts","../../../../node_modules/undici-types/errors.d.ts","../../../../node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/undici-types/global-origin.d.ts","../../../../node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/undici-types/pool.d.ts","../../../../node_modules/undici-types/handlers.d.ts","../../../../node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/undici-types/agent.d.ts","../../../../node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/undici-types/mock-client.d.ts","../../../../node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../../node_modules/undici-types/retry-handler.d.ts","../../../../node_modules/undici-types/retry-agent.d.ts","../../../../node_modules/undici-types/api.d.ts","../../../../node_modules/undici-types/interceptors.d.ts","../../../../node_modules/undici-types/util.d.ts","../../../../node_modules/undici-types/cookies.d.ts","../../../../node_modules/undici-types/patch.d.ts","../../../../node_modules/undici-types/websocket.d.ts","../../../../node_modules/undici-types/eventsource.d.ts","../../../../node_modules/undici-types/filereader.d.ts","../../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/undici-types/content-type.d.ts","../../../../node_modules/undici-types/cache.d.ts","../../../../node_modules/undici-types/index.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/dom-events.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/sea.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/estree/index.d.ts","../../../../node_modules/rollup/dist/rollup.d.ts","../../../../node_modules/vite/types/hmrPayload.d.ts","../../../../node_modules/vite/types/customEvent.d.ts","../../../../node_modules/vite/types/hot.d.ts","../../../../node_modules/vite/dist/node/moduleRunnerTransport.d-CXw_Ws6P.d.ts","../../../../node_modules/vite/dist/node/module-runner.d.ts","../../../../node_modules/esbuild/lib/main.d.ts","../../../../node_modules/source-map-js/source-map.d.ts","../../../../node_modules/postcss/lib/previous-map.d.ts","../../../../node_modules/postcss/lib/input.d.ts","../../../../node_modules/postcss/lib/css-syntax-error.d.ts","../../../../node_modules/postcss/lib/declaration.d.ts","../../../../node_modules/postcss/lib/root.d.ts","../../../../node_modules/postcss/lib/warning.d.ts","../../../../node_modules/postcss/lib/lazy-result.d.ts","../../../../node_modules/postcss/lib/no-work-result.d.ts","../../../../node_modules/postcss/lib/processor.d.ts","../../../../node_modules/postcss/lib/result.d.ts","../../../../node_modules/postcss/lib/document.d.ts","../../../../node_modules/postcss/lib/rule.d.ts","../../../../node_modules/postcss/lib/node.d.ts","../../../../node_modules/postcss/lib/comment.d.ts","../../../../node_modules/postcss/lib/container.d.ts","../../../../node_modules/postcss/lib/at-rule.d.ts","../../../../node_modules/postcss/lib/list.d.ts","../../../../node_modules/postcss/lib/postcss.d.ts","../../../../node_modules/vite/types/internal/lightningcssOptions.d.ts","../../../../node_modules/vite/types/internal/cssPreprocessorOptions.d.ts","../../../../node_modules/vite/types/importGlob.d.ts","../../../../node_modules/vite/types/metadata.d.ts","../../../../node_modules/vite/dist/node/index.d.ts","../../src/index.ts"],"fileIdsList":[[91,134],[91,131,134],[91,133,134],[134],[91,134,139,168],[91,134,135,140,146,147,154,165,176],[91,134,135,136,146,154],[86,87,88,91,134],[91,134,137,177],[91,134,138,139,147,155],[91,134,139,165,173],[91,134,140,142,146,154],[91,133,134,141],[91,134,142,143],[91,134,146],[91,134,144,146],[91,133,134,146],[91,134,146,147,148,165,176],[91,134,146,147,148,161,165,168],[91,129,134,181],[91,134,142,146,149,154,165,176],[91,134,146,147,149,150,154,165,173,176],[91,134,149,151,165,173,176],[89,90,91,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182],[91,134,146,152],[91,134,153,176,181],[91,134,142,146,154,165],[91,134,155],[91,134,156],[91,133,134,157],[91,131,132,133,134,135,136,137,138,139,140,141,142,143,144,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182],[91,134,159],[91,134,160],[91,134,146,161,162],[91,134,161,163,177,179],[91,134,146,165,166,168],[91,134,165,167],[91,134,165,166],[91,134,168],[91,134,169],[91,131,134,165],[91,134,146,171,172],[91,134,171,172],[91,134,139,154,165,173],[91,134,174],[91,134,154,175],[91,134,149,160,176],[91,134,139,177],[91,134,165,178],[91,134,153,179],[91,134,180],[91,134,139,146,148,157,165,176,179,181],[91,134,165,182],[81,82,83,91,134],[84,91,134],[91,134,207],[91,134,205,207],[91,134,196,204,205,206,208],[91,134,194],[91,134,197,202,207,210],[91,134,193,210],[91,134,197,198,201,202,203,210],[91,134,197,198,199,201,202,210],[91,134,194,195,196,197,198,202,203,204,206,207,208,210],[91,134,192,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209],[91,134,192,210],[91,134,197,199,200,202,203,210],[91,134,201,210],[91,134,202,203,207,210],[91,134,195,205],[91,134,184,185],[91,101,105,134,176],[91,101,134,165,176],[91,96,134],[91,98,101,134,173,176],[91,134,154,173],[91,134,183],[91,96,134,183],[91,98,101,134,154,176],[91,93,94,97,100,134,146,165,176],[91,101,108,134],[91,93,99,134],[91,101,122,123,134],[91,97,101,134,168,176,183],[91,122,134,183],[91,95,96,134,183],[91,101,134],[91,95,96,97,98,99,100,101,102,103,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,123,124,125,126,127,128,134],[91,101,116,134],[91,101,108,109,134],[91,99,101,109,110,134],[91,100,134],[91,93,96,101,134],[91,101,105,109,110,134],[91,105,134],[91,99,101,104,134,176],[91,93,98,101,108,134],[91,134,165],[91,96,101,122,134,181,183],[91,134,146,147,149,150,151,154,165,173,176,182,183,185,186,187,189,190,191,210,211,212,213,214,215],[91,134,186,187,188,189],[91,134,186],[91,134,187],[91,134,185,215],[85,91,134,139,215]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedFormat":1},{"version":"07f073f19d67f74d732b1adea08e1dc66b1b58d77cb5b43931dee3d798a2fd53","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"65ff5a0aefd7817a03c1ad04fee85c9cdd3ec415cc3c9efec85d8008d4d5e4ee","impliedFormat":1},{"version":"aea201321e7df78b294c9c39c61503ed81fb73b1b1703240013b557dfa25b016","affectsGlobalScope":true,"impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b80c6175da9de59bace50a72c2d68490d4ab5b07016ff5367bc7ba33cf2f219","affectsGlobalScope":true,"impliedFormat":1},{"version":"4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"08faa97886e71757779428dd4c69a545c32c85fd629d1116d42710b32c6378bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b042aa5d277ad6963e2837179fd2f8fbb01968ac67115b0833c0244e93d1d50","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"3d77c73be94570813f8cadd1f05ebc3dc5e2e4fdefe4d340ca20cd018724ee36","impliedFormat":1},{"version":"23cfd70b42094e54cc3c5dab996d81b97e2b6f38ccb24ead85454b8ddfe2fc4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3e58c4c18a031cbb17abec7a4ad0bd5ae9fc70c1f4ba1e7fb921ad87c504aca","impliedFormat":1},{"version":"a3e8bafb2af8e850c644f4be7f5156cf7d23b7bfdc3b786bd4d10ed40329649c","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"f77d9188e41291acf14f476e931972460a303e1952538f9546e7b370cb8d0d20","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d04e3640dd9eb67f7f1e5bd3d0bf96c784666f7aefc8ac1537af6f2d38d4c29","impliedFormat":1},{"version":"3c884d9d9ec454bdf0d5a0b8465bf8297d2caa4d853851d92cc417ac6f30b969","impliedFormat":1},{"version":"5a369483ac4cfbdf0331c248deeb36140e6907db5e1daed241546b4a2055f82c","impliedFormat":1},{"version":"e8f5b5cc36615c17d330eaf8eebbc0d6bdd942c25991f96ef122f246f4ff722f","impliedFormat":1},{"version":"f0bd7e6d931657b59605c44112eaf8b980ba7f957a5051ed21cb93d978cf2f45","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0ada07543808f3b967624645a8e1ccd446f8b01ade47842acf1328aec899fed0","affectsGlobalScope":true,"impliedFormat":1},{"version":"c4a806152acbef81593f96cae6f2b04784d776457d97adbe2694478b243fcf03","impliedFormat":1},{"version":"71adf5dbc59568663d252a46179e71e4d544c053978bfc526d11543a3f716f42","impliedFormat":1},{"version":"c60db41f7bee80fb80c0b12819f5e465c8c8b465578da43e36d04f4a4646f57d","impliedFormat":1},{"version":"93bd413918fa921c8729cef45302b24d8b6c7855d72d5bf82d3972595ae8dcbf","impliedFormat":1},{"version":"4ff41188773cbf465807dd2f7059c7494cbee5115608efc297383832a1150c43","impliedFormat":1},{"version":"dccdf1677e531e33f8ac961a68bc537418c9a414797c1ea7e91307501cdc3f5e","impliedFormat":1},{"version":"e184c4b8918ef56c8c9e68bd79f3f3780e2d0d75bf2b8a41da1509a40c2deb46","affectsGlobalScope":true,"impliedFormat":1},{"version":"d206b4baf4ddcc15d9d69a9a2f4999a72a2c6adeaa8af20fa7a9960816287555","impliedFormat":1},{"version":"93f437e1398a4f06a984f441f7fa7a9f0535c04399619b5c22e0b87bdee182cb","impliedFormat":1},{"version":"afbe24ab0d74694372baa632ecb28bb375be53f3be53f9b07ecd7fc994907de5","impliedFormat":1},{"version":"70731d10d5311bd4cf710ef7f6539b62660f4b0bfdbb3f9fbe1d25fe6366a7fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b19db3600a17af69d4f33d08cc7076a7d19fb65bb36e442cac58929ec7c9482","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e043a1bc8fbf2a255bccf9bf27e0f1caf916c3b0518ea34aa72357c0afd42ec","impliedFormat":1},{"version":"137c2894e8f3e9672d401cc0a305dc7b1db7c69511cf6d3970fb53302f9eae09","impliedFormat":1},{"version":"3bc2f1e2c95c04048212c569ed38e338873f6a8593930cf5a7ef24ffb38fc3b6","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"f9d9d753d430ed050dc1bf2667a1bab711ccbb1c1507183d794cc195a5b085cc","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"ba1f814c22fd970255ddd60d61fb7e00c28271c933ab5d5cc19cd3ca66b8f57c","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"295f068af94245ee9d780555351bef98adfd58f8baf0b9dadbc31a489b881f8b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1851a3b4db78664f83901bb9cac9e45e03a37bb5933cc5bf37e10bb7e91ab4eb","impliedFormat":1},{"version":"09d479208911ac3ac6a7c2fe86217fc1abe6c4f04e2d52e4890e500699eeab32","affectsGlobalScope":true,"impliedFormat":1},{"version":"27d8987fd22d92efe6560cf0ce11767bf089903ffe26047727debfd1f3bf438b","affectsGlobalScope":true,"impliedFormat":1},{"version":"578d8bb6dcb2a1c03c4c3f8eb71abc9677e1a5c788b7f24848e3138ce17f3400","impliedFormat":1},{"version":"4f029899f9bae07e225c43aef893590541b2b43267383bf5e32e3a884d219ed5","impliedFormat":1},{"version":"ae56f65caf3be91108707bd8dfbccc2a57a91feb5daabf7165a06a945545ed26","impliedFormat":1},{"version":"a136d5de521da20f31631a0a96bf712370779d1c05b7015d7019a9b2a0446ca9","impliedFormat":1},{"version":"5b566927cad2ed2139655d55d690ffa87df378b956e7fe1c96024c4d9f75c4cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"bce947017cb7a2deebcc4f5ba04cead891ce6ad1602a4438ae45ed9aa1f39104","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3dffd70e6375b872f0b4e152de4ae682d762c61a24881ecc5eb9f04c5caf76f","impliedFormat":1},{"version":"e2c72c065a36bc9ab2a00ac6a6f51e71501619a72c0609defd304d46610487a4","impliedFormat":1},{"version":"d91a7d8b5655c42986f1bdfe2105c4408f472831c8f20cf11a8c3345b6b56c8c","impliedFormat":1},{"version":"616075a6ac578cf5a013ee12964188b4412823796ce0b202c6f1d2e4ca8480d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"e8a979b8af001c9fc2e774e7809d233c8ca955a28756f52ee5dee88ccb0611d2","impliedFormat":1},{"version":"cac793cc47c29e26e4ac3601dcb00b4435ebed26203485790e44f2ad8b6ad847","impliedFormat":1},{"version":"785b9d575b49124ce01b46f5b9402157c7611e6532effa562ac6aebec0074dfc","impliedFormat":1},{"version":"068edc96705c11c7ff5adb82c57ee2212d2379bf52f088542abcdcecfcc7b500","affectsGlobalScope":true,"impliedFormat":1},{"version":"02b1133807234b1a7d9bf9b1419ee19444dd8c26b101bc268aa8181591241f1f","impliedFormat":1},{"version":"6222e987b58abfe92597e1273ad7233626285bc2d78409d4a7b113d81a83496b","impliedFormat":1},{"version":"cbe726263ae9a7bf32352380f7e8ab66ee25b3457137e316929269c19e18a2be","impliedFormat":1},{"version":"0a25f947e7937ee5e01a21eb10d49de3b467eba752d3b42ea442e9e773f254ef","impliedFormat":99},{"version":"f11151a83668f94c1e763e39d89c0022ceb74618f1bfcf67596044acbe306094","impliedFormat":99},{"version":"b8caba62c0d2ef625f31cbb4fde09d851251af2551086ccf068611b0a69efd81","affectsGlobalScope":true,"impliedFormat":1},{"version":"402e5c534fb2b85fa771170595db3ac0dd532112c8fa44fc23f233bc6967488b","impliedFormat":1},{"version":"8885cf05f3e2abf117590bbb951dcf6359e3e5ac462af1c901cfd24c6a6472e2","impliedFormat":1},{"version":"33f3718dababfc26dfd9832c150149ea4e934f255130f8c118a59ae69e5ed441","impliedFormat":1},{"version":"e61df3640a38d535fd4bc9f4a53aef17c296b58dc4b6394fd576b808dd2fe5e6","impliedFormat":1},{"version":"459920181700cec8cbdf2a5faca127f3f17fd8dd9d9e577ed3f5f3af5d12a2e4","impliedFormat":1},{"version":"4719c209b9c00b579553859407a7e5dcfaa1c472994bd62aa5dd3cc0757eb077","impliedFormat":1},{"version":"7ec359bbc29b69d4063fe7dad0baaf35f1856f914db16b3f4f6e3e1bca4099fa","impliedFormat":1},{"version":"70790a7f0040993ca66ab8a07a059a0f8256e7bb57d968ae945f696cbff4ac7a","impliedFormat":1},{"version":"d1b9a81e99a0050ca7f2d98d7eedc6cda768f0eb9fa90b602e7107433e64c04c","impliedFormat":1},{"version":"a022503e75d6953d0e82c2c564508a5c7f8556fad5d7f971372d2d40479e4034","impliedFormat":1},{"version":"b215c4f0096f108020f666ffcc1f072c81e9f2f95464e894a5d5f34c5ea2a8b1","impliedFormat":1},{"version":"644491cde678bd462bb922c1d0cfab8f17d626b195ccb7f008612dc31f445d2d","impliedFormat":1},{"version":"dfe54dab1fa4961a6bcfba68c4ca955f8b5bbeb5f2ab3c915aa7adaa2eabc03a","impliedFormat":1},{"version":"1bb61aa2f08ab4506d41dbe16c5f3f5010f014bbf46fa3d715c0cbe3b00f4e1c","impliedFormat":1},{"version":"47865c5e695a382a916b1eedda1b6523145426e48a2eae4647e96b3b5e52024f","impliedFormat":1},{"version":"e42820cd611b15910c204cd133f692dcd602532b39317d4f2a19389b27e6f03d","impliedFormat":1},{"version":"331b8f71bfae1df25d564f5ea9ee65a0d847c4a94baa45925b6f38c55c7039bf","impliedFormat":1},{"version":"2a771d907aebf9391ac1f50e4ad37952943515eeea0dcc7e78aa08f508294668","impliedFormat":1},{"version":"0146fd6262c3fd3da51cb0254bb6b9a4e42931eb2f56329edd4c199cb9aaf804","impliedFormat":1},{"version":"4ec16d7a4e366c06a4573d299e15fe6207fc080f41beac5da06f4af33ea9761e","impliedFormat":1},{"version":"7870becb94cbc11d2d01b77c4422589adcba4d8e59f726246d40cd0d129784d8","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f698624bbbb060ece7c0e51b7236520ebada74b747d7523c7df376453ed6fea","impliedFormat":1},{"version":"8f07f2b6514744ac96e51d7cb8518c0f4de319471237ea10cf688b8d0e9d0225","impliedFormat":1},{"version":"08971f8379717d46a8a990ce9a7eed3af3e47e22c3d45c3a046054b7a2fffe7a","impliedFormat":99},{"version":"d931c3f1b88061a05d5ca0760cfec29b797524ef28d1ece3148427fd6ab8468d","signature":"2d5c0e28b3127eff25493c7bbe93f2d0716c76465eb673f151969cfd4fe54f49"}],"root":[216],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":4,"module":99,"noEmitOnError":true,"noImplicitOverride":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7,"useDefineForClassFields":true},"referencedMap":[[184,1],[131,2],[132,2],[133,3],[91,4],[134,5],[135,6],[136,7],[86,1],[89,8],[87,1],[88,1],[137,9],[138,10],[139,11],[140,12],[141,13],[142,14],[143,14],[145,15],[144,16],[146,17],[147,18],[148,19],[130,20],[90,1],[149,21],[150,22],[151,23],[183,24],[152,25],[153,26],[154,27],[155,28],[156,29],[157,30],[158,31],[159,32],[160,33],[161,34],[162,34],[163,35],[164,1],[165,36],[167,37],[166,38],[168,39],[169,40],[170,41],[171,42],[172,43],[173,44],[174,45],[175,46],[176,47],[177,48],[178,49],[179,50],[180,51],[181,52],[182,53],[83,1],[81,1],[84,54],[85,55],[92,1],[82,1],[191,1],[208,56],[206,57],[207,58],[195,59],[196,57],[203,60],[194,61],[199,62],[209,1],[200,63],[205,64],[210,65],[193,66],[201,67],[202,68],[197,69],[204,56],[198,70],[185,71],[192,1],[79,1],[80,1],[13,1],[14,1],[16,1],[15,1],[2,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[23,1],[24,1],[3,1],[25,1],[26,1],[4,1],[27,1],[31,1],[28,1],[29,1],[30,1],[32,1],[33,1],[34,1],[5,1],[35,1],[36,1],[37,1],[38,1],[6,1],[42,1],[39,1],[40,1],[41,1],[43,1],[7,1],[44,1],[49,1],[50,1],[45,1],[46,1],[47,1],[48,1],[8,1],[54,1],[51,1],[52,1],[53,1],[55,1],[9,1],[56,1],[57,1],[58,1],[60,1],[59,1],[61,1],[62,1],[10,1],[63,1],[64,1],[65,1],[11,1],[66,1],[67,1],[68,1],[69,1],[70,1],[1,1],[71,1],[72,1],[12,1],[76,1],[74,1],[78,1],[73,1],[77,1],[75,1],[108,72],[118,73],[107,72],[128,74],[99,75],[98,76],[127,77],[121,78],[126,79],[101,80],[115,81],[100,82],[124,83],[96,84],[95,77],[125,85],[97,86],[102,87],[103,1],[106,87],[93,1],[129,88],[119,89],[110,90],[111,91],[113,92],[109,93],[112,94],[122,77],[104,95],[105,96],[114,97],[94,98],[117,89],[116,87],[120,1],[123,99],[215,100],[190,101],[189,102],[187,102],[186,1],[188,103],[213,1],[212,1],[211,1],[214,104],[216,105]],"latestChangedDtsFile":"./index.d.ts","version":"5.8.2"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contember/vite-plugin",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "2.1.0-alpha.
|
|
4
|
+
"version": "2.1.0-alpha.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/production/index.js",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
},
|
|
27
27
|
"typings": "./dist/types/index.d.ts",
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"vite": "^
|
|
29
|
+
"vite": "^5 || ^6"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,23 +1,91 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto'
|
|
2
2
|
import { Plugin } from 'vite'
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Configuration options for the Contember Vite plugin
|
|
6
|
+
*/
|
|
7
|
+
export type ContemberOptions = {
|
|
8
|
+
/**
|
|
9
|
+
* Add build version meta tag (defaults to true in production)
|
|
10
|
+
*/
|
|
5
11
|
buildVersion?: boolean
|
|
12
|
+
/**
|
|
13
|
+
* Disable SPA routing middleware
|
|
14
|
+
*/
|
|
6
15
|
disableMiddleware?: boolean
|
|
16
|
+
/**
|
|
17
|
+
* Path to the app (defaults to '/app')
|
|
18
|
+
*/
|
|
7
19
|
appPath?: string
|
|
8
20
|
}
|
|
9
21
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const contemberDsn = process.argv.find(it => it.includes('contember://'))
|
|
13
|
-
const projectName = contemberDsn ? new URL(contemberDsn).username : null
|
|
22
|
+
const extractProjectNameFromDsn = (dsn: string | undefined) => {
|
|
23
|
+
if (!dsn) return null
|
|
14
24
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
25
|
+
try {
|
|
26
|
+
return new URL(dsn).username || null
|
|
27
|
+
} catch (e) {
|
|
28
|
+
console.warn('Invalid Contember DSN format:', dsn)
|
|
29
|
+
return null
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const createBuildVersionTag = (html: string): {
|
|
34
|
+
tag: string
|
|
35
|
+
injectTo: 'head'
|
|
36
|
+
attrs: Record<string, string>
|
|
37
|
+
} => {
|
|
38
|
+
const fileHash = createHash('md5').update(html).digest('hex')
|
|
39
|
+
return {
|
|
40
|
+
tag: 'meta',
|
|
41
|
+
injectTo: 'head',
|
|
42
|
+
attrs: {
|
|
43
|
+
name: 'contember-build-version',
|
|
44
|
+
content: fileHash,
|
|
45
|
+
},
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* ## Contember Vite Plugin
|
|
51
|
+
*
|
|
52
|
+
* This plugin provides configuration enhancements for Vite when working with Contember applications.
|
|
53
|
+
* It allows setting up SPA routing, injecting build version metadata, and defining project-specific environment variables.
|
|
54
|
+
*
|
|
55
|
+
* #### Features:
|
|
56
|
+
* - Adds a build version meta tag (optional, enabled by default in production)
|
|
57
|
+
* - Configures SPA routing middleware
|
|
58
|
+
* - Supports defining project name from the Contember DSN
|
|
59
|
+
* - Customizable app path
|
|
60
|
+
*
|
|
61
|
+
* #### Example Usage:
|
|
62
|
+
* ```ts
|
|
63
|
+
* import { defineConfig } from 'vite';
|
|
64
|
+
* import contember from './contember';
|
|
65
|
+
*
|
|
66
|
+
* export default defineConfig({
|
|
67
|
+
* plugins: [contember({ buildVersion: true, appPath: '/custom-app' })],
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export const contember = (options?: ContemberOptions): Plugin => {
|
|
72
|
+
const {
|
|
73
|
+
appPath = '/app',
|
|
74
|
+
buildVersion = process.env.NODE_ENV === 'production',
|
|
75
|
+
disableMiddleware = false,
|
|
76
|
+
} = options || {}
|
|
18
77
|
|
|
19
|
-
|
|
78
|
+
const normalizedAppPath = appPath.startsWith('/') ? appPath : `/${appPath}`
|
|
79
|
+
const contemberDsn = process.argv.find(it => it.includes('contember://')) || process.env.CONTEMBER_DSN
|
|
80
|
+
const projectName = extractProjectNameFromDsn(contemberDsn)
|
|
81
|
+
|
|
82
|
+
const defineConfig = projectName
|
|
83
|
+
? { 'import.meta.env.VITE_CONTEMBER_ADMIN_PROJECT_NAME': JSON.stringify(projectName) }
|
|
84
|
+
: {}
|
|
85
|
+
|
|
86
|
+
return {
|
|
20
87
|
name: 'contember',
|
|
88
|
+
|
|
21
89
|
config(config) {
|
|
22
90
|
return {
|
|
23
91
|
define: defineConfig,
|
|
@@ -30,50 +98,47 @@ export function contember(options?: ContemberOptions): Plugin {
|
|
|
30
98
|
...config.build?.rollupOptions,
|
|
31
99
|
input: config.build?.rollupOptions?.input ?? {
|
|
32
100
|
root: './index.html',
|
|
33
|
-
app: `.${
|
|
101
|
+
app: `.${normalizedAppPath}/index.html`,
|
|
34
102
|
},
|
|
35
103
|
},
|
|
36
104
|
},
|
|
37
105
|
}
|
|
38
106
|
},
|
|
39
|
-
configureServer(serve) {
|
|
40
|
-
if (!options?.disableMiddleware) {
|
|
41
|
-
serve.middlewares.use((req, res, next) => {
|
|
42
|
-
const [pathname] = req.url?.split('?') ?? []
|
|
43
107
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
108
|
+
configureServer(server) {
|
|
109
|
+
if (disableMiddleware) return
|
|
110
|
+
|
|
111
|
+
server.middlewares.use((req, res, next) => {
|
|
112
|
+
const [pathname] = req.url?.split('?') ?? []
|
|
113
|
+
|
|
114
|
+
const isSpaRoute = pathname === normalizedAppPath ||
|
|
115
|
+
(pathname.startsWith(`${normalizedAppPath}/`) && !pathname.match(/\.\w+$/))
|
|
116
|
+
|
|
117
|
+
if (isSpaRoute) {
|
|
118
|
+
req.url = `${normalizedAppPath}/`
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
next()
|
|
122
|
+
})
|
|
50
123
|
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
124
|
+
|
|
125
|
+
transformIndexHtml: buildVersion
|
|
126
|
+
? {
|
|
54
127
|
order: 'post',
|
|
55
128
|
handler: (html, ctx) => {
|
|
129
|
+
// Skip in dev server unless explicitly enabled
|
|
56
130
|
if (ctx.server && options?.buildVersion !== true) {
|
|
57
131
|
return { html, tags: [] }
|
|
58
132
|
}
|
|
59
133
|
|
|
60
|
-
|
|
61
|
-
return ({
|
|
134
|
+
return {
|
|
62
135
|
html,
|
|
63
|
-
tags: [
|
|
64
|
-
|
|
65
|
-
tag: 'meta',
|
|
66
|
-
injectTo: 'head',
|
|
67
|
-
attrs: {
|
|
68
|
-
name: 'contember-build-version',
|
|
69
|
-
content: fileHash,
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
})
|
|
136
|
+
tags: [createBuildVersionTag(html)],
|
|
137
|
+
}
|
|
74
138
|
},
|
|
75
|
-
}
|
|
76
|
-
|
|
139
|
+
}
|
|
140
|
+
: undefined,
|
|
141
|
+
}
|
|
77
142
|
}
|
|
78
143
|
|
|
79
144
|
export default contember
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach, afterEach, spyOn, mock } from 'bun:test'
|
|
2
|
+
import contember from '../../../src'
|
|
3
|
+
import { ConfigEnv, UserConfig, Plugin } from 'vite'
|
|
4
|
+
|
|
5
|
+
const invokePluginHook = (plugin: Plugin, hookName: string, ...args: any[]) => {
|
|
6
|
+
const hook = plugin[hookName]
|
|
7
|
+
if (typeof hook === 'function') {
|
|
8
|
+
return hook(...args)
|
|
9
|
+
} else if (hook?.handler) {
|
|
10
|
+
return hook.handler(...args)
|
|
11
|
+
}
|
|
12
|
+
return undefined
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const createMockServer = () => {
|
|
16
|
+
return {
|
|
17
|
+
middlewares: {
|
|
18
|
+
use: mock(() => { }),
|
|
19
|
+
},
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const getPluginConfigResult = (plugin: Plugin) => {
|
|
24
|
+
const userConfig = {} as UserConfig
|
|
25
|
+
const configEnv = {} as ConfigEnv
|
|
26
|
+
const result = invokePluginHook(plugin, 'config', userConfig, configEnv) || {}
|
|
27
|
+
|
|
28
|
+
return result as UserConfig & {
|
|
29
|
+
define?: Record<string, string>
|
|
30
|
+
base?: string
|
|
31
|
+
build?: {
|
|
32
|
+
sourcemap?: boolean
|
|
33
|
+
rollupOptions?: {
|
|
34
|
+
input?: Record<string, string>
|
|
35
|
+
output?: Record<string, any>
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
describe('contember vite plugin', () => {
|
|
42
|
+
const originalEnv = process.env
|
|
43
|
+
const originalArgv = process.argv
|
|
44
|
+
|
|
45
|
+
beforeEach(() => {
|
|
46
|
+
process.env = { ...originalEnv }
|
|
47
|
+
process.argv = [...originalArgv]
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
afterEach(() => {
|
|
51
|
+
process.env = originalEnv
|
|
52
|
+
process.argv = originalArgv
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
it('should create a plugin with default options', () => {
|
|
56
|
+
const plugin = contember()
|
|
57
|
+
expect(plugin).toBeDefined()
|
|
58
|
+
expect(plugin.name).toBe('contember')
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
describe('server middleware', () => {
|
|
62
|
+
it('should normalize app path correctly', () => {
|
|
63
|
+
const plugin1 = contember({ appPath: 'test-app' })
|
|
64
|
+
const plugin2 = contember({ appPath: '/test-app' })
|
|
65
|
+
|
|
66
|
+
const mockServer1 = createMockServer()
|
|
67
|
+
const mockServer2 = createMockServer()
|
|
68
|
+
|
|
69
|
+
invokePluginHook(plugin1, 'configureServer', mockServer1)
|
|
70
|
+
invokePluginHook(plugin2, 'configureServer', mockServer2)
|
|
71
|
+
|
|
72
|
+
expect(mockServer1.middlewares.use).toHaveBeenCalled()
|
|
73
|
+
expect(mockServer2.middlewares.use).toHaveBeenCalled()
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
it('should skip middleware when disableMiddleware is true', () => {
|
|
77
|
+
const plugin = contember({ disableMiddleware: true })
|
|
78
|
+
const mockServer = createMockServer()
|
|
79
|
+
|
|
80
|
+
invokePluginHook(plugin, 'configureServer', mockServer)
|
|
81
|
+
|
|
82
|
+
expect(mockServer.middlewares.use).not.toHaveBeenCalled()
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
it('should handle SPA routing middleware correctly', () => {
|
|
86
|
+
const plugin = contember({ appPath: '/app' })
|
|
87
|
+
const mockServerMiddleware = mock(() => { })
|
|
88
|
+
const mockServer = { middlewares: { use: mockServerMiddleware } }
|
|
89
|
+
|
|
90
|
+
invokePluginHook(plugin, 'configureServer', mockServer)
|
|
91
|
+
|
|
92
|
+
const middleware = mockServerMiddleware.mock.calls[0][0]
|
|
93
|
+
|
|
94
|
+
const testCases = [
|
|
95
|
+
['/app', '/app/'],
|
|
96
|
+
['/app/dashboard', '/app/'],
|
|
97
|
+
['/app/settings/profile', '/app/'],
|
|
98
|
+
['/api/data', '/api/data'],
|
|
99
|
+
['/app/file.js', '/app/file.js'],
|
|
100
|
+
['/app/image.png', '/app/image.png'],
|
|
101
|
+
['/app?user=123', '/app/'],
|
|
102
|
+
['/app?user=123&sort=desc,user', '/app/'],
|
|
103
|
+
['/app?test.fakeExtension', '/app/'],
|
|
104
|
+
]
|
|
105
|
+
|
|
106
|
+
testCases.forEach(([url, expected]) => {
|
|
107
|
+
const req = { url }
|
|
108
|
+
const next = mock(() => { })
|
|
109
|
+
|
|
110
|
+
middleware(req, {}, next)
|
|
111
|
+
|
|
112
|
+
expect(req.url).toBe(expected)
|
|
113
|
+
expect(next).toHaveBeenCalled()
|
|
114
|
+
})
|
|
115
|
+
})
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
describe('DSN handling', () => {
|
|
119
|
+
it('should extract project name from CONTEMBER_DSN environment variable', () => {
|
|
120
|
+
process.env.CONTEMBER_DSN = 'contember://project-name:token@example.com'
|
|
121
|
+
const plugin = contember()
|
|
122
|
+
const configResult = getPluginConfigResult(plugin)
|
|
123
|
+
|
|
124
|
+
expect(configResult.define).toEqual({
|
|
125
|
+
'import.meta.env.VITE_CONTEMBER_ADMIN_PROJECT_NAME': '"project-name"',
|
|
126
|
+
})
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
it('should extract project name from command line arguments', () => {
|
|
130
|
+
delete process.env.CONTEMBER_DSN
|
|
131
|
+
process.argv.push('contember://arg-project:token@example.com')
|
|
132
|
+
const plugin = contember()
|
|
133
|
+
const configResult = getPluginConfigResult(plugin)
|
|
134
|
+
|
|
135
|
+
expect(configResult.define).toEqual({
|
|
136
|
+
'import.meta.env.VITE_CONTEMBER_ADMIN_PROJECT_NAME': '"arg-project"',
|
|
137
|
+
})
|
|
138
|
+
})
|
|
139
|
+
|
|
140
|
+
it('should handle invalid DSN format', () => {
|
|
141
|
+
process.env.CONTEMBER_DSN = 'invalid-dsn'
|
|
142
|
+
const consoleSpy = spyOn(console, 'warn').mockImplementation(() => { })
|
|
143
|
+
const plugin = contember()
|
|
144
|
+
const configResult = getPluginConfigResult(plugin)
|
|
145
|
+
|
|
146
|
+
expect(configResult.define).toEqual({})
|
|
147
|
+
expect(consoleSpy).toHaveBeenCalled()
|
|
148
|
+
})
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
describe('build version meta tag', () => {
|
|
152
|
+
it('should not include build version meta tag in development', () => {
|
|
153
|
+
process.env.NODE_ENV = 'development'
|
|
154
|
+
const plugin = contember()
|
|
155
|
+
expect(plugin.transformIndexHtml).toBeUndefined()
|
|
156
|
+
})
|
|
157
|
+
|
|
158
|
+
it('should add build version meta tag in production', () => {
|
|
159
|
+
process.env.NODE_ENV = 'production'
|
|
160
|
+
const plugin = contember()
|
|
161
|
+
|
|
162
|
+
const transform = plugin.transformIndexHtml
|
|
163
|
+
expect(transform).toBeDefined()
|
|
164
|
+
|
|
165
|
+
const result = invokePluginHook(plugin, 'transformIndexHtml', '<html></html>', { server: false })
|
|
166
|
+
|
|
167
|
+
expect(result.tags).toHaveLength(1)
|
|
168
|
+
expect(result.tags[0].tag).toBe('meta')
|
|
169
|
+
expect(result.tags[0].attrs.name).toBe('contember-build-version')
|
|
170
|
+
})
|
|
171
|
+
|
|
172
|
+
it('should respect buildVersion option (disabled)', () => {
|
|
173
|
+
const plugin = contember({ buildVersion: false })
|
|
174
|
+
expect(plugin.transformIndexHtml).toBeUndefined()
|
|
175
|
+
})
|
|
176
|
+
|
|
177
|
+
it('should respect buildVersion option (enabled)', () => {
|
|
178
|
+
process.env.NODE_ENV = 'development'
|
|
179
|
+
const plugin = contember({ buildVersion: true })
|
|
180
|
+
|
|
181
|
+
const result = invokePluginHook(plugin, 'transformIndexHtml', '<html></html>', { server: true })
|
|
182
|
+
|
|
183
|
+
expect(result.tags).toHaveLength(1)
|
|
184
|
+
})
|
|
185
|
+
})
|
|
186
|
+
|
|
187
|
+
describe('vite configuration', () => {
|
|
188
|
+
it('should configure vite with correct defaults', () => {
|
|
189
|
+
const plugin = contember({ appPath: '/custom-app' })
|
|
190
|
+
|
|
191
|
+
const userConfig = {
|
|
192
|
+
build: {
|
|
193
|
+
rollupOptions: {
|
|
194
|
+
output: {
|
|
195
|
+
format: 'esm',
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
} as UserConfig
|
|
200
|
+
|
|
201
|
+
const configResult = invokePluginHook(plugin, 'config', userConfig, {} as ConfigEnv)
|
|
202
|
+
|
|
203
|
+
expect(configResult.base).toBe('/')
|
|
204
|
+
expect(configResult.build?.sourcemap).toBe(true)
|
|
205
|
+
expect(configResult.build?.rollupOptions?.input).toEqual({
|
|
206
|
+
root: './index.html',
|
|
207
|
+
app: './custom-app/index.html',
|
|
208
|
+
})
|
|
209
|
+
// Should preserve existing options
|
|
210
|
+
expect(configResult.build?.rollupOptions?.output).toEqual({ format: 'esm' })
|
|
211
|
+
})
|
|
212
|
+
})
|
|
213
|
+
})
|