⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
invoice
/
node_modules
/
vue-echarts
/
scripts
/
Edit File: postinstall.js
/* eslint-disable @typescript-eslint/no-var-requires */ const path = require("path"); const fs = require("fs"); const packageFile = path.resolve(__dirname, "../package.json"); const typesPaths = { 3: "dist/index.d.ts", 2: "dist/index.vue2.d.ts" }; function switchVersion(version) { const typesPath = typesPaths[version]; const package = JSON.parse(fs.readFileSync(packageFile, "utf8")); if (typesPath !== package.types) { package.types = typesPath; fs.writeFileSync(packageFile, JSON.stringify(package, null, " "), "utf8"); } console.log(`[vue-echarts] Switched to Vue ${version} environment.`); } function loadVue() { try { return require("vue"); } catch (e) { return null; } } const Vue = loadVue(); // Align the process with vue-demi if (!Vue || typeof Vue.version !== "string") { console.warn( '[vue-echarts] Vue is not found. Please run "npm install vue" to install.' ); } else if (Vue.version.startsWith("3.")) { switchVersion(3); } else if (Vue.version.startsWith("2.")) { switchVersion(2); } else { console.warn(`[vue-echarts] Vue version v${Vue.version} is not supported.`); }
Simpan