@homeflare/alchemy 0.46.0 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/dist/argocd/cluster.d.ts +5 -5
- package/dist/argocd/cluster.d.ts.map +1 -1
- package/dist/argocd/fake-argocd.d.ts +1 -1
- package/dist/argocd/fake-argocd.d.ts.map +1 -1
- package/dist/argocd/index.js.map +1 -1
- package/dist/argocd/providers.d.ts +1 -1
- package/dist/argocd/providers.d.ts.map +1 -1
- package/dist/argocd/repo-creds.d.ts +5 -5
- package/dist/argocd/repo-creds.d.ts.map +1 -1
- package/dist/argocd/repository.d.ts +5 -5
- package/dist/argocd/repository.d.ts.map +1 -1
- package/dist/argocd/resource.d.ts +1 -1
- package/dist/argocd/resource.d.ts.map +1 -1
- package/dist/caddy/admin.d.ts +1 -1
- package/dist/caddy/admin.d.ts.map +1 -1
- package/dist/caddy/caddy-http-client.d.ts +2 -2
- package/dist/caddy/caddy-http-client.d.ts.map +1 -1
- package/dist/caddy/format.d.ts +1 -1
- package/dist/caddy/format.d.ts.map +1 -1
- package/dist/caddy/index.js +6 -6
- package/dist/caddy/index.js.map +4 -4
- package/dist/ceph/auth-entity.d.ts +1 -1
- package/dist/ceph/auth-entity.d.ts.map +1 -1
- package/dist/ceph/ceph-auth-reconcile.d.ts +1 -1
- package/dist/ceph/ceph-auth-reconcile.d.ts.map +1 -1
- package/dist/ceph/index.js +5 -5
- package/dist/ceph/index.js.map +4 -4
- package/dist/cloudflare/fake-mesh.d.ts +2 -2
- package/dist/cloudflare/fake-mesh.d.ts.map +1 -1
- package/dist/cloudflare/fake-r2-lock.d.ts +1 -1
- package/dist/cloudflare/fake-r2-lock.d.ts.map +1 -1
- package/dist/cloudflare/index.js +3 -3
- package/dist/cloudflare/index.js.map +3 -3
- package/dist/cloudflare/mesh-node-token.d.ts +1 -1
- package/dist/cloudflare/mesh-node-token.d.ts.map +1 -1
- package/dist/cloudflare/mesh-node.d.ts +1 -1
- package/dist/cloudflare/mesh-node.d.ts.map +1 -1
- package/dist/cloudflare/providers.d.ts +1 -1
- package/dist/cloudflare/providers.d.ts.map +1 -1
- package/dist/cloudflare/r2-bucket-lock.d.ts +1 -1
- package/dist/cloudflare/r2-bucket-lock.d.ts.map +1 -1
- package/dist/discord/application-command.d.ts +6 -6
- package/dist/discord/application-command.d.ts.map +1 -1
- package/dist/discord/fake-discord.d.ts +1 -1
- package/dist/discord/fake-discord.d.ts.map +1 -1
- package/dist/discord/guild-application-command.d.ts +6 -6
- package/dist/discord/guild-application-command.d.ts.map +1 -1
- package/dist/discord/index.js.map +1 -1
- package/dist/discord/providers.d.ts +1 -1
- package/dist/discord/providers.d.ts.map +1 -1
- package/dist/discord/resource.d.ts +1 -1
- package/dist/discord/resource.d.ts.map +1 -1
- package/dist/forgejo/branch-protection.d.ts +5 -5
- package/dist/forgejo/branch-protection.d.ts.map +1 -1
- package/dist/forgejo/fake-forgejo.d.ts +1 -1
- package/dist/forgejo/fake-forgejo.d.ts.map +1 -1
- package/dist/forgejo/index.js.map +1 -1
- package/dist/forgejo/org-actions-secrets.d.ts +5 -5
- package/dist/forgejo/org-actions-secrets.d.ts.map +1 -1
- package/dist/forgejo/org-label.d.ts +5 -5
- package/dist/forgejo/org-label.d.ts.map +1 -1
- package/dist/forgejo/org-team.d.ts +5 -5
- package/dist/forgejo/org-team.d.ts.map +1 -1
- package/dist/forgejo/repo-webhook.d.ts +5 -5
- package/dist/forgejo/repo-webhook.d.ts.map +1 -1
- package/dist/forgejo/repository.d.ts +5 -5
- package/dist/forgejo/repository.d.ts.map +1 -1
- package/dist/forgejo/resource.d.ts +1 -1
- package/dist/forgejo/resource.d.ts.map +1 -1
- package/dist/forgejo/team-member.d.ts +5 -5
- package/dist/forgejo/team-member.d.ts.map +1 -1
- package/dist/github/repository-ruleset-providers.d.ts +1 -1
- package/dist/github/repository-ruleset-providers.d.ts.map +1 -1
- package/dist/google-workspace/domain-alias.d.ts +5 -5
- package/dist/google-workspace/domain-alias.d.ts.map +1 -1
- package/dist/google-workspace/fake-google-workspace.d.ts +1 -1
- package/dist/google-workspace/fake-google-workspace.d.ts.map +1 -1
- package/dist/google-workspace/group-member.d.ts +5 -5
- package/dist/google-workspace/group-member.d.ts.map +1 -1
- package/dist/google-workspace/group.d.ts +5 -5
- package/dist/google-workspace/group.d.ts.map +1 -1
- package/dist/google-workspace/index.js.map +1 -1
- package/dist/google-workspace/org-unit.d.ts +5 -5
- package/dist/google-workspace/org-unit.d.ts.map +1 -1
- package/dist/google-workspace/providers.d.ts +1 -1
- package/dist/google-workspace/providers.d.ts.map +1 -1
- package/dist/google-workspace/resource.d.ts +1 -1
- package/dist/google-workspace/resource.d.ts.map +1 -1
- package/dist/grafana/alert-rule-group.d.ts +4 -4
- package/dist/grafana/alert-rule-group.d.ts.map +1 -1
- package/dist/grafana/contact-point.d.ts +4 -4
- package/dist/grafana/dashboard.d.ts +4 -4
- package/dist/grafana/datasource.d.ts +4 -4
- package/dist/grafana/fake-grafana.d.ts +1 -1
- package/dist/grafana/fake-grafana.d.ts.map +1 -1
- package/dist/grafana/folder.d.ts +4 -4
- package/dist/grafana/message-template.d.ts +4 -4
- package/dist/grafana/mute-timing.d.ts +4 -4
- package/dist/grafana/notification-policy.d.ts +4 -4
- package/dist/grafana/notification-policy.d.ts.map +1 -1
- package/dist/grafana/providers.d.ts +1 -1
- package/dist/grafana/providers.d.ts.map +1 -1
- package/dist/litellm/access-group.d.ts +1 -1
- package/dist/litellm/budget-operations.d.ts +1 -1
- package/dist/litellm/budget-operations.d.ts.map +1 -1
- package/dist/litellm/budget.d.ts +2 -2
- package/dist/litellm/credential-errors.d.ts +1 -1
- package/dist/litellm/credential-errors.d.ts.map +1 -1
- package/dist/litellm/credential.d.ts +1 -1
- package/dist/litellm/index.js +26 -5
- package/dist/litellm/index.js.map +8 -8
- package/dist/litellm/key-errors.d.ts +1 -1
- package/dist/litellm/key-errors.d.ts.map +1 -1
- package/dist/litellm/key.d.ts +2 -2
- package/dist/litellm/mcp-server-locate.d.ts +1 -1
- package/dist/litellm/mcp-server-locate.d.ts.map +1 -1
- package/dist/litellm/mcp-server.d.ts +2 -2
- package/dist/litellm/model-operations.d.ts +1 -1
- package/dist/litellm/model-operations.d.ts.map +1 -1
- package/dist/litellm/model.d.ts +2 -2
- package/dist/litellm/operations.d.ts +1 -1
- package/dist/litellm/operations.d.ts.map +1 -1
- package/dist/litellm/policy-attachment.d.ts +1 -1
- package/dist/litellm/policy.d.ts +1 -1
- package/dist/litellm/providers.d.ts +1 -1
- package/dist/litellm/providers.d.ts.map +1 -1
- package/dist/litellm/team-operations.d.ts +1 -1
- package/dist/litellm/team-operations.d.ts.map +1 -1
- package/dist/litellm/team.d.ts +1 -1
- package/dist/litellm/tool-policy-operations.d.ts +1 -1
- package/dist/litellm/tool-policy-operations.d.ts.map +1 -1
- package/dist/litellm/tool-policy.d.ts +1 -1
- package/dist/litellm/toolset.d.ts +1 -1
- package/dist/netbox/fake-netbox.d.ts +1 -1
- package/dist/netbox/fake-netbox.d.ts.map +1 -1
- package/dist/netbox/index.js.map +1 -1
- package/dist/netbox/prefix.d.ts +5 -5
- package/dist/netbox/prefix.d.ts.map +1 -1
- package/dist/netbox/resource.d.ts +1 -1
- package/dist/netbox/resource.d.ts.map +1 -1
- package/dist/openbao/approle-login.d.ts +1 -1
- package/dist/openbao/approle-login.d.ts.map +1 -1
- package/dist/openbao/auth-method-reconcile.d.ts +1 -1
- package/dist/openbao/auth-method-reconcile.d.ts.map +1 -1
- package/dist/openbao/auth-method-wire.d.ts +4 -4
- package/dist/openbao/auth-method-wire.d.ts.map +1 -1
- package/dist/openbao/auth-method.d.ts +1 -1
- package/dist/openbao/auth-method.d.ts.map +1 -1
- package/dist/openbao/auth-role-identity.d.ts +1 -1
- package/dist/openbao/auth-role-identity.d.ts.map +1 -1
- package/dist/openbao/auth-role-wire.d.ts +4 -4
- package/dist/openbao/auth-role-wire.d.ts.map +1 -1
- package/dist/openbao/auth-role.d.ts +1 -1
- package/dist/openbao/auth-role.d.ts.map +1 -1
- package/dist/openbao/bao-http.d.ts +1 -1
- package/dist/openbao/bao-http.d.ts.map +1 -1
- package/dist/openbao/bao-identity.d.ts +1 -1
- package/dist/openbao/bao-identity.d.ts.map +1 -1
- package/dist/openbao/cloudflare-permission-groups.d.ts +1 -1
- package/dist/openbao/cloudflare-permission-groups.d.ts.map +1 -1
- package/dist/openbao/cloudflare-role-wire.d.ts +1 -1
- package/dist/openbao/cloudflare-role-wire.d.ts.map +1 -1
- package/dist/openbao/cloudflare-role.d.ts +1 -1
- package/dist/openbao/cloudflare-role.d.ts.map +1 -1
- package/dist/openbao/distilled.d.ts +1 -1
- package/dist/openbao/distilled.d.ts.map +1 -1
- package/dist/openbao/fake-bao.d.ts +1 -1
- package/dist/openbao/fake-bao.d.ts.map +1 -1
- package/dist/openbao/fake-core.d.ts +1 -1
- package/dist/openbao/fake-core.d.ts.map +1 -1
- package/dist/openbao/fake-engines.d.ts +1 -1
- package/dist/openbao/fake-engines.d.ts.map +1 -1
- package/dist/openbao/fake-families.d.ts +2 -2
- package/dist/openbao/fake-families.d.ts.map +1 -1
- package/dist/openbao/fake-stack.d.ts +5 -0
- package/dist/openbao/fake-stack.d.ts.map +1 -1
- package/dist/openbao/forgejo-bootstrap.d.ts +1 -1
- package/dist/openbao/forgejo-bootstrap.d.ts.map +1 -1
- package/dist/openbao/index.js +31 -10
- package/dist/openbao/index.js.map +31 -31
- package/dist/openbao/jwt-config.d.ts +1 -1
- package/dist/openbao/jwt-config.d.ts.map +1 -1
- package/dist/openbao/jwt-role.d.ts +1 -1
- package/dist/openbao/jwt-role.d.ts.map +1 -1
- package/dist/openbao/kubernetes-role.d.ts +1 -1
- package/dist/openbao/kubernetes-role.d.ts.map +1 -1
- package/dist/openbao/mfa-enforcement.d.ts +1 -1
- package/dist/openbao/mfa-enforcement.d.ts.map +1 -1
- package/dist/openbao/mfa-totp.d.ts +1 -1
- package/dist/openbao/mfa-totp.d.ts.map +1 -1
- package/dist/openbao/mfa-wire.d.ts +1 -1
- package/dist/openbao/mfa-wire.d.ts.map +1 -1
- package/dist/openbao/mount-move.d.ts +1 -1
- package/dist/openbao/mount-move.d.ts.map +1 -1
- package/dist/openbao/mount-reconcile.d.ts +1 -1
- package/dist/openbao/mount-reconcile.d.ts.map +1 -1
- package/dist/openbao/mount-wire.d.ts +4 -4
- package/dist/openbao/mount-wire.d.ts.map +1 -1
- package/dist/openbao/mount.d.ts +1 -1
- package/dist/openbao/mount.d.ts.map +1 -1
- package/dist/openbao/pki-role.d.ts +1 -1
- package/dist/openbao/pki-role.d.ts.map +1 -1
- package/dist/openbao/plugin-reconcile.d.ts +1 -1
- package/dist/openbao/plugin-reconcile.d.ts.map +1 -1
- package/dist/openbao/plugin-wire.d.ts +1 -1
- package/dist/openbao/plugin-wire.d.ts.map +1 -1
- package/dist/openbao/plugin.d.ts +1 -1
- package/dist/openbao/plugin.d.ts.map +1 -1
- package/dist/openbao/policy-identity.d.ts +1 -1
- package/dist/openbao/policy-identity.d.ts.map +1 -1
- package/dist/openbao/policy-wire.d.ts +4 -4
- package/dist/openbao/policy-wire.d.ts.map +1 -1
- package/dist/openbao/policy.d.ts +1 -1
- package/dist/openbao/policy.d.ts.map +1 -1
- package/dist/openbao/proxmox-role-wire.d.ts +1 -1
- package/dist/openbao/proxmox-role-wire.d.ts.map +1 -1
- package/dist/openbao/proxmox-role.d.ts +1 -1
- package/dist/openbao/proxmox-role.d.ts.map +1 -1
- package/dist/openbao/remount-wire.d.ts +1 -1
- package/dist/openbao/remount-wire.d.ts.map +1 -1
- package/dist/openbao/rename-identity.d.ts +1 -1
- package/dist/openbao/rename-identity.d.ts.map +1 -1
- package/dist/openbao/rename.d.ts +1 -1
- package/dist/openbao/rename.d.ts.map +1 -1
- package/dist/openbao/role-reconcile.d.ts +1 -1
- package/dist/openbao/role-reconcile.d.ts.map +1 -1
- package/dist/openbao/ssh-role.d.ts +1 -1
- package/dist/openbao/ssh-role.d.ts.map +1 -1
- package/dist/opnsense/alias.d.ts +5 -5
- package/dist/opnsense/alias.d.ts.map +1 -1
- package/dist/opnsense/category.d.ts +5 -5
- package/dist/opnsense/category.d.ts.map +1 -1
- package/dist/opnsense/fake-opnsense.d.ts +1 -1
- package/dist/opnsense/fake-opnsense.d.ts.map +1 -1
- package/dist/opnsense/group.d.ts +5 -5
- package/dist/opnsense/group.d.ts.map +1 -1
- package/dist/opnsense/index.js.map +1 -1
- package/dist/opnsense/providers.d.ts +1 -1
- package/dist/opnsense/providers.d.ts.map +1 -1
- package/dist/opnsense/resource.d.ts +1 -1
- package/dist/opnsense/resource.d.ts.map +1 -1
- package/dist/ownership/probe.d.ts.map +1 -1
- package/dist/paperless/custom-field.d.ts +5 -5
- package/dist/paperless/custom-field.d.ts.map +1 -1
- package/dist/paperless/document-type.d.ts +5 -5
- package/dist/paperless/document-type.d.ts.map +1 -1
- package/dist/paperless/fake-paperless.d.ts +1 -1
- package/dist/paperless/fake-paperless.d.ts.map +1 -1
- package/dist/paperless/matching-types.d.ts +1 -1
- package/dist/paperless/matching-types.d.ts.map +1 -1
- package/dist/paperless/matching.d.ts +4 -4
- package/dist/paperless/providers.d.ts +1 -1
- package/dist/paperless/providers.d.ts.map +1 -1
- package/dist/paperless/storage-path.d.ts +5 -5
- package/dist/paperless/storage-path.d.ts.map +1 -1
- package/dist/paperless/tag.d.ts +5 -5
- package/dist/paperless/tag.d.ts.map +1 -1
- package/dist/postgres/connection.d.ts +2 -2
- package/dist/postgres/connection.d.ts.map +1 -1
- package/dist/postgres/database-sql.d.ts +1 -1
- package/dist/postgres/database-sql.d.ts.map +1 -1
- package/dist/postgres/database.d.ts +1 -1
- package/dist/postgres/database.d.ts.map +1 -1
- package/dist/postgres/fake-grants-read.d.ts +1 -1
- package/dist/postgres/fake-grants-read.d.ts.map +1 -1
- package/dist/postgres/fake-grants-write.d.ts +1 -1
- package/dist/postgres/fake-grants-write.d.ts.map +1 -1
- package/dist/postgres/fake-role-sql.d.ts +1 -1
- package/dist/postgres/fake-role-sql.d.ts.map +1 -1
- package/dist/postgres/fake-schema-drop.d.ts +13 -0
- package/dist/postgres/fake-schema-drop.d.ts.map +1 -0
- package/dist/postgres/fake-schema-sql.d.ts +6 -1
- package/dist/postgres/fake-schema-sql.d.ts.map +1 -1
- package/dist/postgres/fake-sql.d.ts +4 -0
- package/dist/postgres/fake-sql.d.ts.map +1 -1
- package/dist/postgres/grants-existence.d.ts +1 -1
- package/dist/postgres/grants-existence.d.ts.map +1 -1
- package/dist/postgres/grants-ops.d.ts +1 -1
- package/dist/postgres/grants-ops.d.ts.map +1 -1
- package/dist/postgres/grants-ownership.d.ts +1 -1
- package/dist/postgres/grants-ownership.d.ts.map +1 -1
- package/dist/postgres/grants-read-defaults.d.ts +1 -1
- package/dist/postgres/grants-read-defaults.d.ts.map +1 -1
- package/dist/postgres/grants-read.d.ts +1 -1
- package/dist/postgres/grants-read.d.ts.map +1 -1
- package/dist/postgres/index.d.ts +2 -1
- package/dist/postgres/index.d.ts.map +1 -1
- package/dist/postgres/index.js +523 -324
- package/dist/postgres/index.js.map +26 -22
- package/dist/postgres/installed-classifier.d.ts +1 -1
- package/dist/postgres/installed-classifier.d.ts.map +1 -1
- package/dist/postgres/psql-executor.d.ts.map +1 -1
- package/dist/postgres/role-membership-sql.d.ts +1 -1
- package/dist/postgres/role-membership-sql.d.ts.map +1 -1
- package/dist/postgres/role-sql.d.ts +1 -1
- package/dist/postgres/role-sql.d.ts.map +1 -1
- package/dist/postgres/role.d.ts +1 -1
- package/dist/postgres/role.d.ts.map +1 -1
- package/dist/postgres/schema-assert.d.ts +1 -1
- package/dist/postgres/schema-assert.d.ts.map +1 -1
- package/dist/postgres/schema-closure-sql.d.ts +45 -0
- package/dist/postgres/schema-closure-sql.d.ts.map +1 -0
- package/dist/postgres/schema-delete.d.ts +18 -9
- package/dist/postgres/schema-delete.d.ts.map +1 -1
- package/dist/postgres/schema-drop-sql.d.ts +66 -0
- package/dist/postgres/schema-drop-sql.d.ts.map +1 -0
- package/dist/postgres/schema-errors.d.ts +19 -1
- package/dist/postgres/schema-errors.d.ts.map +1 -1
- package/dist/postgres/schema-reconcile.d.ts +1 -1
- package/dist/postgres/schema-reconcile.d.ts.map +1 -1
- package/dist/postgres/schema-sequence-error.d.ts +29 -0
- package/dist/postgres/schema-sequence-error.d.ts.map +1 -0
- package/dist/postgres/schema-sql.d.ts +17 -1
- package/dist/postgres/schema-sql.d.ts.map +1 -1
- package/dist/postgres/schema-test-kit.d.ts +3 -1
- package/dist/postgres/schema-test-kit.d.ts.map +1 -1
- package/dist/postgres/schema.d.ts +1 -1
- package/dist/postgres/schema.d.ts.map +1 -1
- package/dist/postgres/search-path.d.ts +38 -0
- package/dist/postgres/search-path.d.ts.map +1 -0
- package/dist/proxmox/acl.d.ts +1 -1
- package/dist/proxmox/acl.d.ts.map +1 -1
- package/dist/proxmox/api-token.d.ts +1 -1
- package/dist/proxmox/api-token.d.ts.map +1 -1
- package/dist/proxmox/backup-job-distilled.d.ts +2 -2
- package/dist/proxmox/backup-job-distilled.d.ts.map +1 -1
- package/dist/proxmox/backup-job.d.ts +1 -1
- package/dist/proxmox/backup-job.d.ts.map +1 -1
- package/dist/proxmox/ceph-daemon-wire.d.ts +3 -3
- package/dist/proxmox/ceph-daemon-wire.d.ts.map +1 -1
- package/dist/proxmox/ceph-daemon.d.ts +2 -2
- package/dist/proxmox/ceph-daemon.d.ts.map +1 -1
- package/dist/proxmox/ceph-flag-wire.d.ts +3 -3
- package/dist/proxmox/ceph-flag-wire.d.ts.map +1 -1
- package/dist/proxmox/ceph-flag.d.ts +1 -1
- package/dist/proxmox/ceph-flag.d.ts.map +1 -1
- package/dist/proxmox/ceph-fs-distilled.d.ts +3 -3
- package/dist/proxmox/ceph-fs-distilled.d.ts.map +1 -1
- package/dist/proxmox/ceph-fs.d.ts +1 -1
- package/dist/proxmox/ceph-fs.d.ts.map +1 -1
- package/dist/proxmox/ceph-osd-tree.d.ts +1 -1
- package/dist/proxmox/ceph-osd-tree.d.ts.map +1 -1
- package/dist/proxmox/ceph-osd-write.d.ts +2 -2
- package/dist/proxmox/ceph-osd-write.d.ts.map +1 -1
- package/dist/proxmox/ceph-osd.d.ts +1 -1
- package/dist/proxmox/ceph-osd.d.ts.map +1 -1
- package/dist/proxmox/ceph-pool-settle.d.ts +2 -2
- package/dist/proxmox/ceph-pool-settle.d.ts.map +1 -1
- package/dist/proxmox/ceph-pool-wire.d.ts +1 -1
- package/dist/proxmox/ceph-pool-wire.d.ts.map +1 -1
- package/dist/proxmox/ceph-pool.d.ts +1 -1
- package/dist/proxmox/ceph-pool.d.ts.map +1 -1
- package/dist/proxmox/client.d.ts +1 -1
- package/dist/proxmox/client.d.ts.map +1 -1
- package/dist/proxmox/distilled-pbs.d.ts +1 -1
- package/dist/proxmox/distilled-pbs.d.ts.map +1 -1
- package/dist/proxmox/distilled-pve.d.ts +1 -1
- package/dist/proxmox/distilled-pve.d.ts.map +1 -1
- package/dist/proxmox/fake-pbs-jobs.d.ts +1 -1
- package/dist/proxmox/fake-pve.d.ts +1 -1
- package/dist/proxmox/fake-pve.d.ts.map +1 -1
- package/dist/proxmox/firewall-alias-lifecycle.d.ts +6 -6
- package/dist/proxmox/firewall-alias-lifecycle.d.ts.map +1 -1
- package/dist/proxmox/firewall-alias.d.ts +1 -1
- package/dist/proxmox/firewall-alias.d.ts.map +1 -1
- package/dist/proxmox/group-wire.d.ts +2 -2
- package/dist/proxmox/group-wire.d.ts.map +1 -1
- package/dist/proxmox/group.d.ts +1 -1
- package/dist/proxmox/group.d.ts.map +1 -1
- package/dist/proxmox/ha-resource.d.ts +1 -1
- package/dist/proxmox/ha-resource.d.ts.map +1 -1
- package/dist/proxmox/ha-rule.d.ts +1 -1
- package/dist/proxmox/ha-rule.d.ts.map +1 -1
- package/dist/proxmox/index.js +38 -17
- package/dist/proxmox/index.js.map +9 -9
- package/dist/proxmox/lease-cache.d.ts +2 -2
- package/dist/proxmox/lease-cache.d.ts.map +1 -1
- package/dist/proxmox/live-core-fixtures.d.ts +1 -1
- package/dist/proxmox/live-core-fixtures.d.ts.map +1 -1
- package/dist/proxmox/lxc-lifecycle.d.ts +3 -3
- package/dist/proxmox/lxc-lifecycle.d.ts.map +1 -1
- package/dist/proxmox/lxc-read.d.ts +1 -1
- package/dist/proxmox/lxc-read.d.ts.map +1 -1
- package/dist/proxmox/lxc-task.d.ts +1 -1
- package/dist/proxmox/lxc-task.d.ts.map +1 -1
- package/dist/proxmox/lxc.d.ts +1 -1
- package/dist/proxmox/lxc.d.ts.map +1 -1
- package/dist/proxmox/members.d.ts +3 -3
- package/dist/proxmox/members.d.ts.map +1 -1
- package/dist/proxmox/metric-server-distilled.d.ts +3 -3
- package/dist/proxmox/metric-server-distilled.d.ts.map +1 -1
- package/dist/proxmox/metric-server.d.ts +1 -1
- package/dist/proxmox/metric-server.d.ts.map +1 -1
- package/dist/proxmox/mint.d.ts +1 -1
- package/dist/proxmox/mint.d.ts.map +1 -1
- package/dist/proxmox/network-apply-read.d.ts +3 -3
- package/dist/proxmox/network-apply-read.d.ts.map +1 -1
- package/dist/proxmox/network-apply-run.d.ts +1 -1
- package/dist/proxmox/network-apply-run.d.ts.map +1 -1
- package/dist/proxmox/network-apply.d.ts +1 -1
- package/dist/proxmox/network-apply.d.ts.map +1 -1
- package/dist/proxmox/node-network-wire.d.ts +2 -2
- package/dist/proxmox/node-network-wire.d.ts.map +1 -1
- package/dist/proxmox/node-network.d.ts +1 -1
- package/dist/proxmox/node-network.d.ts.map +1 -1
- package/dist/proxmox/notification-matcher-distilled.d.ts +4 -4
- package/dist/proxmox/notification-matcher-distilled.d.ts.map +1 -1
- package/dist/proxmox/notification-matcher-lifecycle.d.ts +4 -4
- package/dist/proxmox/notification-matcher.d.ts +1 -1
- package/dist/proxmox/notification-matcher.d.ts.map +1 -1
- package/dist/proxmox/notification-target-distilled.d.ts +4 -4
- package/dist/proxmox/notification-target-distilled.d.ts.map +1 -1
- package/dist/proxmox/notification-target-lifecycle.d.ts +4 -4
- package/dist/proxmox/notification-target.d.ts +1 -1
- package/dist/proxmox/notification-target.d.ts.map +1 -1
- package/dist/proxmox/pbs-datastore-lifecycle.d.ts +4 -4
- package/dist/proxmox/pbs-datastore-wire.d.ts +4 -4
- package/dist/proxmox/pbs-datastore-wire.d.ts.map +1 -1
- package/dist/proxmox/pbs-datastore.d.ts +1 -1
- package/dist/proxmox/pbs-datastore.d.ts.map +1 -1
- package/dist/proxmox/pbs-notification-matcher-distilled.d.ts +4 -4
- package/dist/proxmox/pbs-notification-matcher-distilled.d.ts.map +1 -1
- package/dist/proxmox/pbs-notification-matcher.d.ts +1 -1
- package/dist/proxmox/pbs-notification-matcher.d.ts.map +1 -1
- package/dist/proxmox/pbs-notification-target-distilled.d.ts +4 -4
- package/dist/proxmox/pbs-notification-target-distilled.d.ts.map +1 -1
- package/dist/proxmox/pbs-notification-target-lifecycle.d.ts +4 -4
- package/dist/proxmox/pbs-notification-target.d.ts +1 -1
- package/dist/proxmox/pbs-notification-target.d.ts.map +1 -1
- package/dist/proxmox/pbs-prune-job-lifecycle.d.ts +4 -4
- package/dist/proxmox/pbs-prune-job-wire.d.ts +4 -4
- package/dist/proxmox/pbs-prune-job-wire.d.ts.map +1 -1
- package/dist/proxmox/pbs-prune-job.d.ts +1 -1
- package/dist/proxmox/pbs-prune-job.d.ts.map +1 -1
- package/dist/proxmox/pbs-sync-job-lifecycle.d.ts +4 -4
- package/dist/proxmox/pbs-sync-job-wire.d.ts +4 -4
- package/dist/proxmox/pbs-sync-job-wire.d.ts.map +1 -1
- package/dist/proxmox/pbs-sync-job.d.ts +1 -1
- package/dist/proxmox/pbs-sync-job.d.ts.map +1 -1
- package/dist/proxmox/pbs-verify-job-lifecycle.d.ts +4 -4
- package/dist/proxmox/pbs-verify-job-wire.d.ts +4 -4
- package/dist/proxmox/pbs-verify-job-wire.d.ts.map +1 -1
- package/dist/proxmox/pbs-verify-job.d.ts +1 -1
- package/dist/proxmox/pbs-verify-job.d.ts.map +1 -1
- package/dist/proxmox/pool.d.ts +3 -3
- package/dist/proxmox/pool.d.ts.map +1 -1
- package/dist/proxmox/provision-declare.d.ts +1 -1
- package/dist/proxmox/provision-declare.d.ts.map +1 -1
- package/dist/proxmox/qemu-lifecycle.d.ts +3 -3
- package/dist/proxmox/qemu-lifecycle.d.ts.map +1 -1
- package/dist/proxmox/qemu-read.d.ts +1 -1
- package/dist/proxmox/qemu-read.d.ts.map +1 -1
- package/dist/proxmox/qemu-resize.d.ts +1 -1
- package/dist/proxmox/qemu-resize.d.ts.map +1 -1
- package/dist/proxmox/qemu-task.d.ts +1 -1
- package/dist/proxmox/qemu-task.d.ts.map +1 -1
- package/dist/proxmox/qemu.d.ts +1 -1
- package/dist/proxmox/qemu.d.ts.map +1 -1
- package/dist/proxmox/replication-job-lifecycle.d.ts +6 -6
- package/dist/proxmox/replication-job-lifecycle.d.ts.map +1 -1
- package/dist/proxmox/replication-job.d.ts +1 -1
- package/dist/proxmox/replication-job.d.ts.map +1 -1
- package/dist/proxmox/resource-spec.d.ts +1 -1
- package/dist/proxmox/resource-spec.d.ts.map +1 -1
- package/dist/proxmox/resource.d.ts +8 -8
- package/dist/proxmox/role.d.ts +1 -1
- package/dist/proxmox/role.d.ts.map +1 -1
- package/dist/proxmox/sdn-apply-read.d.ts +1 -1
- package/dist/proxmox/sdn-apply-read.d.ts.map +1 -1
- package/dist/proxmox/sdn-apply.d.ts +1 -1
- package/dist/proxmox/sdn-apply.d.ts.map +1 -1
- package/dist/proxmox/sdn-subnet.d.ts +1 -1
- package/dist/proxmox/sdn-subnet.d.ts.map +1 -1
- package/dist/proxmox/sdn-vnet.d.ts +1 -1
- package/dist/proxmox/sdn-vnet.d.ts.map +1 -1
- package/dist/proxmox/sdn-zone.d.ts +1 -1
- package/dist/proxmox/sdn-zone.d.ts.map +1 -1
- package/dist/proxmox/storage-download-lifecycle.d.ts +6 -6
- package/dist/proxmox/storage-download-lifecycle.d.ts.map +1 -1
- package/dist/proxmox/storage-download-task.d.ts +1 -1
- package/dist/proxmox/storage-download-task.d.ts.map +1 -1
- package/dist/proxmox/storage-download.d.ts +1 -1
- package/dist/proxmox/storage-download.d.ts.map +1 -1
- package/dist/proxmox/storage-wire.d.ts +2 -2
- package/dist/proxmox/storage-wire.d.ts.map +1 -1
- package/dist/proxmox/storage.d.ts +1 -1
- package/dist/proxmox/storage.d.ts.map +1 -1
- package/dist/proxmox/user-wire.d.ts +2 -2
- package/dist/proxmox/user-wire.d.ts.map +1 -1
- package/dist/proxmox/user.d.ts +1 -1
- package/dist/proxmox/user.d.ts.map +1 -1
- package/dist/proxmox/zfs-pool-form.d.ts +2 -2
- package/dist/proxmox/zfs-pool-form.d.ts.map +1 -1
- package/dist/proxmox/zfs-pool-wire.d.ts +2 -2
- package/dist/proxmox/zfs-pool-wire.d.ts.map +1 -1
- package/dist/proxmox/zfs-pool.d.ts +1 -1
- package/dist/proxmox/zfs-pool.d.ts.map +1 -1
- package/dist/release/binary.d.ts +1 -1
- package/dist/release/binary.d.ts.map +1 -1
- package/dist/release/download.d.ts +1 -1
- package/dist/release/download.d.ts.map +1 -1
- package/dist/release/index.js +6 -5
- package/dist/release/index.js.map +5 -5
- package/dist/talos/credentials-write.d.ts +1 -1
- package/dist/talos/credentials-write.d.ts.map +1 -1
- package/dist/talos/credentials.d.ts +1 -1
- package/dist/talos/credentials.d.ts.map +1 -1
- package/dist/talos/fake-process.d.ts +2 -2
- package/dist/talos/fake-process.d.ts.map +1 -1
- package/dist/talos/index.js +7 -7
- package/dist/talos/index.js.map +4 -4
- package/dist/talos/kubeconfig.d.ts +4 -4
- package/dist/talos/kubeconfig.d.ts.map +1 -1
- package/dist/talos/machine-config-fixtures.d.ts +1 -1
- package/dist/talos/machine-config-fixtures.d.ts.map +1 -1
- package/dist/talos/machine-config-read.d.ts +3 -3
- package/dist/talos/machine-config-read.d.ts.map +1 -1
- package/dist/talos/resource.d.ts +1 -1
- package/dist/talos/resource.d.ts.map +1 -1
- package/dist/talos/talos-bootstrap-etcd.d.ts +2 -2
- package/dist/talos/talos-bootstrap-etcd.d.ts.map +1 -1
- package/dist/talos/talos-bootstrap.d.ts +4 -4
- package/dist/talos/talos-bootstrap.d.ts.map +1 -1
- package/dist/talos/talos-cluster-health.d.ts +4 -4
- package/dist/talos/talos-cluster-health.d.ts.map +1 -1
- package/dist/talos/talos-machine-config.d.ts +2 -2
- package/dist/talos/talos-machine-config.d.ts.map +1 -1
- package/dist/talos/talosctl.d.ts +1 -1
- package/dist/talos/talosctl.d.ts.map +1 -1
- package/dist/telemetry/index.js +4 -4
- package/dist/telemetry/index.js.map +3 -3
- package/dist/telemetry/redact-serialization.d.ts +2 -2
- package/dist/telemetry/redact-serialization.d.ts.map +1 -1
- package/dist/unifi/acl-rule-ordering.d.ts +6 -6
- package/dist/unifi/acl-rule-ordering.d.ts.map +1 -1
- package/dist/unifi/acl-rule.d.ts +6 -6
- package/dist/unifi/acl-rule.d.ts.map +1 -1
- package/dist/unifi/dns-policy.d.ts +6 -6
- package/dist/unifi/dns-policy.d.ts.map +1 -1
- package/dist/unifi/fake-unifi.d.ts +1 -1
- package/dist/unifi/fake-unifi.d.ts.map +1 -1
- package/dist/unifi/firewall-policy-ordering.d.ts +6 -6
- package/dist/unifi/firewall-policy-ordering.d.ts.map +1 -1
- package/dist/unifi/firewall-policy.d.ts +6 -6
- package/dist/unifi/firewall-policy.d.ts.map +1 -1
- package/dist/unifi/firewall-zone.d.ts +6 -6
- package/dist/unifi/firewall-zone.d.ts.map +1 -1
- package/dist/unifi/index.js +2 -2
- package/dist/unifi/index.js.map +2 -2
- package/dist/unifi/network.d.ts +6 -6
- package/dist/unifi/network.d.ts.map +1 -1
- package/dist/unifi/providers.d.ts +1 -1
- package/dist/unifi/providers.d.ts.map +1 -1
- package/dist/unifi/resource.d.ts +1 -1
- package/dist/unifi/resource.d.ts.map +1 -1
- package/dist/unifi/traffic-matching-list.d.ts +6 -6
- package/dist/unifi/traffic-matching-list.d.ts.map +1 -1
- package/dist/unifi/wifi-broadcast.d.ts +6 -6
- package/dist/unifi/wifi-broadcast.d.ts.map +1 -1
- package/dist/verify/cli.js.map +1 -1
- package/dist/verify/index.js.map +1 -1
- package/docs/distilled-interim.md +1 -1
- package/docs/mesh-node.md +1 -1
- package/docs/paperless.md +1 -1
- package/docs/peers.md +8 -8
- package/docs/postgres-schema.md +22 -1
- package/docs/telemetry.md +1 -1
- package/package.json +20 -20
- package/src/argocd/fake-argocd.ts +1 -1
- package/src/argocd/resource.ts +1 -1
- package/src/caddy/admin-transport-scope.test.ts +2 -2
- package/src/caddy/admin.ts +1 -1
- package/src/caddy/caddy-http-client.ts +5 -5
- package/src/caddy/config-adopt.test.ts +2 -2
- package/src/caddy/format.ts +2 -2
- package/src/caddy/local-admin.test.ts +1 -1
- package/src/ceph/auth-entity.ts +1 -1
- package/src/ceph/ceph-auth-reconcile.ts +1 -1
- package/src/cloudflare/fake-mesh.ts +1 -1
- package/src/cloudflare/fake-r2-lock.ts +1 -1
- package/src/cloudflare/mesh-node-harness.ts +1 -1
- package/src/cloudflare/mesh-node.ts +1 -1
- package/src/cloudflare/r2-bucket-lock.ts +1 -1
- package/src/discord/fake-discord.ts +1 -1
- package/src/discord/resource.ts +1 -1
- package/src/forgejo/fake-forgejo.ts +1 -1
- package/src/forgejo/resource.ts +1 -1
- package/src/google-workspace/fake-google-workspace.ts +1 -1
- package/src/google-workspace/resource.ts +1 -1
- package/src/grafana/fake-grafana.ts +1 -1
- package/src/litellm/access-group.test.ts +1 -1
- package/src/litellm/credential-errors.ts +1 -1
- package/src/litellm/credential-guards.test.ts +1 -1
- package/src/litellm/credential-operations.ts +1 -1
- package/src/litellm/credential-rewrite.test.ts +1 -1
- package/src/litellm/fake-stack.ts +1 -1
- package/src/litellm/key-errors.ts +1 -1
- package/src/litellm/key-harness.ts +1 -1
- package/src/litellm/key-operations.ts +1 -1
- package/src/litellm/key.test.ts +2 -1
- package/src/litellm/mcp-server-handlers.test.ts +1 -1
- package/src/litellm/mcp-server-registry.test.ts +1 -1
- package/src/litellm/model-operations.test.ts +1 -1
- package/src/litellm/operations.ts +1 -1
- package/src/litellm/pass-through-endpoint-delete-swallow.test.ts +1 -1
- package/src/litellm/pass-through-endpoint.test.ts +1 -1
- package/src/litellm/pass-through-fetch-client.test.ts +2 -2
- package/src/litellm/policy-attachment.test.ts +1 -1
- package/src/litellm/policy.test.ts +1 -1
- package/src/litellm/team-members.test.ts +1 -1
- package/src/litellm/team-read.test.ts +1 -1
- package/src/litellm/tool-policy.test.ts +1 -1
- package/src/litellm/toolset.test.ts +1 -1
- package/src/netbox/fake-netbox.ts +1 -1
- package/src/netbox/resource.ts +1 -1
- package/src/openbao/adopt-core.test.ts +4 -1
- package/src/openbao/adopt-families.test.ts +4 -1
- package/src/openbao/adopt-holes.test.ts +1 -1
- package/src/openbao/adopt-recovery.test.ts +24 -0
- package/src/openbao/approle-login.ts +2 -2
- package/src/openbao/auth-method-reconcile.ts +1 -1
- package/src/openbao/auth-method.ts +1 -1
- package/src/openbao/auth-role-sdk.test.ts +1 -1
- package/src/openbao/auth-role.ts +1 -1
- package/src/openbao/bao-http.test.ts +3 -3
- package/src/openbao/bao-http.ts +4 -4
- package/src/openbao/bao-identity.ts +2 -2
- package/src/openbao/cloudflare-permission-groups.ts +1 -1
- package/src/openbao/cloudflare-role-wire.ts +1 -1
- package/src/openbao/cloudflare-role.ts +1 -1
- package/src/openbao/distilled-retry.test.ts +3 -3
- package/src/openbao/distilled.test.ts +3 -3
- package/src/openbao/distilled.ts +2 -2
- package/src/openbao/fake-bao.ts +2 -2
- package/src/openbao/fake-core.ts +1 -1
- package/src/openbao/fake-engines.ts +1 -1
- package/src/openbao/fake-families.ts +1 -1
- package/src/openbao/fake-stack.ts +13 -3
- package/src/openbao/jwt-config.ts +1 -1
- package/src/openbao/jwt-role.ts +1 -1
- package/src/openbao/kubernetes-role.ts +1 -1
- package/src/openbao/mfa-enforcement.ts +1 -1
- package/src/openbao/mfa-totp.ts +1 -1
- package/src/openbao/mfa-wire.ts +1 -1
- package/src/openbao/mount-move.ts +1 -1
- package/src/openbao/mount-reconcile.ts +1 -1
- package/src/openbao/mount.ts +1 -1
- package/src/openbao/pki-role.ts +1 -1
- package/src/openbao/plugin-reconcile.ts +1 -1
- package/src/openbao/plugin-wire.ts +1 -1
- package/src/openbao/plugin.ts +1 -1
- package/src/openbao/policy.ts +1 -1
- package/src/openbao/proxmox-role.ts +1 -1
- package/src/openbao/remount-wire.ts +1 -1
- package/src/openbao/rename-occupied.test.ts +1 -1
- package/src/openbao/role-reconcile.ts +1 -1
- package/src/openbao/role-rename.test.ts +1 -1
- package/src/openbao/ssh-role.ts +1 -1
- package/src/opnsense/fake-opnsense.ts +1 -1
- package/src/opnsense/resource.ts +1 -1
- package/src/ownership/probe.ts +51 -2
- package/src/paperless/fake-paperless.ts +1 -1
- package/src/paperless/matching-types.ts +1 -1
- package/src/postgres/connection.ts +11 -15
- package/src/postgres/database-bigint-serialization.test.ts +3 -3
- package/src/postgres/database-sql.ts +7 -7
- package/src/postgres/database.ts +1 -1
- package/src/postgres/fake-grants-read.ts +4 -4
- package/src/postgres/fake-grants-sql.ts +1 -1
- package/src/postgres/fake-grants-write.ts +1 -1
- package/src/postgres/fake-role-sql.ts +3 -3
- package/src/postgres/fake-schema-drop.ts +75 -0
- package/src/postgres/fake-schema-sql.ts +11 -2
- package/src/postgres/fake-sql.ts +11 -4
- package/src/postgres/grants-database.test.ts +5 -5
- package/src/postgres/grants-existence.ts +8 -8
- package/src/postgres/grants-ops.ts +1 -1
- package/src/postgres/grants-ownership.ts +6 -6
- package/src/postgres/grants-psql-lifecycle.test.ts +7 -3
- package/src/postgres/grants-read-defaults.ts +6 -6
- package/src/postgres/grants-read.ts +17 -17
- package/src/postgres/grants-relkind-wire.test.ts +6 -4
- package/src/postgres/index.ts +2 -0
- package/src/postgres/installed-classifier.ts +1 -1
- package/src/postgres/psql-executor-escaping.test.ts +3 -1
- package/src/postgres/psql-executor.test.ts +11 -5
- package/src/postgres/psql-executor.ts +5 -7
- package/src/postgres/role-adopt.test.ts +3 -1
- package/src/postgres/role-membership-options.test.ts +3 -1
- package/src/postgres/role-membership-repair.test.ts +3 -3
- package/src/postgres/role-membership-sql.ts +5 -5
- package/src/postgres/role-password-transports.test.ts +6 -4
- package/src/postgres/role-sql.ts +2 -2
- package/src/postgres/role.ts +1 -1
- package/src/postgres/schema-assert.ts +1 -1
- package/src/postgres/schema-closure-sql.ts +108 -0
- package/src/postgres/schema-delete-proofs.test.ts +7 -7
- package/src/postgres/schema-delete.ts +89 -47
- package/src/postgres/schema-drop-2bp01.test.ts +30 -18
- package/src/postgres/schema-drop-real.test.ts +190 -0
- package/src/postgres/schema-drop-sql.ts +135 -0
- package/src/postgres/schema-drop.test.ts +241 -0
- package/src/postgres/schema-errors.ts +26 -0
- package/src/postgres/schema-handlers.test.ts +21 -14
- package/src/postgres/schema-lifecycle.test.ts +6 -60
- package/src/postgres/schema-reconcile.ts +1 -1
- package/src/postgres/schema-sequence-error.ts +38 -0
- package/src/postgres/schema-socket.test.ts +20 -6
- package/src/postgres/schema-sql.ts +17 -12
- package/src/postgres/schema-takeover.test.ts +7 -4
- package/src/postgres/schema-test-kit.ts +18 -4
- package/src/postgres/search-path.test.ts +100 -0
- package/src/postgres/search-path.ts +62 -0
- package/src/proxmox/ceph-flag-wire.test.ts +1 -1
- package/src/proxmox/ceph-fs-destroy-sdk.test.ts +1 -1
- package/src/proxmox/ceph-pool-write.test.ts +1 -1
- package/src/proxmox/client.test.ts +2 -2
- package/src/proxmox/client.ts +2 -2
- package/src/proxmox/credentials.test.ts +1 -1
- package/src/proxmox/distilled-pbs.test.ts +1 -1
- package/src/proxmox/distilled-pbs.ts +1 -1
- package/src/proxmox/distilled-pve.test.ts +2 -2
- package/src/proxmox/distilled-pve.ts +1 -1
- package/src/proxmox/fake-pbs-jobs.ts +1 -1
- package/src/proxmox/fake-pve.ts +1 -1
- package/src/proxmox/lease-cache-mint.test.ts +1 -1
- package/src/proxmox/live-core-fixtures.ts +1 -1
- package/src/proxmox/lxc-distilled.test.ts +1 -1
- package/src/proxmox/lxc-harness.ts +1 -1
- package/src/proxmox/members-timeout.test.ts +3 -3
- package/src/proxmox/members.test.ts +1 -1
- package/src/proxmox/members.ts +4 -4
- package/src/proxmox/mint.ts +4 -4
- package/src/proxmox/node-network-read-failure.test.ts +1 -1
- package/src/proxmox/qemu-lifecycle.ts +1 -1
- package/src/proxmox/read-failure-propagation.test.ts +1 -1
- package/src/proxmox/resource-spec.ts +1 -1
- package/src/proxmox/storage-read-failure.test.ts +1 -1
- package/src/proxmox/typed-absence.test.ts +2 -2
- package/src/proxmox/unreadable-read.test.ts +1 -1
- package/src/proxmox/user.test.ts +1 -1
- package/src/proxmox/zfs-pool-read-failure.test.ts +1 -1
- package/src/release/adopt-parity.test.ts +3 -1
- package/src/release/apply-pins.test.ts +2 -2
- package/src/release/binary-root.test.ts +2 -2
- package/src/release/binary.ts +9 -2
- package/src/release/download.test.ts +3 -3
- package/src/release/download.ts +1 -1
- package/src/release/fake-deploy.ts +2 -2
- package/src/release/fake-engine.ts +2 -2
- package/src/release/fake-provider.ts +2 -2
- package/src/release/plan.test.ts +2 -2
- package/src/release/providers.ts +1 -1
- package/src/talos/credentials-write.test.ts +1 -1
- package/src/talos/credentials-write.ts +2 -2
- package/src/talos/credentials.test.ts +1 -1
- package/src/talos/credentials.ts +2 -2
- package/src/talos/fake-process.ts +2 -2
- package/src/talos/kubeconfig.test.ts +1 -1
- package/src/talos/machine-config-fixtures.ts +1 -1
- package/src/talos/resource.ts +1 -1
- package/src/talos/talos-bootstrap.test.ts +1 -1
- package/src/talos/talos-cluster-health.test.ts +1 -1
- package/src/talos/talosctl.ts +2 -2
- package/src/telemetry/http-client-sealing.test.ts +2 -2
- package/src/telemetry/layer.test.ts +3 -3
- package/src/telemetry/layer.ts +2 -2
- package/src/telemetry/redact-serialization.ts +2 -2
- package/src/unifi/fake-unifi.ts +1 -1
- package/src/unifi/get-only-guard.test.ts +3 -3
- package/src/unifi/resource.ts +1 -1
- package/src/verify/args.ts +1 -1
|
@@ -19,5 +19,5 @@ export type MeshNodeRef = {
|
|
|
19
19
|
* success body IS the token. Other SDK errors pass through; they come only from non-2xx
|
|
20
20
|
* responses, which carry an error envelope, not a token.
|
|
21
21
|
*/
|
|
22
|
-
export declare const fetchMeshNodeToken: (ref: MeshNodeRef) => Effect.Effect<Redacted.Redacted<string>, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/cloudflare/Errors").CloudflareError | import("@distilled.cloud/cloudflare/Errors").CloudflareHttpError | import("@distilled.cloud/cloudflare/Errors").CloudflareParseError | import("@distilled.cloud/cloudflare/Errors").CloudflareRateLimited | import("@distilled.cloud/caddy").ConfigError | zeroTrust.Forbidden | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/
|
|
22
|
+
export declare const fetchMeshNodeToken: (ref: MeshNodeRef) => Effect.Effect<Redacted.Redacted<string>, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/cloudflare/Errors").CloudflareError | import("@distilled.cloud/cloudflare/Errors").CloudflareHttpError | import("@distilled.cloud/cloudflare/Errors").CloudflareParseError | import("@distilled.cloud/cloudflare/Errors").CloudflareRateLimited | import("@distilled.cloud/caddy").ConfigError | zeroTrust.Forbidden | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | import("@distilled.cloud/cloudflare/Errors").InvalidRoute | MeshNodeError | import("@distilled.cloud/cloudflare/Credentials").OAuthRefreshError | import("@distilled.cloud/caddy").ServiceUnavailable | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/cloudflare/Errors").UnknownCloudflareError, zeroTrust.CloudflareOpContext>;
|
|
23
23
|
//# sourceMappingURL=mesh-node-token.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh-node-token.d.ts","sourceRoot":"","sources":["../../src/cloudflare/mesh-node-token.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,SAAS,MAAM,wCAAwC,CAAC;AACpE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAkB,MAAM,oBAAoB,CAAC;AAEnE,yEAAyE;AACzE,MAAM,MAAM,WAAW,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,CACvD;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAS,CAAA;CAAE,CACrD,CAAC;AAoDF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,QAAS,WAAW,
|
|
1
|
+
{"version":3,"file":"mesh-node-token.d.ts","sourceRoot":"","sources":["../../src/cloudflare/mesh-node-token.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,SAAS,MAAM,wCAAwC,CAAC;AACpE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAkB,MAAM,oBAAoB,CAAC;AAEnE,yEAAyE;AACzE,MAAM,MAAM,WAAW,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,CACvD;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAS,CAAA;CAAE,CACrD,CAAC;AAoDF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,QAAS,WAAW,29BA4B/C,CAAC"}
|
|
@@ -15,7 +15,7 @@ import { Credentials } from '@distilled.cloud/cloudflare/Credentials';
|
|
|
15
15
|
import * as Cloudflare from 'alchemy/Cloudflare';
|
|
16
16
|
import * as Provider from 'alchemy/Provider';
|
|
17
17
|
import { Resource, type ResourceClass } from 'alchemy/Resource';
|
|
18
|
-
import * as HttpClient from 'effect/
|
|
18
|
+
import * as HttpClient from 'effect/http/HttpClient';
|
|
19
19
|
import { type MeshNodeAttributes, type MeshNodeProps } from './mesh-node-form.ts';
|
|
20
20
|
import type { Providers } from './providers.ts';
|
|
21
21
|
export interface MeshNode extends Resource<'Cloudflare.MeshNode', MeshNodeProps, MeshNodeAttributes, never, Providers> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh-node.d.ts","sourceRoot":"","sources":["../../src/cloudflare/mesh-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGhE,OAAO,KAAK,UAAU,MAAM,
|
|
1
|
+
{"version":3,"file":"mesh-node.d.ts","sourceRoot":"","sources":["../../src/cloudflare/mesh-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGhE,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAGnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,WAAW,QAAS,SAAQ,QAAQ,CACxC,qBAAqB,EACrB,aAAa,EACb,kBAAkB,EAClB,KAAK,EACL,SAAS,CACV;CAAG;AAEJ;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,EAAE,aAAa,CAAC,QAAQ,CAE3C,CAAC;AAEH,2FAA2F;AAC3F,MAAM,MAAM,gBAAgB,GACxB,UAAU,CAAC,qBAAqB,GAChC,WAAW,GACX,UAAU,CAAC,UAAU,CAAC;AAQ1B;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,gJA4C1B,CAAC"}
|
|
@@ -3,6 +3,6 @@ import * as Layer from 'effect/Layer';
|
|
|
3
3
|
declare const Providers_base: Provider.ProviderCollection<Providers, "HomeflareCloudflare">;
|
|
4
4
|
export declare class Providers extends Providers_base {
|
|
5
5
|
}
|
|
6
|
-
export declare const providers: () => Layer.Layer<Providers, never, import("alchemy").AuthProviders | import("effect/
|
|
6
|
+
export declare const providers: () => Layer.Layer<Providers, never, import("alchemy").AuthProviders | import("effect/process/ChildProcessSpawner").ChildProcessSpawner | import("effect/Crypto").Crypto | import("effect/FileSystem").FileSystem | import("effect/http/HttpClient").HttpClient | import("effect/Path").Path>;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=providers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/cloudflare/providers.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;;AAItC,qBAAa,SAAU,SAAQ,cAA+D;CAAG;AAIjG,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/cloudflare/providers.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;;AAItC,qBAAa,SAAU,SAAQ,cAA+D;CAAG;AAIjG,eAAO,MAAM,SAAS,8RAQnB,CAAC"}
|
|
@@ -35,7 +35,7 @@ import type { CloudflareOpContext } from '@distilled.cloud/cloudflare/r2';
|
|
|
35
35
|
import { Credentials } from '@distilled.cloud/cloudflare/Credentials';
|
|
36
36
|
import * as r2 from '@distilled.cloud/cloudflare/r2';
|
|
37
37
|
import * as Effect from 'effect/Effect';
|
|
38
|
-
import * as HttpClient from 'effect/
|
|
38
|
+
import * as HttpClient from 'effect/http/HttpClient';
|
|
39
39
|
import { type Jurisdiction, type R2LockRule } from './lock-rules.ts';
|
|
40
40
|
import type { Providers } from './providers.ts';
|
|
41
41
|
export interface R2BucketLockProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"r2-bucket-lock.d.ts","sourceRoot":"","sources":["../../src/cloudflare/r2-bucket-lock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAChE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAErD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,
|
|
1
|
+
{"version":3,"file":"r2-bucket-lock.d.ts","sourceRoot":"","sources":["../../src/cloudflare/r2-bucket-lock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAChE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAErD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,UAAU,EAIhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,+GAA+G;IAC/G,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IACrC;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;CACvC;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;CACvC,CAAC;AAEF,MAAM,WAAW,YAAa,SAAQ,QAAQ,CAC5C,yBAAyB,EACzB,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,EACL,SAAS,CACV;CAAG;AAKJ,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC,YAAY,CAYpD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,QAAQ,UACZ;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,YAAY,CAAA;CAAE,WACpE,OAAO,KACf,MAAM,CAAC,MAAM,CACd,sBAAsB,GAAG,SAAS,EAClC,OAAO,CAAC,EAAE,CAAC,kBAAkB,EAAE;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,CAAC,EACxD,mBAAmB,CAgBjB,CAAC;AAEL;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,SAClB,iBAAiB,UACf,sBAAsB,GAAG,SAAS,KACzC,MAAM,CAAC,MAAM,CAAC,sBAAsB,EAAE,EAAE,CAAC,kBAAkB,EAAE,mBAAmB,CAW/E,CAAC;AAEL;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,WACb,sBAAsB,aACnB,MAAM,KAChB,MAAM,CAAC,MAAM,CACd,IAAI,EACJ,OAAO,CAAC,EAAE,CAAC,kBAAkB,EAAE;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,CAAC,EACxD,mBAAmB,CAWjB,CAAC;AAEL,eAAO,MAAM,oBAAoB,iHAuC9B,CAAC"}
|
|
@@ -25,7 +25,7 @@ export declare const handlers: {
|
|
|
25
25
|
read: ({ olds, output }: {
|
|
26
26
|
olds: ApplicationCommandProps;
|
|
27
27
|
output: ApplicationCommandAttributes | undefined;
|
|
28
|
-
}) => Effect.Effect<ApplicationCommandAttributes | undefined, DiscordOpError, import("effect/
|
|
28
|
+
}) => Effect.Effect<ApplicationCommandAttributes | undefined, DiscordOpError, import("effect/http/HttpClient").HttpClient>;
|
|
29
29
|
diff: ({ news, output }: {
|
|
30
30
|
news: import("alchemy").Input<ApplicationCommandProps>;
|
|
31
31
|
output: ApplicationCommandAttributes | undefined;
|
|
@@ -33,20 +33,20 @@ export declare const handlers: {
|
|
|
33
33
|
readonly action: 'update';
|
|
34
34
|
} | {
|
|
35
35
|
readonly action: 'noop';
|
|
36
|
-
} | undefined, DiscordOpError, import("effect/
|
|
36
|
+
} | undefined, DiscordOpError, import("effect/http/HttpClient").HttpClient>;
|
|
37
37
|
reconcile: ({ news }: {
|
|
38
38
|
news: ApplicationCommandProps;
|
|
39
|
-
}) => Effect.Effect<ApplicationCommandAttributes, DiscordOpError, import("effect/
|
|
39
|
+
}) => Effect.Effect<ApplicationCommandAttributes, DiscordOpError, import("effect/http/HttpClient").HttpClient>;
|
|
40
40
|
delete: ({ olds }: {
|
|
41
41
|
olds: ApplicationCommandProps;
|
|
42
|
-
}) => Effect.Effect<void, DiscordOpError, import("effect/
|
|
42
|
+
}) => Effect.Effect<void, DiscordOpError, import("effect/http/HttpClient").HttpClient>;
|
|
43
43
|
};
|
|
44
|
-
export declare const DiscordApplicationCommandProvider: () => import("effect/Layer").Layer<Provider.Provider<DiscordApplicationCommand>, never, import("effect/
|
|
44
|
+
export declare const DiscordApplicationCommandProvider: () => import("effect/Layer").Layer<Provider.Provider<DiscordApplicationCommand>, never, import("effect/http/HttpClient").HttpClient>;
|
|
45
45
|
/**
|
|
46
46
|
* `applicationCommand('help', { applicationId, name: 'help', description: '…' })` — `adopt(true)`
|
|
47
47
|
* piped on by default (H5), so a first deploy against a command that already exists silently
|
|
48
48
|
* takes it over instead of failing `OwnedBySomeoneElse`. Mirrors `cloudflare/website.ts`'s
|
|
49
49
|
* `astroWebsite`/`viteWebsite` convenience constructors.
|
|
50
50
|
*/
|
|
51
|
-
export declare const applicationCommand: (id: string, props: ApplicationCommandProps) => Effect.Effect<DiscordApplicationCommand, never, import("effect/
|
|
51
|
+
export declare const applicationCommand: (id: string, props: ApplicationCommandProps) => Effect.Effect<DiscordApplicationCommand, never, import("effect/http/HttpClient").HttpClient>;
|
|
52
52
|
//# sourceMappingURL=application-command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-command.d.ts","sourceRoot":"","sources":["../../src/discord/application-command.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAI7B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGtE,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC5D,gGAAgG;IAChG,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,4BAA6B,SAAQ,uBAAuB;IAC3E,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,yBAA0B,SAAQ,QAAQ,CACzD,4BAA4B,EAC5B,uBAAuB,EACvB,4BAA4B,EAC5B,KAAK,EACL,mBAAmB,CACpB;CAAG;AAEJ,eAAO,MAAM,yBAAyB,4DAMrC,CAAC;AAEF,eAAO,MAAM,2BAA2B,UAAW,OAAO,KAAG,KAAK,IAAI,yBAGD,CAAC;AAStE,wGAAwG;AACxG,eAAO,MAAM,IAAI,EAAE,WAAW,CAC5B,uBAAuB,EACvB,OAAO,CAAC,0BAA0B,EAClC,4BAA4B,EAC5B,cAAc,CAiBf,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;CAAwB,CAAC;AAE9C,eAAO,MAAM,iCAAiC
|
|
1
|
+
{"version":3,"file":"application-command.d.ts","sourceRoot":"","sources":["../../src/discord/application-command.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAI7B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGtE,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC5D,gGAAgG;IAChG,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,4BAA6B,SAAQ,uBAAuB;IAC3E,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,yBAA0B,SAAQ,QAAQ,CACzD,4BAA4B,EAC5B,uBAAuB,EACvB,4BAA4B,EAC5B,KAAK,EACL,mBAAmB,CACpB;CAAG;AAEJ,eAAO,MAAM,yBAAyB,4DAMrC,CAAC;AAEF,eAAO,MAAM,2BAA2B,UAAW,OAAO,KAAG,KAAK,IAAI,yBAGD,CAAC;AAStE,wGAAwG;AACxG,eAAO,MAAM,IAAI,EAAE,WAAW,CAC5B,uBAAuB,EACvB,OAAO,CAAC,0BAA0B,EAClC,4BAA4B,EAC5B,cAAc,CAiBf,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;CAAwB,CAAC;AAE9C,eAAO,MAAM,iCAAiC,sIAI3C,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,OAAQ,MAAM,SAAS,uBAAuB,iGACrB,CAAC"}
|
|
@@ -40,5 +40,5 @@ export declare const fakeDiscord: (route: (method: string, url: URL, body: unkno
|
|
|
40
40
|
* fake server. So a test calls `spec.fetchByName`/`spec.upsert`/`spec.destroy` directly, with
|
|
41
41
|
* this explicit layer, exercising exactly the same production code without that env seam.
|
|
42
42
|
*/
|
|
43
|
-
export declare const fakeDiscordLayer: (fetchFn: typeof globalThis.fetch, creds?: Layer.Layer<Credentials>) => Layer.Layer<Credentials | import("effect/
|
|
43
|
+
export declare const fakeDiscordLayer: (fetchFn: typeof globalThis.fetch, creds?: Layer.Layer<Credentials>) => Layer.Layer<Credentials | import("effect/http/HttpClient").HttpClient, never, never>;
|
|
44
44
|
//# sourceMappingURL=fake-discord.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fake-discord.d.ts","sourceRoot":"","sources":["../../src/discord/fake-discord.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,KAAK,WAAW,EAAe,MAAM,sCAAsC,CAAC;AACrF,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,eAAO,MAAM,SAAS,gCAAgC,CAAC;AACvD,eAAO,MAAM,UAAU,8BAA8B,CAAC;AAEtD,MAAM,MAAM,IAAI,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAE9F,iGAAiG;AACjG,eAAO,MAAM,WAAW,WACd,MAAM,QACR,MAAM,WACH,MAAM,YACL,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,aAC6D,CAAC;AAEhG,+FAA+F;AAC/F,eAAO,MAAM,eAAe,sBAAuB,MAAM,aAGrD,CAAC;AAEL;;;GAGG;AACH,eAAO,MAAM,WAAW,UACf,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,QAAQ;;;CAejF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,YAClB,OAAO,UAAU,CAAC,KAAK,UACzB,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"fake-discord.d.ts","sourceRoot":"","sources":["../../src/discord/fake-discord.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,KAAK,WAAW,EAAe,MAAM,sCAAsC,CAAC;AACrF,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,eAAO,MAAM,SAAS,gCAAgC,CAAC;AACvD,eAAO,MAAM,UAAU,8BAA8B,CAAC;AAEtD,MAAM,MAAM,IAAI,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAE9F,iGAAiG;AACjG,eAAO,MAAM,WAAW,WACd,MAAM,QACR,MAAM,WACH,MAAM,YACL,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,aAC6D,CAAC;AAEhG,+FAA+F;AAC/F,eAAO,MAAM,eAAe,sBAAuB,MAAM,aAGrD,CAAC;AAEL;;;GAGG;AACH,eAAO,MAAM,WAAW,UACf,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,QAAQ;;;CAejF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,YAClB,OAAO,UAAU,CAAC,KAAK,UACzB,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,yFAC+D,CAAC"}
|
|
@@ -28,7 +28,7 @@ export declare const handlers: {
|
|
|
28
28
|
read: ({ olds, output }: {
|
|
29
29
|
olds: GuildApplicationCommandProps;
|
|
30
30
|
output: GuildApplicationCommandAttributes | undefined;
|
|
31
|
-
}) => Effect.Effect<GuildApplicationCommandAttributes | undefined, DiscordOpError, import("effect/
|
|
31
|
+
}) => Effect.Effect<GuildApplicationCommandAttributes | undefined, DiscordOpError, import("effect/http/HttpClient").HttpClient>;
|
|
32
32
|
diff: ({ news, output }: {
|
|
33
33
|
news: import("alchemy").Input<GuildApplicationCommandProps>;
|
|
34
34
|
output: GuildApplicationCommandAttributes | undefined;
|
|
@@ -36,18 +36,18 @@ export declare const handlers: {
|
|
|
36
36
|
readonly action: 'update';
|
|
37
37
|
} | {
|
|
38
38
|
readonly action: 'noop';
|
|
39
|
-
} | undefined, DiscordOpError, import("effect/
|
|
39
|
+
} | undefined, DiscordOpError, import("effect/http/HttpClient").HttpClient>;
|
|
40
40
|
reconcile: ({ news }: {
|
|
41
41
|
news: GuildApplicationCommandProps;
|
|
42
|
-
}) => Effect.Effect<GuildApplicationCommandAttributes, DiscordOpError, import("effect/
|
|
42
|
+
}) => Effect.Effect<GuildApplicationCommandAttributes, DiscordOpError, import("effect/http/HttpClient").HttpClient>;
|
|
43
43
|
delete: ({ olds }: {
|
|
44
44
|
olds: GuildApplicationCommandProps;
|
|
45
|
-
}) => Effect.Effect<void, DiscordOpError, import("effect/
|
|
45
|
+
}) => Effect.Effect<void, DiscordOpError, import("effect/http/HttpClient").HttpClient>;
|
|
46
46
|
};
|
|
47
|
-
export declare const DiscordGuildApplicationCommandProvider: () => import("effect/Layer").Layer<Provider.Provider<DiscordGuildApplicationCommand>, never, import("effect/
|
|
47
|
+
export declare const DiscordGuildApplicationCommandProvider: () => import("effect/Layer").Layer<Provider.Provider<DiscordGuildApplicationCommand>, never, import("effect/http/HttpClient").HttpClient>;
|
|
48
48
|
/**
|
|
49
49
|
* `guildApplicationCommand('ping', { applicationId, guildId, name: 'ping' })` — `adopt(true)`
|
|
50
50
|
* piped on by default (H5). See the file header before pointing this at a guild Halibut manages.
|
|
51
51
|
*/
|
|
52
|
-
export declare const guildApplicationCommand: (id: string, props: GuildApplicationCommandProps) => Effect.Effect<DiscordGuildApplicationCommand, never, import("effect/
|
|
52
|
+
export declare const guildApplicationCommand: (id: string, props: GuildApplicationCommandProps) => Effect.Effect<DiscordGuildApplicationCommand, never, import("effect/http/HttpClient").HttpClient>;
|
|
53
53
|
//# sourceMappingURL=guild-application-command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guild-application-command.d.ts","sourceRoot":"","sources":["../../src/discord/guild-application-command.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAI7B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGtE,MAAM,WAAW,4BAA6B,SAAQ,aAAa;IACjE,gGAAgG;IAChG,aAAa,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iCAAkC,SAAQ,uBAAuB;IAChF,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,8BAA+B,SAAQ,QAAQ,CAC9D,iCAAiC,EACjC,4BAA4B,EAC5B,iCAAiC,EACjC,KAAK,EACL,mBAAmB,CACpB;CAAG;AAEJ,eAAO,MAAM,8BAA8B,iEAG1C,CAAC;AAEF,eAAO,MAAM,gCAAgC,UACpC,OAAO,KACb,KAAK,IAAI,8BAG8D,CAAC;AAc3E,6DAA6D;AAC7D,eAAO,MAAM,IAAI,EAAE,WAAW,CAC5B,4BAA4B,EAC5B,OAAO,CAAC,0BAA0B,EAClC,iCAAiC,EACjC,cAAc,CA6Bf,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;CAAwB,CAAC;AAE9C,eAAO,MAAM,sCAAsC,
|
|
1
|
+
{"version":3,"file":"guild-application-command.d.ts","sourceRoot":"","sources":["../../src/discord/guild-application-command.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAI7B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGtE,MAAM,WAAW,4BAA6B,SAAQ,aAAa;IACjE,gGAAgG;IAChG,aAAa,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iCAAkC,SAAQ,uBAAuB;IAChF,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,8BAA+B,SAAQ,QAAQ,CAC9D,iCAAiC,EACjC,4BAA4B,EAC5B,iCAAiC,EACjC,KAAK,EACL,mBAAmB,CACpB;CAAG;AAEJ,eAAO,MAAM,8BAA8B,iEAG1C,CAAC;AAEF,eAAO,MAAM,gCAAgC,UACpC,OAAO,KACb,KAAK,IAAI,8BAG8D,CAAC;AAc3E,6DAA6D;AAC7D,eAAO,MAAM,IAAI,EAAE,WAAW,CAC5B,4BAA4B,EAC5B,OAAO,CAAC,0BAA0B,EAClC,iCAAiC,EACjC,cAAc,CA6Bf,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;CAAwB,CAAC;AAE9C,eAAO,MAAM,sCAAsC,2IAIhD,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,uBAAuB,OAAQ,MAAM,SAAS,4BAA4B,sGAC1B,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"/**\n * `Discord.ApplicationCommand` — one GLOBAL slash/user/message command on a Discord application.\n *\n * ⛔ NOT WHAT `hf-discord-halibut.service` USES TODAY. Halibut registers guild-scoped commands\n * only (`DISCORD_GUILD_ID` is always set in production — see `docs/discord.md#halibut`), so this\n * resource has no live object to adopt yet. It exists because the distilled SDK, and Discord's\n * own API, model global and guild commands as siblings (same shape, different scope), and a\n * future bot or a future Halibut command that goes global needs it without a second family.\n *\n * ⚠️ GLOBAL COMMAND CHANGES TAKE UP TO AN HOUR TO PROPAGATE (Discord's own docs). A `diff` that\n * ran right after a write could see stale results; this resource does not poll for propagation\n * (S26 bounds waits at ~60s, an hour is not boundable), so a plan run inside that window may\n * report drift that will resolve itself. Documented, not solved — see `docs/discord.md`.\n */\nimport { adopt } from 'alchemy/AdoptPolicy';\nimport { Resource } from 'alchemy';\nimport * as Provider from 'alchemy/Provider';\nimport * as command from '@distilled.cloud/discord/discord';\nimport type { DiscordOpError } from '@distilled.cloud/discord/Protocol';\nimport * as Effect from 'effect/Effect';\nimport {\n type CommandFields,\n type CommandFieldsAttributes,\n commandBody,\n commandFieldsOf,\n commandMatches,\n} from './command-form.ts';\nimport type { DiscordRequirements, DiscordSpec } from './resource.ts';\nimport { discordHandlers } from './resource.ts';\n\nexport interface ApplicationCommandProps extends CommandFields {\n /** The Discord application (bot) this command belongs to — a public snowflake, not a secret. */\n applicationId: string;\n}\n\nexport interface ApplicationCommandAttributes extends CommandFieldsAttributes {\n commandId: string;\n applicationId: string;\n version: string;\n}\n\nexport interface DiscordApplicationCommand extends Resource<\n 'Discord.ApplicationCommand',\n ApplicationCommandProps,\n ApplicationCommandAttributes,\n never,\n DiscordRequirements\n> {}\n\nexport const DiscordApplicationCommand = Resource<DiscordApplicationCommand>(\n 'Discord.ApplicationCommand',\n {\n // Commands are the thing a user reads; nothing here can be edited into another object.\n defaultRemovalPolicy: 'retain',\n },\n);\n\nexport const isDiscordApplicationCommand = (value: unknown): value is DiscordApplicationCommand =>\n typeof value === 'object' &&\n value !== null &&\n (value as { Type?: unknown }).Type === 'Discord.ApplicationCommand';\n\nconst attributesOf = (live: command.ApplicationCommandResponse): ApplicationCommandAttributes => ({\n applicationId: live.application_id,\n commandId: live.id,\n version: live.version,\n ...commandFieldsOf(live),\n});\n\n/** Exported for direct testing against `fake-discord.ts` — the same seam `../netbox/prefix.ts` uses. */\nexport const spec: DiscordSpec<\n ApplicationCommandProps,\n command.ApplicationCommandResponse,\n ApplicationCommandAttributes,\n DiscordOpError\n> = {\n attributes: attributesOf,\n describe: (props) => `applications/${props.applicationId}/commands ${props.name}`,\n destroy: (props, live) =>\n command.deleteApplicationCommand({ application_id: props.applicationId, command_id: live.id }),\n fetchByName: (props) =>\n command\n .listApplicationCommands({ application_id: props.applicationId })\n .pipe(Effect.map((rows) => rows.find((row) => row.name === props.name))),\n matches: commandMatches,\n upsert: (props, body) =>\n command.createApplicationCommand({\n application_id: props.applicationId,\n ...(body as Omit<command.CreateApplicationCommandRequest, 'application_id'>),\n }),\n upsertBody: commandBody,\n};\n\nexport const handlers = discordHandlers(spec);\n\nexport const DiscordApplicationCommandProvider = () =>\n Provider.effect(\n DiscordApplicationCommand,\n Effect.succeed(DiscordApplicationCommand.Provider.of(handlers)),\n );\n\n/**\n * `applicationCommand('help', { applicationId, name: 'help', description: '…' })` — `adopt(true)`\n * piped on by default (H5), so a first deploy against a command that already exists silently\n * takes it over instead of failing `OwnedBySomeoneElse`. Mirrors `cloudflare/website.ts`'s\n * `astroWebsite`/`viteWebsite` convenience constructors.\n */\nexport const applicationCommand = (id: string, props: ApplicationCommandProps) =>\n DiscordApplicationCommand(id, props).pipe(adopt(true));\n",
|
|
6
6
|
"/**\n * The wire body for a Discord command (global or guild), and the comparison that decides whether\n * it needs writing — shared by `application-command.ts` and `guild-application-command.ts` so the\n * two specs cannot drift on what \"matches\" means. Mirrors `../netbox/prefix-form.ts`: pure\n * functions of the props, extracted so a test can call them with a literal, no server involved.\n */\nimport { deepEqual } from 'alchemy/Diff';\n\n/** Fields every Discord command shares, independent of global vs. guild scope. */\nexport interface CommandFields {\n readonly name: string;\n readonly description?: string;\n /**\n * ⚠️ GAP: passed through opaquely, not re-modeled. The SDK's generated option union is ~40\n * nested schema types (subcommand, subcommand group, string/int/number/channel/role/user/\n * mentionable/attachment, each with its own choices and localizations) — see\n * `docs/upstream-conformance.md#discord`. A caller supplies the exact wire shape from\n * Discord's own docs; this resource neither validates nor transforms it.\n */\n readonly options?: readonly Record<string, unknown>[];\n /** Bitfield, stringified, per Discord's real wire contract (the SDK types write as `number`). */\n readonly defaultMemberPermissions?: string;\n readonly dmPermission?: boolean;\n readonly contexts?: readonly number[];\n readonly integrationTypes?: readonly number[];\n readonly nsfw?: boolean;\n /** `ApplicationCommandType`; omitted means `1` (`CHAT_INPUT`), Discord's own default. */\n readonly type?: number;\n}\n\nexport interface CommandFieldsAttributes {\n readonly name: string;\n readonly description: string;\n readonly options: readonly Record<string, unknown>[];\n readonly defaultMemberPermissions: string | undefined;\n readonly dmPermission: boolean | undefined;\n readonly contexts: readonly number[] | undefined;\n readonly integrationTypes: readonly number[] | undefined;\n readonly nsfw: boolean;\n readonly type: number;\n}\n\nconst DEFAULT_TYPE = 1;\n\n/** The fields an undeclared prop still settles to, because Discord itself would. */\nconst settled = (props: CommandFields) => ({\n description: props.description ?? '',\n nsfw: props.nsfw ?? false,\n type: props.type ?? DEFAULT_TYPE,\n});\n\n/**\n * ⛔ SENT IN FULL ON EVERY UPSERT, NEVER PARTIAL. Discord's create-as-upsert (resource.ts's own\n * note) replaces the whole command, so a body that omitted a field the caller stopped declaring\n * would never actually clear it — the same \"declared, then forgotten\" bug `prefix-form.ts`\n * documents for NetBox's PATCH. Sending the full settled shape every time is what keeps a\n * removed prop actually removed live, not just removed from the declaration.\n */\nexport const commandBody = (props: CommandFields): Record<string, unknown> => {\n const fixed = settled(props);\n const out: Record<string, unknown> = {\n description: fixed.description,\n name: props.name,\n nsfw: fixed.nsfw,\n type: fixed.type,\n };\n if (props.options !== undefined) out['options'] = props.options;\n if (props.defaultMemberPermissions !== undefined) {\n out['default_member_permissions'] = props.defaultMemberPermissions;\n }\n if (props.dmPermission !== undefined) out['dm_permission'] = props.dmPermission;\n if (props.contexts !== undefined) out['contexts'] = props.contexts;\n if (props.integrationTypes !== undefined) out['integration_types'] = props.integrationTypes;\n return out;\n};\n\n/** Whether the live command already says what the declaration says. */\nexport const commandMatches = (\n attributes: CommandFieldsAttributes,\n props: CommandFields,\n): boolean => {\n const fixed = settled(props);\n return (\n attributes.name === props.name &&\n attributes.description === fixed.description &&\n attributes.nsfw === fixed.nsfw &&\n attributes.type === fixed.type &&\n // ⛔ GATED LIKE EVERY OTHER OPTIONAL FIELD BELOW — an undeclared `options` means \"not mine\",\n // in both directions (this file's own header rule). An earlier version of this line\n // compared unconditionally against `props.options ?? []`: a declaration with no `options`\n // at all would then see live options as drift, `commandBody` (which already omits\n // `options` when undeclared) would upsert without it, and Discord's real full-replace\n // create would silently wipe a live command's arguments on the first non-dry-run deploy.\n // Caught in review before merge, not measured live.\n (props.options === undefined || deepEqual(attributes.options, props.options)) &&\n (props.defaultMemberPermissions === undefined ||\n attributes.defaultMemberPermissions === props.defaultMemberPermissions) &&\n (props.dmPermission === undefined || attributes.dmPermission === props.dmPermission) &&\n (props.contexts === undefined || deepEqual(attributes.contexts, props.contexts)) &&\n (props.integrationTypes === undefined ||\n deepEqual(attributes.integrationTypes, props.integrationTypes))\n );\n};\n\n/**\n * Reads the shared fields off any `ApplicationCommandResponse`-shaped object.\n *\n * ⚠️ `options` IS READ AS `readonly unknown[]`, NOT RE-TYPED. The SDK's real\n * `ApplicationCommandResponseOptionsItem` union has no index signature (each option kind is a\n * distinct generated interface), so it cannot structurally satisfy `Record<string, unknown>`\n * without a cast — the same \"opaque passthrough\" gap `CommandFields.options` documents above.\n */\nexport const commandFieldsOf = (live: {\n readonly name: string;\n readonly description: string;\n readonly options?: readonly unknown[] | null | undefined;\n readonly default_member_permissions?: string | null | undefined;\n readonly dm_permission?: boolean | undefined;\n readonly contexts?: readonly number[] | null | undefined;\n readonly integration_types?: readonly number[] | null | undefined;\n readonly nsfw?: boolean | undefined;\n readonly type: number;\n}): CommandFieldsAttributes => ({\n contexts: live.contexts ?? undefined,\n defaultMemberPermissions: live.default_member_permissions ?? undefined,\n description: live.description,\n dmPermission: live.dm_permission,\n integrationTypes: live.integration_types ?? undefined,\n name: live.name,\n nsfw: live.nsfw === true,\n options: (live.options as readonly Record<string, unknown>[] | null | undefined) ?? [],\n type: live.type,\n});\n",
|
|
7
|
-
"/**\n * One shape for every Discord application-command object — global and guild-scoped alike.\n *\n * ⛔ THE ALTERNATIVE IS COPYING THE SAME READ/RECONCILE/DELETE PER RESOURCE. `application-command.ts`\n * and `guild-application-command.ts` differ only in which distilled operations they call and\n * whether `guild_id` is part of identity — so the read/diff/reconcile/delete flow lives here\n * once, mirroring `../netbox/resource.ts`'s `netboxOperations`/`netboxHandlers` split.\n *\n * ★ UNLIKE NETBOX, THIS FOLLOWS UPSTREAM'S `Snippet.ts` READ/RECONCILE SHAPE EXACTLY (S7–S9), NOT\n * netbox's \"adopt silently\" gap (H1). Discord commands carry no ownership marker of any kind —\n * no tags, no metadata field a bot could stamp — so this is precisely the \"marker-less API\" S8\n * describes, and `Snippet.ts@v2.0.0-beta.79#read` is the cited reference: an existing match is\n * `Unowned(attrs)` on a cold read (no persisted `output`), and plain attributes on a warm read\n * (persisted `output` says we already made or adopted this exact command). `adopt(true)` (H5),\n * piped onto each resource by the constructors in the two resource files, is what turns that\n * `Unowned` into a silent one-time takeover instead of an `OwnedBySomeoneElse` refusal.\n *\n * ★ RECONCILE IS ONE UPSERT CALL, LIKE `Snippet.ts`'s `putSnippet`. Discord's own docs for both\n * Create Global/Guild Application Command say a command with the same name (and type) as an\n * existing one OVERWRITES it — the create endpoint is a true upsert, not a create-only call that\n * 409s on a name collision. ⚠️ REASONED NOT MEASURED (no token available to this task; see\n * `docs/discord.md`): this is Discord's documented behaviour, unchanged across API v10, but it\n * has not been exercised against the real API by this change. One call therefore converges\n * greenfield create, routine update AND adoption alike — there is no separate PATCH path, and\n * S10's \"zero write calls when there is no drift\" is still honoured because `reconcile` skips\n * the call entirely when `spec.matches` already holds.\n *\n * ⚠️ `list` ANSWERS EMPTY, ON PURPOSE, EVEN THOUGH THE DISTILLED LIST OPERATIONS EXIST. A bot's\n * guild command set is exactly what `hf-discord-halibut.service` bulk-overwrites at every\n * restart (see `docs/discord.md#halibut`); a `nuke` that enumerated and swept every live command\n * would fight that ownership, not just this resource's own declarations. Adoption stays\n * explicit, the same reasoning netbox's `list` gives for a shared instance predating the kit.\n */\nimport { Unowned } from 'alchemy/AdoptPolicy';\nimport { isResolved } from 'alchemy/Diff';\nimport type { Input } from 'alchemy/Input';\nimport type { DiscordOpContext } from '@distilled.cloud/discord/Protocol';\nimport * as Effect from 'effect/Effect';\nimport type * as HttpClient from 'effect/
|
|
7
|
+
"/**\n * One shape for every Discord application-command object — global and guild-scoped alike.\n *\n * ⛔ THE ALTERNATIVE IS COPYING THE SAME READ/RECONCILE/DELETE PER RESOURCE. `application-command.ts`\n * and `guild-application-command.ts` differ only in which distilled operations they call and\n * whether `guild_id` is part of identity — so the read/diff/reconcile/delete flow lives here\n * once, mirroring `../netbox/resource.ts`'s `netboxOperations`/`netboxHandlers` split.\n *\n * ★ UNLIKE NETBOX, THIS FOLLOWS UPSTREAM'S `Snippet.ts` READ/RECONCILE SHAPE EXACTLY (S7–S9), NOT\n * netbox's \"adopt silently\" gap (H1). Discord commands carry no ownership marker of any kind —\n * no tags, no metadata field a bot could stamp — so this is precisely the \"marker-less API\" S8\n * describes, and `Snippet.ts@v2.0.0-beta.79#read` is the cited reference: an existing match is\n * `Unowned(attrs)` on a cold read (no persisted `output`), and plain attributes on a warm read\n * (persisted `output` says we already made or adopted this exact command). `adopt(true)` (H5),\n * piped onto each resource by the constructors in the two resource files, is what turns that\n * `Unowned` into a silent one-time takeover instead of an `OwnedBySomeoneElse` refusal.\n *\n * ★ RECONCILE IS ONE UPSERT CALL, LIKE `Snippet.ts`'s `putSnippet`. Discord's own docs for both\n * Create Global/Guild Application Command say a command with the same name (and type) as an\n * existing one OVERWRITES it — the create endpoint is a true upsert, not a create-only call that\n * 409s on a name collision. ⚠️ REASONED NOT MEASURED (no token available to this task; see\n * `docs/discord.md`): this is Discord's documented behaviour, unchanged across API v10, but it\n * has not been exercised against the real API by this change. One call therefore converges\n * greenfield create, routine update AND adoption alike — there is no separate PATCH path, and\n * S10's \"zero write calls when there is no drift\" is still honoured because `reconcile` skips\n * the call entirely when `spec.matches` already holds.\n *\n * ⚠️ `list` ANSWERS EMPTY, ON PURPOSE, EVEN THOUGH THE DISTILLED LIST OPERATIONS EXIST. A bot's\n * guild command set is exactly what `hf-discord-halibut.service` bulk-overwrites at every\n * restart (see `docs/discord.md#halibut`); a `nuke` that enumerated and swept every live command\n * would fight that ownership, not just this resource's own declarations. Adoption stays\n * explicit, the same reasoning netbox's `list` gives for a shared instance predating the kit.\n */\nimport { Unowned } from 'alchemy/AdoptPolicy';\nimport { isResolved } from 'alchemy/Diff';\nimport type { Input } from 'alchemy/Input';\nimport type { DiscordOpContext } from '@distilled.cloud/discord/Protocol';\nimport * as Effect from 'effect/Effect';\nimport type * as HttpClient from 'effect/http/HttpClient';\nimport { CredentialsFromEnv } from './credentials.ts';\n\n/**\n * What every stack must still provide after `discordHandlers` bakes in `CredentialsFromEnv`\n * (below): the transport. `DiscordOpContext` is `Credentials | HttpClient.HttpClient`, so once\n * `Credentials` is supplied, `HttpClient.HttpClient` is what remains — mirroring\n * `../netbox/resource.ts#NetboxRequirements`.\n */\nexport type DiscordRequirements = HttpClient.HttpClient;\n\n/** Every Discord command resource's identity key, regardless of scope. */\nexport interface DiscordCommandIdentity {\n readonly name: string;\n}\n\n/**\n * One Discord command object's distilled calls. `Live` is whatever the SDK decodes\n * (`ApplicationCommandResponse`); `E` is left to each resource file to declare, so a call site's\n * precise error union (in practice always `DiscordOpError` — see `protocol.ts` — because every\n * generated Discord operation shares one error channel) flows straight through.\n */\nexport type DiscordSpec<\n Props extends DiscordCommandIdentity,\n Live,\n Attributes extends object,\n E,\n> = {\n /** Locate the live command by its declared name within this spec's scope (app, or app+guild). */\n readonly fetchByName: (props: Props) => Effect.Effect<Live | undefined, E, DiscordOpContext>;\n readonly attributes: (live: Live) => Attributes;\n readonly matches: (attributes: Attributes, props: Props) => boolean;\n readonly upsertBody: (props: Props) => Record<string, unknown>;\n /** POST create-or-overwrite — see the upsert note above. */\n readonly upsert: (\n props: Props,\n body: Record<string, unknown>,\n ) => Effect.Effect<Live, E, DiscordOpContext>;\n readonly destroy: (props: Props, live: Live) => Effect.Effect<unknown, E, DiscordOpContext>;\n /** For error messages and test descriptions. */\n readonly describe: (props: Props) => string;\n};\n\nexport const discordOperations = <\n Props extends DiscordCommandIdentity,\n Live,\n Attributes extends object,\n E,\n>(\n spec: DiscordSpec<Props, Live, Attributes, E>,\n) => ({\n read: ({ olds, output }: { olds: Props; output: Attributes | undefined }) =>\n Effect.gen(function* () {\n const live = yield* spec.fetchByName(olds);\n if (live === undefined) return undefined;\n const attrs = spec.attributes(live);\n // Warm read: a prior apply already created or adopted this exact command — ours.\n if (output !== undefined) return attrs;\n // Cold read (fresh store, or state lost): no ownership marker exists on this vendor,\n // so any match is `Unowned` until `adopt(true)` (or `--adopt`) says otherwise (S7, S8).\n return Unowned(attrs);\n }),\n\n diff: (news: Input<Props>, output: Attributes | undefined) =>\n Effect.gen(function* () {\n if (output === undefined || !isResolved(news)) return undefined;\n const live = yield* spec.fetchByName(news);\n if (live === undefined) return { action: 'update' } as const;\n return spec.matches(spec.attributes(live), news)\n ? ({ action: 'noop' } as const)\n : ({ action: 'update' } as const);\n }),\n\n reconcile: (news: Props) =>\n Effect.gen(function* () {\n const before = yield* spec.fetchByName(news);\n if (before !== undefined && spec.matches(spec.attributes(before), news)) {\n // Already exactly what is declared — S10: no write.\n return spec.attributes(before);\n }\n const body = spec.upsertBody(news);\n const after = yield* spec.upsert(news, body);\n return spec.attributes(after);\n }),\n\n // ⚠️ GAP, NOT SOLVED: a TOCTOU race between the fetch above and the delete call below could\n // see Discord answer 404 on a command that vanished between the two — S11 asks that race to\n // be treated as success, `catchTag('NotFound', …)`. The SDK's declared error type for every\n // operation does not include `NotFound` (see `docs/discord.md#sdk-gaps` — measured, not\n // assumed), so there is no typed tag to catch here without an unsafe cast. Left unhandled.\n destroy: (olds: Props) =>\n Effect.gen(function* () {\n const live = yield* spec.fetchByName(olds);\n if (live === undefined) return;\n yield* spec.destroy(olds, live);\n }),\n});\n\n/**\n * The four provider handlers for a spec'd Discord command, wired once.\n *\n * ★ CREDENTIALS ARE PROVIDED HERE, ONCE. `CredentialsFromEnv` resolves `DISCORD_BOT_TOKEN` /\n * `DISCORD_TOKEN` on the calling fiber per request (credentials.ts), so this closure keeps that\n * laziness — nothing is captured at module load.\n */\nexport const discordHandlers = <\n Props extends DiscordCommandIdentity,\n Live,\n Attributes extends object,\n E,\n>(\n spec: DiscordSpec<Props, Live, Attributes, E>,\n) => {\n const ops = discordOperations(spec);\n const withCredentials = <A>(effect: Effect.Effect<A, E, DiscordOpContext>) =>\n Effect.provide(effect, CredentialsFromEnv);\n return {\n list: () => Effect.succeed([]),\n read: ({ olds, output }: { olds: Props; output: Attributes | undefined }) =>\n withCredentials(ops.read({ olds, output })),\n diff: ({ news, output }: { news: Input<Props>; output: Attributes | undefined }) =>\n withCredentials(ops.diff(news, output)),\n reconcile: ({ news }: { news: Props }) => withCredentials(ops.reconcile(news)),\n delete: ({ olds }: { olds: Props }) => withCredentials(ops.destroy(olds)),\n };\n};\n",
|
|
8
8
|
"/**\n * Discord credentials — a bot token REFERENCE, resolved lazily (S24), never a prop.\n *\n * ⛔ NO TOKEN IS EVER A PROP OR AN ATTRIBUTE. Alchemy persists Attributes unencrypted\n * (State/StateEncoding.ts@v2.0.0-beta.79#encodeState), so nothing a stack file holds may be a\n * credential. `@distilled.cloud/discord/Credentials` already ships exactly the shape S24 asks\n * for: `Credentials` is a lazy `Context.Service<Credentials, Effect.Effect<Config>>`, resolved\n * on the calling fiber inside each operation (`DiscordProtocol`'s `credentials:` field), never\n * at layer build. This file re-exports it rather than re-implementing it — the same choice\n * `../netbox/resource.ts` made for `CredentialsFromEnv` — and adds only the house-specific\n * naming and doc trail.\n *\n * ★ `CredentialsFromEnv` reads `DISCORD_BOT_TOKEN` (falling back to `DISCORD_TOKEN`) via Effect's\n * `Config`, which is exactly the \"reference\" shape S25 asks for: the resource never sees the\n * value, only the environment variable NAME is anywhere near a stack file, and the value itself\n * is wrapped in `Redacted` the moment it is read.\n *\n * ⚠️ NO OpenBao MINT YET. H8's target (`Alchemy.Stack({ secrets })`) is unreleased (PR 1728, still\n * on `main` only). Until the estate is on a release that carries it, the deploy process's own\n * environment is the credential seam — a human or CI job exports `DISCORD_BOT_TOKEN` from\n * wherever it mints it (on CT100 today: `/opt/homeflare/env/discord-halibut.env`, read by\n * systemd's `EnvironmentFile=`, never by this package). This package never reads that file.\n */\nimport type { Config } from '@distilled.cloud/discord/Credentials';\nimport { Credentials, CredentialsFromEnv, credentials } from '@distilled.cloud/discord/Credentials';\n\n/** Re-exported so a consumer never has to reach into `@distilled.cloud/discord` by hand. */\nexport { Credentials, CredentialsFromEnv, credentials };\nexport type { Config as DiscordCredentialsConfig };\n\n/**\n * `DiscordCredentials.fromEnv()` — the layer every `discordProviders()` stack uses by default.\n * A thin, named alias over `CredentialsFromEnv` so a stack's import reads `Discord.*`\n * throughout, the way `../netbox/index.ts`'s barrel keeps `Netbox*` names at the front door.\n */\nexport const fromEnv = () => CredentialsFromEnv;\n",
|
|
9
9
|
"/**\n * `Discord.GuildApplicationCommand` — one guild-scoped slash/user/message command.\n *\n * 🔴 THIS IS WHAT `hf-discord-halibut.service` OWNS TODAY, AND DECLARING IT AGAINST HALIBUT'S OWN\n * GUILDS WOULD FIGHT THE BOT, NOT REPLACE IT. Halibut calls `applySapphireGuildRegister()`\n * before every login (`src/discord/register.ts` on CT100, `RegisterBehavior.BulkOverwrite`),\n * which PUTs its exact `CURRENT_SLASH_NAMES` set on every restart. Deploying this resource\n * against the same `(applicationId, guildId)` the bot manages means two owners converging the\n * same object on two different schedules — the bot's restart would silently undo whatever this\n * resource last wrote, and the next `alchemy plan` would then report drift the bot just caused,\n * forever. See `docs/discord.md#halibut` for the measured command list, guild id source, and the\n * handover sequence (freeze the list, adopt each command with `adopt(true)` for a verified\n * no-op, THEN remove `applySapphireGuildRegister()` from the bot in the same deploy window —\n * bot-runtime code, explicitly out of scope for this family).\n *\n * ★ Until that handover happens, this resource is for guilds/applications Halibut does not touch.\n */\nimport { adopt } from 'alchemy/AdoptPolicy';\nimport { Resource } from 'alchemy';\nimport * as Provider from 'alchemy/Provider';\nimport * as command from '@distilled.cloud/discord/discord';\nimport type { DiscordOpError } from '@distilled.cloud/discord/Protocol';\nimport * as Effect from 'effect/Effect';\nimport {\n type CommandFields,\n type CommandFieldsAttributes,\n commandBody,\n commandFieldsOf,\n commandMatches,\n} from './command-form.ts';\nimport type { DiscordRequirements, DiscordSpec } from './resource.ts';\nimport { discordHandlers } from './resource.ts';\n\nexport interface GuildApplicationCommandProps extends CommandFields {\n /** The Discord application (bot) this command belongs to — a public snowflake, not a secret. */\n applicationId: string;\n /** The guild (server) this command is scoped to — a public snowflake. */\n guildId: string;\n}\n\nexport interface GuildApplicationCommandAttributes extends CommandFieldsAttributes {\n commandId: string;\n applicationId: string;\n guildId: string;\n version: string;\n}\n\nexport interface DiscordGuildApplicationCommand extends Resource<\n 'Discord.GuildApplicationCommand',\n GuildApplicationCommandProps,\n GuildApplicationCommandAttributes,\n never,\n DiscordRequirements\n> {}\n\nexport const DiscordGuildApplicationCommand = Resource<DiscordGuildApplicationCommand>(\n 'Discord.GuildApplicationCommand',\n { defaultRemovalPolicy: 'retain' },\n);\n\nexport const isDiscordGuildApplicationCommand = (\n value: unknown,\n): value is DiscordGuildApplicationCommand =>\n typeof value === 'object' &&\n value !== null &&\n (value as { Type?: unknown }).Type === 'Discord.GuildApplicationCommand';\n\nconst attributesOf = (\n live: command.ApplicationCommandResponse,\n): GuildApplicationCommandAttributes => ({\n applicationId: live.application_id,\n commandId: live.id,\n // ⚠️ `guild_id` is present on every row a GUILD list call returns (Discord scopes the list by\n // guild), so this cast documents that guarantee rather than re-deriving it from `props`.\n guildId: live.guild_id as string,\n version: live.version,\n ...commandFieldsOf(live),\n});\n\n/** Exported for direct testing against `fake-discord.ts`. */\nexport const spec: DiscordSpec<\n GuildApplicationCommandProps,\n command.ApplicationCommandResponse,\n GuildApplicationCommandAttributes,\n DiscordOpError\n> = {\n attributes: attributesOf,\n describe: (props) =>\n `applications/${props.applicationId}/guilds/${props.guildId}/commands ${props.name}`,\n destroy: (props, live) =>\n command.deleteGuildApplicationCommand({\n application_id: props.applicationId,\n command_id: live.id,\n guild_id: props.guildId,\n }),\n fetchByName: (props) =>\n command\n .listGuildApplicationCommands({\n application_id: props.applicationId,\n guild_id: props.guildId,\n })\n .pipe(Effect.map((rows) => rows.find((row) => row.name === props.name))),\n matches: commandMatches,\n upsert: (props, body) =>\n command.createGuildApplicationCommand({\n application_id: props.applicationId,\n guild_id: props.guildId,\n ...(body as Omit<\n command.CreateGuildApplicationCommandRequest,\n 'application_id' | 'guild_id'\n >),\n }),\n upsertBody: commandBody,\n};\n\nexport const handlers = discordHandlers(spec);\n\nexport const DiscordGuildApplicationCommandProvider = () =>\n Provider.effect(\n DiscordGuildApplicationCommand,\n Effect.succeed(DiscordGuildApplicationCommand.Provider.of(handlers)),\n );\n\n/**\n * `guildApplicationCommand('ping', { applicationId, guildId, name: 'ping' })` — `adopt(true)`\n * piped on by default (H5). See the file header before pointing this at a guild Halibut manages.\n */\nexport const guildApplicationCommand = (id: string, props: GuildApplicationCommandProps) =>\n DiscordGuildApplicationCommand(id, props).pipe(adopt(true));\n",
|
|
10
10
|
"/**\n * Both Discord command providers as one layer for a stack.\n *\n * Layer.mergeAll(discordProviders(), …the stack's other providers)\n * .pipe(Layer.provide(FetchHttpClient.layer))\n *\n * S16: a subpath's `providers()` plays the role upstream's own `Providers.ts` does — one minimal\n * insertion per family, requirements that never contain `unknown`. `FetchHttpClient.layer` is the\n * stack's own responsibility to provide (it is the shared transport every family needs, not\n * something a single vendor's `providers()` should pin), mirroring `../netbox/index.ts`'s barrel,\n * which exports `netboxHandlers` rather than a bundled transport too.\n */\nimport * as Layer from 'effect/Layer';\nimport { DiscordApplicationCommandProvider } from './application-command.ts';\nimport { DiscordGuildApplicationCommandProvider } from './guild-application-command.ts';\n\nexport const providers = () =>\n Layer.mergeAll(DiscordApplicationCommandProvider(), DiscordGuildApplicationCommandProvider());\n"
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
* which exports `netboxHandlers` rather than a bundled transport too.
|
|
12
12
|
*/
|
|
13
13
|
import * as Layer from 'effect/Layer';
|
|
14
|
-
export declare const providers: () => Layer.Layer<import("alchemy").Provider<import("./application-command.ts").DiscordApplicationCommand> | import("alchemy").Provider<import("./guild-application-command.ts").DiscordGuildApplicationCommand>, never, import("effect/
|
|
14
|
+
export declare const providers: () => Layer.Layer<import("alchemy").Provider<import("./application-command.ts").DiscordApplicationCommand> | import("alchemy").Provider<import("./guild-application-command.ts").DiscordGuildApplicationCommand>, never, import("effect/http/HttpClient").HttpClient>;
|
|
15
15
|
//# sourceMappingURL=providers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/discord/providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAItC,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/discord/providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAItC,eAAO,MAAM,SAAS,uQACyE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Input } from 'alchemy/Input';
|
|
2
2
|
import type { DiscordOpContext } from '@distilled.cloud/discord/Protocol';
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
|
-
import type * as HttpClient from 'effect/
|
|
4
|
+
import type * as HttpClient from 'effect/http/HttpClient';
|
|
5
5
|
/**
|
|
6
6
|
* What every stack must still provide after `discordHandlers` bakes in `CredentialsFromEnv`
|
|
7
7
|
* (below): the transport. `DiscordOpContext` is `Credentials | HttpClient.HttpClient`, so once
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/discord/resource.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,UAAU,MAAM,
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/discord/resource.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAG1D;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,UAAU,CAAC;AAExD,0EAA0E;AAC1E,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,MAAM,MAAM,WAAW,CACrB,KAAK,SAAS,sBAAsB,EACpC,IAAI,EACJ,UAAU,SAAS,MAAM,EACzB,CAAC,IACC;IACF,iGAAiG;IACjG,QAAQ,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,GAAG,SAAS,EAAE,CAAC,EAAE,gBAAgB,CAAC,CAAC;IAC7F,QAAQ,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,UAAU,CAAC;IAChD,QAAQ,CAAC,OAAO,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC;IACpE,QAAQ,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/D,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,CACf,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC1B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,gBAAgB,CAAC,CAAC;IAC9C,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,gBAAgB,CAAC,CAAC;IAC5F,gDAAgD;IAChD,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC;CAC7C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,KAAK,SAAS,sBAAsB,EACpC,IAAI,EACJ,UAAU,SAAS,MAAM,EACzB,CAAC,QAEK,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;IAE7C,IAAI,qBAAqB;QAAE,IAAI,EAAE,KAAK,CAAC;QAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CAAA;KAAE;IAYxE,IAAI,SAAS,KAAK,CAAC,KAAK,CAAC,UAAU,UAAU,GAAG,SAAS;yBAIZ,QAAQ;;yBAElC,MAAM;;IAIzB,SAAS,SAAS,KAAK;IAiBvB,OAAO,SAAS,KAAK;CAMrB,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAC1B,KAAK,SAAS,sBAAsB,EACpC,IAAI,EACJ,UAAU,SAAS,MAAM,EACzB,CAAC,QAEK,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;IAM3C,IAAI;IACJ,IAAI,qBAAqB;QAAE,IAAI,EAAE,KAAK,CAAC;QAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CAAA;KAAE;IAExE,IAAI,qBAAqB;QAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CAAA;KAAE;yBArDpC,QAAQ;;yBAElC,MAAM;;IAqDvB,SAAS,aAAa;QAAE,IAAI,EAAE,KAAK,CAAA;KAAE;IACrC,MAAM,aAAa;QAAE,IAAI,EAAE,KAAK,CAAA;KAAE;CAErC,CAAC"}
|
|
@@ -56,7 +56,7 @@ export declare const handlers: {
|
|
|
56
56
|
list: () => Effect.Effect<never[], never, never>;
|
|
57
57
|
read: ({ olds }: {
|
|
58
58
|
olds: BranchProtectionProps;
|
|
59
|
-
}) => Effect.Effect<BranchProtectionAttributes | undefined, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").ConfigError | repository.Forbidden | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/
|
|
59
|
+
}) => Effect.Effect<BranchProtectionAttributes | undefined, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").ConfigError | repository.Forbidden | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | repository.Locked | repository.NotFound | import("@distilled.cloud/caddy").ServiceUnavailable | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/forgejo/Errors").UnknownForgejoError | repository.UnprocessableEntity, import("effect/http/HttpClient").HttpClient>;
|
|
60
60
|
diff: ({ news, output }: {
|
|
61
61
|
news: import("alchemy").Input<BranchProtectionProps>;
|
|
62
62
|
output: BranchProtectionAttributes | undefined;
|
|
@@ -66,13 +66,13 @@ export declare const handlers: {
|
|
|
66
66
|
readonly action: 'noop';
|
|
67
67
|
} | {
|
|
68
68
|
readonly action: 'replace';
|
|
69
|
-
} | undefined, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").ConfigError | repository.Forbidden | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/
|
|
69
|
+
} | undefined, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").ConfigError | repository.Forbidden | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | repository.Locked | repository.NotFound | import("@distilled.cloud/caddy").ServiceUnavailable | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/forgejo/Errors").UnknownForgejoError | repository.UnprocessableEntity, import("effect/http/HttpClient").HttpClient>;
|
|
70
70
|
reconcile: ({ news }: {
|
|
71
71
|
news: BranchProtectionProps;
|
|
72
|
-
}) => Effect.Effect<BranchProtectionAttributes, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").ConfigError | repository.Forbidden | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/
|
|
72
|
+
}) => Effect.Effect<BranchProtectionAttributes, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").ConfigError | repository.Forbidden | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | repository.Locked | repository.NotFound | import("@distilled.cloud/caddy").ServiceUnavailable | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/forgejo/Errors").UnknownForgejoError | repository.UnprocessableEntity, import("effect/http/HttpClient").HttpClient>;
|
|
73
73
|
delete: ({ olds }: {
|
|
74
74
|
olds: BranchProtectionProps;
|
|
75
|
-
}) => Effect.Effect<void, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").ConfigError | repository.Forbidden | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/
|
|
75
|
+
}) => Effect.Effect<void, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").ConfigError | repository.Forbidden | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | repository.Locked | repository.NotFound | import("@distilled.cloud/caddy").ServiceUnavailable | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/forgejo/Errors").UnknownForgejoError | repository.UnprocessableEntity, import("effect/http/HttpClient").HttpClient>;
|
|
76
76
|
};
|
|
77
|
-
export declare const ForgejoBranchProtectionProvider: () => import("effect/Layer").Layer<Provider.Provider<ForgejoBranchProtection>, never, import("effect/
|
|
77
|
+
export declare const ForgejoBranchProtectionProvider: () => import("effect/Layer").Layer<Provider.Provider<ForgejoBranchProtection>, never, import("effect/http/HttpClient").HttpClient>;
|
|
78
78
|
//# sourceMappingURL=branch-protection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch-protection.d.ts","sourceRoot":"","sources":["../../src/forgejo/branch-protection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,qCAAqC,CAAC;AAClE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,WAAW,EAAmB,MAAM,eAAe,CAAC;AAG5F,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,aAAa,EAAE,OAAO,CAAC;IACvB,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAwB,SAAQ,QAAQ,CACvD,0BAA0B,EAC1B,qBAAqB,EACrB,0BAA0B,EAC1B,KAAK,EACL,mBAAmB,CACpB;CAAG;AAEJ,eAAO,MAAM,uBAAuB,0DAGnC,CAAC;AAEF,mGAAmG;AACnG,eAAO,MAAM,IAAI,EAAE,WAAW,CAC5B,qBAAqB,EACrB,UAAU,CAAC,gBAAgB,EAC3B,0BAA0B,EACxB,UAAU,CAAC,+BAA+B,GAC1C,UAAU,CAAC,4BAA4B,GACvC,UAAU,CAAC,6BAA6B,GACxC,UAAU,CAAC,+BAA+B,CAiD7C,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;CAAwB,CAAC;AAE9C,eAAO,MAAM,+BAA+B,
|
|
1
|
+
{"version":3,"file":"branch-protection.d.ts","sourceRoot":"","sources":["../../src/forgejo/branch-protection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,qCAAqC,CAAC;AAClE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,WAAW,EAAmB,MAAM,eAAe,CAAC;AAG5F,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,aAAa,EAAE,OAAO,CAAC;IACvB,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAwB,SAAQ,QAAQ,CACvD,0BAA0B,EAC1B,qBAAqB,EACrB,0BAA0B,EAC1B,KAAK,EACL,mBAAmB,CACpB;CAAG;AAEJ,eAAO,MAAM,uBAAuB,0DAGnC,CAAC;AAEF,mGAAmG;AACnG,eAAO,MAAM,IAAI,EAAE,WAAW,CAC5B,qBAAqB,EACrB,UAAU,CAAC,gBAAgB,EAC3B,0BAA0B,EACxB,UAAU,CAAC,+BAA+B,GAC1C,UAAU,CAAC,4BAA4B,GACvC,UAAU,CAAC,6BAA6B,GACxC,UAAU,CAAC,+BAA+B,CAiD7C,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;CAAwB,CAAC;AAE9C,eAAO,MAAM,+BAA+B,oIAIzC,CAAC"}
|
|
@@ -37,5 +37,5 @@ export declare const fakeForgejo: (route: (method: string, url: URL) => Response
|
|
|
37
37
|
* `handlers` at a fake server; it calls `spec.fetchLive`/`spec.attributes` directly instead, with
|
|
38
38
|
* this explicit layer, exercising exactly the same production code without that env seam.
|
|
39
39
|
*/
|
|
40
|
-
export declare const fakeForgejoLayer: (fetchFn: typeof globalThis.fetch, creds?: Layer.Layer<Credentials>) => Layer.Layer<Credentials | import("effect/
|
|
40
|
+
export declare const fakeForgejoLayer: (fetchFn: typeof globalThis.fetch, creds?: Layer.Layer<Credentials>) => Layer.Layer<Credentials | import("effect/http/HttpClient").HttpClient, never, never>;
|
|
41
41
|
//# sourceMappingURL=fake-forgejo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fake-forgejo.d.ts","sourceRoot":"","sources":["../../src/forgejo/fake-forgejo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,KAAK,WAAW,EAAe,MAAM,sCAAsC,CAAC;AACrF,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,eAAO,MAAM,SAAS,gCAAgC,CAAC;AACvD,eAAO,MAAM,UAAU,8BAA8B,CAAC;AAEtD,MAAM,MAAM,IAAI,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtE,gGAAgG;AAChG,eAAO,MAAM,WAAW,WAAY,MAAM,WAAW,MAAM,aACgC,CAAC;AAE5F;;;GAGG;AACH,eAAO,MAAM,WAAW,UAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,QAAQ;;;CAUxE,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,YAClB,OAAO,UAAU,CAAC,KAAK,UACzB,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"fake-forgejo.d.ts","sourceRoot":"","sources":["../../src/forgejo/fake-forgejo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,KAAK,WAAW,EAAe,MAAM,sCAAsC,CAAC;AACrF,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,eAAO,MAAM,SAAS,gCAAgC,CAAC;AACvD,eAAO,MAAM,UAAU,8BAA8B,CAAC;AAEtD,MAAM,MAAM,IAAI,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtE,gGAAgG;AAChG,eAAO,MAAM,WAAW,WAAY,MAAM,WAAW,MAAM,aACgC,CAAC;AAE5F;;;GAGG;AACH,eAAO,MAAM,WAAW,UAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,QAAQ;;;CAUxE,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,YAClB,OAAO,UAAU,CAAC,KAAK,UACzB,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,yFAC+D,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"/**\n * `Forgejo.BranchProtection` — one rule at `/repos/{owner}/{repo}/branch_protections/{name}`.\n *\n * ★ READ OFF `<estate>/mcp-servers/docs/api/upstream/forgejo.json`: create is POST collection;\n * read/update/delete use the branch/rule name in the path segment `{name}`. Now through\n * `@distilled.cloud/forgejo`'s `repository.repoCreateBranchProtection` /\n * `repoGetBranchProtection` / `repoEditBranchProtection` / `repoDeleteBranchProtection`.\n *\n * ⚠️ `BranchProtection.rule_name` IS A REQUIRED STRING IN THE PACKAGE'S SCHEMA — the deprecated\n * `branch_name` fallback the hand-rolled client carried is gone; a response missing `rule_name`\n * now fails the operation's own decode instead of this family silently treating it as absent.\n *\n * ⛔ `defaultRemovalPolicy: 'retain'` — dropping a protection rule from the stack must not silently\n * unprotect a branch; opt into `.pipe(RemovalPolicy.destroy())` to DELETE.\n *\n * ⛔ TOKEN NEEDS `write:repository` TO CREATE OR PATCH — get needs `read:repository`.\n */\nimport { Resource } from 'alchemy';\nimport * as Provider from 'alchemy/Provider';\nimport * as repository from '@distilled.cloud/forgejo/repository';\nimport * as Effect from 'effect/Effect';\nimport { createBranchProtectionForm, editBranchProtectionForm } from './branch-protection-form.ts';\nimport { type ForgejoRequirements, type ForgejoSpec, forgejoHandlers } from './resource.ts';\nimport { stringArray } from './values.ts';\n\nexport interface BranchProtectionProps {\n owner: string;\n repo: string;\n /** Branch or rule name — path key and `rule_name` on the wire. */\n branchName: string;\n requiredApprovals?: number;\n enablePush?: boolean;\n enableStatusCheck?: boolean;\n requireSignedCommits?: boolean;\n dismissStaleApprovals?: boolean;\n ignoreStaleApprovals?: boolean;\n applyToAdmins?: boolean;\n statusCheckContexts?: string[];\n}\n\nexport interface BranchProtectionAttributes {\n owner: string;\n repo: string;\n branchName: string;\n requiredApprovals: number;\n enablePush: boolean;\n enableStatusCheck: boolean;\n requireSignedCommits: boolean;\n dismissStaleApprovals: boolean;\n ignoreStaleApprovals: boolean;\n applyToAdmins: boolean;\n statusCheckContexts: string[];\n}\n\nexport interface ForgejoBranchProtection extends Resource<\n 'Forgejo.BranchProtection',\n BranchProtectionProps,\n BranchProtectionAttributes,\n never,\n ForgejoRequirements\n> {}\n\nexport const ForgejoBranchProtection = Resource<ForgejoBranchProtection>(\n 'Forgejo.BranchProtection',\n { defaultRemovalPolicy: 'retain' },\n);\n\n/** ★ EXPORTED for direct testing with an explicit fake `Credentials` layer — see repository.ts. */\nexport const spec: ForgejoSpec<\n BranchProtectionProps,\n repository.BranchProtection,\n BranchProtectionAttributes,\n | repository.RepoCreateBranchProtectionError\n | repository.RepoGetBranchProtectionError\n | repository.RepoEditBranchProtectionError\n | repository.RepoDeleteBranchProtectionError\n> = {\n attributes: (live, props) => ({\n applyToAdmins: live.apply_to_admins ?? false,\n branchName: props.branchName,\n dismissStaleApprovals: live.dismiss_stale_approvals ?? false,\n enablePush: live.enable_push ?? true,\n enableStatusCheck: live.enable_status_check ?? false,\n ignoreStaleApprovals: live.ignore_stale_approvals ?? false,\n owner: props.owner,\n repo: props.repo,\n requireSignedCommits: live.require_signed_commits ?? false,\n requiredApprovals: live.required_approvals ?? 0,\n statusCheckContexts: stringArray(live.status_check_contexts ?? []),\n }),\n create: (props) =>\n repository.repoCreateBranchProtection({\n owner: props.owner,\n repo: props.repo,\n ...createBranchProtectionForm(props),\n }),\n destroy: (props) =>\n repository.repoDeleteBranchProtection({\n owner: props.owner,\n repo: props.repo,\n name: props.branchName,\n }),\n fetchLive: (props) =>\n repository\n .repoGetBranchProtection({ owner: props.owner, repo: props.repo, name: props.branchName })\n .pipe(Effect.catchTag('NotFound', () => Effect.succeed(undefined))),\n matches: (attributes, props) =>\n attributes.requiredApprovals === (props.requiredApprovals ?? 0) &&\n attributes.enablePush === (props.enablePush ?? true) &&\n attributes.enableStatusCheck === (props.enableStatusCheck ?? false) &&\n attributes.requireSignedCommits === (props.requireSignedCommits ?? false) &&\n attributes.dismissStaleApprovals === (props.dismissStaleApprovals ?? false) &&\n attributes.ignoreStaleApprovals === (props.ignoreStaleApprovals ?? false) &&\n attributes.applyToAdmins === (props.applyToAdmins ?? false) &&\n (props.statusCheckContexts === undefined ||\n stringArray(props.statusCheckContexts).join('\\0') ===\n attributes.statusCheckContexts.join('\\0')),\n update: (props) =>\n repository.repoEditBranchProtection({\n owner: props.owner,\n repo: props.repo,\n name: props.branchName,\n ...editBranchProtectionForm(props),\n }),\n};\n\nexport const handlers = forgejoHandlers(spec);\n\nexport const ForgejoBranchProtectionProvider = () =>\n Provider.effect(\n ForgejoBranchProtection,\n Effect.succeed(ForgejoBranchProtection.Provider.of(handlers)),\n );\n",
|
|
6
6
|
"/**\n * Create/edit request bodies for `Forgejo.BranchProtection` — extracted for the 250-line cap.\n *\n * ★ `repoCreateBranchProtection`'s request carries `branch_name`; `repoEditBranchProtection`'s\n * carries `name` (the rule-name path segment) instead — both are covered by the two exports\n * below, so branch-protection.ts never builds the field list twice.\n */\nimport type { BranchProtectionProps } from './branch-protection.ts';\n\nconst shared = (props: BranchProtectionProps) => ({\n ...(props.applyToAdmins === undefined ? {} : { apply_to_admins: props.applyToAdmins }),\n ...(props.dismissStaleApprovals === undefined\n ? {}\n : { dismiss_stale_approvals: props.dismissStaleApprovals }),\n ...(props.enablePush === undefined ? {} : { enable_push: props.enablePush }),\n ...(props.enableStatusCheck === undefined\n ? {}\n : { enable_status_check: props.enableStatusCheck }),\n ...(props.ignoreStaleApprovals === undefined\n ? {}\n : { ignore_stale_approvals: props.ignoreStaleApprovals }),\n ...(props.requireSignedCommits === undefined\n ? {}\n : { require_signed_commits: props.requireSignedCommits }),\n ...(props.requiredApprovals === undefined ? {} : { required_approvals: props.requiredApprovals }),\n ...(props.statusCheckContexts === undefined\n ? {}\n : { status_check_contexts: props.statusCheckContexts }),\n});\n\nexport const createBranchProtectionForm = (props: BranchProtectionProps) => ({\n ...shared(props),\n branch_name: props.branchName,\n});\n\nexport const editBranchProtectionForm = (props: BranchProtectionProps) => shared(props);\n",
|
|
7
|
-
"/**\n * One shape for every Forgejo object — the same four operations, different distilled call.\n *\n * ⛔ THE ALTERNATIVE IS COPYING THE SAME HANDLERS PER RESOURCE. Repositories, org labels, teams,\n * webhooks, branch protection and org secrets are all create / read / update / delete against\n * `@distilled.cloud/forgejo`'s typed operations. Hand-rolling the fourth copy is where someone\n * drops the read-back or the isResolved guard and the plan lies.\n *\n * ★ SO THE FOUR OPERATIONS LIVE HERE, ONCE. A new Forgejo object is a spec (which distilled\n * operations to call) plus attribute mapping, not a hundred and thirty lines of its own.\n *\n * 🔴 WHY THIS REPLACED `client.ts`'s HAND-ROLLED `HttpClient` CALLS. Measured against Tim's\n * distilled research page 2026-09-23: upstream Alchemy only accepts providers that call\n * `@distilled.cloud/<vendor>` operations and `catchTag` their typed errors — not a raw\n * `fetch`/`HttpClient` client over a hand-maintained path table. `@distilled.cloud/forgejo`\n * published at 1.0.0-rc.12 covers every operation this family calls (verified operation by\n * operation while porting each resource file).\n *\n * ⚠️ `NotFound` IS FOLDED TO \"ABSENT\" INSIDE EACH RESOURCE FILE'S OWN `fetchLive`, NOT HERE — the\n * direct successor to the old, centralized `absentOn404`. `Effect.catchTag`'s tag-literal\n * inference needs a concrete error union to resolve `\"NotFound\"` against; a spec's `E` is only\n * concrete at each resource file's own call site (`RepoGetBranchProtectionError`, `GetRepoError`,\n * …), not inside this shared engine's generic functions. So every `fetchLive` below ends\n * `.pipe(Effect.catchTag('NotFound', () => Effect.succeed(undefined)))` itself — one line,\n * `catchTag`, never a status comparison — and this engine trusts the result is already folded.\n *\n * ⚠️ GITEA ANSWERS WITH THE OBJECT DIRECTLY — NOT `{\"data\": ...}`, and the distilled SDK decodes\n * that shape already. `reconcile` still READS BACK after every write rather than trusting a\n * write response alone — a create/update can 200 with a body this family does not fully trust\n * until the follow-up `read`.\n *\n * ★ WHY `Forgejo.Repository` DECLARES `defaultRemovalPolicy: 'retain'`, WRITTEN ONCE HERE.\n * Alchemy's own `GitHub.Repository` defaults to retain \"because their contents are\n * irreplaceable\". A git repository is the most irreplaceable object on this estate. `retain`\n * means the engine skips `provider.delete` when a resource is orphaned unless the caller opted\n * into `.pipe(RemovalPolicy.destroy())`. The `delete` handler is FULLY IMPLEMENTED anyway — a\n * stub that silently does nothing lies to whoever reads the plan.\n */\nimport { isResolved } from 'alchemy/Diff';\nimport type { Input } from 'alchemy/Input';\nimport { CredentialsFromEnv } from '@distilled.cloud/forgejo/Credentials';\nimport type { ForgejoOpContext } from '@distilled.cloud/forgejo/Protocol';\nimport * as Effect from 'effect/Effect';\nimport type * as HttpClient from 'effect/
|
|
7
|
+
"/**\n * One shape for every Forgejo object — the same four operations, different distilled call.\n *\n * ⛔ THE ALTERNATIVE IS COPYING THE SAME HANDLERS PER RESOURCE. Repositories, org labels, teams,\n * webhooks, branch protection and org secrets are all create / read / update / delete against\n * `@distilled.cloud/forgejo`'s typed operations. Hand-rolling the fourth copy is where someone\n * drops the read-back or the isResolved guard and the plan lies.\n *\n * ★ SO THE FOUR OPERATIONS LIVE HERE, ONCE. A new Forgejo object is a spec (which distilled\n * operations to call) plus attribute mapping, not a hundred and thirty lines of its own.\n *\n * 🔴 WHY THIS REPLACED `client.ts`'s HAND-ROLLED `HttpClient` CALLS. Measured against Tim's\n * distilled research page 2026-09-23: upstream Alchemy only accepts providers that call\n * `@distilled.cloud/<vendor>` operations and `catchTag` their typed errors — not a raw\n * `fetch`/`HttpClient` client over a hand-maintained path table. `@distilled.cloud/forgejo`\n * published at 1.0.0-rc.12 covers every operation this family calls (verified operation by\n * operation while porting each resource file).\n *\n * ⚠️ `NotFound` IS FOLDED TO \"ABSENT\" INSIDE EACH RESOURCE FILE'S OWN `fetchLive`, NOT HERE — the\n * direct successor to the old, centralized `absentOn404`. `Effect.catchTag`'s tag-literal\n * inference needs a concrete error union to resolve `\"NotFound\"` against; a spec's `E` is only\n * concrete at each resource file's own call site (`RepoGetBranchProtectionError`, `GetRepoError`,\n * …), not inside this shared engine's generic functions. So every `fetchLive` below ends\n * `.pipe(Effect.catchTag('NotFound', () => Effect.succeed(undefined)))` itself — one line,\n * `catchTag`, never a status comparison — and this engine trusts the result is already folded.\n *\n * ⚠️ GITEA ANSWERS WITH THE OBJECT DIRECTLY — NOT `{\"data\": ...}`, and the distilled SDK decodes\n * that shape already. `reconcile` still READS BACK after every write rather than trusting a\n * write response alone — a create/update can 200 with a body this family does not fully trust\n * until the follow-up `read`.\n *\n * ★ WHY `Forgejo.Repository` DECLARES `defaultRemovalPolicy: 'retain'`, WRITTEN ONCE HERE.\n * Alchemy's own `GitHub.Repository` defaults to retain \"because their contents are\n * irreplaceable\". A git repository is the most irreplaceable object on this estate. `retain`\n * means the engine skips `provider.delete` when a resource is orphaned unless the caller opted\n * into `.pipe(RemovalPolicy.destroy())`. The `delete` handler is FULLY IMPLEMENTED anyway — a\n * stub that silently does nothing lies to whoever reads the plan.\n */\nimport { isResolved } from 'alchemy/Diff';\nimport type { Input } from 'alchemy/Input';\nimport { CredentialsFromEnv } from '@distilled.cloud/forgejo/Credentials';\nimport type { ForgejoOpContext } from '@distilled.cloud/forgejo/Protocol';\nimport * as Effect from 'effect/Effect';\nimport type * as HttpClient from 'effect/http/HttpClient';\n\n/**\n * ★ WHAT EVERY HANDLER NEEDS FROM THE CALLER'S RUNTIME, after Credentials are provided below.\n * `Forgejo.ForgejoOpContext` is `Credentials | HttpClient.HttpClient`; `forgejoHandlers` closes\n * over `CredentialsFromEnv` itself (same `FORGEJO_URL` / `FORGEJO_TOKEN` names client.ts read,\n * still resolved at call time — see credentials.ts's own note on that), so a consuming stack\n * only has to provide `HttpClient.HttpClient`, exactly as it did before this migration.\n */\nexport type ForgejoRequirements = HttpClient.HttpClient;\n\n/**\n * One Forgejo object's distilled calls. `Live` is whatever the SDK decodes (a `Repository`, a\n * `Label`, a composite for team membership, …) — no more untyped `Record<string, unknown>`.\n *\n * `E` is left to each resource file to declare (the union of the distilled operations' error\n * types it actually calls, e.g. `RepoCreateHookError | RepoEditHookError | ...`), so a call site's\n * precise per-operation error union flows straight through instead of being widened by hand here.\n */\nexport type ForgejoSpec<Props extends object, Live, Attributes, E> = {\n /** Already folds the SDK's `NotFound` to `undefined` via its own `catchTag` — see the note above. */\n readonly fetchLive: (props: Props) => Effect.Effect<Live | undefined, E, ForgejoOpContext>;\n readonly attributes: (live: Live, props: Props) => Attributes | undefined;\n readonly matches: (attributes: Attributes, props: Props) => boolean;\n /** Absent for the two existence-only families (`OrgSecret`, `TeamMember`), which use `upsert` instead. */\n readonly create?: (props: Props) => Effect.Effect<unknown, E, ForgejoOpContext>;\n readonly update?: (props: Props, live: Live) => Effect.Effect<unknown, E, ForgejoOpContext>;\n /**\n * When create is PUT upsert rather than POST — org actions secrets have no POST and no GET-by-name.\n * `before === undefined` means absent; the callback decides whether to write. Existence-only families\n * noop when `before` is set because the API never returns the value for comparison.\n */\n readonly upsert?: (\n props: Props,\n before: Live | undefined,\n ) => Effect.Effect<void, E, ForgejoOpContext>;\n readonly destroy: (props: Props, live: Live) => Effect.Effect<unknown, E, ForgejoOpContext>;\n};\n\nexport const forgejoOperations = <Props extends object, Live, Attributes, E>(\n spec: ForgejoSpec<Props, Live, Attributes, E>,\n) => {\n const read = (props: Props) =>\n spec\n .fetchLive(props)\n .pipe(Effect.map((live) => (live === undefined ? undefined : spec.attributes(live, props))));\n\n return {\n read,\n\n diff: (news: Input<Props>, output: Attributes | undefined) =>\n Effect.gen(function* () {\n if (output === undefined || !isResolved(news)) return undefined;\n const live = yield* read(news);\n if (live === undefined) return { action: 'update' } as const;\n if (spec.matches(live, news)) return { action: 'noop' } as const;\n return spec.update === undefined\n ? ({ action: 'replace' } as const)\n : ({ action: 'update' } as const);\n }),\n\n reconcile: (news: Props) =>\n Effect.gen(function* () {\n const before = yield* spec.fetchLive(news);\n if (spec.upsert !== undefined) {\n yield* spec.upsert(news, before);\n } else if (before === undefined) {\n if (spec.create === undefined) {\n return yield* Effect.die(\n new Error('forgejoOperations: spec declares neither create nor upsert'),\n );\n }\n yield* spec.create(news);\n } else if (spec.update !== undefined) {\n const mapped = spec.attributes(before, news);\n if (mapped === undefined || spec.matches(mapped, news)) {\n /* adoption or already converged — no PATCH */\n } else {\n yield* spec.update(news, before);\n }\n }\n const after = yield* read(news);\n if (after === undefined) {\n return yield* Effect.die(\n new Error(\n 'the write returned no error but the object is still absent. ' +\n 'Gitea returns the object directly — read back rather than trusting the status code.',\n ),\n );\n }\n return after;\n }),\n\n destroy: (olds: Props) =>\n Effect.gen(function* () {\n const live = yield* spec.fetchLive(olds);\n if (live === undefined) return;\n yield* spec.destroy(olds, live);\n }),\n };\n};\n\n/**\n * The five provider handlers for a spec'd Forgejo object, wired once.\n *\n * ★ CREDENTIALS ARE PROVIDED HERE, ONCE, NOT BY EVERY CALLER. `CredentialsFromEnv` resolves\n * `FORGEJO_URL` / `FORGEJO_TOKEN` on the calling fiber per request (credentials.ts's own note),\n * so this closure keeps that laziness — nothing is captured at module load.\n *\n * ⛔ IT STOPS AT THE HANDLERS AND DOES NOT RETURN THE LAYER — same reasoning as pveHandlers in\n * <estate>/proxmox: wrapping `Provider.effect` here needs casts against Alchemy's `Props<R>`.\n *\n * ⚠️ `list` answers empty — Forgejo index endpoints return the whole org; adoption stays explicit.\n */\nexport const forgejoHandlers = <Props extends object, Live, Attributes extends object, E>(\n spec: ForgejoSpec<Props, Live, Attributes, E>,\n) => {\n const ops = forgejoOperations(spec);\n const withCredentials = <A>(effect: Effect.Effect<A, E, ForgejoOpContext>) =>\n Effect.provide(effect, CredentialsFromEnv);\n return {\n list: () => Effect.succeed([]),\n read: ({ olds }: { olds: Props }) => withCredentials(ops.read(olds)),\n diff: ({ news, output }: { news: Input<Props>; output: Attributes | undefined }) =>\n withCredentials(ops.diff(news, output)),\n reconcile: ({ news }: { news: Props }) => withCredentials(ops.reconcile(news)),\n delete: ({ olds }: { olds: Props }) => withCredentials(ops.destroy(olds)),\n };\n};\n",
|
|
8
8
|
"/**\n * Wire coercions shared across Forgejo resources.\n *\n * ★ GITEA/FORGEJO JSON USES snake_case ON THE WIRE and camelCase in props — each resource\n * translates at the form boundary; these helpers only normalise values for comparison.\n *\n * ⛔ `text`/`bool`/`int` FROM THE HAND-ROLLED CLIENT ERA ARE GONE. They coerced values out of an\n * untyped `Record<string, unknown>` response. `@distilled.cloud/forgejo`'s operations decode\n * into typed structs (`Repository`, `Label`, `BranchProtection`, …), so an optional field is\n * already `string | undefined` / `boolean | undefined` — a plain `live.field ?? fallback` at\n * the call site replaces every one of their call sites, and a malformed response now fails the\n * operation's decode instead of silently coercing to a fallback.\n */\n\n/** Forgejo returns label colours without `#`; declarations may include it. */\nexport const color = (value: string) => value.replace(/^#/, '').toLowerCase();\n\n/** Wire arrays compared in sorted order — Gitea reshuffles nothing but callers should not depend on order. */\nexport const stringArray = (value: unknown) =>\n Array.isArray(value)\n ? value.filter((entry): entry is string => typeof entry === 'string').toSorted()\n : [];\n\nexport const stringRecord = (value: unknown): Record<string, string> => {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) return {};\n const out: Record<string, string> = {};\n for (const [key, entry] of Object.entries(value)) {\n if (typeof entry === 'string') out[key] = entry;\n }\n return out;\n};\n\nexport const recordEqual = (left: Record<string, string>, right: Record<string, string>) => {\n const leftKeys = Object.keys(left).toSorted();\n const rightKeys = Object.keys(right).toSorted();\n if (leftKeys.length !== rightKeys.length) return false;\n return leftKeys.every((key, index) => rightKeys[index] === key && left[key] === right[key]);\n};\n\n/** Hook `config` without `secret` — the value must never land in Alchemy attributes. */\nexport const hookConfigPublic = (value: unknown) => {\n const config = stringRecord(value);\n const { secret: _secret, ...rest } = config;\n return rest;\n};\n\n/** Env key for a write-only org actions secret — value read at PUT time only, never stored. */\nexport const orgSecretEnvKey = (org: string, name: string) =>\n `FORGEJO_ORG_SECRET_${org}_${name}`.replace(/[^A-Za-z0-9_]/g, '_').toUpperCase();\n\n/** Env key for a write-only repo webhook HMAC secret — omitted from attributes and props. */\nexport const hookSecretEnvKey = (owner: string, repo: string, name: string) =>\n `FORGEJO_HOOK_SECRET_${owner}_${repo}_${name}`.replace(/[^A-Za-z0-9_]/g, '_').toUpperCase();\n",
|
|
9
9
|
"/**\n * `Forgejo.OrgSecret` — org-level Actions secret metadata at `/orgs/{org}/actions/secrets/{name}`.\n *\n * ★ CHOICE: AUTHORED WITH WRITE-ONLY VALUE VIA ENV, NOT REFUSED. `organization.Secret` (the\n * package's typed output) has only `name` and `created_at` — never `data` — so attributes stay\n * metadata-only. Create/update is `updateOrgSecret`, a PUT with `{ data }`, which does not fit\n * POST/PATCH; this family uses the `upsert` seam on `ForgejoSpec` instead of a plain create.\n *\n * ⛔ THE SECRET VALUE IS NEVER A PROP OR AN ATTRIBUTE. It is read from `FORGEJO_ORG_SECRET_{org}_{name}`\n * (see orgSecretEnvKey) at PUT time when the name is absent from the list. Once present, reconcile\n * noops — the API cannot confirm the value matches, and re-PUT on every deploy would rotate\n * unintentionally. Rotate by destroy-then-create or a manual PUT outside Alchemy.\n *\n * ⛔ TOKEN NEEDS `write:organization` TO PUT — list needs `read:organization`.\n *\n * ⛔ THE FILE NAME IS PLURAL ON PURPOSE AND MUST STAY THAT WAY. `.gitignore:198` carries\n * `*-secret.*` — the rule that stops `client-secret.json` and friends being committed — and it\n * matches a SOURCE file called `org-secret.ts` just as happily. This family was first authored\n * under that name: it existed on disk, typechecked, passed oxlint, was imported by alchemy.run.ts\n * and appeared in NO `git status`. `scripts/husky/ignored-imports.ts` is the gate that now\n * catches the class; this comment is for whoever is tempted to rename it back.\n */\nimport { Resource } from 'alchemy';\nimport * as Provider from 'alchemy/Provider';\nimport * as organization from '@distilled.cloud/forgejo/organization';\nimport * as Data from 'effect/Data';\nimport * as Effect from 'effect/Effect';\nimport { type ForgejoRequirements, type ForgejoSpec, forgejoHandlers } from './resource.ts';\nimport { orgSecretEnvKey } from './values.ts';\n\nexport interface OrgSecretProps {\n org: string;\n /** Secret name — path key; value lives in env, not here. */\n name: string;\n}\n\nexport interface OrgSecretAttributes {\n org: string;\n name: string;\n createdAt: string;\n}\n\nexport interface ForgejoOrgSecret extends Resource<\n 'Forgejo.OrgSecret',\n OrgSecretProps,\n OrgSecretAttributes,\n never,\n ForgejoRequirements\n> {}\n\nexport const ForgejoOrgSecret = Resource<ForgejoOrgSecret>('Forgejo.OrgSecret');\n\n/** Domain refusal, not a distilled error — the env var this family reads the secret value from is unset. */\nexport class ForgejoSecretEnvUnsetError extends Data.TaggedError('ForgejoSecretEnvUnsetError')<{\n readonly message: string;\n}> {}\n\nconst secretData = (org: string, name: string) =>\n Effect.gen(function* () {\n const key = orgSecretEnvKey(org, name);\n const raw = process.env[key];\n if (raw === undefined || raw.trim() === '') {\n return yield* Effect.fail(\n new ForgejoSecretEnvUnsetError({\n message: `${key} is unset. Export the secret value there — never as an Alchemy prop.`,\n }),\n );\n }\n return raw.trim();\n });\n\n/** ★ EXPORTED for direct testing with an explicit fake `Credentials` layer — see repository.ts. */\nexport const spec: ForgejoSpec<\n OrgSecretProps,\n organization.Secret,\n OrgSecretAttributes,\n | organization.OrgListActionsSecretsError\n | organization.UpdateOrgSecretError\n | organization.DeleteOrgSecretError\n | ForgejoSecretEnvUnsetError\n> = {\n attributes: (live, props) => ({\n createdAt: live.created_at,\n name: props.name,\n org: props.org,\n }),\n destroy: (props) => organization.deleteOrgSecret({ org: props.org, secretname: props.name }),\n fetchLive: (props) =>\n organization.orgListActionsSecrets({ org: props.org, limit: 200 }).pipe(\n Effect.map((rows) => rows.find((row) => row.name === props.name)),\n Effect.catchTag('NotFound', () => Effect.succeed(undefined)),\n ),\n matches: () => true,\n upsert: (props, before) =>\n before !== undefined\n ? Effect.void\n : Effect.flatMap(secretData(props.org, props.name), (data) =>\n Effect.asVoid(\n organization.updateOrgSecret({ data, org: props.org, secretname: props.name }),\n ),\n ),\n};\n\nexport const handlers = forgejoHandlers(spec);\n\nexport const ForgejoOrgSecretProvider = () =>\n Provider.effect(ForgejoOrgSecret, Effect.succeed(ForgejoOrgSecret.Provider.of(handlers)));\n",
|
|
10
10
|
"/**\n * `Forgejo.OrgLabel` — one org-level issue label shared across every repository in the org.\n *\n * ★ RETIRES the estate's hand-run `labels-reconcile.sh`, which\n * converged the whole `labels.yaml` file in one shot. That script CREATED and PATCHED labels\n * from the spec and REPORTED `EXTRA` labels present live but absent from the file — it never\n * deleted them, because removing a label strips it from every issue that carries it.\n *\n * ★ THIS RESOURCE DOES NOT REMOVE EXTRA LABELS EITHER. Alchemy manages only labels you declare;\n * labels on the org that nobody declared stay untouched — the same boundary as the script's\n * `EXTRA … NOT deleted` lines. Removing a declaration defaults to `retain`, so dropping a label\n * from the stack does not DELETE it unless the caller opts into `.pipe(RemovalPolicy.destroy())`.\n * That matches the script's never-delete posture while still allowing a deliberate destroy.\n *\n * ⚠️ THE WIRE PATH USES NUMERIC ID, NOT NAME — measured on live org labels: edit and delete are\n * `orgEditLabel`/`orgDeleteLabel({ org, id })`. `fetchLive` lists by name; the id comes off that\n * row for `update`/`destroy`, the same seam the hand-rolled `wirePath` used.\n *\n * ⛔ TOKEN NEEDS `write:organization` FOR RECONCILE — the mcp-read token lacks it (POST 403\n * measured 2026-09-13). Plan/deploy needs a provision-scoped credential in `FORGEJO_TOKEN`.\n */\nimport { Resource } from 'alchemy';\nimport * as Provider from 'alchemy/Provider';\nimport * as organization from '@distilled.cloud/forgejo/organization';\nimport * as Effect from 'effect/Effect';\nimport { type ForgejoRequirements, type ForgejoSpec, forgejoHandlers } from './resource.ts';\nimport { color } from './values.ts';\n\nexport interface OrgLabelProps {\n /** Organization login — `homeflare` / `HomeFlare` must match the live org. */\n org: string;\n /** Label name — primary key for locate; immutable on update. */\n name: string;\n /** Six-digit hex, with or without `#`. */\n color: string;\n description?: string;\n exclusive?: boolean;\n}\n\nexport interface OrgLabelAttributes {\n org: string;\n name: string;\n labelId: number;\n color: string;\n description: string;\n exclusive: boolean;\n}\n\nexport interface ForgejoOrgLabel extends Resource<\n 'Forgejo.OrgLabel',\n OrgLabelProps,\n OrgLabelAttributes,\n never,\n ForgejoRequirements\n> {}\n\nexport const ForgejoOrgLabel = Resource<ForgejoOrgLabel>('Forgejo.OrgLabel', {\n defaultRemovalPolicy: 'retain',\n});\n\n/** ★ EXPORTED for direct testing with an explicit fake `Credentials` layer — see repository.ts. */\nexport const spec: ForgejoSpec<\n OrgLabelProps,\n organization.Label,\n OrgLabelAttributes,\n | organization.OrgCreateLabelError\n | organization.OrgEditLabelError\n | organization.OrgDeleteLabelError\n | organization.OrgListLabelsError\n> = {\n attributes: (live, props) => ({\n color: color(live.color),\n description: live.description ?? '',\n exclusive: live.exclusive ?? false,\n labelId: live.id,\n name: props.name,\n org: props.org,\n }),\n create: (props) =>\n organization.orgCreateLabel({\n color: color(props.color),\n description: props.description ?? '',\n exclusive: props.exclusive ?? false,\n name: props.name,\n org: props.org,\n }),\n destroy: (props, live) => organization.orgDeleteLabel({ org: props.org, id: live.id }),\n fetchLive: (props) =>\n organization.orgListLabels({ org: props.org, limit: 200 }).pipe(\n Effect.map((rows) => rows.find((row) => row.name === props.name)),\n Effect.catchTag('NotFound', () => Effect.succeed(undefined)),\n ),\n matches: (attributes, props) =>\n attributes.color === color(props.color) &&\n attributes.description === (props.description ?? '') &&\n attributes.exclusive === (props.exclusive ?? false),\n update: (props, live) =>\n organization.orgEditLabel({\n color: color(props.color),\n description: props.description ?? '',\n exclusive: props.exclusive ?? false,\n id: live.id,\n org: props.org,\n }),\n};\n\nexport const handlers = forgejoHandlers(spec);\n\nexport const ForgejoOrgLabelProvider = () =>\n Provider.effect(ForgejoOrgLabel, Effect.succeed(ForgejoOrgLabel.Provider.of(handlers)));\n",
|
|
@@ -52,7 +52,7 @@ export declare const handlers: {
|
|
|
52
52
|
list: () => Effect.Effect<never[], never, never>;
|
|
53
53
|
read: ({ olds }: {
|
|
54
54
|
olds: OrgSecretProps;
|
|
55
|
-
}) => Effect.Effect<OrgSecretAttributes | undefined, import("@distilled.cloud/caddy").BadGateway | organization.BadRequest | import("@distilled.cloud/caddy").ConfigError | organization.Forbidden | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | ForgejoSecretEnvUnsetError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/
|
|
55
|
+
}) => Effect.Effect<OrgSecretAttributes | undefined, import("@distilled.cloud/caddy").BadGateway | organization.BadRequest | import("@distilled.cloud/caddy").ConfigError | organization.Forbidden | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | ForgejoSecretEnvUnsetError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | organization.NotFound | import("@distilled.cloud/caddy").ServiceUnavailable | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/forgejo/Errors").UnknownForgejoError, import("effect/http/HttpClient").HttpClient>;
|
|
56
56
|
diff: ({ news, output }: {
|
|
57
57
|
news: import("alchemy").Input<OrgSecretProps>;
|
|
58
58
|
output: OrgSecretAttributes | undefined;
|
|
@@ -62,14 +62,14 @@ export declare const handlers: {
|
|
|
62
62
|
readonly action: 'noop';
|
|
63
63
|
} | {
|
|
64
64
|
readonly action: 'replace';
|
|
65
|
-
} | undefined, import("@distilled.cloud/caddy").BadGateway | organization.BadRequest | import("@distilled.cloud/caddy").ConfigError | organization.Forbidden | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | ForgejoSecretEnvUnsetError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/
|
|
65
|
+
} | undefined, import("@distilled.cloud/caddy").BadGateway | organization.BadRequest | import("@distilled.cloud/caddy").ConfigError | organization.Forbidden | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | ForgejoSecretEnvUnsetError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | organization.NotFound | import("@distilled.cloud/caddy").ServiceUnavailable | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/forgejo/Errors").UnknownForgejoError, import("effect/http/HttpClient").HttpClient>;
|
|
66
66
|
reconcile: ({ news }: {
|
|
67
67
|
news: OrgSecretProps;
|
|
68
|
-
}) => Effect.Effect<OrgSecretAttributes, import("@distilled.cloud/caddy").BadGateway | organization.BadRequest | import("@distilled.cloud/caddy").ConfigError | organization.Forbidden | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | ForgejoSecretEnvUnsetError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/
|
|
68
|
+
}) => Effect.Effect<OrgSecretAttributes, import("@distilled.cloud/caddy").BadGateway | organization.BadRequest | import("@distilled.cloud/caddy").ConfigError | organization.Forbidden | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | ForgejoSecretEnvUnsetError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | organization.NotFound | import("@distilled.cloud/caddy").ServiceUnavailable | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/forgejo/Errors").UnknownForgejoError, import("effect/http/HttpClient").HttpClient>;
|
|
69
69
|
delete: ({ olds }: {
|
|
70
70
|
olds: OrgSecretProps;
|
|
71
|
-
}) => Effect.Effect<void, import("@distilled.cloud/caddy").BadGateway | organization.BadRequest | import("@distilled.cloud/caddy").ConfigError | organization.Forbidden | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | ForgejoSecretEnvUnsetError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/
|
|
71
|
+
}) => Effect.Effect<void, import("@distilled.cloud/caddy").BadGateway | organization.BadRequest | import("@distilled.cloud/caddy").ConfigError | organization.Forbidden | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | ForgejoSecretEnvUnsetError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | organization.NotFound | import("@distilled.cloud/caddy").ServiceUnavailable | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/forgejo/Errors").UnknownForgejoError, import("effect/http/HttpClient").HttpClient>;
|
|
72
72
|
};
|
|
73
|
-
export declare const ForgejoOrgSecretProvider: () => import("effect/Layer").Layer<Provider.Provider<ForgejoOrgSecret>, never, import("effect/
|
|
73
|
+
export declare const ForgejoOrgSecretProvider: () => import("effect/Layer").Layer<Provider.Provider<ForgejoOrgSecret>, never, import("effect/http/HttpClient").HttpClient>;
|
|
74
74
|
export {};
|
|
75
75
|
//# sourceMappingURL=org-actions-secrets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"org-actions-secrets.d.ts","sourceRoot":"","sources":["../../src/forgejo/org-actions-secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,YAAY,MAAM,uCAAuC,CAAC;AAEtE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,WAAW,EAAmB,MAAM,eAAe,CAAC;AAG5F,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAiB,SAAQ,QAAQ,CAChD,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,KAAK,EACL,mBAAmB,CACpB;CAAG;AAEJ,eAAO,MAAM,gBAAgB,mDAAkD,CAAC;;;;AAEhF,4GAA4G;AAC5G,qBAAa,0BAA2B,SAAQ,gCAA+C;IAC7F,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;CAAG;AAgBL,mGAAmG;AACnG,eAAO,MAAM,IAAI,EAAE,WAAW,CAC5B,cAAc,EACd,YAAY,CAAC,MAAM,EACnB,mBAAmB,EACjB,YAAY,CAAC,0BAA0B,GACvC,YAAY,CAAC,oBAAoB,GACjC,YAAY,CAAC,oBAAoB,GACjC,0BAA0B,CAsB7B,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;CAAwB,CAAC;AAE9C,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"org-actions-secrets.d.ts","sourceRoot":"","sources":["../../src/forgejo/org-actions-secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,YAAY,MAAM,uCAAuC,CAAC;AAEtE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,WAAW,EAAmB,MAAM,eAAe,CAAC;AAG5F,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAiB,SAAQ,QAAQ,CAChD,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,KAAK,EACL,mBAAmB,CACpB;CAAG;AAEJ,eAAO,MAAM,gBAAgB,mDAAkD,CAAC;;;;AAEhF,4GAA4G;AAC5G,qBAAa,0BAA2B,SAAQ,gCAA+C;IAC7F,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;CAAG;AAgBL,mGAAmG;AACnG,eAAO,MAAM,IAAI,EAAE,WAAW,CAC5B,cAAc,EACd,YAAY,CAAC,MAAM,EACnB,mBAAmB,EACjB,YAAY,CAAC,0BAA0B,GACvC,YAAY,CAAC,oBAAoB,GACjC,YAAY,CAAC,oBAAoB,GACjC,0BAA0B,CAsB7B,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;CAAwB,CAAC;AAE9C,eAAO,MAAM,wBAAwB,6HACsD,CAAC"}
|
|
@@ -51,7 +51,7 @@ export declare const handlers: {
|
|
|
51
51
|
list: () => Effect.Effect<never[], never, never>;
|
|
52
52
|
read: ({ olds }: {
|
|
53
53
|
olds: OrgLabelProps;
|
|
54
|
-
}) => Effect.Effect<OrgLabelAttributes | undefined, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").ConfigError | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/
|
|
54
|
+
}) => Effect.Effect<OrgLabelAttributes | undefined, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").ConfigError | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | organization.NotFound | import("@distilled.cloud/caddy").ServiceUnavailable | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/forgejo/Errors").UnknownForgejoError | organization.UnprocessableEntity, import("effect/http/HttpClient").HttpClient>;
|
|
55
55
|
diff: ({ news, output }: {
|
|
56
56
|
news: import("alchemy").Input<OrgLabelProps>;
|
|
57
57
|
output: OrgLabelAttributes | undefined;
|
|
@@ -61,13 +61,13 @@ export declare const handlers: {
|
|
|
61
61
|
readonly action: 'noop';
|
|
62
62
|
} | {
|
|
63
63
|
readonly action: 'replace';
|
|
64
|
-
} | undefined, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").ConfigError | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/
|
|
64
|
+
} | undefined, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").ConfigError | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | organization.NotFound | import("@distilled.cloud/caddy").ServiceUnavailable | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/forgejo/Errors").UnknownForgejoError | organization.UnprocessableEntity, import("effect/http/HttpClient").HttpClient>;
|
|
65
65
|
reconcile: ({ news }: {
|
|
66
66
|
news: OrgLabelProps;
|
|
67
|
-
}) => Effect.Effect<OrgLabelAttributes, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").ConfigError | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/
|
|
67
|
+
}) => Effect.Effect<OrgLabelAttributes, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").ConfigError | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | organization.NotFound | import("@distilled.cloud/caddy").ServiceUnavailable | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/forgejo/Errors").UnknownForgejoError | organization.UnprocessableEntity, import("effect/http/HttpClient").HttpClient>;
|
|
68
68
|
delete: ({ olds }: {
|
|
69
69
|
olds: OrgLabelProps;
|
|
70
|
-
}) => Effect.Effect<void, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").ConfigError | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/
|
|
70
|
+
}) => Effect.Effect<void, import("@distilled.cloud/caddy").BadGateway | import("@distilled.cloud/caddy").ConfigError | import("@distilled.cloud/forgejo/Errors").ForgejoParseError | import("@distilled.cloud/caddy").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/caddy").InternalServerError | organization.NotFound | import("@distilled.cloud/caddy").ServiceUnavailable | import("@distilled.cloud/caddy").TooManyRequests | import("@distilled.cloud/caddy").Unauthorized | import("@distilled.cloud/forgejo/Errors").UnknownForgejoError | organization.UnprocessableEntity, import("effect/http/HttpClient").HttpClient>;
|
|
71
71
|
};
|
|
72
|
-
export declare const ForgejoOrgLabelProvider: () => import("effect/Layer").Layer<Provider.Provider<ForgejoOrgLabel>, never, import("effect/
|
|
72
|
+
export declare const ForgejoOrgLabelProvider: () => import("effect/Layer").Layer<Provider.Provider<ForgejoOrgLabel>, never, import("effect/http/HttpClient").HttpClient>;
|
|
73
73
|
//# sourceMappingURL=org-label.d.ts.map
|