Registry Config
Registry Config protocol schemas
Registry Configuration Protocol
Defines the configuration for the ObjectStack Registry Service. Includes federation, synchronization, and storage settings.
Source: packages/spec/src/system/registry-config.zod.ts
TypeScript Usage
import { RegistryConfigSchema, RegistrySyncPolicySchema, RegistryUpstreamSchema } from '@objectstack/spec/system';
import type { RegistryConfig, RegistrySyncPolicy, RegistryUpstream } from '@objectstack/spec/system';
// Validate data
const result = RegistryConfigSchema.parse(data);RegistryConfig
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| type | Enum<'public' | 'private' | 'hybrid'> | ✅ | Registry deployment type |
| upstream | { url: string; syncPolicy: Enum<'manual' | 'auto' | 'proxy'>; syncInterval?: integer; auth?: object; … }[] | optional | Upstream registries to sync from or proxy to |
| scope | string[] | optional | npm-style scopes managed by this registry (e.g., @my-corp, @enterprise) |
| defaultScope | string | optional | Default scope prefix for new plugins |
| storage | { backend: Enum<'local' | 's3' | 'gcs' | 'azure-blob' | 'oss'>; path?: string; credentials?: Record<string, any> } | optional | |
| visibility | Enum<'public' | 'private' | 'internal'> | ✅ | Who can access this registry |
| accessControl | { requireAuthForRead: boolean; requireAuthForWrite: boolean; allowedPrincipals?: string[] } | optional | |
| cache | { enabled: boolean; ttl: integer; maxSize?: integer } | optional | |
| mirrors | { url: string; priority: integer }[] | optional | Mirror registries for redundancy |
RegistrySyncPolicy
Registry synchronization strategy
Allowed Values
manualautoproxy
RegistryUpstream
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| url | string | ✅ | Upstream registry endpoint |
| syncPolicy | Enum<'manual' | 'auto' | 'proxy'> | ✅ | Registry synchronization strategy |
| syncInterval | integer | optional | Auto-sync interval in seconds |
| auth | { type: Enum<'none' | 'basic' | 'bearer' | 'api-key' | 'oauth2'>; username?: string; password?: string; token?: string; … } | optional | |
| tls | { enabled: boolean; verifyCertificate: boolean; certificate?: string; privateKey?: string } | optional | |
| timeout | integer | ✅ | Request timeout in milliseconds |
| retry | { maxAttempts: integer; backoff: Enum<'fixed' | 'linear' | 'exponential'> } | optional |