chore: Update all imports to zod/v3

Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
This commit is contained in:
Gabriel Dugny
2026-01-11 21:55:47 +01:00
committed by Fredrik Adelöw
parent 5d8b4cddb9
commit 49171c9de4
111 changed files with 113 additions and 114 deletions
@@ -56,7 +56,7 @@ its generated unit test. We will replace the existing placeholder code with our
import { resolveSafeChildPath } from '@backstage/backend-plugin-api';
import { createTemplateAction } from '@backstage/plugin-scaffolder-node';
import fs from 'fs-extra';
import { type z } from 'zod';
import { type z } from 'zod/v3';
export const createNewFileAction = () => {
return createTemplateAction({
@@ -290,7 +290,7 @@ and type for your field props to preventing having to duplicate the definitions:
```tsx
//packages/app/src/scaffolder/MyCustomExtensionWithOptions/MyCustomExtensionWithOptions.tsx
...
import { z } from 'zod';
import { z } from 'zod/v3';
import { makeFieldSchemaFromZod } from '@backstage/plugin-scaffolder';
const MyCustomExtensionWithOptionsFieldSchema = makeFieldSchemaFromZod(
+1 -1
View File
@@ -23,7 +23,7 @@ import {
createConditionFactory,
createPermissionRule,
} from '@backstage/plugin-permission-node';
import { z } from 'zod';
import { z } from 'zod/v3';
export const isInSystemRule = createPermissionRule({
name: 'IS_IN_SYSTEM',
@@ -126,7 +126,7 @@ import {
createPermissionRule,
} from '@backstage/plugin-permission-node';
import { TODO_LIST_RESOURCE_TYPE } from '@internal/plugin-todo-list-common';
import { z } from 'zod';
import { z } from 'zod/v3';
import { Todo, TodoFilter } from './todos';
export const todoListPermissionResourceRef = createPermissionResourceRef<
@@ -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({
+1 -1
View File
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { z } from 'zod';
import { z } from 'zod/v3';
import {
StoredInstance,
upsertInstance,
+1 -1
View File
@@ -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';
+1 -1
View File
@@ -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[] = [
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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({
@@ -20,7 +20,7 @@ import {
PassportProfile,
SignInInfo,
} from '@backstage/plugin-auth-node';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* Available sign-in resolvers for the Atlassian auth provider.
@@ -19,7 +19,7 @@ import {
SignInInfo,
} from '@backstage/plugin-auth-node';
import { AwsAlbResult } from './types';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* Available sign-in resolvers for the AWS ALB auth provider.
@@ -19,7 +19,7 @@ import {
SignInInfo,
} from '@backstage/plugin-auth-node';
import { AzureEasyAuthResult } from './types';
import { z } from 'zod';
import { z } from 'zod/v3';
/** @public */
export namespace azureEasyAuthSignInResolvers {
@@ -20,7 +20,7 @@ import {
PassportProfile,
SignInInfo,
} from '@backstage/plugin-auth-node';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* Available sign-in resolvers for the Bitbucket auth provider.
@@ -19,7 +19,7 @@ import {
PassportProfile,
SignInInfo,
} from '@backstage/plugin-auth-node';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* Available sign-in resolvers for the Bitbucket Server auth provider.
@@ -19,7 +19,7 @@ import {
SignInInfo,
} from '@backstage/plugin-auth-node';
import { CloudflareAccessResult } from './types';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* Available sign-in resolvers for the Cloudflare Access auth provider.
@@ -19,7 +19,7 @@ import {
SignInInfo,
} from '@backstage/plugin-auth-node';
import { GcpIapResult } from './types';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* Available sign-in resolvers for the Google auth provider.
@@ -19,7 +19,7 @@ import {
OAuthAuthenticatorResult,
SignInInfo,
} from '@backstage/plugin-auth-node';
import { z } from 'zod';
import { z } from 'zod/v3';
import { GithubProfile } from './authenticator';
@@ -19,7 +19,7 @@ import {
OAuthAuthenticatorResult,
SignInInfo,
} from '@backstage/plugin-auth-node';
import { z } from 'zod';
import { z } from 'zod/v3';
import { GitlabProfile } from './authenticator';
@@ -20,7 +20,7 @@ import {
PassportProfile,
SignInInfo,
} from '@backstage/plugin-auth-node';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* Available sign-in resolvers for the Google auth provider.
@@ -20,7 +20,7 @@ import {
PassportProfile,
SignInInfo,
} from '@backstage/plugin-auth-node';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* Available sign-in resolvers for the Microsoft auth provider.
@@ -20,7 +20,7 @@ import {
PassportProfile,
SignInInfo,
} from '@backstage/plugin-auth-node';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* Available sign-in resolvers for the oauth2 auth provider.
@@ -19,7 +19,7 @@ import {
SignInInfo,
} from '@backstage/plugin-auth-node';
import { OAuth2ProxyResult } from './types';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* @public
@@ -20,7 +20,7 @@ import {
PassportProfile,
SignInInfo,
} from '@backstage/plugin-auth-node';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* Available sign-in resolvers for the Okta auth provider.
@@ -20,7 +20,7 @@ import {
PassportProfile,
SignInInfo,
} from '@backstage/plugin-auth-node';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* Available sign-in resolvers for the OneLogin auth provider.
@@ -22,7 +22,7 @@ import {
} from '@backstage/plugin-auth-node';
import { createHash } from 'node:crypto';
import OAuth2Strategy from 'passport-oauth2';
import { z } from 'zod';
import { z } from 'zod/v3';
/** @public */
export interface OpenShiftAuthenticatorContext {
@@ -25,7 +25,7 @@ import {
DEFAULT_NAMESPACE,
stringifyEntityRef,
} from '@backstage/catalog-model';
import { z } from 'zod';
import { z } from 'zod/v3';
export namespace openshiftSignInResolvers {
export const displayNameMatchingUserEntityName = createSignInResolverFactory({
@@ -27,7 +27,7 @@ import { UserInfoDatabase } from '../database/UserInfoDatabase';
import { OidcDatabase } from '../database/OidcDatabase';
import { OfflineAccessService } from './OfflineAccessService';
import { json } from 'express';
import { z } from 'zod';
import { z } from 'zod/v4';
import { fromZodError } from 'zod-validation-error';
import { OidcError } from './OidcError';
+2 -2
View File
@@ -16,8 +16,8 @@ import { Profile } from 'passport';
import { Request as Request_2 } from 'express';
import { Response as Response_2 } from 'express';
import { Strategy } from 'passport';
import { ZodSchema } from 'zod';
import { ZodTypeDef } from 'zod';
import { ZodSchema } from 'zod/v3';
import { ZodTypeDef } from 'zod/v3';
// @public (undocumented)
export interface AuthOwnershipResolutionExtensionPoint {
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { z } from 'zod';
import { z } from 'zod/v3';
import { createSignInResolverFactory } from './createSignInResolverFactory';
import { NotAllowedError } from '@backstage/errors';
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { ZodSchema, ZodTypeDef } from 'zod';
import { ZodSchema, ZodTypeDef } from 'zod/v3';
import { SignInResolver } from '../types';
import zodToJsonSchema from 'zod-to-json-schema';
import { JsonObject } from '@backstage/types';
@@ -19,7 +19,7 @@ import { Entity } from '@backstage/catalog-model';
import path from 'node:path';
import { LocationSpec } from '@backstage/plugin-catalog-common';
import { minimatch } from 'minimatch';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* Rules to apply to catalog entities.
@@ -17,7 +17,7 @@
import { catalogEntityPermissionResourceRef } from '@backstage/plugin-catalog-node/alpha';
import { createPermissionRule } from '@backstage/plugin-permission-node';
import { get } from 'lodash';
import { z } from 'zod';
import { z } from 'zod/v3';
export const createPropertyRule = (propertyType: 'metadata' | 'spec') =>
createPermissionRule({
@@ -16,7 +16,7 @@
import { catalogEntityPermissionResourceRef } from '@backstage/plugin-catalog-node/alpha';
import { createPermissionRule } from '@backstage/plugin-permission-node';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* A catalog {@link @backstage/plugin-permission-node#PermissionRule} which
@@ -16,7 +16,7 @@
import { catalogEntityPermissionResourceRef } from '@backstage/plugin-catalog-node/alpha';
import { createPermissionRule } from '@backstage/plugin-permission-node';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* A catalog {@link @backstage/plugin-permission-node#PermissionRule} which
@@ -16,7 +16,7 @@
import { catalogEntityPermissionResourceRef } from '@backstage/plugin-catalog-node/alpha';
import { createPermissionRule } from '@backstage/plugin-permission-node';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* A catalog {@link @backstage/plugin-permission-node#PermissionRule} which
@@ -16,7 +16,7 @@
import { RELATION_OWNED_BY } from '@backstage/catalog-model';
import { createPermissionRule } from '@backstage/plugin-permission-node';
import { z } from 'zod';
import { z } from 'zod/v3';
import { catalogEntityPermissionResourceRef } from '@backstage/plugin-catalog-node/alpha';
/**
@@ -41,7 +41,7 @@ import {
import express from 'express';
import { Server } from 'node:http';
import request from 'supertest';
import { z } from 'zod';
import { z } from 'zod/v3';
import { Cursor, EntitiesCatalog } from '../catalog/types';
import { applyDatabaseMigrations } from '../database/migrations';
import { DbLocationsRow } from '../database/tables';
@@ -33,7 +33,7 @@ import { InputError, serializeError } from '@backstage/errors';
import { LocationAnalyzer } from '@backstage/plugin-catalog-node';
import express from 'express';
import yn from 'yn';
import { z } from 'zod';
import { z } from 'zod/v3';
import { Cursor, EntitiesCatalog } from '../catalog/types';
import { CatalogProcessingOrchestrator } from '../processing/types';
import { validateEntityEnvelope } from '../processing/util';
@@ -22,7 +22,6 @@ import {
import { Request } from 'express';
import { z } from 'zod/v3';
import { fromZodError } from 'zod-validation-error/v3';
const filterPredicateSchema = createZodV3FilterPredicateSchema(z);
const schema = z.object({
+1 -1
View File
@@ -18,7 +18,7 @@ import { InputError, NotAllowedError } from '@backstage/errors';
import { createZodV3FilterPredicateSchema } from '@backstage/filter-predicates';
import { Request } from 'express';
import lodash from 'lodash';
import { z } from 'zod';
import { z } from 'zod/v3';
import {
Cursor,
QueryEntitiesCursorRequest,
@@ -16,7 +16,7 @@
import { CSSProperties, ReactElement, ReactNode } from 'react';
import { Layout } from 'react-grid-layout';
import { z } from 'zod';
import { z } from 'zod/v3';
import { RJSFSchema, UiSchema } from '@rjsf/utils';
const RSJFTypeSchema: z.ZodType<RJSFSchema> = z.any();
@@ -30,7 +30,7 @@ import {
createPermissionRule,
} from '@backstage/plugin-permission-node';
import { PermissionIntegrationClient } from './PermissionIntegrationClient';
import { z } from 'zod';
import { z } from 'zod/v3';
import { DiscoveryService } from '@backstage/backend-plugin-api';
describe('PermissionIntegrationClient', () => {
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { z } from 'zod';
import { z } from 'zod/v3';
import {
AuthorizeResult,
ConditionalPolicyDecision,
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { z } from 'zod';
import { z } from 'zod/v3';
import express, { Request, Response } from 'express';
import Router from 'express-promise-router';
import { InputError } from '@backstage/errors';
@@ -18,7 +18,7 @@ import { Config } from '@backstage/config';
import { ResponseError } from '@backstage/errors';
import fetch from 'cross-fetch';
import * as uuid from 'uuid';
import { z } from 'zod';
import { z } from 'zod/v3';
import {
AuthorizeResult,
PermissionMessageBatch,
+1 -1
View File
@@ -30,7 +30,7 @@ import { PermissionsServiceRequestOptions } from '@backstage/backend-plugin-api'
import { PolicyDecision } from '@backstage/plugin-permission-common';
import { QueryPermissionRequest } from '@backstage/plugin-permission-common';
import { ResourcePermission } from '@backstage/plugin-permission-common';
import { z } from 'zod';
import { z } from 'zod/v3';
// @public
export type ApplyConditionsRequest = {
@@ -18,7 +18,7 @@ import {
AuthorizeResult,
createPermission,
} from '@backstage/plugin-permission-common';
import { z } from 'zod';
import { z } from 'zod/v3';
import { createConditionExports } from './createConditionExports';
import { createPermissionRule } from './createPermissionRule';
import { createPermissionResourceRef } from './createPermissionResourceRef';
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { z } from 'zod';
import { z } from 'zod/v3';
import { createConditionFactory } from './createConditionFactory';
import { createPermissionRule } from './createPermissionRule';
@@ -18,7 +18,7 @@ import {
PermissionCondition,
PermissionCriteria,
} from '@backstage/plugin-permission-common';
import { z } from 'zod';
import { z } from 'zod/v3';
import { createConditionTransformer } from './createConditionTransformer';
import { createPermissionRule } from './createPermissionRule';
@@ -21,7 +21,7 @@ import {
} from '@backstage/plugin-permission-common';
import express from 'express';
import request, { Response } from 'supertest';
import { z } from 'zod';
import { z } from 'zod/v3';
import {
createPermissionIntegrationRouter,
CreatePermissionIntegrationRouterResourceOptions,
@@ -16,7 +16,7 @@
import express, { Response } from 'express';
import Router from 'express-promise-router';
import { z } from 'zod';
import { z } from 'zod/v3';
import zodToJsonSchema from 'zod-to-json-schema';
import { InputError } from '@backstage/errors';
import {
@@ -19,7 +19,7 @@ import {
PermissionRuleParams,
} from '@backstage/plugin-permission-common';
import { NoInfer, PermissionRule } from '../types';
import { z } from 'zod';
import { z } from 'zod/v3';
import { PermissionResourceRef } from './createPermissionResourceRef';
/**
+1 -1
View File
@@ -18,7 +18,7 @@ import type {
PermissionCriteria,
PermissionRuleParams,
} from '@backstage/plugin-permission-common';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* Prevent use of type parameter from contributing to type inference.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { z as zod } from 'zod';
import { z as zod } from 'zod/v3';
const repoUrl = (z: typeof zod) =>
z.string({
@@ -4,12 +4,12 @@
```ts
import { BackendFeature } from '@backstage/backend-plugin-api';
import { objectOutputType } from 'zod';
import { objectOutputType } from 'zod/v3';
import { ScmIntegrations } from '@backstage/integration';
import { TemplateAction } from '@backstage/plugin-scaffolder-node';
import { UrlReaderService } from '@backstage/backend-plugin-api';
import { Writable } from 'node:stream';
import { ZodTypeAny } from 'zod';
import { ZodTypeAny } from 'zod/v3';
// @public
export interface ContainerRunner {
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { z as zod } from 'zod';
import { z as zod } from 'zod/v3';
const repoUrl = (z: typeof zod) =>
z.string({
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { z as zod } from 'zod';
import { z as zod } from 'zod/v3';
const remoteUrl = (z: typeof zod) =>
z.string({
@@ -16,7 +16,7 @@
/* We want to maintain the same information as an enum, so we disable the redeclaration warning */
/* eslint-disable @typescript-eslint/no-redeclare */
import { z } from 'zod';
import { z } from 'zod/v3';
const commonGitlabConfig = z.object({
repoUrl: z.string({ description: 'Repository Location' }),
@@ -21,7 +21,7 @@ import {
ScmIntegrationRegistry,
} from '@backstage/integration';
import { Gitlab, GroupSchema, RepositoryTreeSchema } from '@gitbeaker/rest';
import { z } from 'zod';
import { z } from 'zod/v3';
import commonGitlabConfig from './commonGitlabConfig';
import { SerializedFile } from '@backstage/plugin-scaffolder-node';
@@ -17,7 +17,7 @@ import { createTemplateAction } from '@backstage/plugin-scaffolder-node';
import { resolveSafeChildPath } from '@backstage/backend-plugin-api';
import fs from 'node:fs/promises';
import path from 'node:path';
import { z as zod } from 'zod';
import { z as zod } from 'zod/v3';
import { examples } from './read.examples';
const contentSchema = (z: typeof zod) =>
@@ -85,7 +85,7 @@ import express from 'express';
import { Duration } from 'luxon';
import { pathToFileURL } from 'node:url';
import { v4 as uuid } from 'uuid';
import { z } from 'zod';
import { z } from 'zod/v3';
import {
DatabaseTaskStore,
DefaultTemplateActionRegistry,
@@ -29,7 +29,7 @@ import {
import { SerializedTask, TaskFilter } from '@backstage/plugin-scaffolder-node';
import { z } from 'zod';
import { z } from 'zod/v3';
import { JsonObject, JsonPrimitive } from '@backstage/types';
import { get } from 'lodash';
@@ -26,7 +26,7 @@ import {
} from '@backstage/plugin-scaffolder-node/alpha';
import { JsonValue } from '@backstage/types';
import { Schema } from 'jsonschema';
import { ZodType, z } from 'zod';
import { ZodType, z } from 'zod/v3';
import zodToJsonSchema from 'zod-to-json-schema';
/**
+1 -1
View File
@@ -8,7 +8,7 @@ import { JsonValue } from '@backstage/types';
import { TaskBroker } from '@backstage/plugin-scaffolder-node';
import { TemplateFilter as TemplateFilter_2 } from '@backstage/plugin-scaffolder-node';
import { TemplateGlobal as TemplateGlobal_2 } from '@backstage/plugin-scaffolder-node';
import { z } from 'zod';
import { z } from 'zod/v3';
// @alpha
export type AutocompleteHandler = (input: {
+1 -1
View File
@@ -33,7 +33,7 @@ import { UpdateTaskCheckpointOptions } from '@backstage/plugin-scaffolder-node/a
import { UrlReaderService } from '@backstage/backend-plugin-api';
import { UserEntity } from '@backstage/catalog-model';
import { Writable } from 'node:stream';
import { z } from 'zod';
import { z } from 'zod/v3';
// @public
export type ActionContext<
@@ -15,7 +15,7 @@
*/
import { ActionContext, TemplateAction } from './types';
import { z } from 'zod';
import { z } from 'zod/v3';
import { Expand, JsonObject } from '@backstage/types';
import { parseSchemas } from './util';
+1 -1
View File
@@ -20,7 +20,7 @@ import { join as joinPath, normalize as normalizePath } from 'node:path';
import { ScmIntegrationRegistry } from '@backstage/integration';
import { TemplateActionOptions } from './createTemplateAction';
import zodToJsonSchema from 'zod-to-json-schema';
import { z } from 'zod';
import { z } from 'zod/v3';
import { Schema } from 'jsonschema';
import { trim } from 'lodash';
@@ -16,7 +16,7 @@
import { ZodFunctionSchema } from '../types';
import { CreatedTemplateFilter, TemplateFilterExample } from './types';
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* This function is used to create new template filters in type-safe manner.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { z } from 'zod';
import { z } from 'zod/v3';
import { ZodFunctionSchema } from '../types';
export type { TemplateFilter } from '../../types';
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { z } from 'zod';
import { z } from 'zod/v3';
import {
CreatedTemplateGlobalFunction,
CreatedTemplateGlobalValue,
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { JsonValue } from '@backstage/types';
import { z } from 'zod';
import { z } from 'zod/v3';
import { ZodFunctionSchema } from '../types';
export type { TemplateGlobal } from '../../types';
+1 -1
View File
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { z } from 'zod';
import { z } from 'zod/v3';
/**
* @alpha
+1 -1
View File
@@ -40,7 +40,7 @@ import { TemplatePresentationV1beta3 } from '@backstage/plugin-scaffolder-common
import { TranslationRef } from '@backstage/frontend-plugin-api';
import { UiSchema } from '@rjsf/utils';
import { WidgetProps } from '@rjsf/utils';
import { z } from 'zod';
import { z } from 'zod/v3';
// @alpha (undocumented)
export type BackstageOverrides = Overrides & {
+1 -1
View File
@@ -59,7 +59,7 @@ import { TemplatesType } from '@rjsf/utils';
import { UIOptionsType } from '@rjsf/utils';
import { UiSchema } from '@rjsf/utils';
import { ValidatorType } from '@rjsf/utils';
import { z } from 'zod';
import { z } from 'zod/v3';
// @public @deprecated
export type Action = Action_2;

Some files were not shown because too many files have changed in this diff Show More