chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:08:39 +08:00
commit a0df89c693
5252 changed files with 523444 additions and 0 deletions
@@ -0,0 +1,28 @@
import { boolean, mixed, object, SchemaOf, string } from 'yup';
import { PerDevConfigsFilterType, RelativePathModel } from './types';
export function relativePathValidation(): SchemaOf<RelativePathModel> {
return object({
SupportRelativePath: boolean().default(false),
FilesystemPath: string()
.when(['SupportRelativePath'], {
is: true,
then: string().required('Local filesystem path is required'),
})
.default(''),
SupportPerDeviceConfigs: boolean().default(false),
PerDeviceConfigsPath: string()
.when('SupportPerDeviceConfigs', {
is: true,
then: string().required('Directory is required'),
})
.default(''),
PerDeviceConfigsMatchType: mixed<PerDevConfigsFilterType>()
.oneOf(['', 'file', 'dir'])
.default(''),
PerDeviceConfigsGroupMatchType: mixed<PerDevConfigsFilterType>()
.oneOf(['', 'file', 'dir'])
.default(''),
});
}