fix: 微信登录补充保存username和role
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Agent
2026-04-04 07:35:21 +00:00
parent 756444ef2b
commit d12eea7693
10597 changed files with 817047 additions and 3 deletions

View File

@@ -0,0 +1,61 @@
function resolveNativeBinding () {
const { platform, arch } = process
let nativeBinding = ''
switch (platform) {
case 'win32':
switch (arch) {
case 'x64':
nativeBinding = 'preprocessor-windows-x86_64'
break
default:
throw new Error(`Unsupported architecture on Windows: ${arch}`)
}
break
case 'darwin':
switch (arch) {
case 'x64':
nativeBinding = 'preprocessor-macos-x86_64'
break
case 'arm64':
nativeBinding = 'preprocessor-macos-arm64'
break
default:
throw new Error(`Unsupported architecture on macOS: ${arch}`)
}
break
default:
throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`)
}
return require('./' + nativeBinding)
}
async function runProcess (vue3 = false) {
try {
/* eslint-disable no-undef */
globalThis.preprocessor_require = require
await resolveNativeBinding().process(vue3)
} catch (error) {
}
}
class PreprocessorWebpackPlugin {
apply (compiler) {
compiler.hooks.afterEmit.tapPromise('d', (params) => {
return runProcess(false)
})
}
}
function PreprocessorVitePlugin () {
return {
name: 'preprocessor',
async writeBundle (_) {
await runProcess(true)
}
}
}
module.exports = {
PreprocessorWebpackPlugin,
PreprocessorVitePlugin
}