diff --git a/resources.json b/resources.json index 28b003c..749415d 100644 --- a/resources.json +++ b/resources.json @@ -2,18 +2,7 @@ { "tag": "ort", "test": "ort-wasm-simd.wasm", - "prefix": "https://cdn.staticfile.org/onnxruntime-web/1.10.0/", - "resources": { - "ort-wasm-simd.wasm": "ort-wasm-simd.wasm", - "ort-wasm-simd-threaded.wasm": "ort-wasm-simd-threaded.wasm", - "ort-wasm.wasm": "ort-wasm.wasm", - "ort-wasm-threaded.wasm": "ort-wasm-threaded.wasm" - } - }, - { - "tag": "ort", - "test": "ort-wasm-simd.wasm", - "prefix": "https://s1.pstatp.com/cdn/expire-1-y/onnxruntime-web/1.10.0/", + "prefix": "https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/onnxruntime-web/1.10.0/", "resources": { "ort-wasm-simd.wasm": "ort-wasm-simd.wasm", "ort-wasm-simd-threaded.wasm": "ort-wasm-simd-threaded.wasm", diff --git a/src/utils/serviceWorkerEntrance.ts b/src/utils/serviceWorkerEntrance.ts index 88a5703..47cc87d 100644 --- a/src/utils/serviceWorkerEntrance.ts +++ b/src/utils/serviceWorkerEntrance.ts @@ -9,7 +9,7 @@ import 'element-plus/theme-chalk/el-notification.css' import { hasSIMD } from './compatibility' const ortWasm = hasSIMD ? 'ort-wasm-simd.wasm' : 'ort-wasm.wasm' const ocvWasm = hasSIMD ? 'opencv-simd.wasm' : 'opencv-normal.wasm' -const resourcesArr = { [ortWasm]: '1.10.0', [ocvWasm]: '1.0.5', 'ppocr.ort': '1.0.5', 'yas.ort': '1.0.5' } +const resourcesArr = { [ortWasm]: '1.10.0-1', [ocvWasm]: '1.0.5', 'ppocr.ort': '1.0.5', 'yas.ort': '1.0.5' } export function loadSW() { const sw = new ServiceWorker(WorkerUrl(/* @worker-url '../../sw/index.ts' 'sw static/sw.js' */), { fallback: '/sw.js', diff --git a/src/views/Playground/Index.vue b/src/views/Playground/Index.vue index 76ea78b..b61fd2f 100644 --- a/src/views/Playground/Index.vue +++ b/src/views/Playground/Index.vue @@ -136,10 +136,10 @@ src.delete()`) // @ts-ignore window.require.reset() } catch (e) {} - const monacoBase = 'https://s1.pstatp.com/cdn/expire-1-y/monaco-editor/0.31.1/min/vs' + const monacoBase = 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.31.1/min/vs' await Promise.all([ loadScript(monacoBase + '/loader.min.js'), - loadScript('https://s2.pstatp.com/cdn/expire-1-y/lodash.js/4.17.21/lodash.min.js'), + loadScript('https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/lodash.js/4.17.21/lodash.min.js'), ]) // @ts-ignore window.define.push = webpackJsonp.push diff --git a/sw/index.ts b/sw/index.ts index bbf2353..f5ed104 100644 --- a/sw/index.ts +++ b/sw/index.ts @@ -170,7 +170,7 @@ registerRoute( // cachefirst for static cdn registerRoute( ({ url }) => { - return new URL(url).origin.includes('pstatp.com') + return new URL(url).origin.includes('bytecdntp.com') }, new CacheFirst({ cacheName: cacheName + '-prejs', diff --git a/vue.config.js b/vue.config.js index 9913a51..021edbb 100644 --- a/vue.config.js +++ b/vue.config.js @@ -50,7 +50,7 @@ console.log('') const PREJS_PROD_SUFFIX = process.env.NODE_ENV === 'production' ? '.prod' : '' const PREJS_URL = - 'https://s2.pstatp.com/cdn/expire-1-y/??' + + 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/??' + [ `vue/3.2.31/vue.runtime.global${PREJS_PROD_SUFFIX}.min.js`, `vue-router/4.0.13/vue-router.global${PREJS_PROD_SUFFIX}.min.js`, @@ -296,8 +296,8 @@ module.exports = defineConfig({ // externals config.externals({ 'monaco-editor': 'var monaco', - exceljs: ['https://s2.pstatp.com/cdn/expire-1-y/exceljs/4.3.0/exceljs.min.js', 'ExcelJS'], - jszip: ['https://s2.pstatp.com/cdn/expire-1-y/jszip/3.7.0/jszip.min.js', 'JSZip'], + exceljs: ['https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/exceljs/4.3.0/exceljs.min.js', 'ExcelJS'], + jszip: ['https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/jszip/3.7.0/jszip.min.js', 'JSZip'], '@sentry/browser': [ 'https://npm.elemecdn.com/@sentry/tracing/build/bundle.tracing.es6.min.js', 'Sentry',