@rsbuild/plugin-assets-retry 1.5.2 → 2.0.1
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/README.md +5 -3
- package/README.zh-CN.md +8 -6
- package/dist/index.js +74 -41
- package/dist/runtime/asyncChunkRetry.js +82 -95
- package/dist/runtime/asyncChunkRetry.min.js +1 -1
- package/dist/runtime/initialChunkRetry.js +80 -91
- package/dist/runtime/initialChunkRetry.min.js +1 -1
- package/package.json +30 -32
- package/dist/index.cjs +0 -381
- package/dist/rslib-runtime.js +0 -38
|
@@ -1,55 +1,50 @@
|
|
|
1
|
-
(
|
|
2
|
-
|
|
3
|
-
var ERROR_PREFIX = '[@rsbuild/plugin-assets-retry] ';
|
|
1
|
+
(()=>{
|
|
2
|
+
const ERROR_PREFIX = '[@rsbuild/plugin-assets-retry] ';
|
|
4
3
|
function findCurrentDomain(url, config) {
|
|
5
|
-
|
|
6
|
-
for(
|
|
7
|
-
|
|
4
|
+
const domains = config.domain;
|
|
5
|
+
for(let i = 0; i < domains.length; i++){
|
|
6
|
+
const domain = domains[i];
|
|
8
7
|
if (-1 !== url.indexOf(domain)) return domain;
|
|
9
8
|
}
|
|
10
9
|
return window.origin;
|
|
11
10
|
}
|
|
12
11
|
function findNextDomain(url, config) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const domains = config.domain;
|
|
13
|
+
const currentDomain = findCurrentDomain(url, config);
|
|
14
|
+
const index = domains.indexOf(currentDomain);
|
|
16
15
|
return -1 === index ? currentDomain : domains[(index + 1) % domains.length];
|
|
17
16
|
}
|
|
18
|
-
|
|
17
|
+
const postfixRE = /[?#].*$/;
|
|
19
18
|
function cleanUrl(url) {
|
|
20
19
|
return url.replace(postfixRE, '');
|
|
21
20
|
}
|
|
22
21
|
function getQueryFromUrl(url) {
|
|
23
|
-
|
|
24
|
-
return parts ?
|
|
22
|
+
const parts = url.split('?')[1];
|
|
23
|
+
return parts ? `?${parts.split('#')[0]}` : '';
|
|
25
24
|
}
|
|
26
25
|
function getUrlRetryQuery(existRetryTimes, originalQuery, config) {
|
|
27
|
-
if (true === config.addQuery) return '' !== originalQuery ?
|
|
26
|
+
if (true === config.addQuery) return '' !== originalQuery ? `${originalQuery}&retry=${existRetryTimes}` : `?retry=${existRetryTimes}`;
|
|
28
27
|
if ('function' == typeof config.addQuery) return config.addQuery({
|
|
29
28
|
times: existRetryTimes,
|
|
30
|
-
originalQuery
|
|
29
|
+
originalQuery
|
|
31
30
|
});
|
|
32
31
|
return '';
|
|
33
32
|
}
|
|
34
33
|
function getNextRetryUrl(currRetryUrl, domain, nextDomain, existRetryTimes, originalQuery, config) {
|
|
35
34
|
return cleanUrl(currRetryUrl.replace(domain, nextDomain)) + getUrlRetryQuery(existRetryTimes + 1, originalQuery, config);
|
|
36
35
|
}
|
|
37
|
-
function _instanceof(left, right) {
|
|
38
|
-
if (null != right && "u" > typeof Symbol && right[Symbol.hasInstance]) return !!right[Symbol.hasInstance](left);
|
|
39
|
-
return left instanceof right;
|
|
40
|
-
}
|
|
41
36
|
function findMatchingRule(url, type, rules) {
|
|
42
|
-
for(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if (
|
|
37
|
+
for(let i = 0; i < rules.length; i++){
|
|
38
|
+
const rule = rules[i];
|
|
39
|
+
const tester = rule.test;
|
|
40
|
+
let shouldMatch = true;
|
|
41
|
+
if (tester instanceof RegExp) shouldMatch = tester.test(url);
|
|
47
42
|
else if ('string' == typeof tester) {
|
|
48
|
-
|
|
43
|
+
const regexp = new RegExp(tester);
|
|
49
44
|
shouldMatch = regexp.test(url);
|
|
50
45
|
} else if ('function' == typeof tester) shouldMatch = tester(url);
|
|
51
46
|
if (rule.domain && rule.domain.length > 0) {
|
|
52
|
-
|
|
47
|
+
const domain = findCurrentDomain(url, rule);
|
|
53
48
|
if (!rule.domain.includes(domain)) shouldMatch = false;
|
|
54
49
|
}
|
|
55
50
|
if (rule.type && rule.type.length > 0) {
|
|
@@ -59,43 +54,39 @@
|
|
|
59
54
|
}
|
|
60
55
|
return null;
|
|
61
56
|
}
|
|
62
|
-
|
|
63
|
-
if (null != right && "u" > typeof Symbol && right[Symbol.hasInstance]) return !!right[Symbol.hasInstance](left);
|
|
64
|
-
return left instanceof right;
|
|
65
|
-
}
|
|
66
|
-
var TAG_TYPE = {
|
|
57
|
+
const TAG_TYPE = {
|
|
67
58
|
link: HTMLLinkElement,
|
|
68
59
|
script: HTMLScriptElement,
|
|
69
60
|
img: HTMLImageElement
|
|
70
61
|
};
|
|
71
62
|
function getRequestUrl(element) {
|
|
72
|
-
if (
|
|
73
|
-
if (
|
|
63
|
+
if (element instanceof HTMLScriptElement || element instanceof HTMLImageElement) return element.src;
|
|
64
|
+
if (element instanceof HTMLLinkElement) return element.href;
|
|
74
65
|
return null;
|
|
75
66
|
}
|
|
76
67
|
function validateTargetInfo(rules, e) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
68
|
+
const target = e.target;
|
|
69
|
+
const tagName = target.tagName.toLocaleLowerCase();
|
|
70
|
+
const url = getRequestUrl(target);
|
|
80
71
|
if (!url) return false;
|
|
81
|
-
|
|
82
|
-
|
|
72
|
+
let ruleIndex = Number(target.dataset.rbRuleI || '-1');
|
|
73
|
+
const rule = rules[ruleIndex] || findMatchingRule(url, tagName, rules);
|
|
83
74
|
if (!rule) return false;
|
|
84
75
|
ruleIndex = rules.indexOf(rule);
|
|
85
|
-
|
|
86
|
-
if (!tagName || -1 === allowTags.indexOf(tagName) || !TAG_TYPE[tagName] || !
|
|
76
|
+
const allowTags = rule.type;
|
|
77
|
+
if (!tagName || -1 === allowTags.indexOf(tagName) || !TAG_TYPE[tagName] || !(target instanceof TAG_TYPE[tagName])) return false;
|
|
87
78
|
return {
|
|
88
|
-
target
|
|
89
|
-
tagName
|
|
90
|
-
url
|
|
91
|
-
rule
|
|
92
|
-
ruleIndex
|
|
79
|
+
target,
|
|
80
|
+
tagName,
|
|
81
|
+
url,
|
|
82
|
+
rule,
|
|
83
|
+
ruleIndex
|
|
93
84
|
};
|
|
94
85
|
}
|
|
95
86
|
function createElement(origin, attributes) {
|
|
96
|
-
|
|
97
|
-
if (
|
|
98
|
-
|
|
87
|
+
const crossOrigin = true === attributes.crossOrigin ? 'anonymous' : attributes.crossOrigin;
|
|
88
|
+
if (origin instanceof HTMLScriptElement) {
|
|
89
|
+
const script = document.createElement("script");
|
|
99
90
|
script.src = attributes.url;
|
|
100
91
|
if (crossOrigin) script.crossOrigin = crossOrigin;
|
|
101
92
|
if (attributes.times) script.dataset.rbRetryTimes = String(attributes.times);
|
|
@@ -104,8 +95,8 @@
|
|
|
104
95
|
if (attributes.ruleIndex >= 0) script.dataset.rbRuleI = String(attributes.ruleIndex);
|
|
105
96
|
return script;
|
|
106
97
|
}
|
|
107
|
-
if (
|
|
108
|
-
|
|
98
|
+
if (origin instanceof HTMLLinkElement) {
|
|
99
|
+
const link = document.createElement('link');
|
|
109
100
|
link.rel = origin.rel || 'stylesheet';
|
|
110
101
|
if (origin.as) link.as = origin.as;
|
|
111
102
|
link.href = attributes.url;
|
|
@@ -116,10 +107,10 @@
|
|
|
116
107
|
}
|
|
117
108
|
}
|
|
118
109
|
function reloadElementResource(origin, freshElement, attributes) {
|
|
119
|
-
if (
|
|
110
|
+
if (origin instanceof HTMLScriptElement) if (attributes.isAsync) document.body.appendChild(freshElement);
|
|
120
111
|
else console.warn(ERROR_PREFIX, "load sync script failed, for security only async/defer script can be retried", origin);
|
|
121
|
-
if (
|
|
122
|
-
if (
|
|
112
|
+
if (origin instanceof HTMLLinkElement) document.getElementsByTagName('head')[0].appendChild(freshElement);
|
|
113
|
+
if (origin instanceof HTMLImageElement) {
|
|
123
114
|
origin.src = attributes.url;
|
|
124
115
|
origin.dataset.rbRetryTimes = String(attributes.times);
|
|
125
116
|
origin.dataset.rbOriginalQuery = String(attributes.originalQuery);
|
|
@@ -127,66 +118,64 @@
|
|
|
127
118
|
}
|
|
128
119
|
function retry(rules, e) {
|
|
129
120
|
var _target_dataset_rbOriginalQuery;
|
|
130
|
-
|
|
121
|
+
const targetInfo = validateTargetInfo(rules, e);
|
|
131
122
|
if (false === targetInfo) return;
|
|
132
|
-
|
|
133
|
-
if ("u" > typeof window && Object.keys(window.__RB_ASYNC_CHUNKS__ || {}).some(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
var domain = findCurrentDomain(url, rule);
|
|
137
|
-
var existRetryTimes = Number(target.dataset.rbRetryTimes) || 0;
|
|
123
|
+
const { target, tagName, url, rule, ruleIndex } = targetInfo;
|
|
124
|
+
if ("u" > typeof window && Object.keys(window.__RB_ASYNC_CHUNKS__ || {}).some((chunkName)=>-1 !== url.indexOf(chunkName))) return;
|
|
125
|
+
const domain = findCurrentDomain(url, rule);
|
|
126
|
+
const existRetryTimes = Number(target.dataset.rbRetryTimes) || 0;
|
|
138
127
|
if (existRetryTimes === rule.max) {
|
|
139
128
|
if ('function' == typeof rule.onFail) {
|
|
140
|
-
|
|
129
|
+
const context = {
|
|
141
130
|
times: existRetryTimes,
|
|
142
|
-
domain
|
|
143
|
-
url
|
|
144
|
-
tagName
|
|
131
|
+
domain,
|
|
132
|
+
url,
|
|
133
|
+
tagName,
|
|
145
134
|
isAsyncChunk: false
|
|
146
135
|
};
|
|
147
136
|
rule.onFail(context);
|
|
148
137
|
}
|
|
149
138
|
return;
|
|
150
139
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
140
|
+
const nextDomain = findNextDomain(domain, rule);
|
|
141
|
+
const originalQuery = null != (_target_dataset_rbOriginalQuery = target.dataset.rbOriginalQuery) ? _target_dataset_rbOriginalQuery : getQueryFromUrl(url);
|
|
142
|
+
const isAsync = Boolean(target.dataset.rbAsync) || target.async || target.defer;
|
|
143
|
+
const attributes = {
|
|
155
144
|
url: getNextRetryUrl(url, domain, nextDomain, existRetryTimes, originalQuery, rule),
|
|
156
145
|
times: existRetryTimes + 1,
|
|
157
|
-
originalQuery
|
|
158
|
-
ruleIndex
|
|
146
|
+
originalQuery,
|
|
147
|
+
ruleIndex,
|
|
159
148
|
crossOrigin: rule.crossOrigin,
|
|
160
|
-
isAsync
|
|
149
|
+
isAsync
|
|
161
150
|
};
|
|
162
|
-
|
|
163
|
-
|
|
151
|
+
const element = createElement(target, attributes);
|
|
152
|
+
const context = {
|
|
164
153
|
times: existRetryTimes,
|
|
165
|
-
domain
|
|
166
|
-
url
|
|
167
|
-
tagName
|
|
154
|
+
domain,
|
|
155
|
+
url,
|
|
156
|
+
tagName,
|
|
168
157
|
isAsyncChunk: false
|
|
169
158
|
};
|
|
170
|
-
if ('function' == typeof rule.onRetry) rule.onRetry(
|
|
171
|
-
|
|
172
|
-
if (delayValue > 0) setTimeout(
|
|
159
|
+
if ('function' == typeof rule.onRetry) rule.onRetry(context);
|
|
160
|
+
const delayValue = 'function' == typeof rule.delay ? rule.delay(context) : rule.delay;
|
|
161
|
+
if (delayValue > 0) setTimeout(()=>{
|
|
173
162
|
reloadElementResource(target, element, attributes);
|
|
174
163
|
}, delayValue);
|
|
175
164
|
else reloadElementResource(target, element, attributes);
|
|
176
165
|
}
|
|
177
166
|
function load(rules, e) {
|
|
178
|
-
|
|
167
|
+
const targetInfo = validateTargetInfo(rules, e);
|
|
179
168
|
if (false === targetInfo) return;
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
169
|
+
const { target, tagName, url, rule } = targetInfo;
|
|
170
|
+
const domain = findCurrentDomain(url, rule);
|
|
171
|
+
const retryTimes = Number(target.dataset.rbRetryTimes) || 0;
|
|
183
172
|
if (0 === retryTimes) return;
|
|
184
173
|
if ('function' == typeof rule.onSuccess) {
|
|
185
|
-
|
|
174
|
+
const context = {
|
|
186
175
|
times: retryTimes,
|
|
187
|
-
domain
|
|
188
|
-
url
|
|
189
|
-
tagName
|
|
176
|
+
domain,
|
|
177
|
+
url,
|
|
178
|
+
tagName,
|
|
190
179
|
isAsyncChunk: false
|
|
191
180
|
};
|
|
192
181
|
rule.onSuccess(context);
|
|
@@ -195,17 +184,17 @@
|
|
|
195
184
|
function registerInitialChunkRetry() {
|
|
196
185
|
if ("u" > typeof window && !window.__RB_ASYNC_CHUNKS__) window.__RB_ASYNC_CHUNKS__ = {};
|
|
197
186
|
try {
|
|
198
|
-
|
|
187
|
+
const config = __RETRY_OPTIONS__;
|
|
199
188
|
if ("u" > typeof window && void 0 !== window.document) {
|
|
200
|
-
document.addEventListener('error',
|
|
201
|
-
if (e &&
|
|
189
|
+
document.addEventListener('error', (e)=>{
|
|
190
|
+
if (e && e.target instanceof Element) try {
|
|
202
191
|
retry(config, e);
|
|
203
192
|
} catch (err) {
|
|
204
193
|
console.error('retry error captured', err);
|
|
205
194
|
}
|
|
206
195
|
}, true);
|
|
207
|
-
document.addEventListener('load',
|
|
208
|
-
if (e &&
|
|
196
|
+
document.addEventListener('load', (e)=>{
|
|
197
|
+
if (e && e.target instanceof Element) try {
|
|
209
198
|
load(config, e);
|
|
210
199
|
} catch (err) {
|
|
211
200
|
console.error('load error captured', err);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(()=>{function e(e,t){let n=t.domain;for(let t=0;t<n.length;t++){let r=n[t];if(-1!==e.indexOf(r))return r}return window.origin}let t=/[?#].*$/,n={link:HTMLLinkElement,script:HTMLScriptElement,img:HTMLImageElement};function r(t,r){let i=r.target,o=i.tagName.toLocaleLowerCase(),s=i instanceof HTMLScriptElement||i instanceof HTMLImageElement?i.src:i instanceof HTMLLinkElement?i.href:null;if(!s)return!1;let a=Number(i.dataset.rbRuleI||"-1"),l=t[a]||function(t,n,r){for(let i=0;i<r.length;i++){let o=r[i],s=o.test,a=!0;if(s instanceof RegExp?a=s.test(t):"string"==typeof s?a=new RegExp(s).test(t):"function"==typeof s&&(a=s(t)),o.domain&&o.domain.length>0){let n=e(t,o);o.domain.includes(n)||(a=!1)}if(o.type&&o.type.length>0&&!o.type.includes(n)&&(a=!1),a)return o}return null}(s,o,t);if(!l)return!1;a=t.indexOf(l);let c=l.type;return!!o&&-1!==c.indexOf(o)&&!!n[o]&&i instanceof n[o]&&{target:i,tagName:o,url:s,rule:l,ruleIndex:a}}function i(e,t,n){e instanceof HTMLScriptElement&&(n.isAsync?document.body.appendChild(t):console.warn("[@rsbuild/plugin-assets-retry] ","load sync script failed, for security only async/defer script can be retried",e)),e instanceof HTMLLinkElement&&document.getElementsByTagName("head")[0].appendChild(t),e instanceof HTMLImageElement&&(e.src=n.url,e.dataset.rbRetryTimes=n.times+"",e.dataset.rbOriginalQuery=n.originalQuery+"")}"u">typeof window&&!window.__RB_ASYNC_CHUNKS__&&(window.__RB_ASYNC_CHUNKS__={});try{let n=__RETRY_OPTIONS__;"u">typeof window&&void 0!==window.document&&(document.addEventListener("error",o=>{if(o&&o.target instanceof Element)try{!function(n,o){var s,a;let l,c,u,d,f=r(n,o);if(!1===f)return;let{target:y,tagName:m,url:g,rule:p,ruleIndex:_}=f;if("u">typeof window&&Object.keys(window.__RB_ASYNC_CHUNKS__||{}).some(e=>-1!==g.indexOf(e)))return;let E=e(g,p),b=Number(y.dataset.rbRetryTimes)||0;if(b===p.max){"function"==typeof p.onFail&&p.onFail({times:b,domain:E,url:g,tagName:m,isAsyncChunk:!1});return}let T=(l=p.domain,c=e(E,p),u=l.indexOf(c),-1===u?c:l[(u+1)%l.length]),w=null!=(s=y.dataset.rbOriginalQuery)?s:(d=g.split("?")[1])?"?"+d.split("#")[0]:"",L=!!y.dataset.rbAsync||y.async||y.defer,O={url:g.replace(E,T).replace(t,"")+(a=b+1,!0===p.addQuery?""!==w?`${w}&retry=${a}`:"?retry="+a:"function"==typeof p.addQuery?p.addQuery({times:a,originalQuery:w}):""),times:b+1,originalQuery:w,ruleIndex:_,crossOrigin:p.crossOrigin,isAsync:L},h=function(e,t){let n=!0===t.crossOrigin?"anonymous":t.crossOrigin;if(e instanceof HTMLScriptElement){let e=document.createElement("script");return e.src=t.url,n&&(e.crossOrigin=n),t.times&&(e.dataset.rbRetryTimes=t.times+""),t.isAsync&&(e.dataset.rbAsync=""),void 0!==t.originalQuery&&(e.dataset.rbOriginalQuery=t.originalQuery),t.ruleIndex>=0&&(e.dataset.rbRuleI=t.ruleIndex+""),e}if(e instanceof HTMLLinkElement){let r=document.createElement("link");return r.rel=e.rel||"stylesheet",e.as&&(r.as=e.as),r.href=t.url,n&&(r.crossOrigin=n),t.times&&(r.dataset.rbRetryTimes=t.times+""),void 0!==t.originalQuery&&(r.dataset.rbOriginalQuery=t.originalQuery),r}}(y,O),R={times:b,domain:E,url:g,tagName:m,isAsyncChunk:!1};"function"==typeof p.onRetry&&p.onRetry(R);let H="function"==typeof p.delay?p.delay(R):p.delay;H>0?setTimeout(()=>{i(y,h,O)},H):i(y,h,O)}(n,o)}catch(e){console.error("retry error captured",e)}},!0),document.addEventListener("load",t=>{if(t&&t.target instanceof Element)try{!function(t,n){let i=r(t,n);if(!1===i)return;let{target:o,tagName:s,url:a,rule:l}=i,c=e(a,l),u=Number(o.dataset.rbRetryTimes)||0;0!==u&&"function"==typeof l.onSuccess&&l.onSuccess({times:u,domain:c,url:a,tagName:s,isAsyncChunk:!1})}(n,t)}catch(e){console.error("load error captured",e)}},!0))}catch(e){console.error("monitor error captured",e)}})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-assets-retry",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "An Rsbuild plugin to automatically resend requests when static assets fail to load.",
|
|
5
5
|
"repository": "https://github.com/rstackjs/rsbuild-plugin-assets-retry",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,44 +8,35 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
|
-
"
|
|
12
|
-
"require": "./dist/index.cjs"
|
|
11
|
+
"default": "./dist/index.js"
|
|
13
12
|
}
|
|
14
13
|
},
|
|
15
|
-
"main": "./dist/index.js",
|
|
16
|
-
"module": "./dist/index.mjs",
|
|
17
14
|
"types": "./dist/index.d.ts",
|
|
18
|
-
"files": [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"bump": "npx bumpp",
|
|
22
|
-
"dev": "rslib build --watch",
|
|
23
|
-
"lint": "biome check .",
|
|
24
|
-
"lint:write": "biome check . --write",
|
|
25
|
-
"prepare": "simple-git-hooks && npm run build",
|
|
26
|
-
"test": "playwright test"
|
|
27
|
-
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
28
18
|
"simple-git-hooks": {
|
|
29
|
-
"pre-commit": "
|
|
19
|
+
"pre-commit": "pnpm run lint:write"
|
|
30
20
|
},
|
|
31
21
|
"devDependencies": {
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"@rsbuild/
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@swc/core": "^1.15.
|
|
39
|
-
"@types/node": "^24.
|
|
40
|
-
"@types/react": "^19.2.
|
|
22
|
+
"@microsoft/api-extractor": "^7.58.7",
|
|
23
|
+
"@playwright/test": "^1.60.0",
|
|
24
|
+
"@rsbuild/core": "^2.0.7",
|
|
25
|
+
"@rsbuild/plugin-react": "^2.0.0",
|
|
26
|
+
"@rslib/core": "^0.21.5",
|
|
27
|
+
"@rslint/core": "^0.5.3",
|
|
28
|
+
"@swc/core": "^1.15.40",
|
|
29
|
+
"@types/node": "^24.12.4",
|
|
30
|
+
"@types/react": "^19.2.15",
|
|
41
31
|
"@types/react-dom": "^19.2.3",
|
|
42
32
|
"@types/serialize-javascript": "^5.0.4",
|
|
43
|
-
"playwright": "^1.
|
|
44
|
-
"
|
|
45
|
-
"react
|
|
46
|
-
"
|
|
33
|
+
"playwright": "^1.60.0",
|
|
34
|
+
"prettier": "^3.8.3",
|
|
35
|
+
"react": "^19.2.6",
|
|
36
|
+
"react-dom": "^19.2.6",
|
|
37
|
+
"serialize-javascript": "^7.0.5",
|
|
47
38
|
"simple-git-hooks": "^2.13.1",
|
|
48
|
-
"typescript": "
|
|
39
|
+
"typescript": "6.0.3"
|
|
49
40
|
},
|
|
50
41
|
"peerDependencies": {
|
|
51
42
|
"@rsbuild/core": "^1.0.0 || ^2.0.0-0"
|
|
@@ -55,9 +46,16 @@
|
|
|
55
46
|
"optional": true
|
|
56
47
|
}
|
|
57
48
|
},
|
|
58
|
-
"packageManager": "pnpm@10.28.2",
|
|
59
49
|
"publishConfig": {
|
|
60
50
|
"access": "public",
|
|
61
51
|
"registry": "https://registry.npmjs.org/"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "rslib",
|
|
55
|
+
"dev": "rslib -w",
|
|
56
|
+
"lint": "rslint && prettier -c .",
|
|
57
|
+
"lint:write": "rslint --fix && prettier -w .",
|
|
58
|
+
"test": "playwright test",
|
|
59
|
+
"bump": "pnpx bumpp"
|
|
62
60
|
}
|
|
63
|
-
}
|
|
61
|
+
}
|