@alienplatform/core 1.14.1 → 2.0.1
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/dist/index.d.ts +449 -321
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6930 -4
- package/dist/index.js.map +1 -1
- package/package.json +4 -5
- package/.turbo/turbo-build.log +0 -29
- package/AGENTS.md +0 -90
- package/dist/stack.js +0 -6847
- package/dist/stack.js.map +0 -1
- package/dist/tests/index.d.ts +0 -48
- package/dist/tests/index.d.ts.map +0 -1
- package/dist/tests/index.js +0 -9
- package/dist/tests/index.js.map +0 -1
- package/kubb.config.ts +0 -44
- package/src/__tests__/__snapshots__/stack.test.ts.snap +0 -354
- package/src/__tests__/error.test.ts +0 -672
- package/src/__tests__/stack.test.ts +0 -537
- package/src/artifact-registry.ts +0 -64
- package/src/build.ts +0 -105
- package/src/common-errors.ts +0 -55
- package/src/compute-cluster.ts +0 -213
- package/src/container.ts +0 -423
- package/src/daemon.ts +0 -259
- package/src/error.ts +0 -665
- package/src/generated/index.ts +0 -706
- package/src/generated/schemas/agentStatus.json +0 -1
- package/src/generated/schemas/alienError.json +0 -1
- package/src/generated/schemas/alienEvent.json +0 -1
- package/src/generated/schemas/architecture.json +0 -1
- package/src/generated/schemas/artifactRegistry.json +0 -1
- package/src/generated/schemas/artifactRegistryHeartbeatData.json +0 -1
- package/src/generated/schemas/artifactRegistryHeartbeatStatus.json +0 -1
- package/src/generated/schemas/artifactRegistryOutputs.json +0 -1
- package/src/generated/schemas/auroraPostgresHeartbeatData.json +0 -1
- package/src/generated/schemas/awsArtifactRegistryImportData.json +0 -1
- package/src/generated/schemas/awsBuildImportData.json +0 -1
- package/src/generated/schemas/awsCodeBuildHeartbeatData.json +0 -1
- package/src/generated/schemas/awsComputeClusterHeartbeatData.json +0 -1
- package/src/generated/schemas/awsComputeClusterImportData.json +0 -1
- package/src/generated/schemas/awsCustomCertificateConfig.json +0 -1
- package/src/generated/schemas/awsDaemonHeartbeatData.json +0 -1
- package/src/generated/schemas/awsDynamoDbKeySchemaElement.json +0 -1
- package/src/generated/schemas/awsDynamoDbKvHeartbeatData.json +0 -1
- package/src/generated/schemas/awsEcrArtifactRegistryHeartbeatData.json +0 -1
- package/src/generated/schemas/awsEcrRepositoryHeartbeatData.json +0 -1
- package/src/generated/schemas/awsIamRoleServiceAccountHeartbeatData.json +0 -1
- package/src/generated/schemas/awsKvImportData.json +0 -1
- package/src/generated/schemas/awsLambdaWorkerHeartbeatData.json +0 -1
- package/src/generated/schemas/awsManagementConfig.json +0 -1
- package/src/generated/schemas/awsNetworkImportData.json +0 -1
- package/src/generated/schemas/awsParameterStoreVaultHeartbeatData.json +0 -1
- package/src/generated/schemas/awsPermissionEffect.json +0 -1
- package/src/generated/schemas/awsPlatformPermission.json +0 -1
- package/src/generated/schemas/awsPostgresImportData.json +0 -1
- package/src/generated/schemas/awsQueueImportData.json +0 -1
- package/src/generated/schemas/awsRemoteStackManagementHeartbeatData.json +0 -1
- package/src/generated/schemas/awsRemoteStackManagementImportData.json +0 -1
- package/src/generated/schemas/awsS3StorageHeartbeatData.json +0 -1
- package/src/generated/schemas/awsServiceAccountImportData.json +0 -1
- package/src/generated/schemas/awsSqsQueueHeartbeatData.json +0 -1
- package/src/generated/schemas/awsStorageImportData.json +0 -1
- package/src/generated/schemas/awsVaultImportData.json +0 -1
- package/src/generated/schemas/awsVpcNetworkHeartbeatData.json +0 -1
- package/src/generated/schemas/awsWorkerImportData.json +0 -1
- package/src/generated/schemas/azureArtifactRegistryImportData.json +0 -1
- package/src/generated/schemas/azureBlobStorageHeartbeatData.json +0 -1
- package/src/generated/schemas/azureBuildImportData.json +0 -1
- package/src/generated/schemas/azureComputeClusterHeartbeatData.json +0 -1
- package/src/generated/schemas/azureComputeClusterImportData.json +0 -1
- package/src/generated/schemas/azureContainerAppsBuildHeartbeatData.json +0 -1
- package/src/generated/schemas/azureContainerAppsEnvironmentHeartbeatData.json +0 -1
- package/src/generated/schemas/azureContainerAppsEnvironmentHeartbeatStatus.json +0 -1
- package/src/generated/schemas/azureContainerAppsEnvironmentImportData.json +0 -1
- package/src/generated/schemas/azureContainerAppsEnvironmentWorkloadProfile.json +0 -1
- package/src/generated/schemas/azureContainerAppsWorkerHeartbeatData.json +0 -1
- package/src/generated/schemas/azureContainerRegistryHeartbeatData.json +0 -1
- package/src/generated/schemas/azureCustomCertificateConfig.json +0 -1
- package/src/generated/schemas/azureDaemonHeartbeatData.json +0 -1
- package/src/generated/schemas/azureFlexibleServerPostgresHeartbeatData.json +0 -1
- package/src/generated/schemas/azureFlexibleServerPostgresImportData.json +0 -1
- package/src/generated/schemas/azureKeyVaultHeartbeatData.json +0 -1
- package/src/generated/schemas/azureKvImportData.json +0 -1
- package/src/generated/schemas/azureManagedIdentityServiceAccountHeartbeatData.json +0 -1
- package/src/generated/schemas/azureManagementConfig.json +0 -1
- package/src/generated/schemas/azureNetworkImportData.json +0 -1
- package/src/generated/schemas/azurePlatformPermission.json +0 -1
- package/src/generated/schemas/azureQueueImportData.json +0 -1
- package/src/generated/schemas/azureRemoteStackManagementHeartbeatData.json +0 -1
- package/src/generated/schemas/azureRemoteStackManagementImportData.json +0 -1
- package/src/generated/schemas/azureResourceGroupHeartbeatData.json +0 -1
- package/src/generated/schemas/azureResourceGroupHeartbeatStatus.json +0 -1
- package/src/generated/schemas/azureResourceGroupImportData.json +0 -1
- package/src/generated/schemas/azureResourceProviderActivationHeartbeatData.json +0 -1
- package/src/generated/schemas/azureServiceAccountImportData.json +0 -1
- package/src/generated/schemas/azureServiceActivationImportData.json +0 -1
- package/src/generated/schemas/azureServiceBusNamespaceHeartbeatData.json +0 -1
- package/src/generated/schemas/azureServiceBusNamespaceImportData.json +0 -1
- package/src/generated/schemas/azureServiceBusQueueHeartbeatData.json +0 -1
- package/src/generated/schemas/azureStorageAccountEndpoints.json +0 -1
- package/src/generated/schemas/azureStorageAccountHeartbeatData.json +0 -1
- package/src/generated/schemas/azureStorageAccountImportData.json +0 -1
- package/src/generated/schemas/azureStorageImportData.json +0 -1
- package/src/generated/schemas/azureTableKvHeartbeatData.json +0 -1
- package/src/generated/schemas/azureVaultImportData.json +0 -1
- package/src/generated/schemas/azureVnetNetworkHeartbeatData.json +0 -1
- package/src/generated/schemas/azureWorkerImportData.json +0 -1
- package/src/generated/schemas/baseResource.json +0 -1
- package/src/generated/schemas/baseResourceOutputs.json +0 -1
- package/src/generated/schemas/bindingConfigurationAwsBindingSpec.json +0 -1
- package/src/generated/schemas/bindingConfigurationAzureBindingSpec.json +0 -1
- package/src/generated/schemas/bindingConfigurationGcpBindingSpec.json +0 -1
- package/src/generated/schemas/bodySpec.json +0 -1
- package/src/generated/schemas/build.json +0 -1
- package/src/generated/schemas/buildConfig.json +0 -1
- package/src/generated/schemas/buildHeartbeatData.json +0 -1
- package/src/generated/schemas/buildHeartbeatStatus.json +0 -1
- package/src/generated/schemas/buildOutputs.json +0 -1
- package/src/generated/schemas/buildStatus.json +0 -1
- package/src/generated/schemas/capacityGroup.json +0 -1
- package/src/generated/schemas/capacityGroupScalePolicy.json +0 -1
- package/src/generated/schemas/commandResponse.json +0 -1
- package/src/generated/schemas/commandState.json +0 -1
- package/src/generated/schemas/commandStatusResponse.json +0 -1
- package/src/generated/schemas/computeCapacityBlocker.json +0 -1
- package/src/generated/schemas/computeCapacityBlockerCategory.json +0 -1
- package/src/generated/schemas/computeCapacityGroupStatus.json +0 -1
- package/src/generated/schemas/computeCapacityRecommendation.json +0 -1
- package/src/generated/schemas/computeChoiceRange.json +0 -1
- package/src/generated/schemas/computeCluster.json +0 -1
- package/src/generated/schemas/computeClusterHeartbeatData.json +0 -1
- package/src/generated/schemas/computeClusterHeartbeatStatus.json +0 -1
- package/src/generated/schemas/computeDrainBlocker.json +0 -1
- package/src/generated/schemas/computeDrainProgress.json +0 -1
- package/src/generated/schemas/computeDrainProgressStatus.json +0 -1
- package/src/generated/schemas/computePoolSelection.json +0 -1
- package/src/generated/schemas/computeSettings.json +0 -1
- package/src/generated/schemas/computeType.json +0 -1
- package/src/generated/schemas/container.json +0 -1
- package/src/generated/schemas/containerAutoscaling.json +0 -1
- package/src/generated/schemas/containerCode.json +0 -1
- package/src/generated/schemas/containerGpuSpec.json +0 -1
- package/src/generated/schemas/containerHeartbeatData.json +0 -1
- package/src/generated/schemas/containerOutputs.json +0 -1
- package/src/generated/schemas/containerPort.json +0 -1
- package/src/generated/schemas/containerStatus.json +0 -1
- package/src/generated/schemas/createCommandRequest.json +0 -1
- package/src/generated/schemas/createCommandResponse.json +0 -1
- package/src/generated/schemas/customCertificateConfig.json +0 -1
- package/src/generated/schemas/customDomainConfig.json +0 -1
- package/src/generated/schemas/daemon.json +0 -1
- package/src/generated/schemas/daemonCode.json +0 -1
- package/src/generated/schemas/daemonHeartbeatData.json +0 -1
- package/src/generated/schemas/daemonOutputs.json +0 -1
- package/src/generated/schemas/daemonRuntime.json +0 -1
- package/src/generated/schemas/daemonRuntimeMount.json +0 -1
- package/src/generated/schemas/deploymentModel.json +0 -1
- package/src/generated/schemas/deploymentStatus.json +0 -1
- package/src/generated/schemas/devResourceInfo.json +0 -1
- package/src/generated/schemas/devStatus.json +0 -1
- package/src/generated/schemas/devStatusState.json +0 -1
- package/src/generated/schemas/domainSettings.json +0 -1
- package/src/generated/schemas/envelope.json +0 -1
- package/src/generated/schemas/eventChange.json +0 -1
- package/src/generated/schemas/eventState.json +0 -1
- package/src/generated/schemas/exposeProtocol.json +0 -1
- package/src/generated/schemas/gcpArtifactRegistryHeartbeatData.json +0 -1
- package/src/generated/schemas/gcpArtifactRegistryImportData.json +0 -1
- package/src/generated/schemas/gcpBuildImportData.json +0 -1
- package/src/generated/schemas/gcpCloudBuildHeartbeatData.json +0 -1
- package/src/generated/schemas/gcpCloudRunWorkerHeartbeatData.json +0 -1
- package/src/generated/schemas/gcpCloudSqlPostgresHeartbeatData.json +0 -1
- package/src/generated/schemas/gcpCloudStorageHeartbeatData.json +0 -1
- package/src/generated/schemas/gcpComputeClusterHeartbeatData.json +0 -1
- package/src/generated/schemas/gcpComputeClusterImportData.json +0 -1
- package/src/generated/schemas/gcpCondition.json +0 -1
- package/src/generated/schemas/gcpCustomCertificateConfig.json +0 -1
- package/src/generated/schemas/gcpDaemonHeartbeatData.json +0 -1
- package/src/generated/schemas/gcpFirestoreKvHeartbeatData.json +0 -1
- package/src/generated/schemas/gcpKvImportData.json +0 -1
- package/src/generated/schemas/gcpManagementConfig.json +0 -1
- package/src/generated/schemas/gcpNetworkImportData.json +0 -1
- package/src/generated/schemas/gcpPlatformPermission.json +0 -1
- package/src/generated/schemas/gcpPostgresImportData.json +0 -1
- package/src/generated/schemas/gcpPubSubQueueHeartbeatData.json +0 -1
- package/src/generated/schemas/gcpQueueImportData.json +0 -1
- package/src/generated/schemas/gcpRemoteStackManagementHeartbeatData.json +0 -1
- package/src/generated/schemas/gcpRemoteStackManagementImportData.json +0 -1
- package/src/generated/schemas/gcpSecretManagerVaultHeartbeatData.json +0 -1
- package/src/generated/schemas/gcpServiceAccountHeartbeatData.json +0 -1
- package/src/generated/schemas/gcpServiceAccountImportData.json +0 -1
- package/src/generated/schemas/gcpServiceActivationImportData.json +0 -1
- package/src/generated/schemas/gcpServiceUsageActivationHeartbeatData.json +0 -1
- package/src/generated/schemas/gcpStorageImportData.json +0 -1
- package/src/generated/schemas/gcpVaultImportData.json +0 -1
- package/src/generated/schemas/gcpVpcNetworkHeartbeatData.json +0 -1
- package/src/generated/schemas/gcpWorkerImportData.json +0 -1
- package/src/generated/schemas/gpuSpec.json +0 -1
- package/src/generated/schemas/healthCheck.json +0 -1
- package/src/generated/schemas/heartbeatBackend.json +0 -1
- package/src/generated/schemas/heartbeatCollectionIssue.json +0 -1
- package/src/generated/schemas/heartbeatCollectionIssueReason.json +0 -1
- package/src/generated/schemas/heartbeatIssueSeverity.json +0 -1
- package/src/generated/schemas/heartbeatsMode.json +0 -1
- package/src/generated/schemas/horizonContainerHeartbeatData.json +0 -1
- package/src/generated/schemas/horizonWorkloadSchedulingMode.json +0 -1
- package/src/generated/schemas/httpMethod.json +0 -1
- package/src/generated/schemas/importSourceKind.json +0 -1
- package/src/generated/schemas/importedResource.json +0 -1
- package/src/generated/schemas/kubernetesBuildHeartbeatData.json +0 -1
- package/src/generated/schemas/kubernetesCertificateMode.json +0 -1
- package/src/generated/schemas/kubernetesCloudReference.json +0 -1
- package/src/generated/schemas/kubernetesClusterHeartbeatData.json +0 -1
- package/src/generated/schemas/kubernetesClusterNodeStatus.json +0 -1
- package/src/generated/schemas/kubernetesClusterOwnership.json +0 -1
- package/src/generated/schemas/kubernetesClusterSettings.json +0 -1
- package/src/generated/schemas/kubernetesContainerHeartbeatData.json +0 -1
- package/src/generated/schemas/kubernetesCustomCertificateConfig.json +0 -1
- package/src/generated/schemas/kubernetesDaemonHeartbeatData.json +0 -1
- package/src/generated/schemas/kubernetesEventInvolvedObject.json +0 -1
- package/src/generated/schemas/kubernetesEventSnapshot.json +0 -1
- package/src/generated/schemas/kubernetesEventSource.json +0 -1
- package/src/generated/schemas/kubernetesExposureSettings.json +0 -1
- package/src/generated/schemas/kubernetesGatewayRouteProfile.json +0 -1
- package/src/generated/schemas/kubernetesIngressRouteProfile.json +0 -1
- package/src/generated/schemas/kubernetesNodeConditionStatus.json +0 -1
- package/src/generated/schemas/kubernetesNodeResources.json +0 -1
- package/src/generated/schemas/kubernetesNodeUsage.json +0 -1
- package/src/generated/schemas/kubernetesOwnerReference.json +0 -1
- package/src/generated/schemas/kubernetesPodRuntimeUnitStatus.json +0 -1
- package/src/generated/schemas/kubernetesRouteProfile.json +0 -1
- package/src/generated/schemas/kubernetesRouteProviderOptions.json +0 -1
- package/src/generated/schemas/kubernetesSecretVaultHeartbeatData.json +0 -1
- package/src/generated/schemas/kubernetesSettings.json +0 -1
- package/src/generated/schemas/kubernetesTlsSecretRef.json +0 -1
- package/src/generated/schemas/kubernetesWorkerHeartbeatData.json +0 -1
- package/src/generated/schemas/kubernetesWorkloadCondition.json +0 -1
- package/src/generated/schemas/kubernetesWorkloadKind.json +0 -1
- package/src/generated/schemas/kubernetesWorkloadStatus.json +0 -1
- package/src/generated/schemas/kv.json +0 -1
- package/src/generated/schemas/kvHeartbeatData.json +0 -1
- package/src/generated/schemas/kvHeartbeatStatus.json +0 -1
- package/src/generated/schemas/kvOutputs.json +0 -1
- package/src/generated/schemas/leaseInfo.json +0 -1
- package/src/generated/schemas/leaseRequest.json +0 -1
- package/src/generated/schemas/leaseResponse.json +0 -1
- package/src/generated/schemas/lifecycleRule.json +0 -1
- package/src/generated/schemas/loadBalancerEndpoint.json +0 -1
- package/src/generated/schemas/localArtifactRegistryHeartbeatData.json +0 -1
- package/src/generated/schemas/localComputeClusterHeartbeatData.json +0 -1
- package/src/generated/schemas/localContainerHeartbeatData.json +0 -1
- package/src/generated/schemas/localDaemonHeartbeatData.json +0 -1
- package/src/generated/schemas/localKvHeartbeatData.json +0 -1
- package/src/generated/schemas/localOperation.json +0 -1
- package/src/generated/schemas/localPostgresHeartbeatData.json +0 -1
- package/src/generated/schemas/localQueueHeartbeatData.json +0 -1
- package/src/generated/schemas/localRuntimeEventSnapshot.json +0 -1
- package/src/generated/schemas/localRuntimeEventSubject.json +0 -1
- package/src/generated/schemas/localRuntimeUnitKind.json +0 -1
- package/src/generated/schemas/localRuntimeUnitStatus.json +0 -1
- package/src/generated/schemas/localServiceAccountHeartbeatData.json +0 -1
- package/src/generated/schemas/localStorageHeartbeatData.json +0 -1
- package/src/generated/schemas/localVaultHeartbeatData.json +0 -1
- package/src/generated/schemas/localWorkerHeartbeatData.json +0 -1
- package/src/generated/schemas/machineProfile.json +0 -1
- package/src/generated/schemas/machinesComputeClusterHeartbeatData.json +0 -1
- package/src/generated/schemas/machinesComputeMachineStatus.json +0 -1
- package/src/generated/schemas/machinesDaemonHeartbeatData.json +0 -1
- package/src/generated/schemas/managedRuntimeEventInvolvedObject.json +0 -1
- package/src/generated/schemas/managedRuntimeEventSnapshot.json +0 -1
- package/src/generated/schemas/managedRuntimeEventSource.json +0 -1
- package/src/generated/schemas/managedRuntimeUnitStatus.json +0 -1
- package/src/generated/schemas/managementConfig.json +0 -1
- package/src/generated/schemas/managementPermissions.json +0 -1
- package/src/generated/schemas/messagePayload.json +0 -1
- package/src/generated/schemas/metricSample.json +0 -1
- package/src/generated/schemas/metricUnit.json +0 -1
- package/src/generated/schemas/monitoringConfig.json +0 -1
- package/src/generated/schemas/networkHeartbeatData.json +0 -1
- package/src/generated/schemas/networkHeartbeatStatus.json +0 -1
- package/src/generated/schemas/networkSettings.json +0 -1
- package/src/generated/schemas/observedCounts.json +0 -1
- package/src/generated/schemas/observedHealth.json +0 -1
- package/src/generated/schemas/observedInventoryBatch.json +0 -1
- package/src/generated/schemas/observedResourceSample.json +0 -1
- package/src/generated/schemas/permissionGrant.json +0 -1
- package/src/generated/schemas/permissionProfile.json +0 -1
- package/src/generated/schemas/permissionSet.json +0 -1
- package/src/generated/schemas/permissionSetReference.json +0 -1
- package/src/generated/schemas/permissionsConfig.json +0 -1
- package/src/generated/schemas/persistentStorage.json +0 -1
- package/src/generated/schemas/platform.json +0 -1
- package/src/generated/schemas/platformPermissions.json +0 -1
- package/src/generated/schemas/postgres.json +0 -1
- package/src/generated/schemas/postgresBackend.json +0 -1
- package/src/generated/schemas/postgresHeartbeatData.json +0 -1
- package/src/generated/schemas/postgresHeartbeatStatus.json +0 -1
- package/src/generated/schemas/postgresOutputs.json +0 -1
- package/src/generated/schemas/presignedOperation.json +0 -1
- package/src/generated/schemas/presignedRequest.json +0 -1
- package/src/generated/schemas/presignedRequestBackend.json +0 -1
- package/src/generated/schemas/providerFleetStatus.json +0 -1
- package/src/generated/schemas/providerLifecycleState.json +0 -1
- package/src/generated/schemas/publicEndpoint.json +0 -1
- package/src/generated/schemas/publicEndpointOutput.json +0 -1
- package/src/generated/schemas/publicEndpointTargetSettings.json +0 -1
- package/src/generated/schemas/pushProgress.json +0 -1
- package/src/generated/schemas/queue.json +0 -1
- package/src/generated/schemas/queueHeartbeatData.json +0 -1
- package/src/generated/schemas/queueHeartbeatStatus.json +0 -1
- package/src/generated/schemas/queueMessage.json +0 -1
- package/src/generated/schemas/queueOutputs.json +0 -1
- package/src/generated/schemas/rawHeartbeatSnippet.json +0 -1
- package/src/generated/schemas/rawHeartbeatSnippetFormat.json +0 -1
- package/src/generated/schemas/readinessProbe.json +0 -1
- package/src/generated/schemas/releaseRequest.json +0 -1
- package/src/generated/schemas/remoteStackManagement.json +0 -1
- package/src/generated/schemas/remoteStackManagementHeartbeatData.json +0 -1
- package/src/generated/schemas/remoteStackManagementHeartbeatStatus.json +0 -1
- package/src/generated/schemas/remoteStackManagementOutputs.json +0 -1
- package/src/generated/schemas/replicaStatus.json +0 -1
- package/src/generated/schemas/resourceEntry.json +0 -1
- package/src/generated/schemas/resourceHeartbeat.json +0 -1
- package/src/generated/schemas/resourceHeartbeatData.json +0 -1
- package/src/generated/schemas/resourceLifecycle.json +0 -1
- package/src/generated/schemas/resourceRef.json +0 -1
- package/src/generated/schemas/resourceSpec.json +0 -1
- package/src/generated/schemas/resourceStatus.json +0 -1
- package/src/generated/schemas/resourceType.json +0 -1
- package/src/generated/schemas/responseHandling.json +0 -1
- package/src/generated/schemas/scheduledEvent.json +0 -1
- package/src/generated/schemas/serviceAccount.json +0 -1
- package/src/generated/schemas/serviceAccountHeartbeatData.json +0 -1
- package/src/generated/schemas/serviceAccountHeartbeatStatus.json +0 -1
- package/src/generated/schemas/serviceAccountOutputs.json +0 -1
- package/src/generated/schemas/serviceActivationHeartbeatData.json +0 -1
- package/src/generated/schemas/serviceActivationHeartbeatStatus.json +0 -1
- package/src/generated/schemas/stack.json +0 -1
- package/src/generated/schemas/stackImportRequest.json +0 -1
- package/src/generated/schemas/stackImportResponse.json +0 -1
- package/src/generated/schemas/stackInputDefaultValue.json +0 -1
- package/src/generated/schemas/stackInputDefinition.json +0 -1
- package/src/generated/schemas/stackInputEnvironmentMapping.json +0 -1
- package/src/generated/schemas/stackInputEnvironmentVariableType.json +0 -1
- package/src/generated/schemas/stackInputKind.json +0 -1
- package/src/generated/schemas/stackInputProvider.json +0 -1
- package/src/generated/schemas/stackInputValidation.json +0 -1
- package/src/generated/schemas/stackRef.json +0 -1
- package/src/generated/schemas/stackResourceState.json +0 -1
- package/src/generated/schemas/stackSettings.json +0 -1
- package/src/generated/schemas/stackState.json +0 -1
- package/src/generated/schemas/stackStatus.json +0 -1
- package/src/generated/schemas/storage.json +0 -1
- package/src/generated/schemas/storageEvent.json +0 -1
- package/src/generated/schemas/storageEventType.json +0 -1
- package/src/generated/schemas/storageEvents.json +0 -1
- package/src/generated/schemas/storageHeartbeatData.json +0 -1
- package/src/generated/schemas/storageHeartbeatStatus.json +0 -1
- package/src/generated/schemas/storageOutputs.json +0 -1
- package/src/generated/schemas/storageUpload.json +0 -1
- package/src/generated/schemas/submitResponseRequest.json +0 -1
- package/src/generated/schemas/telemetryMode.json +0 -1
- package/src/generated/schemas/toolchainConfig.json +0 -1
- package/src/generated/schemas/updatesMode.json +0 -1
- package/src/generated/schemas/uploadCompleteRequest.json +0 -1
- package/src/generated/schemas/uploadCompleteResponse.json +0 -1
- package/src/generated/schemas/value.json +0 -1
- package/src/generated/schemas/vault.json +0 -1
- package/src/generated/schemas/vaultHeartbeatData.json +0 -1
- package/src/generated/schemas/vaultHeartbeatStatus.json +0 -1
- package/src/generated/schemas/vaultOutputs.json +0 -1
- package/src/generated/schemas/worker.json +0 -1
- package/src/generated/schemas/workerCode.json +0 -1
- package/src/generated/schemas/workerHeartbeatData.json +0 -1
- package/src/generated/schemas/workerOutputs.json +0 -1
- package/src/generated/schemas/workerPublicEndpoint.json +0 -1
- package/src/generated/schemas/workerTrigger.json +0 -1
- package/src/generated/schemas/workloadHeartbeatStatus.json +0 -1
- package/src/generated/schemas/workloadReplicaStatus.json +0 -1
- package/src/generated/zod/agent-status-schema.ts +0 -30
- package/src/generated/zod/alien-error-schema.ts +0 -22
- package/src/generated/zod/alien-event-schema.ts +0 -127
- package/src/generated/zod/architecture-schema.ts +0 -13
- package/src/generated/zod/artifact-registry-heartbeat-data-schema.ts +0 -22
- package/src/generated/zod/artifact-registry-heartbeat-status-schema.ts +0 -26
- package/src/generated/zod/artifact-registry-outputs-schema.ts +0 -18
- package/src/generated/zod/artifact-registry-schema.ts +0 -16
- package/src/generated/zod/aurora-postgres-heartbeat-data-schema.ts +0 -20
- package/src/generated/zod/aws-artifact-registry-import-data-schema.ts +0 -21
- package/src/generated/zod/aws-build-import-data-schema.ts +0 -19
- package/src/generated/zod/aws-code-build-heartbeat-data-schema.ts +0 -35
- package/src/generated/zod/aws-compute-cluster-heartbeat-data-schema.ts +0 -37
- package/src/generated/zod/aws-compute-cluster-import-data-schema.ts +0 -17
- package/src/generated/zod/aws-custom-certificate-config-schema.ts +0 -12
- package/src/generated/zod/aws-daemon-heartbeat-data-schema.ts +0 -35
- package/src/generated/zod/aws-dynamo-db-key-schema-element-schema.ts +0 -13
- package/src/generated/zod/aws-dynamo-db-kv-heartbeat-data-schema.ts +0 -38
- package/src/generated/zod/aws-ecr-artifact-registry-heartbeat-data-schema.ts +0 -27
- package/src/generated/zod/aws-ecr-repository-heartbeat-data-schema.ts +0 -20
- package/src/generated/zod/aws-iam-role-service-account-heartbeat-data-schema.ts +0 -34
- package/src/generated/zod/aws-kv-import-data-schema.ts +0 -16
- package/src/generated/zod/aws-lambda-worker-heartbeat-data-schema.ts +0 -34
- package/src/generated/zod/aws-management-config-schema.ts +0 -15
- package/src/generated/zod/aws-network-import-data-schema.ts +0 -26
- package/src/generated/zod/aws-parameter-store-vault-heartbeat-data-schema.ts +0 -27
- package/src/generated/zod/aws-permission-effect-schema.ts +0 -10
- package/src/generated/zod/aws-platform-permission-schema.ts +0 -28
- package/src/generated/zod/aws-postgres-import-data-schema.ts +0 -23
- package/src/generated/zod/aws-queue-import-data-schema.ts +0 -17
- package/src/generated/zod/aws-remote-stack-management-heartbeat-data-schema.ts +0 -18
- package/src/generated/zod/aws-remote-stack-management-import-data-schema.ts +0 -17
- package/src/generated/zod/aws-s3-storage-heartbeat-data-schema.ts +0 -31
- package/src/generated/zod/aws-service-account-import-data-schema.ts +0 -17
- package/src/generated/zod/aws-sqs-queue-heartbeat-data-schema.ts +0 -38
- package/src/generated/zod/aws-storage-import-data-schema.ts +0 -16
- package/src/generated/zod/aws-vault-import-data-schema.ts +0 -17
- package/src/generated/zod/aws-vpc-network-heartbeat-data-schema.ts +0 -26
- package/src/generated/zod/aws-worker-import-data-schema.ts +0 -25
- package/src/generated/zod/azure-artifact-registry-import-data-schema.ts +0 -20
- package/src/generated/zod/azure-blob-storage-heartbeat-data-schema.ts +0 -43
- package/src/generated/zod/azure-build-import-data-schema.ts +0 -21
- package/src/generated/zod/azure-compute-cluster-heartbeat-data-schema.ts +0 -37
- package/src/generated/zod/azure-compute-cluster-import-data-schema.ts +0 -17
- package/src/generated/zod/azure-container-apps-build-heartbeat-data-schema.ts +0 -20
- package/src/generated/zod/azure-container-apps-environment-heartbeat-data-schema.ts +0 -32
- package/src/generated/zod/azure-container-apps-environment-heartbeat-status-schema.ts +0 -26
- package/src/generated/zod/azure-container-apps-environment-import-data-schema.ts +0 -20
- package/src/generated/zod/azure-container-apps-environment-workload-profile-schema.ts +0 -15
- package/src/generated/zod/azure-container-apps-worker-heartbeat-data-schema.ts +0 -25
- package/src/generated/zod/azure-container-registry-heartbeat-data-schema.ts +0 -41
- package/src/generated/zod/azure-custom-certificate-config-schema.ts +0 -13
- package/src/generated/zod/azure-daemon-heartbeat-data-schema.ts +0 -35
- package/src/generated/zod/azure-flexible-server-postgres-heartbeat-data-schema.ts +0 -18
- package/src/generated/zod/azure-flexible-server-postgres-import-data-schema.ts +0 -25
- package/src/generated/zod/azure-key-vault-heartbeat-data-schema.ts +0 -31
- package/src/generated/zod/azure-kv-import-data-schema.ts +0 -19
- package/src/generated/zod/azure-managed-identity-service-account-heartbeat-data-schema.ts +0 -30
- package/src/generated/zod/azure-management-config-schema.ts +0 -17
- package/src/generated/zod/azure-network-import-data-schema.ts +0 -25
- package/src/generated/zod/azure-platform-permission-schema.ts +0 -24
- package/src/generated/zod/azure-queue-import-data-schema.ts +0 -18
- package/src/generated/zod/azure-remote-stack-management-heartbeat-data-schema.ts +0 -22
- package/src/generated/zod/azure-remote-stack-management-import-data-schema.ts +0 -21
- package/src/generated/zod/azure-resource-group-heartbeat-data-schema.ts +0 -22
- package/src/generated/zod/azure-resource-group-heartbeat-status-schema.ts +0 -26
- package/src/generated/zod/azure-resource-group-import-data-schema.ts +0 -17
- package/src/generated/zod/azure-resource-provider-activation-heartbeat-data-schema.ts +0 -21
- package/src/generated/zod/azure-service-account-import-data-schema.ts +0 -20
- package/src/generated/zod/azure-service-activation-import-data-schema.ts +0 -17
- package/src/generated/zod/azure-service-bus-namespace-heartbeat-data-schema.ts +0 -34
- package/src/generated/zod/azure-service-bus-namespace-import-data-schema.ts +0 -18
- package/src/generated/zod/azure-service-bus-queue-heartbeat-data-schema.ts +0 -46
- package/src/generated/zod/azure-storage-account-endpoints-schema.ts +0 -17
- package/src/generated/zod/azure-storage-account-heartbeat-data-schema.ts +0 -42
- package/src/generated/zod/azure-storage-account-import-data-schema.ts +0 -22
- package/src/generated/zod/azure-storage-import-data-schema.ts +0 -18
- package/src/generated/zod/azure-table-kv-heartbeat-data-schema.ts +0 -26
- package/src/generated/zod/azure-vault-import-data-schema.ts +0 -18
- package/src/generated/zod/azure-vnet-network-heartbeat-data-schema.ts +0 -29
- package/src/generated/zod/azure-worker-import-data-schema.ts +0 -18
- package/src/generated/zod/base-resource-outputs-schema.ts +0 -18
- package/src/generated/zod/base-resource-schema.ts +0 -19
- package/src/generated/zod/binding-configuration-aws-binding-spec-schema.ts +0 -30
- package/src/generated/zod/binding-configuration-azure-binding-spec-schema.ts +0 -20
- package/src/generated/zod/binding-configuration-gcp-binding-spec-schema.ts +0 -27
- package/src/generated/zod/body-spec-schema.ts +0 -24
- package/src/generated/zod/build-config-schema.ts +0 -28
- package/src/generated/zod/build-heartbeat-data-schema.ts +0 -22
- package/src/generated/zod/build-heartbeat-status-schema.ts +0 -26
- package/src/generated/zod/build-outputs-schema.ts +0 -15
- package/src/generated/zod/build-schema.ts +0 -27
- package/src/generated/zod/build-status-schema.ts +0 -13
- package/src/generated/zod/capacity-group-scale-policy-schema.ts +0 -27
- package/src/generated/zod/capacity-group-schema.ts +0 -27
- package/src/generated/zod/command-response-schema.ts +0 -24
- package/src/generated/zod/command-state-schema.ts +0 -13
- package/src/generated/zod/command-status-response-schema.ts +0 -24
- package/src/generated/zod/compute-capacity-blocker-category-schema.ts +0 -10
- package/src/generated/zod/compute-capacity-blocker-schema.ts +0 -19
- package/src/generated/zod/compute-capacity-group-status-schema.ts +0 -29
- package/src/generated/zod/compute-capacity-recommendation-schema.ts +0 -18
- package/src/generated/zod/compute-choice-range-schema.ts +0 -17
- package/src/generated/zod/compute-cluster-heartbeat-data-schema.ts +0 -25
- package/src/generated/zod/compute-cluster-heartbeat-status-schema.ts +0 -26
- package/src/generated/zod/compute-cluster-schema.ts +0 -20
- package/src/generated/zod/compute-drain-blocker-schema.ts +0 -16
- package/src/generated/zod/compute-drain-progress-schema.ts +0 -26
- package/src/generated/zod/compute-drain-progress-status-schema.ts +0 -10
- package/src/generated/zod/compute-pool-selection-schema.ts +0 -22
- package/src/generated/zod/compute-settings-schema.ts +0 -18
- package/src/generated/zod/compute-type-schema.ts +0 -13
- package/src/generated/zod/container-autoscaling-schema.ts +0 -21
- package/src/generated/zod/container-code-schema.ts +0 -23
- package/src/generated/zod/container-gpu-spec-schema.ts +0 -16
- package/src/generated/zod/container-heartbeat-data-schema.ts +0 -19
- package/src/generated/zod/container-outputs-schema.ts +0 -30
- package/src/generated/zod/container-port-schema.ts +0 -15
- package/src/generated/zod/container-schema.ts +0 -65
- package/src/generated/zod/container-status-schema.ts +0 -13
- package/src/generated/zod/create-command-request-schema.ts +0 -22
- package/src/generated/zod/create-command-response-schema.ts +0 -25
- package/src/generated/zod/custom-certificate-config-schema.ts +0 -30
- package/src/generated/zod/custom-domain-config-schema.ts +0 -19
- package/src/generated/zod/daemon-code-schema.ts +0 -20
- package/src/generated/zod/daemon-heartbeat-data-schema.ts +0 -28
- package/src/generated/zod/daemon-outputs-schema.ts +0 -17
- package/src/generated/zod/daemon-runtime-mount-schema.ts +0 -14
- package/src/generated/zod/daemon-runtime-schema.ts +0 -19
- package/src/generated/zod/daemon-schema.ts +0 -48
- package/src/generated/zod/deployment-model-schema.ts +0 -13
- package/src/generated/zod/deployment-status-schema.ts +0 -13
- package/src/generated/zod/dev-resource-info-schema.ts +0 -16
- package/src/generated/zod/dev-status-schema.ts +0 -33
- package/src/generated/zod/dev-status-state-schema.ts +0 -13
- package/src/generated/zod/domain-settings-schema.ts +0 -22
- package/src/generated/zod/envelope-schema.ts +0 -28
- package/src/generated/zod/event-change-schema.ts +0 -40
- package/src/generated/zod/event-state-schema.ts +0 -20
- package/src/generated/zod/expose-protocol-schema.ts +0 -13
- package/src/generated/zod/gcp-artifact-registry-heartbeat-data-schema.ts +0 -35
- package/src/generated/zod/gcp-artifact-registry-import-data-schema.ts +0 -21
- package/src/generated/zod/gcp-build-import-data-schema.ts +0 -22
- package/src/generated/zod/gcp-cloud-build-heartbeat-data-schema.ts +0 -20
- package/src/generated/zod/gcp-cloud-run-worker-heartbeat-data-schema.ts +0 -29
- package/src/generated/zod/gcp-cloud-sql-postgres-heartbeat-data-schema.ts +0 -18
- package/src/generated/zod/gcp-cloud-storage-heartbeat-data-schema.ts +0 -33
- package/src/generated/zod/gcp-compute-cluster-heartbeat-data-schema.ts +0 -37
- package/src/generated/zod/gcp-compute-cluster-import-data-schema.ts +0 -17
- package/src/generated/zod/gcp-condition-schema.ts +0 -16
- package/src/generated/zod/gcp-custom-certificate-config-schema.ts +0 -12
- package/src/generated/zod/gcp-daemon-heartbeat-data-schema.ts +0 -35
- package/src/generated/zod/gcp-firestore-kv-heartbeat-data-schema.ts +0 -32
- package/src/generated/zod/gcp-kv-import-data-schema.ts +0 -17
- package/src/generated/zod/gcp-management-config-schema.ts +0 -15
- package/src/generated/zod/gcp-network-import-data-schema.ts +0 -22
- package/src/generated/zod/gcp-platform-permission-schema.ts +0 -24
- package/src/generated/zod/gcp-postgres-import-data-schema.ts +0 -23
- package/src/generated/zod/gcp-pub-sub-queue-heartbeat-data-schema.ts +0 -54
- package/src/generated/zod/gcp-queue-import-data-schema.ts +0 -19
- package/src/generated/zod/gcp-remote-stack-management-heartbeat-data-schema.ts +0 -19
- package/src/generated/zod/gcp-remote-stack-management-import-data-schema.ts +0 -19
- package/src/generated/zod/gcp-secret-manager-vault-heartbeat-data-schema.ts +0 -19
- package/src/generated/zod/gcp-service-account-heartbeat-data-schema.ts +0 -28
- package/src/generated/zod/gcp-service-account-import-data-schema.ts +0 -18
- package/src/generated/zod/gcp-service-activation-import-data-schema.ts +0 -17
- package/src/generated/zod/gcp-service-usage-activation-heartbeat-data-schema.ts +0 -22
- package/src/generated/zod/gcp-storage-import-data-schema.ts +0 -18
- package/src/generated/zod/gcp-vault-import-data-schema.ts +0 -16
- package/src/generated/zod/gcp-vpc-network-heartbeat-data-schema.ts +0 -25
- package/src/generated/zod/gcp-worker-import-data-schema.ts +0 -23
- package/src/generated/zod/gpu-spec-schema.ts +0 -16
- package/src/generated/zod/health-check-schema.ts +0 -19
- package/src/generated/zod/heartbeat-backend-schema.ts +0 -10
- package/src/generated/zod/heartbeat-collection-issue-reason-schema.ts +0 -10
- package/src/generated/zod/heartbeat-collection-issue-schema.ts +0 -21
- package/src/generated/zod/heartbeat-issue-severity-schema.ts +0 -10
- package/src/generated/zod/heartbeats-mode-schema.ts +0 -13
- package/src/generated/zod/horizon-container-heartbeat-data-schema.ts +0 -41
- package/src/generated/zod/horizon-workload-scheduling-mode-schema.ts +0 -10
- package/src/generated/zod/http-method-schema.ts +0 -13
- package/src/generated/zod/import-source-kind-schema.ts +0 -13
- package/src/generated/zod/imported-resource-schema.ts +0 -22
- package/src/generated/zod/index.ts +0 -706
- package/src/generated/zod/kubernetes-build-heartbeat-data-schema.ts +0 -28
- package/src/generated/zod/kubernetes-certificate-mode-schema.ts +0 -30
- package/src/generated/zod/kubernetes-cloud-reference-schema.ts +0 -21
- package/src/generated/zod/kubernetes-cluster-heartbeat-data-schema.ts +0 -41
- package/src/generated/zod/kubernetes-cluster-node-status-schema.ts +0 -35
- package/src/generated/zod/kubernetes-cluster-ownership-schema.ts +0 -13
- package/src/generated/zod/kubernetes-cluster-settings-schema.ts +0 -23
- package/src/generated/zod/kubernetes-container-heartbeat-data-schema.ts +0 -45
- package/src/generated/zod/kubernetes-custom-certificate-config-schema.ts +0 -15
- package/src/generated/zod/kubernetes-daemon-heartbeat-data-schema.ts +0 -42
- package/src/generated/zod/kubernetes-event-involved-object-schema.ts +0 -18
- package/src/generated/zod/kubernetes-event-snapshot-schema.ts +0 -30
- package/src/generated/zod/kubernetes-event-source-schema.ts +0 -13
- package/src/generated/zod/kubernetes-exposure-settings-schema.ts +0 -34
- package/src/generated/zod/kubernetes-gateway-route-profile-schema.ts +0 -27
- package/src/generated/zod/kubernetes-ingress-route-profile-schema.ts +0 -26
- package/src/generated/zod/kubernetes-node-condition-status-schema.ts +0 -15
- package/src/generated/zod/kubernetes-node-resources-schema.ts +0 -19
- package/src/generated/zod/kubernetes-node-usage-schema.ts +0 -18
- package/src/generated/zod/kubernetes-owner-reference-schema.ts +0 -15
- package/src/generated/zod/kubernetes-pod-runtime-unit-status-schema.ts +0 -31
- package/src/generated/zod/kubernetes-route-profile-schema.ts +0 -19
- package/src/generated/zod/kubernetes-route-provider-options-schema.ts +0 -27
- package/src/generated/zod/kubernetes-secret-vault-heartbeat-data-schema.ts +0 -18
- package/src/generated/zod/kubernetes-settings-schema.ts +0 -22
- package/src/generated/zod/kubernetes-tls-secret-ref-schema.ts +0 -16
- package/src/generated/zod/kubernetes-worker-heartbeat-data-schema.ts +0 -46
- package/src/generated/zod/kubernetes-workload-condition-schema.ts +0 -16
- package/src/generated/zod/kubernetes-workload-kind-schema.ts +0 -10
- package/src/generated/zod/kubernetes-workload-status-schema.ts +0 -22
- package/src/generated/zod/kv-heartbeat-data-schema.ts +0 -22
- package/src/generated/zod/kv-heartbeat-status-schema.ts +0 -26
- package/src/generated/zod/kv-outputs-schema.ts +0 -17
- package/src/generated/zod/kv-schema.ts +0 -15
- package/src/generated/zod/lease-info-schema.ts +0 -22
- package/src/generated/zod/lease-request-schema.ts +0 -17
- package/src/generated/zod/lease-response-schema.ts +0 -18
- package/src/generated/zod/lifecycle-rule-schema.ts +0 -16
- package/src/generated/zod/load-balancer-endpoint-schema.ts +0 -16
- package/src/generated/zod/local-artifact-registry-heartbeat-data-schema.ts +0 -17
- package/src/generated/zod/local-compute-cluster-heartbeat-data-schema.ts +0 -30
- package/src/generated/zod/local-container-heartbeat-data-schema.ts +0 -39
- package/src/generated/zod/local-daemon-heartbeat-data-schema.ts +0 -30
- package/src/generated/zod/local-kv-heartbeat-data-schema.ts +0 -20
- package/src/generated/zod/local-operation-schema.ts +0 -13
- package/src/generated/zod/local-postgres-heartbeat-data-schema.ts +0 -19
- package/src/generated/zod/local-queue-heartbeat-data-schema.ts +0 -18
- package/src/generated/zod/local-runtime-event-snapshot-schema.ts +0 -26
- package/src/generated/zod/local-runtime-event-subject-schema.ts +0 -14
- package/src/generated/zod/local-runtime-unit-kind-schema.ts +0 -10
- package/src/generated/zod/local-runtime-unit-status-schema.ts +0 -28
- package/src/generated/zod/local-service-account-heartbeat-data-schema.ts +0 -17
- package/src/generated/zod/local-storage-heartbeat-data-schema.ts +0 -20
- package/src/generated/zod/local-vault-heartbeat-data-schema.ts +0 -21
- package/src/generated/zod/local-worker-heartbeat-data-schema.ts +0 -35
- package/src/generated/zod/machine-profile-schema.ts +0 -25
- package/src/generated/zod/machines-compute-cluster-heartbeat-data-schema.ts +0 -36
- package/src/generated/zod/machines-compute-machine-status-schema.ts +0 -30
- package/src/generated/zod/machines-daemon-heartbeat-data-schema.ts +0 -35
- package/src/generated/zod/managed-runtime-event-involved-object-schema.ts +0 -20
- package/src/generated/zod/managed-runtime-event-snapshot-schema.ts +0 -34
- package/src/generated/zod/managed-runtime-event-source-schema.ts +0 -13
- package/src/generated/zod/managed-runtime-unit-status-schema.ts +0 -34
- package/src/generated/zod/management-config-schema.ts +0 -24
- package/src/generated/zod/management-permissions-schema.ts +0 -22
- package/src/generated/zod/message-payload-schema.ts +0 -17
- package/src/generated/zod/metric-sample-schema.ts +0 -16
- package/src/generated/zod/metric-unit-schema.ts +0 -10
- package/src/generated/zod/monitoring-config-schema.ts +0 -21
- package/src/generated/zod/network-heartbeat-data-schema.ts +0 -19
- package/src/generated/zod/network-heartbeat-status-schema.ts +0 -26
- package/src/generated/zod/network-settings-schema.ts +0 -37
- package/src/generated/zod/observed-counts-schema.ts +0 -14
- package/src/generated/zod/observed-health-schema.ts +0 -10
- package/src/generated/zod/observed-inventory-batch-schema.ts +0 -27
- package/src/generated/zod/observed-resource-sample-schema.ts +0 -54
- package/src/generated/zod/permission-grant-schema.ts +0 -19
- package/src/generated/zod/permission-profile-schema.ts +0 -16
- package/src/generated/zod/permission-set-reference-schema.ts +0 -14
- package/src/generated/zod/permission-set-schema.ts +0 -20
- package/src/generated/zod/permissions-config-schema.ts +0 -22
- package/src/generated/zod/persistent-storage-schema.ts +0 -16
- package/src/generated/zod/platform-permissions-schema.ts +0 -26
- package/src/generated/zod/platform-schema.ts +0 -13
- package/src/generated/zod/postgres-backend-schema.ts +0 -15
- package/src/generated/zod/postgres-heartbeat-data-schema.ts +0 -22
- package/src/generated/zod/postgres-heartbeat-status-schema.ts +0 -26
- package/src/generated/zod/postgres-outputs-schema.ts +0 -17
- package/src/generated/zod/postgres-schema.ts +0 -24
- package/src/generated/zod/presigned-operation-schema.ts +0 -13
- package/src/generated/zod/presigned-request-backend-schema.ts +0 -27
- package/src/generated/zod/presigned-request-schema.ts +0 -24
- package/src/generated/zod/provider-fleet-status-schema.ts +0 -16
- package/src/generated/zod/provider-lifecycle-state-schema.ts +0 -10
- package/src/generated/zod/public-endpoint-output-schema.ts +0 -21
- package/src/generated/zod/public-endpoint-schema.ts +0 -22
- package/src/generated/zod/public-endpoint-target-settings-schema.ts +0 -18
- package/src/generated/zod/push-progress-schema.ts +0 -19
- package/src/generated/zod/queue-heartbeat-data-schema.ts +0 -22
- package/src/generated/zod/queue-heartbeat-status-schema.ts +0 -26
- package/src/generated/zod/queue-message-schema.ts +0 -26
- package/src/generated/zod/queue-outputs-schema.ts +0 -16
- package/src/generated/zod/queue-schema.ts +0 -15
- package/src/generated/zod/raw-heartbeat-snippet-format-schema.ts +0 -10
- package/src/generated/zod/raw-heartbeat-snippet-schema.ts +0 -19
- package/src/generated/zod/readiness-probe-schema.ts +0 -19
- package/src/generated/zod/release-request-schema.ts +0 -15
- package/src/generated/zod/remote-stack-management-heartbeat-data-schema.ts +0 -19
- package/src/generated/zod/remote-stack-management-heartbeat-status-schema.ts +0 -26
- package/src/generated/zod/remote-stack-management-outputs-schema.ts +0 -16
- package/src/generated/zod/remote-stack-management-schema.ts +0 -15
- package/src/generated/zod/replica-status-schema.ts +0 -19
- package/src/generated/zod/resource-entry-schema.ts +0 -24
- package/src/generated/zod/resource-heartbeat-data-schema.ts +0 -130
- package/src/generated/zod/resource-heartbeat-schema.ts +0 -34
- package/src/generated/zod/resource-lifecycle-schema.ts +0 -13
- package/src/generated/zod/resource-ref-schema.ts +0 -19
- package/src/generated/zod/resource-spec-schema.ts +0 -16
- package/src/generated/zod/resource-status-schema.ts +0 -13
- package/src/generated/zod/resource-type-schema.ts +0 -13
- package/src/generated/zod/response-handling-schema.ts +0 -20
- package/src/generated/zod/scheduled-event-schema.ts +0 -15
- package/src/generated/zod/service-account-heartbeat-data-schema.ts +0 -22
- package/src/generated/zod/service-account-heartbeat-status-schema.ts +0 -26
- package/src/generated/zod/service-account-outputs-schema.ts +0 -16
- package/src/generated/zod/service-account-schema.ts +0 -19
- package/src/generated/zod/service-activation-heartbeat-data-schema.ts +0 -16
- package/src/generated/zod/service-activation-heartbeat-status-schema.ts +0 -26
- package/src/generated/zod/stack-import-request-schema.ts +0 -50
- package/src/generated/zod/stack-import-response-schema.ts +0 -24
- package/src/generated/zod/stack-input-default-value-schema.ts +0 -25
- package/src/generated/zod/stack-input-definition-schema.ts +0 -43
- package/src/generated/zod/stack-input-environment-mapping-schema.ts +0 -20
- package/src/generated/zod/stack-input-environment-variable-type-schema.ts +0 -13
- package/src/generated/zod/stack-input-kind-schema.ts +0 -13
- package/src/generated/zod/stack-input-provider-schema.ts +0 -13
- package/src/generated/zod/stack-input-validation-schema.ts +0 -23
- package/src/generated/zod/stack-ref-schema.ts +0 -15
- package/src/generated/zod/stack-resource-state-schema.ts +0 -50
- package/src/generated/zod/stack-schema.ts +0 -31
- package/src/generated/zod/stack-settings-schema.ts +0 -49
- package/src/generated/zod/stack-state-schema.ts +0 -23
- package/src/generated/zod/stack-status-schema.ts +0 -13
- package/src/generated/zod/storage-event-schema.ts +0 -32
- package/src/generated/zod/storage-event-type-schema.ts +0 -13
- package/src/generated/zod/storage-events-schema.ts +0 -14
- package/src/generated/zod/storage-heartbeat-data-schema.ts +0 -22
- package/src/generated/zod/storage-heartbeat-status-schema.ts +0 -26
- package/src/generated/zod/storage-outputs-schema.ts +0 -15
- package/src/generated/zod/storage-schema.ts +0 -21
- package/src/generated/zod/storage-upload-schema.ts +0 -19
- package/src/generated/zod/submit-response-request-schema.ts +0 -14
- package/src/generated/zod/telemetry-mode-schema.ts +0 -13
- package/src/generated/zod/toolchain-config-schema.ts +0 -26
- package/src/generated/zod/updates-mode-schema.ts +0 -13
- package/src/generated/zod/upload-complete-request-schema.ts +0 -15
- package/src/generated/zod/upload-complete-response-schema.ts +0 -19
- package/src/generated/zod/value-schema.ts +0 -10
- package/src/generated/zod/vault-heartbeat-data-schema.ts +0 -25
- package/src/generated/zod/vault-heartbeat-status-schema.ts +0 -26
- package/src/generated/zod/vault-outputs-schema.ts +0 -15
- package/src/generated/zod/vault-schema.ts +0 -15
- package/src/generated/zod/worker-code-schema.ts +0 -23
- package/src/generated/zod/worker-heartbeat-data-schema.ts +0 -25
- package/src/generated/zod/worker-outputs-schema.ts +0 -21
- package/src/generated/zod/worker-public-endpoint-schema.ts +0 -17
- package/src/generated/zod/worker-schema.ts +0 -43
- package/src/generated/zod/worker-trigger-schema.ts +0 -28
- package/src/generated/zod/workload-heartbeat-status-schema.ts +0 -26
- package/src/generated/zod/workload-replica-status-schema.ts +0 -17
- package/src/get-resource-outputs.ts +0 -101
- package/src/index.ts +0 -437
- package/src/input.ts +0 -380
- package/src/kv.ts +0 -72
- package/src/postgres.ts +0 -107
- package/src/queue.ts +0 -44
- package/src/resource.ts +0 -25
- package/src/service-account.ts +0 -117
- package/src/stack.ts +0 -133
- package/src/storage.ts +0 -84
- package/src/tests/index.ts +0 -6
- package/src/vault.ts +0 -49
- package/src/worker.ts +0 -251
- package/tsconfig.json +0 -4
- package/tsdown.config.ts +0 -10
|
@@ -1,672 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest"
|
|
2
|
-
import { z } from "zod/v4"
|
|
3
|
-
|
|
4
|
-
import { AlienError, type AlienErrorOptions, defineError } from "../error.js"
|
|
5
|
-
|
|
6
|
-
// Define test error types similar to the Rust examples
|
|
7
|
-
const DatabaseError = defineError({
|
|
8
|
-
code: "DATABASE_CONNECTION_FAILED",
|
|
9
|
-
context: z.object({
|
|
10
|
-
host: z.string(),
|
|
11
|
-
port: z.number(),
|
|
12
|
-
reason: z.string(),
|
|
13
|
-
}),
|
|
14
|
-
message: ({ host, port, reason }) => `Failed to connect to database '${host}:${port}': ${reason}`,
|
|
15
|
-
retryable: true,
|
|
16
|
-
internal: false,
|
|
17
|
-
httpStatusCode: 502,
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
const AuthError = defineError({
|
|
21
|
-
code: "AUTH_FAILED",
|
|
22
|
-
context: z.object({
|
|
23
|
-
username: z.string(),
|
|
24
|
-
reason: z.string(),
|
|
25
|
-
}),
|
|
26
|
-
message: ({ username, reason }) => `Authentication failed for user '${username}': ${reason}`,
|
|
27
|
-
retryable: false,
|
|
28
|
-
internal: false,
|
|
29
|
-
httpStatusCode: 401,
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
const InternalApiError = defineError({
|
|
33
|
-
code: "INTERNAL_API_ERROR",
|
|
34
|
-
context: z.object({
|
|
35
|
-
service: z.string(),
|
|
36
|
-
details: z.string(),
|
|
37
|
-
traceId: z.string(),
|
|
38
|
-
}),
|
|
39
|
-
message: ({ service, details }) => `Internal API error in ${service}: ${details}`,
|
|
40
|
-
retryable: false,
|
|
41
|
-
internal: true, // This is internal and should be sanitized
|
|
42
|
-
httpStatusCode: 500,
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
const ValidationError = defineError({
|
|
46
|
-
code: "VALIDATION_ERROR",
|
|
47
|
-
context: z.object({
|
|
48
|
-
field: z.string(),
|
|
49
|
-
value: z.any(),
|
|
50
|
-
expectedType: z.string(),
|
|
51
|
-
}),
|
|
52
|
-
message: ({ field, expectedType }) =>
|
|
53
|
-
`Validation failed for field '${field}': expected ${expectedType}`,
|
|
54
|
-
retryable: false,
|
|
55
|
-
internal: false,
|
|
56
|
-
httpStatusCode: 400,
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
const EmptyContextError = defineError({
|
|
60
|
-
code: "EMPTY_CONTEXT_ERROR",
|
|
61
|
-
context: z.object({}),
|
|
62
|
-
message: () => "Error with no context fields",
|
|
63
|
-
retryable: false,
|
|
64
|
-
internal: false,
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
describe("AlienError Basic Usage", () => {
|
|
68
|
-
it("creates an error from definition", () => {
|
|
69
|
-
const error = new AlienError(
|
|
70
|
-
DatabaseError.create({
|
|
71
|
-
host: "localhost",
|
|
72
|
-
port: 5432,
|
|
73
|
-
reason: "Connection timeout",
|
|
74
|
-
}),
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
expect(error.code).toBe("DATABASE_CONNECTION_FAILED")
|
|
78
|
-
expect(error.message).toBe("Failed to connect to database 'localhost:5432': Connection timeout")
|
|
79
|
-
expect(error.retryable).toBe(true)
|
|
80
|
-
expect(error.internal).toBe(false)
|
|
81
|
-
expect(error.httpStatusCode).toBe(502)
|
|
82
|
-
expect(error.context).toEqual({
|
|
83
|
-
host: "localhost",
|
|
84
|
-
port: 5432,
|
|
85
|
-
reason: "Connection timeout",
|
|
86
|
-
})
|
|
87
|
-
expect(error.source).toBeUndefined()
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
it("creates an error with empty context", () => {
|
|
91
|
-
const error = new AlienError(EmptyContextError.create({}))
|
|
92
|
-
|
|
93
|
-
expect(error.code).toBe("EMPTY_CONTEXT_ERROR")
|
|
94
|
-
expect(error.message).toBe("Error with no context fields")
|
|
95
|
-
expect(error.context).toEqual({})
|
|
96
|
-
})
|
|
97
|
-
|
|
98
|
-
it("fromDefinition static method works", () => {
|
|
99
|
-
const error = AlienError.fromDefinition(
|
|
100
|
-
AuthError.create({
|
|
101
|
-
username: "john",
|
|
102
|
-
reason: "Invalid password",
|
|
103
|
-
}),
|
|
104
|
-
)
|
|
105
|
-
|
|
106
|
-
expect(error.code).toBe("AUTH_FAILED")
|
|
107
|
-
expect(error.message).toBe("Authentication failed for user 'john': Invalid password")
|
|
108
|
-
expect(error.retryable).toBe(false)
|
|
109
|
-
expect(error.httpStatusCode).toBe(401)
|
|
110
|
-
})
|
|
111
|
-
|
|
112
|
-
it("toOptions converts to wire format", () => {
|
|
113
|
-
const error = new AlienError(
|
|
114
|
-
ValidationError.create({
|
|
115
|
-
field: "email",
|
|
116
|
-
value: "invalid-email",
|
|
117
|
-
expectedType: "valid email address",
|
|
118
|
-
}),
|
|
119
|
-
)
|
|
120
|
-
|
|
121
|
-
const options = error.toOptions()
|
|
122
|
-
|
|
123
|
-
expect(options).toEqual({
|
|
124
|
-
code: "VALIDATION_ERROR",
|
|
125
|
-
message: "Validation failed for field 'email': expected valid email address",
|
|
126
|
-
retryable: false,
|
|
127
|
-
internal: false,
|
|
128
|
-
httpStatusCode: 400,
|
|
129
|
-
context: {
|
|
130
|
-
field: "email",
|
|
131
|
-
value: "invalid-email",
|
|
132
|
-
expectedType: "valid email address",
|
|
133
|
-
},
|
|
134
|
-
source: undefined,
|
|
135
|
-
})
|
|
136
|
-
})
|
|
137
|
-
|
|
138
|
-
it("error definition toOptions converts directly to wire format", () => {
|
|
139
|
-
const definition = ValidationError.create({
|
|
140
|
-
field: "email",
|
|
141
|
-
value: "invalid-email",
|
|
142
|
-
expectedType: "valid email address",
|
|
143
|
-
})
|
|
144
|
-
|
|
145
|
-
const options = definition.toOptions()
|
|
146
|
-
|
|
147
|
-
expect(options).toEqual({
|
|
148
|
-
code: "VALIDATION_ERROR",
|
|
149
|
-
message: "Validation failed for field 'email': expected valid email address",
|
|
150
|
-
retryable: false,
|
|
151
|
-
internal: false,
|
|
152
|
-
httpStatusCode: 400,
|
|
153
|
-
context: {
|
|
154
|
-
field: "email",
|
|
155
|
-
value: "invalid-email",
|
|
156
|
-
expectedType: "valid email address",
|
|
157
|
-
},
|
|
158
|
-
})
|
|
159
|
-
})
|
|
160
|
-
})
|
|
161
|
-
|
|
162
|
-
describe("AlienError.from() with JS Error types", () => {
|
|
163
|
-
it("converts basic Error", async () => {
|
|
164
|
-
const jsError = new Error("Something went wrong")
|
|
165
|
-
const alienError = await AlienError.from(jsError)
|
|
166
|
-
|
|
167
|
-
expect(alienError.code).toBe("GENERIC_ERROR")
|
|
168
|
-
expect(alienError.message).toBe("Something went wrong")
|
|
169
|
-
expect(alienError.retryable).toBe(false)
|
|
170
|
-
expect(alienError.internal).toBe(true)
|
|
171
|
-
expect(alienError.httpStatusCode).toBe(500)
|
|
172
|
-
expect(alienError.context?.originalError).toEqual({
|
|
173
|
-
name: "Error",
|
|
174
|
-
message: "Something went wrong",
|
|
175
|
-
stack: expect.any(String),
|
|
176
|
-
})
|
|
177
|
-
expect(alienError.context?.errorType).toBe("Error")
|
|
178
|
-
expect(alienError.toExternal()).toEqual({
|
|
179
|
-
code: "GENERIC_ERROR",
|
|
180
|
-
message: "Internal server error",
|
|
181
|
-
retryable: false,
|
|
182
|
-
internal: false,
|
|
183
|
-
httpStatusCode: 500,
|
|
184
|
-
})
|
|
185
|
-
})
|
|
186
|
-
|
|
187
|
-
it("converts TypeError", async () => {
|
|
188
|
-
const jsError = new TypeError("Cannot read property 'foo' of undefined")
|
|
189
|
-
const alienError = await AlienError.from(jsError)
|
|
190
|
-
|
|
191
|
-
expect(alienError.code).toBe("GENERIC_ERROR")
|
|
192
|
-
expect(alienError.message).toBe("Cannot read property 'foo' of undefined")
|
|
193
|
-
expect(alienError.context?.originalError.name).toBe("TypeError")
|
|
194
|
-
expect(alienError.context?.errorType).toBe("TypeError")
|
|
195
|
-
})
|
|
196
|
-
|
|
197
|
-
it("converts ReferenceError", async () => {
|
|
198
|
-
const jsError = new ReferenceError("foo is not defined")
|
|
199
|
-
const alienError = await AlienError.from(jsError)
|
|
200
|
-
|
|
201
|
-
expect(alienError.code).toBe("GENERIC_ERROR")
|
|
202
|
-
expect(alienError.message).toBe("foo is not defined")
|
|
203
|
-
expect(alienError.context?.originalError.name).toBe("ReferenceError")
|
|
204
|
-
expect(alienError.context?.errorType).toBe("ReferenceError")
|
|
205
|
-
})
|
|
206
|
-
|
|
207
|
-
it("converts SyntaxError", async () => {
|
|
208
|
-
const jsError = new SyntaxError("Unexpected token")
|
|
209
|
-
const alienError = await AlienError.from(jsError)
|
|
210
|
-
|
|
211
|
-
expect(alienError.code).toBe("GENERIC_ERROR")
|
|
212
|
-
expect(alienError.message).toBe("Unexpected token")
|
|
213
|
-
expect(alienError.context?.originalError.name).toBe("SyntaxError")
|
|
214
|
-
expect(alienError.context?.errorType).toBe("SyntaxError")
|
|
215
|
-
})
|
|
216
|
-
|
|
217
|
-
it("converts RangeError", async () => {
|
|
218
|
-
const jsError = new RangeError("Maximum call stack size exceeded")
|
|
219
|
-
const alienError = await AlienError.from(jsError)
|
|
220
|
-
|
|
221
|
-
expect(alienError.code).toBe("GENERIC_ERROR")
|
|
222
|
-
expect(alienError.message).toBe("Maximum call stack size exceeded")
|
|
223
|
-
expect(alienError.context?.originalError.name).toBe("RangeError")
|
|
224
|
-
expect(alienError.context?.errorType).toBe("RangeError")
|
|
225
|
-
})
|
|
226
|
-
|
|
227
|
-
it("returns same AlienError when passed AlienError", async () => {
|
|
228
|
-
const originalError = new AlienError(
|
|
229
|
-
DatabaseError.create({
|
|
230
|
-
host: "localhost",
|
|
231
|
-
port: 5432,
|
|
232
|
-
reason: "Timeout",
|
|
233
|
-
}),
|
|
234
|
-
)
|
|
235
|
-
|
|
236
|
-
const result = await AlienError.from(originalError)
|
|
237
|
-
|
|
238
|
-
expect(result).toBe(originalError) // Should be the exact same instance
|
|
239
|
-
expect(result.code).toBe("DATABASE_CONNECTION_FAILED")
|
|
240
|
-
})
|
|
241
|
-
|
|
242
|
-
it("handles errors with custom properties", async () => {
|
|
243
|
-
const jsError = new Error("Custom error") as any
|
|
244
|
-
jsError.customProp = "custom value"
|
|
245
|
-
jsError.errorCode = 42
|
|
246
|
-
|
|
247
|
-
const alienError = await AlienError.from(jsError)
|
|
248
|
-
|
|
249
|
-
expect(alienError.context?.originalError).toEqual({
|
|
250
|
-
name: "Error",
|
|
251
|
-
message: "Custom error",
|
|
252
|
-
stack: expect.any(String),
|
|
253
|
-
customProp: "custom value",
|
|
254
|
-
errorCode: 42,
|
|
255
|
-
})
|
|
256
|
-
})
|
|
257
|
-
})
|
|
258
|
-
|
|
259
|
-
describe("AlienError.from() with random JS objects", async () => {
|
|
260
|
-
it("converts simple error object", async () => {
|
|
261
|
-
const errorObj = { error: "Something bad happened" }
|
|
262
|
-
const alienError = await AlienError.from(errorObj)
|
|
263
|
-
|
|
264
|
-
expect(alienError.code).toBe("GENERIC_ERROR")
|
|
265
|
-
expect(alienError.message).toBe("[object Object]") // Default toString behavior
|
|
266
|
-
expect(alienError.context?.originalError).toEqual(errorObj)
|
|
267
|
-
expect(alienError.context?.errorType).toBe("Object")
|
|
268
|
-
})
|
|
269
|
-
|
|
270
|
-
it("converts string", async () => {
|
|
271
|
-
const errorString = "Just a string error"
|
|
272
|
-
const alienError = await AlienError.from(errorString)
|
|
273
|
-
|
|
274
|
-
expect(alienError.code).toBe("GENERIC_ERROR")
|
|
275
|
-
expect(alienError.message).toBe("Just a string error")
|
|
276
|
-
expect(alienError.context?.originalError).toBe(errorString)
|
|
277
|
-
expect(alienError.context?.errorType).toBe("String")
|
|
278
|
-
})
|
|
279
|
-
|
|
280
|
-
it("converts number", async () => {
|
|
281
|
-
const errorNumber = 404
|
|
282
|
-
const alienError = await AlienError.from(errorNumber)
|
|
283
|
-
|
|
284
|
-
expect(alienError.code).toBe("GENERIC_ERROR")
|
|
285
|
-
expect(alienError.message).toBe("404")
|
|
286
|
-
expect(alienError.context?.originalError).toBe(404)
|
|
287
|
-
expect(alienError.context?.errorType).toBe("Number")
|
|
288
|
-
})
|
|
289
|
-
|
|
290
|
-
it("converts null", async () => {
|
|
291
|
-
const alienError = await AlienError.from(null)
|
|
292
|
-
|
|
293
|
-
expect(alienError.code).toBe("GENERIC_ERROR")
|
|
294
|
-
expect(alienError.message).toBe("null")
|
|
295
|
-
expect(alienError.context?.originalError).toBe(null)
|
|
296
|
-
expect(alienError.context?.errorType).toBe("null")
|
|
297
|
-
})
|
|
298
|
-
|
|
299
|
-
it("converts undefined", async () => {
|
|
300
|
-
const alienError = await AlienError.from(undefined)
|
|
301
|
-
|
|
302
|
-
expect(alienError.code).toBe("GENERIC_ERROR")
|
|
303
|
-
expect(alienError.message).toBe("undefined")
|
|
304
|
-
expect(alienError.context?.originalError).toBe(undefined)
|
|
305
|
-
expect(alienError.context?.errorType).toBe("undefined")
|
|
306
|
-
})
|
|
307
|
-
|
|
308
|
-
it("converts complex object with nested data", async () => {
|
|
309
|
-
const complexObj = {
|
|
310
|
-
error: "Database connection failed",
|
|
311
|
-
details: {
|
|
312
|
-
host: "db.example.com",
|
|
313
|
-
port: 5432,
|
|
314
|
-
timeout: 30000,
|
|
315
|
-
},
|
|
316
|
-
timestamp: "2023-10-01T12:00:00Z",
|
|
317
|
-
retryCount: 3,
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
const alienError = await AlienError.from(complexObj)
|
|
321
|
-
|
|
322
|
-
expect(alienError.code).toBe("GENERIC_ERROR")
|
|
323
|
-
expect(alienError.context?.originalError).toEqual(complexObj)
|
|
324
|
-
expect(alienError.context?.errorType).toBe("Object")
|
|
325
|
-
})
|
|
326
|
-
|
|
327
|
-
it("converts array", async () => {
|
|
328
|
-
const errorArray = ["error1", "error2", { message: "error3" }]
|
|
329
|
-
const alienError = await AlienError.from(errorArray)
|
|
330
|
-
|
|
331
|
-
expect(alienError.code).toBe("GENERIC_ERROR")
|
|
332
|
-
expect(alienError.context?.originalError).toEqual(errorArray)
|
|
333
|
-
expect(alienError.context?.errorType).toBe("Array") // Arrays are objects in JS
|
|
334
|
-
})
|
|
335
|
-
|
|
336
|
-
it("converts function", async () => {
|
|
337
|
-
const errorFunc = () => "error"
|
|
338
|
-
const alienError = await AlienError.from(errorFunc)
|
|
339
|
-
|
|
340
|
-
expect(alienError.code).toBe("GENERIC_ERROR")
|
|
341
|
-
expect(alienError.context?.errorType).toBe("Function")
|
|
342
|
-
// Note: JS functions get serialized differently by serialize-error
|
|
343
|
-
})
|
|
344
|
-
})
|
|
345
|
-
|
|
346
|
-
describe("Error Chaining", async () => {
|
|
347
|
-
it("chains errors with withContext", async () => {
|
|
348
|
-
const baseError = new Error("Network timeout")
|
|
349
|
-
|
|
350
|
-
const chainedError = (await AlienError.from(baseError)).withContext(
|
|
351
|
-
DatabaseError.create({
|
|
352
|
-
host: "localhost",
|
|
353
|
-
port: 5432,
|
|
354
|
-
reason: "Connection timeout",
|
|
355
|
-
}),
|
|
356
|
-
)
|
|
357
|
-
|
|
358
|
-
expect(chainedError.code).toBe("DATABASE_CONNECTION_FAILED")
|
|
359
|
-
expect(chainedError.message).toBe(
|
|
360
|
-
"Failed to connect to database 'localhost:5432': Connection timeout",
|
|
361
|
-
)
|
|
362
|
-
expect(chainedError.retryable).toBe(true)
|
|
363
|
-
expect(chainedError.internal).toBe(false)
|
|
364
|
-
|
|
365
|
-
// Check source
|
|
366
|
-
expect(chainedError.source).toBeDefined()
|
|
367
|
-
expect(chainedError.source?.code).toBe("GENERIC_ERROR")
|
|
368
|
-
expect(chainedError.source?.message).toBe("Network timeout")
|
|
369
|
-
})
|
|
370
|
-
|
|
371
|
-
it("chains multiple errors", async () => {
|
|
372
|
-
const baseError = new Error("ECONNREFUSED")
|
|
373
|
-
|
|
374
|
-
const multiChainedError = (await AlienError.from(baseError))
|
|
375
|
-
.withContext(
|
|
376
|
-
DatabaseError.create({
|
|
377
|
-
host: "localhost",
|
|
378
|
-
port: 5432,
|
|
379
|
-
reason: "Connection refused",
|
|
380
|
-
}),
|
|
381
|
-
)
|
|
382
|
-
.withContext(
|
|
383
|
-
AuthError.create({
|
|
384
|
-
username: "john",
|
|
385
|
-
reason: "Database unavailable",
|
|
386
|
-
}),
|
|
387
|
-
)
|
|
388
|
-
|
|
389
|
-
expect(multiChainedError.code).toBe("AUTH_FAILED")
|
|
390
|
-
expect(multiChainedError.message).toBe(
|
|
391
|
-
"Authentication failed for user 'john': Database unavailable",
|
|
392
|
-
)
|
|
393
|
-
|
|
394
|
-
// Check first level source
|
|
395
|
-
expect(multiChainedError.source?.code).toBe("DATABASE_CONNECTION_FAILED")
|
|
396
|
-
|
|
397
|
-
// Check second level source
|
|
398
|
-
expect(multiChainedError.source?.source?.code).toBe("GENERIC_ERROR")
|
|
399
|
-
expect(multiChainedError.source?.source?.message).toBe("ECONNREFUSED")
|
|
400
|
-
})
|
|
401
|
-
|
|
402
|
-
it("hasErrorCode works with chains", async () => {
|
|
403
|
-
const chainedError = (await AlienError.from(new Error("base")))
|
|
404
|
-
.withContext(
|
|
405
|
-
DatabaseError.create({
|
|
406
|
-
host: "localhost",
|
|
407
|
-
port: 5432,
|
|
408
|
-
reason: "timeout",
|
|
409
|
-
}),
|
|
410
|
-
)
|
|
411
|
-
.withContext(
|
|
412
|
-
AuthError.create({
|
|
413
|
-
username: "john",
|
|
414
|
-
reason: "db issues",
|
|
415
|
-
}),
|
|
416
|
-
)
|
|
417
|
-
|
|
418
|
-
expect(chainedError.hasErrorCode("AUTH_FAILED")).toBe(true)
|
|
419
|
-
expect(chainedError.hasErrorCode("DATABASE_CONNECTION_FAILED")).toBe(true)
|
|
420
|
-
expect(chainedError.hasErrorCode("GENERIC_ERROR")).toBe(true)
|
|
421
|
-
expect(chainedError.hasErrorCode("NONEXISTENT_ERROR")).toBe(false)
|
|
422
|
-
})
|
|
423
|
-
|
|
424
|
-
it("findErrorByCode works with chains", async () => {
|
|
425
|
-
const chainedError = (await AlienError.from(new Error("base")))
|
|
426
|
-
.withContext(
|
|
427
|
-
DatabaseError.create({
|
|
428
|
-
host: "localhost",
|
|
429
|
-
port: 5432,
|
|
430
|
-
reason: "timeout",
|
|
431
|
-
}),
|
|
432
|
-
)
|
|
433
|
-
.withContext(
|
|
434
|
-
AuthError.create({
|
|
435
|
-
username: "john",
|
|
436
|
-
reason: "db issues",
|
|
437
|
-
}),
|
|
438
|
-
)
|
|
439
|
-
|
|
440
|
-
const authError = chainedError.findErrorByCode("AUTH_FAILED")
|
|
441
|
-
expect(authError).toBeDefined()
|
|
442
|
-
expect(authError?.code).toBe("AUTH_FAILED")
|
|
443
|
-
expect(authError?.context?.username).toBe("john")
|
|
444
|
-
|
|
445
|
-
const dbError = chainedError.findErrorByCode("DATABASE_CONNECTION_FAILED")
|
|
446
|
-
expect(dbError).toBeDefined()
|
|
447
|
-
expect(dbError?.code).toBe("DATABASE_CONNECTION_FAILED")
|
|
448
|
-
expect(dbError?.context?.host).toBe("localhost")
|
|
449
|
-
|
|
450
|
-
const nonexistent = chainedError.findErrorByCode("NONEXISTENT_ERROR")
|
|
451
|
-
expect(nonexistent).toBeUndefined()
|
|
452
|
-
})
|
|
453
|
-
|
|
454
|
-
it("toString shows full error chain", async () => {
|
|
455
|
-
const chainedError = (await AlienError.from(new Error("Network timeout")))
|
|
456
|
-
.withContext(
|
|
457
|
-
DatabaseError.create({
|
|
458
|
-
host: "localhost",
|
|
459
|
-
port: 5432,
|
|
460
|
-
reason: "Connection timeout",
|
|
461
|
-
}),
|
|
462
|
-
)
|
|
463
|
-
.withContext(
|
|
464
|
-
AuthError.create({
|
|
465
|
-
username: "john",
|
|
466
|
-
reason: "Database unavailable",
|
|
467
|
-
}),
|
|
468
|
-
)
|
|
469
|
-
|
|
470
|
-
const errorString = chainedError.toString()
|
|
471
|
-
|
|
472
|
-
expect(errorString).toContain(
|
|
473
|
-
"AUTH_FAILED: Authentication failed for user 'john': Database unavailable",
|
|
474
|
-
)
|
|
475
|
-
expect(errorString).toContain(
|
|
476
|
-
"├─▶ DATABASE_CONNECTION_FAILED: Failed to connect to database 'localhost:5432': Connection timeout",
|
|
477
|
-
)
|
|
478
|
-
expect(errorString).toContain("├─▶ GENERIC_ERROR: Network timeout")
|
|
479
|
-
})
|
|
480
|
-
})
|
|
481
|
-
|
|
482
|
-
describe("External API Sanitization", async () => {
|
|
483
|
-
it("sanitizes internal errors for external APIs", async () => {
|
|
484
|
-
const internalError = new AlienError(
|
|
485
|
-
InternalApiError.create({
|
|
486
|
-
service: "payment-processor",
|
|
487
|
-
details: "Database password expired for user admin",
|
|
488
|
-
traceId: "trace-12345",
|
|
489
|
-
}),
|
|
490
|
-
)
|
|
491
|
-
|
|
492
|
-
const external = internalError.toExternal()
|
|
493
|
-
|
|
494
|
-
expect(external).toEqual({
|
|
495
|
-
code: "GENERIC_ERROR",
|
|
496
|
-
message: "Internal server error",
|
|
497
|
-
retryable: false,
|
|
498
|
-
internal: false,
|
|
499
|
-
httpStatusCode: 500,
|
|
500
|
-
})
|
|
501
|
-
})
|
|
502
|
-
|
|
503
|
-
it("preserves non-internal errors for external APIs", async () => {
|
|
504
|
-
const publicError = new AlienError(
|
|
505
|
-
ValidationError.create({
|
|
506
|
-
field: "email",
|
|
507
|
-
value: "invalid-email",
|
|
508
|
-
expectedType: "valid email address",
|
|
509
|
-
}),
|
|
510
|
-
)
|
|
511
|
-
|
|
512
|
-
const external = publicError.toExternal()
|
|
513
|
-
|
|
514
|
-
expect(external).toEqual({
|
|
515
|
-
code: "VALIDATION_ERROR",
|
|
516
|
-
message: "Validation failed for field 'email': expected valid email address",
|
|
517
|
-
retryable: false,
|
|
518
|
-
internal: false,
|
|
519
|
-
httpStatusCode: 400,
|
|
520
|
-
context: {
|
|
521
|
-
field: "email",
|
|
522
|
-
value: "invalid-email",
|
|
523
|
-
expectedType: "valid email address",
|
|
524
|
-
},
|
|
525
|
-
source: undefined,
|
|
526
|
-
})
|
|
527
|
-
})
|
|
528
|
-
|
|
529
|
-
it("sanitizes internal errors in error chains", async () => {
|
|
530
|
-
const chainedError = (await AlienError.from(new Error("Network issue")))
|
|
531
|
-
.withContext(
|
|
532
|
-
InternalApiError.create({
|
|
533
|
-
service: "auth-service",
|
|
534
|
-
details: "JWT secret key leaked in logs",
|
|
535
|
-
traceId: "trace-456",
|
|
536
|
-
}),
|
|
537
|
-
)
|
|
538
|
-
.withContext(
|
|
539
|
-
ValidationError.create({
|
|
540
|
-
field: "token",
|
|
541
|
-
value: "invalid-token",
|
|
542
|
-
expectedType: "valid JWT",
|
|
543
|
-
}),
|
|
544
|
-
)
|
|
545
|
-
|
|
546
|
-
const external = chainedError.toExternal()
|
|
547
|
-
|
|
548
|
-
// Top level should be preserved (not internal)
|
|
549
|
-
expect(external.code).toBe("VALIDATION_ERROR")
|
|
550
|
-
expect(external.message).toBe("Validation failed for field 'token': expected valid JWT")
|
|
551
|
-
expect(external.context).toEqual({
|
|
552
|
-
field: "token",
|
|
553
|
-
value: "invalid-token",
|
|
554
|
-
expectedType: "valid JWT",
|
|
555
|
-
})
|
|
556
|
-
|
|
557
|
-
// But source should be sanitized (internal error)
|
|
558
|
-
expect(external.source).toEqual({
|
|
559
|
-
code: "GENERIC_ERROR",
|
|
560
|
-
message: "Internal server error",
|
|
561
|
-
retryable: false,
|
|
562
|
-
internal: false,
|
|
563
|
-
httpStatusCode: 500,
|
|
564
|
-
})
|
|
565
|
-
})
|
|
566
|
-
|
|
567
|
-
it("sanitizes unknown errors deep in otherwise public chains", async () => {
|
|
568
|
-
const chainedError = (await AlienError.from(new Error("Network timeout")))
|
|
569
|
-
.withContext(
|
|
570
|
-
DatabaseError.create({
|
|
571
|
-
host: "localhost",
|
|
572
|
-
port: 5432,
|
|
573
|
-
reason: "Connection timeout",
|
|
574
|
-
}),
|
|
575
|
-
)
|
|
576
|
-
.withContext(
|
|
577
|
-
AuthError.create({
|
|
578
|
-
username: "john",
|
|
579
|
-
reason: "Database unavailable",
|
|
580
|
-
}),
|
|
581
|
-
)
|
|
582
|
-
|
|
583
|
-
const external = chainedError.toExternal()
|
|
584
|
-
|
|
585
|
-
expect(external.code).toBe("AUTH_FAILED")
|
|
586
|
-
expect((external.source as AlienErrorOptions)?.code).toBe("DATABASE_CONNECTION_FAILED")
|
|
587
|
-
expect((external.source as AlienErrorOptions)?.source as AlienErrorOptions).toEqual({
|
|
588
|
-
code: "GENERIC_ERROR",
|
|
589
|
-
message: "Internal server error",
|
|
590
|
-
retryable: false,
|
|
591
|
-
internal: false,
|
|
592
|
-
httpStatusCode: 500,
|
|
593
|
-
})
|
|
594
|
-
})
|
|
595
|
-
|
|
596
|
-
it("handles mixed internal/external in chain", async () => {
|
|
597
|
-
const chainedError = (await AlienError.from(new Error("Base error")))
|
|
598
|
-
.withContext(
|
|
599
|
-
AuthError.create({
|
|
600
|
-
// Not internal
|
|
601
|
-
username: "john",
|
|
602
|
-
reason: "Auth failed",
|
|
603
|
-
}),
|
|
604
|
-
)
|
|
605
|
-
.withContext(
|
|
606
|
-
InternalApiError.create({
|
|
607
|
-
// Internal - should be sanitized
|
|
608
|
-
service: "payment",
|
|
609
|
-
details: "Secret API key exposed",
|
|
610
|
-
traceId: "trace-789",
|
|
611
|
-
}),
|
|
612
|
-
)
|
|
613
|
-
|
|
614
|
-
const external = chainedError.toExternal()
|
|
615
|
-
|
|
616
|
-
// Top level is internal, so gets sanitized
|
|
617
|
-
expect(external).toEqual({
|
|
618
|
-
code: "GENERIC_ERROR",
|
|
619
|
-
message: "Internal server error",
|
|
620
|
-
retryable: false,
|
|
621
|
-
internal: false,
|
|
622
|
-
httpStatusCode: 500,
|
|
623
|
-
})
|
|
624
|
-
})
|
|
625
|
-
})
|
|
626
|
-
|
|
627
|
-
describe("Error Metadata and Properties", () => {
|
|
628
|
-
it("preserves all metadata correctly", () => {
|
|
629
|
-
const error = new AlienError(
|
|
630
|
-
DatabaseError.create({
|
|
631
|
-
host: "db.example.com",
|
|
632
|
-
port: 3306,
|
|
633
|
-
reason: "SSL handshake failed",
|
|
634
|
-
}),
|
|
635
|
-
)
|
|
636
|
-
|
|
637
|
-
expect(error.name).toBe("AlienError")
|
|
638
|
-
expect(error.code).toBe("DATABASE_CONNECTION_FAILED")
|
|
639
|
-
expect(error.retryable).toBe(true)
|
|
640
|
-
expect(error.internal).toBe(false)
|
|
641
|
-
expect(error.httpStatusCode).toBe(502)
|
|
642
|
-
expect(error.message).toBe(
|
|
643
|
-
"Failed to connect to database 'db.example.com:3306': SSL handshake failed",
|
|
644
|
-
)
|
|
645
|
-
expect(error.context).toEqual({
|
|
646
|
-
host: "db.example.com",
|
|
647
|
-
port: 3306,
|
|
648
|
-
reason: "SSL handshake failed",
|
|
649
|
-
})
|
|
650
|
-
})
|
|
651
|
-
|
|
652
|
-
it("handles errors without HTTP status codes", () => {
|
|
653
|
-
const SimpleError = defineError({
|
|
654
|
-
code: "SIMPLE_ERROR",
|
|
655
|
-
context: z.object({
|
|
656
|
-
message: z.string(),
|
|
657
|
-
}),
|
|
658
|
-
message: ({ message }) => message,
|
|
659
|
-
retryable: false,
|
|
660
|
-
internal: false,
|
|
661
|
-
// No httpStatusCode specified
|
|
662
|
-
})
|
|
663
|
-
|
|
664
|
-
const error = new AlienError(
|
|
665
|
-
SimpleError.create({
|
|
666
|
-
message: "Simple error message",
|
|
667
|
-
}),
|
|
668
|
-
)
|
|
669
|
-
|
|
670
|
-
expect(error.httpStatusCode).toBe(500) // Should default to 500
|
|
671
|
-
})
|
|
672
|
-
})
|