docs: implement Phase 2 - API documentation with TypeDoc
Set up TypeDoc to auto-generate comprehensive API reference documentation from TypeScript source code. Changes: - Installed typedoc and typedoc-plugin-markdown (v0.2.0 plugins) - Created typedoc.json configuration with 9 entry points - Added docs:api and docs:watch npm scripts - Fixed test file imports (validateNamespace → isValidNamespace) - Updated tsconfig.json to exclude test files from compilation - Generated markdown API documentation in docs/api-reference/generated/ Generated API documentation: - 9 modules documented (lib/, hooks/, types/) - lib/crypto - 14 encryption/certificate functions - lib/controller - 5 Kubernetes API functions - lib/validators - 6 validation functions - lib/retry - Exponential backoff utilities - lib/rbac - RBAC permission checking - types - Result types, branded types, interfaces - hooks/useSealedSecretEncryption - Encryption React hook - hooks/usePermissions - RBAC React hooks - hooks/useControllerHealth - Health monitoring hook Benefits: - Auto-generated from TypeScript source (stays in sync) - Markdown format for easy integration - Type signatures and JSDoc included - Function parameters and return types documented - Links between related types and functions Phase 2 deliverables (2-3 days estimated, completed in 1 session): ✅ TypeDoc installed and configured ✅ Entry points identified for all core modules ✅ API documentation generated (9 modules, 40+ functions) ✅ npm scripts added for docs generation ✅ Test files excluded from documentation Next: Phase 3 - User tutorials and guides Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
[**Headlamp Sealed Secrets API v0.2.0**](../../../README.md)
|
||||
|
||||
***
|
||||
|
||||
[Headlamp Sealed Secrets API](../../../README.md) / [lib/validators](../README.md) / isNonEmpty
|
||||
|
||||
# Function: isNonEmpty()
|
||||
|
||||
> **isNonEmpty**(`value`): `boolean`
|
||||
|
||||
Defined in: [src/lib/validators.ts:112](https://github.com/cpfarhood/headlamp-sealed-secrets-plugin/blob/bdf19cd3bf5a2d679b7ba949108fe9df1843c5f4/headlamp-sealed-secrets/src/lib/validators.ts#L112)
|
||||
|
||||
Validate that a value is not empty
|
||||
|
||||
## Parameters
|
||||
|
||||
### value
|
||||
|
||||
`string`
|
||||
|
||||
Value to check
|
||||
|
||||
## Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
true if value is non-empty string
|
||||
@@ -0,0 +1,27 @@
|
||||
[**Headlamp Sealed Secrets API v0.2.0**](../../../README.md)
|
||||
|
||||
***
|
||||
|
||||
[Headlamp Sealed Secrets API](../../../README.md) / [lib/validators](../README.md) / isSealedSecret
|
||||
|
||||
# Function: isSealedSecret()
|
||||
|
||||
> **isSealedSecret**(`obj`): `obj is SealedSecret`
|
||||
|
||||
Defined in: [src/lib/validators.ts:17](https://github.com/cpfarhood/headlamp-sealed-secrets-plugin/blob/bdf19cd3bf5a2d679b7ba949108fe9df1843c5f4/headlamp-sealed-secrets/src/lib/validators.ts#L17)
|
||||
|
||||
Runtime type guard for SealedSecret
|
||||
|
||||
## Parameters
|
||||
|
||||
### obj
|
||||
|
||||
`any`
|
||||
|
||||
Object to check
|
||||
|
||||
## Returns
|
||||
|
||||
`obj is SealedSecret`
|
||||
|
||||
true if obj is a SealedSecret instance
|
||||
@@ -0,0 +1,27 @@
|
||||
[**Headlamp Sealed Secrets API v0.2.0**](../../../README.md)
|
||||
|
||||
***
|
||||
|
||||
[Headlamp Sealed Secrets API](../../../README.md) / [lib/validators](../README.md) / isSealedSecretScope
|
||||
|
||||
# Function: isSealedSecretScope()
|
||||
|
||||
> **isSealedSecretScope**(`value`): `value is SealedSecretScope`
|
||||
|
||||
Defined in: [src/lib/validators.ts:49](https://github.com/cpfarhood/headlamp-sealed-secrets-plugin/blob/bdf19cd3bf5a2d679b7ba949108fe9df1843c5f4/headlamp-sealed-secrets/src/lib/validators.ts#L49)
|
||||
|
||||
Validate scope value
|
||||
|
||||
## Parameters
|
||||
|
||||
### value
|
||||
|
||||
`any`
|
||||
|
||||
Value to check
|
||||
|
||||
## Returns
|
||||
|
||||
`value is SealedSecretScope`
|
||||
|
||||
true if value is a valid SealedSecretScope
|
||||
@@ -0,0 +1,27 @@
|
||||
[**Headlamp Sealed Secrets API v0.2.0**](../../../README.md)
|
||||
|
||||
***
|
||||
|
||||
[Headlamp Sealed Secrets API](../../../README.md) / [lib/validators](../README.md) / isValidK8sKey
|
||||
|
||||
# Function: isValidK8sKey()
|
||||
|
||||
> **isValidK8sKey**(`key`): `boolean`
|
||||
|
||||
Defined in: [src/lib/validators.ts:79](https://github.com/cpfarhood/headlamp-sealed-secrets-plugin/blob/bdf19cd3bf5a2d679b7ba949108fe9df1843c5f4/headlamp-sealed-secrets/src/lib/validators.ts#L79)
|
||||
|
||||
Validate Kubernetes label/annotation key
|
||||
|
||||
## Parameters
|
||||
|
||||
### key
|
||||
|
||||
`string`
|
||||
|
||||
Key to validate
|
||||
|
||||
## Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
true if valid Kubernetes key
|
||||
@@ -0,0 +1,32 @@
|
||||
[**Headlamp Sealed Secrets API v0.2.0**](../../../README.md)
|
||||
|
||||
***
|
||||
|
||||
[Headlamp Sealed Secrets API](../../../README.md) / [lib/validators](../README.md) / isValidK8sName
|
||||
|
||||
# Function: isValidK8sName()
|
||||
|
||||
> **isValidK8sName**(`name`): `boolean`
|
||||
|
||||
Defined in: [src/lib/validators.ts:64](https://github.com/cpfarhood/headlamp-sealed-secrets-plugin/blob/bdf19cd3bf5a2d679b7ba949108fe9df1843c5f4/headlamp-sealed-secrets/src/lib/validators.ts#L64)
|
||||
|
||||
Validate Kubernetes resource name
|
||||
|
||||
Must match DNS-1123 subdomain:
|
||||
- lowercase alphanumeric characters, '-' or '.'
|
||||
- start and end with alphanumeric character
|
||||
- max 253 characters
|
||||
|
||||
## Parameters
|
||||
|
||||
### name
|
||||
|
||||
`string`
|
||||
|
||||
Name to validate
|
||||
|
||||
## Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
true if valid Kubernetes resource name
|
||||
@@ -0,0 +1,29 @@
|
||||
[**Headlamp Sealed Secrets API v0.2.0**](../../../README.md)
|
||||
|
||||
***
|
||||
|
||||
[Headlamp Sealed Secrets API](../../../README.md) / [lib/validators](../README.md) / isValidNamespace
|
||||
|
||||
# Function: isValidNamespace()
|
||||
|
||||
> **isValidNamespace**(`namespace`): `boolean`
|
||||
|
||||
Defined in: [src/lib/validators.ts:124](https://github.com/cpfarhood/headlamp-sealed-secrets-plugin/blob/bdf19cd3bf5a2d679b7ba949108fe9df1843c5f4/headlamp-sealed-secrets/src/lib/validators.ts#L124)
|
||||
|
||||
Validate namespace name
|
||||
|
||||
Same rules as resource names
|
||||
|
||||
## Parameters
|
||||
|
||||
### namespace
|
||||
|
||||
`string`
|
||||
|
||||
Namespace to validate
|
||||
|
||||
## Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
true if valid namespace name
|
||||
@@ -0,0 +1,29 @@
|
||||
[**Headlamp Sealed Secrets API v0.2.0**](../../../README.md)
|
||||
|
||||
***
|
||||
|
||||
[Headlamp Sealed Secrets API](../../../README.md) / [lib/validators](../README.md) / isValidPEM
|
||||
|
||||
# Function: isValidPEM()
|
||||
|
||||
> **isValidPEM**(`value`): `boolean`
|
||||
|
||||
Defined in: [src/lib/validators.ts:96](https://github.com/cpfarhood/headlamp-sealed-secrets-plugin/blob/bdf19cd3bf5a2d679b7ba949108fe9df1843c5f4/headlamp-sealed-secrets/src/lib/validators.ts#L96)
|
||||
|
||||
Validate PEM certificate format
|
||||
|
||||
Checks for BEGIN/END CERTIFICATE markers and basic structure
|
||||
|
||||
## Parameters
|
||||
|
||||
### value
|
||||
|
||||
`string`
|
||||
|
||||
String to validate
|
||||
|
||||
## Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
true if valid PEM format
|
||||
@@ -0,0 +1,27 @@
|
||||
[**Headlamp Sealed Secrets API v0.2.0**](../../../README.md)
|
||||
|
||||
***
|
||||
|
||||
[Headlamp Sealed Secrets API](../../../README.md) / [lib/validators](../README.md) / validatePEMCertificate
|
||||
|
||||
# Function: validatePEMCertificate()
|
||||
|
||||
> **validatePEMCertificate**(`pem`): [`ValidationResult`](../interfaces/ValidationResult.md)
|
||||
|
||||
Defined in: [src/lib/validators.ts:212](https://github.com/cpfarhood/headlamp-sealed-secrets-plugin/blob/bdf19cd3bf5a2d679b7ba949108fe9df1843c5f4/headlamp-sealed-secrets/src/lib/validators.ts#L212)
|
||||
|
||||
Validate PEM certificate with detailed error message
|
||||
|
||||
## Parameters
|
||||
|
||||
### pem
|
||||
|
||||
`string`
|
||||
|
||||
PEM certificate to validate
|
||||
|
||||
## Returns
|
||||
|
||||
[`ValidationResult`](../interfaces/ValidationResult.md)
|
||||
|
||||
Validation result with error message if invalid
|
||||
@@ -0,0 +1,37 @@
|
||||
[**Headlamp Sealed Secrets API v0.2.0**](../../../README.md)
|
||||
|
||||
***
|
||||
|
||||
[Headlamp Sealed Secrets API](../../../README.md) / [lib/validators](../README.md) / validatePluginConfig
|
||||
|
||||
# Function: validatePluginConfig()
|
||||
|
||||
> **validatePluginConfig**(`config`): [`ValidationResult`](../interfaces/ValidationResult.md)
|
||||
|
||||
Defined in: [src/lib/validators.ts:233](https://github.com/cpfarhood/headlamp-sealed-secrets-plugin/blob/bdf19cd3bf5a2d679b7ba949108fe9df1843c5f4/headlamp-sealed-secrets/src/lib/validators.ts#L233)
|
||||
|
||||
Validate plugin configuration
|
||||
|
||||
## Parameters
|
||||
|
||||
### config
|
||||
|
||||
Configuration to validate
|
||||
|
||||
#### controllerName?
|
||||
|
||||
`string`
|
||||
|
||||
#### controllerNamespace?
|
||||
|
||||
`string`
|
||||
|
||||
#### controllerPort?
|
||||
|
||||
`number`
|
||||
|
||||
## Returns
|
||||
|
||||
[`ValidationResult`](../interfaces/ValidationResult.md)
|
||||
|
||||
Validation result with error message if invalid
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
[**Headlamp Sealed Secrets API v0.2.0**](../../../README.md)
|
||||
|
||||
***
|
||||
|
||||
[Headlamp Sealed Secrets API](../../../README.md) / [lib/validators](../README.md) / validateSealedSecretInterface
|
||||
|
||||
# Function: validateSealedSecretInterface()
|
||||
|
||||
> **validateSealedSecretInterface**(`obj`): `obj is SealedSecretInterface`
|
||||
|
||||
Defined in: [src/lib/validators.ts:32](https://github.com/cpfarhood/headlamp-sealed-secrets-plugin/blob/bdf19cd3bf5a2d679b7ba949108fe9df1843c5f4/headlamp-sealed-secrets/src/lib/validators.ts#L32)
|
||||
|
||||
Validate SealedSecret structure
|
||||
|
||||
## Parameters
|
||||
|
||||
### obj
|
||||
|
||||
`any`
|
||||
|
||||
Object to validate
|
||||
|
||||
## Returns
|
||||
|
||||
`obj is SealedSecretInterface`
|
||||
|
||||
true if obj has valid SealedSecret structure
|
||||
@@ -0,0 +1,27 @@
|
||||
[**Headlamp Sealed Secrets API v0.2.0**](../../../README.md)
|
||||
|
||||
***
|
||||
|
||||
[Headlamp Sealed Secrets API](../../../README.md) / [lib/validators](../README.md) / validateSecretKey
|
||||
|
||||
# Function: validateSecretKey()
|
||||
|
||||
> **validateSecretKey**(`key`): [`ValidationResult`](../interfaces/ValidationResult.md)
|
||||
|
||||
Defined in: [src/lib/validators.ts:168](https://github.com/cpfarhood/headlamp-sealed-secrets-plugin/blob/bdf19cd3bf5a2d679b7ba949108fe9df1843c5f4/headlamp-sealed-secrets/src/lib/validators.ts#L168)
|
||||
|
||||
Validate secret key name with detailed error message
|
||||
|
||||
## Parameters
|
||||
|
||||
### key
|
||||
|
||||
`string`
|
||||
|
||||
Key name to validate
|
||||
|
||||
## Returns
|
||||
|
||||
[`ValidationResult`](../interfaces/ValidationResult.md)
|
||||
|
||||
Validation result with error message if invalid
|
||||
@@ -0,0 +1,27 @@
|
||||
[**Headlamp Sealed Secrets API v0.2.0**](../../../README.md)
|
||||
|
||||
***
|
||||
|
||||
[Headlamp Sealed Secrets API](../../../README.md) / [lib/validators](../README.md) / validateSecretName
|
||||
|
||||
# Function: validateSecretName()
|
||||
|
||||
> **validateSecretName**(`name`): [`ValidationResult`](../interfaces/ValidationResult.md)
|
||||
|
||||
Defined in: [src/lib/validators.ts:142](https://github.com/cpfarhood/headlamp-sealed-secrets-plugin/blob/bdf19cd3bf5a2d679b7ba949108fe9df1843c5f4/headlamp-sealed-secrets/src/lib/validators.ts#L142)
|
||||
|
||||
Validate secret name with detailed error message
|
||||
|
||||
## Parameters
|
||||
|
||||
### name
|
||||
|
||||
`string`
|
||||
|
||||
Secret name to validate
|
||||
|
||||
## Returns
|
||||
|
||||
[`ValidationResult`](../interfaces/ValidationResult.md)
|
||||
|
||||
Validation result with error message if invalid
|
||||
@@ -0,0 +1,27 @@
|
||||
[**Headlamp Sealed Secrets API v0.2.0**](../../../README.md)
|
||||
|
||||
***
|
||||
|
||||
[Headlamp Sealed Secrets API](../../../README.md) / [lib/validators](../README.md) / validateSecretValue
|
||||
|
||||
# Function: validateSecretValue()
|
||||
|
||||
> **validateSecretValue**(`value`): [`ValidationResult`](../interfaces/ValidationResult.md)
|
||||
|
||||
Defined in: [src/lib/validators.ts:193](https://github.com/cpfarhood/headlamp-sealed-secrets-plugin/blob/bdf19cd3bf5a2d679b7ba949108fe9df1843c5f4/headlamp-sealed-secrets/src/lib/validators.ts#L193)
|
||||
|
||||
Validate secret value (plaintext)
|
||||
|
||||
## Parameters
|
||||
|
||||
### value
|
||||
|
||||
`string`
|
||||
|
||||
Secret value to validate
|
||||
|
||||
## Returns
|
||||
|
||||
[`ValidationResult`](../interfaces/ValidationResult.md)
|
||||
|
||||
Validation result with error message if invalid
|
||||
Reference in New Issue
Block a user