Skip to content

Commit

Permalink
🐳 chore: remove broken cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
xytoki committed Jan 21, 2024
1 parent b00b5fa commit 7790b94
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 19 deletions.
13 changes: 1 addition & 12 deletions resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/serviceWorkerEntrance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions src/views/Playground/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sw/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 7790b94

Please sign in to comment.