chore: Update all imports to zod/v3
Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
This commit is contained in:
committed by
Fredrik Adelöw
parent
5d8b4cddb9
commit
49171c9de4
+1
-1
@@ -25,7 +25,7 @@ import {
|
||||
} from '@backstage/backend-plugin-api';
|
||||
import PromiseRouter from 'express-promise-router';
|
||||
import { Router, json } from 'express';
|
||||
import { z, AnyZodObject } from 'zod';
|
||||
import { z, AnyZodObject } from 'zod/v3';
|
||||
import zodToJsonSchema from 'zod-to-json-schema';
|
||||
import {
|
||||
ActionsRegistryActionOptions,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
|
||||
/** @internal */
|
||||
export const severityLogLevelMappingsSchema = z.record(
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import type { Config } from '@backstage/config';
|
||||
import { InputError } from '@backstage/errors';
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
import { CONFIG_ROOT_KEY, severityLogLevelMappingsSchema } from './types';
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { CronTime } from 'cron';
|
||||
import { Duration } from 'luxon';
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
|
||||
function isValidOptionalDurationString(d: string | undefined): boolean {
|
||||
try {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { AnyZodObject } from 'zod';
|
||||
import { AnyZodObject } from 'zod/v3';
|
||||
import { BackstageCredentials } from '@backstage/backend-plugin-api';
|
||||
import { BasicPermission } from '@backstage/plugin-permission-common';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
@@ -11,7 +11,7 @@ import { JSONSchema7 } from 'json-schema';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import { LoggerService } from '@backstage/backend-plugin-api';
|
||||
import { ServiceRef } from '@backstage/backend-plugin-api';
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
|
||||
// @alpha (undocumented)
|
||||
export type ActionsRegistryActionContext<TInputSchema extends AnyZodObject> = {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { z, AnyZodObject } from 'zod';
|
||||
import { z, AnyZodObject } from 'zod/v3';
|
||||
import { BasicPermission } from '@backstage/plugin-permission-common';
|
||||
import {
|
||||
LoggerService,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { z, AnyZodObject } from 'zod';
|
||||
import { z, AnyZodObject } from 'zod/v3';
|
||||
import { BasicPermission } from '@backstage/plugin-permission-common';
|
||||
import { LoggerService } from './LoggerService';
|
||||
import { BackstageCredentials } from './AuthService';
|
||||
|
||||
@@ -7,7 +7,7 @@ import { ActionsRegistryActionOptions } from '@backstage/backend-plugin-api/alph
|
||||
import { ActionsRegistryService } from '@backstage/backend-plugin-api/alpha';
|
||||
import { ActionsService } from '@backstage/backend-plugin-api/alpha';
|
||||
import { ActionsServiceAction } from '@backstage/backend-plugin-api/alpha';
|
||||
import { AnyZodObject } from 'zod';
|
||||
import { AnyZodObject } from 'zod/v3';
|
||||
import { BackstageCredentials } from '@backstage/backend-plugin-api';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
} from '@backstage/backend-plugin-api';
|
||||
import { InputError, NotFoundError } from '@backstage/errors';
|
||||
import { JsonObject, JsonValue } from '@backstage/types';
|
||||
import { z, AnyZodObject } from 'zod';
|
||||
import { z, AnyZodObject } from 'zod/v3';
|
||||
import zodToJsonSchema from 'zod-to-json-schema';
|
||||
import { mockCredentials } from '../../services';
|
||||
import {
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
lifecycle: experimental
|
||||
owner: team-c
|
||||
definition: |
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
import { publicProcedure, router } from '../trpc';
|
||||
|
||||
export const apiRouter = router({
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
import {
|
||||
StoredInstance,
|
||||
upsertInstance,
|
||||
|
||||
@@ -20,7 +20,7 @@ import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
import lockfile from 'proper-lockfile';
|
||||
import YAML from 'yaml';
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
|
||||
const METADATA_FILE = 'auth-instances.yaml';
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
import fs from 'fs-extra';
|
||||
import recursiveReaddir from 'recursive-readdir';
|
||||
import { resolve as resolvePath, relative as relativePath } from 'node:path';
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
TEMPLATE_FILE_NAME,
|
||||
} from '../types';
|
||||
import { parse as parseYaml } from 'yaml';
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
import { fromZodError } from 'zod-validation-error/v3';
|
||||
import { ForwardedError } from '@backstage/errors';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { HttpAuthService } from '@backstage/backend-plugin-api';
|
||||
import { InputError } from '@backstage/errors';
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
import express from 'express';
|
||||
import Router from 'express-promise-router';
|
||||
import { todoListServiceRef } from './services/TodoListService';
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
import { PackageRole, PackageRoleInfo } from './types';
|
||||
|
||||
const packageRoleInfos: PackageRoleInfo[] = [
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import fs from 'fs-extra';
|
||||
import { resolve as resolvePath } from 'node:path';
|
||||
import yaml from 'yaml';
|
||||
import z from 'zod';
|
||||
import z from 'zod/v3';
|
||||
import { targetPaths } from '@backstage/cli-common';
|
||||
|
||||
const yarnRcSchema = z.object({
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
BackstageIdentityResponse,
|
||||
ProfileInfo,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
|
||||
/** @internal */
|
||||
export type SamlSession = {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { withLogCollector } from '@backstage/test-utils';
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
import { AuthSessionStore } from './AuthSessionStore';
|
||||
import { SessionManager } from './types';
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ZodSchema } from 'zod';
|
||||
import { ZodSchema } from 'zod/v3';
|
||||
import {
|
||||
MutableSessionManager,
|
||||
SessionScopesFunc,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { TypeOf } from 'zod';
|
||||
import { TypeOf } from 'zod/v3';
|
||||
import { ProxiedSession, proxiedSessionSchema } from './types';
|
||||
|
||||
describe('types', () => {
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
BackstageIdentityResponse,
|
||||
ProfileInfo,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
|
||||
export const proxiedSessionSchema = z.object({
|
||||
providerInfo: z.object({}).catchall(z.unknown()).optional(),
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
import {
|
||||
createZodV3FilterPredicateSchema,
|
||||
parseFilterPredicate,
|
||||
|
||||
@@ -23,7 +23,7 @@ import { Observable } from '@backstage/types';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { SwappableComponentRef as SwappableComponentRef_2 } from '@backstage/frontend-plugin-api';
|
||||
import type { z } from 'zod';
|
||||
import type { z } from 'zod/v3';
|
||||
|
||||
// @public @deprecated
|
||||
export type AlertApi = {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { z, type ZodSchema, type ZodTypeDef } from 'zod';
|
||||
import { z, type ZodSchema, type ZodTypeDef } from 'zod/v3';
|
||||
import zodToJsonSchema from 'zod-to-json-schema';
|
||||
import { PortableSchema } from './types';
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
} from '@internal/frontend';
|
||||
import { ExtensionDataRef, ExtensionDataValue } from './createExtensionDataRef';
|
||||
import { ExtensionInput } from './createExtensionInput';
|
||||
import type { z } from 'zod';
|
||||
import type { z } from 'zod/v3';
|
||||
import { createSchemaFromZod } from '../schema/createSchemaFromZod';
|
||||
import { OpaqueExtensionDefinition } from '@internal/frontend';
|
||||
import { ExtensionDataContainer } from './types';
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
ctxParamsSymbol,
|
||||
VerifyExtensionAttachTo,
|
||||
} from './createExtension';
|
||||
import type { z } from 'zod';
|
||||
import type { z } from 'zod/v3';
|
||||
import { ExtensionInput } from './createExtensionInput';
|
||||
import { ExtensionDataRef, ExtensionDataValue } from './createExtensionDataRef';
|
||||
import { createExtensionDataContainer } from '@internal/frontend';
|
||||
|
||||
@@ -19,7 +19,7 @@ import { dirname, join as joinPath, relative } from 'node:path';
|
||||
import crypto from 'node:crypto';
|
||||
import { Lockfile } from '@backstage/cli-node';
|
||||
import { exists, rm, mkdirp } from 'fs-extra';
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
import { CACHE_DIR, CACHE_FILE } from './constants';
|
||||
|
||||
const version = '1';
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { OpaqueType } from '@internal/opaque';
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
|
||||
import {
|
||||
ScaffolderFormDecorator,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { OpaqueType } from '@internal/opaque';
|
||||
import { z } from 'zod';
|
||||
import { z } from 'zod/v3';
|
||||
|
||||
import {
|
||||
FormFieldExtensionData,
|
||||
|
||||
Reference in New Issue
Block a user