Skip to content

Commit

Permalink
fix: fix fast-pr-url-rules.js (#913)
Browse files Browse the repository at this point in the history
* fix: fix fast-pr-url-rules.js

* fix:fix fast-pr-url-rules.js

* fix

* fix

* fix

* fix

* fix

* fix
  • Loading branch information
wangyantong2000 authored Nov 11, 2024
1 parent e778114 commit 670c1de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// remote-code.js
export const urlRules = [
const urlRules = [
{
domains: ['open-digger.cn', 'open-digger'],
ruleFunction: (url) => {
Expand Down Expand Up @@ -159,4 +158,6 @@ function matchFastPrUrl(url) {
// Make the function globally available if needed
if (typeof window !== 'undefined' && typeof window.document !== 'undefined') {
window.matchFastPrUrl = matchFastPrUrl;
} else {
module.exports = { urlRules };
}
3 changes: 1 addition & 2 deletions scripts/test_configs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { urlRules } from '../public_configs/fast-pr-url-rules.js';

(async () => {
const { urlRules } = await import('../public_configs/fast-pr-url-rules.cjs');
let hasError = false;
for (const rule of urlRules) {
const tests = rule.tests;
Expand Down
2 changes: 1 addition & 1 deletion src/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export const OSS_XLAB_ENDPOINT = 'https://oss.open-digger.cn';
export const HYPERTRONS_CRX_NEW_ISSUE = 'https://github.com/hypertrons/hypertrons-crx/issues/new/choose';

export const HYPERCRX_GITHUB = 'https://github.com/hypertrons/hypertrons-crx';
export const OSS_URL = 'https://hypercrx-fastpr.oss-cn-beijing.aliyuncs.com/fastPR-url-rules.js';
export const OSS_URL = 'https://hypercrx-fastpr.oss-cn-beijing.aliyuncs.com/fast-pr-url-rules.cjs';

0 comments on commit 670c1de

Please sign in to comment.