@lark-apaas/coding-vite-preset 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +7 -0
- package/README.md +68 -0
- package/lib/index.d.ts +37 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +69 -0
- package/lib/index.js.map +1 -0
- package/lib/module-alias/clsx.d.ts +4 -0
- package/lib/module-alias/clsx.d.ts.map +1 -0
- package/lib/module-alias/clsx.js +13 -0
- package/lib/module-alias/clsx.js.map +1 -0
- package/lib/module-alias/echarts-for-react.d.ts +14 -0
- package/lib/module-alias/echarts-for-react.d.ts.map +1 -0
- package/lib/module-alias/echarts-for-react.js +142 -0
- package/lib/module-alias/echarts-for-react.js.map +1 -0
- package/lib/module-alias/echarts.d.ts +9 -0
- package/lib/module-alias/echarts.d.ts.map +1 -0
- package/lib/module-alias/echarts.js +84 -0
- package/lib/module-alias/echarts.js.map +1 -0
- package/lib/module-alias/registry_echarts_theme.d.ts +692 -0
- package/lib/module-alias/registry_echarts_theme.d.ts.map +1 -0
- package/lib/module-alias/registry_echarts_theme.js +394 -0
- package/lib/module-alias/registry_echarts_theme.js.map +1 -0
- package/lib/polyfills/index.d.ts +15 -0
- package/lib/polyfills/index.d.ts.map +1 -0
- package/lib/polyfills/index.js +36 -0
- package/lib/polyfills/index.js.map +1 -0
- package/lib/preset.d.ts +14 -0
- package/lib/preset.d.ts.map +1 -0
- package/lib/preset.js +452 -0
- package/lib/preset.js.map +1 -0
- package/lib/utils/hmr-timing.d.ts +10 -0
- package/lib/utils/hmr-timing.d.ts.map +1 -0
- package/lib/utils/hmr-timing.js +102 -0
- package/lib/utils/hmr-timing.js.map +1 -0
- package/lib/utils/normalize-base-path.d.ts +12 -0
- package/lib/utils/normalize-base-path.d.ts.map +1 -0
- package/lib/utils/normalize-base-path.js +24 -0
- package/lib/utils/normalize-base-path.js.map +1 -0
- package/lib/utils/snapdom-proxy.d.ts +8 -0
- package/lib/utils/snapdom-proxy.d.ts.map +1 -0
- package/lib/utils/snapdom-proxy.js +52 -0
- package/lib/utils/snapdom-proxy.js.map +1 -0
- package/lib/vite-plugins/banner-plugin.d.ts +3 -0
- package/lib/vite-plugins/banner-plugin.d.ts.map +1 -0
- package/lib/vite-plugins/banner-plugin.js +26 -0
- package/lib/vite-plugins/banner-plugin.js.map +1 -0
- package/lib/vite-plugins/css-legacy-plugin.d.ts +12 -0
- package/lib/vite-plugins/css-legacy-plugin.d.ts.map +1 -0
- package/lib/vite-plugins/css-legacy-plugin.js +205 -0
- package/lib/vite-plugins/css-legacy-plugin.js.map +1 -0
- package/lib/vite-plugins/error-overlay-plugin.d.ts +33 -0
- package/lib/vite-plugins/error-overlay-plugin.d.ts.map +1 -0
- package/lib/vite-plugins/error-overlay-plugin.js +129 -0
- package/lib/vite-plugins/error-overlay-plugin.js.map +1 -0
- package/lib/vite-plugins/html-output-plugin.d.ts +21 -0
- package/lib/vite-plugins/html-output-plugin.d.ts.map +1 -0
- package/lib/vite-plugins/html-output-plugin.js +171 -0
- package/lib/vite-plugins/html-output-plugin.js.map +1 -0
- package/lib/vite-plugins/module-alias-plugin.d.ts +10 -0
- package/lib/vite-plugins/module-alias-plugin.d.ts.map +1 -0
- package/lib/vite-plugins/module-alias-plugin.js +40 -0
- package/lib/vite-plugins/module-alias-plugin.js.map +1 -0
- package/lib/vite-plugins/og-meta-plugin.d.ts +17 -0
- package/lib/vite-plugins/og-meta-plugin.d.ts.map +1 -0
- package/lib/vite-plugins/og-meta-plugin.js +80 -0
- package/lib/vite-plugins/og-meta-plugin.js.map +1 -0
- package/lib/vite-plugins/polyfill-plugin.d.ts +12 -0
- package/lib/vite-plugins/polyfill-plugin.d.ts.map +1 -0
- package/lib/vite-plugins/polyfill-plugin.js +132 -0
- package/lib/vite-plugins/polyfill-plugin.js.map +1 -0
- package/lib/vite-plugins/route-parser-plugin.d.ts +13 -0
- package/lib/vite-plugins/route-parser-plugin.d.ts.map +1 -0
- package/lib/vite-plugins/route-parser-plugin.js +120 -0
- package/lib/vite-plugins/route-parser-plugin.js.map +1 -0
- package/lib/vite-plugins/runtime-injection-plugin.d.ts +23 -0
- package/lib/vite-plugins/runtime-injection-plugin.d.ts.map +1 -0
- package/lib/vite-plugins/runtime-injection-plugin.js +93 -0
- package/lib/vite-plugins/runtime-injection-plugin.js.map +1 -0
- package/lib/vite-plugins/slardar-plugin.d.ts +10 -0
- package/lib/vite-plugins/slardar-plugin.d.ts.map +1 -0
- package/lib/vite-plugins/slardar-plugin.js +102 -0
- package/lib/vite-plugins/slardar-plugin.js.map +1 -0
- package/lib/vite-plugins/source-map-upload-plugin.d.ts +7 -0
- package/lib/vite-plugins/source-map-upload-plugin.d.ts.map +1 -0
- package/lib/vite-plugins/source-map-upload-plugin.js +85 -0
- package/lib/vite-plugins/source-map-upload-plugin.js.map +1 -0
- package/lib/vite-plugins/static-assets-plugin.d.ts +27 -0
- package/lib/vite-plugins/static-assets-plugin.d.ts.map +1 -0
- package/lib/vite-plugins/static-assets-plugin.js +393 -0
- package/lib/vite-plugins/static-assets-plugin.js.map +1 -0
- package/lib/vite-plugins/view-context-plugin.d.ts +4 -0
- package/lib/vite-plugins/view-context-plugin.d.ts.map +1 -0
- package/lib/vite-plugins/view-context-plugin.js +40 -0
- package/lib/vite-plugins/view-context-plugin.js.map +1 -0
- package/lib/vite-plugins/vite-client-patch-plugin.d.ts +23 -0
- package/lib/vite-plugins/vite-client-patch-plugin.d.ts.map +1 -0
- package/lib/vite-plugins/vite-client-patch-plugin.js +53 -0
- package/lib/vite-plugins/vite-client-patch-plugin.js.map +1 -0
- package/package.json +61 -0
- package/src/empty.css +1 -0
- package/src/inspector-stub.js +6 -0
- package/src/module-alias/clsx.mjs +8 -0
- package/src/module-alias/echarts-for-react.mjs +129 -0
- package/src/module-alias/echarts.mjs +43 -0
- package/src/module-alias/registry_echarts_theme.mjs +390 -0
- package/src/overlay/components.js +94 -0
- package/src/overlay/index.js +443 -0
- package/src/over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,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC;YAC/D,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;QACtF,CAAC;QAED,cAAc;YACZ,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC;YAC/D,IAAI,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;gBAClC,IAAI,CAAC,QAAQ,CAAC;oBACZ,IAAI,EAAE,OAAO;oBACb,QAAQ,EAAE,aAAa;oBACvB,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,cAAc,EAAE,OAAO,CAAC;iBACjD,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAED,kBAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime Injection Plugin for Vite
|
|
3
|
+
*
|
|
4
|
+
* 自动注入 @lark-apaas/client-toolkit/runtime
|
|
5
|
+
*
|
|
6
|
+
* 原理:
|
|
7
|
+
* - Dev: 中间件拦截 /@runtime.js 请求,HTML 中注入独立 script 标签
|
|
8
|
+
* 确保 runtime 加载独立于业务代码,业务代码编译失败不影响 runtime
|
|
9
|
+
* - Build: 在入口文件顶部注入 import,runtime 被打包进主 chunk
|
|
10
|
+
* 与 rspack-preset 的 RuntimeInjectionPlugin 行为对齐
|
|
11
|
+
*/
|
|
12
|
+
import type { Plugin } from 'vite';
|
|
13
|
+
export interface RuntimeInjectionPluginOptions {
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Client base path prefix for routes
|
|
17
|
+
* @default ''
|
|
18
|
+
*/
|
|
19
|
+
clientBasePath?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function runtimeInjectionPlugin(options?: RuntimeInjectionPluginOptions): Plugin;
|
|
22
|
+
export default runtimeInjectionPlugin;
|
|
23
|
+
//# sourceMappingURL=runtime-injection-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-injection-plugin.d.ts","sourceRoot":"","sources":["../../src/vite-plugins/runtime-injection-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAoC,MAAM,MAAM,CAAC;AAMrE,MAAM,WAAW,6BAA6B;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,sBAAsB,CACpC,OAAO,GAAE,6BAAkC,GAC1C,MAAM,CA+ER;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Runtime Injection Plugin for Vite
|
|
4
|
+
*
|
|
5
|
+
* 自动注入 @lark-apaas/client-toolkit/runtime
|
|
6
|
+
*
|
|
7
|
+
* 原理:
|
|
8
|
+
* - Dev: 中间件拦截 /@runtime.js 请求,HTML 中注入独立 script 标签
|
|
9
|
+
* 确保 runtime 加载独立于业务代码,业务代码编译失败不影响 runtime
|
|
10
|
+
* - Build: 在入口文件顶部注入 import,runtime 被打包进主 chunk
|
|
11
|
+
* 与 rspack-preset 的 RuntimeInjectionPlugin 行为对齐
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.runtimeInjectionPlugin = runtimeInjectionPlugin;
|
|
15
|
+
const RUNTIME_MODULE = '@lark-apaas/client-toolkit/runtime';
|
|
16
|
+
const RUNTIME_PATH = '/@runtime.js';
|
|
17
|
+
const RUNTIME_IMPORT = `import '${RUNTIME_MODULE}';\n`;
|
|
18
|
+
function runtimeInjectionPlugin(options = {}) {
|
|
19
|
+
const { enabled = true, clientBasePath = '' } = options;
|
|
20
|
+
const runtimePath = clientBasePath + RUNTIME_PATH;
|
|
21
|
+
let isDev = true;
|
|
22
|
+
return {
|
|
23
|
+
name: 'fullstack-runtime-injection',
|
|
24
|
+
enforce: 'pre',
|
|
25
|
+
config(config, { command }) {
|
|
26
|
+
if (!enabled)
|
|
27
|
+
return;
|
|
28
|
+
isDev = command === 'serve';
|
|
29
|
+
return {
|
|
30
|
+
optimizeDeps: {
|
|
31
|
+
include: [...(config.optimizeDeps?.include || []), RUNTIME_MODULE],
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
// Dev: 中间件处理 /@runtime.js 请求
|
|
36
|
+
configureServer(server) {
|
|
37
|
+
if (!enabled)
|
|
38
|
+
return;
|
|
39
|
+
server.middlewares.use(async (req, res, next) => {
|
|
40
|
+
if (req.url !== runtimePath)
|
|
41
|
+
return next();
|
|
42
|
+
try {
|
|
43
|
+
const result = await server.environments.client.transformRequest(RUNTIME_MODULE);
|
|
44
|
+
if (result) {
|
|
45
|
+
res.setHeader('Content-Type', 'application/javascript');
|
|
46
|
+
res.end(result.code);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
res.statusCode = 500;
|
|
50
|
+
res.end('// Failed to load runtime');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
catch (e) {
|
|
54
|
+
res.statusCode = 500;
|
|
55
|
+
res.end(`// Error: ${e}`);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
// Build: 在入口文件顶部注入 runtime import
|
|
60
|
+
transform(code, id) {
|
|
61
|
+
if (!enabled || isDev)
|
|
62
|
+
return null;
|
|
63
|
+
// 只处理入口文件 (client/src/index.tsx 或类似)
|
|
64
|
+
if (!/[/\\]client[/\\]src[/\\]index\.(tsx?|jsx?)$/.test(id)) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
// 检查是否已经包含 runtime import
|
|
68
|
+
if (code.includes(RUNTIME_MODULE)) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
// 在文件顶部注入 runtime import
|
|
72
|
+
return {
|
|
73
|
+
code: RUNTIME_IMPORT + code,
|
|
74
|
+
map: null,
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
// HTML 注入 script (仅 Dev 模式)
|
|
78
|
+
transformIndexHtml(html) {
|
|
79
|
+
if (!enabled || !isDev)
|
|
80
|
+
return html;
|
|
81
|
+
const tags = [
|
|
82
|
+
{
|
|
83
|
+
tag: 'script',
|
|
84
|
+
attrs: { type: 'module', src: runtimePath },
|
|
85
|
+
injectTo: 'head',
|
|
86
|
+
},
|
|
87
|
+
];
|
|
88
|
+
return { html, tags };
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
exports.default = runtimeInjectionPlugin;
|
|
93
|
+
//# sourceMappingURL=runtime-injection-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-injection-plugin.js","sourceRoot":"","sources":["../../src/vite-plugins/runtime-injection-plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAiBH,wDAiFC;AA9FD,MAAM,cAAc,GAAG,oCAAoC,CAAC;AAC5D,MAAM,YAAY,GAAG,cAAc,CAAC;AACpC,MAAM,cAAc,GAAG,WAAW,cAAc,MAAM,CAAC;AAWvD,SAAgB,sBAAsB,CACpC,UAAyC,EAAE;IAE3C,MAAM,EAAE,OAAO,GAAG,IAAI,EAAE,cAAc,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC;IACxD,MAAM,WAAW,GAAG,cAAc,GAAG,YAAY,CAAC;IAClD,IAAI,KAAK,GAAG,IAAI,CAAC;IAEjB,OAAO;QACL,IAAI,EAAE,6BAA6B;QACnC,OAAO,EAAE,KAAK;QAEd,MAAM,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE;YACxB,IAAI,CAAC,OAAO;gBAAE,OAAO;YACrB,KAAK,GAAG,OAAO,KAA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D,OAAO,IAAI,CAAC;YACd,CAAC;YAED,0BAA0B;YAC1B,IAAI,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;gBAClC,OAAO,IAAI,CAAC;YACd,CAAC;YAED,yBAAyB;YACzB,OAAO;gBACL,IAAI,EAAE,cAAc,GAAG,IAAI;gBAC3B,GAAG,EAAE,IAAI;aACV,CAAC;QACJ,CAAC;QAED,4BAA4B;QAC5B,kBAAkB,CAAC,IAAY;YAC7B,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK;gBAAE,OAAO,IAAI,CAAC;YAEpC,MAAM,IAAI,GAAwB;gBAChC;oBACE,GAAG,EAAE,QAAQ;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,WAAW,EAAE;oBAC3C,QAAQ,EAAE,MAAM;iBACjB;aACF,CAAC;YAEF,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QACxB,CAAC;KACF,CAAC;AACJ,CAAC;AAED,kBAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Plugin } from 'vite';
|
|
2
|
+
interface SlardarPluginOptions {
|
|
3
|
+
/** Business ID for Slardar */
|
|
4
|
+
bid?: string;
|
|
5
|
+
/** Global variable name for Slardar */
|
|
6
|
+
globalName?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function slardarPlugin(options?: SlardarPluginOptions): Plugin;
|
|
9
|
+
export default slardarPlugin;
|
|
10
|
+
//# sourceMappingURL=slardar-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slardar-plugin.d.ts","sourceRoot":"","sources":["../../src/vite-plugins/slardar-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAqB,MAAM,MAAM,CAAC;AAEtD,UAAU,oBAAoB;IAC5B,8BAA8B;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAiED,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,MAAM,CAsCxE;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.slardarPlugin = slardarPlugin;
|
|
4
|
+
function getSlardarScript(bid, globalName) {
|
|
5
|
+
return `
|
|
6
|
+
const slardarScript = document.createElement('script');
|
|
7
|
+
slardarScript.src = 'https://lf3-short.ibytedapm.com/slardar/fe/sdk-web/browser.cn.js?bid=${bid}&globalName=${globalName}';
|
|
8
|
+
slardarScript.crossOrigin = 'anonymous';
|
|
9
|
+
|
|
10
|
+
// Add onload event handler
|
|
11
|
+
slardarScript.onload = function() {
|
|
12
|
+
// Initialize after script loads
|
|
13
|
+
if (window.${globalName}) {
|
|
14
|
+
window.${globalName}('context.merge', {
|
|
15
|
+
tenantId: window.tenantId ?? '',
|
|
16
|
+
appId: window.appId ?? '',
|
|
17
|
+
});
|
|
18
|
+
window.${globalName}('init', {
|
|
19
|
+
bid: '${bid}',
|
|
20
|
+
env: window.ENVIRONMENT || 'online',
|
|
21
|
+
userId: window.userId ?? '',
|
|
22
|
+
});
|
|
23
|
+
window.${globalName}('start');
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// Add error handler
|
|
28
|
+
slardarScript.onerror = function() {
|
|
29
|
+
console.warn('Failed to load Slardar script');
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// Add script to page
|
|
33
|
+
document.head.appendChild(slardarScript);
|
|
34
|
+
`;
|
|
35
|
+
}
|
|
36
|
+
function getTeaScript() {
|
|
37
|
+
return `
|
|
38
|
+
(function (win, export_obj) {
|
|
39
|
+
win['LogAnalyticsObject'] = export_obj;
|
|
40
|
+
if (!win[export_obj]) {
|
|
41
|
+
function _collect() {
|
|
42
|
+
_collect.q.push(arguments);
|
|
43
|
+
}
|
|
44
|
+
_collect.q = _collect.q || [];
|
|
45
|
+
win[export_obj] = _collect;
|
|
46
|
+
}
|
|
47
|
+
win[export_obj].l = +new Date();
|
|
48
|
+
})(window, 'collectEvent');
|
|
49
|
+
|
|
50
|
+
// Create tea sdk script element
|
|
51
|
+
const teaScript = document.createElement('script');
|
|
52
|
+
teaScript.src = 'https://lf3-cdn-tos.bytescm.com/obj/static/log-sdk/collect/5.1/collect.js';
|
|
53
|
+
teaScript.crossOrigin = 'anonymous';
|
|
54
|
+
teaScript.async = true;
|
|
55
|
+
|
|
56
|
+
// Add error handler
|
|
57
|
+
teaScript.onerror = function() {
|
|
58
|
+
console.warn('Failed to load Tea script');
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// Add script to page
|
|
62
|
+
document.head.appendChild(teaScript);
|
|
63
|
+
`;
|
|
64
|
+
}
|
|
65
|
+
function slardarPlugin(options = {}) {
|
|
66
|
+
const { bid = 'apaas_miaoda', globalName = 'KSlardarWeb' } = options;
|
|
67
|
+
return {
|
|
68
|
+
name: 'fullstack-slardar',
|
|
69
|
+
transformIndexHtml(html) {
|
|
70
|
+
const tags = [
|
|
71
|
+
// Slardar SDK loader script
|
|
72
|
+
{
|
|
73
|
+
tag: 'script',
|
|
74
|
+
children: getSlardarScript(bid, globalName),
|
|
75
|
+
injectTo: 'head',
|
|
76
|
+
},
|
|
77
|
+
// Performance SDK
|
|
78
|
+
{
|
|
79
|
+
tag: 'script',
|
|
80
|
+
attrs: {
|
|
81
|
+
src: 'https://sf3-scmcdn-cn.feishucdn.com/obj/unpkg/byted/performance/0.1.2/dist/performance.iife.js',
|
|
82
|
+
crossorigin: 'anonymous',
|
|
83
|
+
defer: true,
|
|
84
|
+
},
|
|
85
|
+
injectTo: 'head',
|
|
86
|
+
},
|
|
87
|
+
// Tea SDK loader script
|
|
88
|
+
{
|
|
89
|
+
tag: 'script',
|
|
90
|
+
children: getTeaScript(),
|
|
91
|
+
injectTo: 'head',
|
|
92
|
+
},
|
|
93
|
+
];
|
|
94
|
+
return {
|
|
95
|
+
html,
|
|
96
|
+
tags,
|
|
97
|
+
};
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
exports.default = slardarPlugin;
|
|
102
|
+
//# sourceMappingURL=slardar-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slardar-plugin.js","sourceRoot":"","sources":["../../src/vite-plugins/slardar-plugin.ts"],"names":[],"mappings":";;AAwEA,sCAsCC;AArGD,SAAS,gBAAgB,CAAC,GAAW,EAAE,UAAkB;IACvD,OAAO;;gGAEuF,GAAG,eAAe,UAAU;;;;;;mBAMzG,UAAU;iBACZ,UAAU;;;;iBAIV,UAAU;kBACT,GAAG;;;;iBAIJ,UAAU;;;;;;;;;;;GAWxB,CAAC;AACJ,CAAC;AAED,SAAS,YAAY;IACnB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BN,CAAC;AACJ,CAAC;AAED,SAAgB,aAAa,CAAC,UAAgC,EAAE;IAC9D,MAAM,EAAE,GAAG,GAAG,cAAc,EAAE,UAAU,GAAG,aAAa,EAAE,GAAG,OAAO,CAAC;IAErE,OAAO;QACL,IAAI,EAAE,mBAAmB;QAEzB,kBAAkB,CAAC,IAAI;YACrB,MAAM,IAAI,GAAwB;gBAChC,4BAA4B;gBAC5B;oBACE,GAAG,EAAE,QAAQ;oBACb,QAAQ,EAAE,gBAAgB,CAAC,GAAG,EAAE,UAAU,CAAC;oBAC3C,QAAQ,EAAE,MAAM;iBACjB;gBACD,kBAAkB;gBAClB;oBACE,GAAG,EAAE,QAAQ;oBACb,KAAK,EAAE;wBACL,GAAG,EAAE,gGAAgG;wBACrG,WAAW,EAAE,WAAW;wBACxB,KAAK,EAAE,IAAI;qBACZ;oBACD,QAAQ,EAAE,MAAM;iBACjB;gBACD,wBAAwB;gBACxB;oBACE,GAAG,EAAE,QAAQ;oBACb,QAAQ,EAAE,YAAY,EAAE;oBACxB,QAAQ,EAAE,MAAM;iBACjB;aACF,CAAC;YAEF,OAAO;gBACL,IAAI;gBACJ,IAAI;aACL,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,kBAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Plugin } from 'vite';
|
|
2
|
+
interface SourceMapUploadPluginOptions {
|
|
3
|
+
outputDir: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function sourceMapUploadPlugin(options: SourceMapUploadPluginOptions): Plugin;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=source-map-upload-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-map-upload-plugin.d.ts","sourceRoot":"","sources":["../../src/vite-plugins/source-map-upload-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,MAAM,CAAC;AAInD,UAAU,4BAA4B;IACpC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,4BAA4B,GACpC,MAAM,CAiER"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.sourceMapUploadPlugin = sourceMapUploadPlugin;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
function sourceMapUploadPlugin(options) {
|
|
40
|
+
let config;
|
|
41
|
+
return {
|
|
42
|
+
name: 'vite-plugin-source-map-upload',
|
|
43
|
+
apply: 'build', // Only apply during build
|
|
44
|
+
enforce: 'post',
|
|
45
|
+
configResolved(resolvedConfig) {
|
|
46
|
+
config = resolvedConfig;
|
|
47
|
+
},
|
|
48
|
+
async writeBundle(outputOptions) {
|
|
49
|
+
console.log('SourceMapUploadPlugin: Starting sourcemap consolidation process...');
|
|
50
|
+
const outputDir = outputOptions.dir || config.build.outDir;
|
|
51
|
+
if (!outputDir) {
|
|
52
|
+
console.warn('SourceMapUploadPlugin: output.dir is not defined. Skipping sourcemap consolidation.');
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const sourceMapFiles = fs
|
|
56
|
+
.readdirSync(outputDir, { recursive: true })
|
|
57
|
+
.filter(file => file.toString().endsWith('.map'));
|
|
58
|
+
if (sourceMapFiles.length === 0) {
|
|
59
|
+
console.log('SourceMapUploadPlugin: No sourcemaps found to consolidate.');
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const outputBaseDir = path.basename(outputDir); // e.g., 'client'
|
|
63
|
+
const sourcemapTargetDir = path.join(options.outputDir, outputBaseDir); // e.g., 'dist/sourcemaps/client'
|
|
64
|
+
for (const sourceMapFile of sourceMapFiles) {
|
|
65
|
+
const sourceMapPath = path.join(outputDir, sourceMapFile.toString());
|
|
66
|
+
const destinationPath = path.join(sourcemapTargetDir, sourceMapFile.toString());
|
|
67
|
+
try {
|
|
68
|
+
// Ensure the destination directory exists
|
|
69
|
+
const destinationDir = path.dirname(destinationPath);
|
|
70
|
+
if (!fs.existsSync(destinationDir)) {
|
|
71
|
+
fs.mkdirSync(destinationDir, { recursive: true });
|
|
72
|
+
}
|
|
73
|
+
// Move the file
|
|
74
|
+
fs.renameSync(sourceMapPath, destinationPath);
|
|
75
|
+
console.log(`SourceMapUploadPlugin: Consolidated ${sourceMapFile} to ${destinationPath}`);
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
const errorMessage = `SourceMapUploadPlugin: Failed to consolidate ${sourceMapFile}.`;
|
|
79
|
+
console.error(errorMessage, error);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=source-map-upload-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-map-upload-plugin.js","sourceRoot":"","sources":["../../src/vite-plugins/source-map-upload-plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,sDAmEC;AA1ED,uCAAyB;AACzB,2CAA6B;AAM7B,SAA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,EAAE,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAEhF,IAAI,CAAC;oBACH,0CAA0C;oBAC1C,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;oBACrD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;wBACnC,EAAE,CAAC,SAAS,CAAC,cAAc,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;oBACpD,CAAC;oBAED,gBAAgB;oBAChB,EAAE,CAAC,UAAU,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;oBAC9C,OAAO,CAAC,GAAG,CACT,uCAAuC,aAAa,OAAO,eAAe,EAAE,CAC7E,CAAC;gBACJ,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,MAAM,YAAY,GAAG,gDAAgD,aAAa,GAAG,CAAC;oBACtF,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;gBACrC,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static Assets Plugin for Vite
|
|
3
|
+
*
|
|
4
|
+
* Supports importing static files from shared/static directory:
|
|
5
|
+
* - JSON files → bundled into HTML, injected as window.__STATIC_JSON__
|
|
6
|
+
* - Other files → converted to URL {clientBasePath}/static/path
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* import config from '@shared/static/config.json';
|
|
10
|
+
* import logoUrl from '@shared/static/images/logo.png';
|
|
11
|
+
*/
|
|
12
|
+
import type { Plugin } from 'vite';
|
|
13
|
+
export interface StaticAssetsPluginOptions {
|
|
14
|
+
/**
|
|
15
|
+
* Client base path prefix for routes
|
|
16
|
+
* @default ''
|
|
17
|
+
*/
|
|
18
|
+
clientBasePath?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Root directory for the project
|
|
21
|
+
* @default process.cwd()
|
|
22
|
+
*/
|
|
23
|
+
rootDir?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function staticAssetsPlugin(options?: StaticAssetsPluginOptions): Plugin;
|
|
26
|
+
export default staticAssetsPlugin;
|
|
27
|
+
//# sourceMappingURL=static-assets-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-assets-plugin.d.ts","sourceRoot":"","sources":["../../src/vite-plugins/static-assets-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAoD,MAAM,MAAM,CAAC;AA4CrF,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAMD,wBAAgB,kBAAkB,CAChC,OAAO,GAAE,yBAA8B,GACtC,MAAM,CAyVR;AAED,eAAe,kBAAkB,CAAC"}
|