@start9labs/start-sdk 0.4.0-beta.48 → 0.4.0-beta.49
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/base/lib/Effects.d.ts +4 -4
- package/base/lib/actions/index.d.ts +6 -6
- package/base/lib/actions/input/builder/index.d.ts +4 -4
- package/base/lib/actions/input/builder/inputSpec.d.ts +5 -5
- package/base/lib/actions/input/builder/list.d.ts +5 -5
- package/base/lib/actions/input/builder/list.js +8 -8
- package/base/lib/actions/input/builder/value.d.ts +11 -11
- package/base/lib/actions/input/builder/value.js +27 -27
- package/base/lib/actions/input/builder/variants.d.ts +9 -9
- package/base/lib/actions/input/index.d.ts +3 -3
- package/base/lib/actions/input/inputSpecConstants.d.ts +3 -3
- package/base/lib/actions/input/inputSpecConstants.js +18 -18
- package/base/lib/actions/input/inputSpecTypes.d.ts +20 -20
- package/base/lib/actions/input/inputSpecTypes.js +1 -1
- package/base/lib/actions/setupActions.d.ts +8 -8
- package/base/lib/dependencies/dependencies.d.ts +2 -2
- package/base/lib/dependencies/dependencies.js +14 -14
- package/base/lib/dependencies/setupDependencies.d.ts +6 -6
- package/base/lib/exver/index.d.ts +12 -12
- package/base/lib/exver/index.js +150 -150
- package/base/lib/index.d.ts +11 -11
- package/base/lib/inits/index.d.ts +2 -2
- package/base/lib/inits/setupInit.d.ts +2 -2
- package/base/lib/inits/setupInit.js +2 -2
- package/base/lib/inits/setupUninit.d.ts +2 -2
- package/base/lib/inits/setupUninit.js +2 -2
- package/base/lib/interfaces/Host.d.ts +6 -6
- package/base/lib/interfaces/Host.js +9 -9
- package/base/lib/interfaces/Origin.d.ts +4 -4
- package/base/lib/interfaces/Origin.js +2 -2
- package/base/lib/interfaces/ServiceInterfaceBuilder.d.ts +3 -3
- package/base/lib/interfaces/setupInterfaces.d.ts +2 -2
- package/base/lib/osBindings/AcceptSigners.d.ts +1 -1
- package/base/lib/osBindings/ActionInput.d.ts +1 -1
- package/base/lib/osBindings/ActionMetadata.d.ts +2 -2
- package/base/lib/osBindings/ActionResult.d.ts +4 -4
- package/base/lib/osBindings/ActionResultMember.d.ts +2 -2
- package/base/lib/osBindings/ActionResultV1.d.ts +1 -1
- package/base/lib/osBindings/ActionResultValue.d.ts +3 -3
- package/base/lib/osBindings/ActionVisibility.d.ts +2 -2
- package/base/lib/osBindings/AddAdminParams.d.ts +1 -1
- package/base/lib/osBindings/AddAssetParams.d.ts +2 -2
- package/base/lib/osBindings/AddCategoryParams.d.ts +1 -1
- package/base/lib/osBindings/AddMirrorParams.d.ts +2 -2
- package/base/lib/osBindings/AddPackageParams.d.ts +2 -2
- package/base/lib/osBindings/AddPackageSignerParams.d.ts +2 -2
- package/base/lib/osBindings/AddPackageToCategoryParams.d.ts +1 -1
- package/base/lib/osBindings/AddPrivateDomainParams.d.ts +5 -0
- package/base/lib/osBindings/AddPrivateDomainParams.js +3 -0
- package/base/lib/osBindings/AddPrivateDomainParams.js.map +1 -0
- package/base/lib/osBindings/AddPublicDomainParams.d.ts +7 -0
- package/base/lib/osBindings/AddPublicDomainParams.js +3 -0
- package/base/lib/osBindings/AddPublicDomainParams.js.map +1 -0
- package/base/lib/osBindings/AddSslOptions.d.ts +1 -1
- package/base/lib/osBindings/AddTunnelParams.d.ts +3 -1
- package/base/lib/osBindings/AddTunnelParams.js +0 -1
- package/base/lib/osBindings/AddTunnelParams.js.map +1 -1
- package/base/lib/osBindings/AddressInfo.d.ts +1 -1
- package/base/lib/osBindings/Alerts.d.ts +1 -1
- package/base/lib/osBindings/Algorithm.d.ts +1 -1
- package/base/lib/osBindings/AllPackageData.d.ts +2 -2
- package/base/lib/osBindings/AllowedStatuses.d.ts +1 -1
- package/base/lib/osBindings/AlpnInfo.d.ts +2 -2
- package/base/lib/osBindings/ApiState.d.ts +1 -1
- package/base/lib/osBindings/AttachParams.d.ts +1 -1
- package/base/lib/osBindings/BackupInfo.d.ts +9 -0
- package/base/lib/osBindings/{PackageSignerParams.js → BackupInfo.js} +1 -1
- package/base/lib/osBindings/BackupInfo.js.map +1 -0
- package/base/lib/osBindings/BackupParams.d.ts +9 -0
- package/base/lib/osBindings/BackupParams.js +3 -0
- package/base/lib/osBindings/BackupParams.js.map +1 -0
- package/base/lib/osBindings/BackupReport.d.ts +9 -0
- package/base/lib/osBindings/BackupReport.js +3 -0
- package/base/lib/osBindings/BackupReport.js.map +1 -0
- package/base/lib/osBindings/BackupTarget.d.ts +17 -0
- package/base/lib/osBindings/BackupTarget.js +3 -0
- package/base/lib/osBindings/BackupTarget.js.map +1 -0
- package/base/lib/osBindings/BackupTargetFS.d.ts +4 -4
- package/base/lib/osBindings/BackupTargetId.d.ts +1 -0
- package/base/lib/osBindings/BackupTargetId.js +4 -0
- package/base/lib/osBindings/BackupTargetId.js.map +1 -0
- package/base/lib/osBindings/BindId.d.ts +1 -1
- package/base/lib/osBindings/BindInfo.d.ts +4 -2
- package/base/lib/osBindings/BindOptions.d.ts +2 -2
- package/base/lib/osBindings/BindParams.d.ts +3 -3
- package/base/lib/osBindings/BindingGatewaySetEnabledParams.d.ts +1 -1
- package/base/lib/osBindings/BindingSetAddressEnabledParams.d.ts +5 -0
- package/base/lib/osBindings/BindingSetAddressEnabledParams.js +4 -0
- package/base/lib/osBindings/BindingSetAddressEnabledParams.js.map +1 -0
- package/base/lib/osBindings/Bindings.d.ts +4 -0
- package/base/lib/osBindings/Bindings.js +3 -0
- package/base/lib/osBindings/Bindings.js.map +1 -0
- package/base/lib/osBindings/Blake3Commitment.d.ts +1 -1
- package/base/lib/osBindings/CancelInstallParams.d.ts +4 -0
- package/base/lib/osBindings/CancelInstallParams.js +3 -0
- package/base/lib/osBindings/CancelInstallParams.js.map +1 -0
- package/base/lib/osBindings/Category.d.ts +1 -1
- package/base/lib/osBindings/Celsius.d.ts +4 -1
- package/base/lib/osBindings/CheckDependenciesParam.d.ts +1 -1
- package/base/lib/osBindings/CheckDependenciesResult.d.ts +6 -6
- package/base/lib/osBindings/CheckDnsParams.d.ts +4 -0
- package/base/lib/osBindings/CheckDnsParams.js +3 -0
- package/base/lib/osBindings/CheckDnsParams.js.map +1 -0
- package/base/lib/osBindings/CheckPortParams.d.ts +5 -0
- package/base/lib/osBindings/CheckPortParams.js +3 -0
- package/base/lib/osBindings/CheckPortParams.js.map +1 -0
- package/base/lib/osBindings/CheckPortRes.d.ts +5 -0
- package/base/lib/osBindings/CheckPortRes.js +4 -0
- package/base/lib/osBindings/CheckPortRes.js.map +1 -0
- package/base/lib/osBindings/CifsAddParams.d.ts +6 -0
- package/base/lib/osBindings/CifsAddParams.js +4 -0
- package/base/lib/osBindings/CifsAddParams.js.map +1 -0
- package/base/lib/osBindings/CifsBackupTarget.d.ts +10 -0
- package/base/lib/osBindings/CifsBackupTarget.js +3 -0
- package/base/lib/osBindings/CifsBackupTarget.js.map +1 -0
- package/base/lib/osBindings/CifsRemoveParams.d.ts +4 -0
- package/base/lib/osBindings/CifsRemoveParams.js +3 -0
- package/base/lib/osBindings/CifsRemoveParams.js.map +1 -0
- package/base/lib/osBindings/CifsUpdateParams.d.ts +8 -0
- package/base/lib/osBindings/CifsUpdateParams.js +3 -0
- package/base/lib/osBindings/CifsUpdateParams.js.map +1 -0
- package/base/lib/osBindings/ClearActionsParams.d.ts +1 -1
- package/base/lib/osBindings/ClearBindingsParams.d.ts +1 -1
- package/base/lib/osBindings/ClearServiceInterfacesParams.d.ts +1 -1
- package/base/lib/osBindings/ClearTaskParams.d.ts +7 -0
- package/base/lib/osBindings/ClearTaskParams.js +3 -0
- package/base/lib/osBindings/ClearTaskParams.js.map +1 -0
- package/base/lib/osBindings/ControlParams.d.ts +4 -0
- package/base/lib/osBindings/ControlParams.js +3 -0
- package/base/lib/osBindings/ControlParams.js.map +1 -0
- package/base/lib/osBindings/CreateSubcontainerFsParams.d.ts +1 -1
- package/base/lib/osBindings/CreateTaskParams.d.ts +6 -6
- package/base/lib/osBindings/CurrentDependencies.d.ts +2 -2
- package/base/lib/osBindings/CurrentDependencyInfo.d.ts +4 -4
- package/base/lib/osBindings/DepInfo.d.ts +3 -2
- package/base/lib/osBindings/Dependencies.d.ts +2 -2
- package/base/lib/osBindings/DependencyMetadata.d.ts +2 -2
- package/base/lib/osBindings/DependencyRequirement.d.ts +4 -4
- package/base/lib/osBindings/DerivedAddressInfo.d.ts +15 -0
- package/base/lib/osBindings/DerivedAddressInfo.js +3 -0
- package/base/lib/osBindings/DerivedAddressInfo.js.map +1 -0
- package/base/lib/osBindings/Description.d.ts +1 -1
- package/base/lib/osBindings/DesiredStatus.d.ts +5 -5
- package/base/lib/osBindings/DestroySubcontainerFsParams.d.ts +1 -1
- package/base/lib/osBindings/DeviceFilter.d.ts +1 -1
- package/base/lib/osBindings/DomainSettings.d.ts +1 -1
- package/base/lib/osBindings/EditSignerParams.d.ts +3 -3
- package/base/lib/osBindings/EffectsRunActionParams.d.ts +7 -0
- package/base/lib/osBindings/EffectsRunActionParams.js +3 -0
- package/base/lib/osBindings/EffectsRunActionParams.js.map +1 -0
- package/base/lib/osBindings/ErrorData.d.ts +1 -0
- package/base/lib/osBindings/EventId.d.ts +1 -1
- package/base/lib/osBindings/ExportActionParams.d.ts +2 -2
- package/base/lib/osBindings/ExportServiceInterfaceParams.d.ts +3 -3
- package/base/lib/osBindings/FileType.d.ts +1 -1
- package/base/lib/osBindings/ForgetGatewayParams.d.ts +4 -0
- package/base/lib/osBindings/ForgetGatewayParams.js +3 -0
- package/base/lib/osBindings/ForgetGatewayParams.js.map +1 -0
- package/base/lib/osBindings/FullIndex.d.ts +5 -5
- package/base/lib/osBindings/FullProgress.d.ts +2 -2
- package/base/lib/osBindings/GatewayInfo.d.ts +1 -1
- package/base/lib/osBindings/GatewayType.d.ts +1 -0
- package/base/lib/osBindings/GatewayType.js +4 -0
- package/base/lib/osBindings/GatewayType.js.map +1 -0
- package/base/lib/osBindings/GetActionInputParams.d.ts +2 -2
- package/base/lib/osBindings/GetContainerIpParams.d.ts +2 -2
- package/base/lib/osBindings/GetHostInfoParams.d.ts +3 -3
- package/base/lib/osBindings/GetPackageParams.d.ts +3 -3
- package/base/lib/osBindings/GetPackageResponse.d.ts +3 -3
- package/base/lib/osBindings/GetPackageResponseFull.d.ts +2 -2
- package/base/lib/osBindings/GetServiceInterfaceParams.d.ts +3 -3
- package/base/lib/osBindings/GetServiceManifestParams.d.ts +2 -2
- package/base/lib/osBindings/GetServicePortForwardParams.d.ts +2 -2
- package/base/lib/osBindings/GetSslCertificateParams.d.ts +2 -2
- package/base/lib/osBindings/GetSslKeyParams.d.ts +1 -1
- package/base/lib/osBindings/GetStatusParams.d.ts +2 -2
- package/base/lib/osBindings/GetSystemSmtpParams.d.ts +1 -1
- package/base/lib/osBindings/GigaBytes.d.ts +4 -1
- package/base/lib/osBindings/HardwareRequirements.d.ts +1 -1
- package/base/lib/osBindings/Host.d.ts +10 -12
- package/base/lib/osBindings/Hostname.d.ts +1 -0
- package/base/lib/osBindings/Hostname.js +4 -0
- package/base/lib/osBindings/Hostname.js.map +1 -0
- package/base/lib/osBindings/HostnameInfo.d.ts +5 -9
- package/base/lib/osBindings/HostnameMetadata.d.ts +22 -0
- package/base/lib/osBindings/HostnameMetadata.js +3 -0
- package/base/lib/osBindings/HostnameMetadata.js.map +1 -0
- package/base/lib/osBindings/Hosts.d.ts +2 -2
- package/base/lib/osBindings/ImageConfig.d.ts +1 -1
- package/base/lib/osBindings/ImageSource.d.ts +2 -2
- package/base/lib/osBindings/InfoParams.d.ts +6 -0
- package/base/lib/osBindings/InfoParams.js +3 -0
- package/base/lib/osBindings/InfoParams.js.map +1 -0
- package/base/lib/osBindings/InitAcmeParams.d.ts +5 -0
- package/base/lib/osBindings/InitAcmeParams.js +3 -0
- package/base/lib/osBindings/InitAcmeParams.js.map +1 -0
- package/base/lib/osBindings/InitProgressRes.d.ts +2 -2
- package/base/lib/osBindings/InstallParams.d.ts +2 -2
- package/base/lib/osBindings/InstalledState.d.ts +1 -1
- package/base/lib/osBindings/InstalledVersionParams.d.ts +1 -1
- package/base/lib/osBindings/InstallingInfo.d.ts +2 -2
- package/base/lib/osBindings/InstallingState.d.ts +1 -1
- package/base/lib/osBindings/IpHostname.d.ts +4 -4
- package/base/lib/osBindings/IpInfo.d.ts +1 -1
- package/base/lib/osBindings/KillParams.d.ts +3 -0
- package/base/lib/osBindings/KillParams.js +4 -0
- package/base/lib/osBindings/KillParams.js.map +1 -0
- package/base/lib/osBindings/ListNotificationParams.d.ts +4 -0
- package/base/lib/osBindings/ListNotificationParams.js +4 -0
- package/base/lib/osBindings/ListNotificationParams.js.map +1 -0
- package/base/lib/osBindings/ListPackageSignersParams.d.ts +1 -1
- package/base/lib/osBindings/ListServiceInterfacesParams.d.ts +2 -2
- package/base/lib/osBindings/LogEntry.d.ts +5 -0
- package/base/lib/osBindings/LogEntry.js +4 -0
- package/base/lib/osBindings/LogEntry.js.map +1 -0
- package/base/lib/osBindings/LogFollowResponse.d.ts +5 -0
- package/base/lib/osBindings/LogFollowResponse.js +3 -0
- package/base/lib/osBindings/LogFollowResponse.js.map +1 -0
- package/base/lib/osBindings/LogResponse.d.ts +6 -0
- package/base/lib/osBindings/LogResponse.js +3 -0
- package/base/lib/osBindings/LogResponse.js.map +1 -0
- package/base/lib/osBindings/LogsParams.d.ts +6 -0
- package/base/lib/osBindings/LogsParams.js +4 -0
- package/base/lib/osBindings/LogsParams.js.map +1 -0
- package/base/lib/osBindings/LshwDevice.d.ts +4 -4
- package/base/lib/osBindings/Manifest.d.ts +22 -23
- package/base/lib/osBindings/MebiBytes.d.ts +4 -1
- package/base/lib/osBindings/MerkleArchiveCommitment.d.ts +1 -1
- package/base/lib/osBindings/Metadata.d.ts +2 -2
- package/base/lib/osBindings/MetadataSrc.d.ts +2 -2
- package/base/lib/osBindings/Metrics.d.ts +4 -4
- package/base/lib/osBindings/MetricsCpu.d.ts +1 -1
- package/base/lib/osBindings/MetricsDisk.d.ts +2 -2
- package/base/lib/osBindings/MetricsFollowResponse.d.ts +6 -0
- package/base/lib/osBindings/MetricsFollowResponse.js +3 -0
- package/base/lib/osBindings/MetricsFollowResponse.js.map +1 -0
- package/base/lib/osBindings/MetricsGeneral.d.ts +1 -1
- package/base/lib/osBindings/MetricsMemory.d.ts +2 -2
- package/base/lib/osBindings/ModifyNotificationBeforeParams.d.ts +3 -0
- package/base/lib/osBindings/ModifyNotificationBeforeParams.js +4 -0
- package/base/lib/osBindings/ModifyNotificationBeforeParams.js.map +1 -0
- package/base/lib/osBindings/ModifyNotificationParams.d.ts +3 -0
- package/base/lib/osBindings/ModifyNotificationParams.js +4 -0
- package/base/lib/osBindings/ModifyNotificationParams.js.map +1 -0
- package/base/lib/osBindings/MountParams.d.ts +1 -1
- package/base/lib/osBindings/MountTarget.d.ts +3 -3
- package/base/lib/osBindings/NamedHealthCheckResult.d.ts +6 -6
- package/base/lib/osBindings/NamedProgress.d.ts +1 -1
- package/base/lib/osBindings/NetInfo.d.ts +0 -3
- package/base/lib/osBindings/NetInfo.js +1 -0
- package/base/lib/osBindings/NetInfo.js.map +1 -1
- package/base/lib/osBindings/NetworkInfo.d.ts +8 -7
- package/base/lib/osBindings/NetworkInterfaceInfo.d.ts +3 -2
- package/base/lib/osBindings/NetworkInterfaceType.d.ts +1 -1
- package/base/lib/osBindings/Notification.d.ts +12 -0
- package/base/lib/osBindings/Notification.js +3 -0
- package/base/lib/osBindings/Notification.js.map +1 -0
- package/base/lib/osBindings/NotificationLevel.d.ts +1 -0
- package/base/lib/osBindings/NotificationLevel.js +4 -0
- package/base/lib/osBindings/NotificationLevel.js.map +1 -0
- package/base/lib/osBindings/NotificationWithId.d.ts +13 -0
- package/base/lib/osBindings/NotificationWithId.js +3 -0
- package/base/lib/osBindings/NotificationWithId.js.map +1 -0
- package/base/lib/osBindings/OsIndex.d.ts +1 -1
- package/base/lib/osBindings/OsVersionInfo.d.ts +3 -3
- package/base/lib/osBindings/OsVersionInfoMap.d.ts +1 -1
- package/base/lib/osBindings/PackageBackupInfo.d.ts +7 -0
- package/base/lib/osBindings/PackageBackupInfo.js +3 -0
- package/base/lib/osBindings/PackageBackupInfo.js.map +1 -0
- package/base/lib/osBindings/PackageBackupReport.d.ts +3 -0
- package/base/lib/osBindings/PackageBackupReport.js +4 -0
- package/base/lib/osBindings/PackageBackupReport.js.map +1 -0
- package/base/lib/osBindings/PackageDataEntry.d.ts +12 -11
- package/base/lib/osBindings/PackageDetailLevel.d.ts +1 -1
- package/base/lib/osBindings/PackageIndex.d.ts +3 -3
- package/base/lib/osBindings/PackageInfo.d.ts +3 -3
- package/base/lib/osBindings/PackageInfoShort.d.ts +2 -1
- package/base/lib/osBindings/PackageInfoShort.js +0 -1
- package/base/lib/osBindings/PackageInfoShort.js.map +1 -1
- package/base/lib/osBindings/PackageState.d.ts +8 -8
- package/base/lib/osBindings/PackageVersionInfo.d.ts +17 -18
- package/base/lib/osBindings/PartitionInfo.d.ts +11 -0
- package/base/lib/osBindings/PartitionInfo.js +3 -0
- package/base/lib/osBindings/PartitionInfo.js.map +1 -0
- package/base/lib/osBindings/PasswordType.d.ts +1 -1
- package/base/lib/osBindings/Percentage.d.ts +4 -1
- package/base/lib/osBindings/PortForward.d.ts +6 -0
- package/base/lib/osBindings/PortForward.js +3 -0
- package/base/lib/osBindings/PortForward.js.map +1 -0
- package/base/lib/osBindings/Progress.d.ts +1 -1
- package/base/lib/osBindings/ProgressUnits.d.ts +1 -1
- package/base/lib/osBindings/Public.d.ts +2 -2
- package/base/lib/osBindings/PublicDomainConfig.d.ts +2 -2
- package/base/lib/osBindings/QueryDnsParams.d.ts +3 -0
- package/base/lib/osBindings/QueryDnsParams.js +4 -0
- package/base/lib/osBindings/QueryDnsParams.js.map +1 -0
- package/base/lib/osBindings/RebuildParams.d.ts +4 -0
- package/base/lib/osBindings/RebuildParams.js +3 -0
- package/base/lib/osBindings/RebuildParams.js.map +1 -0
- package/base/lib/osBindings/RecoverySource.d.ts +3 -3
- package/base/lib/osBindings/RegistryAsset.d.ts +2 -2
- package/base/lib/osBindings/RegistryInfo.d.ts +2 -2
- package/base/lib/osBindings/RemoveAcmeParams.d.ts +4 -0
- package/base/lib/osBindings/RemoveAcmeParams.js +3 -0
- package/base/lib/osBindings/RemoveAcmeParams.js.map +1 -0
- package/base/lib/osBindings/RemoveAdminParams.d.ts +1 -1
- package/base/lib/osBindings/RemoveDomainParams.d.ts +3 -0
- package/base/lib/osBindings/RemoveDomainParams.js +4 -0
- package/base/lib/osBindings/RemoveDomainParams.js.map +1 -0
- package/base/lib/osBindings/RemoveMirrorParams.d.ts +2 -2
- package/base/lib/osBindings/RemovePackageFromCategoryParams.d.ts +1 -1
- package/base/lib/osBindings/RemovePackageParams.d.ts +3 -3
- package/base/lib/osBindings/RemovePackageSignerParams.d.ts +2 -2
- package/base/lib/osBindings/RemoveTunnelParams.d.ts +1 -1
- package/base/lib/osBindings/RenameGatewayParams.d.ts +5 -0
- package/base/lib/osBindings/RenameGatewayParams.js +3 -0
- package/base/lib/osBindings/RenameGatewayParams.js.map +1 -0
- package/base/lib/osBindings/RequestCommitment.d.ts +1 -1
- package/base/lib/osBindings/ResetPasswordParams.d.ts +5 -0
- package/base/lib/osBindings/ResetPasswordParams.js +3 -0
- package/base/lib/osBindings/ResetPasswordParams.js.map +1 -0
- package/base/lib/osBindings/RestorePackageParams.d.ts +7 -0
- package/base/lib/osBindings/RestorePackageParams.js +3 -0
- package/base/lib/osBindings/RestorePackageParams.js.map +1 -0
- package/base/lib/osBindings/RunActionParams.d.ts +6 -4
- package/base/lib/osBindings/ServerBackupReport.d.ts +4 -0
- package/base/lib/osBindings/ServerBackupReport.js +4 -0
- package/base/lib/osBindings/ServerBackupReport.js.map +1 -0
- package/base/lib/osBindings/ServerInfo.d.ts +7 -6
- package/base/lib/osBindings/ServerStatus.d.ts +3 -3
- package/base/lib/osBindings/ServiceInterface.d.ts +3 -3
- package/base/lib/osBindings/ServiceInterfaceType.d.ts +1 -1
- package/base/lib/osBindings/SessionList.d.ts +1 -1
- package/base/lib/osBindings/Sessions.d.ts +1 -1
- package/base/lib/osBindings/SetCountryParams.d.ts +3 -0
- package/base/lib/osBindings/SetCountryParams.js +4 -0
- package/base/lib/osBindings/SetCountryParams.js.map +1 -0
- package/base/lib/osBindings/SetDefaultOutboundParams.d.ts +4 -0
- package/base/lib/osBindings/SetDefaultOutboundParams.js +3 -0
- package/base/lib/osBindings/SetDefaultOutboundParams.js.map +1 -0
- package/base/lib/osBindings/SetDependenciesParams.d.ts +1 -1
- package/base/lib/osBindings/SetHealth.d.ts +7 -7
- package/base/lib/osBindings/SetIconParams.d.ts +1 -1
- package/base/lib/osBindings/SetLanguageParams.d.ts +3 -0
- package/base/lib/osBindings/SetLanguageParams.js +4 -0
- package/base/lib/osBindings/SetLanguageParams.js.map +1 -0
- package/base/lib/osBindings/SetMainStatus.d.ts +1 -1
- package/base/lib/osBindings/SetMainStatusStatus.d.ts +1 -1
- package/base/lib/osBindings/SetOutboundGatewayParams.d.ts +6 -0
- package/base/lib/osBindings/SetOutboundGatewayParams.js +3 -0
- package/base/lib/osBindings/SetOutboundGatewayParams.js.map +1 -0
- package/base/lib/osBindings/SetStaticDnsParams.d.ts +3 -0
- package/base/lib/osBindings/SetStaticDnsParams.js +4 -0
- package/base/lib/osBindings/SetStaticDnsParams.js.map +1 -0
- package/base/lib/osBindings/SetWifiEnabledParams.d.ts +3 -0
- package/base/lib/osBindings/SetWifiEnabledParams.js +4 -0
- package/base/lib/osBindings/SetWifiEnabledParams.js.map +1 -0
- package/base/lib/osBindings/SetupExecuteParams.d.ts +2 -2
- package/base/lib/osBindings/SetupProgress.d.ts +2 -2
- package/base/lib/osBindings/SetupResult.d.ts +1 -1
- package/base/lib/osBindings/SetupStatusRes.d.ts +7 -7
- package/base/lib/osBindings/SideloadParams.d.ts +1 -0
- package/base/lib/osBindings/SideloadParams.js +4 -0
- package/base/lib/osBindings/SideloadParams.js.map +1 -0
- package/base/lib/osBindings/SideloadResponse.d.ts +5 -0
- package/base/lib/osBindings/SideloadResponse.js +3 -0
- package/base/lib/osBindings/SideloadResponse.js.map +1 -0
- package/base/lib/osBindings/SignAssetParams.d.ts +1 -1
- package/base/lib/osBindings/SignalStrength.d.ts +4 -0
- package/base/lib/osBindings/SignalStrength.js +4 -0
- package/base/lib/osBindings/SignalStrength.js.map +1 -0
- package/base/lib/osBindings/SignerInfo.d.ts +2 -2
- package/base/lib/osBindings/SshAddParams.d.ts +4 -0
- package/base/lib/osBindings/SshAddParams.js +3 -0
- package/base/lib/osBindings/SshAddParams.js.map +1 -0
- package/base/lib/osBindings/SshDeleteParams.d.ts +3 -0
- package/base/lib/osBindings/SshDeleteParams.js +4 -0
- package/base/lib/osBindings/SshDeleteParams.js.map +1 -0
- package/base/lib/osBindings/SshKeyResponse.d.ts +6 -0
- package/base/lib/osBindings/SshKeyResponse.js +4 -0
- package/base/lib/osBindings/SshKeyResponse.js.map +1 -0
- package/base/lib/osBindings/SshPubKey.d.ts +1 -0
- package/base/lib/osBindings/SshPubKey.js +4 -0
- package/base/lib/osBindings/SshPubKey.js.map +1 -0
- package/base/lib/osBindings/Ssid.d.ts +4 -0
- package/base/lib/osBindings/Ssid.js +4 -0
- package/base/lib/osBindings/Ssid.js.map +1 -0
- package/base/lib/osBindings/StartOsRecoveryInfo.d.ts +8 -0
- package/base/lib/osBindings/StartOsRecoveryInfo.js +3 -0
- package/base/lib/osBindings/StartOsRecoveryInfo.js.map +1 -0
- package/base/lib/osBindings/StartStop.d.ts +1 -1
- package/base/lib/osBindings/StatusInfo.d.ts +4 -4
- package/base/lib/osBindings/Task.d.ts +5 -5
- package/base/lib/osBindings/TaskCondition.d.ts +1 -1
- package/base/lib/osBindings/TaskEntry.d.ts +1 -1
- package/base/lib/osBindings/TaskInput.d.ts +1 -1
- package/base/lib/osBindings/TaskSeverity.d.ts +1 -1
- package/base/lib/osBindings/TaskTrigger.d.ts +1 -1
- package/base/lib/osBindings/TimeInfo.d.ts +4 -0
- package/base/lib/osBindings/TimeInfo.js +4 -0
- package/base/lib/osBindings/TimeInfo.js.map +1 -0
- package/base/lib/osBindings/UmountParams.d.ts +4 -0
- package/base/lib/osBindings/UmountParams.js +3 -0
- package/base/lib/osBindings/UmountParams.js.map +1 -0
- package/base/lib/osBindings/UninstallParams.d.ts +6 -0
- package/base/lib/osBindings/UninstallParams.js +3 -0
- package/base/lib/osBindings/UninstallParams.js.map +1 -0
- package/base/lib/osBindings/UpdatingState.d.ts +2 -2
- package/base/lib/osBindings/VerifyCifsParams.d.ts +1 -1
- package/base/lib/osBindings/VersionSignerParams.d.ts +1 -1
- package/base/lib/osBindings/WifiAddParams.d.ts +4 -0
- package/base/lib/osBindings/WifiAddParams.js +4 -0
- package/base/lib/osBindings/WifiAddParams.js.map +1 -0
- package/base/lib/osBindings/WifiListInfo.d.ts +12 -0
- package/base/lib/osBindings/WifiListInfo.js +3 -0
- package/base/lib/osBindings/WifiListInfo.js.map +1 -0
- package/base/lib/osBindings/WifiListOut.d.ts +7 -0
- package/base/lib/osBindings/WifiListOut.js +3 -0
- package/base/lib/osBindings/WifiListOut.js.map +1 -0
- package/base/lib/osBindings/WifiSsidParams.d.ts +3 -0
- package/base/lib/osBindings/WifiSsidParams.js +4 -0
- package/base/lib/osBindings/WifiSsidParams.js.map +1 -0
- package/base/lib/osBindings/index.d.ts +296 -226
- package/base/lib/s9pk/index.d.ts +2 -2
- package/base/lib/s9pk/index.js +13 -13
- package/base/lib/s9pk/merkleArchive/directoryContents.d.ts +1 -1
- package/base/lib/s9pk/merkleArchive/directoryContents.js +2 -2
- package/base/lib/s9pk/merkleArchive/fileContents.d.ts +1 -1
- package/base/lib/s9pk/merkleArchive/fileContents.js +1 -1
- package/base/lib/s9pk/merkleArchive/index.d.ts +3 -3
- package/base/lib/s9pk/merkleArchive/index.js +8 -8
- package/base/lib/s9pk/merkleArchive/varint.js +1 -1
- package/base/lib/types/ManifestTypes.d.ts +22 -30
- package/base/lib/types.d.ts +13 -13
- package/base/lib/types.js +4 -4
- package/base/lib/util/Drop.js +3 -3
- package/base/lib/util/GetSystemSmtp.d.ts +2 -2
- package/base/lib/util/GetSystemSmtp.js +5 -5
- package/base/lib/util/asError.js +1 -1
- package/base/lib/util/deepMerge.js +3 -3
- package/base/lib/util/getDefaultString.d.ts +1 -1
- package/base/lib/util/getDefaultString.js +1 -1
- package/base/lib/util/getRandomCharInSet.js +9 -9
- package/base/lib/util/getRandomString.d.ts +1 -1
- package/base/lib/util/getRandomString.js +1 -1
- package/base/lib/util/getServiceInterface.d.ts +34 -46
- package/base/lib/util/getServiceInterface.js +73 -79
- package/base/lib/util/getServiceInterface.js.map +1 -1
- package/base/lib/util/getServiceInterfaces.d.ts +3 -3
- package/base/lib/util/getServiceInterfaces.js +6 -6
- package/base/lib/util/graph.d.ts +1 -1
- package/base/lib/util/graph.js +3 -3
- package/base/lib/util/inMs.js +7 -7
- package/base/lib/util/index.d.ts +18 -18
- package/base/lib/util/ip.js +29 -29
- package/base/lib/util/patterns.d.ts +1 -3
- package/base/lib/util/patterns.js +10 -18
- package/base/lib/util/patterns.js.map +1 -1
- package/base/lib/util/regexes.d.ts +0 -2
- package/base/lib/util/regexes.js +2 -4
- package/base/lib/util/regexes.js.map +1 -1
- package/base/lib/util/splitCommand.js +1 -1
- package/base/lib/util/typeHelpers.d.ts +4 -4
- package/base/lib/util/typeHelpers.js +1 -1
- package/package/lib/StartSdk.d.ts +34 -34
- package/package/lib/StartSdk.js +9 -9
- package/package/lib/backup/Backups.d.ts +8 -8
- package/package/lib/backup/Backups.js +17 -17
- package/package/lib/backup/index.d.ts +2 -2
- package/package/lib/backup/setupBackups.d.ts +4 -4
- package/package/lib/health/HealthCheck.d.ts +4 -4
- package/package/lib/health/HealthCheck.js +7 -7
- package/package/lib/health/checkFns/HealthCheckResult.d.ts +2 -2
- package/package/lib/health/checkFns/checkPortListening.d.ts +2 -2
- package/package/lib/health/checkFns/checkPortListening.js +7 -7
- package/package/lib/health/checkFns/checkWebUrl.d.ts +3 -3
- package/package/lib/health/checkFns/checkWebUrl.js +2 -2
- package/package/lib/health/checkFns/index.d.ts +4 -4
- package/package/lib/health/checkFns/index.js +1 -1
- package/package/lib/health/checkFns/runHealthScript.d.ts +3 -3
- package/package/lib/health/checkFns/runHealthScript.js +2 -2
- package/package/lib/health/index.d.ts +2 -2
- package/package/lib/i18n/index.js +4 -4
- package/package/lib/index.d.ts +20 -20
- package/package/lib/mainFn/CommandController.d.ts +4 -4
- package/package/lib/mainFn/CommandController.js +13 -13
- package/package/lib/mainFn/Daemon.d.ts +6 -6
- package/package/lib/mainFn/Daemon.js +1 -1
- package/package/lib/mainFn/Daemons.d.ts +10 -10
- package/package/lib/mainFn/Daemons.js +3 -3
- package/package/lib/mainFn/HealthDaemon.d.ts +4 -4
- package/package/lib/mainFn/HealthDaemon.js +20 -20
- package/package/lib/mainFn/Mounts.d.ts +6 -6
- package/package/lib/mainFn/Mounts.js +7 -7
- package/package/lib/mainFn/Oneshot.d.ts +4 -4
- package/package/lib/mainFn/index.d.ts +4 -4
- package/package/lib/manifest/setupManifest.d.ts +4 -4
- package/package/lib/manifest/setupManifest.js +13 -15
- package/package/lib/manifest/setupManifest.js.map +1 -1
- package/package/lib/test/health.readyCheck.test.js +2 -2
- package/package/lib/test/host.test.js +11 -11
- package/package/lib/test/inputSpecBuilder.test.js +206 -207
- package/package/lib/test/inputSpecBuilder.test.js.map +1 -1
- package/package/lib/test/makeOutput.js +197 -197
- package/package/lib/test/output.js +301 -390
- package/package/lib/test/output.js.map +1 -1
- package/package/lib/test/output.sdk.d.ts +56 -70
- package/package/lib/test/output.sdk.js +15 -16
- package/package/lib/test/output.sdk.js.map +1 -1
- package/package/lib/test/output.test.js +23 -23
- package/package/lib/trigger/TriggerInput.d.ts +1 -1
- package/package/lib/trigger/changeOnFirstSuccess.d.ts +1 -1
- package/package/lib/trigger/changeOnFirstSuccess.js +1 -1
- package/package/lib/trigger/index.d.ts +3 -3
- package/package/lib/trigger/lastStatus.d.ts +2 -2
- package/package/lib/trigger/lastStatus.js +1 -1
- package/package/lib/trigger/successFailure.d.ts +1 -1
- package/package/lib/types.d.ts +2 -2
- package/package/lib/util/GetServiceManifest.d.ts +2 -2
- package/package/lib/util/GetServiceManifest.js +6 -6
- package/package/lib/util/GetSslCertificate.d.ts +2 -2
- package/package/lib/util/GetSslCertificate.js +5 -5
- package/package/lib/util/SubContainer.d.ts +21 -21
- package/package/lib/util/SubContainer.js +72 -72
- package/package/lib/util/Volume.d.ts +3 -3
- package/package/lib/util/Volume.js +2 -2
- package/package/lib/util/fileHelper.d.ts +4 -4
- package/package/lib/util/fileHelper.js +20 -20
- package/package/lib/util/index.d.ts +5 -5
- package/package/lib/version/VersionGraph.d.ts +5 -5
- package/package/lib/version/VersionGraph.js +14 -14
- package/package/lib/version/VersionInfo.d.ts +2 -2
- package/package/lib/version/VersionInfo.js +10 -10
- package/package/lib/version/index.d.ts +2 -2
- package/package/package.json +2 -2
- package/package/scripts/oldSpecToBuilder.js +44 -44
- package/package.json +2 -2
- package/base/lib/osBindings/PackageSignerParams.d.ts +0 -6
- package/base/lib/osBindings/PackageSignerParams.js.map +0 -1
|
@@ -33,58 +33,50 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.base64 = exports.emailWithName = exports.email = exports.domain = exports.ascii = exports.
|
|
36
|
+
exports.base64 = exports.emailWithName = exports.email = exports.domain = exports.ascii = exports.localUrl = exports.url = exports.localHostname = exports.hostname = exports.ipv4 = exports.ipv6 = void 0;
|
|
37
37
|
const regexes = __importStar(require("./regexes"));
|
|
38
38
|
exports.ipv6 = {
|
|
39
39
|
regex: regexes.ipv6.matches(),
|
|
40
|
-
description:
|
|
40
|
+
description: 'Must be a valid IPv6 address',
|
|
41
41
|
};
|
|
42
42
|
exports.ipv4 = {
|
|
43
43
|
regex: regexes.ipv4.matches(),
|
|
44
|
-
description:
|
|
44
|
+
description: 'Must be a valid IPv4 address',
|
|
45
45
|
};
|
|
46
46
|
exports.hostname = {
|
|
47
47
|
regex: regexes.hostname.matches(),
|
|
48
|
-
description:
|
|
48
|
+
description: 'Must be a valid hostname',
|
|
49
49
|
};
|
|
50
50
|
exports.localHostname = {
|
|
51
51
|
regex: regexes.localHostname.matches(),
|
|
52
52
|
description: 'Must be a valid ".local" hostname',
|
|
53
53
|
};
|
|
54
|
-
exports.torHostname = {
|
|
55
|
-
regex: regexes.torHostname.matches(),
|
|
56
|
-
description: 'Must be a valid Tor (".onion") hostname',
|
|
57
|
-
};
|
|
58
54
|
exports.url = {
|
|
59
55
|
regex: regexes.url.matches(),
|
|
60
|
-
description:
|
|
56
|
+
description: 'Must be a valid URL',
|
|
61
57
|
};
|
|
62
58
|
exports.localUrl = {
|
|
63
59
|
regex: regexes.localUrl.matches(),
|
|
64
60
|
description: 'Must be a valid ".local" URL',
|
|
65
61
|
};
|
|
66
|
-
exports.torUrl = {
|
|
67
|
-
regex: regexes.torUrl.matches(),
|
|
68
|
-
description: 'Must be a valid Tor (".onion") URL',
|
|
69
|
-
};
|
|
70
62
|
exports.ascii = {
|
|
71
63
|
regex: regexes.ascii.matches(),
|
|
72
|
-
description:
|
|
64
|
+
description: 'May only contain ASCII characters. See https://www.w3schools.com/charsets/ref_html_ascii.asp',
|
|
73
65
|
};
|
|
74
66
|
exports.domain = {
|
|
75
67
|
regex: regexes.domain.matches(),
|
|
76
|
-
description:
|
|
68
|
+
description: 'Must be a valid Fully Qualified Domain Name',
|
|
77
69
|
};
|
|
78
70
|
exports.email = {
|
|
79
71
|
regex: regexes.email.matches(),
|
|
80
|
-
description:
|
|
72
|
+
description: 'Must be a valid email address',
|
|
81
73
|
};
|
|
82
74
|
exports.emailWithName = {
|
|
83
75
|
regex: regexes.emailWithName.matches(),
|
|
84
|
-
description:
|
|
76
|
+
description: 'Must be a valid email address, optionally with a name',
|
|
85
77
|
};
|
|
86
78
|
exports.base64 = {
|
|
87
79
|
regex: regexes.base64.matches(),
|
|
88
|
-
description:
|
|
80
|
+
description: 'May only contain base64 characters. See https://base64.guru/learn/base64-characters',
|
|
89
81
|
};
|
|
90
82
|
//# sourceMappingURL=patterns.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patterns.js","sourceRoot":"","sources":["../../../../base/lib/util/patterns.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,mDAAoC;AAEvB,QAAA,IAAI,GAAY;IAC3B,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE;IAC7B,WAAW,EAAE,8BAA8B;CAC5C,CAAA;AAEY,QAAA,IAAI,GAAY;IAC3B,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE;IAC7B,WAAW,EAAE,8BAA8B;CAC5C,CAAA;AAEY,QAAA,QAAQ,GAAY;IAC/B,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE;IACjC,WAAW,EAAE,0BAA0B;CACxC,CAAA;AAEY,QAAA,aAAa,GAAY;IACpC,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE;IACtC,WAAW,EAAE,mCAAmC;CACjD,CAAA;AAEY,QAAA,
|
|
1
|
+
{"version":3,"file":"patterns.js","sourceRoot":"","sources":["../../../../base/lib/util/patterns.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,mDAAoC;AAEvB,QAAA,IAAI,GAAY;IAC3B,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE;IAC7B,WAAW,EAAE,8BAA8B;CAC5C,CAAA;AAEY,QAAA,IAAI,GAAY;IAC3B,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE;IAC7B,WAAW,EAAE,8BAA8B;CAC5C,CAAA;AAEY,QAAA,QAAQ,GAAY;IAC/B,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE;IACjC,WAAW,EAAE,0BAA0B;CACxC,CAAA;AAEY,QAAA,aAAa,GAAY;IACpC,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE;IACtC,WAAW,EAAE,mCAAmC;CACjD,CAAA;AAEY,QAAA,GAAG,GAAY;IAC1B,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE;IAC5B,WAAW,EAAE,qBAAqB;CACnC,CAAA;AAEY,QAAA,QAAQ,GAAY;IAC/B,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE;IACjC,WAAW,EAAE,8BAA8B;CAC5C,CAAA;AAEY,QAAA,KAAK,GAAY;IAC5B,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE;IAC9B,WAAW,EACT,8FAA8F;CACjG,CAAA;AAEY,QAAA,MAAM,GAAY;IAC7B,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE;IAC/B,WAAW,EAAE,6CAA6C;CAC3D,CAAA;AAEY,QAAA,KAAK,GAAY;IAC5B,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE;IAC9B,WAAW,EAAE,+BAA+B;CAC7C,CAAA;AAEY,QAAA,aAAa,GAAY;IACpC,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE;IACtC,WAAW,EAAE,uDAAuD;CACrE,CAAA;AAEY,QAAA,MAAM,GAAY;IAC7B,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE;IAC/B,WAAW,EACT,qFAAqF;CACxF,CAAA"}
|
|
@@ -10,10 +10,8 @@ export declare const ipv6: ComposableRegex;
|
|
|
10
10
|
export declare const ipv4: ComposableRegex;
|
|
11
11
|
export declare const hostname: ComposableRegex;
|
|
12
12
|
export declare const localHostname: ComposableRegex;
|
|
13
|
-
export declare const torHostname: ComposableRegex;
|
|
14
13
|
export declare const url: ComposableRegex;
|
|
15
14
|
export declare const localUrl: ComposableRegex;
|
|
16
|
-
export declare const torUrl: ComposableRegex;
|
|
17
15
|
export declare const ascii: ComposableRegex;
|
|
18
16
|
export declare const domain: ComposableRegex;
|
|
19
17
|
export declare const email: ComposableRegex;
|
package/base/lib/util/regexes.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pem = exports.base64Whitespace = exports.base64 = exports.emailWithName = exports.email = exports.domain = exports.ascii = exports.
|
|
3
|
+
exports.pem = exports.base64Whitespace = exports.base64 = exports.emailWithName = exports.email = exports.domain = exports.ascii = exports.localUrl = exports.url = exports.localHostname = exports.hostname = exports.ipv4 = exports.ipv6 = exports.escapeLiteral = exports.ComposableRegex = void 0;
|
|
4
4
|
class ComposableRegex {
|
|
5
5
|
constructor(regex) {
|
|
6
6
|
if (regex instanceof RegExp) {
|
|
@@ -21,7 +21,7 @@ class ComposableRegex {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
exports.ComposableRegex = ComposableRegex;
|
|
24
|
-
const escapeLiteral = (str) => str.replace(/[.*+?^${}()|[\]\\]/g,
|
|
24
|
+
const escapeLiteral = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
25
25
|
exports.escapeLiteral = escapeLiteral;
|
|
26
26
|
// https://ihateregex.io/expr/ipv6/
|
|
27
27
|
exports.ipv6 = new ComposableRegex(/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/);
|
|
@@ -29,11 +29,9 @@ exports.ipv6 = new ComposableRegex(/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([
|
|
|
29
29
|
exports.ipv4 = new ComposableRegex(/(\b25[0-5]|\b2[0-4][0-9]|\b[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}/);
|
|
30
30
|
exports.hostname = new ComposableRegex(/(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])/);
|
|
31
31
|
exports.localHostname = new ComposableRegex(/[-a-zA-Z0-9@:%._\+~#=]{1,256}\.local/);
|
|
32
|
-
exports.torHostname = new ComposableRegex(/[-a-zA-Z0-9@:%._\+~#=]{1,256}\.onion/);
|
|
33
32
|
// https://ihateregex.io/expr/url/
|
|
34
33
|
exports.url = new ComposableRegex(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()!@:%_\+.~#?&\/\/=]*)/);
|
|
35
34
|
exports.localUrl = new ComposableRegex(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.local\b([-a-zA-Z0-9()!@:%_\+.~#?&\/\/=]*)/);
|
|
36
|
-
exports.torUrl = new ComposableRegex(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.onion\b([-a-zA-Z0-9()!@:%_\+.~#?&\/\/=]*)/);
|
|
37
35
|
// https://ihateregex.io/expr/ascii/
|
|
38
36
|
exports.ascii = new ComposableRegex(/[ -~]*/);
|
|
39
37
|
exports.domain = new ComposableRegex(/[A-Za-z0-9.-]+\.[A-Za-z]{2,}/);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regexes.js","sourceRoot":"","sources":["../../../../base/lib/util/regexes.ts"],"names":[],"mappings":";;;AAAA,MAAa,eAAe;IAE1B,YAAY,KAAsB;QAChC,IAAI,KAAK,YAAY,MAAM,EAAE,CAAC;YAC5B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QACpB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,CAAA;QAChC,CAAC;IACH,CAAC;IACD,MAAM;QACJ,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAA;IACjC,CAAC;IACD,OAAO;QACL,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAA;IACjC,CAAC;IACD,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAA;IAC1B,CAAC;CACF;AAlBD,0CAkBC;AAEM,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,EAAE,CAC3C,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAA;AAD/B,QAAA,aAAa,iBACkB;AAE5C,mCAAmC;AACtB,QAAA,IAAI,GAAG,IAAI,eAAe,CACrC,qpBAAqpB,CACtpB,CAAA;AAED,mCAAmC;AACtB,QAAA,IAAI,GAAG,IAAI,eAAe,CACrC,2FAA2F,CAC5F,CAAA;AAEY,QAAA,QAAQ,GAAG,IAAI,eAAe,CACzC,2GAA2G,CAC5G,CAAA;AAEY,QAAA,aAAa,GAAG,IAAI,eAAe,CAC9C,sCAAsC,CACvC,CAAA;
|
|
1
|
+
{"version":3,"file":"regexes.js","sourceRoot":"","sources":["../../../../base/lib/util/regexes.ts"],"names":[],"mappings":";;;AAAA,MAAa,eAAe;IAE1B,YAAY,KAAsB;QAChC,IAAI,KAAK,YAAY,MAAM,EAAE,CAAC;YAC5B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QACpB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,CAAA;QAChC,CAAC;IACH,CAAC;IACD,MAAM;QACJ,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAA;IACjC,CAAC;IACD,OAAO;QACL,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAA;IACjC,CAAC;IACD,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAA;IAC1B,CAAC;CACF;AAlBD,0CAkBC;AAEM,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,EAAE,CAC3C,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAA;AAD/B,QAAA,aAAa,iBACkB;AAE5C,mCAAmC;AACtB,QAAA,IAAI,GAAG,IAAI,eAAe,CACrC,qpBAAqpB,CACtpB,CAAA;AAED,mCAAmC;AACtB,QAAA,IAAI,GAAG,IAAI,eAAe,CACrC,2FAA2F,CAC5F,CAAA;AAEY,QAAA,QAAQ,GAAG,IAAI,eAAe,CACzC,2GAA2G,CAC5G,CAAA;AAEY,QAAA,aAAa,GAAG,IAAI,eAAe,CAC9C,sCAAsC,CACvC,CAAA;AAED,kCAAkC;AACrB,QAAA,GAAG,GAAG,IAAI,eAAe,CACpC,0GAA0G,CAC3G,CAAA;AAEY,QAAA,QAAQ,GAAG,IAAI,eAAe,CACzC,6FAA6F,CAC9F,CAAA;AAED,oCAAoC;AACvB,QAAA,KAAK,GAAG,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAA;AAErC,QAAA,MAAM,GAAG,IAAI,eAAe,CAAC,8BAA8B,CAAC,CAAA;AAEzE,kDAAkD;AACrC,QAAA,KAAK,GAAG,IAAI,eAAe,CAAC,qBAAqB,cAAM,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AAEnE,QAAA,aAAa,GAAG,IAAI,eAAe,CAC9C,GAAG,aAAK,CAAC,MAAM,EAAE,WAAW,aAAK,CAAC,MAAM,EAAE,IAAI,CAC/C,CAAA;AAED,8BAA8B;AACjB,QAAA,MAAM,GAAG,IAAI,eAAe,CACvC,oGAAoG,CACrG,CAAA;AAED,8BAA8B;AACjB,QAAA,gBAAgB,GAAG,IAAI,eAAe,CACjD,wHAAwH,CACzH,CAAA;AAEM,MAAM,GAAG,GAAG,CAAC,KAAa,EAAE,EAAE,CACnC,IAAI,eAAe,CACjB,cAAc,IAAA,qBAAa,EAAC,KAAK,CAAC,+CAA+C,IAAA,qBAAa,EAAC,KAAK,CAAC,OAAO,CAC7G,CAAA;AAHU,QAAA,GAAG,OAGb"}
|
|
@@ -5,7 +5,7 @@ const ts_matches_1 = require("ts-matches");
|
|
|
5
5
|
const splitCommand = (command) => {
|
|
6
6
|
if ((0, ts_matches_1.arrayOf)(ts_matches_1.string).test(command))
|
|
7
7
|
return command;
|
|
8
|
-
return [
|
|
8
|
+
return ['sh', '-c', command];
|
|
9
9
|
};
|
|
10
10
|
exports.splitCommand = splitCommand;
|
|
11
11
|
//# sourceMappingURL=splitCommand.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as T from
|
|
1
|
+
import * as T from '../types';
|
|
2
2
|
export type FlattenIntersection<T> = T extends ArrayLike<any> ? T : T extends object ? {} & {
|
|
3
3
|
[P in keyof T]: T[P];
|
|
4
4
|
} : T;
|
|
@@ -12,9 +12,9 @@ type NeverPossible = {
|
|
|
12
12
|
[affine]: string;
|
|
13
13
|
};
|
|
14
14
|
export type NoAny<A> = NeverPossible extends A ? keyof NeverPossible extends keyof A ? never : A : A;
|
|
15
|
-
type CapitalLetters =
|
|
16
|
-
type Numbers =
|
|
15
|
+
type CapitalLetters = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z';
|
|
16
|
+
type Numbers = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
|
|
17
17
|
type CapitalChars = CapitalLetters | Numbers;
|
|
18
|
-
export type ToKebab<S extends string> = S extends string ? S extends `${infer Head}${CapitalChars}${infer Tail}` ? Head extends
|
|
18
|
+
export type ToKebab<S extends string> = S extends string ? S extends `${infer Head}${CapitalChars}${infer Tail}` ? Head extends '' ? Tail extends '' ? Lowercase<S> : S extends `${infer Caps}${Tail}` ? Caps extends CapitalChars ? Tail extends CapitalLetters ? `${Lowercase<Caps>}-${Lowercase<Tail>}` : Tail extends `${CapitalLetters}${string}` ? `${ToKebab<Caps>}-${ToKebab<Tail>}` : `${ToKebab<Caps>}${ToKebab<Tail>}` : never : never : Tail extends '' ? S extends `${Head}${infer Caps}` ? Caps extends CapitalChars ? Head extends Lowercase<Head> ? Caps extends Numbers ? Head extends `${string}${Numbers}` ? never : `${ToKebab<Head>}-${Caps}` : `${ToKebab<Head>}-${ToKebab<Caps>}` : never : never : never : S extends `${Head}${infer Caps}${Tail}` ? Caps extends CapitalChars ? Head extends Lowercase<Head> ? Tail extends CapitalLetters ? `${ToKebab<Head>}-${ToKebab<Caps>}-${Lowercase<Tail>}` : Tail extends `${CapitalLetters}${string}` ? Head extends Numbers ? never : Head extends `${string}${Numbers}` ? never : `${Head}-${ToKebab<Caps>}-${ToKebab<Tail>}` : `${ToKebab<Head>}-${Lowercase<Caps>}${ToKebab<Tail>}` : never : never : never : S : never;
|
|
19
19
|
export type StringObject = Record<string, unknown>;
|
|
20
20
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isKnownError = void 0;
|
|
4
|
-
const isKnownError = (e) => e instanceof Object && (
|
|
4
|
+
const isKnownError = (e) => e instanceof Object && ('error' in e || 'error-code' in e);
|
|
5
5
|
exports.isKnownError = isKnownError;
|
|
6
6
|
function test() {
|
|
7
7
|
// prettier-ignore
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { Value } from
|
|
2
|
-
import { InputSpec } from
|
|
3
|
-
import { Variants } from
|
|
4
|
-
import { Action, ActionInfo, Actions } from
|
|
5
|
-
import { PackageId, ServiceInterfaceType, Effects } from
|
|
6
|
-
import * as patterns from
|
|
7
|
-
import { BackupSync, Backups } from
|
|
8
|
-
import { Daemon, Daemons } from
|
|
9
|
-
import { checkPortListening } from
|
|
10
|
-
import { List } from
|
|
11
|
-
import { SetupBackupsParams } from
|
|
12
|
-
import { changeOnFirstSuccess, cooldownTrigger } from
|
|
13
|
-
import { MultiHost, Scheme } from
|
|
14
|
-
import { ServiceInterfaceBuilder } from
|
|
15
|
-
import { GetSystemSmtp } from
|
|
16
|
-
import { nullIfEmpty } from
|
|
17
|
-
import { getServiceInterface, getServiceInterfaces } from
|
|
18
|
-
import { CommandOptions, SubContainer } from
|
|
19
|
-
import { Mounts } from
|
|
20
|
-
import * as T from
|
|
21
|
-
import { CheckDependencies } from
|
|
22
|
-
import { GetSslCertificate, getServiceManifest } from
|
|
23
|
-
import { getDataVersion, setDataVersion } from
|
|
24
|
-
import { MaybeFn } from
|
|
25
|
-
import { Run } from
|
|
26
|
-
import * as actions from
|
|
27
|
-
import { setupInit, setupUninit, setupOnInit, setupOnUninit } from
|
|
28
|
-
import { DropGenerator } from
|
|
29
|
-
import { getOwnServiceInterface } from
|
|
30
|
-
import { getOwnServiceInterfaces } from
|
|
31
|
-
import { Volumes } from
|
|
32
|
-
export declare const OSVersion: "0.4.0-alpha.
|
|
1
|
+
import { Value } from '../../base/lib/actions/input/builder/value';
|
|
2
|
+
import { InputSpec } from '../../base/lib/actions/input/builder/inputSpec';
|
|
3
|
+
import { Variants } from '../../base/lib/actions/input/builder/variants';
|
|
4
|
+
import { Action, ActionInfo, Actions } from '../../base/lib/actions/setupActions';
|
|
5
|
+
import { PackageId, ServiceInterfaceType, Effects } from '../../base/lib/types';
|
|
6
|
+
import * as patterns from '../../base/lib/util/patterns';
|
|
7
|
+
import { BackupSync, Backups } from './backup/Backups';
|
|
8
|
+
import { Daemon, Daemons } from './mainFn/Daemons';
|
|
9
|
+
import { checkPortListening } from './health/checkFns/checkPortListening';
|
|
10
|
+
import { List } from '../../base/lib/actions/input/builder/list';
|
|
11
|
+
import { SetupBackupsParams } from './backup/setupBackups';
|
|
12
|
+
import { changeOnFirstSuccess, cooldownTrigger } from './trigger';
|
|
13
|
+
import { MultiHost, Scheme } from '../../base/lib/interfaces/Host';
|
|
14
|
+
import { ServiceInterfaceBuilder } from '../../base/lib/interfaces/ServiceInterfaceBuilder';
|
|
15
|
+
import { GetSystemSmtp } from './util';
|
|
16
|
+
import { nullIfEmpty } from './util';
|
|
17
|
+
import { getServiceInterface, getServiceInterfaces } from './util';
|
|
18
|
+
import { CommandOptions, SubContainer } from './util/SubContainer';
|
|
19
|
+
import { Mounts } from './mainFn/Mounts';
|
|
20
|
+
import * as T from '../../base/lib/types';
|
|
21
|
+
import { CheckDependencies } from '../../base/lib/dependencies/dependencies';
|
|
22
|
+
import { GetSslCertificate, getServiceManifest } from './util';
|
|
23
|
+
import { getDataVersion, setDataVersion } from './version';
|
|
24
|
+
import { MaybeFn } from '../../base/lib/actions/setupActions';
|
|
25
|
+
import { Run } from '../../base/lib/actions/setupActions';
|
|
26
|
+
import * as actions from '../../base/lib/actions';
|
|
27
|
+
import { setupInit, setupUninit, setupOnInit, setupOnUninit } from '../../base/lib/inits';
|
|
28
|
+
import { DropGenerator } from '../../base/lib/util/Drop';
|
|
29
|
+
import { getOwnServiceInterface } from '../../base/lib/util/getServiceInterface';
|
|
30
|
+
import { getOwnServiceInterfaces } from '../../base/lib/util/getServiceInterfaces';
|
|
31
|
+
import { Volumes } from './util/Volume';
|
|
32
|
+
export declare const OSVersion: "0.4.0-alpha.20";
|
|
33
33
|
type AnyNeverCond<T extends any[], Then, Else> = T extends [] ? Else : T extends [never, ...Array<any>] ? Then : T extends [any, ...infer U] ? AnyNeverCond<U, Then, Else> : never;
|
|
34
34
|
export declare class StartSdk<Manifest extends T.SDKManifest> {
|
|
35
35
|
readonly manifest: Manifest;
|
|
36
36
|
private constructor();
|
|
37
37
|
static of(): StartSdk<never>;
|
|
38
38
|
withManifest<Manifest extends T.SDKManifest = never>(manifest: Manifest): StartSdk<Manifest>;
|
|
39
|
-
build(isReady: AnyNeverCond<[Manifest],
|
|
39
|
+
build(isReady: AnyNeverCond<[Manifest], 'Build not ready', true>): {
|
|
40
40
|
setDataVersion: typeof setDataVersion;
|
|
41
41
|
getDataVersion: typeof getDataVersion;
|
|
42
42
|
action: {
|
|
@@ -583,7 +583,7 @@ export declare class StartSdk<Manifest extends T.SDKManifest> {
|
|
|
583
583
|
};
|
|
584
584
|
}
|
|
585
585
|
export declare function runCommand<Manifest extends T.SDKManifest>(effects: Effects, image: {
|
|
586
|
-
imageId: keyof Manifest[
|
|
586
|
+
imageId: keyof Manifest['images'] & T.ImageId;
|
|
587
587
|
sharedRun?: boolean;
|
|
588
588
|
}, command: T.CommandType, options: CommandOptions & {
|
|
589
589
|
mounts: Mounts<Manifest> | null;
|
package/package/lib/StartSdk.js
CHANGED
|
@@ -73,7 +73,7 @@ const Drop_1 = require("../../base/lib/util/Drop");
|
|
|
73
73
|
const getServiceInterface_1 = require("../../base/lib/util/getServiceInterface");
|
|
74
74
|
const getServiceInterfaces_1 = require("../../base/lib/util/getServiceInterfaces");
|
|
75
75
|
const Volume_1 = require("./util/Volume");
|
|
76
|
-
exports.OSVersion = (0, exver_1.testTypeVersion)(
|
|
76
|
+
exports.OSVersion = (0, exver_1.testTypeVersion)('0.4.0-alpha.20');
|
|
77
77
|
class StartSdk {
|
|
78
78
|
constructor(manifest) {
|
|
79
79
|
this.manifest = manifest;
|
|
@@ -137,7 +137,7 @@ class StartSdk {
|
|
|
137
137
|
effects.onLeaveContext(() => {
|
|
138
138
|
resolveCell.resolve();
|
|
139
139
|
});
|
|
140
|
-
abort?.addEventListener(
|
|
140
|
+
abort?.addEventListener('abort', () => resolveCell.resolve());
|
|
141
141
|
while (effects.isInContext && !abort?.aborted) {
|
|
142
142
|
let callback = () => { };
|
|
143
143
|
const waitForNext = new Promise((resolve) => {
|
|
@@ -157,7 +157,7 @@ class StartSdk {
|
|
|
157
157
|
once: () => effects.getContainerIp(options),
|
|
158
158
|
watch: (abort) => {
|
|
159
159
|
const ctrl = new AbortController();
|
|
160
|
-
abort?.addEventListener(
|
|
160
|
+
abort?.addEventListener('abort', () => ctrl.abort());
|
|
161
161
|
return Drop_1.DropGenerator.of(watch(ctrl.signal), () => ctrl.abort());
|
|
162
162
|
},
|
|
163
163
|
onChange: (callback) => {
|
|
@@ -173,12 +173,12 @@ class StartSdk {
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
catch (e) {
|
|
176
|
-
console.error(
|
|
176
|
+
console.error('callback function threw an error @ getContainerIp.onChange', e);
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
})()
|
|
180
180
|
.catch((e) => callback(null, e))
|
|
181
|
-
.catch((e) => console.error(
|
|
181
|
+
.catch((e) => console.error('callback function threw an error @ getContainerIp.onChange', e));
|
|
182
182
|
},
|
|
183
183
|
waitFor: async (pred) => {
|
|
184
184
|
const resolveCell = { resolve: () => { } };
|
|
@@ -613,9 +613,9 @@ async function runCommand(effects, image, command, options, name) {
|
|
|
613
613
|
if (T.isUseEntrypoint(command)) {
|
|
614
614
|
const imageMeta = await fs
|
|
615
615
|
.readFile(`/media/startos/images/${image.imageId}.json`, {
|
|
616
|
-
encoding:
|
|
616
|
+
encoding: 'utf8',
|
|
617
617
|
})
|
|
618
|
-
.catch(() =>
|
|
618
|
+
.catch(() => '{}')
|
|
619
619
|
.then(JSON.parse);
|
|
620
620
|
commands = imageMeta.entrypoint ?? [];
|
|
621
621
|
commands = commands.concat(...(command.overridCmd ?? imageMeta.cmd ?? []));
|
|
@@ -625,14 +625,14 @@ async function runCommand(effects, image, command, options, name) {
|
|
|
625
625
|
return SubContainer_1.SubContainerOwned.withTemp(effects, image, options.mounts, name ||
|
|
626
626
|
commands
|
|
627
627
|
.map((c) => {
|
|
628
|
-
if (c.includes(
|
|
628
|
+
if (c.includes(' ')) {
|
|
629
629
|
return `"${c.replace(/"/g, `\"`)}"`;
|
|
630
630
|
}
|
|
631
631
|
else {
|
|
632
632
|
return c;
|
|
633
633
|
}
|
|
634
634
|
})
|
|
635
|
-
.join(
|
|
635
|
+
.join(' '), async (subcontainer) => {
|
|
636
636
|
const res = await subcontainer.exec(commands);
|
|
637
637
|
if (res.exitCode || res.exitSignal) {
|
|
638
638
|
throw new SubContainer_1.ExitError(commands[0], res);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as T from
|
|
2
|
-
import { Affine } from
|
|
3
|
-
import { InitKind, InitScript } from
|
|
1
|
+
import * as T from '../../../base/lib/types';
|
|
2
|
+
import { Affine } from '../util';
|
|
3
|
+
import { InitKind, InitScript } from '../../../base/lib/inits';
|
|
4
4
|
export declare const DEFAULT_OPTIONS: T.SyncOptions;
|
|
5
5
|
export type BackupSync<Volumes extends string> = {
|
|
6
6
|
dataPath: `/media/startos/volumes/${Volumes}/${string}`;
|
|
@@ -9,7 +9,7 @@ export type BackupSync<Volumes extends string> = {
|
|
|
9
9
|
backupOptions?: Partial<T.SyncOptions>;
|
|
10
10
|
restoreOptions?: Partial<T.SyncOptions>;
|
|
11
11
|
};
|
|
12
|
-
export type BackupEffects = T.Effects & Affine<
|
|
12
|
+
export type BackupEffects = T.Effects & Affine<'Backups'>;
|
|
13
13
|
export declare class Backups<M extends T.SDKManifest> implements InitScript {
|
|
14
14
|
private options;
|
|
15
15
|
private restoreOptions;
|
|
@@ -20,8 +20,8 @@ export declare class Backups<M extends T.SDKManifest> implements InitScript {
|
|
|
20
20
|
private preRestore;
|
|
21
21
|
private postRestore;
|
|
22
22
|
private constructor();
|
|
23
|
-
static ofVolumes<M extends T.SDKManifest = never>(...volumeNames: Array<M[
|
|
24
|
-
static ofSyncs<M extends T.SDKManifest = never>(...syncs: BackupSync<M[
|
|
23
|
+
static ofVolumes<M extends T.SDKManifest = never>(...volumeNames: Array<M['volumes'][number]>): Backups<M>;
|
|
24
|
+
static ofSyncs<M extends T.SDKManifest = never>(...syncs: BackupSync<M['volumes'][number]>[]): Backups<M>;
|
|
25
25
|
static withOptions<M extends T.SDKManifest = never>(options?: Partial<T.SyncOptions>): Backups<M>;
|
|
26
26
|
setOptions(options?: Partial<T.SyncOptions>): this;
|
|
27
27
|
setBackupOptions(options?: Partial<T.SyncOptions>): this;
|
|
@@ -30,12 +30,12 @@ export declare class Backups<M extends T.SDKManifest> implements InitScript {
|
|
|
30
30
|
setPostBackup(fn: (effects: BackupEffects) => Promise<void>): this;
|
|
31
31
|
setPreRestore(fn: (effects: BackupEffects) => Promise<void>): this;
|
|
32
32
|
setPostRestore(fn: (effects: BackupEffects) => Promise<void>): this;
|
|
33
|
-
addVolume(volume: M[
|
|
33
|
+
addVolume(volume: M['volumes'][number], options?: Partial<{
|
|
34
34
|
options: T.SyncOptions;
|
|
35
35
|
backupOptions: T.SyncOptions;
|
|
36
36
|
restoreOptions: T.SyncOptions;
|
|
37
37
|
}>): this;
|
|
38
|
-
addSync(sync: BackupSync<M[
|
|
38
|
+
addSync(sync: BackupSync<M['volumes'][0]>): this;
|
|
39
39
|
createBackup(effects: T.Effects): Promise<void>;
|
|
40
40
|
init(effects: T.Effects, kind: InitKind): Promise<void>;
|
|
41
41
|
restoreBackup(effects: T.Effects): Promise<void>;
|
|
@@ -129,14 +129,14 @@ class Backups {
|
|
|
129
129
|
}
|
|
130
130
|
const dataVersion = await effects.getDataVersion();
|
|
131
131
|
if (dataVersion)
|
|
132
|
-
await fs.writeFile(
|
|
133
|
-
encoding:
|
|
132
|
+
await fs.writeFile('/media/startos/backup/dataVersion.txt', dataVersion, {
|
|
133
|
+
encoding: 'utf-8',
|
|
134
134
|
});
|
|
135
135
|
await this.postBackup(effects);
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
138
|
async init(effects, kind) {
|
|
139
|
-
if (kind ===
|
|
139
|
+
if (kind === 'restore') {
|
|
140
140
|
await this.restoreBackup(effects);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
@@ -156,8 +156,8 @@ class Backups {
|
|
|
156
156
|
await rsyncResults.wait();
|
|
157
157
|
}
|
|
158
158
|
const dataVersion = await fs
|
|
159
|
-
.readFile(
|
|
160
|
-
encoding:
|
|
159
|
+
.readFile('/media/startos/backup/dataVersion.txt', {
|
|
160
|
+
encoding: 'utf-8',
|
|
161
161
|
})
|
|
162
162
|
.catch((_) => null);
|
|
163
163
|
if (dataVersion)
|
|
@@ -170,23 +170,23 @@ exports.Backups = Backups;
|
|
|
170
170
|
async function runRsync(rsyncOptions) {
|
|
171
171
|
const { srcPath, dstPath, options } = rsyncOptions;
|
|
172
172
|
await fs.mkdir(dstPath, { recursive: true });
|
|
173
|
-
const command =
|
|
173
|
+
const command = 'rsync';
|
|
174
174
|
const args = [];
|
|
175
175
|
if (options.delete) {
|
|
176
|
-
args.push(
|
|
176
|
+
args.push('--delete');
|
|
177
177
|
}
|
|
178
178
|
for (const exclude of options.exclude) {
|
|
179
179
|
args.push(`--exclude=${exclude}`);
|
|
180
180
|
}
|
|
181
|
-
args.push(
|
|
182
|
-
args.push(
|
|
183
|
-
args.push(
|
|
181
|
+
args.push('-rlptgocAXH');
|
|
182
|
+
args.push('--info=progress2');
|
|
183
|
+
args.push('--no-inc-recursive');
|
|
184
184
|
args.push(srcPath);
|
|
185
185
|
args.push(dstPath);
|
|
186
186
|
const spawned = child_process.spawn(command, args, { detached: true });
|
|
187
187
|
let percentage = 0.0;
|
|
188
|
-
spawned.stdout.on(
|
|
189
|
-
const lines = String(data).replace(/\r/g,
|
|
188
|
+
spawned.stdout.on('data', (data) => {
|
|
189
|
+
const lines = String(data).replace(/\r/g, '\n').split('\n');
|
|
190
190
|
for (const line of lines) {
|
|
191
191
|
const parsed = /$([0-9.]+)%/.exec(line)?.[1];
|
|
192
192
|
if (!parsed) {
|
|
@@ -196,21 +196,21 @@ async function runRsync(rsyncOptions) {
|
|
|
196
196
|
percentage = Number.parseFloat(parsed);
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
|
-
let stderr =
|
|
200
|
-
spawned.stderr.on(
|
|
201
|
-
const errString = data.toString(
|
|
199
|
+
let stderr = '';
|
|
200
|
+
spawned.stderr.on('data', (data) => {
|
|
201
|
+
const errString = data.toString('utf-8');
|
|
202
202
|
stderr += errString;
|
|
203
203
|
console.error(`Backups.runAsync`, (0, util_1.asError)(errString));
|
|
204
204
|
});
|
|
205
205
|
const id = async () => {
|
|
206
206
|
const pid = spawned.pid;
|
|
207
207
|
if (pid === undefined) {
|
|
208
|
-
throw new Error(
|
|
208
|
+
throw new Error('rsync process has no pid');
|
|
209
209
|
}
|
|
210
210
|
return String(pid);
|
|
211
211
|
};
|
|
212
212
|
const waitPromise = new Promise((resolve, reject) => {
|
|
213
|
-
spawned.on(
|
|
213
|
+
spawned.on('exit', (code) => {
|
|
214
214
|
if (code === 0) {
|
|
215
215
|
resolve(null);
|
|
216
216
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import './Backups';
|
|
2
|
+
import './setupBackups';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Backups } from
|
|
2
|
-
import * as T from
|
|
3
|
-
import { InitScript } from
|
|
4
|
-
export type SetupBackupsParams<M extends T.SDKManifest> = M[
|
|
1
|
+
import { Backups } from './Backups';
|
|
2
|
+
import * as T from '../../../base/lib/types';
|
|
3
|
+
import { InitScript } from '../../../base/lib/inits';
|
|
4
|
+
export type SetupBackupsParams<M extends T.SDKManifest> = M['volumes'][number][] | ((_: {
|
|
5
5
|
effects: T.Effects;
|
|
6
6
|
}) => Promise<Backups<M>>);
|
|
7
7
|
type SetupBackupsRes = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Effects, HealthCheckId } from
|
|
2
|
-
import { HealthCheckResult } from
|
|
3
|
-
import { Trigger } from
|
|
4
|
-
import { Drop } from
|
|
1
|
+
import { Effects, HealthCheckId } from '../../../base/lib/types';
|
|
2
|
+
import { HealthCheckResult } from './checkFns/HealthCheckResult';
|
|
3
|
+
import { Trigger } from '../trigger';
|
|
4
|
+
import { Drop } from '../util';
|
|
5
5
|
export type HealthCheckParams = {
|
|
6
6
|
id: HealthCheckId;
|
|
7
7
|
name: string;
|
|
@@ -44,14 +44,14 @@ class HealthCheck extends util_1.Drop {
|
|
|
44
44
|
if (triggered) {
|
|
45
45
|
try {
|
|
46
46
|
let { result, message } = await o.fn();
|
|
47
|
-
if (result ===
|
|
47
|
+
if (result === 'failure' &&
|
|
48
48
|
performance.now() - started <= gracePeriod)
|
|
49
|
-
result =
|
|
49
|
+
result = 'starting';
|
|
50
50
|
await effects.setHealth({
|
|
51
51
|
name: o.name,
|
|
52
52
|
id: o.id,
|
|
53
53
|
result,
|
|
54
|
-
message: message ||
|
|
54
|
+
message: message || '',
|
|
55
55
|
});
|
|
56
56
|
this.currentValue.lastResult = result;
|
|
57
57
|
}
|
|
@@ -60,11 +60,11 @@ class HealthCheck extends util_1.Drop {
|
|
|
60
60
|
name: o.name,
|
|
61
61
|
id: o.id,
|
|
62
62
|
result: performance.now() - started <= gracePeriod
|
|
63
|
-
?
|
|
64
|
-
:
|
|
65
|
-
message: asMessage(e) ||
|
|
63
|
+
? 'starting'
|
|
64
|
+
: 'failure',
|
|
65
|
+
message: asMessage(e) || '',
|
|
66
66
|
});
|
|
67
|
-
this.currentValue.lastResult =
|
|
67
|
+
this.currentValue.lastResult = 'failure';
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { T } from
|
|
2
|
-
export type HealthCheckResult = Omit<T.NamedHealthCheckResult,
|
|
1
|
+
import { T } from '../../../../base/lib';
|
|
2
|
+
export type HealthCheckResult = Omit<T.NamedHealthCheckResult, 'name'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Effects } from
|
|
2
|
-
import { HealthCheckResult } from
|
|
1
|
+
import { Effects } from '../../../../base/lib/types';
|
|
2
|
+
import { HealthCheckResult } from './HealthCheckResult';
|
|
3
3
|
export declare function containsAddress(x: string, port: number, address?: bigint): boolean;
|
|
4
4
|
/**
|
|
5
5
|
* This is used to check if a port is listening on the system.
|
|
@@ -41,10 +41,10 @@ const CP = __importStar(require("node:child_process"));
|
|
|
41
41
|
const cpExec = (0, node_util_1.promisify)(CP.exec);
|
|
42
42
|
function containsAddress(x, port, address) {
|
|
43
43
|
const readPorts = x
|
|
44
|
-
.split(
|
|
44
|
+
.split('\n')
|
|
45
45
|
.filter(Boolean)
|
|
46
46
|
.splice(1)
|
|
47
|
-
.map((x) => x.split(
|
|
47
|
+
.map((x) => x.split(' ').filter(Boolean)[1]?.split(':'))
|
|
48
48
|
.filter((x) => x?.length > 1)
|
|
49
49
|
.map(([addr, p]) => [BigInt(`0x${addr}`), Number.parseInt(p, 16)]);
|
|
50
50
|
return !!readPorts.find(([addr, p]) => (address === undefined || address === addr) && port === p);
|
|
@@ -58,19 +58,19 @@ async function checkPortListening(effects, port, options) {
|
|
|
58
58
|
Promise.resolve().then(async () => {
|
|
59
59
|
const hasAddress = containsAddress(await cpExec(`cat /proc/net/tcp`, {}).then(util_1.stringFromStdErrOut), port) ||
|
|
60
60
|
containsAddress(await cpExec(`cat /proc/net/tcp6`, {}).then(util_1.stringFromStdErrOut), port, BigInt(0)) ||
|
|
61
|
-
containsAddress(await cpExec(
|
|
62
|
-
containsAddress(await cpExec(
|
|
61
|
+
containsAddress(await cpExec('cat /proc/net/udp', {}).then(util_1.stringFromStdErrOut), port) ||
|
|
62
|
+
containsAddress(await cpExec('cat /proc/net/udp6', {}).then(util_1.stringFromStdErrOut), port, BigInt(0));
|
|
63
63
|
if (hasAddress) {
|
|
64
|
-
return { result:
|
|
64
|
+
return { result: 'success', message: options.successMessage };
|
|
65
65
|
}
|
|
66
66
|
return {
|
|
67
|
-
result:
|
|
67
|
+
result: 'failure',
|
|
68
68
|
message: options.errorMessage,
|
|
69
69
|
};
|
|
70
70
|
}),
|
|
71
71
|
new Promise((resolve) => {
|
|
72
72
|
setTimeout(() => resolve({
|
|
73
|
-
result:
|
|
73
|
+
result: 'failure',
|
|
74
74
|
message: options.timeoutMessage || `Timeout trying to check port ${port}`,
|
|
75
75
|
}), options.timeout ?? 1_000);
|
|
76
76
|
}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Effects } from
|
|
2
|
-
import { HealthCheckResult } from
|
|
3
|
-
import
|
|
1
|
+
import { Effects } from '../../../../base/lib/types';
|
|
2
|
+
import { HealthCheckResult } from './HealthCheckResult';
|
|
3
|
+
import 'isomorphic-fetch';
|
|
4
4
|
/**
|
|
5
5
|
* This is a helper function to check if a web url is reachable.
|
|
6
6
|
* @param url
|