fix(types): fix broken appium config schema types, temporarily

This appears to be a bug in `json-schema-to-typescript`, where the `ipv6` type converts to `{[key: string]: unknown}` instead of `string`.

For now, we need to drop all formatting requirements from the `address` prop until this is fixed.

This did not break CI because the `build` script of `@appium/types` was run either _after_ building the rest of the project, or not at all, and the resulting change to `appium-config.ts` was not committed.
This commit is contained in:
Christopher Hiller
2023-05-24 13:31:00 -07:00
parent 3bf406015e
commit fd2c72fd88
3 changed files with 3 additions and 22 deletions

View File

@@ -11,14 +11,6 @@ export default [
ref: 'appium.json#/properties/server/properties/address',
},
schema: {
anyOf: [
{
format: 'hostname'
},
{
format: 'ipv6'
}
],
appiumCliAliases: ['a'],
default: '0.0.0.0',
description: 'IPv4/IPv6 address or a hostname to listen on',

View File

@@ -24,12 +24,9 @@ export const AppiumConfigJsonSchema = /** @type {const} */ ({
appiumCliAliases: ['a'],
default: '0.0.0.0',
description: 'IPv4/IPv6 address or a hostname to listen on',
anyOf: [
{ format: 'hostname' },
{ format: 'ipv6' }
],
title: 'address config',
type: 'string',
// this should be anyOf [format: "hostname" or format: "ipv6"], but there seems to be a bug in json-schema-to-typescript preventing "ipv6" from converting to type "string"'
},
'allow-cors': {
description:
@@ -340,7 +337,7 @@ export const AppiumConfigJsonSchema = /** @type {const} */ ({
},
},
{
oneOf: [{$ref: '#/$defs/logFilterText'}, {$ref: '#/$defs/logFilterRegex'}],
anyOf: [{$ref: '#/$defs/logFilterText'}, {$ref: '#/$defs/logFilterRegex'}],
},
],
},

View File

@@ -19,14 +19,6 @@
],
"default": "0.0.0.0",
"description": "IPv4/IPv6 address or a hostname to listen on",
"anyOf": [
{
"format": "hostname"
},
{
"format": "ipv6"
}
],
"title": "address config",
"type": "string"
},
@@ -345,7 +337,7 @@
}
},
{
"oneOf": [
"anyOf": [
{
"$ref": "#/$defs/logFilterText"
},