From 3184931c8d681b5063cfe7c06ba621d45307a101 Mon Sep 17 00:00:00 2001 From: pablomendezroyo Date: Wed, 14 Aug 2024 12:28:14 +0200 Subject: [PATCH] use assert type json --- packages/common/src/validation/index.ts | 6 +++--- .../src/api/middlewares/ethForward/resolveDomain.ts | 4 ++-- packages/dockerCompose/src/validate.ts | 2 +- packages/schemas/src/validateManifestSchema.ts | 2 +- packages/schemas/src/validateSetupWizardSchema.ts | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/common/src/validation/index.ts b/packages/common/src/validation/index.ts index 0e1e477e3..e3f6c5a86 100644 --- a/packages/common/src/validation/index.ts +++ b/packages/common/src/validation/index.ts @@ -1,7 +1,7 @@ import Ajv from "ajv"; -import routesArgumentsSchema from "./schemas/RoutesArguments.schema.json"; -import routesReturnSchema from "./schemas/RoutesReturn.schema.json"; -import subscriptionsArgumentsSchema from "./schemas/SubscriptionsArguments.schema.json"; +import routesArgumentsSchema from "./schemas/RoutesArguments.schema.json" assert { type: "json" }; +import routesReturnSchema from "./schemas/RoutesReturn.schema.json" assert { type: "json" }; +import subscriptionsArgumentsSchema from "./schemas/SubscriptionsArguments.schema.json" assert { type: "json" }; import { Args } from "typescript-json-schema"; const ajv = new Ajv({ allErrors: true, strict: false }); diff --git a/packages/dappmanager/src/api/middlewares/ethForward/resolveDomain.ts b/packages/dappmanager/src/api/middlewares/ethForward/resolveDomain.ts index 1314c6aa5..980adde61 100644 --- a/packages/dappmanager/src/api/middlewares/ethForward/resolveDomain.ts +++ b/packages/dappmanager/src/api/middlewares/ethForward/resolveDomain.ts @@ -1,7 +1,7 @@ import { ethers } from "ethers"; import { getEthersProvider, getEthUrl } from "@dappnode/installer"; -import resolverAbi from "./abi/resolverAbi.json"; -import ensAbi from "./abi/ens.json"; +import resolverAbi from "./abi/resolverAbi.json" assert { type: "json" }; +import ensAbi from "./abi/ens.json" assert { type: "json" }; import { Network, Content, NotFoundError, EnsResolverError } from "./types.js"; import { decodeContentHash, diff --git a/packages/dockerCompose/src/validate.ts b/packages/dockerCompose/src/validate.ts index f20965e03..4abd66771 100644 --- a/packages/dockerCompose/src/validate.ts +++ b/packages/dockerCompose/src/validate.ts @@ -1,5 +1,5 @@ import { getSchemaValidator } from "@dappnode/utils"; -import compose3xSchema from "./compose_v3x.schema.json"; +import compose3xSchema from "./compose_v3x.schema.json" assert { type: "json" }; import { Compose } from "@dappnode/types"; /** diff --git a/packages/schemas/src/validateManifestSchema.ts b/packages/schemas/src/validateManifestSchema.ts index 9eef2317b..88d33f211 100644 --- a/packages/schemas/src/validateManifestSchema.ts +++ b/packages/schemas/src/validateManifestSchema.ts @@ -1,7 +1,7 @@ import { ajv } from "./ajv.js"; import { CliError } from "./error.js"; import { processError } from "./utils.js"; -import manifestSchema from "./schemas/manifest.schema.json"; +import manifestSchema from "./schemas/manifest.schema.json" assert { type: "json" }; import { Manifest } from "@dappnode/types"; /** diff --git a/packages/schemas/src/validateSetupWizardSchema.ts b/packages/schemas/src/validateSetupWizardSchema.ts index 653cfba47..6ee0048a2 100644 --- a/packages/schemas/src/validateSetupWizardSchema.ts +++ b/packages/schemas/src/validateSetupWizardSchema.ts @@ -1,6 +1,6 @@ import { ajv } from "./ajv.js"; import { processError } from "./utils.js"; -import setupWizardSchema from "./schemas/setup-wizard.schema.json"; +import setupWizardSchema from "./schemas/setup-wizard.schema.json" assert { type: "json" }; import { CliError } from "./error.js"; import { SetupWizard } from "@dappnode/types";