Skip to content

Commit

Permalink
chore: repo overall update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Nov 19, 2024
1 parent 4d838d9 commit f8c3632
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
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": "1.8.78-beta.29",
"version": "1.8.78-beta.30",
"description": "",
"scripts": {
"release": "babel src --extensions \".ts\" --out-dir lib",
Expand Down
8 changes: 5 additions & 3 deletions plugins/babel-plugin-canyon/src/helpers/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ export function walkProviders(inputs: UploaderInputs): IServiceParams {
}
// 返回默认值
return {
projectID: '-',
sha: '-',
instrumentCwd: '-',
slug: '-',
commit: '-',
service: '-',
branch: '-',
// instrumentCwd: '-',
// branch: '-',
}
// throw new Error(`Unable to detect provider.`)
}
16 changes: 11 additions & 5 deletions plugins/babel-plugin-canyon/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,23 @@ export default declare((api, config) => {
// 优先级:手动设置 > CI/CD提供商
// hit需要打到__coverage__中,因为ui自动化测试工具部署地方不确定
// map就不需要,写到本地时,可以侦测本地流水线变量,直接上报上来
// 他的职责只是寻找到项目,和插桩路径
const serviceParams = detectProvider({
envs: process.env,
// @ts-ignore
args: {
projectID: config.projectID,
sha: config.sha,
instrumentCwd: config.instrumentCwd,
branch: config.branch,
// projectID: config.projectID,
// sha: config.sha,
// instrumentCwd: config.instrumentCwd,
// branch: config.branch,
}
})
console.log(serviceParams,'serviceParams')
visitorProgramExit(api,path,serviceParams)
visitorProgramExit(api,path,{
projectID: serviceParams.slug,
sha: serviceParams.commit,
instrumentCwd: process.cwd(),
})
}
},
},
Expand Down

0 comments on commit f8c3632

Please sign in to comment.