Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
chore(shared): fix obfuscator.js to use default options for obfuscation
白熱8516acb5fd6c
diff --git a/common/shared/vite/obfuscator.js b/common/shared/vite/obfuscator.jsindex d38ed4b163..8b049adf4c 100644--- a/common/shared/vite/obfuscator.js+++ b/common/shared/vite/obfuscator.js@@ -5,29 +5,12 @@ exports.obfuscator = function obfuscator() {return {name: 'obfuscator',enforce: 'post',- async generateBundle(options, bundle) {+ async generateBundle(_options, bundle) {if (process.env.BUNDLE_TYPE === 'lite') {for (const file in bundle) {if (bundle[file].type === 'chunk' && /\.js$/.test(file)) {const code = bundle[file].code;- const obfuscationResult = JavaScriptObfuscator.obfuscate(code, {- compact: true,- controlFlowFlattening: true,- deadCodeInjection: true,- disableConsoleOutput: true,- identifierNamesGenerator: 'hexadecimal',- log: false,- numbersToExpressions: true,- renameGlobals: false,- selfDefending: true,- simplify: true,- splitStrings: true,- stringArray: true,- stringArrayEncoding: ['base64'],- stringArrayThreshold: 0.75,- transformObjectKeys: true,- unicodeEscapeSequence: false,- });+ const obfuscationResult = JavaScriptObfuscator.obfuscate(code);bundle[file].code = obfuscationResult.getObfuscatedCode();}}