Skip to content

Commit

Permalink
chore: daily development
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Dec 20, 2024
1 parent f62840b commit fe3599f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/babel-plugin-canyon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-canyon",
"version": "2.0.0-beta.23",
"version": "2.0.0-beta.24",
"description": "",
"scripts": {
"release": "babel src --extensions \".ts\" --out-dir lib",
Expand Down
28 changes: 28 additions & 0 deletions plugins/babel-plugin-canyon/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,41 @@ import tep from './template';
import packageJson from '../package.json'
const writeCanyonToLocalTemplate = template(tep["templates/write-canyon-to-local-template.js"])

function newAtob() {
try {
return typeof atob === 'function' ? atob : null
} catch (e) {
return null
}
}
const newatob = newAtob()

export default declare((api, config, dirname) => {
api.assertVersion(7);
return {
visitor: {
Program: {
exit: (path) => {
const yushe = (process.env.CI_SERVER_URL || '').includes(newatob('Y3RyaXA=')) ? {
provider: 'tripgl',
// ==========以上是属性=============
// 代理配置
oneByOne: {
proxy:{
protocol: 'http',
host: newatob('cHJveHlnYXRlMi5jdHJpcGNvcnAuY29t'),
port: 8080
}
}, //可配置代理 默认false
special: true, //默认false
keepMap: true, // 默认false
}
:{}
config = {
...yushe,
...config,
}

const envs = process.env
const env_sha = envs.CI_MERGE_REQUEST_SOURCE_BRANCH_SHA || envs.CI_BUILD_REF || envs.CI_COMMIT_SHA
const env_projectID = envs.CI_PROJECT_ID
Expand Down

0 comments on commit fe3599f

Please sign in to comment.