Rename v2 auth service to account (#28260)

This commit is contained in:
Dax 2026-05-20 20:53:27 -04:00 committed by GitHub
commit 8643c0721e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
67 changed files with 2544 additions and 1382 deletions

View file

@ -5,12 +5,16 @@ export const EnvPlugin = PluginV2.define({
id: PluginV2.ID.make("env"),
effect: Effect.gen(function* () {
return {
"provider.update": Effect.fn(function* (evt) {
const key = evt.provider.env.find((item) => process.env[item])
if (!key) return
evt.provider.enabled = {
via: "env",
name: key,
"catalog.transform": Effect.fn(function* (evt) {
for (const item of evt.data) {
const key = item.provider.env.find((env) => process.env[env])
if (!key) continue
evt.provider.update(item.provider.id, (provider) => {
provider.enabled = {
via: "env",
name: key,
}
})
}
}),
}