Remove all internal usage of the Json types

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-10-22 15:52:51 +02:00
parent 73aff6c039
commit 56f182dde2
91 changed files with 110 additions and 82 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
```ts
import { AppConfig } from '@backstage/config';
import { JsonObject } from '@backstage/config';
import { JsonObject } from '@backstage/types';
import { JSONSchema7 } from 'json-schema';
// @public
+1
View File
@@ -33,6 +33,7 @@
"@backstage/cli-common": "^0.1.4",
"@backstage/config": "^0.1.9",
"@backstage/errors": "^0.1.3",
"@backstage/types": "^0.1.1",
"@types/json-schema": "^7.0.6",
"ajv": "^7.0.3",
"chokidar": "^3.5.2",
+2 -1
View File
@@ -14,7 +14,8 @@
* limitations under the License.
*/
import { AppConfig, JsonObject } from '@backstage/config';
import { AppConfig } from '@backstage/config';
import { JsonObject } from '@backstage/types';
import { assertError } from '@backstage/errors';
const ENV_PREFIX = 'APP_CONFIG_';
@@ -23,7 +23,7 @@ import {
} from 'path';
import { ConfigSchemaPackageEntry } from './types';
import { getProgramFromFiles, generateSchema } from 'typescript-json-schema';
import { JsonObject } from '@backstage/config';
import { JsonObject } from '@backstage/types';
import { assertError } from '@backstage/errors';
type Item = {
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { JsonObject } from '@backstage/config';
import { JsonObject } from '@backstage/types';
import { ConfigVisibility } from './types';
import { filterByVisibility, filterErrorsByVisibility } from './filtering';
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { JsonObject, JsonValue } from '@backstage/config';
import { JsonObject, JsonValue } from '@backstage/types';
import {
ConfigVisibility,
DEFAULT_CONFIG_VISIBILITY,
@@ -14,7 +14,8 @@
* limitations under the License.
*/
import { AppConfig, JsonObject } from '@backstage/config';
import { AppConfig } from '@backstage/config';
import { JsonObject } from '@backstage/types';
import { compileConfigSchemas } from './compile';
import { collectConfigSchemas } from './collect';
import { filterByVisibility, filterErrorsByVisibility } from './filtering';
@@ -14,7 +14,8 @@
* limitations under the License.
*/
import { AppConfig, JsonObject } from '@backstage/config';
import { AppConfig } from '@backstage/config';
import { JsonObject } from '@backstage/types';
/**
* An sub-set of configuration schema.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { JsonObject, JsonValue } from '@backstage/config';
import { JsonObject, JsonValue } from '@backstage/types';
import { assertError } from '@backstage/errors';
import { TransformFunc } from './types';
import { isObject } from './utils';
@@ -16,7 +16,7 @@
import yaml from 'yaml';
import { extname, dirname, resolve as resolvePath } from 'path';
import { JsonObject, JsonValue } from '@backstage/config';
import { JsonObject, JsonValue } from '@backstage/types';
import { isObject } from './utils';
import { TransformFunc, EnvFunc, ReadFileFunc } from './types';
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { JsonValue } from '@backstage/config';
import { JsonValue } from '@backstage/types';
import { TransformFunc, EnvFunc } from './types';
/**
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { JsonValue } from '@backstage/config';
import { JsonValue } from '@backstage/types';
export type EnvFunc = (name: string) => Promise<string | undefined>;
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { JsonValue, JsonObject } from '@backstage/config';
import { JsonValue, JsonObject } from '@backstage/types';
export function isObject(obj: JsonValue | undefined): obj is JsonObject {
if (typeof obj !== 'object') {