The OIDC function from oidc.js is not currently exported neither available from the libnpmpublish package. This mean that to get it working in Lerna/Lerna-Lite (I maintain the latter), we had to copy and reimplement the oidc.js into Lerna/Lerna-Lite to make it work.
There's 2 obvious issues related to this approach:
- duplicate code increasing Lerna/Lerna-Lite project size
- any changes made in
oidc.js needs to be resync manually in external projects like Lerna/Lerna-Lite
- for example adding OIDC CircleCI support was added much later and this wasn't synched back to Lerna which means it doesn't currently work in Lerna (I did synch it myself in Lerna-Lite though)
- ref: Lerna
oidc.ts and Lerna-Lite oidc.ts
libnpmpublish only exports 2 functions (publish and unpublish)
|
module.exports = { |
|
publish: require('./publish.js'), |
|
unpublish: require('./unpublish.js'), |
|
} |
I mention Lerna/Lerna-Lite in here, but I'm sure there's few hundred projects that would benefit from having OIDC available directly in libnpmpublish
The OIDC function from
oidc.jsis not currently exported neither available from thelibnpmpublishpackage. This mean that to get it working in Lerna/Lerna-Lite (I maintain the latter), we had to copy and reimplement theoidc.jsinto Lerna/Lerna-Lite to make it work.There's 2 obvious issues related to this approach:
oidc.jsneeds to be resync manually in external projects like Lerna/Lerna-Liteoidc.tsand Lerna-Liteoidc.tslibnpmpublishonly exports 2 functions (publishandunpublish)cli/workspaces/libnpmpublish/lib/index.js
Lines 1 to 4 in 455aa4a
I mention Lerna/Lerna-Lite in here, but I'm sure there's few hundred projects that would benefit from having OIDC available directly in
libnpmpublish