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 22, 2024
1 parent ff820db commit 1ba8c2f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 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.35",
"version": "1.8.78-beta.36",
"description": "",
"scripts": {
"release": "babel src --extensions \".ts\" --out-dir lib",
Expand Down
1 change: 1 addition & 0 deletions plugins/babel-plugin-canyon/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default declare((api, config) => {
projectID: serviceParams.slug,
sha: serviceParams.commit,
instrumentCwd: process.cwd(),
dsn: process.env['DSN']||'-'
})
}
},
Expand Down
7 changes: 6 additions & 1 deletion plugins/babel-plugin-canyon/src/visitor-program-exit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ export const visitorProgramExit = (api,path,serviceParams) => {
t.identifier("instrumentCwd"), // 键名
t.stringLiteral(serviceParams.instrumentCwd) // 键值
);
properties.push(instrumentCwdField); // 添加新字段
// 增加 dsn 字段
const dsnField = t.objectProperty(
t.identifier("dsn"), // 键名
t.stringLiteral(serviceParams.dsn) // 键值
);
properties.push(dsnField); // 添加新字段
}
}
}})
Expand Down

0 comments on commit 1ba8c2f

Please sign in to comment.